import { a as createBrowserToolHandlers, i as ToolResult, n as EXECUTE_DESCRIPTION, r as SEARCH_DESCRIPTION, t as BrowserToolsOptions } from "../shared-Ch9slKdI.js"; //#region src/browser/cdp-session.d.ts interface DebugEntry { at: string; type: string; [key: string]: unknown; } interface CdpSendOptions { timeoutMs?: number; sessionId?: string; } interface CdpAttachOptions { timeoutMs?: number; } /** * A CDP session over an open WebSocket. Manages command correlation, * timeouts, target sessions, and a debug event ring buffer. * * Used host-side (not in the sandbox) — the sandbox calls into this * via DynamicWorkerExecutor's ToolDispatcher RPC. */ declare class CdpSession { #private; constructor(socket: WebSocket, defaultTimeoutMs?: number, dispose?: () => void); send(method: string, params?: unknown, options?: CdpSendOptions): Promise; attachToTarget(targetId: string, options?: CdpAttachOptions): Promise; getDebugLog(limit?: number): DebugEntry[]; clearDebugLog(): void; close(): void; } /** * Connect to a browser via the Browser Rendering binding (Fetcher). * Establishes a CDP WebSocket through the binding's fetch interface. */ declare function connectBrowser(browser: Fetcher, timeoutMs?: number): Promise; /** * Connect to a browser via a CDP base URL (e.g. http://localhost:9222). * Discovers the WebSocket debugger URL via /json/version, * rewrites localhost URLs to the base URL host, and opens the WebSocket. * * Useful for local development with `chrome --remote-debugging-port=9222` * or when connecting through a tunnel. */ declare function connectUrl(baseUrl: string, options?: { timeoutMs?: number; headers?: Record; }): Promise; //#endregion export { type BrowserToolsOptions, type CdpAttachOptions, type CdpSendOptions, CdpSession, EXECUTE_DESCRIPTION, SEARCH_DESCRIPTION, type ToolResult, connectBrowser, connectUrl, createBrowserToolHandlers }; //# sourceMappingURL=index.d.ts.map