From d8eaf8d2e22ebbebfa4aa0f412a4645b245d66c7 Mon Sep 17 00:00:00 2001 From: Ramis Date: Sun, 28 Jun 2026 10:31:35 -0700 Subject: [PATCH] feat(voice): speak every intervention, not just critical escalations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Voice was gated to severity === 'critical', so most conflict cards were silent. Now every intervention is spoken: priority is derived from severity in publishHermesIntervention — critical jumps the queue, the rest serialize so concurrent alerts don't garble each other. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01LuV8W8oNYRsDWKoqK8Mkqc --- backend/src/action/hermes.ts | 5 ++++- backend/src/agent/podman.ts | 10 ++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/backend/src/action/hermes.ts b/backend/src/action/hermes.ts index 477ed78..58918f3 100644 --- a/backend/src/action/hermes.ts +++ b/backend/src/action/hermes.ts @@ -58,7 +58,10 @@ export async function publishHermesIntervention( void notifyCriticalLiveConversations(collision, intervention, voiceLine).catch((err) => console.warn(`[live-conversation] critical notify failed: ${(err as Error).message}`), ); - if (voiceLine) await speak(room, voiceLine, { priority: 'critical' }); + if (voiceLine) + await speak(room, voiceLine, { + priority: collision.severity === 'critical' ? 'critical' : 'normal', + }); } async function hermesToken(roomName: string): Promise { diff --git a/backend/src/agent/podman.ts b/backend/src/agent/podman.ts index 73b7e3d..caea6f6 100644 --- a/backend/src/agent/podman.ts +++ b/backend/src/agent/podman.ts @@ -244,11 +244,9 @@ export class PodMan { }; await recordIntervention(intervention); - await publishHermesIntervention( - this.room, - collision, - intervention, - collision.severity === 'critical' ? voiceLine : undefined, - ); + // Voice every intervention, not just critical escalations. Priority is set + // by severity inside publishHermesIntervention: critical jumps the queue, + // the rest play sequentially so concurrent alerts don't garble each other. + await publishHermesIntervention(this.room, collision, intervention, voiceLine); } }