export type VoiceEnabledEvent = { source: string; }; export type VoiceEnabledClassification = { owner: "meganrogge"; comment: "Fired when the user enables agents.voice.enabled."; source: { classification: "SystemMetaData"; purpose: "FeatureInsight"; comment: "How the setting was enabled (settings UI, command, etc.)."; }; }; export type VoiceDisabledEvent = { daysActive: number; }; export type VoiceDisabledClassification = { owner: "meganrogge"; comment: "Fired when the user disables agents.voice.enabled."; daysActive: { classification: "SystemMetaData"; purpose: "FeatureInsight"; isMeasurement: true; comment: "Number of days the feature was enabled before disabling."; }; }; export type VoiceFirstConnectEvent = { timeToConnectMs: number; }; export type VoiceFirstConnectClassification = { owner: "meganrogge"; comment: "Fired on the first successful WebSocket connect in a window lifetime."; timeToConnectMs: { classification: "SystemMetaData"; purpose: "PerformanceAndHealth"; isMeasurement: true; comment: "Milliseconds from connect() call to WebSocket open."; }; }; export type VoiceOnboardingCompletedEvent = {}; export type VoiceOnboardingCompletedClassification = { owner: "meganrogge"; comment: "Fired when the user completes the voice onboarding flow."; }; export type VoiceSessionStartedEvent = { sessionIndex: number; }; export type VoiceSessionStartedClassification = { owner: "meganrogge"; comment: "Fired each time a voice WebSocket session is started (connect or reconnect)."; sessionIndex: { classification: "SystemMetaData"; purpose: "FeatureInsight"; isMeasurement: true; comment: "Monotonic index of this session within the window lifetime."; }; }; export type VoiceSessionEndedEvent = { turnCount: number; durationSec: number; reconnectCount: number; }; export type VoiceSessionEndedClassification = { owner: "meganrogge"; comment: "Fired when a voice session ends (user disconnect or window close)."; turnCount: { classification: "SystemMetaData"; purpose: "FeatureInsight"; isMeasurement: true; comment: "Total user turns (PTT presses) in this session."; }; durationSec: { classification: "SystemMetaData"; purpose: "FeatureInsight"; isMeasurement: true; comment: "Wall-clock seconds the session was active."; }; reconnectCount: { classification: "SystemMetaData"; purpose: "PerformanceAndHealth"; isMeasurement: true; comment: "Number of automatic reconnects during this session."; }; }; export type VoicePttEvent = { holdDurationMs: number; }; export type VoicePttClassification = { owner: "meganrogge"; comment: "Fired on each PTT release (pttUp). Measures how long the user held the key."; holdDurationMs: { classification: "SystemMetaData"; purpose: "FeatureInsight"; isMeasurement: true; comment: "Milliseconds between pttDown and pttUp."; }; }; export type VoiceTtsListenThroughEvent = { listenedToEnd: boolean; listenedPct: number; }; export type VoiceTtsListenThroughClassification = { owner: "meganrogge"; comment: "Fired when TTS playback finishes or is interrupted. Tracks listen-through rate."; listenedToEnd: { classification: "SystemMetaData"; purpose: "FeatureInsight"; isMeasurement: true; comment: "Whether the user listened to the entire response."; }; listenedPct: { classification: "SystemMetaData"; purpose: "FeatureInsight"; isMeasurement: true; comment: "Approximate percentage of the response the user heard (0-100)."; }; }; export type VoiceToolApprovalEvent = { toolName: string; approved: boolean; }; export type VoiceToolApprovalClassification = { owner: "meganrogge"; comment: "Fired when the voice backend approves or rejects a tool confirmation."; toolName: { classification: "SystemMetaData"; purpose: "FeatureInsight"; comment: "Name of the voice tool that was invoked (respond_to_session)."; }; approved: { classification: "SystemMetaData"; purpose: "FeatureInsight"; isMeasurement: true; comment: "Whether the action was an approval (true) or denial (false)."; }; }; export type VoiceReconnectEvent = { timeSinceLastConnectSec: number; }; export type VoiceReconnectClassification = { owner: "meganrogge"; comment: "Fired on each automatic WebSocket reconnect."; timeSinceLastConnectSec: { classification: "SystemMetaData"; purpose: "PerformanceAndHealth"; isMeasurement: true; comment: "Seconds since the previous successful connect."; }; }; export type VoiceLatencyEvent = { timeToFirstTranscriptionMs: number; endToEndTurnMs: number; }; export type VoiceLatencyClassification = { owner: "meganrogge"; comment: "Fired after a complete voice turn (user speaks \u2192 assistant responds). Measures latency."; timeToFirstTranscriptionMs: { classification: "SystemMetaData"; purpose: "PerformanceAndHealth"; isMeasurement: true; comment: "Milliseconds from pttDown to first partial transcription received."; }; endToEndTurnMs: { classification: "SystemMetaData"; purpose: "PerformanceAndHealth"; isMeasurement: true; comment: "Milliseconds from pttUp to first audio response chunk."; }; }; export type VoiceNarrationDeferredEvent = { kind: string; reason: string; }; export type VoiceNarrationDeferredClassification = { owner: "meganrogge"; comment: "Fired client-side when a requested narration cannot play now and is queued for a later retry (no narration text is logged)."; kind: { classification: "SystemMetaData"; purpose: "FeatureInsight"; comment: "Whether the deferred narration was a response, confirmation prompt, or checkpoint."; }; reason: { classification: "SystemMetaData"; purpose: "FeatureInsight"; comment: "Why it was deferred: busy (narration_ack busy) or interrupted (narration_interrupted)."; }; }; export type VoiceNarrationDroppedEvent = { kind: string; reason: string; rejectionReason?: VoiceNarrationRejectionReason; }; export type VoiceNarrationDroppedClassification = { owner: "meganrogge"; comment: "Fired client-side when a requested narration is dropped without being played (no narration text is logged)."; kind: { classification: "SystemMetaData"; purpose: "FeatureInsight"; comment: "Whether the dropped narration was a response, confirmation prompt, or checkpoint."; }; reason: { classification: "SystemMetaData"; purpose: "FeatureInsight"; comment: "Why it was dropped: invalid (narration_ack invalid), stale (no longer the current narratable item), or session_changed (user switched away from the session)."; }; rejectionReason?: { classification: "SystemMetaData"; purpose: "PerformanceAndHealth"; comment: "For invalid confirmation narrations, the allowlisted backend rejection category. Missing or unrecognized backend reasons are reported as missing or unknown; raw backend text is never logged."; }; }; export type VoiceNarrationRejectionReason = "stale_pending" | "missing" | "unknown"; export declare function toVoiceNarrationRejectionReason(reason: string | undefined): VoiceNarrationRejectionReason;