/** * ipc/validate.ts — Runtime validation for IPC responses. * * IPC calls return Record. These helpers validate * the shape at the system boundary so consumers get typed data * instead of unsafe casts. */ import type { AdapterHealth } from "../types/adapter.js"; /** * Validate and coerce an IPC response into a typed AdapterHealth. * Returns a degraded health object if the response shape is wrong. */ export declare function validateAdapterHealth(raw: unknown): AdapterHealth; export interface ValidatedSession { index: number; name: string; kind: string; active: boolean; } /** * Validate a sessions IPC response. * Expects { sessions: Array<{ index, name, kind, active }> }. */ export declare function validateSessionList(raw: unknown): ValidatedSession[]; export interface ValidatedHubStatus { version: string; adapters: string[]; activeSessions: number; activeSession: string | null; adapterHealth: Record; } /** * Validate a hub status IPC response. */ export declare function validateHubStatus(raw: unknown): ValidatedHubStatus; export interface ValidatedTtsResult { generated: boolean; voice: string; bytes: number; } /** * Validate a TTS IPC response. */ export declare function validateTtsResult(raw: unknown): ValidatedTtsResult; export interface ValidatedTranscription { text: string; } /** * Validate a transcription IPC response. */ export declare function validateTranscription(raw: unknown): ValidatedTranscription; //# sourceMappingURL=validate.d.ts.map