/**
 * BrowserObserver — snapshots the current page into a compact, LLM-friendly form.
 *
 * Output contract:
 *   - Every interactive element gets a stable numeric `index` within this snapshot.
 *   - The index is ALSO set on the element via `data-avis-idx="<index>"` so
 *     subsequent actions can re-locate it without re-observing (as long as the
 *     DOM hasn't significantly changed).
 *   - Non-interactive text is preserved as plain "text" lines, interleaved with
 *     interactive lines so the LLM can read the page naturally.
 *
 * Design choice: we keep the in-page script as an inline string so the Node
 * build never needs DOM typings.
 */
import type { Page } from "playwright-core";
export interface ObservedElement {
    index: number;
    tag: string;
    role?: string;
    name?: string;
    value?: string;
    type?: string;
    href?: string;
    placeholder?: string;
    checked?: boolean;
    disabled?: boolean;
    bbox: {
        x: number;
        y: number;
        w: number;
        h: number;
    };
}
export interface ObservedSnapshot {
    url: string;
    title: string;
    viewport: {
        w: number;
        h: number;
    };
    scroll: {
        x: number;
        y: number;
        pagesAbove: number;
        pagesBelow: number;
    };
    elements: ObservedElement[];
    /** Interleaved lines of text and interactive markers, one per line. */
    content: string;
    authSignals?: string[];
}
export declare function observePage(page: Page): Promise<ObservedSnapshot>;
/** Human-readable snapshot for submission to the LLM / display. */
export declare function formatSnapshot(snap: ObservedSnapshot): string;
//# sourceMappingURL=browser-observer.d.ts.map