@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.
@@ -136,12 +136,41 @@ function isAiCompatibleCatalogRow(row) {
136
136
  //#region ----- Types -----
137
137
  //#endregion
138
138
 
139
+ //#region ----- Types -----
140
+ function axeAiVoiceLiveRtcRoomName(sessionId) {
141
+ return `ai-voice-${sessionId.trim()}`;
142
+ }
143
+ function axeAiVoiceLiveUserParticipantIdentity(userId, sessionId) {
144
+ const user = userId.trim();
145
+ const session = sessionId?.trim();
146
+ return session ? `${user}:${session}` : user;
147
+ }
148
+ //#endregion
149
+
139
150
  //#region ----- Types -----
140
151
  //#endregion
141
152
 
142
153
  //#region ----- Constants -----
143
154
  /** Runtime command that opens the central voice void dialog. */
144
155
  const AXE_AI_VOICE_SHELL_OPEN_COMMAND = 'AiVoiceShell:Open';
156
+ /** Backend: start a live voice session (Conversation room + RTC or vendor fallback). */
157
+ const AXE_AI_VOICE_SHELL_VOICE_SESSION_START_COMMAND = 'AiVoiceShell:VoiceSession:Start';
158
+ /** Backend: hang up / stop the live voice session. */
159
+ const AXE_AI_VOICE_SHELL_VOICE_SESSION_STOP_COMMAND = 'AiVoiceShell:VoiceSession:Stop';
160
+ /** Backend: browser OpenRouter path — push one complete user utterance (PCM16). */
161
+ const AXE_AI_VOICE_SHELL_VOICE_SESSION_PUSH_AUDIO_COMMAND = 'AiVoiceShell:VoiceSession:PushAudio';
162
+ /** OpenRouter TTS PCM to the browser (not control-plane `ai.voice.session`). */
163
+ const AXE_AI_VOICE_OPENROUTER_AUDIO_TOPIC = 'ai.voice.openrouter';
164
+ /** Backend: interrupt current assistant speech (barge-in). */
165
+ const AXE_AI_VOICE_SHELL_VOICE_SESSION_INTERRUPT_COMMAND = 'AiVoiceShell:VoiceSession:Interrupt';
166
+ /** Backend: persist a transcript turn when the client holds the vendor media path. */
167
+ const AXE_AI_VOICE_SHELL_VOICE_SESSION_COMMIT_TURN_COMMAND = 'AiVoiceShell:VoiceSession:CommitTurn';
168
+ /** Backend: run an Assist tool for a vendor-path live function call. */
169
+ const AXE_AI_VOICE_SHELL_VOICE_SESSION_EXECUTE_TOOL_COMMAND = 'AiVoiceShell:VoiceSession:ExecuteTool';
170
+ /** Conversation.Message metadata.source for live-voice transcripts (skip text Assist). */
171
+ const AXE_AI_VOICE_LIVE_MESSAGE_SOURCE = 'voice-live';
172
+ const AXE_AI_VOICE_LIVE_RTC_ROOM_PREFIX = 'ai-voice-';
173
+ const AXE_AI_VOICE_LIVE_AI_PARTICIPANT_IDENTITY = 'ai-voice-agent';
145
174
  /** Assessment interview capability id (registered by assessment-management). */
146
175
  const AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID = 'assessment-questionnaire-interview';
147
176
  const ASSESSMENT_FIND_CASE_FOR_VOICE_FILL_COMMAND = 'Assessment:FindCaseForVoiceFill';
@@ -160,5 +189,5 @@ const ASSESSMENT_CANCEL_QUESTIONNAIRE_COMMAND = 'Assessment:CancelQuestionnaire'
160
189
  * Generated bundle index. Do not edit.
161
190
  */
162
191
 
163
- 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 };
192
+ 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 };
164
193
  //# sourceMappingURL=acorex-platform-extension-ai-voice-shell-client-contracts.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-extension-ai-voice-shell-client-contracts.mjs","sources":["../../../../libs/extensions/ai/voice-shell/contracts/src/ai-compatible-operation.types.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/voice-capability.types.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/voice-shell.types.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/voice-transport.types.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/voice-shell.constants.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/index.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/acorex-platform-extension-ai-voice-shell-client-contracts.ts"],"sourcesContent":["//#region ----- Types -----\n\n/** Where an AI-compatible command or query runs. */\nexport type AXPAiCompatibleExecutionMode = 'backend' | 'frontend' | 'both';\n\n/** Safety classification for AI-compatible operations. */\nexport type AXPAiCompatibleSafetyKind = 'read-only' | 'mutating' | 'destructive';\n\nexport interface AXPAiCompatibleSafetyMeta {\n kind?: AXPAiCompatibleSafetyKind;\n sideEffects?: boolean;\n requiresConfirmation?: boolean;\n}\n\n/** Optional voice-shell hints stored in catalog `aiMetadataJson`. */\nexport interface AXPAiCompatibleVoiceMeta {\n speakInputSummary?: boolean;\n confirmPromptKey?: string;\n}\n\n/**\n * Formal AI-compatible command/query contract (parsed from catalog `aiMetadataJson`).\n * Aligns with existing `ai` sidecar fields plus optional voice hints.\n */\nexport interface AXPAiCompatibleOperationMeta {\n toolName?: string;\n shortDescription?: string;\n instruction?: string;\n tags?: string[];\n executionMode?: AXPAiCompatibleExecutionMode;\n safety?: AXPAiCompatibleSafetyMeta;\n voice?: AXPAiCompatibleVoiceMeta;\n followUpTools?: string[];\n usage?: {\n whenToUse?: string[];\n avoidWhen?: string[];\n followUpTools?: string[];\n };\n}\n\n//#endregion\n\n//#region ----- Parsing -----\n\nconst AI_TOOL_TAG = 'ai-tool';\n\nfunction asStringArray(value: unknown): string[] | undefined {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const items = value.filter((item): item is string => typeof item === 'string' && item.trim().length > 0);\n return items.length > 0 ? items : undefined;\n}\n\nfunction asBoolean(value: unknown): boolean | undefined {\n return typeof value === 'boolean' ? value : undefined;\n}\n\nfunction asSafetyKind(value: unknown): AXPAiCompatibleSafetyKind | undefined {\n if (value === 'read-only' || value === 'mutating' || value === 'destructive') {\n return value;\n }\n if (value === 'mutation') {\n return 'mutating';\n }\n return undefined;\n}\n\nfunction asExecutionMode(value: unknown): AXPAiCompatibleExecutionMode | undefined {\n if (value === 'backend' || value === 'frontend' || value === 'both') {\n return value;\n }\n return undefined;\n}\n\n/**\n * Parses catalog `aiMetadataJson` into the AI-compatible operation contract.\n * Returns `null` when the JSON is missing or invalid.\n */\nexport function parseAiCompatibleOperationMeta(\n aiMetadataJson: string | undefined | null,\n): AXPAiCompatibleOperationMeta | null {\n if (!aiMetadataJson?.trim()) {\n return null;\n }\n try {\n const raw = JSON.parse(aiMetadataJson) as Record<string, unknown>;\n if (raw == null || typeof raw !== 'object' || Array.isArray(raw)) {\n return null;\n }\n const safetyRaw =\n raw['safety'] != null && typeof raw['safety'] === 'object' && !Array.isArray(raw['safety'])\n ? (raw['safety'] as Record<string, unknown>)\n : undefined;\n const voiceRaw =\n raw['voice'] != null && typeof raw['voice'] === 'object' && !Array.isArray(raw['voice'])\n ? (raw['voice'] as Record<string, unknown>)\n : undefined;\n const usageRaw =\n raw['usage'] != null && typeof raw['usage'] === 'object' && !Array.isArray(raw['usage'])\n ? (raw['usage'] as Record<string, unknown>)\n : undefined;\n\n const meta: AXPAiCompatibleOperationMeta = {};\n if (typeof raw['toolName'] === 'string' && raw['toolName'].trim()) {\n meta.toolName = raw['toolName'].trim();\n }\n if (typeof raw['shortDescription'] === 'string' && raw['shortDescription'].trim()) {\n meta.shortDescription = raw['shortDescription'].trim();\n }\n if (typeof raw['instruction'] === 'string' && raw['instruction'].trim()) {\n meta.instruction = raw['instruction'].trim();\n }\n const tags = asStringArray(raw['tags']);\n if (tags) {\n meta.tags = tags;\n }\n const executionMode = asExecutionMode(raw['executionMode']);\n if (executionMode) {\n meta.executionMode = executionMode;\n }\n if (safetyRaw) {\n meta.safety = {\n kind: asSafetyKind(safetyRaw['kind']),\n sideEffects: asBoolean(safetyRaw['sideEffects']),\n requiresConfirmation: asBoolean(safetyRaw['requiresConfirmation']),\n };\n }\n if (voiceRaw) {\n meta.voice = {\n speakInputSummary: asBoolean(voiceRaw['speakInputSummary']),\n confirmPromptKey:\n typeof voiceRaw['confirmPromptKey'] === 'string' && voiceRaw['confirmPromptKey'].trim()\n ? voiceRaw['confirmPromptKey'].trim()\n : undefined,\n };\n }\n const followUpTools = asStringArray(raw['followUpTools']) ?? asStringArray(usageRaw?.['followUpTools']);\n if (followUpTools) {\n meta.followUpTools = followUpTools;\n }\n if (usageRaw) {\n meta.usage = {\n whenToUse: asStringArray(usageRaw['whenToUse']),\n avoidWhen: asStringArray(usageRaw['avoidWhen']),\n followUpTools: asStringArray(usageRaw['followUpTools']),\n };\n }\n return meta;\n } catch {\n return null;\n }\n}\n\n/**\n * True when catalog metadata opts the operation into the AI tool surface\n * (`ai-tool` tag, matching existing `commandRowExposedForAi` tag check).\n */\nexport function isAiCompatibleOperationMeta(meta: AXPAiCompatibleOperationMeta | null | undefined): boolean {\n return Array.isArray(meta?.tags) && meta.tags.includes(AI_TOOL_TAG);\n}\n\n/**\n * True when a catalog row should be exposed as an AI-compatible tool.\n * Matches `commandRowExposedForAi`: `capabilities` includes `ai`, or `aiMetadataJson` has the `ai-tool` tag.\n */\nexport function isAiCompatibleCatalogRow(row: {\n capabilities?: string | string[] | null;\n aiMetadataJson?: string | null;\n} | null | undefined): boolean {\n if (!row) {\n return false;\n }\n const caps = row.capabilities;\n if (Array.isArray(caps)) {\n if (caps.some((c) => String(c).toLowerCase() === 'ai')) {\n return true;\n }\n } else if (typeof caps === 'string' && caps.trim()) {\n const parts = caps.split(',').map((s) => s.trim().toLowerCase());\n if (parts.includes('ai')) {\n return true;\n }\n }\n return isAiCompatibleOperationMeta(parseAiCompatibleOperationMeta(row.aiMetadataJson));\n}\n\n//#endregion\n","//#region ----- Types -----\n\n/** Intent payload used to discover a voice capability. */\nexport interface AXPVoiceCapabilityIntent {\n text?: string;\n context?: Record<string, unknown>;\n}\n\n/** Spoken / display prompt returned by interview-style capabilities. */\nexport interface AXPVoicePrompt {\n sessionId: string;\n spokenPrompt: string;\n titleText?: string;\n answerKey?: string;\n widgetKind?: string;\n options?: Array<{ id: string; label: string }>;\n isRequired?: boolean;\n allowSkip?: boolean;\n comment?: { enabled: boolean; required: boolean };\n progress?: { answered: number; totalVisible: number };\n captureStrategy?: 'voice' | 'micro-capture' | 'unsupported';\n}\n\nexport type AXPVoiceNextPromptResult = AXPVoicePrompt | { done: true; sessionId: string; spokenPrompt: string };\n\nexport interface AXPVoiceApplyResult {\n ok: boolean;\n sessionId: string;\n errorCode?: string;\n spokenMessage?: string;\n requiresConfirmation?: boolean;\n next?: AXPVoiceNextPromptResult;\n}\n\nexport interface AXPVoiceSubmitResult {\n ok: boolean;\n sessionId?: string;\n spokenMessage?: string;\n errors?: Array<{ answerKey: string; message: string }>;\n}\n\nexport interface AXPVoiceSaveDraftResult {\n sessionId: string;\n spokenMessage?: string;\n}\n\n/**\n * Platform port implemented by domain modules (assessment is the first).\n * The voice shell talks only to this interface — never to viewer internals.\n */\nexport interface AXPVoiceCapabilityProvider {\n readonly id: string;\n readonly titleKey: string;\n canHandle(intent: AXPVoiceCapabilityIntent): boolean | Promise<boolean>;\n startSession(input: unknown): Promise<{ sessionId: string; spokenPrompt?: string }>;\n nextPrompt?(sessionId: string): Promise<AXPVoiceNextPromptResult>;\n applyInput?(sessionId: string, input: unknown): Promise<AXPVoiceApplyResult>;\n saveDraft?(sessionId: string): Promise<AXPVoiceSaveDraftResult | void>;\n submit?(sessionId: string): Promise<AXPVoiceSubmitResult>;\n cancel?(sessionId: string): Promise<void>;\n}\n\n//#endregion\n","//#region ----- Types -----\n\n/** Primary interaction mode of the central voice command shell. */\nexport type AXPVoiceShellMode = 'command' | 'interview' | 'confirm' | 'capture';\n\n/** Visual / animation state of the void dialog. */\nexport type AXPVoiceShellUiState =\n | 'idle'\n | 'listening'\n | 'thinking'\n | 'speaking'\n | 'confirm'\n | 'error'\n | 'capture';\n\nexport interface AXPVoiceShellConfirmRequest {\n prompt: string;\n confirmLabelKey?: string;\n cancelLabelKey?: string;\n}\n\nexport interface AXPVoiceShellOpenOptions {\n /** Optional spoken or typed kickoff utterance. */\n initialText?: string;\n /** Skip discovery and start this capability (e.g. assessment interview). */\n capabilityId?: string;\n /** Domain start payload forwarded to {@link AXPVoiceCapabilityProvider.startSession}. */\n startInput?: unknown;\n}\n\nexport interface AXPVoiceShellTranscriptTurn {\n role: 'user' | 'assistant';\n text: string;\n}\n\n//#endregion\n","//#region ----- Types -----\n\n/** Speech-to-text result from the interaction transport. */\nexport interface AXPVoiceSttResult {\n text: string;\n}\n\n/** Text-to-speech result from the interaction transport. */\nexport interface AXPVoiceTtsResult {\n fileId?: string;\n objectUrl?: string;\n text: string;\n}\n\n/**\n * Swappable interaction channel (v1 HTTP+SSE / commands; later realtime or WebRTC).\n * Domain APIs stay transport-agnostic.\n */\nexport interface AXPVoiceInteractionTransport {\n readonly id: string;\n transcribe(audio: Blob, options?: { language?: string }): Promise<AXPVoiceSttResult>;\n synthesize(text: string): Promise<AXPVoiceTtsResult>;\n runAssist?(prompt: string, context?: Record<string, unknown>): Promise<{ text: string }>;\n}\n\n//#endregion\n","//#region ----- Constants -----\n\n/** Runtime command that opens the central voice void dialog. */\nexport const AXE_AI_VOICE_SHELL_OPEN_COMMAND = 'AiVoiceShell:Open' as const;\n\n/** Assessment interview capability id (registered by assessment-management). */\nexport const AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID =\n 'assessment-questionnaire-interview' as const;\n\nexport const ASSESSMENT_FIND_CASE_FOR_VOICE_FILL_COMMAND = 'Assessment:FindCaseForVoiceFill' as const;\nexport const ASSESSMENT_START_HEADLESS_QUESTIONNAIRE_COMMAND =\n 'Assessment:StartHeadlessQuestionnaire' as const;\nexport const ASSESSMENT_NEXT_QUESTIONNAIRE_QUESTION_COMMAND =\n 'Assessment:NextQuestionnaireQuestion' as const;\nexport const ASSESSMENT_APPLY_QUESTIONNAIRE_ANSWER_COMMAND =\n 'Assessment:ApplyQuestionnaireAnswer' as const;\nexport const ASSESSMENT_SAVE_QUESTIONNAIRE_DRAFT_COMMAND = 'Assessment:SaveQuestionnaireDraft' as const;\nexport const ASSESSMENT_SUBMIT_QUESTIONNAIRE_COMMAND = 'Assessment:SubmitQuestionnaire' as const;\nexport const ASSESSMENT_CANCEL_QUESTIONNAIRE_COMMAND = 'Assessment:CancelQuestionnaire' as const;\n\n//#endregion\n","//#region ----- Contracts barrel -----\n\nexport * from './ai-compatible-operation.types';\nexport * from './voice-capability.types';\nexport * from './voice-shell.types';\nexport * from './voice-transport.types';\nexport * from './voice-shell.constants';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAwCA;AAEA;AAEA,MAAM,WAAW,GAAG,SAAS;AAE7B,SAAS,aAAa,CAAC,KAAc,EAAA;IACnC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACzB,QAAA,OAAO,SAAS;IAClB;IACA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAqB,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AACxG,IAAA,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,GAAG,SAAS;AAC7C;AAEA,SAAS,SAAS,CAAC,KAAc,EAAA;AAC/B,IAAA,OAAO,OAAO,KAAK,KAAK,SAAS,GAAG,KAAK,GAAG,SAAS;AACvD;AAEA,SAAS,YAAY,CAAC,KAAc,EAAA;AAClC,IAAA,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,aAAa,EAAE;AAC5E,QAAA,OAAO,KAAK;IACd;AACA,IAAA,IAAI,KAAK,KAAK,UAAU,EAAE;AACxB,QAAA,OAAO,UAAU;IACnB;AACA,IAAA,OAAO,SAAS;AAClB;AAEA,SAAS,eAAe,CAAC,KAAc,EAAA;AACrC,IAAA,IAAI,KAAK,KAAK,SAAS,IAAI,K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SAAO,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAChE,QAAA,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;AACxB,YAAA,OAAO,IAAI;QACb;IACF;IACA,OAAO,2BAA2B,CAAC,8BAA8B,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACxF;AAEA;;AC3LA;AA8DA;;AC9DA;AAmCA;;ACnCA;AAyBA;;ACzBA;AAEA;AACO,MAAM,+BAA+B,GAAG;AAE/C;AACO,MAAM,gDAAgD,GAC3D;AAEK,MAAM,2CAA2C,GAAG;AACpD,MAAM,+CAA+C,GAC1D;AACK,MAAM,8CAA8C,GACzD;AACK,MAAM,6CAA6C,GACxD;AACK,MAAM,2CAA2C,GAAG;AACpD,MAAM,uCAAuC,GAAG;AAChD,MAAM,uCAAuC,GAAG;AAEvD;;ACpBA;AAQA;;ACRA;;AAEG;;"}
