Repository navigation
Conversation
Adds the client side of the voice bootstrap handshake, without any voice transport: - VoicePayload and the optional ConversationResponse.voice field. - ConciergeChatService.bootstrapVoiceSession, which posts a livekit-bootstrap conversation event to /brand-concierge-voice and reports the first livekit_session credentials on the stream. - The voice path has no region segment, matching the Web SDK. - Chat and bootstrap requests share one event envelope builder, so the bootstrap forwards the same identity map and consent state. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 19, 2026
nozokada
force-pushed
the
feat/voice-plugin-integration
branch
from
October 19, 2026 22:04
4b25f47 to
5013368
Compare
- VoicePayload and ConversationResponse.voice are internal. VoicePayload mirrors the service's wire format, like the other network models. - Callers receive a transport-neutral VoiceSessionBootstrap(url:token:) instead of LiveKitSessionBootstrap. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nozokada
force-pushed
the
feat/voice-plugin-integration
branch
from
October 19, 2026 22:18
5013368 to
dd02df7
Compare
The bootstrap tests waited at most 3 seconds for the stubbed request to complete. A stalled shared runner exceeded that, so the network error test failed although the error was delivered. The wait returns as soon as its condition holds, so a 10 second default only matters on failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nozokada
force-pushed
the
feat/voice-plugin-integration
branch
from
October 19, 2026 23:33
dd02df7 to
9dd6ceb
Compare
ConciergeChatService has one URLSession delegate and kept a single pair of chunk/complete handlers. The delegate did not check which task a callback came from, so a request that was cancelled or superseded could complete into the next request's handlers, failing it and clearing them. Handlers are now registered per task under a lock, and a task's data and completion reach only its own handlers. cancelActiveStream() still cancels the most recent request, and the cancelled request still reports its own completion. Tasks without stream handlers, such as feedback requests, are ignored by the stream delegate. This keeps a voice bootstrap stream that stays open during a voice session from interfering with later chat turns. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Brand Concierge discovers a voice plugin through AEPPlugins and drives it through the AEPPluginSupport contract only, so the SDK takes no AEPVoice or LiveKit dependency. - ChatController resolves the registered VoicePlugin, fetches session credentials with the voice bootstrap, and hands them to the plugin as the "url" and "token" connection fields. - ChatController is the session listener: transcript updates render as user/assistant bubbles updated in place until final; a failure tracks an error and shows the network error copy; a normal end returns to idle. - Add ChatState.voiceSession. Chat state is still derived in one place, from the active turn and the active voice run. - Typed turns, dictation and data handoffs are held off during voice. Stop, view disappearance and identity reset end the session and cancel a still open bootstrap; callbacks from a released session are dropped. - The composer shows a voice button only when a plugin is registered. - Depend on AEPPluginSupport via a local path until it is published. - Tests drive the integration through FakeVoicePlugin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Match the web client: the voice conversation button takes the send button's place while the text field is empty and gives it back once there is text. It stays visible while a session is running or connecting so it can always be ended. Without a voice plugin the composer is unchanged.
nozokada
force-pushed
the
feat/voice-plugin-integration
branch
from
October 20, 2026 00:16
9dd6ceb to
c9723dd
Compare
13 tasks done
Member
Author
|
Superseded by #189. Voice no longer goes through an |
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
Brand Concierge can now hold a voice conversation through an optional voice plugin. BC only knows the
AEPPluginSupportcontract (AEPPlugins,VoicePlugin,VoiceSession,VoiceSessionListener). It takes no AEPVoice or LiveKit dependency: the app chooses the implementation by callingAEPPlugins.add(LiveKitVoicePlugin()).Changes
1.
ConciergeChatService: per-request stream handlers (separate commit)cancelActiveStream()cancels only the latest request, and every request reports to its own handlers.2. Voice plugin integration
ChatControllerresolvesAEPPlugins.get(VoicePlugin.self). The composer's voice button appears only when a plugin is registered.ComposerEditingView.trailingControl, with unit tests.startSession(connection:listener:)with["url": url, "token": token]. The plugin interprets these fields; BC only maps the backend's names to them.ChatControlleris theVoiceSessionListener.isFinal..failedtrackserrorOccurredand shows the theme's network error copy..endedreturns to idle quietly.ChatState.voiceSession.chatStateis still written in one place, derived from the active turn and the active voice run.handleDataHandoffreturnsfalse, the same as when a turn is in flight.Documentation/getting-started.md.Dependencies
AEPPluginSupportis resolved from a local path (../aepsdk-plugin-ios) inPackage.swiftand thePodfile. The podspec declaresAEPPluginSupport >= 1.0.0, < 2.0.0.aepsdk-plugin-iosis public, so this PR stays a draft until then. At that point every consumer switches to a URL/trunk dependency.API note
ChatStateis public. Adding.voiceSessionis source-breaking for apps that switch over it exhaustively.Test plan
ChatControllerVoiceSessionTests(26 tests) drive the integration through aFakeVoicePlugin. They cover:ConciergeChatServiceTestscover per-request stream routing. Both fail on the previous service code.UnitTestssuite: 937 tests. The only failures are 3ProductCardCarouselSnapshotTests, which also fail on the base branch on the local iOS 26.4 simulator.ConciergeDemoAppbuilds.ComposerEditingViewTestscases (6) cover the voice/send button placement.LiveKitVoicePlugin, on the simulator and on a physical iPhone: connect, agent audio, transcripts, stop, and the button placement while typing and after clearing.