import { z } from 'zod'; import { ScreenshotResult } from './webview-executor.js'; /** * Base schema mixin for tools that can target a specific window and app. * All webview tools extend this to support multi-window and multi-app scenarios. */ export declare const WindowTargetSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; }, "strip", z.ZodTypeAny, { windowId?: string | undefined; appIdentifier?: string | number | undefined; }, { windowId?: string | undefined; appIdentifier?: string | number | undefined; }>; export declare const InteractSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { action: z.ZodEnum<["click", "double-click", "long-press", "scroll", "swipe", "focus"]>; selector: z.ZodOptional; strategy: z.ZodDefault>; x: z.ZodOptional; y: z.ZodOptional; duration: z.ZodOptional; scrollX: z.ZodOptional; scrollY: z.ZodOptional; fromX: z.ZodOptional; fromY: z.ZodOptional; toX: z.ZodOptional; toY: z.ZodOptional; }, "strip", z.ZodTypeAny, { action: "swipe" | "focus" | "click" | "double-click" | "long-press" | "scroll"; strategy: "css" | "text" | "xpath"; windowId?: string | undefined; appIdentifier?: string | number | undefined; selector?: string | undefined; x?: number | undefined; y?: number | undefined; duration?: number | undefined; scrollX?: number | undefined; scrollY?: number | undefined; fromX?: number | undefined; fromY?: number | undefined; toX?: number | undefined; toY?: number | undefined; }, { action: "swipe" | "focus" | "click" | "double-click" | "long-press" | "scroll"; windowId?: string | undefined; appIdentifier?: string | number | undefined; selector?: string | undefined; strategy?: "css" | "text" | "xpath" | undefined; x?: number | undefined; y?: number | undefined; duration?: number | undefined; scrollX?: number | undefined; scrollY?: number | undefined; fromX?: number | undefined; fromY?: number | undefined; toX?: number | undefined; toY?: number | undefined; }>; export declare const ScreenshotSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { format: z.ZodDefault>>; quality: z.ZodDefault>; filePath: z.ZodOptional; maxWidth: z.ZodOptional; }, "strip", z.ZodTypeAny, { format: "png" | "jpeg"; quality: number; windowId?: string | undefined; appIdentifier?: string | number | undefined; maxWidth?: number | undefined; filePath?: string | undefined; }, { format?: "png" | "jpeg" | undefined; quality?: number | undefined; windowId?: string | undefined; appIdentifier?: string | number | undefined; maxWidth?: number | undefined; filePath?: string | undefined; }>; export declare const KeyboardSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { action: z.ZodEnum<["type", "press", "down", "up"]>; selector: z.ZodOptional; strategy: z.ZodDefault>; text: z.ZodOptional; key: z.ZodOptional; modifiers: z.ZodOptional, "many">>; }, "strip", z.ZodTypeAny, { action: "type" | "press" | "down" | "up"; strategy: "css" | "text" | "xpath"; text?: string | undefined; windowId?: string | undefined; appIdentifier?: string | number | undefined; selector?: string | undefined; key?: string | undefined; modifiers?: ("Control" | "Alt" | "Shift" | "Meta")[] | undefined; }, { action: "type" | "press" | "down" | "up"; text?: string | undefined; windowId?: string | undefined; appIdentifier?: string | number | undefined; selector?: string | undefined; strategy?: "css" | "text" | "xpath" | undefined; key?: string | undefined; modifiers?: ("Control" | "Alt" | "Shift" | "Meta")[] | undefined; }>; export declare const WaitForSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { type: z.ZodEnum<["selector", "text", "ipc-event"]>; value: z.ZodString; strategy: z.ZodDefault>; timeout: z.ZodDefault>; }, "strip", z.ZodTypeAny, { value: string; type: "text" | "selector" | "ipc-event"; strategy: "css" | "text" | "xpath"; timeout: number; windowId?: string | undefined; appIdentifier?: string | number | undefined; }, { value: string; type: "text" | "selector" | "ipc-event"; windowId?: string | undefined; appIdentifier?: string | number | undefined; strategy?: "css" | "text" | "xpath" | undefined; timeout?: number | undefined; }>; export declare const GetStylesSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { selector: z.ZodString; strategy: z.ZodDefault>; properties: z.ZodOptional>; multiple: z.ZodDefault>; }, "strip", z.ZodTypeAny, { selector: string; strategy: "css" | "text" | "xpath"; multiple: boolean; windowId?: string | undefined; appIdentifier?: string | number | undefined; properties?: string[] | undefined; }, { selector: string; windowId?: string | undefined; appIdentifier?: string | number | undefined; strategy?: "css" | "text" | "xpath" | undefined; properties?: string[] | undefined; multiple?: boolean | undefined; }>; export declare const ExecuteJavaScriptSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { script: z.ZodString; args: z.ZodOptional>; }, "strip", z.ZodTypeAny, { script: string; windowId?: string | undefined; appIdentifier?: string | number | undefined; args?: unknown[] | undefined; }, { script: string; windowId?: string | undefined; appIdentifier?: string | number | undefined; args?: unknown[] | undefined; }>; export declare const FocusElementSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { selector: z.ZodString; }, "strip", z.ZodTypeAny, { selector: string; windowId?: string | undefined; appIdentifier?: string | number | undefined; }, { selector: string; windowId?: string | undefined; appIdentifier?: string | number | undefined; }>; export declare const FindElementSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { selector: z.ZodString; strategy: z.ZodDefault>; }, "strip", z.ZodTypeAny, { selector: string; strategy: "css" | "text" | "xpath"; windowId?: string | undefined; appIdentifier?: string | number | undefined; }, { selector: string; windowId?: string | undefined; appIdentifier?: string | number | undefined; strategy?: "css" | "text" | "xpath" | undefined; }>; export declare const GetConsoleLogsSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { filter: z.ZodOptional; since: z.ZodOptional; }, "strip", z.ZodTypeAny, { filter?: string | undefined; windowId?: string | undefined; appIdentifier?: string | number | undefined; since?: string | undefined; }, { filter?: string | undefined; windowId?: string | undefined; appIdentifier?: string | number | undefined; since?: string | undefined; }>; export declare const DomSnapshotSchema: z.ZodObject<{ windowId: z.ZodOptional; appIdentifier: z.ZodOptional>; } & { type: z.ZodEnum<["accessibility", "structure"]>; selector: z.ZodOptional; strategy: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "accessibility" | "structure"; strategy: "css" | "text" | "xpath"; windowId?: string | undefined; appIdentifier?: string | number | undefined; selector?: string | undefined; }, { type: "accessibility" | "structure"; windowId?: string | undefined; appIdentifier?: string | number | undefined; selector?: string | undefined; strategy?: "css" | "text" | "xpath" | undefined; }>; export declare function interact(options: { action: string; selector?: string; strategy?: string; x?: number; y?: number; duration?: number; scrollX?: number; scrollY?: number; fromX?: number; fromY?: number; toX?: number; toY?: number; windowId?: string; appIdentifier?: string | number; }): Promise; export interface ScreenshotOptions { quality?: number; format?: 'png' | 'jpeg'; windowId?: string; filePath?: string; appIdentifier?: string | number; maxWidth?: number; } export interface ScreenshotFileResult { filePath: string; format: 'png' | 'jpeg'; } export declare function screenshot(options?: ScreenshotOptions): Promise; export interface KeyboardOptions { action: string; selectorOrKey?: string; strategy?: string; textOrModifiers?: string | string[]; modifiers?: string[]; windowId?: string; appIdentifier?: string | number; } export declare function keyboard(options: KeyboardOptions): Promise; export interface WaitForOptions { type: string; value: string; strategy?: string; timeout?: number; windowId?: string; appIdentifier?: string | number; } export declare function waitFor(options: WaitForOptions): Promise; export interface GetStylesOptions { selector: string; strategy?: string; properties?: string[]; multiple?: boolean; windowId?: string; appIdentifier?: string | number; } export declare function getStyles(options: GetStylesOptions): Promise; export interface ExecuteJavaScriptOptions { script: string; args?: unknown[]; windowId?: string; appIdentifier?: string | number; } export declare function executeJavaScript(options: ExecuteJavaScriptOptions): Promise; export interface FocusElementOptions { selector: string; strategy?: string; windowId?: string; appIdentifier?: string | number; } export declare function focusElement(options: FocusElementOptions): Promise; export interface FindElementOptions { selector: string; strategy: string; windowId?: string; appIdentifier?: string | number; } /** * Find an element using various selector strategies. */ export declare function findElement(options: FindElementOptions): Promise; export interface GetConsoleLogsOptions { filter?: string; since?: string; windowId?: string; appIdentifier?: string | number; } /** * Get console logs from the webview. */ export declare function getConsoleLogs(options?: GetConsoleLogsOptions): Promise; export interface DomSnapshotOptions { type: 'accessibility' | 'structure'; selector?: string; strategy?: string; windowId?: string; appIdentifier?: string | number; } /** * Generate a structured DOM snapshot for AI consumption. * Uses aria-api for comprehensive, spec-compliant accessibility computation. */ export declare function domSnapshot(options: DomSnapshotOptions): Promise;