@acorex-platform/extension-ai-voice-shell-client 0.0.37 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -145,6 +145,70 @@ interface AXPVoiceShellTranscriptTurn {
145
145
  text: string;
146
146
  }
147
147
 
148
+ /** Live media path chosen by VoiceSession:Start. */
149
+ type AXPVoiceLiveMediaMode = 'openrouter' | 'rtc' | 'vendor';
150
+ interface AXPVoiceLiveRtcIceServer {
151
+ urls: string | string[];
152
+ username?: string;
153
+ credential?: string;
154
+ }
155
+ interface AXPVoiceLiveRtcJoin {
156
+ roomName: string;
157
+ participantIdentity: string;
158
+ token: string;
159
+ serverUrl: string;
160
+ providerId: string;
161
+ iceServers?: AXPVoiceLiveRtcIceServer[];
162
+ forceRelay?: boolean;
163
+ }
164
+ interface AXPVoiceLiveVendorJoin {
165
+ /** Ephemeral client secret for OpenAI Realtime WebRTC (never the catalog API key). */
166
+ clientSecret: string;
167
+ model: string;
168
+ realtimeUrl: string;
169
+ transport: 'openai' | 'gemini';
170
+ }
171
+ interface AXPVoiceSessionStartResult {
172
+ sessionId: string;
173
+ conversationId: string;
174
+ assistId: string;
175
+ mode: AXPVoiceLiveMediaMode;
176
+ rtc?: AXPVoiceLiveRtcJoin;
177
+ vendor?: AXPVoiceLiveVendorJoin;
178
+ }
179
+ interface AXPVoiceSessionPushAudioInput {
180
+ sessionId: string;
181
+ /** PCM16LE little-endian, standard base64 (not URL-safe). */
182
+ pcmBase64: string;
183
+ sampleRate: number;
184
+ }
185
+ interface AXPVoiceOpenRouterAudioPayload {
186
+ sessionId: string;
187
+ pcmBase64: string;
188
+ sampleRate: number;
189
+ }
190
+ interface AXPVoiceSessionStopInput {
191
+ sessionId?: string;
192
+ }
193
+ interface AXPVoiceSessionInterruptInput {
194
+ sessionId?: string;
195
+ }
196
+ interface AXPVoiceSessionCommitTurnInput {
197
+ sessionId: string;
198
+ role: 'user' | 'assistant';
199
+ text: string;
200
+ }
201
+ interface AXPVoiceSessionExecuteToolInput {
202
+ sessionId: string;
203
+ name: string;
204
+ argumentsJson?: string;
205
+ }
206
+ interface AXPVoiceSessionExecuteToolResult {
207
+ output: string;
208
+ }
209
+ declare function axeAiVoiceLiveRtcRoomName(sessionId: string): string;
210
+ declare function axeAiVoiceLiveUserParticipantIdentity(userId: string, sessionId?: string): string;
211
+
148
212
  /** Speech-to-text result from the interaction transport. */