1
+ {"version":3,"file":"acorex-platform-extension-ai-voice-shell-client-contracts.mjs","sources":["../../../../libs/extensions/ai/voice-shell/contracts/src/ai-compatible-operation.types.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/voice-capability.types.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/voice-shell.types.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/voice-session.types.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/voice-transport.types.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/voice-shell.constants.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/index.ts","../../../../libs/extensions/ai/voice-shell/contracts/src/acorex-platform-extension-ai-voice-shell-client-contracts.ts"],"sourcesContent":["//#region ----- Types -----\n\n/** Where an AI-compatible command or query runs. */\nexport type AXPAiCompatibleExecutionMode = 'backend' | 'frontend' | 'both';\n\n/** Safety classification for AI-compatible operations. */\nexport type AXPAiCompatibleSafetyKind = 'read-only' | 'mutating' | 'destructive';\n\nexport interface AXPAiCompatibleSafetyMeta {\n kind?: AXPAiCompatibleSafetyKind;\n sideEffects?: boolean;\n requiresConfirmation?: boolean;\n}\n\n/** Optional voice-shell hints stored in catalog `aiMetadataJson`. */\nexport interface AXPAiCompatibleVoiceMeta {\n speakInputSummary?: boolean;\n confirmPromptKey?: string;\n}\n\n/**\n * Formal AI-compatible command/query contract (parsed from catalog `aiMetadataJson`).\n * Aligns with existing `ai` sidecar fields plus optional voice hints.\n */\nexport interface AXPAiCompatibleOperationMeta {\n toolName?: string;\n shortDescription?: string;\n instruction?: string;\n tags?: string[];\n executionMode?: AXPAiCompatibleExecutionMode;\n safety?: AXPAiCompatibleSafetyMeta;\n voice?: AXPAiCompatibleVoiceMeta;\n followUpTools?: string[];\n usage?: {\n whenToUse?: string[];\n avoidWhen?: string[];\n followUpTools?: string[];\n };\n}\n\n//#endregion\n\n//#region ----- Parsing -----\n\nconst AI_TOOL_TAG = 'ai-tool';\n\nfunction asStringArray(value: unknown): string[] | undefined {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const items = value.filter((item): item is string => typeof item === 'string' && item.trim().length > 0);\n return items.length > 0 ? items : undefined;\n}\n\nfunction asBoolean(value: unknown): boolean | undefined {\n return typeof value === 'boolean' ? value : undefined;\n}\n\nfunction asSafetyKind(value: unknown): AXPAiCompatibleSafetyKind | undefined {\n if (value === 'read-only' || value === 'mutating' || value === 'destructive') {\n return value;\n }\n if (value === 'mutation') {\n return 'mutating';\n }\n return undefined;\n}\n\nfunction asExecutionMode(value: unknown): AXPAiCompatibleExecutionMode | undefined {\n if (value === 'backend' || value === 'frontend' || value === 'both') {\n return value;\n }\n return undefined;\n}\n\n/**\n * Parses catalog `aiMetadataJson` into the AI-compatible operation contract.\n * Returns `null` when the JSON is missing or invalid.\n */\nexport function parseAiCompatibleOperationMeta(\n aiMetadataJson: string | undefined | null,\n): AXPAiCompatibleOperationMeta | null {\n if (!aiMetadataJson?.trim()) {\n return null;\n }\n try {\n const raw = JSON.parse(aiMetadataJson) as Record<string, unknown>;\n if (raw == null || typeof raw !== 'object' || Array.isArray(raw)) {\n return null;\n }\n const safetyRaw =\n raw['safety'] != null && typeof raw['safety'] === 'object' && !Array.isArray(raw['safety'])\n ? (raw['safety'] as Record<string, unknown>)\n : undefined;\n const voiceRaw =\n raw['voice'] != null && typeof raw['voice'] === 'object' && !Array.isArray(raw['voice'])\n ? (raw['voice'] as Record<string, unknown>)\n : undefined;\n const usageRaw =\n raw['usage'] != null && typeof raw['usage'] === 'object' && !Array.isArray(raw['usage'])\n ? (raw['usage'] as Record<string, unknown>)\n : undefined;\n\n const meta: AXPAiCompatibleOperationMeta = {};\n if (typeof raw['toolName'] === 'string' && raw['toolName'].trim()) {\n meta.toolName = raw['toolName'].trim();\n }\n if (typeof raw['shortDescription'] === 'string' && raw['shortDescription'].trim()) {\n meta.shortDescription = raw['shortDescription'].trim();\n }\n if (typeof raw['instruction'] === 'string' && raw['instruction'].trim()) {\n meta.instruction = raw['instruction'].trim();\n }\n const tags = asStringArray(raw['tags']);\n if (tags) {\n meta.tags = tags;\n }\n const executionMode = asExecutionMode(raw['executionMode']);\n if (executionMode) {\n meta.executionMode = executionMode;\n }\n if (safetyRaw) {\n meta.safety = {\n kind: asSafetyKind(safetyRaw['kind']),\n sideEffects: asBoolean(safetyRaw['sideEffects']),\n requiresConfirmation: asBoolean(safetyRaw['requiresConfirmation']),\n };\n }\n if (voiceRaw) {\n meta.voice = {\n speakInputSummary: asBoolean(voiceRaw['speakInputSummary']),\n confirmPromptKey:\n typeof voiceRaw['confirmPromptKey'] === 'string' && voiceRaw['confirmPromptKey'].trim()\n ? voiceRaw['confirmPromptKey'].trim()\n : undefined,\n };\n }\n const followUpTools = asStringArray(raw['followUpTools']) ?? asStringArray(usageRaw?.['followUpTools']);\n if (followUpTools) {\n meta.followUpTools = followUpTools;\n }\n if (usageRaw) {\n meta.usage = {\n whenToUse: asStringArray(usageRaw['whenToUse']),\n avoidWhen: asStringArray(usageRaw['avoidWhen']),\n followUpTools: asStringArray(usageRaw['followUpTools']),\n };\n }\n return meta;\n } catch {\n return null;\n }\n}\n\n/**\n * True when catalog metadata opts the operation into the AI tool surface\n * (`ai-tool` tag, matching existing `commandRowExposedForAi` tag check).\n */\nexport function isAiCompatibleOperationMeta(meta: AXPAiCompatibleOperationMeta | null | undefined): boolean {\n return Array.isArray(meta?.tags) && meta.tags.includes(AI_TOOL_TAG);\n}\n\n/**\n * True when a catalog row should be exposed as an AI-compatible tool.\n * Matches `commandRowExposedForAi`: `capabilities` includes `ai`, or `aiMetadataJson` has the `ai-tool` tag.\n */\nexport function isAiCompatibleCatalogRow(row: {\n capabilities?: string | string[] | null;\n aiMetadataJson?: string | null;\n} | null | undefined): boolean {\n if (!row) {\n return false;\n }\n const caps = row.capabilities;\n if (Array.isArray(caps)) {\n if (caps.some((c) => String(c).toLowerCase() === 'ai')) {\n return true;\n }\n } else if (typeof caps === 'string' && caps.trim()) {\n const parts = caps.split(',').map((s) => s.trim().toLowerCase());\n if (parts.includes('ai')) {\n return true;\n }\n }\n return isAiCompatibleOperationMeta(parseAiCompatibleOperationMeta(row.aiMetadataJson));\n}\n\n//#endregion\n","//#region ----- Types -----\n\n/** Intent payload used to discover a voice capability. */\nexport interface AXPVoiceCapabilityIntent {\n text?: string;\n context?: Record<string, unknown>;\n}\n\n/** Spoken / display prompt returned by interview-style capabilities. */\nexport interface AXPVoicePrompt {\n sessionId: string;\n spokenPrompt: string;\n titleText?: string;\n answerKey?: string;\n widgetKind?: string;\n options?: Array<{ id: string; label: string }>;\n isRequired?: boolean;\n allowSkip?: boolean;\n comment?: { enabled: boolean; required: boolean };\n progress?: { answered: number; totalVisible: number };\n captureStrategy?: 'voice' | 'micro-capture' | 'unsupported';\n}\n\nexport type AXPVoiceNextPromptResult = AXPVoicePrompt | { done: true; sessionId: string; spokenPrompt: string };\n\nexport interface AXPVoiceApplyResult {\n ok: boolean;\n sessionId: string;\n errorCode?: string;\n spokenMessage?: string;\n requiresConfirmation?: boolean;\n next?: AXPVoiceNextPromptResult;\n}\n\nexport interface AXPVoiceSubmitResult {\n ok: boolean;\n sessionId?: string;\n spokenMessage?: string;\n errors?: Array<{ answerKey: string; message: string }>;\n}\n\nexport interface AXPVoiceSaveDraftResult {\n sessionId: string;\n spokenMessage?: string;\n}\n\n/**\n * Platform port implemented by domain modules (assessment is the first).\n * The voice shell talks only to this interface — never to viewer internals.\n */\nexport interface AXPVoiceCapabilityProvider {\n readonly id: string;\n readonly titleKey: string;\n canHandle(intent: AXPVoiceCapabilityIntent): boolean | Promise<boolean>;\n startSession(input: unknown): Promise<{ sessionId: string; spokenPrompt?: string }>;\n nextPrompt?(sessionId: string): Promise<AXPVoiceNextPromptResult>;\n applyInput?(sessionId: string, input: unknown): Promise<AXPVoiceApplyResult>;\n saveDraft?(sessionId: string): Promise<AXPVoiceSaveDraftResult | void>;\n submit?(sessionId: string): Promise<AXPVoiceSubmitResult>;\n cancel?(sessionId: string): Promise<void>;\n}\n\n//#endregion\n","//#region ----- Types -----\n\n/** Primary interaction mode of the central voice command shell. */\nexport type AXPVoiceShellMode = 'command' | 'interview' | 'confirm' | 'capture';\n\n/** Visual / animation state of the void dialog. */\nexport type AXPVoiceShellUiState =\n | 'idle'\n | 'listening'\n | 'thinking'\n | 'speaking'\n | 'confirm'\n | 'error'\n | 'capture';\n\nexport interface AXPVoiceShellConfirmRequest {\n prompt: string;\n confirmLabelKey?: string;\n cancelLabelKey?: string;\n}\n\nexport interface AXPVoiceShellOpenOptions {\n /** Optional spoken or typed kickoff utterance. */\n initialText?: string;\n /** Skip discovery and start this capability (e.g. assessment interview). */\n capabilityId?: string;\n /** Domain start payload forwarded to {@link AXPVoiceCapabilityProvider.startSession}. */\n startInput?: unknown;\n}\n\nexport interface AXPVoiceShellTranscriptTurn {\n role: 'user' | 'assistant';\n text: string;\n}\n\n//#endregion\n","//#region ----- Types -----\n\n/** Live media path chosen by VoiceSession:Start. */\nexport type AXPVoiceLiveMediaMode = 'openrouter' | 'rtc' | 'vendor';\n\nexport interface AXPVoiceLiveRtcIceServer {\n urls: string | string[];\n username?: string;\n credential?: string;\n}\n\nexport interface AXPVoiceLiveRtcJoin {\n roomName: string;\n participantIdentity: string;\n token: string;\n serverUrl: string;\n providerId: string;\n iceServers?: AXPVoiceLiveRtcIceServer[];\n forceRelay?: boolean;\n}\n\nexport interface AXPVoiceLiveVendorJoin {\n /** Ephemeral client secret for OpenAI Realtime WebRTC (never the catalog API key). */\n clientSecret: string;\n model: string;\n realtimeUrl: string;\n transport: 'openai' | 'gemini';\n}\n\nexport interface AXPVoiceSessionStartResult {\n sessionId: string;\n conversationId: string;\n assistId: string;\n mode: AXPVoiceLiveMediaMode;\n rtc?: AXPVoiceLiveRtcJoin;\n vendor?: AXPVoiceLiveVendorJoin;\n}\n\nexport interface AXPVoiceSessionPushAudioInput {\n sessionId: string;\n /** PCM16LE little-endian, standard base64 (not URL-safe). */\n pcmBase64: string;\n sampleRate: number;\n}\n\nexport interface AXPVoiceOpenRouterAudioPayload {\n sessionId: string;\n pcmBase64: string;\n sampleRate: number;\n}\n\nexport interface AXPVoiceSessionStopInput {\n sessionId?: string;\n}\n\nexport interface AXPVoiceSessionInterruptInput {\n sessionId?: string;\n}\n\nexport interface AXPVoiceSessionCommitTurnInput {\n sessionId: string;\n role: 'user' | 'assistant';\n text: string;\n}\n\nexport interface AXPVoiceSessionExecuteToolInput {\n sessionId: string;\n name: string;\n argumentsJson?: string;\n}\n\nexport interface AXPVoiceSessionExecuteToolResult {\n output: string;\n}\n\nexport function axeAiVoiceLiveRtcRoomName(sessionId: string): string {\n return `ai-voice-${sessionId.trim()}`;\n}\n\nexport function axeAiVoiceLiveUserParticipantIdentity(userId: string, sessionId?: string): string {\n const user = userId.trim();\n const session = sessionId?.trim();\n return session ? `${user}:${session}` : user;\n}\n\n//#endregion\n","//#region ----- Types -----\n\n/** Speech-to-text result from the interaction transport. */\nexport interface AXPVoiceSttResult {\n text: string;\n}\n\n/** Text-to-speech result from the interaction transport. */\nexport interface AXPVoiceTtsResult {\n fileId?: string;\n objectUrl?: string;\n text: string;\n}\n\n/**\n * Swappable interaction channel (v1 HTTP+SSE / commands; later realtime or WebRTC).\n * Domain APIs stay transport-agnostic.\n */\nexport interface AXPVoiceInteractionTransport {\n readonly id: string;\n transcribe(audio: Blob, options?: { language?: string }): Promise<AXPVoiceSttResult>;\n synthesize(text: string): Promise<AXPVoiceTtsResult>;\n runAssist?(prompt: string, context?: Record<string, unknown>): Promise<{ text: string }>;\n}\n\n//#endregion\n","//#region ----- Constants -----\n\n/** Runtime command that opens the central voice void dialog. */\nexport const AXE_AI_VOICE_SHELL_OPEN_COMMAND = 'AiVoiceShell:Open' as const;\n\n/** Backend: start a live voice session (Conversation room + RTC or vendor fallback). */\nexport const AXE_AI_VOICE_SHELL_VOICE_SESSION_START_COMMAND =\n 'AiVoiceShell:VoiceSession:Start' as const;\n\n/** Backend: hang up / stop the live voice session. */\nexport const AXE_AI_VOICE_SHELL_VOICE_SESSION_STOP_COMMAND =\n 'AiVoiceShell:VoiceSession:Stop' as const;\n\n/** Backend: browser OpenRouter path — push one complete user utterance (PCM16). */\nexport const AXE_AI_VOICE_SHELL_VOICE_SESSION_PUSH_AUDIO_COMMAND =\n 'AiVoiceShell:VoiceSession:PushAudio' as const;\n\n/** OpenRouter TTS PCM to the browser (not control-plane `ai.voice.session`). */\nexport const AXE_AI_VOICE_OPENROUTER_AUDIO_TOPIC = 'ai.voice.openrouter' as const;\n\n/** Backend: interrupt current assistant speech (barge-in). */\nexport const AXE_AI_VOICE_SHELL_VOICE_SESSION_INTERRUPT_COMMAND =\n 'AiVoiceShell:VoiceSession:Interrupt' as const;\n\n/** Backend: persist a transcript turn when the client holds the vendor media path. */\nexport const AXE_AI_VOICE_SHELL_VOICE_SESSION_COMMIT_TURN_COMMAND =\n 'AiVoiceShell:VoiceSession:CommitTurn' as const;\n\n/** Backend: run an Assist tool for a vendor-path live function call. */\nexport const AXE_AI_VOICE_SHELL_VOICE_SESSION_EXECUTE_TOOL_COMMAND =\n 'AiVoiceShell:VoiceSession:ExecuteTool' as const;\n\n/** Conversation.Message metadata.source for live-voice transcripts (skip text Assist). */\nexport const AXE_AI_VOICE_LIVE_MESSAGE_SOURCE = 'voice-live' as const;\n\nexport const AXE_AI_VOICE_LIVE_RTC_ROOM_PREFIX = 'ai-voice-' as const;\n\nexport const AXE_AI_VOICE_LIVE_AI_PARTICIPANT_IDENTITY = 'ai-voice-agent' as const;\n\n/** Assessment interview capability id (registered by assessment-management). */\nexport const AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID =\n 'assessment-questionnaire-interview' as const;\n\nexport const ASSESSMENT_FIND_CASE_FOR_VOICE_FILL_COMMAND = 'Assessment:FindCaseForVoiceFill' as const;\nexport const ASSESSMENT_START_HEADLESS_QUESTIONNAIRE_COMMAND =\n 'Assessment:StartHeadlessQuestionnaire' as const;\nexport const ASSESSMENT_NEXT_QUESTIONNAIRE_QUESTION_COMMAND =\n 'Assessment:NextQuestionnaireQuestion' as const;\nexport const ASSESSMENT_APPLY_QUESTIONNAIRE_ANSWER_COMMAND =\n 'Assessment:ApplyQuestionnaireAnswer' as const;\nexport const ASSESSMENT_SAVE_QUESTIONNAIRE_DRAFT_COMMAND = 'Assessment:SaveQuestionnaireDraft' as const;\nexport const ASSESSMENT_SUBMIT_QUESTIONNAIRE_COMMAND = 'Assessment:SubmitQuestionnaire' as const;\nexport const ASSESSMENT_CANCEL_QUESTIONNAIRE_COMMAND = 'Assessment:CancelQuestionnaire' as const;\n\n//#endregion\n","//#region ----- Contracts barrel -----\n\nexport * from './ai-compatible-operation.types';\nexport * from './voice-capability.types';\nexport * from './voice-shell.types';\nexport * from './voice-session.types';\nexport * from './voice-transport.types';\nexport * from './voice-shell.constants';\n\n//#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