feat(voice): speak every intervention, not just critical escalations

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuV8W8oNYRsDWKoqK8Mkqc
This commit is contained in:
Ramis
2026-06-28 10:31:35 -07:00
parent e6e7a42d90
commit d8eaf8d2e2
2 changed files with 8 additions and 7 deletions
+4 -1
View File
@@ -58,7 +58,10 @@ export async function publishHermesIntervention(
void notifyCriticalLiveConversations(collision, intervention, voiceLine).catch((err) => void notifyCriticalLiveConversations(collision, intervention, voiceLine).catch((err) =>
console.warn(`[live-conversation] critical notify failed: ${(err as Error).message}`), 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<string> { async function hermesToken(roomName: string): Promise<string> {
+4 -6
View File
@@ -244,11 +244,9 @@ export class PodMan {
}; };
await recordIntervention(intervention); await recordIntervention(intervention);
await publishHermesIntervention( // Voice every intervention, not just critical escalations. Priority is set
this.room, // by severity inside publishHermesIntervention: critical jumps the queue,
collision, // the rest play sequentially so concurrent alerts don't garble each other.
intervention, await publishHermesIntervention(this.room, collision, intervention, voiceLine);
collision.severity === 'critical' ? voiceLine : undefined,
);
} }
} }