export type VoiceBridge = { isAvailable(): boolean; start(): Promise | void; stop(): Promise | void; }; export class VoiceCommandBridge implements VoiceBridge { constructor( private readonly sendUserMessage: (message: string) => Promise, private readonly hasVoiceCommand: () => boolean, ) {} isAvailable(): boolean { return this.hasVoiceCommand(); } async start(): Promise { await this.sendUserMessage("/voice"); } async stop(): Promise { await this.sendUserMessage("/voice stop"); } }