import type { BrowserFormField } from "./client-actions-core.js"; export declare function highlightViaPlaywright(opts: { cdpUrl: string; targetId?: string; ref: string; }): Promise; export declare function clickViaPlaywright(opts: { cdpUrl: string; targetId?: string; ref: string; doubleClick?: boolean; button?: "left" | "right" | "middle"; modifiers?: Array<"Alt" | "Control" | "ControlOrMeta" | "Meta" | "Shift">; timeoutMs?: number; }): Promise; export declare function hoverViaPlaywright(opts: { cdpUrl: string; targetId?: string; ref: string; timeoutMs?: number; }): Promise; export declare function dragViaPlaywright(opts: { cdpUrl: string; targetId?: string; startRef: string; endRef: string; timeoutMs?: number; }): Promise; export declare function selectOptionViaPlaywright(opts: { cdpUrl: string; targetId?: string; ref: string; values: string[]; timeoutMs?: number; }): Promise; export declare function pressKeyViaPlaywright(opts: { cdpUrl: string; targetId?: string; key: string; delayMs?: number; }): Promise; export declare function typeViaPlaywright(opts: { cdpUrl: string; targetId?: string; ref: string; text: string; submit?: boolean; slowly?: boolean; timeoutMs?: number; }): Promise; export declare function fillFormViaPlaywright(opts: { cdpUrl: string; targetId?: string; fields: BrowserFormField[]; timeoutMs?: number; }): Promise; export declare function evaluateViaPlaywright(opts: { cdpUrl: string; targetId?: string; fn: string; ref?: string; }): Promise; export declare function scrollIntoViewViaPlaywright(opts: { cdpUrl: string; targetId?: string; ref: string; timeoutMs?: number; }): Promise; export declare function waitForViaPlaywright(opts: { cdpUrl: string; targetId?: string; timeMs?: number; text?: string; textGone?: string; selector?: string; url?: string; loadState?: "load" | "domcontentloaded" | "networkidle"; fn?: string; timeoutMs?: number; }): Promise; export declare function takeScreenshotViaPlaywright(opts: { cdpUrl: string; targetId?: string; ref?: string; element?: string; fullPage?: boolean; type?: "png" | "jpeg"; }): Promise<{ buffer: Buffer; }>; export declare function screenshotWithLabelsViaPlaywright(opts: { cdpUrl: string; targetId?: string; refs: Record; maxLabels?: number; type?: "png" | "jpeg"; }): Promise<{ buffer: Buffer; labels: number; skipped: number; }>; export declare function setInputFilesViaPlaywright(opts: { cdpUrl: string; targetId?: string; inputRef?: string; element?: string; paths: string[]; }): Promise; export type BatchStep = ({ kind: "click"; ref: string; doubleClick?: boolean; } | { kind: "type"; text: string; } | { kind: "press"; key: string; } | { kind: "wait"; ms: number; }) & { /** Spoken aloud (and shown) the moment this step starts — the koi narrating * its own hands in real time. Keep it short and human ("adding the heater"). */ say?: string; }; export type BatchStepResult = { i: number; kind: BatchStep["kind"]; ok: boolean; ms: number; skipped?: boolean; error?: string; }; /** Interject: stop the running batch at the next step boundary. */ export declare function abortBatchViaPlaywright(): void; export declare function batchViaPlaywright(opts: { cdpUrl: string; targetId?: string; steps: BatchStep[]; /** "fast" (default): quick glides + tight keystrokes — visible but brisk. * "human": the relaxed single-action rhythm. */ pace?: "fast" | "human"; /** Called as each narrated step starts — wire to the narration bus so the * koi SPEAKS its work live. Fire-and-forget; never blocks the hands. */ narrate?: (text: string) => void; }): Promise<{ results: BatchStepResult[]; aborted: boolean; totalMs: number; }>;