/** Build the WebSocket stream URL from the HTTP base. http→ws, https→wss. The * token rides the query string because browsers can't set an Authorization * header on a WebSocket handshake; the server authenticates it the same way it * authenticates the SSE `?cursor=` stream. `cursor` resumes after a reconnect, * mirroring the SSE plane. */ export declare function deriveWsStreamUrl(baseUrl: string, sessionId: string, token: string, cursor?: number): string; /** Normalize an incoming WS message into the `{ event, data }` shape the SSE * frame handler already consumes, so both transports converge on one code * path. Accepts two wire forms: * 1. a framed message: { "event": "...", "data": "" } * 2. a bare envelope: { "type": "...", ... } → event defaults to "message" * Returns null for anything unparseable (the caller drops it). */ export declare function decodeWsMessage(raw: string): { event: string; data: string; } | null; /** Frame an outbound user-input message for the WS plane (for hosts that also * accept input over the socket). Mirrors the REST `/input` body. */ export declare function encodeWsInput(text: string, opts?: { image?: string; }): string; //# sourceMappingURL=ws-transport.d.ts.map