Repository navigation
Conversation
Wire model + bootstrap plumbing for LiveKit voice, ahead of the LiveKit dependency itself. No LiveKit dependency is added in this phase. - VoicePayload model and ConversationResponse.voice (additive, optional; relies on synthesized Codable, so text-turn decode is unchanged) - LiveKitSessionBootstrap: validated resolved-credentials type - ConciergeChatService.createVoiceBootstrapPayload / bootstrapVoiceSession, reusing streamChat's endpoint/session/auth-token/consent plumbing and the existing SSE delegate path; resolves on a response.voice livekit_session payload, with completion/error semantics matching streamChat - Extract the shared conversation-event envelope out of createChatPayload - Unit tests: bootstrap payload shape, decode with/without voice, and the bootstrap request path (delivers credentials, no-payload completion, network error, unbuildable URL) Wire type/field names mirror the shared backend worker contract used by web.
2 of 3 tasks
Member
Author
|
Superseded by the plugin-based voice integration, so closing this proof of concept:
|
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.
Summary
Phase 1 of the LiveKit voice implementation: the wire model + bootstrap plumbing, ahead of the LiveKit dependency itself. No LiveKit dependency is added in this phase — it is intentionally buildable/testable without one. See
Documentation/Implementation/voice-livekit-connection-bootstrap-design.md§9 (Phase 1) for the design.This corresponds to design tasks 1.1 and 1.2.
Changes
VoicePayload(new,Models/Network/) — mirrors web'sVoicePayload(AudioStreaming.ts), narrowed to the fields the client consumes (type,livekitUrl,token), plus aSessionType.livekitSessiondiscriminator constant.ConversationResponse.voice— additive optional field.ConversationResponserelies on synthesizedCodable, so ordinary text-turn responses (novoicekey) decode unchanged (NFR-02).LiveKitSessionBootstrap(new) — the validated, non-optional resolved-credentials form handed to the (future)VoiceSessionController.ConciergeChatService.createVoiceBootstrapPayload/bootstrapVoiceSession— a sibling tostreamChat, reusing the same endpoint/session/auth-token/consent plumbing and the existing SSEURLSessionDataDelegatepath. The conversation object carries{ type: "livekit-bootstrap", publishMic: true }in place ofmessage, mirroring web'svoiceCommands.ts. Resolves viaonBootstrapwhen aresponse.voicewithtype == "livekit_session"arrives;onCompletematchesstreamChat's completion/error semantics (FR-07).createChatPayload(no behavior change; covered by the existing chat-payload tests).Wire type/field names are copied verbatim from the shared backend worker contract used by web (NFR-03).
Test plan
ConversationResponsedecode with and without avoicekey (NFR-02 regression guard)VoicePayloaddecode (livekit_sessionand other/ignored types)createVoiceBootstrapPayloadshape:livekit-bootstraptype,publishMic, nomessage, surfaces/consent/xdm envelope, auth-token attach/omit, ecid/surfaces error casesbootstrapVoiceSessionrequest path (stubbed network): delivers credentials on a session payload, completes without bootstrap when none arrives, surfaces a network error, surfaces an unbuildable-URL errorUnitTestsscheme green locally (xcodebuild test, iPhone 17 simulator)🤖 Generated with Claude Code