/** * @module browser/pw-cursor * * Human-feel input for the browser tool: a VISIBLE cursor that glides to its * target along a curved, eased path (never teleports), a soft click ripple, and * character-streamed typing with natural rhythm. The point is that a person * watching the screen sees koi *operate* the page like a hand on a mouse — * legible, trustworthy, and clearly "someone is doing this" — instead of fields * snapping full and clicks landing from nowhere. * * The visible cursor is an injected DOM sprite (works identically whether we * drive a headed SKYKOI browser or take over a real Chrome tab via the relay, * where the OS pointer itself doesn't move). The REAL Playwright mouse is driven * along the same trajectory so genuine hover/focus states still fire — the * sprite is the show, the real mouse is the effect. Every visual step is * best-effort: if injection fails, the underlying click/type still happens. */ import type { Locator, Page } from "playwright-core"; /** Feature flag — default ON; set SKYKOI_BROWSER_CURSOR=0 to fall back to raw. */ export declare function humanCursorEnabled(): boolean; /** Move the visible cursor to an element (best-effort). Returns the aim point. */ export declare function moveCursorToLocator(page: Page, locator: Locator, speed?: number): Promise<{ x: number; y: number; } | null>; /** A visible click pulse at the current cursor position. */ export declare function cursorRipple(page: Page): Promise; /** Human typing rhythm: variable per-char delay with pauses after spaces/punctuation. */ export declare function nextKeyDelay(ch: string): number;