import type { RefTable } from "./refs.js"; import type { CdpSend } from "./types.js"; export interface WaitCondition { text?: string; textGone?: string; selector?: string; selectorGone?: string; urlContains?: string; timeoutMs?: number; } export interface WaitResult { met: true; waitedMs: number; } /** Bounds a caller-supplied wait to `MAX_WAIT_TIMEOUT_MS`. * * The wait holds an open evaluate for the whole window, so an unbounded value * would hold a browser and its provider slot indefinitely. Non-numeric input * falls back to the default rather than throwing. */ export declare function clampWaitTimeout(requested: number | undefined): number; /** Waits for one page condition in a single round trip: a mutation observer in the * page resolves the promise, so settle time costs no extra traffic. Throws with the * condition and elapsed time so the agent can decide what to do next. */ export declare function waitForCondition(send: CdpSend, sessionId: string, refs: RefTable, condition: WaitCondition): Promise; /** Blocks until the page stops mutating, capped at `maxMs`. One round trip. */ export declare function waitForQuiet(send: CdpSend, sessionId: string, refs: RefTable, maxMs: number): Promise; //# sourceMappingURL=wait.d.ts.map