export interface ClientMessageEnvelope { type: string; data?: unknown; /** REQUIRED for type=action (per client_action.schema.json), optional otherwise. */ match_id?: string; /** REQUIRED for type=action (v1.2 enforcement 2026-07-16): the echo of * action_request.data.request_id. ajv rejects an id-less action outbound. */ request_id?: string; /** Only meaningful for type=action (protocol v1.1): optional model usage * metadata — token counts only. ajv enforces the inner shape. */ usage?: unknown; } export interface ServerMessageEnvelope { type: string; data: unknown; match_id?: string; } /** Warm the ajv cache up-front. Optional — getAjv() is lazy and * serializeClientMessage / parseServerFrame call it on first use. */ export declare function initFrameHandler(): void; /** Test-only: drop the ajv singleton so the next getAjv() call * rewalks loadAllSchemas(). Pairs with __resetSchemasRootCache() * in protocol/schemas.ts. NOT exported from src/index.ts. */ export declare function __resetFrameHandlerCache(): void; export declare function serializeClientMessage(msg: ClientMessageEnvelope): string; export declare function parseServerFrame(raw: string | Buffer): ServerMessageEnvelope;