import type { FlowSource, FlowState, GuiActionRule, GuiPolicy } from './flow-guard-types.js'; /** What a screen tool last showed: element references → their labels (role and quoted text), and window or page * titles. Labels are outside text: only a recognized canonical action word is shown in a prompt. */ interface ScreenPoint { x: number; y: number; } interface ScreenBox extends ScreenPoint { width: number; height: number; } interface ScreenElement { role?: string; bounds?: ScreenBox; center?: ScreenPoint; focused?: true; multiline?: boolean; form?: string; identifierVerb?: string; identifierDestroy?: string; submit?: true; ambiguous?: true; identityHash?: string; referenceHash?: string; labelHash?: string; } export interface ScreenView { at: string; tool: string; refs: Record; titles: string[]; elements?: Record; focused?: string; origin?: string; application?: string; revision?: string; policyConsumed?: true; policyComplete?: true; contextAmbiguous?: true; } /** How a pointer or keyboard call on a screen server reads: what its target says it does, and a paste after a credential. */ export interface ScreenCall { verb?: string; destroy?: string; ref?: string; paste?: FlowSource & { secret: boolean; }; guarded?: 'pointer' | 'paste' | 'enter' | 'text' | 'keyboard' | 'control'; via?: 'coordinates' | 'focus'; evidence?: 'identifier' | 'form' | 'semantic'; } export declare const screenOperation: (name: string) => string; export declare const MAX_SCREENS = 8; export declare function screenServer(toolName: string): string; /** Invalid GUI policy is strict as a whole: a typo must never create a broader permission. */ export declare function parseGuiPolicy(value: unknown): GuiPolicy; /** The elements and titles a screen tool's result shows, or undefined when the result is not a screen. A screen * tool's result always replaces the server's last view, even when it is only an image: a stale list must not * label the next click. Numbered lists also count from pointer/keyboard action results; acknowledgments alone * keep the previous view, while an image-only action result clears it. `[ref=…]` lines and JSON nodes with a role * count from any tool, since they are what accessibility trees look like. */ export declare function screenFromResult(toolName: string, response: unknown, text: string, input?: Record): Omit | undefined; /** A pointer or keyboard call to an MCP screen server, read against that server's last screen. */ export declare function screenCall(toolName: string, input: Record, state: FlowState): ScreenCall | undefined; /** Operator-selected observation schema only. Never infer read authority from tool annotations. */ export declare function screenObservation(toolName: string, input: Record): boolean; /** Equality evidence for a new observation, not permission and not an attestation of GUI effects. */ export declare function screenTargetEvidence(toolName: string, input: Record, view: ScreenView | undefined): { stamp: string; target: string; } | undefined; export declare function screenTargetStamp(toolName: string, input: Record, view: ScreenView | undefined): string | undefined; export declare function screenResponseEvidence(actionTool: string, action: Record, observationTool: string, observation: Record, response: unknown): { stamp: string; target: string; } | undefined; /** Derive equality evidence from this response itself, never a concurrently replaced cached view. */ export declare function screenResponseStamp(actionTool: string, action: Record, observationTool: string, observation: Record, response: unknown): string | undefined; export declare function guiOperation(toolName: string, input: Record): GuiActionRule['action'] | undefined; /** A credential read that a screen server's calls reveal: a credential path typed (into an open dialog, a * terminal, an address bar) or a window or page title naming a credential file. Only the file name is kept. */ export declare function screenSecretRead(toolName: string, input: Record, view: Omit | undefined): string | undefined; export {}; //# sourceMappingURL=flow-guard-screen.d.ts.map