import type { EditContextType } from "../../client/editContext";
import type { AgentMetadata } from "../../services/agentService";
import type { AgentDialogRequest, CapturePageDomResult, CapturePageScreenshotResult, CapturePageTargetContext } from "./agentDialogTypes";
export declare const CAPTURE_ERROR_CODES: {
    readonly BROWSER_CLAIM_MISMATCH: "browser_claim_mismatch";
    readonly BROWSER_CONTEXT_MISSING: "browser_context_missing";
    readonly PAGE_VIEWER_NOT_OPEN: "page_viewer_not_open";
};
export interface AgentBrowserClaim {
    sessionId?: string;
    browserId?: string;
    terminalInstanceId?: string;
    claimedAt?: string;
}
type CaptureFailureResult = CapturePageScreenshotResult | CapturePageDomResult;
export declare function getBrowserCaptureClaim(metadata: AgentMetadata | null | undefined): AgentBrowserClaim | null;
export declare function setBrowserCaptureClaim(metadata: AgentMetadata | null | undefined, claim: AgentBrowserClaim | null): AgentMetadata;
export declare function buildOpenCaptureContext(editContext: EditContextType | undefined): CapturePageTargetContext | undefined;
export declare function validateBrowserBoundCaptureRequest(params: {
    request: AgentDialogRequest;
    editContext: EditContextType | undefined;
    scope: CapturePageScreenshotResult["scope"] | CapturePageDomResult["scope"];
}): CaptureFailureResult | null;
export declare function buildPageViewerNotOpenFailure(params: {
    request: AgentDialogRequest;
    editContext: EditContextType | undefined;
    scope: CapturePageScreenshotResult["scope"] | CapturePageDomResult["scope"];
}): CaptureFailureResult;
export {};
