/** * BrowserProxySession — proxy that delegates browser operations to the main * process via the local HTTP server. * * Used by MCP tools in the child process when AI_SUPPORT_BROWSER_LOCAL_PORT * is set. Presents the same interface as BrowserSession so that MCP tools * can operate transparently. */ import { BrowserActionLog } from './browser-action-log'; export declare class BrowserProxySession { private readonly baseUrl; private readonly sessionId; readonly variables: ProxyVariableMap; readonly actionLog: BrowserActionLog; constructor(baseUrl: string, sessionId: string); /** * Navigate to a URL and return a screenshot buffer. */ navigate(url: string, options?: { waitForSelector?: string; waitForTimeout?: number; fullPage?: boolean; }): Promise<{ title: string; url: string; screenshot: Buffer; }>; /** * Click an element by CSS selector. */ click(selector: string, options?: { waitForNavigation?: boolean; screenshot?: boolean; }): Promise<{ title: string; url: string; screenshot?: Buffer; }>; /** * Fill a form field. */ fill(selector: string, value: string, screenshot?: boolean): Promise; /** * Extract text from an element and store in a variable (atomic operation). */ extract(selector: string, variableName: string): Promise; /** * Get text content from the page. */ getText(selector?: string): Promise; /** * Take a screenshot. */ screenshot(fullPage?: boolean): Promise; /** * Get the current URL. */ getUrl(): Promise; /** * Get the current page title. */ getTitle(): Promise; /** * Set a session variable. */ setVariable(name: string, value: string): Promise; /** * Get a session variable. */ getVariable(name: string): Promise; /** * List all session variables. */ listVariables(): Promise>; /** * Stub for isActive — proxy sessions are always considered active * as long as the main process session is alive. */ isActive(): boolean; private post; private get; } /** * Proxy Map that delegates variable operations to the local HTTP server. * Provides a synchronous get() that uses a local cache, refreshed by the proxy session methods. */ declare class ProxyVariableMap { private readonly baseUrl; private readonly sessionId; private cache; constructor(baseUrl: string, sessionId: string); get(name: string): string | undefined; set(name: string, value: string): this; /** Update local cache only (no HTTP request). Used when setVariable() already sent the request. */ setLocal(name: string, value: string): void; entries(): IterableIterator<[string, string]>; /** Refresh cache from the server. Call before reading variables. */ refresh(): Promise; } export {}; //# sourceMappingURL=browser-proxy-session.d.ts.map