refactor(talk): retire the Talk voice orchestrator - #124
Open
hristo2612 wants to merge 3 commits into
Open
Conversation
Talk's HTTP surface and web layer were deleted in 2478ab8; the backend was not. Nothing assigned source: "talk" afterwards, so every talk branch became unreachable, maybeEmitTalkGraph emitted to a channel with no subscribers, and the attachment map stayed permanently empty. The template half was worse than dead: setup seeded template/talk/ into every new instance, where card-reference.md told the user's agent that POST /api/talk/delegate was its ONLY delegation surface and to never call /api/sessions. That endpoint 404s. Delete the orchestrator: graph, attachments, mute state, the persona loader, the card protocol, the per-sentence speech buffer, and the unreachable branches in api.ts, callbacks.ts and context.ts. Session has one vocabulary again instead of a talk-root / card / graph / focus layer on top of it. Chat read-aloud is untouched: /api/tts, tts-stream's synth exports, kokoro, speakable and kokoro_sidecar.py all survive byte-identical, as does push-to-talk dictation. The talk config key keeps its name so no config.yaml needs editing; only the unread enabled/engine/orchestratorModel fields are dropped. "talk" stays in NON_CONNECTOR_SOURCES because historical databases still hold talk-sourced rows. Three non-talk regression tests that lived inside the deleted talk describes are rescued with byte-identical assertions rather than dropped. Installed instances get ~/.jinn/talk/ removed via the 0.29.1 migration bundle, which snapshots both files and flags a user-modified copy for review instead of deleting it silently.
The plan's leak-grep recipe spelled out the patterns inline, which put the operator's account name into a public repo -- the exact identifier class the check exists to catch. Point at an untracked local pattern file instead.
hristo2612
marked this pull request as ready for review
August 3, 2026 12:43
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.
Retires the orphaned Talk voice-orchestrator backend. Chat read-aloud and push-to-talk dictation are untouched.
Selected area
packages/jinn/src/talk/and every consumer of it: the unreachable talk branches ingateway/api.ts,sessions/callbacks.ts,sessions/context.ts, and thetemplate/talk/files that
cli/setup.tsseeded into every new instance.Evidence of over-engineering / blended concerns
Talk's HTTP surface and its whole web layer were deleted in
2478ab83(2026-07-08). Thebackend was not. Verified at the base SHA:
/api/talk/*routes exist ingateway/api.ts;packages/web/src/routes/talk/does not exist.
source: "talk". No install can create a talk session,so all 12
source === "talk"branches were unreachable.maybeEmitTalkGraphemittedtalk:graphto a WebSocket channel with zero subscribersin
packages/web/src, and its own guard made every call a no-op regardless.attach()/detach()/setTalkMuted()/clearTalkMuted()had zero productioncallers, so the attachment map was permanently empty and
isTalkMutedwas constantfalse.The blended concern: session vocabulary. A talk-root / card / graph / focus layer sat on top
of plain sessions, so
callbacks.tsandcontext.tseach had to branch on whether a parentwas a talk parent before doing ordinary work. Removing it gives Session one vocabulary again.
The template half was actively harmful rather than merely dead.
cli/setup.tsseededtemplate/talk/into every new instance, wherecard-reference.mdtold the user's agent thatPOST /api/talk/delegatewas its only delegation surface and that it should never call/api/sessions. That endpoint 404s, so every new install shipped with a document misdirectingits own agents.
Fixed constraint budget
No new dependencies, no new config options, no new public exports, no single-caller
abstractions, no touched file may grow.
Measured budget, reconciled
Raw output of the budget command against base
ebaac281:Three of the four appear to breach. All three breaches come from one source, and it is not
code this PR authored.
Verified contract defect — the migration-bundle generator measures a release, not a change.
pnpm migration:generate --version 0.29.1 --base-ref v0.29.0emits the entirepackages/jinn/template/delta between thev0.29.0tag and HEAD. Template drift forCLAUDE.md,docs/connectors.md,skills/todo-handling/SKILL.md,skills/workflow/SKILL.md,and
scripts/workflow-triggers/README.mdlanded on main after the 0.29.0 tag and beforethis branch's base. Verified: all of those differ between
v0.29.0and baseebaac281, andthis branch touches none of them. The generator therefore emits 9 payload files / 1334 added
lines that this PR did not write and cannot avoid.
That is correct behaviour for the upgrade path — a user on 0.29.0 does need those updates,
and they have no other release to arrive in. It is a defect only as a measurement contract:
any PR that cuts a release bundle has its line budget silently inflated by unrelated drift
accumulated since the previous tag. Flagged rather than worked around; suppressing it would
break the upgrade.
Reconciled, excluding those 9 generator-inherited files:
The excision alone (excluding
PLAN.mdand the whole bundle) is −2583 lines across 28files, 33 added / 2616 deleted, 0 new files.
api.tsshrinks 7676 → 7587. Every touchedfile shrinks.
What was deleted
Whole files (14):
talk/graph.ts,attachments.ts,mute-state.ts,orchestrator-persona.ts,INTEGRATION.md, their four tests,talk/__tests__/tts-stream.test.ts, bothtemplate/talk/*.md, and three unreferencedscripts/talk-scenarios/*.jsonfixtures.Trimmed:
talk/protocol.ts188 → 32: keeps only the TTS engine contract (Emit,Tts, and the 4TALK_EVENTSkeys kokoro.ts actually emits). Deletes 17 card types,TalkState,JobStatus,TrackerTask, all event interfaces and HTTP shapes — every one had zero importers.talk/tts-stream.ts251 → 96: deletes the per-sentence speech buffer (TurnState, theturns/tailsmaps,extractSentences,queueSentence,feedTalkText,flushTalkSpeech,discardTalkSpeech). The synth path is untouched.gateway/api.ts−99: the unreachable talk branches and their dead imports.sessions/callbacks.ts−123:buildTalkWake,notifyAttachedTalkSessions,talkLabel, andthe talk arms of
notifyRateLimitResumed/notifyParentSession.sessions/context.ts−53:TalkThreadSummary,buildTalkThreadsSection, thevoicePersona/talkThreadsoptions, and the twosource: "talk"context sections.shared/types.ts−9: the unreadtalk.enabled/talk.engine/talk.orchestratorModelconfig fields.
What was clarified
Prose the diff falsified, corrected in place: the
/api/ttscomment no longer claims it drivesa voice loop; the persona mtime-cache comment no longer cross-references a deleted file; the
promptExcerptcomment's only example was talk delegation and is now generic;cli/setup.tsno longer says "
/talkand/chat"; both READMEs drop the hands-free-talk-mode claim whilekeeping push-to-talk dictation.
What deliberately survives
/api/ttsGET+POST,tts-stream.tssynth exports,kokoro.ts,speakable.ts,kokoro_sidecar.py, and both surviving talk tests are not ingit diff --name-onlyat all. Zeropackages/webchanges.talkconfig key keeps its name, so no existingconfig.yamlneeds editing, and"talk"stays in the
KNOWN_KEYSallowlist sotalk.kokorostill round-trips throughPUT /api/config."talk"stays inNON_CONNECTOR_SOURCES— historical databases still hold talk-sourced rows.rescued, not dropped, with byte-identical assertions.
Installed instances
The 0.29.1 migration bundle removes
~/.jinn/talk/. Both files are user-editable, soMIGRATION.mdinstructs the merge agent to snapshot each one and flag a user-modified copy forreview rather than deleting it silently. Only a byte-identical copy is removed unreviewed.
Test results
pnpm typecheck,pnpm test,pnpm buildall run against the final commitfeff3f69.Disclosure — one flaky local run. The first
pnpm testinvocation on this machine reported3 failures across 33 files. All three were 5000 ms vitest timeouts (
Test timed out in 5000ms),not assertion failures, in
src/workflows/__tests__/repository-runs.test.tsand an MCP manifesttest — both outside this change's blast radius. That run also reported 480 skipped tests versus
7 in a healthy run, the signature of files aborting under load. A clean re-run of the identical
command passed 432/432 files. Recording it rather than quietly re-rolling.
Leak-grep over the full branch diff is clean: the only matches are literal
xoxb-...placeholderstrings inside the generated
docs/connectors.mdtemplate payload.Follow-ups (not done here, reported on PLA-59)
kokoro.tsdead surface after this change:speak(),warm(),download(),shutdown()(~195 lines). Nothing downloads Kokoro weights once
download()is unreachable — worthconfirming before anyone prunes it.
speakable.ts/toSpeakableis now orphaned; wiring it intostreamTtsSentencesforserver-side sanitization would be a behaviour change, so it was left alone.
synthesizeTexthas no production caller (test-covered).src/talk/→src/tts/rename now that only the synth path remains.audio-player.ts,use-live-session.ts,registry.ts:435-437,antigravity-protocol.ts:70) and the"talk"entries in webFOCUSED_SOURCES.Closes PLA-59.