/** File name of the voice diagnostics log within a surface's managed voice root. */ export declare const VOICE_DIAGNOSTICS_FILE = "voice-diagnostics.json"; /** Newest entries kept. Older ones are dropped on the next write. */ export declare const VOICE_DIAGNOSTICS_MAX_ENTRIES = 50; /** Entries older than this are dropped on the next write. */ export declare const VOICE_DIAGNOSTICS_MAX_AGE_MS: number; /** Which path handled (or tried to handle) the audio. */ export type VoiceDiagnosticRoute = 'connected-host' | 'in-process' | 'none'; /** One thing that happened on the voice path, with what it took to explain it. */ export interface VoiceDiagnosticEntry { readonly at: string; /** What was being attempted: `stt`, `wake-transcribe`, `provision-proof`. */ readonly operation: string; readonly route: VoiceDiagnosticRoute; readonly ok: boolean; /** The provider that ran, as far as this surface knows it. */ readonly provider: string; /** Where the configuration behind that provider came from. */ readonly configSource: string; /** The exception text, verbatim, when this entry records a failure. */ readonly error?: string | undefined; /** Anything else the caller knows that a reader would want. */ readonly detail?: string | undefined; } /** Absolute path of the diagnostics file for a managed voice root. */ export declare function voiceDiagnosticsPath(managedRoot: string): string; /** * Read the diagnostics entries, newest last. Never throws: a store that cannot * be read is empty rather than fatal, it is evidence, and evidence that fails * to load must not take the voice path down with it. */ export declare function readVoiceDiagnostics(managedRoot: string): readonly VoiceDiagnosticEntry[]; /** Options for {@link recordVoiceDiagnostic}, injected by tests. */ export interface VoiceDiagnosticsWriteOptions { readonly now?: (() => number) | undefined; readonly maxEntries?: number | undefined; readonly maxAgeMs?: number | undefined; } /** * Append one entry, then bound the store by count and by age. * * Best-effort by design: recording that voice failed must never be the reason * voice fails. A store that cannot be written is a lost diagnostic, not an * error the caller has to handle. */ export declare function recordVoiceDiagnostic(managedRoot: string, entry: VoiceDiagnosticEntry, options?: VoiceDiagnosticsWriteOptions): void; /** One-line rendering of an entry, for a status surface or a reply. */ export declare function describeVoiceDiagnostic(entry: VoiceDiagnosticEntry): string; //# sourceMappingURL=diagnostics.d.ts.map