import type { WebSocket as WSWebSocket } from "ws"; export type BrowserEntry = { targetId: string; type: string; title: string; url: string; }; export type PageSessionHandle = { onMessageFromTools(text: string): void; close(): void; }; export type BrowserEndpointOptions = { listEntries: () => BrowserEntry[]; /** Spin up a per-page CDP session that delivers responses/events via `send`. */ createPageSession: (targetId: string, send: (text: string) => void) => PageSessionHandle | null; refreshMs?: number; }; export declare function attachBrowserWs(ws: WSWebSocket, opts: BrowserEndpointOptions): void;