feat(voice): flash ⚡ / default / think 🧠 modes + consent-gated gmail send#191
Merged
Conversation
Three modes on the live voice-to-voice chat, same interface
(docs/VOICE-MODES-DESIGN.md, operator-approved):
- flash: prefill-surgery for snappy turns — context trim 20→8 turns, skip
per-turn memory + observer injections, max_tokens 2000→400, one-sentence
rule, TTS 1.25x. Same local Qwen 35B.
- default: byte-identical to previous behavior.
- think: live multi-step tool calling — utterances route through a
voice-scoped codec_agents.Agent over a curated allowlist (hue, music,
chrome, web search/fetch, calendar, gmail, imessage, timers, reminders,
weather, notes). Each tool call is narrated over TTS (extended-wait
keepalive); speaking interrupts the loop; 6-tool + 120s budgets. Terminal/
python_exec/file_write etc. are hard-excluded and config-immune. The
single-skill fast path still fires first.
Switching: voice command ("flash/think/normal mode", terse-utterance guard so
"i think mode collapse…" can't hijack) + three UI pills on /voice + additive
WS {"type":"mode"} protocol. Kill switch VOICE_MODES_ENABLED. New audit event
voice_mode_changed (AGENTS.md §6 updated); think tool calls ride the existing
run_with_hooks audit chokepoint.
gmail: new consent-gated `send` action (think-mode "send an email" demo).
Strict Step-3 consent — CODEC reads the draft, only the literal spoken word
"send" sends; timeout/disabled/generic-yes fail CLOSED. gmail.modify scope
already covers send (no re-auth). Manifest regenerated (PR-1A).
Tests (TDD red-then-green): tests/test_voice_modes.py (11) +
tests/test_gmail_send.py (6). Full suite 2391 passed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three modes on CODEC's live voice chat, same
/voiceinterface — switch by saying "flash mode" / "think mode" / "normal mode" or via three new pills:Safety
terminal/python_exec/file_write/system/… hard-excluded, config-immune (test-pinned).gmail.modifyscope already authorized — no re-auth.VOICE_MODES_ENABLED=false; newvoice_mode_changedaudit event (AGENTS.md §6); tool calls ride the existingrun_with_hooksaudit/veto chokepoint.Design + tests
docs/VOICE-MODES-DESIGN.md(approved; decisions recorded).codec-dashboard(live).🤖 Generated with Claude Code