import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
import type { ToolExample } from "@oh-my-pi/pi-ai";
import type { ToolSession } from "../sdk.js";
import { type BrowserKindTag } from "./browser/registry.js";
import type { Observation, ScreenshotResult } from "./browser/tab-protocol.js";
import type { OutputMeta } from "./output-meta.js";
export { type AriaSnapshotOptions, buildAriaSnapshotScript, parseAriaRefSelector, } from "./browser/aria/aria-snapshot.js";
export { cmuxSnapshotToObservation, mapWaitUntil, resolveCmuxKind, serializeEval } from "./browser/cmux/rpc.js";
export { CmuxSocketClient } from "./browser/cmux/socket-client.js";
export { extractReadableFromHtml, type ReadableFormat, type ReadableResult } from "./browser/readable.js";
export type { Observation, ObservationEntry } from "./browser/tab-protocol.js";
declare const browserSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    action: "close" | "open" | "run";
    name?: string | undefined;
    url?: string | undefined;
    app?: {
        path?: string | undefined;
        cdp_url?: string | undefined;
        args?: string[] | undefined;
        target?: string | undefined;
    } | undefined;
    viewport?: {
        width: number;
        height: number;
        scale?: number | undefined;
    } | undefined;
    wait_until?: "domcontentloaded" | "load" | "networkidle0" | "networkidle2" | undefined;
    dialogs?: "accept" | "dismiss" | undefined;
    code?: string | undefined;
    timeout?: number | undefined;
    all?: boolean | undefined;
    kill?: boolean | undefined;
}, {}>;
/** Input schema for the browser tool. */
export type BrowserParams = typeof browserSchema.infer;
/** Details describing a browser tool execution result (for renderers + transcript). */
export interface BrowserToolDetails {
    action: BrowserParams["action"];
    name?: string;
    url?: string;
    browser?: BrowserKindTag;
    viewport?: {
        width: number;
        height: number;
        deviceScaleFactor?: number;
    };
    observation?: Observation;
    screenshots?: ScreenshotResult[];
    result?: string;
    meta?: OutputMeta;
}
/**
 * Browser tool: stateful, multi-tab. Three actions:
 * - `open`  → acquire/create a named tab on a browser kind (headless | spawned | connected) and optionally goto a url.
 * - `close` → release a named tab (or all tabs); dispose browser when refcount hits 0.
 * - `run`   → execute JS code against an existing tab with `page`/`browser`/`tab` helpers in scope.
 */
export declare class BrowserTool implements AgentTool<typeof browserSchema, BrowserToolDetails> {
    #private;
    private readonly session;
    readonly name = "browser";
    readonly approval: "exec";
    readonly formatApprovalDetails: (args: unknown) => string[];
    readonly label = "Browser";
    readonly loadMode = "discoverable";
    readonly summary = "Control a headless browser to navigate and interact with web pages";
    readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
        action: "close" | "open" | "run";
        name?: string | undefined;
        url?: string | undefined;
        app?: {
            path?: string | undefined;
            cdp_url?: string | undefined;
            args?: string[] | undefined;
            target?: string | undefined;
        } | undefined;
        viewport?: {
            width: number;
            height: number;
            scale?: number | undefined;
        } | undefined;
        wait_until?: "domcontentloaded" | "load" | "networkidle0" | "networkidle2" | undefined;
        dialogs?: "accept" | "dismiss" | undefined;
        code?: string | undefined;
        timeout?: number | undefined;
        all?: boolean | undefined;
        kill?: boolean | undefined;
    }, {}>;
    readonly strict = true;
    readonly examples: readonly ToolExample<typeof browserSchema.infer>[];
    constructor(session: ToolSession);
    get description(): string;
    /** Restart browser to apply mode changes (e.g. headless toggle). Drops only headless browsers. */
    restartForModeChange(): Promise<void>;
    execute(_toolCallId: string, params: BrowserParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<BrowserToolDetails>, _ctx?: AgentToolContext): Promise<AgentToolResult<BrowserToolDetails>>;
}
