- Add VoiceController actor: wakeWord→listening→thinking→speaking→idle FSM - Add VoiceState.swift: ListeningSource (.wakeWord | .ptt) + VoiceState enum - Add VoiceInterfaces.swift: VoiceOrchestratorInterface, VoiceTTSInterface, VoiceBannerInterface, BusOutboundEmitter, VoiceHudIntent (source of truth) - Add Control/AudioLevelEmitter: RingBuffer RMS at 30 Hz via BusOutboundEmitter - Add Control/PushToTalk: NSEvent.addGlobalMonitorForEvents (VOICE-13) - Add Control/MuteWakeWord: UserDefaults persistence, WakeWordDAG.pause/resume - Update App/HUD/HudStateIntent.swift: typealias VoiceHudIntent = Voice.VoiceHudIntent - Add VoiceControllerTests (V1-V4) + BargeInTests (B1-B4): all 8 pass - VOICE-14: single cancelAndSubmit call site in bargeIn() with 200ms debounce - T-06-05-03: transcript never passed to logger
25 lines
834 B
Swift
25 lines
834 B
Swift
import Foundation
|
|
import Voice
|
|
|
|
/// Intents produced by the agent orchestrator. The coordinator maps these
|
|
/// onto the `lastAgent` shadow field before resolving the precedence ladder.
|
|
public enum AgentHudIntent: Sendable, Equatable {
|
|
case idle
|
|
case thinking
|
|
case speaking
|
|
}
|
|
|
|
/// Intents produced by the voice subsystem (wake word, STT, audio-route
|
|
/// reconfiguration). Mapped onto `lastVoice`.
|
|
///
|
|
/// Source of truth lives in the Voice package (`Voice.VoiceHudIntent`).
|
|
/// Re-exported here so the App target and its tests need only import Foundation.
|
|
public typealias VoiceHudIntent = Voice.VoiceHudIntent
|
|
|
|
/// Intents produced by confirmation prompts (run_applescript gate, etc.).
|
|
/// Mapped onto the `awaitingConfirm` boolean.
|
|
public enum ConfirmHudIntent: Sendable, Equatable {
|
|
case required
|
|
case cleared
|
|
}
|