Skip to content

feat: Voice bootstrap wire model + service method (Phase 1) - #160

Closed
nozokada wants to merge 1 commit into
adobe:mainfrom
nozokada:feat/voice-wire-model-bootstrap
Closed

nozokada wants to merge 1 commit into
adobe:mainfrom
nozokada:feat/voice-wire-model-bootstrap

Conversation

@nozokada

Copy link
Copy Markdown
Member

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's VoicePayload (AudioStreaming.ts), narrowed to the fields the client consumes (type, livekitUrl, token), plus a SessionType.livekitSession discriminator constant.
  • ConversationResponse.voice — additive optional field. ConversationResponse relies on synthesized Codable, so ordinary text-turn responses (no voice key) decode unchanged (NFR-02).
  • LiveKitSessionBootstrap (new) — the validated, non-optional resolved-credentials form handed to the (future) VoiceSessionController.
  • ConciergeChatService.createVoiceBootstrapPayload / bootstrapVoiceSession — a sibling to streamChat, reusing the same endpoint/session/auth-token/consent plumbing and the existing SSE URLSessionDataDelegate path. The conversation object carries { type: "livekit-bootstrap", publishMic: true } in place of message, mirroring web's voiceCommands.ts. Resolves via onBootstrap when a response.voice with type == "livekit_session" arrives; onComplete matches streamChat's completion/error semantics (FR-07).
  • Extracted the shared conversation-event envelope out of 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

  • ConversationResponse decode with and without a voice key (NFR-02 regression guard)
  • VoicePayload decode (livekit_session and other/ignored types)
  • createVoiceBootstrapPayload shape: livekit-bootstrap type, publishMic, no message, surfaces/consent/xdm envelope, auth-token attach/omit, ecid/surfaces error cases
  • bootstrapVoiceSession request path (stubbed network): delivers credentials on a session payload, completes without bootstrap when none arrives, surfaces a network error, surfaces an unbuildable-URL error
  • Full UnitTests scheme green locally (xcodebuild test, iPhone 17 simulator)

🤖 Generated with Claude Code

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.
@nozokada

Copy link
Copy Markdown
Member Author

Superseded by the plugin-based voice integration, so closing this proof of concept:

@nozokada nozokada closed this Oct 19, 2026
@nozokada
nozokada deleted the feat/voice-wire-model-bootstrap branch November 24, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant