import type { NodeRouteHandler } from "./http-kit.js"; import type { IncomingMessage } from "node:http"; import type { Duplex } from "node:stream"; import { type RemoteAccessController } from "./remote-access-auth.js"; export declare const browserCdpPathPrefix = "/browser-cdp/"; export type BrowserCdpProxyContext = { upstreamFor: (terminalId: string) => string | undefined; }; export type BrowserCdpRequestTarget = { terminalId: string; upstreamPath: string; }; export declare function isBrowserCdpPath(pathname: string): boolean; export declare function parseBrowserCdpRequestTarget(pathname: string): BrowserCdpRequestTarget | undefined; export declare function createBrowserCdpHttpHandler(context: BrowserCdpProxyContext): NodeRouteHandler; export declare function createBrowserCdpUpgradeRoute(options: { allowedOrigins: () => Set; remoteAccess: RemoteAccessController; upstreamFor: (terminalId: string) => string | undefined; }): { matches(pathname: string): boolean; handle(request: IncomingMessage, socket: Duplex, head: Buffer): void; }; export declare function browserCdpUpstreamPath(pathname: string, search: string): string; export declare function rewriteBrowserCdpVersionBody(body: Buffer, publicWebSocketBase: string): Buffer;