Skip to content

CONTRACT: feat(ui-sdk,ui-server,ui-react): live-conversation personas in Settings › Voice - #3955

Merged
schlessera merged 10 commits into
mainfrom
feat/3617-live-personas
Nov 11, 2026
Merged

schlessera merged 10 commits into
mainfrom
feat/3617-live-personas

Conversation

@schlessera

@schlessera schlessera commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Closes #3617

What changed

Live conversation now has personas. A persona is Markdown at _voice/personas/<id>.md in the brain. It holds a name, one voice per live service and plain-text speaking-style instructions. Settings › Voice gains a Persona group beside Dictation. It lists the built-in Standard first, then each persona with its voices and byte count, and offers an editor with byte counters per service, conflict handling, Duplicate, Rename and Delete.

  • Routes. New owner-only routes read and write the files with sha-256 revisions. GET/PUT /api/settings/voice carries the selection, which is the voice.live.persona server setting with its own revision.
  • Start. conversation_start.personaRef names the persona. The host reads the file once, refuses an outdated, invalid, over-cap or stale-voice persona before any provider I/O, and freezes the snapshot for every later epoch.
  • Adapters. Gemini Live and GPT-Live set the persona's voice and append one fenced section after their fixed host rules. Tools, delegation, history and later epochs stay byte-identical. Standard sends exactly the setup from before personas.
  • P5. Core now excludes _voice from the content index.

Why this shape

This implements the signed-off design on #3617 (§1–§7, P1–P5). It also follows three wire answers the maintainer gave on 2026-11-10, recorded on the issue:

  • personaRef.voice: "default" is the explicit one-time override for a stale voice.
  • ConversationProfile gains flat voices, defaultVoice and personaInstructionBytes fields, kept outside the Start disclosure echo.
  • An additive live_persona frame keeps clients current.

Other choices:

For #3698 (Start card)

Read root.connection.conversation.state.livePersona (LivePersonaStatus):

Field Meaning
persona Name, voices, byte count, invalid
selectedMissing The selected file is gone; Standard is used (S-missing)
selectedInvalid The selected file can't be used (blocking)
providers[serviceId] voice, voiceSource: "persona" | "default" (S3), staleVoice (S3b), overLimit and maxInstructionBytes (S3c)
personaRef Echoed at Start

conversationProfile carries voices, defaultVoice and personaInstructionBytes.

  • Choices at Start. "Use Standard this time" sends personaRef: { id: "standard", revision: "builtin" }. "Use the default voice this time" adds voice: "default". Today's client sends livePersona.personaRef unchanged; ui-react: wire the Start card (S1–S5) — service, persona and recovery #3698 adds those choices.
  • Refusal codes. CONVERSATION_PERSONA_CHANGED (a fresh live_persona arrives first), CONVERSATION_PERSONA, CONVERSATION_PERSONA_TOO_LONG and CONVERSATION_PERSONA_VOICE.

Proof

bun run check:pr --base origin/main
{"version":1,"kind":"brain-check-pr-receipt","head":"8ff469287d559204851e9f41fba71169814cc465","base":"origin/main","mode":"focused","startedAt":"2026-11-11T00:11:35.420Z","finishedAt":"2026-11-11T00:13:12.021Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":13443.167435},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":107.60728599999857},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":75.10167000000001},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":22.10779299999922},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":82935.55832899999}]}

