Repository navigation
CONTRACT: feat(ui-server, ui-react): configure the default live-conversation service in Settings › Voice (#3616) - #3956
Conversation
… each Start (#3616) createApp accepts conversationProviders and defaultConversationProviderId; conversationProvider still means a list of one. Startup fails on both options, duplicate ids or an unregistered host default. A new Start uses a one-time pick (conversation_start.providerId, which must equal the disclosed profile), else the saved default only if registered, else the host default or the only service when nothing is saved, else none. A saved but unusable default never falls through. A resume keeps the service its conversation opened with. server_hello adds conversationProfiles and liveDefault and keeps conversationProfile only while a service is effective (R1). A save sends live_settings to open connections. conversation_opened adds providerSource. GET/PUT /api/settings/voice read and save voice.live.defaultProvider in the settings store, behind a new owner-only write guard (owner password/passkey session or ambient human; 403 with an empty body otherwise), with 400 LIVE_PROVIDER_UNKNOWN and 409 LIVE_SETTINGS_CHANGED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LiveServiceSettings draws the registered services as 52px radio rows with saved default, host default and in use now marks, a dashed unavailable row that cannot be chosen, the zero and one service variants, saving, stale and failed states and the read-only owner line. A wide container puts the label in a 140px column and two services side by side. Stories cover every state at 320px and desktop in both themes, plus the full pane with Dictation and Persona neighbours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and before Start (#3616) Settings › Voice adds the Live service group under Dictation. Picks save brain-wide at once through a root-owned, latest-wins queue; 403 turns the group read-only, 409 reloads with "Changed on another device". The conversation client reads the hello roster and live_settings, pins the service an explicit Start agreed to for that entry, and exposes chooseService() for a one-time pick that is never saved; Start sends providerId. The disclosure sheet offers that pick when several services are usable or the saved default is unavailable, as a minimal stand-in until the Start card (#3698). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3616) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#3616) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No uploads on this PR yet This PR changes UI files (
Tips for agentsLabel each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one uploads put after.png --pr 3956 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 3956 --app ios --screen "Chat" --state afterNo CLI? With the Uploads MCP, call This comment updates with each upload, so you don't need to post the images yourself. A shot or two in the PR description is still welcome. Check what's attached with Workspace admins can turn this comment off in Settings → GitHub · docs |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The live-service default joins the persona group on the one /api/settings/voice route (design §6): top-level defaultProvider/revision beside persona with its own revision, under the owner-only write guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ith personas (#3616) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #3616
What changed
A host can register both live-conversation adapters, and the brain's owner picks the default in Settings › Voice → Live service. The design is the one signed off on #3616 (§1–§7, L1–L3, R1).
createApp({ conversationProviders, defaultConversationProviderId }). The legacyconversationProviderstill means a list of one. Startup fails on any of:server_helloaddsconversationProfilesandliveDefault. It keepsconversationProfileonly while a service is effective (R1), so a single-provider host sends exactly what it sent before.live_settingsto every open connection.conversation_startacceptsproviderId. It must equaldisclosed.providerIdand name a registered service, or the existingCONVERSATION_DISCLOSURErefusal applies and nothing opens.conversation_openedaddsproviderSource(change | saved | host | only).GET/PUT /api/settings/voicetakes{ defaultProvider, revision }and stores it in the ui-server settings store undervoice.live.defaultProvider.isLiveSettingsWriter. It accepts the owner's password or passkey session, or the ambient human. Any other principal gets 403 with an empty body, before the body is read.LIVE_PROVIDER_UNKNOWN. A stale revision returns 409LIVE_SETTINGS_CHANGEDwithcurrent.LiveServiceSettingscovers every state: zero, one and several services, host default, saved default, in use now, saved-but-unavailable as a dashed row that can't be chosen, saving, 409, failed, and read-only. On a wide container the label sits in a 140px column and two services sit side by side.live_settings, and pins the service an explicit Start agreed to for that entry. It exposeschooseService()for a one-time pick that is never saved, and sendsproviderId.What #3698 should consume
liveServiceView(conversation.state.getState())inpackages/ui-react/src/voice/live-service.tsreturns:services: the usable profiles;selected: what Start would disclose and open, ornull;source:change | saved | host | only | none | legacy;savedUnavailable: the S3d id;pickRequired;canChange: whether to show Change (L1);liveDefault.conversation.chooseService(id | null)is the per-Start override. It applies to this entry only, is never saved, and is ignored after Start.nullreturns to the effective service.conversation.stateconversationProfileis always the profile Start sends.conversation.start()sendsproviderIdautomatically.Why this shape
createBrainUiServer, but the host entry point iscreateApp(CreateAppOptions). The options live there.LIVE_SETTINGS_INVALID;providerSource;live_settingsgoes to every connection, the same audience as hello. Older clients drop it as an unknown frame:parseServerMessagereturnsok: falseand nothing else happens.Proof
{"version":1,"kind":"brain-check-pr-receipt","head":"e928c04f0bd1eb9a0865199713794171de8cb188","base":"origin/main","mode":"focused","startedAt":"2026-11-11T04:07:22.060Z","finishedAt":"2026-11-11T04:08:53.795Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12342.181754000001},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":101.73596700000053},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":65.13855800000056},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":24.207178999999087},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":79185.9151}]}packages/ui-server/tests/live-provider-selection.test.ts(new, 18 pass). Two keyless adapter doubles cover:conversationProfile), and which double'sopenran, or neither;providerIdopens nothing;live_settings, doesn't close or retarget, and the resume keeps its service;packages/ui-react/tests/live-service-runtime.test.ts(new, real Chrome against a real password-mode server, 8 pass at 320 and 1280px):SETTINGS_OPENS_NO_MICROPHONEandSETTINGS_OPENS_NO_PROVIDER;NO_PROVIDER_BEFORE_STARTandNO_MICROPHONE_BEFORE_START: no audio or history crosses before Start, becauseopenis where history is handed over;Voice/Settings · Live service(12 stories × light/dark = 24 pass): axe, 52px rows, 320 stacked, the desktop 140px column with two services side by side, and the full pane showing that Dictation, Live service and Persona don't interact.server-schemas.test.ts:live_settingsis in the frame inventory, and a malformed roster orliveDefaultis dropped without losing the hello.ws-conversation(120),gemini-/gpt-live-conversation,selectable-dictation,http-inventoryandhttp-supported-mounts(the new rows pass) all pass.host-capability-noteandws-live-policy-parityfail the same 25 tests on an untouchedorigin/mainworktree, because of the sandbox's worker boundary.provider-historyguard can't start in this sandbox (WorkerHostError). Nothing on a turn's path changed:provider.openoptions and history assembly are untouched.Mutation receipts. Each was broken, the named test was run, then restored and re-run green:
LIVE_SETTINGS_OWNER_ONLYexpected 403, received 200, plus the guard unit testone, saved removed,two, saved unusable, host default not substitutedandan unusable saved default needs an explicit pick: expectedCONVERSATION_DISCLOSURE, the provider openedrunning.disclosedexpectedgpt-live, receivedgemini-live(another device's save retargeted the entry)justify-content: flex-start#3617 landed first (#3955), merged and adapted. Per design §6, the two groups share one
GET/PUT /api/settings/voice. #3955 had created the route withpersona: { value, revision }. This PR adds the top-leveldefaultProvider/revisionpair (VoiceLiveSettings) beside it, soVoiceSettingsResponsenow extendsVoiceLiveSettings, and aPUTmay carry either group or both (the live default is saved first). The route's writes now also passisLiveSettingsWriter. My separate route module is gone; the route count stays at #3955's 187. The shared route has norequireJson, matching #3955, so the 415 assertion is dropped.ConversationHostkeeps #3955's echo-onlydisclosure(voices are described, not disclosed) per registered service, and personas resolve against the Start's target service. After the merge, all of these pass:live-provider-selection,live-personas,live-persona-host,live-persona-adapters,ws-conversation,http-inventoryand thesettings/voicemounted checks (232);live-service-runtimewith #3955'spersona-settings-runtimeand render tests in real Chrome (18); and lint, typecheck, build andcheck:pr(receipt above).Candidate proof fix. The first confirmation (head
5006da660) failedunit (1)becausetests/runtime-build-selection.test.tsexpected 22 runtime package hooks and found 23. The newlive-service-runtimeproof was missing fromscripts/runtime-test-builds.ts, the same inventory #3955 extended for its own runtime test. It is added now and the count is updated.Refresh. Merged main after #3827 landed (overlapping contract docs and the HTTP inventory; route count now 182), re-ran
check:pron the merged head (receipt above) and fixed a test-only type error the merge-time typecheck caught.Collisions (
bun scripts/collisions.ts --json --pr 3956at head63c9a48a8): textual overlaps with #3056, #3059, #3393, #3622, #3827, #3955 (shared contract docs, api-report andconversation-client.ts); the rest are closure-only test-selection overlaps. No path overlap with a ready PR blocks this. #3617 (personas) is being worked in parallel on the same pane and route; whichever lands second merges main and adapts.Owner-only guard (proportionate-containment checklist)
PUT /api/settings/voicefrom any principal other than the owner's password or passkey session or the ambient human. It does not cover CSRF (the global origin policy does) or reads.live-provider-selectionand the runtime non-owner test.Checklist
integrate.ts confirm.docs/reflect the change: http-api, coverage, extending/speech, the decision record, and the ui-react README.Anything left open
voice.live.personaare ui-react: configure and select live-conversation personas through Settings #3617.liveServiceView, export itsLiveServiceViewtype.🤖 Generated with Claude Code