import type { Tool } from "../types.js"; export interface BrowserPageSnapshot { requestedUrl: string; finalUrl: string; status?: number; html: string; mode: "headed" | "headless"; } export interface BrowserPageReader { read(url: string, signal?: AbortSignal): Promise; } /** Statuses that usually mean "this client was refused", not "this page does * not exist". 401/404/410 are real answers and are not retried in a browser. */ export declare const BROWSER_FALLBACK_STATUSES: ReadonlySet; export declare function shouldUseBrowserFallback(status: number): boolean; /** Drives the playwright_browser tool through its public actions, so session * ownership, cancellation and launch recovery stay in one place. Uses a * visible browser when a display exists, otherwise a headless one. */ export declare function browserPageReaderFromTool(browser: Tool, options?: { headed?: boolean; }): BrowserPageReader; /** A reader with its own lazily launched browser session, so a fallback never * replaces the agent's interactive playwright_browser page. Reads are * serialized because the session drives a single page. */ export declare function createDedicatedBrowserPageReader(workingDir?: string): BrowserPageReader;