@acorex-platform/extension-ai-voice-shell-client 0.0.21
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.
- package/fesm2022/acorex-platform-extension-ai-voice-shell-client-contracts.mjs +164 -0
- package/fesm2022/acorex-platform-extension-ai-voice-shell-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-ai-voice-shell-client.mjs +1026 -0
- package/fesm2022/acorex-platform-extension-ai-voice-shell-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-extension-ai-voice-shell-client-contracts.d.ts +186 -0
- package/types/acorex-platform-extension-ai-voice-shell-client.d.ts +176 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-ai-voice-shell-client.mjs","sources":["../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-shell-header-slot.component.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-shell-header-slot.component.html","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-shell-search.provider.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/ai-voice-shell-extension.module.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-capability.tokens.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-capability-registry.service.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/transport/http-sse-voice-transport.service.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/browser-speech-synthesis.util.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-command-shell.service.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/commands/open-voice-command-shell.command.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-void-dialog/voice-void-dialog.component.ts","../../../../libs/extensions/ai/voice-shell/client/src/lib/voice-void-dialog/voice-void-dialog.component.html","../../../../libs/extensions/ai/voice-shell/client/src/acorex-platform-extension-ai-voice-shell-client.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPKeyboardShortcutPriority } from '@acorex-platform/framework-shared/core';\nimport { AXE_AI_VOICE_SHELL_OPEN_COMMAND } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXPKeyboardShortcutRegistry } from '@acorex-platform/framework-client/core';\nimport { AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, inject } from '@angular/core';\n\n//#endregion\n\n//#region ----- Constants -----\n\n/** Dedicated chord — Ctrl+K remains global search. */\nexport const AXE_AI_VOICE_SHELL_SHORTCUT = 'ctrl+shift+space';\n\n//#endregion\n\n//#region ----- Component -----\n\n/**\n * Header mic next to the conversation AI robot. Opens the voice command shell.\n */\n@Component({\n selector: 'axe-ai-voice-shell-header-slot',\n templateUrl: './voice-shell-header-slot.component.html',\n styleUrls: ['./voice-shell-header-slot.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AXButtonModule, AXDecoratorModule, AXTranslationModule, AsyncPipe],\n})\nexport class AXEAiVoiceShellHeaderSlotComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly commandExecutor = inject(AXPCommandExecutor);\n private readonly shortcutRegistry = inject(AXPKeyboardShortcutRegistry);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly shortcutDisplay = this.shortcutRegistry.formatDisplayKeys([AXE_AI_VOICE_SHELL_SHORTCUT]);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n this.shortcutRegistry.register({\n owner: this.destroyRef,\n id: 'ai-voice-shell',\n priority: AXPKeyboardShortcutPriority.Global,\n group: '@general:keyboard-shortcuts.groups.global',\n shortcuts: [\n {\n keys: [AXE_AI_VOICE_SHELL_SHORTCUT],\n title: '@general:keyboard-shortcuts.actions.open-voice-command',\n allowInEditableFields: true,\n handler: () => {\n void this.openVoiceCommand();\n },\n },\n ],\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected async openVoiceCommand(): Promise<void> {\n await this.commandExecutor.execute(AXE_AI_VOICE_SHELL_OPEN_COMMAND, {});\n }\n\n //#endregion\n}\n\n//#endregion\n","<ax-button\n [iconOnly]=\"true\"\n class=\"relative\"\n color=\"primary\"\n [title]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n [attr.aria-label]=\"\n ('@extensions-ai-voice-shell:header.open-title' | translate: { params: { shortcut: shortcutDisplay } } | async) ??\n ''\n \"\n (onClick)=\"openVoiceCommand()\"\n>\n <ax-icon>\n <i class=\"fa-regular fa-microphone\"></i>\n </ax-icon>\n</ax-button>\n","//#region ----- Imports -----\n\nimport { Injectable } from '@angular/core';\nimport { AXPSearchCommandProvider, AXPSearchResult } from '@acorex-platform/framework-client/common';\nimport { AXE_AI_VOICE_SHELL_OPEN_COMMAND } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\n\n//#endregion\n\n//#region ----- Search -----\n\n@Injectable()\nexport class AXEAiVoiceShellSearchCommandProvider extends AXPSearchCommandProvider {\n commands: AXPSearchResult[] = [\n {\n id: 'open-voice-command-shell',\n group: 'command',\n title: '@extensions-ai-voice-shell:search.open.title',\n icon: 'fa-light fa-microphone',\n description: '@extensions-ai-voice-shell:search.open.description',\n command: {\n name: AXE_AI_VOICE_SHELL_OPEN_COMMAND,\n },\n },\n ];\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { NgModule } from '@angular/core';\nimport { AXP_SEARCH_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXPComponentSlotModule } from '@acorex-platform/framework-client/core';\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { AXMAiManagementModule } from '@acorex-platform/module-ai-management-client';\nimport { AXE_AI_VOICE_SHELL_OPEN_COMMAND } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXEAiVoiceShellHeaderSlotComponent } from './voice-shell-header-slot.component';\nimport { AXEAiVoiceShellSearchCommandProvider } from './voice-shell-search.provider';\n\n//#endregion\n\n//#region ----- Module -----\n\n/**\n * Central voice AI command shell (void dialog + capability registry + HTTP/SSE transport).\n * Register next to {@link AXMAiManagementModule}. Domain modules register {@link AXP_VOICE_CAPABILITY_PROVIDER}.\n */\n@NgModule({\n imports: [\n AXMAiManagementModule,\n AXPComponentSlotModule.forChild({\n 'root-header-end': [\n {\n // Immediately after conversation mini-chat (55) so mic + robot sit as one AI cluster.\n priority: 56,\n name: 'ai-voice-shell',\n component: AXEAiVoiceShellHeaderSlotComponent,\n },\n ],\n }),\n ],\n providers: [\n {\n provide: AXP_SEARCH_PROVIDER,\n useClass: AXEAiVoiceShellSearchCommandProvider,\n multi: true,\n },\n provideCommandSetups([\n {\n key: AXE_AI_VOICE_SHELL_OPEN_COMMAND,\n command: () =>\n import('./commands/open-voice-command-shell.command').then((c) => c.AXEAiVoiceShellOpenCommand),\n },\n ]),\n ],\n})\nexport class AXEAiVoiceShellExtensionModule {}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { InjectionToken } from '@angular/core';\nimport type { AXPVoiceCapabilityProvider } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\n\n//#endregion\n\n//#region ----- Tokens -----\n\n/** Multi-provider token for domain voice capabilities (assessment, later others). */\nexport const AXP_VOICE_CAPABILITY_PROVIDER = new InjectionToken<AXPVoiceCapabilityProvider>(\n 'AXP_VOICE_CAPABILITY_PROVIDER',\n);\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { Injectable, inject } from '@angular/core';\nimport type {\n AXPVoiceCapabilityIntent,\n AXPVoiceCapabilityProvider,\n} from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXP_VOICE_CAPABILITY_PROVIDER } from './voice-capability.tokens';\n\n//#endregion\n\n//#region ----- Registry -----\n\n/**\n * Discovers module-owned {@link AXPVoiceCapabilityProvider} implementations.\n * The shell never imports domain internals.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPVoiceCapabilityRegistry {\n //#region ----- Services & Dependencies -----\n\n private readonly providers = inject(AXP_VOICE_CAPABILITY_PROVIDER, { optional: true }) ?? [];\n\n //#endregion\n\n //#region ----- Public API -----\n\n list(): AXPVoiceCapabilityProvider[] {\n const raw = this.providers;\n return Array.isArray(raw) ? raw : raw ? [raw] : [];\n }\n\n getById(id: string): AXPVoiceCapabilityProvider | undefined {\n const trimmed = id.trim();\n if (!trimmed) {\n return undefined;\n }\n return this.list().find((provider) => provider.id === trimmed);\n }\n\n async findForIntent(intent: AXPVoiceCapabilityIntent): Promise<AXPVoiceCapabilityProvider | undefined> {\n for (const provider of this.list()) {\n if (await provider.canHandle(intent)) {\n return provider;\n }\n }\n return undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { Injectable, inject } from '@angular/core';\nimport {\n AIMANAGEMENT_CHAT_SYNTHESIZE_SPEECH_COMMAND_KEY,\n AIMANAGEMENT_CHAT_TRANSCRIBE_SPEECH_COMMAND_KEY,\n AXPAiChatToolRunContextService,\n AXPAiManagerService,\n AXPAiPlatformRuntimeContextBuilder,\n createBrowserPlayableTtsBlobUrl,\n persistAiChatAttachmentImage,\n} from '@acorex-platform/module-ai-management-client';\nimport { RootConfig } from '@acorex-platform/module-ai-management-client/contracts';\nimport type {\n AXPVoiceInteractionTransport,\n AXPVoiceSttResult,\n AXPVoiceTtsResult,\n} from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { AXPFileStorageService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';\nimport { first } from 'lodash';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst SPEECH_TO_TEXT_AGENT_NAME = 'speech-to-text';\nconst TEXT_TO_SPEECH_AGENT_NAME = 'text-to-speech';\n\n//#endregion\n\n//#region ----- Transport -----\n\n/**\n * v1 interaction transport: existing AI HTTP commands + assist `run` (SSE under the hood).\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPHttpSseVoiceTransport implements AXPVoiceInteractionTransport {\n //#region ----- Services & Dependencies -----\n\n readonly id = 'http-sse';\n\n private readonly commandService = inject(AXPCommandService);\n private readonly fileStorage = inject(AXPFileStorageService);\n private readonly entityService = inject(AXPEntityService);\n private readonly chatToolRunContext = inject(AXPAiChatToolRunContextService);\n private readonly runtimeContextBuilder = inject(AXPAiPlatformRuntimeContextBuilder);\n private readonly aiManager = inject(AXPAiManagerService, { optional: true });\n\n //#endregion\n\n //#region ----- Public API -----\n\n async transcribe(audio: Blob, options?: { language?: string }): Promise<AXPVoiceSttResult> {\n const aiManager = this.requireAiManager();\n const assist = await aiManager.getAssistForChat();\n const assistId = assist.id?.trim();\n if (!assistId) {\n throw new Error('No AI assist is configured for speech transcription.');\n }\n const chatTransport = (await aiManager.getAssistPrimaryChatTransport(assistId)) ?? 'openai';\n const agentId = await this.findAgentIdByName(SPEECH_TO_TEXT_AGENT_NAME);\n const mimeType = audio.type?.trim() || 'audio/webm';\n const file = new File([audio], `voice-${Date.now()}.webm`, { type: mimeType });\n const { fileId } = await persistAiChatAttachmentImage(\n this.fileStorage,\n file,\n globalThis.crypto.randomUUID(),\n );\n const language =\n options?.language?.trim() ||\n this.localeToTranscriptionLanguage(await this.resolveUiLocale());\n\n this.chatToolRunContext.setContext({\n assistId,\n chatTransport,\n ...(agentId ? { agentId } : {}),\n });\n try {\n const result = await this.commandService.execute(AIMANAGEMENT_CHAT_TRANSCRIBE_SPEECH_COMMAND_KEY, {\n fileId,\n assistId,\n ...(agentId ? { agentId } : {}),\n ...(language ? { language } : {}),\n });\n const data = runtimeCommandPayloadData(result) as { text?: string } | undefined;\n const text = typeof data?.text === 'string' ? data.text.trim() : '';\n if (!result?.success || !text) {\n throw new Error(this.commandFailureI18nKey(result, '@extensions-ai-voice-shell:errors.transcribe-failed'));\n }\n return { text };\n } finally {\n this.chatToolRunContext.setContext(null);\n }\n }\n\n async synthesize(text: string): Promise<AXPVoiceTtsResult> {\n const trimmed = text.trim();\n if (!trimmed) {\n return { text: '' };\n }\n const aiManager = this.requireAiManager();\n const assist = await aiManager.getAssistForChat();\n const assistId = assist.id?.trim();\n if (!assistId) {\n throw new Error('No AI assist is configured for speech synthesis.');\n }\n const chatTransport = (await aiManager.getAssistPrimaryChatTransport(assistId)) ?? 'openai';\n const agentId = await this.findAgentIdByName(TEXT_TO_SPEECH_AGENT_NAME);\n\n this.chatToolRunContext.setContext({\n assistId,\n chatTransport,\n ...(agentId ? { agentId } : {}),\n });\n try {\n const result = await this.commandService.executeRemote(AIMANAGEMENT_CHAT_SYNTHESIZE_SPEECH_COMMAND_KEY, {\n text: trimmed,\n assistId,\n ...(agentId ? { agentId } : {}),\n });\n const data = runtimeCommandPayloadData(result) as { fileId?: string; text?: string } | undefined;\n const fileId = typeof data?.fileId === 'string' ? data.fileId.trim() : '';\n if (!result?.success || !fileId) {\n throw new Error(this.commandFailureI18nKey(result, '@extensions-ai-voice-shell:errors.assist-failed'));\n }\n const info = await this.fileStorage.getInfo(fileId);\n const binary = await this.fileStorage.download(fileId);\n const objectUrl = await createBrowserPlayableTtsBlobUrl(\n binary,\n info?.mimeType ?? binary.type,\n info?.name,\n );\n return { fileId, objectUrl, text: typeof data?.text === 'string' ? data.text : trimmed };\n } finally {\n this.chatToolRunContext.setContext(null);\n }\n }\n\n async runAssist(prompt: string, context?: Record<string, unknown>): Promise<{ text: string }> {\n const aiManager = this.requireAiManager();\n const result = await aiManager.run({\n prompt,\n context: {\n systemInstruction:\n 'You are the platform voice command assistant. Prefer AI-compatible tools. Keep spoken replies short. Confirm before destructive or submit actions.',\n structuredContext: context,\n },\n });\n return { text: result.text?.trim() ?? '' };\n }\n\n //#endregion\n\n //#region ----- Private helpers -----\n\n private requireAiManager(): AXPAiManagerService {\n if (!this.aiManager) {\n throw new Error('AI manager service is not available.');\n }\n return this.aiManager;\n }\n\n private async findAgentIdByName(name: string): Promise<string | undefined> {\n const list = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.agent.name)\n .data<string, { id: string }>()\n .query({\n skip: 0,\n take: 1,\n filter: {\n field: 'name',\n operator: { type: 'equal' },\n value: name,\n },\n });\n return first(list.items)?.id;\n }\n\n private async resolveUiLocale(): Promise<string | undefined> {\n const ctx = await this.runtimeContextBuilder.build();\n const locale = ctx['locale'];\n return typeof locale === 'string' && locale.trim() ? locale.trim() : undefined;\n }\n\n private commandFailureI18nKey(\n result: { message?: { text?: unknown } } | null | undefined,\n fallbackKey: string,\n ): string {\n const text = typeof result?.message?.text === 'string' ? result.message.text.trim() : '';\n return text.startsWith('@') ? text : fallbackKey;\n }\n\n private localeToTranscriptionLanguage(locale: string | undefined): string | undefined {\n const primary = locale?.trim().split('-')[0]?.toLowerCase();\n return primary || undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Browser speech -----\n\nexport function canUseBrowserSpeechSynthesis(): boolean {\n return typeof window !== 'undefined' && typeof window.speechSynthesis?.speak === 'function';\n}\n\n/** Unlock speech synthesis during a user gesture so later replies can be spoken. */\nexport function primeBrowserSpeechSynthesis(): void {\n if (!canUseBrowserSpeechSynthesis()) {\n return;\n }\n try {\n window.speechSynthesis.cancel();\n const silent = new SpeechSynthesisUtterance(' ');\n silent.volume = 0;\n silent.rate = 10;\n window.speechSynthesis.speak(silent);\n window.speechSynthesis.cancel();\n } catch {\n // Ignore browsers that reject the silent prime utterance.\n }\n}\n\nexport function cancelBrowserSpeechSynthesis(): void {\n if (!canUseBrowserSpeechSynthesis()) {\n return;\n }\n window.speechSynthesis.cancel();\n}\n\nexport function speakWithBrowserSpeechSynthesis(text: string): Promise<boolean> {\n const trimmed = text.trim();\n if (!trimmed || !canUseBrowserSpeechSynthesis()) {\n return Promise.resolve(false);\n }\n\n return new Promise((resolve) => {\n try {\n window.speechSynthesis.cancel();\n const utterance = new SpeechSynthesisUtterance(trimmed);\n const done = (ok: boolean): void => {\n utterance.onend = null;\n utterance.onerror = null;\n resolve(ok);\n };\n utterance.onend = () => done(true);\n utterance.onerror = () => done(false);\n window.speechSynthesis.speak(utterance);\n } catch {\n resolve(false);\n }\n });\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { Injectable, inject, signal } from '@angular/core';\nimport { AXPopupService } from '@acorex/components/popup';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type {\n AXPVoiceApplyResult,\n AXPVoiceCapabilityProvider,\n AXPVoiceNextPromptResult,\n AXPVoiceShellConfirmRequest,\n AXPVoiceShellMode,\n AXPVoiceShellOpenOptions,\n AXPVoiceShellTranscriptTurn,\n AXPVoiceShellUiState,\n} from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { AXPVoiceCapabilityRegistry } from './voice-capability-registry.service';\nimport { AXPHttpSseVoiceTransport } from './transport/http-sse-voice-transport.service';\nimport {\n cancelBrowserSpeechSynthesis,\n speakWithBrowserSpeechSynthesis,\n} from './browser-speech-synthesis.util';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst INTERVIEW_INTENT_RE =\n /\\b(fill|inspect|inspection|questionnaire|assessment|survey|checklist|فرم|پرسشنامه|بازرسی)\\b/i;\n\n//#endregion\n\n//#region ----- Service -----\n\n/**\n * Session coordinator for the central voice void dialog.\n * Does not import assessment internals — only the capability registry and transport.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPVoiceCommandShellService {\n //#region ----- Services & Dependencies -----\n\n private readonly popupService = inject(AXPopupService);\n private readonly translation = inject(AXTranslationService);\n private readonly registry = inject(AXPVoiceCapabilityRegistry);\n private readonly transport = inject(AXPHttpSseVoiceTransport);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n readonly uiState = signal<AXPVoiceShellUiState>('idle');\n readonly mode = signal<AXPVoiceShellMode>('command');\n readonly statusText = signal('');\n readonly lastTranscript = signal('');\n readonly lastSpoken = signal('');\n readonly errorMessage = signal('');\n readonly confirmRequest = signal<AXPVoiceShellConfirmRequest | null>(null);\n readonly turns = signal<AXPVoiceShellTranscriptTurn[]>([]);\n readonly interviewProgress = signal<{ answered: number; totalVisible: number } | null>(null);\n\n //#endregion\n\n //#region ----- Session -----\n\n private activeCapability: AXPVoiceCapabilityProvider | null = null;\n private activeSessionId: string | null = null;\n private pendingSpokenConfirm: { kind: 'submit' } | null = null;\n private currentAudio: HTMLAudioElement | null = null;\n private currentObjectUrl: string | null = null;\n private openPromise: Promise<void> | null = null;\n\n //#endregion\n\n //#region ----- Public API -----\n\n async open(options?: AXPVoiceShellOpenOptions): Promise<void> {\n if (this.openPromise) {\n return this.openPromise;\n }\n this.resetSession();\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n const title = await this.translation.translateAsync('@extensions-ai-voice-shell:dialog.title');\n const { AXEAiVoiceVoidDialogComponent } = await import('./voice-void-dialog/voice-void-dialog.component');\n const popupClosed = this.popupService\n .open(AXEAiVoiceVoidDialogComponent, {\n title,\n size: 'sm',\n header: true,\n closeButton: true,\n maximizable: false,\n draggable: true,\n hasBackdrop: true,\n closeOnBackdropClick: true,\n closeOnEscape: true,\n panelClass: ['axe-ai-voice-shell-popup'],\n })\n .then(() => undefined);\n\n this.openPromise = popupClosed.finally(() => {\n this.openPromise = null;\n this.stopPlayback();\n this.resetSession();\n });\n\n if (options?.capabilityId || options?.startInput) {\n void this.beginCapabilitySession(options);\n } else if (options?.initialText?.trim()) {\n void this.handleUserText(options.initialText.trim());\n }\n\n return this.openPromise;\n }\n\n async enterListening(): Promise<void> {\n this.stopPlayback();\n this.uiState.set('listening');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.listening'));\n this.errorMessage.set('');\n }\n\n async cancelListening(): Promise<void> {\n this.uiState.set('idle');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n async reportError(key: string, detail?: string): Promise<void> {\n await this.setError(key, detail);\n }\n\n async submitRecording(audio: Blob): Promise<void> {\n this.uiState.set('thinking');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.thinking'));\n try {\n const { text } = await this.transport.transcribe(audio);\n if (!text.trim()) {\n await this.setError('@extensions-ai-voice-shell:errors.empty-transcript');\n return;\n }\n await this.handleUserText(text.trim());\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.transcribe-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n async handleUserText(text: string): Promise<void> {\n const trimmed = text.trim();\n if (!trimmed) {\n return;\n }\n this.lastTranscript.set(trimmed);\n this.appendTurn('user', trimmed);\n this.uiState.set('thinking');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.thinking'));\n this.errorMessage.set('');\n\n if (this.mode() === 'confirm' && this.pendingSpokenConfirm) {\n await this.handleConfirmUtterance(trimmed);\n return;\n }\n\n if (this.mode() === 'interview' && this.activeCapability && this.activeSessionId) {\n await this.applyInterviewUtterance(trimmed);\n return;\n }\n\n const intent = { text: trimmed };\n const capability =\n this.registry.getById(AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID) && INTERVIEW_INTENT_RE.test(trimmed)\n ? await this.registry.findForIntent(intent)\n : await this.registry.findForIntent(intent);\n\n if (capability) {\n await this.beginCapabilitySession({ capabilityId: capability.id, startInput: { text: trimmed } });\n return;\n }\n\n await this.runCommandAssist(trimmed);\n }\n\n async confirmYes(): Promise<void> {\n if (this.pendingSpokenConfirm?.kind === 'submit') {\n await this.submitInterview();\n return;\n }\n this.confirmRequest.set(null);\n this.mode.set(this.activeSessionId ? 'interview' : 'command');\n this.uiState.set('idle');\n }\n\n async confirmNo(): Promise<void> {\n this.pendingSpokenConfirm = null;\n this.confirmRequest.set(null);\n if (this.activeSessionId) {\n this.mode.set('interview');\n const stay = await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submit-cancelled');\n await this.speak(stay);\n return;\n }\n this.mode.set('command');\n this.uiState.set('idle');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n async saveInterviewDraft(): Promise<void> {\n if (!this.activeCapability?.saveDraft || !this.activeSessionId) {\n return;\n }\n this.uiState.set('thinking');\n try {\n const result = await this.activeCapability.saveDraft(this.activeSessionId);\n const spoken =\n result && typeof result === 'object' && 'spokenMessage' in result && result.spokenMessage\n ? result.spokenMessage\n : await this.translation.translateAsync('@extensions-ai-voice-shell:interview.draft-saved');\n await this.speak(spoken);\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.save-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n async cancelInterview(): Promise<void> {\n if (this.activeCapability?.cancel && this.activeSessionId) {\n await this.activeCapability.cancel(this.activeSessionId);\n }\n this.resetSession();\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n stopPlayback(): void {\n if (this.currentAudio) {\n this.currentAudio.pause();\n this.currentAudio = null;\n }\n if (this.currentObjectUrl) {\n URL.revokeObjectURL(this.currentObjectUrl);\n this.currentObjectUrl = null;\n }\n cancelBrowserSpeechSynthesis();\n }\n\n //#endregion\n\n //#region ----- Interview / command -----\n\n private async beginCapabilitySession(options: AXPVoiceShellOpenOptions): Promise<void> {\n const startInput = options.startInput;\n const startText =\n startInput != null && typeof startInput === 'object' && 'text' in startInput\n ? String((startInput as { text?: unknown }).text ?? '')\n : '';\n const capability = options.capabilityId\n ? this.registry.getById(options.capabilityId)\n : await this.registry.findForIntent({\n text: startText || undefined,\n context:\n startInput != null && typeof startInput === 'object'\n ? (startInput as Record<string, unknown>)\n : undefined,\n });\n if (!capability) {\n await this.setError('@extensions-ai-voice-shell:errors.no-capability');\n return;\n }\n this.uiState.set('thinking');\n try {\n const started = await capability.startSession(options.startInput ?? {});\n this.activeCapability = capability;\n this.activeSessionId = started.sessionId;\n this.mode.set('interview');\n if (started.spokenPrompt) {\n await this.speak(started.spokenPrompt);\n }\n if (capability.nextPrompt) {\n await this.speakNextPrompt();\n }\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.start-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async speakNextPrompt(): Promise<void> {\n if (!this.activeCapability?.nextPrompt || !this.activeSessionId) {\n return;\n }\n const next = await this.activeCapability.nextPrompt(this.activeSessionId);\n await this.handleNextPrompt(next);\n }\n\n private async handleNextPrompt(next: AXPVoiceNextPromptResult): Promise<void> {\n if ('done' in next && next.done) {\n this.interviewProgress.set(null);\n await this.enterSubmitConfirm(next.spokenPrompt);\n return;\n }\n if ('spokenPrompt' in next) {\n if ('progress' in next && next.progress) {\n this.interviewProgress.set(next.progress);\n }\n await this.speak(next.spokenPrompt);\n }\n }\n\n private async applyInterviewUtterance(text: string): Promise<void> {\n if (!this.activeCapability?.applyInput || !this.activeSessionId) {\n return;\n }\n try {\n const result: AXPVoiceApplyResult = await this.activeCapability.applyInput(this.activeSessionId, {\n text,\n });\n if (!result.ok) {\n await this.speak(\n result.spokenMessage ??\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.apply-failed')),\n );\n return;\n }\n if (result.next) {\n await this.handleNextPrompt(result.next);\n return;\n }\n await this.speakNextPrompt();\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.apply-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async enterSubmitConfirm(spoken?: string): Promise<void> {\n this.mode.set('confirm');\n this.pendingSpokenConfirm = { kind: 'submit' };\n const prompt =\n spoken?.trim() ||\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submit-confirm'));\n this.confirmRequest.set({\n prompt,\n confirmLabelKey: '@extensions-ai-voice-shell:actions.submit',\n cancelLabelKey: '@extensions-ai-voice-shell:actions.keep-editing',\n });\n await this.speak(prompt);\n }\n\n private async handleConfirmUtterance(text: string): Promise<void> {\n const normalized = text.trim().toLowerCase();\n const yes = /^(yes|y|ok|okay|sure|submit|confirm|بله|آره|باشه|تایید)$/i.test(normalized);\n const no = /^(no|n|cancel|stop|نه|خیر|لغو)$/i.test(normalized);\n if (yes) {\n await this.confirmYes();\n return;\n }\n if (no) {\n await this.confirmNo();\n return;\n }\n await this.speak(await this.translation.translateAsync('@extensions-ai-voice-shell:interview.confirm-repeat'));\n }\n\n private async submitInterview(): Promise<void> {\n if (!this.activeCapability?.submit || !this.activeSessionId) {\n return;\n }\n this.uiState.set('thinking');\n try {\n const result = await this.activeCapability.submit(this.activeSessionId);\n this.pendingSpokenConfirm = null;\n this.confirmRequest.set(null);\n if (!result.ok) {\n const spoken =\n result.spokenMessage ||\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submit-failed'));\n await this.speak(spoken);\n this.mode.set('interview');\n return;\n }\n const spoken =\n result.spokenMessage ||\n (await this.translation.translateAsync('@extensions-ai-voice-shell:interview.submitted'));\n await this.speak(spoken);\n this.resetSession();\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.submit-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async runCommandAssist(text: string): Promise<void> {\n try {\n const { text: reply } = await this.transport.runAssist(text, {\n voiceShell: true,\n mode: 'command',\n });\n const spoken =\n reply.trim() || (await this.translation.translateAsync('@extensions-ai-voice-shell:command.empty-reply'));\n await this.speak(spoken);\n } catch (err) {\n await this.setError(\n '@extensions-ai-voice-shell:errors.assist-failed',\n err instanceof Error ? err.message : undefined,\n );\n }\n }\n\n private async speak(text: string): Promise<void> {\n const trimmed = text.trim();\n if (!trimmed) {\n this.uiState.set('idle');\n return;\n }\n this.lastSpoken.set(trimmed);\n this.appendTurn('assistant', trimmed);\n this.uiState.set('speaking');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.speaking'));\n this.stopPlayback();\n try {\n const tts = await this.transport.synthesize(trimmed);\n if (tts.objectUrl) {\n this.currentObjectUrl = tts.objectUrl;\n const played = await this.playObjectUrl(tts.objectUrl);\n if (played) {\n await this.finishSpeaking();\n return;\n }\n }\n } catch {\n // Fall through to browser speech when server TTS is unavailable.\n }\n await speakWithBrowserSpeechSynthesis(trimmed);\n await this.finishSpeaking();\n }\n\n private async finishSpeaking(): Promise<void> {\n if (this.mode() === 'confirm') {\n this.uiState.set('confirm');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.confirm'));\n return;\n }\n this.uiState.set('idle');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.idle'));\n }\n\n private playObjectUrl(url: string): Promise<boolean> {\n return new Promise((resolve) => {\n const audio = new Audio(url);\n this.currentAudio = audio;\n const finish = (ok: boolean): void => {\n audio.removeEventListener('ended', onEnded);\n audio.removeEventListener('error', onError);\n resolve(ok);\n };\n const onEnded = (): void => finish(true);\n const onError = (): void => finish(false);\n audio.addEventListener('ended', onEnded);\n audio.addEventListener('error', onError);\n void audio.play().catch(() => finish(false));\n });\n }\n\n private async setError(key: string, detail?: string): Promise<void> {\n const messageKey = detail?.startsWith('@') ? detail : key;\n this.errorMessage.set(await this.translation.translateAsync(messageKey));\n this.uiState.set('error');\n this.statusText.set(await this.translation.translateAsync('@extensions-ai-voice-shell:states.error'));\n }\n\n private appendTurn(role: 'user' | 'assistant', text: string): void {\n this.turns.update((current) => [...current, { role, text }]);\n }\n\n private resetSession(): void {\n this.activeCapability = null;\n this.activeSessionId = null;\n this.pendingSpokenConfirm = null;\n this.confirmRequest.set(null);\n this.interviewProgress.set(null);\n this.mode.set('command');\n this.uiState.set('idle');\n this.statusText.set('');\n this.lastTranscript.set('');\n this.lastSpoken.set('');\n this.errorMessage.set('');\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPVoiceShellOpenOptions } from '@acorex-platform/extension-ai-voice-shell-client/contracts';\nimport { inject, Injectable } from '@angular/core';\nimport { AXPVoiceCommandShellService } from '../voice-command-shell.service';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXEAiVoiceShellOpenCommandInput {\n initialText?: string;\n capabilityId?: string;\n caseId?: string;\n sessionId?: string;\n}\n\n//#endregion\n\n//#region ----- Command -----\n\n@Injectable()\nexport class AXEAiVoiceShellOpenCommand implements AXPCommand<AXEAiVoiceShellOpenCommandInput, void> {\n //#region ----- Services & Dependencies -----\n\n private readonly shell = inject(AXPVoiceCommandShellService);\n\n //#endregion\n\n //#region ----- Command execution -----\n\n async execute(input: AXEAiVoiceShellOpenCommandInput): AXPCommandExecuteResultPromise<void> {\n const startInput =\n input?.caseId || input?.sessionId\n ? { caseId: input.caseId, sessionId: input.sessionId }\n : input?.initialText\n ? { text: input.initialText }\n : undefined;\n const options: AXPVoiceShellOpenOptions = {\n initialText: input?.initialText,\n capabilityId: input?.capabilityId,\n startInput,\n };\n await this.shell.open(options);\n return { success: true, kind: 'object', data: undefined };\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n PLATFORM_ID,\n ViewEncapsulation,\n computed,\n inject,\n} from '@angular/core';\nimport {\n cancelBrowserSpeechSynthesis,\n primeBrowserSpeechSynthesis,\n} from '../browser-speech-synthesis.util';\nimport { AXPVoiceCommandShellService } from '../voice-command-shell.service';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axe-ai-voice-void-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXTranslationModule],\n templateUrl: './voice-void-dialog.component.html',\n styleUrl: './voice-void-dialog.component.css',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXEAiVoiceVoidDialogComponent extends AXBasePageComponent {\n //#region ----- Services & Dependencies -----\n\n readonly shell = inject(AXPVoiceCommandShellService);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ----- State -----\n\n private mediaRecorder?: MediaRecorder;\n private audioChunks: Blob[] = [];\n private activeStream?: MediaStream;\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n readonly orbClass = computed(() => `voice-void-orb voice-void-orb--${this.shell.uiState()}`);\n readonly orbWrapClass = computed(() => `voice-void-orb-wrap voice-void-orb-wrap--${this.shell.uiState()}`);\n readonly canListen = computed(() => {\n const state = this.shell.uiState();\n return state === 'idle' || state === 'error' || state === 'confirm';\n });\n readonly isListening = computed(() => this.shell.uiState() === 'listening');\n readonly isSpeaking = computed(() => this.shell.uiState() === 'speaking');\n readonly showConfirm = computed(() => this.shell.uiState() === 'confirm' && this.shell.confirmRequest() != null);\n readonly progressLabel = computed(() => {\n const progress = this.shell.interviewProgress();\n if (!progress || progress.totalVisible <= 0) {\n return '';\n }\n return `${progress.answered}/${progress.totalVisible}`;\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n this.destroyRef.onDestroy(() => {\n this.stopTracks();\n cancelBrowserSpeechSynthesis();\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n async onMicClick(): Promise<void> {\n if (isPlatformBrowser(this.platformId)) {\n primeBrowserSpeechSynthesis();\n }\n if (this.isListening()) {\n await this.stopAndSubmit();\n return;\n }\n if (!this.canListen()) {\n return;\n }\n await this.startRecording();\n }\n\n async onCancelListen(): Promise<void> {\n this.stopTracks();\n this.audioChunks = [];\n await this.shell.cancelListening();\n }\n\n async onConfirmYes(): Promise<void> {\n await this.shell.confirmYes();\n }\n\n async onConfirmNo(): Promise<void> {\n await this.shell.confirmNo();\n }\n\n async onSaveDraft(): Promise<void> {\n await this.shell.saveInterviewDraft();\n }\n\n async onCancelInterview(): Promise<void> {\n await this.shell.cancelInterview();\n }\n\n //#endregion\n\n //#region ----- Recording -----\n\n private async startRecording(): Promise<void> {\n if (!isPlatformBrowser(this.platformId) || !navigator.mediaDevices?.getUserMedia) {\n await this.shell.reportError('@extensions-ai-voice-shell:errors.mic-unavailable');\n return;\n }\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n this.activeStream = stream;\n this.audioChunks = [];\n const recorder = new MediaRecorder(stream);\n this.mediaRecorder = recorder;\n recorder.ondataavailable = (event) => {\n if (event.data.size > 0) {\n this.audioChunks.push(event.data);\n }\n };\n recorder.start(250);\n await this.shell.enterListening();\n } catch {\n this.stopTracks();\n await this.shell.reportError('@extensions-ai-voice-shell:errors.mic-denied');\n }\n }\n\n private async stopAndSubmit(): Promise<void> {\n const recorder = this.mediaRecorder;\n if (!recorder || recorder.state !== 'recording') {\n this.stopTracks();\n await this.shell.cancelListening();\n return;\n }\n const blob = await new Promise<Blob | null>((resolve) => {\n recorder.onstop = () => {\n const mime = recorder.mimeType?.trim() || this.audioChunks[0]?.type?.trim() || 'audio/webm';\n const audioBlob = new Blob(this.audioChunks, { type: mime });\n resolve(audioBlob.size > 0 ? audioBlob : null);\n };\n recorder.requestData();\n recorder.stop();\n });\n this.stopTracks();\n if (!blob) {\n await this.shell.cancelListening();\n return;\n }\n await this.shell.submitRecording(blob);\n }\n\n private stopTracks(): void {\n if (this.mediaRecorder?.state === 'recording') {\n this.mediaRecorder.stop();\n }\n this.mediaRecorder = undefined;\n this.activeStream?.getTracks().forEach((track) => track.stop());\n this.activeStream = undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"voice-void\">\n <div class=\"voice-void-stage\">\n <!-- ----- Listening / thinking / speaking orb ----- -->\n <div [class]=\"orbWrapClass()\">\n <span class=\"voice-void-ring voice-void-ring--1\" aria-hidden=\"true\"></span>\n <span class=\"voice-void-ring voice-void-ring--2\" aria-hidden=\"true\"></span>\n <span class=\"voice-void-ring voice-void-ring--3\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n [class]=\"orbClass()\"\n (click)=\"onMicClick()\"\n [disabled]=\"!canListen() && !isListening()\"\n [attr.aria-label]=\"'@extensions-ai-voice-shell:actions.tap-to-talk' | translate | async\"\n >\n @if (isSpeaking()) {\n <!-- ----- AI is speaking ----- -->\n <i class=\"fa-regular fa-volume-high\"></i>\n }\n <!-- ----- Tap-to-talk / user speaking ----- -->\n @else {\n <i class=\"fa-regular fa-microphone\"></i>\n }\n </button>\n @if (isListening() || isSpeaking()) {\n <!-- ----- Waveform bars: user listen vs AI speak ----- -->\n <span class=\"voice-void-eq\" aria-hidden=\"true\">\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n </span>\n }\n </div>\n\n <p class=\"voice-void-status\">{{ shell.statusText() }}</p>\n\n @if (progressLabel()) {\n <!-- ----- Interview progress counter ----- -->\n <p class=\"voice-void-progress\">{{ progressLabel() }}</p>\n }\n\n @if (shell.lastSpoken()) {\n <!-- ----- Last spoken assistant text ----- -->\n <p class=\"voice-void-spoken\">{{ shell.lastSpoken() }}</p>\n }\n\n @if (shell.lastTranscript()) {\n <!-- ----- Last user transcript ----- -->\n <p class=\"voice-void-transcript\">{{ shell.lastTranscript() }}</p>\n }\n\n @if (shell.errorMessage()) {\n <!-- ----- Spoken / visible error ----- -->\n <p class=\"voice-void-error\">{{ shell.errorMessage() }}</p>\n }\n </div>\n\n @if (showConfirm()) {\n <!-- ----- Confirm chips for submit / destructive actions ----- -->\n <div class=\"voice-void-confirm\">\n <p class=\"voice-void-confirm-prompt\">{{ shell.confirmRequest()?.prompt }}</p>\n <div class=\"voice-void-confirm-actions\">\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.submit' | translate | async\"\n color=\"primary\"\n (onClick)=\"onConfirmYes()\"\n ></ax-button>\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.keep-editing' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"onConfirmNo()\"\n ></ax-button>\n </div>\n </div>\n }\n\n <!-- ----- Secondary interview / listen actions ----- -->\n <div class=\"voice-void-toolbar\">\n @if (isListening()) {\n <!-- ----- Stop listening without sending ----- -->\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.cancel-listen' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"onCancelListen()\"\n ></ax-button>\n }\n <!-- ----- Interview session actions ----- -->\n @if (shell.mode() === 'interview') {\n <!-- ----- Draft save and cancel while filling by voice ----- -->\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.save-draft' | translate | async\"\n [look]=\"'outline'\"\n (onClick)=\"onSaveDraft()\"\n ></ax-button>\n <ax-button\n [text]=\"'@extensions-ai-voice-shell:actions.cancel-interview' | translate | async\"\n [look]=\"'ghost'\"\n (onClick)=\"onCancelInterview()\"\n ></ax-button>\n }\n </div>\n\n <p class=\"voice-void-hint\">{{ '@extensions-ai-voice-shell:dialog.hint' | translate | async }}</p>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAYA;AAEA;AAEA;AACO,MAAM,2BAA2B,GAAG;AAE3C;AAEA;AAEA;;AAEG;MASU,kCAAkC,CAAA;;;AAiB7C,IAAA,WAAA,GAAA;;AAdiB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,2BAA2B,CAAC;AACtD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;;QAM7B,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,iB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ideEffects": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^21.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"module": "fesm2022/acorex-platform-extension-ai-voice-shell-client.mjs",
|
|
13
|
+
"typings": "types/acorex-platform-extension-ai-voice-shell-client.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/acorex-platform-extension-ai-voice-shell-client.d.ts",
|
|
20
|
+
"default": "./fesm2022/acorex-platform-extension-ai-voice-shell-client.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./contracts": {
|
|
23
|
+
"types": "./types/acorex-platform-extension-ai-voice-shell-client-contracts.d.ts",
|
|
24
|
+
"default": "./fesm2022/acorex-platform-extension-ai-voice-shell-client-contracts.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/** Where an AI-compatible command or query runs. */
|
|
2
|
+
type AXPAiCompatibleExecutionMode = 'backend' | 'frontend' | 'both';
|
|
3
|
+
/** Safety classification for AI-compatible operations. */
|
|
4
|
+
type AXPAiCompatibleSafetyKind = 'read-only' | 'mutating' | 'destructive';
|
|
5
|
+
interface AXPAiCompatibleSafetyMeta {
|
|
6
|
+
kind?: AXPAiCompatibleSafetyKind;
|
|
7
|
+
sideEffects?: boolean;
|
|
8
|
+
requiresConfirmation?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Optional voice-shell hints stored in catalog `aiMetadataJson`. */
|
|
11
|
+
interface AXPAiCompatibleVoiceMeta {
|
|
12
|
+
speakInputSummary?: boolean;
|
|
13
|
+
confirmPromptKey?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Formal AI-compatible command/query contract (parsed from catalog `aiMetadataJson`).
|
|
17
|
+
* Aligns with existing `ai` sidecar fields plus optional voice hints.
|
|
18
|
+
*/
|
|
19
|
+
interface AXPAiCompatibleOperationMeta {
|
|
20
|
+
toolName?: string;
|
|
21
|
+
shortDescription?: string;
|
|
22
|
+
instruction?: string;
|
|
23
|
+
tags?: string[];
|
|
24
|
+
executionMode?: AXPAiCompatibleExecutionMode;
|
|
25
|
+
safety?: AXPAiCompatibleSafetyMeta;
|
|
26
|
+
voice?: AXPAiCompatibleVoiceMeta;
|
|
27
|
+
followUpTools?: string[];
|
|
28
|
+
usage?: {
|
|
29
|
+
whenToUse?: string[];
|
|
30
|
+
avoidWhen?: string[];
|
|
31
|
+
followUpTools?: string[];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Parses catalog `aiMetadataJson` into the AI-compatible operation contract.
|
|
36
|
+
* Returns `null` when the JSON is missing or invalid.
|
|
37
|
+
*/
|
|
38
|
+
declare function parseAiCompatibleOperationMeta(aiMetadataJson: string | undefined | null): AXPAiCompatibleOperationMeta | null;
|
|
39
|
+
/**
|
|
40
|
+
* True when catalog metadata opts the operation into the AI tool surface
|
|
41
|
+
* (`ai-tool` tag, matching existing `commandRowExposedForAi` tag check).
|
|
42
|
+
*/
|
|
43
|
+
declare function isAiCompatibleOperationMeta(meta: AXPAiCompatibleOperationMeta | null | undefined): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* True when a catalog row should be exposed as an AI-compatible tool.
|
|
46
|
+
* Matches `commandRowExposedForAi`: `capabilities` includes `ai`, or `aiMetadataJson` has the `ai-tool` tag.
|
|
47
|
+
*/
|
|
48
|
+
declare function isAiCompatibleCatalogRow(row: {
|
|
49
|
+
capabilities?: string | string[] | null;
|
|
50
|
+
aiMetadataJson?: string | null;
|
|
51
|
+
} | null | undefined): boolean;
|
|
52
|
+
|
|
53
|
+
/** Intent payload used to discover a voice capability. */
|
|
54
|
+
interface AXPVoiceCapabilityIntent {
|
|
55
|
+
text?: string;
|
|
56
|
+
context?: Record<string, unknown>;
|
|
57
|
+
}
|
|
58
|
+
/** Spoken / display prompt returned by interview-style capabilities. */
|
|
59
|
+
interface AXPVoicePrompt {
|
|
60
|
+
sessionId: string;
|
|
61
|
+
spokenPrompt: string;
|
|
62
|
+
titleText?: string;
|
|
63
|
+
answerKey?: string;
|
|
64
|
+
widgetKind?: string;
|
|
65
|
+
options?: Array<{
|
|
66
|
+
id: string;
|
|
67
|
+
label: string;
|
|
68
|
+
}>;
|
|
69
|
+
isRequired?: boolean;
|
|
70
|
+
allowSkip?: boolean;
|
|
71
|
+
comment?: {
|
|
72
|
+
enabled: boolean;
|
|
73
|
+
required: boolean;
|
|
74
|
+
};
|
|
75
|
+
progress?: {
|
|
76
|
+
answered: number;
|
|
77
|
+
totalVisible: number;
|
|
78
|
+
};
|
|
79
|
+
captureStrategy?: 'voice' | 'micro-capture' | 'unsupported';
|
|
80
|
+
}
|
|
81
|
+
type AXPVoiceNextPromptResult = AXPVoicePrompt | {
|
|
82
|
+
done: true;
|
|
83
|
+
sessionId: string;
|
|
84
|
+
spokenPrompt: string;
|
|
85
|
+
};
|
|
86
|
+
interface AXPVoiceApplyResult {
|
|
87
|
+
ok: boolean;
|
|
88
|
+
sessionId: string;
|
|
89
|
+
errorCode?: string;
|
|
90
|
+
spokenMessage?: string;
|
|
91
|
+
requiresConfirmation?: boolean;
|
|
92
|
+
next?: AXPVoiceNextPromptResult;
|
|
93
|
+
}
|
|
94
|
+
interface AXPVoiceSubmitResult {
|
|
95
|
+
ok: boolean;
|
|
96
|
+
sessionId?: string;
|
|
97
|
+
spokenMessage?: string;
|
|
98
|
+
errors?: Array<{
|
|
99
|
+
answerKey: string;
|
|
100
|
+
message: string;
|
|
101
|
+
}>;
|
|
102
|
+
}
|
|
103
|
+
interface AXPVoiceSaveDraftResult {
|
|
104
|
+
sessionId: string;
|
|
105
|
+
spokenMessage?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Platform port implemented by domain modules (assessment is the first).
|
|
109
|
+
* The voice shell talks only to this interface — never to viewer internals.
|
|
110
|
+
*/
|
|
111
|
+
interface AXPVoiceCapabilityProvider {
|
|
112
|
+
readonly id: string;
|
|
113
|
+
readonly titleKey: string;
|
|
114
|
+
canHandle(intent: AXPVoiceCapabilityIntent): boolean | Promise<boolean>;
|
|
115
|
+
startSession(input: unknown): Promise<{
|
|
116
|
+
sessionId: string;
|
|
117
|
+
spokenPrompt?: string;
|
|
118
|
+
}>;
|
|
119
|
+
nextPrompt?(sessionId: string): Promise<AXPVoiceNextPromptResult>;
|
|
120
|
+
applyInput?(sessionId: string, input: unknown): Promise<AXPVoiceApplyResult>;
|
|
121
|
+
saveDraft?(sessionId: string): Promise<AXPVoiceSaveDraftResult | void>;
|
|
122
|
+
submit?(sessionId: string): Promise<AXPVoiceSubmitResult>;
|
|
123
|
+
cancel?(sessionId: string): Promise<void>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Primary interaction mode of the central voice command shell. */
|
|
127
|
+
type AXPVoiceShellMode = 'command' | 'interview' | 'confirm' | 'capture';
|
|
128
|
+
/** Visual / animation state of the void dialog. */
|
|
129
|
+
type AXPVoiceShellUiState = 'idle' | 'listening' | 'thinking' | 'speaking' | 'confirm' | 'error' | 'capture';
|
|
130
|
+
interface AXPVoiceShellConfirmRequest {
|
|
131
|
+
prompt: string;
|
|
132
|
+
confirmLabelKey?: string;
|
|
133
|
+
cancelLabelKey?: string;
|
|
134
|
+
}
|
|
135
|
+
interface AXPVoiceShellOpenOptions {
|
|
136
|
+
/** Optional spoken or typed kickoff utterance. */
|
|
137
|
+
initialText?: string;
|
|
138
|
+
/** Skip discovery and start this capability (e.g. assessment interview). */
|
|
139
|
+
capabilityId?: string;
|
|
140
|
+
/** Domain start payload forwarded to {@link AXPVoiceCapabilityProvider.startSession}. */
|
|
141
|
+
startInput?: unknown;
|
|
142
|
+
}
|
|
143
|
+
interface AXPVoiceShellTranscriptTurn {
|
|
144
|
+
role: 'user' | 'assistant';
|
|
145
|
+
text: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** Speech-to-text result from the interaction transport. */
|
|
149
|
+
interface AXPVoiceSttResult {
|
|
150
|
+
text: string;
|
|
151
|
+
}
|
|
152
|
+
/** Text-to-speech result from the interaction transport. */
|
|
153
|
+
interface AXPVoiceTtsResult {
|
|
154
|
+
fileId?: string;
|
|
155
|
+
objectUrl?: string;
|
|
156
|
+
text: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Swappable interaction channel (v1 HTTP+SSE / commands; later realtime or WebRTC).
|
|
160
|
+
* Domain APIs stay transport-agnostic.
|
|
161
|
+
*/
|
|
162
|
+
interface AXPVoiceInteractionTransport {
|
|
163
|
+
readonly id: string;
|
|
164
|
+
transcribe(audio: Blob, options?: {
|
|
165
|
+
language?: string;
|
|
166
|
+
}): Promise<AXPVoiceSttResult>;
|
|
167
|
+
synthesize(text: string): Promise<AXPVoiceTtsResult>;
|
|
168
|
+
runAssist?(prompt: string, context?: Record<string, unknown>): Promise<{
|
|
169
|
+
text: string;
|
|
170
|
+
}>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** Runtime command that opens the central voice void dialog. */
|
|
174
|
+
declare const AXE_AI_VOICE_SHELL_OPEN_COMMAND: "AiVoiceShell:Open";
|
|
175
|
+
/** Assessment interview capability id (registered by assessment-management). */
|
|
176
|
+
declare const AXE_ASSESSMENT_QUESTIONNAIRE_VOICE_CAPABILITY_ID: "assessment-questionnaire-interview";
|
|
177
|
+
declare const ASSESSMENT_FIND_CASE_FOR_VOICE_FILL_COMMAND: "Assessment:FindCaseForVoiceFill";
|
|
178
|
+
declare const ASSESSMENT_START_HEADLESS_QUESTIONNAIRE_COMMAND: "Assessment:StartHeadlessQuestionnaire";
|
|
179
|
+
declare const ASSESSMENT_NEXT_QUESTIONNAIRE_QUESTION_COMMAND: "Assessment:NextQuestionnaireQuestion";
|
|
180
|
+
declare const ASSESSMENT_APPLY_QUESTIONNAIRE_ANSWER_COMMAND: "Assessment:ApplyQuestionnaireAnswer";
|
|
181
|
+
declare const ASSESSMENT_SAVE_QUESTIONNAIRE_DRAFT_COMMAND: "Assessment:SaveQuestionnaireDraft";
|
|
182
|
+
declare const ASSESSMENT_SUBMIT_QUESTIONNAIRE_COMMAND: "Assessment:SubmitQuestionnaire";
|
|
183
|
+
declare const ASSESSMENT_CANCEL_QUESTIONNAIRE_COMMAND: "Assessment:CancelQuestionnaire";
|
|
184
|
+
|
|
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 };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import * as i1 from '@acorex-platform/module-ai-management-client';
|
|
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';
|
|
6
|
+
import { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
7
|
+
import { AXBasePageComponent } from '@acorex/components/page';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Central voice AI command shell (void dialog + capability registry + HTTP/SSE transport).
|
|
11
|
+
* Register next to {@link AXMAiManagementModule}. Domain modules register {@link AXP_VOICE_CAPABILITY_PROVIDER}.
|
|
12
|
+
*/
|
|
13
|
+
declare class AXEAiVoiceShellExtensionModule {
|
|
14
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXEAiVoiceShellExtensionModule, never>;
|
|
15
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXEAiVoiceShellExtensionModule, never, [typeof i1.AXMAiManagementModule, typeof i2.AXPComponentSlotModule], never>;
|
|
16
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXEAiVoiceShellExtensionModule>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Multi-provider token for domain voice capabilities (assessment, later others). */
|
|
20
|
+
declare const AXP_VOICE_CAPABILITY_PROVIDER: InjectionToken<AXPVoiceCapabilityProvider>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Discovers module-owned {@link AXPVoiceCapabilityProvider} implementations.
|
|
24
|
+
* The shell never imports domain internals.
|
|
25
|
+
*/
|
|
26
|
+
declare class AXPVoiceCapabilityRegistry {
|
|
27
|
+
private readonly providers;
|
|
28
|
+
list(): AXPVoiceCapabilityProvider[];
|
|
29
|
+
getById(id: string): AXPVoiceCapabilityProvider | undefined;
|
|
30
|
+
findForIntent(intent: AXPVoiceCapabilityIntent): Promise<AXPVoiceCapabilityProvider | undefined>;
|
|
31
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPVoiceCapabilityRegistry, never>;
|
|
32
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPVoiceCapabilityRegistry>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Session coordinator for the central voice void dialog.
|
|
37
|
+
* Does not import assessment internals — only the capability registry and transport.
|
|
38
|
+
*/
|
|
39
|
+
declare class AXPVoiceCommandShellService {
|
|
40
|
+
private readonly popupService;
|
|
41
|
+
private readonly translation;
|
|
42
|
+
private readonly registry;
|
|
43
|
+
private readonly transport;
|
|
44
|
+
readonly uiState: _angular_core.WritableSignal<AXPVoiceShellUiState>;
|
|
45
|
+
readonly mode: _angular_core.WritableSignal<AXPVoiceShellMode>;
|
|
46
|
+
readonly statusText: _angular_core.WritableSignal<string>;
|
|
47
|
+
readonly lastTranscript: _angular_core.WritableSignal<string>;
|
|
48
|
+
readonly lastSpoken: _angular_core.WritableSignal<string>;
|
|
49
|
+
readonly errorMessage: _angular_core.WritableSignal<string>;
|
|
50
|
+
readonly confirmRequest: _angular_core.WritableSignal<AXPVoiceShellConfirmRequest | null>;
|
|
51
|
+
readonly turns: _angular_core.WritableSignal<AXPVoiceShellTranscriptTurn[]>;
|
|
52
|
+
readonly interviewProgress: _angular_core.WritableSignal<{
|
|
53
|
+
answered: number;
|
|
54
|
+
totalVisible: number;
|
|
55
|
+
} | null>;
|
|
56
|
+
private activeCapability;
|
|
57
|
+
private activeSessionId;
|
|
58
|
+
private pendingSpokenConfirm;
|
|
59
|
+
private currentAudio;
|
|
60
|
+
private currentObjectUrl;
|
|
61
|
+
private openPromise;
|
|
62
|
+
open(options?: AXPVoiceShellOpenOptions): Promise<void>;
|
|
63
|
+
enterListening(): Promise<void>;
|
|
64
|
+
cancelListening(): Promise<void>;
|
|
65
|
+
reportError(key: string, detail?: string): Promise<void>;
|
|
66
|
+
submitRecording(audio: Blob): Promise<void>;
|
|
67
|
+
handleUserText(text: string): Promise<void>;
|
|
68
|
+
confirmYes(): Promise<void>;
|
|
69
|
+
confirmNo(): Promise<void>;
|
|
70
|
+
saveInterviewDraft(): Promise<void>;
|
|
71
|
+
cancelInterview(): Promise<void>;
|
|
72
|
+
stopPlayback(): void;
|
|
73
|
+
private beginCapabilitySession;
|
|
74
|
+
private speakNextPrompt;
|
|
75
|
+
private handleNextPrompt;
|
|
76
|
+
private applyInterviewUtterance;
|
|
77
|
+
private enterSubmitConfirm;
|
|
78
|
+
private handleConfirmUtterance;
|
|
79
|
+
private submitInterview;
|
|
80
|
+
private runCommandAssist;
|
|
81
|
+
private speak;
|
|
82
|
+
private finishSpeaking;
|
|
83
|
+
private playObjectUrl;
|
|
84
|
+
private setError;
|
|
85
|
+
private appendTurn;
|
|
86
|
+
private resetSession;
|
|
87
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPVoiceCommandShellService, never>;
|
|
88
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPVoiceCommandShellService>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* v1 interaction transport: existing AI HTTP commands + assist `run` (SSE under the hood).
|
|
93
|
+
*/
|
|
94
|
+
declare class AXPHttpSseVoiceTransport implements AXPVoiceInteractionTransport {
|
|
95
|
+
readonly id = "http-sse";
|
|
96
|
+
private readonly commandService;
|
|
97
|
+
private readonly fileStorage;
|
|
98
|
+
private readonly entityService;
|
|
99
|
+
private readonly chatToolRunContext;
|
|
100
|
+
private readonly runtimeContextBuilder;
|
|
101
|
+
private readonly aiManager;
|
|
102
|
+
transcribe(audio: Blob, options?: {
|
|
103
|
+
language?: string;
|
|
104
|
+
}): Promise<AXPVoiceSttResult>;
|
|
105
|
+
synthesize(text: string): Promise<AXPVoiceTtsResult>;
|
|
106
|
+
runAssist(prompt: string, context?: Record<string, unknown>): Promise<{
|
|
107
|
+
text: string;
|
|
108
|
+
}>;
|
|
109
|
+
private requireAiManager;
|
|
110
|
+
private findAgentIdByName;
|
|
111
|
+
private resolveUiLocale;
|
|
112
|
+
private commandFailureI18nKey;
|
|
113
|
+
private localeToTranscriptionLanguage;
|
|
114
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPHttpSseVoiceTransport, never>;
|
|
115
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPHttpSseVoiceTransport>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
interface AXEAiVoiceShellOpenCommandInput {
|
|
119
|
+
initialText?: string;
|
|
120
|
+
capabilityId?: string;
|
|
121
|
+
caseId?: string;
|
|
122
|
+
sessionId?: string;
|
|
123
|
+
}
|
|
124
|
+
declare class AXEAiVoiceShellOpenCommand implements AXPCommand<AXEAiVoiceShellOpenCommandInput, void> {
|
|
125
|
+
private readonly shell;
|
|
126
|
+
execute(input: AXEAiVoiceShellOpenCommandInput): AXPCommandExecuteResultPromise<void>;
|
|
127
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXEAiVoiceShellOpenCommand, never>;
|
|
128
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXEAiVoiceShellOpenCommand>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare class AXEAiVoiceVoidDialogComponent extends AXBasePageComponent {
|
|
132
|
+
readonly shell: AXPVoiceCommandShellService;
|
|
133
|
+
private readonly platformId;
|
|
134
|
+
private readonly destroyRef;
|
|
135
|
+
private mediaRecorder?;
|
|
136
|
+
private audioChunks;
|
|
137
|
+
private activeStream?;
|
|
138
|
+
readonly orbClass: _angular_core.Signal<string>;
|
|
139
|
+
readonly orbWrapClass: _angular_core.Signal<string>;
|
|
140
|
+
readonly canListen: _angular_core.Signal<boolean>;
|
|
141
|
+
readonly isListening: _angular_core.Signal<boolean>;
|
|
142
|
+
readonly isSpeaking: _angular_core.Signal<boolean>;
|
|
143
|
+
readonly showConfirm: _angular_core.Signal<boolean>;
|
|
144
|
+
readonly progressLabel: _angular_core.Signal<string>;
|
|
145
|
+
constructor();
|
|
146
|
+
onMicClick(): Promise<void>;
|
|
147
|
+
onCancelListen(): Promise<void>;
|
|
148
|
+
onConfirmYes(): Promise<void>;
|
|
149
|
+
onConfirmNo(): Promise<void>;
|
|
150
|
+
onSaveDraft(): Promise<void>;
|
|
151
|
+
onCancelInterview(): Promise<void>;
|
|
152
|
+
private startRecording;
|
|
153
|
+
private stopAndSubmit;
|
|
154
|
+
private stopTracks;
|
|
155
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXEAiVoiceVoidDialogComponent, never>;
|
|
156
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXEAiVoiceVoidDialogComponent, "axe-ai-voice-void-dialog", never, {}, {}, never, never, true, never>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Dedicated chord — Ctrl+K remains global search. */
|
|
160
|
+
declare const AXE_AI_VOICE_SHELL_SHORTCUT = "ctrl+shift+space";
|
|
161
|
+
/**
|
|
162
|
+
* Header mic next to the conversation AI robot. Opens the voice command shell.
|
|
163
|
+
*/
|
|
164
|
+
declare class AXEAiVoiceShellHeaderSlotComponent {
|
|
165
|
+
private readonly commandExecutor;
|
|
166
|
+
private readonly shortcutRegistry;
|
|
167
|
+
private readonly destroyRef;
|
|
168
|
+
protected readonly shortcutDisplay: string;
|
|
169
|
+
constructor();
|
|
170
|
+
protected openVoiceCommand(): Promise<void>;
|
|
171
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXEAiVoiceShellHeaderSlotComponent, never>;
|
|
172
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXEAiVoiceShellHeaderSlotComponent, "axe-ai-voice-shell-header-slot", never, {}, {}, never, never, true, never>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export { AXEAiVoiceShellExtensionModule, AXEAiVoiceShellHeaderSlotComponent, AXEAiVoiceShellOpenCommand, AXEAiVoiceVoidDialogComponent, AXE_AI_VOICE_SHELL_SHORTCUT, AXPHttpSseVoiceTransport, AXPVoiceCapabilityRegistry, AXPVoiceCommandShellService, AXP_VOICE_CAPABILITY_PROVIDER };
|
|
176
|
+
export type { AXEAiVoiceShellOpenCommandInput };
|