149
213
  interface AXPVoiceSttResult {
150
214
  text: string;
@@ -172,6 +236,24 @@ interface AXPVoiceInteractionTransport {
172
236
 
173
237
  /** Runtime command that opens the central voice void dialog. */
174
238
  declare const AXE_AI_VOICE_SHELL_OPEN_COMMAND: "AiVoiceShell:Open";
239
+ /** Backend: start a live voice session (Conversation room + RTC or vendor fallback). */
240
+ declare const AXE_AI_VOICE_SHELL_VOICE_SESSION_START_COMMAND: "AiVoiceShell:VoiceSession:Start";
241
+ /** Backend: hang up / stop the live voice session. */
242
+ declare const AXE_AI_VOICE_SHELL_VOICE_SESSION_STOP_COMMAND: "AiVoiceShell:VoiceSession:Stop";
243
+ /** Backend: browser OpenRouter path — push one complete user utterance (PCM16). */
244
+ declare const AXE_AI_VOICE_SHELL_VOICE_SESSION_PUSH_AUDIO_COMMAND: "AiVoiceShell:VoiceSession:PushAudio";
245
+ /** OpenRouter TTS PCM to the browser (not control-plane `ai.voice.session`). */
246
+ declare const AXE_AI_VOICE_OPENROUTER_AUDIO_TOPIC: "ai.voice.openrouter";
247
+ /** Backend: interrupt current assistant speech (barge-in). */
248
+ declare const AXE_AI_VOICE_SHELL_VOICE_SESSION_INTERRUPT_COMMAND: "AiVoiceShell:VoiceSession:Interrupt";
249
+ /** Backend: persist a transcript turn when the client holds the vendor media path. */
250
+ declare const AXE_AI_VOICE_SHELL_VOICE_SESSION_COMMIT_TURN_COMMAND: "AiVoiceShell:VoiceSession:CommitTurn";
251
+ /** Backend: run an Assist tool for a vendor-path live function call. */
252
+ declare const AXE_AI_VOICE_SHELL_VOICE_SESSION_EXECUTE_TOOL_COMMAND: "AiVoiceShell:VoiceSession:ExecuteTool";
253
+ /** Conversation.Message metadata.source for live-voice transcripts (skip text Assist). */
254
+ declare const AXE_AI_VOICE_LIVE_MESSAGE_SOURCE: "voice-live";
255
+ declare const AXE_AI_VOICE_LIVE_RTC_ROOM_PREFIX: "ai-voice-";
256
+ declare const AXE_AI_VOICE_LIVE_AI_PARTICIPANT_IDENTITY: "ai-voice-agent";
175
257
  /** Assessment interview capability id (registered by assessment-management). */
176
258
  declare const AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID: "assessment-questionnaire-interview";
177
259
  declare const ASSESSMENT_FIND_CASE_FOR_VOICE_FILL_COMMAND: "Assessment:FindCaseForVoiceFill";
@@ -182,5 +264,5 @@ declare const ASSESSMENT_SAVE_QUESTIONNAIRE_DRAFT_COMMAND: "Assessment:SaveQuest
182
264
  declare const ASSESSMENT_SUBMIT_QUESTIONNAIRE_COMMAND: "Assessment:SubmitQuestionnaire";
183
265
  declare const ASSESSMENT_CANCEL_QUESTIONNAIRE_COMMAND: "Assessment:CancelQuestionnaire";
184
266
 
185
- export { ASSESSMENT_APPLY_QUESTIONNAIRE_ANSWER_COMMAND, ASSESSMENT_CANCEL_QUESTIONNAIRE_COMMAND, ASSESSMENT_FIND_CASE_FOR_VOICE_FILL_COMMAND, ASSESSMENT_NEXT_QUESTIONNAIRE_QUESTION_COMMAND, ASSESSMENT_SAVE_QUESTIONNAIRE_DRAFT_COMMAND, ASSESSMENT_START_HEADLESS_QUESTIONNAIRE_COMMAND, ASSESSMENT_SUBMIT_QUESTIONNAIRE_COMMAND, AXE_AI_VOICE_SHELL_OPEN_COMMAND, AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID, isAiCompatibleCatalogRow, isAiCompatibleOperationMeta, parseAiCompatibleOperationMeta };
186
- export type { AXPAiCompatibleExecutionMode, AXPAiCompatibleOperationMeta, AXPAiCompatibleSafetyKind, AXPAiCompatibleSafetyMeta, AXPAiCompatibleVoiceMeta, AXPVoiceApplyResult, AXPVoiceCapabilityIntent, AXPVoiceCapabilityProvider, AXPVoiceInteractionTransport, AXPVoiceNextPromptResult, AXPVoicePrompt, AXPVoiceSaveDraftResult, AXPVoiceShellConfirmRequest, AXPVoiceShellMode, AXPVoiceShellOpenOptions, AXPVoiceShellTranscriptTurn, AXPVoiceShellUiState, AXPVoiceSttResult, AXPVoiceSubmitResult, AXPVoiceTtsResult };
267
+ export { ASSESSMENT_APPLY_QUESTIONNAIRE_ANSWER_COMMAND, ASSESSMENT_CANCEL_QUESTIONNAIRE_COMMAND, ASSESSMENT_FIND_CASE_FOR_VOICE_FILL_COMMAND, ASSESSMENT_NEXT_QUESTIONNAIRE_QUESTION_COMMAND, ASSESSMENT_SAVE_QUESTIONNAIRE_DRAFT_COMMAND, ASSESSMENT_START_HEADLESS_QUESTIONNAIRE_COMMAND, ASSESSMENT_SUBMIT_QUESTIONNAIRE_COMMAND, AXE_AI_VOICE_LIVE_AI_PARTICIPANT_IDENTITY, AXE_AI_VOICE_LIVE_MESSAGE_SOURCE, AXE_AI_VOICE_LIVE_RTC_ROOM_PREFIX, AXE_AI_VOICE_OPENROUTER_AUDIO_TOPIC, AXE_AI_VOICE_SHELL_OPEN_COMMAND, AXE_AI_VOICE_SHELL_VOICE_SESSION_COMMIT_TURN_COMMAND, AXE_AI_VOICE_SHELL_VOICE_SESSION_EXECUTE_TOOL_COMMAND, AXE_AI_VOICE_SHELL_VOICE_SESSION_INTERRUPT_COMMAND, AXE_AI_VOICE_SHELL_VOICE_SESSION_PUSH_AUDIO_COMMAND, AXE_AI_VOICE_SHELL_VOICE_SESSION_START_COMMAND, AXE_AI_VOICE_SHELL_VOICE_SESSION_STOP_COMMAND, AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID, axeAiVoiceLiveRtcRoomName, axeAiVoiceLiveUserParticipantIdentity, isAiCompatibleCatalogRow, isAiCompatibleOperationMeta, parseAiCompatibleOperationMeta };
268
+ export type { AXPAiCompatibleExecutionMode, AXPAiCompatibleOperationMeta, AXPAiCompatibleSafetyKind, AXPAiCompatibleSafetyMeta, AXPAiCompatibleVoiceMeta, AXPVoiceApplyResult, AXPVoiceCapabilityIntent, AXPVoiceCapabilityProvider, AXPVoiceInteractionTransport, AXPVoiceLiveMediaMode, AXPVoiceLiveRtcIceServer, AXPVoiceLiveRtcJoin, AXPVoiceLiveVendorJoin, AXPVoiceNextPromptResult, AXPVoiceOpenRouterAudioPayload, AXPVoicePrompt, AXPVoiceSaveDraftResult, AXPVoiceSessionCommitTurnInput, AXPVoiceSessionExecuteToolInput, AXPVoiceSessionExecuteToolResult, AXPVoiceSessionInterruptInput, AXPVoiceSessionPushAudioInput, AXPVoiceSessionStartResult, AXPVoiceSessionStopInput, AXPVoiceShellConfirmRequest, AXPVoiceShellMode, AXPVoiceShellOpenOptions, AXPVoiceShellTranscriptTurn, AXPVoiceShellUiState, AXPVoiceSttResult, AXPVoiceSubmitResult, AXPVoiceTtsResult };
@@ -2,15 +2,15 @@ import * as _angular_core from '@angular/core';
2
2
  import { InjectionToken } from '@angular/core';
3
3
  import * as i1 from '@acorex-platform/module-ai-management-client';
4
4
  import * as i2 from '@acorex-platform/framework-client/core';
5
- import { AXPVoiceCapabilityProvider, AXPVoiceCapabilityIntent, AXPVoiceShellUiState, AXPVoiceShellMode, AXPVoiceShellConfirmRequest, AXPVoiceShellTranscriptTurn, AXPVoiceShellOpenOptions, AXPVoiceInteractionTransport, AXPVoiceSttResult, AXPVoiceTtsResult } from '@acorex-platform/extension-ai-voice-shell-client/contracts';
5
+ import { AXPVoiceCapabilityProvider, AXPVoiceCapabilityIntent, AXPVoiceShellUiState, AXPVoiceShellOpenOptions, AXPVoiceOpenRouterAudioPayload, AXPVoiceInteractionTransport, AXPVoiceSttResult, AXPVoiceTtsResult } from '@acorex-platform/extension-ai-voice-shell-client/contracts';
6
+ import { AXPRealtimeAiVoiceSessionPayload } from '@acorex-platform/framework-client/realtime';
6
7
  import { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
7
8
  import { AXBasePageComponent } from '@acorex/components/page';
8
9
  import * as _ngrx_signals from '@ngrx/signals';
9
10
  import * as _acorex_platform_framework_client_themes_shared from '@acorex-platform/framework-client/themes/shared';
10
11
 
11
12
  /**
12
- * Central voice AI command shell (void dialog + capability registry + HTTP/SSE transport).
13
- * Register next to {@link AXMAiManagementModule}. Domain modules register {@link AXP_VOICE_CAPABILITY_PROVIDER}.
13
+ * Central live voice AI shell (void dialog + Conversation room + OpenRouter cascade).
14
14
  */
15
15
  declare class AXEAiVoiceShellExtensionModule {
16
16
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXEAiVoiceShellExtensionModule, never>;
@@ -34,58 +34,37 @@ declare class AXPVoiceCapabilityRegistry {
34
34
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPVoiceCapabilityRegistry>;
35
35
  }
36
36
 
37
- /**
38
- * Session coordinator for the central voice void dialog.
39
- * Does not import assessment internals — only the capability registry and transport.
40
- */
41
37
  declare class AXPVoiceCommandShellService {
42
38
  private readonly popupService;
43
39
  private readonly translation;
44
- private readonly registry;
45
- private readonly transport;
40
+ private readonly commandService;
41
+ private readonly media;
46
42
  readonly uiState: _angular_core.WritableSignal<AXPVoiceShellUiState>;
47
- readonly mode: _angular_core.WritableSignal<AXPVoiceShellMode>;
48
43
  readonly statusText: _angular_core.WritableSignal<string>;
49
44
  readonly lastTranscript: _angular_core.WritableSignal<string>;
50
45
  readonly lastSpoken: _angular_core.WritableSignal<string>;
51
46
  readonly errorMessage: _angular_core.WritableSignal<string>;
52
- readonly confirmRequest: _angular_core.WritableSignal<AXPVoiceShellConfirmRequest | null>;
53
- readonly turns: _angular_core.WritableSignal<AXPVoiceShellTranscriptTurn[]>;
54
- readonly interviewProgress: _angular_core.WritableSignal<{
55
- answered: number;
56
- totalVisible: number;
57
- } | null>;
58
- private activeCapability;
59
- private activeSessionId;
60
- private pendingSpokenConfirm;
61
- private currentAudio;
62
- private currentObjectUrl;
47
+ readonly conversationId: _angular_core.WritableSignal<string>;
48
+ readonly sessionId: _angular_core.WritableSignal<string>;
63
49
  private openPromise;
64
- open(options?: AXPVoiceShellOpenOptions): Promise<void>;
65
- enterListening(): Promise<void>;
66
- cancelListening(): Promise<void>;
67
- reportError(key: string, detail?: string): Promise<void>;
68
- submitRecording(audio: Blob): Promise<void>;
69
- handleUserText(text: string): Promise<void>;
70
- confirmYes(): Promise<void>;
71
- confirmNo(): Promise<void>;
72
- saveInterviewDraft(): Promise<void>;
73
- cancelInterview(): Promise<void>;
74
- stopPlayback(): void;
75
- private beginCapabilitySession;
76
- private speakNextPrompt;
77
- private handleNextPrompt;
78
- private applyInterviewUtterance;
79
- private enterSubmitConfirm;
80
- private handleConfirmUtterance;
81
- private submitInterview;
82
- private runCommandAssist;
83
- private speak;
84
- private finishSpeaking;
85
- private playObjectUrl;
50
+ private mediaMode;
51
+ private lastBargeInAt;
52
+ private speakingStartedAt;
53
+ open(_options?: AXPVoiceShellOpenOptions): Promise<void>;
54
+ ensurePlayback(): void;
55
+ hangUp(_closePopup?: boolean): Promise<void>;
56
+ interrupt(): Promise<void>;
57
+ applyRealtime(payload: AXPRealtimeAiVoiceSessionPayload | undefined): void;
58
+ applyOpenRouterAudio(payload: AXPVoiceOpenRouterAudioPayload | undefined): void;
59
+ private startLiveSession;
60
+ private maybeBargeIn;
61
+ private pushOpenRouterUtterance;
62
+ private runVendorTool;
63
+ private applyState;
86
64
  private setError;
87
- private appendTurn;
88
- private resetSession;
65
+ /** Another tab/profile started a session for this user, or the server stopped us. */
66
+ private releaseLocalSession;
67
+ private resetUi;
89
68
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPVoiceCommandShellService, never>;
90
69
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPVoiceCommandShellService>;
91
70
  }
@@ -132,28 +111,13 @@ declare class AXEAiVoiceShellOpenCommand implements AXPCommand<AXEAiVoiceShellOp
132
111
 
133
112
  declare class AXEAiVoiceVoidDialogComponent extends AXBasePageComponent {
134
113
  readonly shell: AXPVoiceCommandShellService;
135
- private readonly platformId;
136
- private readonly destroyRef;
137
- private mediaRecorder?;
138
- private audioChunks;
139
- private activeStream?;
140
114
  readonly orbClass: _angular_core.Signal<string>;
141
115
  readonly orbWrapClass: _angular_core.Signal<string>;
142
- readonly canListen: _angular_core.Signal<boolean>;
143
116
  readonly isListening: _angular_core.Signal<boolean>;
144
117
  readonly isSpeaking: _angular_core.Signal<boolean>;
145
- readonly showConfirm: _angular_core.Signal<boolean>;
146
- readonly progressLabel: _angular_core.Signal<string>;
147
- constructor();
148
- onMicClick(): Promise<void>;
149
- onCancelListen(): Promise<void>;
150
- onConfirmYes(): Promise<void>;
151
- onConfirmNo(): Promise<void>;
152
- onSaveDraft(): Promise<void>;
153
- onCancelInterview(): Promise<void>;
154
- private startRecording;
155
- private stopAndSubmit;
156
- private stopTracks;
118
+ readonly isBusy: _angular_core.Signal<boolean>;
119
+ onHangUp(): Promise<void>;
120
+ onOrbClick(): Promise<void>;
157
121
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXEAiVoiceVoidDialogComponent, never>;
158
122
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXEAiVoiceVoidDialogComponent, "axe-ai-voice-void-dialog", never, {}, {}, never, never, true, never>;
159
123
  }
@@ -167,6 +131,7 @@ declare class AXEAiVoiceShellHeaderSlotComponent {
167
131
  private readonly commandExecutor;
168
132
  private readonly shortcutRegistry;
169
133
  private readonly destroyRef;
134
+ private readonly media;
170
135
  protected readonly themeStore: {
171
136
  currentMode: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPThemeMode>;
172
137
  currentPalette: _angular_core.Signal<string>;
@@ -184,6 +149,7 @@ declare class AXEAiVoiceShellHeaderSlotComponent {
184
149
  sideMenuWidth: _angular_core.Signal<number>;
185
150
  sideMenuCompactWidth: _angular_core.Signal<number>;
186
151
  menuVerticalMode: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPMenuVerticalMode>;
152
+ menuToggleCyclesStyle: _angular_core.Signal<boolean>;
187
153
  menuOrientation: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPMenuOrientation>;
188
154
  menuAppearance: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPMenuAppearance>;
189
155
  headerAppearance: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPHeaderAppearance>;
@@ -197,6 +163,7 @@ declare class AXEAiVoiceShellHeaderSlotComponent {
197
163
  overlayTaskCount: _angular_core.Signal<number>;
198
164
  isNavigationLoading: _angular_core.Signal<boolean>;
199
165
  isMenuHorizontal: _angular_core.Signal<boolean>;
166
+ menuToggleCyclesStyleEnabled: _angular_core.Signal<boolean>;
200
167
  effectiveMenuVerticalMode: _angular_core.Signal<_acorex_platform_framework_client_themes_shared.AXPMenuVerticalMode>;
201
168
  sideMenuDrawerWidth: _angular_core.Signal<number>;
202
169
  menuDarkEnabled: _angular_core.Signal<boolean>;
@@ -211,6 +178,7 @@ declare class AXEAiVoiceShellHeaderSlotComponent {
211
178
  setSideMenuWidth: (width: number) => void;
212
179
  setSideMenuCompactWidth: (width: number) => void;
213
180
  setSideMenuDrawerWidth: (width: number) => void;
181
+ setMenuVerticalMode: (mode: _acorex_platform_framework_client_themes_shared.AXPMenuVerticalMode) => void;
214
182
  toggleSideMenu: () => void;
215
183
  setNavigationLoading: (value: boolean, delay?: number) => void;
216
184
  setOverlayLoading: (value: boolean, delay?: number) => void;
@@ -233,6 +201,7 @@ declare class AXEAiVoiceShellHeaderSlotComponent {
233
201
  sideMenuWidth: number;
234
202
  sideMenuCompactWidth: number;
235
203
  menuVerticalMode: _acorex_platform_framework_client_themes_shared.AXPMenuVerticalMode;
204
+ menuToggleCyclesStyle: boolean;
236
205
  menuOrientation: _acorex_platform_framework_client_themes_shared.AXPMenuOrientation;
237
206
  menuAppearance: _acorex_platform_framework_client_themes_shared.AXPMenuAppearance;
238
207
  headerAppearance: _acorex_platform_framework_client_themes_shared.AXPHeaderAppearance;