import type { AuthContext } from '../authentication.ts'; import type { ServeOptions } from '../index.ts'; import type { WebSocketData } from '../json-rpc-websocket-runtime.ts'; import type { ServerContext } from './context.ts'; export declare const WORKER_STREAM_RE: RegExp; /** Classify a WebSocket request URL and extract relevant parameters. */ export declare function classifyConnection(url: URL): Pick | null; export declare function handleWebSocketUpgrade(server: ReturnType, context: ServerContext, options: ServeOptions, request: Request, url: URL, authContext?: AuthContext): Response | undefined | null;