Local runs

  • ui-server: live-personas, live-persona-adapters, live-persona-host, ws-conversation, live-history-adapters, the adapter suites and selectable-dictation: 405 pass, 0 fail.
  • http-supported-mounts: all 7 new routes plus the inventory and spec checks pass. The 9 /api/brain/*/schedules failures are this host's missing worker sandbox (unshare … uid_map).
  • ui-sdk server-schemas: 17 pass. The other ui-sdk failures are sandbox worker/cgroup tests.
  • api-surface: 54 pass.
  • core voice-namespace-exclude: 2 pass.
  • ui-react render persona-settings: 7 pass.
  • Real Chrome (persona-settings-runtime.test.ts, Chromium 1243): 3 pass. It creates a persona with validation, selects it, reloads, edits under a conflict, is refused at Start after a direct file edit, then starts with { voice: "Calypso", instructions } reaching the provider double. It then deletes the selected persona (Standard is checked again), checks the desktop Edit button and that Standard sends no persona, and checks the delegated-agent refusal. Screens were reviewed at 320px and 1280px.

Mutation receipts. Each guard was broken, the named test failed on the stated assertion, and the code was restored:

Mutation Failing assertion
M1: drop persona from provider.open PERSONA_REACHES_PROVIDER
M2: put the persona before the Gemini host rules HOST_RULES_PREFIX_UNCHANGED
M3: re-read the persona on reconnect RECONNECT_KEEPS_FROZEN_PERSONA
M4: remove the human guard on PUT /api/settings/voice the empty-403 test
M5: stop reserving persona bytes PERSONA_CHARGED_TO_STARTUP_CEILING (both engines)
M6: unlink before resetting the selection the delete-ordering test
P5: remove _voice from DEFAULT_EXCLUDE.dirs both exclusion tests (the persona path appears in the index)

Collisions. bun scripts/collisions.ts --json --pr 3955 at head 3ad64aba1aaeb6b02da3eb61dce2d86184d46d3e: no path collisions with open PRs.

First hosted run. Two real failures on 3ad64ab, both fixed: http-inventory (the spec's prose route count, 179 → 186) and runtime-build-selection (the new runtime proof added to the build inventory). Both pass locally. Main (#3827) was then merged in; the only conflict was the route count, now 187 with its safety-recording route.

Provider history. The Claude/Pi provider-history guard cannot run on this host (worker boundary); hosted CI runs it. No agent-turn path changed. Live-provider byte identity across epochs is asserted in live-persona-adapters (EPOCH_STARTUP_BYTE_IDENTICAL).

Checklist

  • Focused local preflight/behavioral receipts and complete selected hosted proof passed; actual head/base/job checkout evidence is in Proof.
  • Acceptance criteria from the issue are all met, or the gap is named below.
  • The PR and completed/advanced issues have verified release milestones under docs/process/github.md.
  • A changeset is included, or this changes nothing a consumer can see.
  • No personal data anywhere in the diff — the leakage gate covers the whole tree.
  • The integration contract index or relevant component is updated in this same commit, or nothing in the machine surface moved.
  • Docs under docs/ reflect the change, or nothing documented moved.
  • A fail-closed guard added or changed answers the proportionate-containment checklist in this body, or no guard changed. The new owner guard reuses the existing owner/ambient boundary; persona writes refuse links with an anchored directory chain like the schedule definition files.
  • Provider history stays append-only: nothing on an agent turn's path changed; live adapter byte identity is asserted (see Proof).

Anything left open

  • Start-card presentation of S3, S3b and S3c, and the one-time choices, belong to ui-react: wire the Start card (S1–S5) — service, persona and recovery #3698.
  • Acoustic and style qualification of real voices remains separate and needs explicit authorization.
  • No ui-kit Storybook stories were added for the Persona group, following Dictation's precedent; the browser runtime test is the visual proof.

🤖 Generated with Claude Code

schlessera and others added 7 commits November 10, 2026 22:20
Persona files under _voice/personas shape only how a live voice service
speaks, so search, briefings and agent context never return them (#3617, P5).
Also lists context/policies in the documented default exclusions, which the
table had missed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at Start

Personas are authored Markdown at _voice/personas/<id>.md with a name, one
voice per live service and plain-text speaking-style instructions (#3617).

- Owner-only routes read and write persona files with sha-256 revisions
  (409 PERSONA_CHANGED) inside an anchored, link-refusing directory chain;
  GET/PUT /api/settings/voice carries the voice.live.persona selection with
  its own revision in the server settings store. Deleting the selected
  persona saves Standard first.
- LiveConversationProvider gains optional voices, defaultVoice and
  personaInstructionBytes, mirrored on ConversationProfile outside the Start
  disclosure echo. Gemini Live declares its 30 TTS voices (Kore, 6,000
  bytes) and GPT-Live its 38 built-in voices (marin, 2,000 bytes), copied
  from the providers' documentation.
- conversation_start.personaRef (with voice: "default" as the explicit
  stale-voice override) is resolved once at Start and frozen on the entry;
  every later epoch reuses it. Outdated, invalid, over-cap and stale-voice
  personas are refused before any provider I/O, never truncated or
  substituted. server_hello.livePersona and the live_persona frame describe
  the selection to human sessions only.
- Adapters append one fenced section after the fixed host rules; tools,
  delegation, history and later epochs stay byte-identical, and the framed
  section is reserved from the startup ceiling before orientation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Persona group joins Dictation in the existing Voice pane (#3617):
Standard first, each persona's voices and byte count, unusable files with
their reason, a ⋯ menu (Edit, Rename, Duplicate, Delete) and a desktop Edit
button. The drill-in editor counts exact UTF-8 bytes per registered service,
keeps voices for services this host does not run, keeps the user's text on a
conflict and offers the newer version, and uses the Settings leave guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Creates, validates, selects, reloads, edits under a conflict and deletes a
persona through the mounted routes at 320px, checks the desktop row at
1280px, and starts live conversation through the shipped client: an
outdated persona is refused before anything opens, the next Start reaches
the provider double with the persona's voice and instructions, and Standard
sends no persona. Selection now shows at once and reverts on a refused save.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The added handler is a no-op that reads no runtime input; the conversation
client takes the frame beside the demux (#3617).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nventory

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added type: feat A new capability or a change in user-visible behaviour. area: ui-sdk Wire protocol, runtime schemas, the server and client SDK surfaces. area: ui-server Hono app factory: turn coordinator, auth, session catalog, routes, cron. area: ui-react React chat/files/voice components, stores, WebSocket transport. contract Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit. labels Nov 10, 2026
@schlessera schlessera added this to the 0.45.0 milestone Nov 10, 2026
@uploads-sh

uploads-sh Bot commented Nov 10, 2026

Copy link
Copy Markdown

No uploads on this PR yet

This PR changes UI files (packages/ui-react/src/components/settings/persona-settings.tsx, packages/ui-react/src/components/settings/voice-tab.tsx, packages/ui-react/tests/fixtures/persona-settings-client.tsx and 1 more). Screenshots help reviewers see what changed.

  • From the CLI: uploads put before.png after.png --pr 3955
  • From an agent: ask it to attach screenshots with uploads.sh
  • By hand: drag images into the PR description and they're imported automatically
Tips for agents

Label each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one put per shot:

uploads put after.png --pr 3955 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 3955 --app ios --screen "Chat" --state after

No CLI? With the Uploads MCP, call sign_upload_url for files on disk (or put) with repo, pr: 3955 and the same screen, state and caption fields.

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 uploads list --pr 3955. More in the github-screenshots skill or the agent docs.

Workspace admins can turn this comment off in Settings → GitHub · docs

schlessera and others added 2 commits November 11, 2026 00:03
The HTTP specification's prose counts include the seven persona routes, and
the runtime package-build inventory names persona-settings-runtime (#3617).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera
schlessera marked this pull request as draft November 11, 2026 00:37
@schlessera
schlessera marked this pull request as ready for review November 11, 2026 00:37
@schlessera
schlessera merged commit e3bf372 into main Nov 11, 2026
48 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui-react React chat/files/voice components, stores, WebSocket transport. area: ui-sdk Wire protocol, runtime schemas, the server and client SDK surfaces. area: ui-server Hono app factory: turn coordinator, auth, session catalog, routes, cron. contract Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit. type: feat A new capability or a change in user-visible behaviour.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui-react: configure and select live-conversation personas through Settings

1 participant