/** * Client-side frame encode/decode utilities for the WebSocket Relay * wire protocol. * * Mirrors bot-app/src/relay/wire-frames.ts with reversed directions: * - encodeClientFrame: local-server SENDS client frames * - decodeServerFrame: local-server RECEIVES server frames * * @see docs/refactor-plan-websocket-relay.md — Phase 3 */ import type { ServerFrame, ClientFrame, ServerFrameType } from './types.js'; /** Runtime check that a value is a known server frame type string. */ export declare function isValidServerFrameType(type: unknown): type is ServerFrameType; /** Serialize a client frame to a JSON string for sending over WebSocket. */ export declare function encodeClientFrame(frame: ClientFrame): string; /** * Deserialize a JSON string received from the Gateway into a typed ServerFrame. * * Validates that the `type` field is a known server frame type. * Throws on invalid JSON or unknown frame type. */ export declare function decodeServerFrame(data: string): ServerFrame;