import { type AgentAction, type CdpPage, type ElementInfo } from './browse-types'; /** * Extract all interactive elements from the DOM with their exact text, * bounding boxes, state, and question group assignments. */ export declare function extractElements(page: CdpPage): Promise; /** * Deterministic state fingerprint of a previously-extracted element, read from * the live node ref stored at extraction (`window.__tsEls[idx]`). * * Diffing this before vs after a click proves whether the click registered, on * ANY widget: whatever a site uses to show "selected" — a class token, an aria * state, an inline style, or a fully replaced node — changes something * observable on that exact node. That makes the verdict independent of the * widget's class names, roles and text (the old text-equality match failed on * whitespace-mangled text and let a landed click score "inert", which then * triggered a second activation that toggled the answer back off). * * Returns null when the ref is gone (navigation or a re-extraction this node did * not survive), which is itself evidence the page moved on. */ export declare function probeElementState(page: CdpPage, index: number): Promise; /** * Newest of the injected observer's two timestamps: `mutated` (any relevant DOM * change) or `changed` (a material change). Any value after a click timestamp * proves the page reacted - including a selection that scores below the * material threshold - so a working click is never mistaken for an inert one. */ export declare function readObservedMutation(page: CdpPage): Promise; /** * Fallback click: activate the option by IDENTITY (text + old position), not * just the coordinates - the point can map to an overlay, or the question can * have advanced, in which case clicking "whatever is there" hits the wrong * control. Fires the full pointer + mouse + click sequence because the CDP * mouse press/release (and often `.click()` alone) is ignored by * pointer-event-driven widgets. Returns false without clicking when the option * is no longer on screen (the screen moved on). */ export declare function domClickAt(page: CdpPage, el: ElementInfo): Promise; export declare function executeAction(page: CdpPage, act: AgentAction, elements: ElementInfo[], charDelayMs: number): Promise; /** * Hybrid action executor: OS-level keyboard/mouse for writing (invisible to detection). * Same logic as executeAction but uses clickOS/typeHumanLike/scrollOS/pressKeyOS. */ export declare function executeActionHybrid(page: CdpPage, act: AgentAction, elements: ElementInfo[], charDelayMs: number): Promise;