/** * Wire Format — Length-prefixed MessagePack framing * * Shared encode/decode for CLI ↔ Playground communication over UDS/Named Pipe. * * Wire Format: * ┌────────────────┬───────┬─────────────────────────────────┐ * │ Length (4 bytes)│ Flags │ Payload (N bytes) │ * │ big-endian) │(1 byte│ (MessagePack, JSON, or raw) │ * └────────────────┴───────┴─────────────────────────────────┘ * * Flags byte: * bit 0: compressed (0 = no, 1 = yes) — ALWAYS 0 for UDS * bit 1-2: serialization format (00 = MessagePack, 01 = JSON) * bit 3-7: reserved */ export declare const HEADER_SIZE = 5; export declare const FLAG_FORMAT_MASK = 6; export declare const FLAG_FORMAT_MSGPACK = 0; export declare const FLAG_FORMAT_JSON = 2; export declare const MAX_MESSAGE_SIZE: number; export declare const PTY_NAMESPACE = "pty"; export interface NamespacedMessage { namespace: string; type: string; payload?: T; id?: string; timestamp: number; } export declare function encodeMessage(msg: NamespacedMessage, format?: 'msgpack' | 'json'): Buffer; export interface DecodeResult { message: NamespacedMessage; bytesConsumed: number; } /** * Decode a single frame from buffer. * Returns null if buffer is incomplete. */ export declare function decodeFrame(buffer: Buffer): DecodeResult | null; //# sourceMappingURL=wire.d.ts.map