@absolutejs/voice 0.0.22-beta.55 → 0.0.22-beta.551
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/README.md +4528 -1070
- package/dist/angular/index.d.ts +36 -5
- package/dist/angular/index.js +4189 -390
- package/dist/angular/voice-agent-squad-status.service.d.ts +12 -0
- package/dist/angular/voice-call-debugger.service.d.ts +12 -0
- package/dist/angular/voice-call-player.service.d.ts +19 -0
- package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
- package/dist/angular/voice-controller.service.d.ts +3 -1
- package/dist/angular/voice-cost-dashboard.service.d.ts +15 -0
- package/dist/angular/voice-delivery-runtime.service.d.ts +16 -0
- package/dist/angular/voice-live-agent-console.service.d.ts +16 -0
- package/dist/angular/voice-live-call-viewer.service.d.ts +16 -0
- package/dist/angular/voice-live-ops.service.d.ts +11 -0
- package/dist/angular/voice-ops-action-center.service.d.ts +13 -0
- package/dist/angular/voice-ops-status.service.d.ts +12 -0
- package/dist/angular/voice-platform-coverage.service.d.ts +12 -0
- package/dist/angular/voice-profile-comparison.service.d.ts +12 -0
- package/dist/angular/voice-proof-trends.service.d.ts +12 -0
- package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
- package/dist/angular/voice-provider-contracts.service.d.ts +12 -0
- package/dist/angular/voice-provider-status.service.d.ts +2 -2
- package/dist/angular/voice-readiness-failures.service.d.ts +13 -0
- package/dist/angular/voice-reconnect-profile-evidence.service.d.ts +12 -0
- package/dist/angular/voice-replay-timeline.service.d.ts +13 -0
- package/dist/angular/voice-routing-status.service.d.ts +11 -0
- package/dist/angular/voice-session-observability.service.d.ts +12 -0
- package/dist/angular/voice-session-snapshot.service.d.ts +13 -0
- package/dist/angular/voice-stream.service.d.ts +4 -1
- package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
- package/dist/angular/voice-turn-latency.service.d.ts +13 -0
- package/dist/angular/voice-turn-quality.service.d.ts +12 -0
- package/dist/angular/voice-widget.service.d.ts +18 -0
- package/dist/angular/voice-workflow-status.service.d.ts +2 -2
- package/dist/client/actions.d.ts +95 -1
- package/dist/client/agentSquadStatus.d.ts +37 -0
- package/dist/client/agentSquadStatusWidget.d.ts +24 -0
- package/dist/client/audioPlayer.d.ts +2 -2
- package/dist/client/bargeInMonitor.d.ts +7 -0
- package/dist/client/browserMedia.d.ts +8 -0
- package/dist/client/browserNoiseSuppression.d.ts +42 -0
- package/dist/client/browserVoiceSupport.d.ts +22 -0
- package/dist/client/callDebugger.d.ts +21 -0
- package/dist/client/callDebuggerWidget.d.ts +30 -0
- package/dist/client/callPlayer.d.ts +41 -0
- package/dist/client/campaignDialerProof.d.ts +25 -0
- package/dist/client/connection.d.ts +4 -3
- package/dist/client/controller.d.ts +1 -1
- package/dist/client/conversationAnalytics.d.ts +30 -0
- package/dist/client/costDashboard.d.ts +27 -0
- package/dist/client/createVoiceStream.d.ts +1 -1
- package/dist/client/deliveryRuntime.d.ts +36 -0
- package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
- package/dist/client/duplex.d.ts +2 -2
- package/dist/client/htmx.d.ts +1 -1
- package/dist/client/htmxAttributes.d.ts +24 -0
- package/dist/client/htmxBootstrap.js +1029 -73
- package/dist/client/htmxDashboardRenderers.d.ts +71 -0
- package/dist/client/index.d.ts +106 -15
- package/dist/client/index.js +10520 -279
- package/dist/client/liveAgentConsole.d.ts +28 -0
- package/dist/client/liveCallViewer.d.ts +42 -0
- package/dist/client/liveOps.d.ts +22 -0
- package/dist/client/liveOpsWidget.d.ts +23 -0
- package/dist/client/liveTurnLatency.d.ts +41 -0
- package/dist/client/microphone.d.ts +4 -4
- package/dist/client/opsActionCenter.d.ts +56 -0
- package/dist/client/opsActionCenterWidget.d.ts +29 -0
- package/dist/client/opsActionHistory.d.ts +21 -0
- package/dist/client/opsActionHistoryWidget.d.ts +11 -0
- package/dist/client/opsStatus.d.ts +21 -0
- package/dist/client/opsStatusWidget.d.ts +10 -10
- package/dist/client/platformCoverage.d.ts +21 -0
- package/dist/client/platformCoverageWidget.d.ts +38 -0
- package/dist/client/profileComparison.d.ts +21 -0
- package/dist/client/profileComparisonWidget.d.ts +41 -0
- package/dist/client/profileSwitchRecommendation.d.ts +21 -0
- package/dist/client/profileSwitchRecommendationWidget.d.ts +12 -0
- package/dist/client/proofTrends.d.ts +21 -0
- package/dist/client/proofTrendsWidget.d.ts +38 -0
- package/dist/client/providerCapabilities.d.ts +21 -0
- package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
- package/dist/client/providerContracts.d.ts +21 -0
- package/dist/client/providerContractsWidget.d.ts +37 -0
- package/dist/client/providerSimulationControls.d.ts +33 -0
- package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
- package/dist/client/providerStatus.d.ts +5 -3
- package/dist/client/providerStatusWidget.d.ts +32 -0
- package/dist/client/reactiveSource.d.ts +8 -0
- package/dist/client/readinessFailures.d.ts +21 -0
- package/dist/client/readinessFailuresWidget.d.ts +42 -0
- package/dist/client/reconnectProfileEvidence.d.ts +21 -0
- package/dist/client/reconnectProfileEvidenceWidget.d.ts +39 -0
- package/dist/client/replayTimeline.d.ts +26 -0
- package/dist/client/routingStatus.d.ts +21 -0
- package/dist/client/routingStatusWidget.d.ts +32 -0
- package/dist/client/sessionObservability.d.ts +21 -0
- package/dist/client/sessionObservabilityWidget.d.ts +31 -0
- package/dist/client/sessionSnapshot.d.ts +23 -0
- package/dist/client/sessionSnapshotWidget.d.ts +33 -0
- package/dist/client/store.d.ts +1 -1
- package/dist/client/traceTimeline.d.ts +21 -0
- package/dist/client/traceTimelineWidget.d.ts +36 -0
- package/dist/client/turnLatency.d.ts +24 -0
- package/dist/client/turnLatencyWidget.d.ts +33 -0
- package/dist/client/turnQuality.d.ts +21 -0
- package/dist/client/turnQualityWidget.d.ts +32 -0
- package/dist/client/voiceWidgetView.d.ts +48 -0
- package/dist/client/workflowStatus.d.ts +5 -3
- package/dist/{agent.d.ts → core/agent.d.ts} +83 -6
- package/dist/core/agentPerformanceReport.d.ts +40 -0
- package/dist/core/agentSquadContract.d.ts +98 -0
- package/dist/core/agentState.d.ts +12 -0
- package/dist/core/agentTools.d.ts +132 -0
- package/dist/core/aiScorecard.d.ts +32 -0
- package/dist/core/aiVoiceModel.d.ts +15 -0
- package/dist/core/amdDetector.d.ts +25 -0
- package/dist/{assistant.d.ts → core/assistant.d.ts} +14 -14
- package/dist/core/assistantExperiment.d.ts +42 -0
- package/dist/{assistantHealth.d.ts → core/assistantHealth.d.ts} +9 -9
- package/dist/{assistantMemory.d.ts → core/assistantMemory.d.ts} +10 -10
- package/dist/core/assistantMode.d.ts +22 -0
- package/dist/{audioConditioning.d.ts → core/audioConditioning.d.ts} +2 -2
- package/dist/core/audit.d.ts +131 -0
- package/dist/core/auditDeliveryRoutes.d.ts +85 -0
- package/dist/core/auditExport.d.ts +34 -0
- package/dist/core/auditRoutes.d.ts +66 -0
- package/dist/core/auditSinks.d.ts +151 -0
- package/dist/core/backchannel.d.ts +18 -0
- package/dist/core/bargeInRoutes.d.ts +56 -0
- package/dist/core/bookingFlow.d.ts +43 -0
- package/dist/core/browserCallProfiles.d.ts +120 -0
- package/dist/core/browserMediaRoutes.d.ts +62 -0
- package/dist/core/cachedTTS.d.ts +30 -0
- package/dist/core/calendarAdapter.d.ts +47 -0
- package/dist/core/calendarSlots.d.ts +35 -0
- package/dist/core/callDebugger.d.ts +66 -0
- package/dist/core/callDisposition.d.ts +38 -0
- package/dist/core/callQuota.d.ts +54 -0
- package/dist/core/callScorecard.d.ts +53 -0
- package/dist/core/callerCRMLinker.d.ts +29 -0
- package/dist/core/callerMemory.d.ts +37 -0
- package/dist/core/callingWindow.d.ts +26 -0
- package/dist/core/campaign.d.ts +795 -0
- package/dist/core/campaignControls.d.ts +37 -0
- package/dist/core/campaignDialers.d.ts +111 -0
- package/dist/core/campaignTemplate.d.ts +16 -0
- package/dist/core/competitiveCoverage.d.ts +141 -0
- package/dist/core/conversationSimulator.d.ts +73 -0
- package/dist/{correction.d.ts → core/correction.d.ts} +5 -4
- package/dist/core/costAccounting.d.ts +76 -0
- package/dist/core/costPredictor.d.ts +74 -0
- package/dist/core/crmCallLogger.d.ts +37 -0
- package/dist/core/crmContract.d.ts +70 -0
- package/dist/core/dataControl.d.ts +180 -0
- package/dist/core/defineVoiceAssistant.d.ts +68 -0
- package/dist/core/deliveryRuntime.d.ts +159 -0
- package/dist/core/deliverySinkRoutes.d.ts +117 -0
- package/dist/core/demoReadyRoutes.d.ts +98 -0
- package/dist/{diagnosticsRoutes.d.ts → core/diagnosticsRoutes.d.ts} +2 -2
- package/dist/core/dncRegistry.d.ts +38 -0
- package/dist/core/dtmfCollector.d.ts +37 -0
- package/dist/{evalRoutes.d.ts → core/evalRoutes.d.ts} +26 -20
- package/dist/{fileStore.d.ts → core/fileStore.d.ts} +34 -20
- package/dist/core/guardrails.d.ts +128 -0
- package/dist/{handoff.d.ts → core/handoff.d.ts} +10 -10
- package/dist/{handoffHealth.d.ts → core/handoffHealth.d.ts} +9 -9
- package/dist/core/holdAudio.d.ts +23 -0
- package/dist/{htmx.d.ts → core/htmx.d.ts} +2 -2
- package/dist/core/htmxDashboardRoutes.d.ts +250 -0
- package/dist/core/iceServers.d.ts +34 -0
- package/dist/core/incidentBundle.d.ts +119 -0
- package/dist/core/incidentTimeline.d.ts +260 -0
- package/dist/core/ivrPlan.d.ts +40 -0
- package/dist/core/latencySlo.d.ts +56 -0
- package/dist/core/liveCoach.d.ts +43 -0
- package/dist/core/liveLatency.d.ts +78 -0
- package/dist/core/liveOps.d.ts +190 -0
- package/dist/core/llmJudge.d.ts +45 -0
- package/dist/{logger.d.ts → core/logger.d.ts} +1 -2
- package/dist/core/mcpToolset.d.ts +58 -0
- package/dist/core/mediaPipelineRoutes.d.ts +171 -0
- package/dist/core/mediaPipelineSurfaces.d.ts +48 -0
- package/dist/{memoryStore.d.ts → core/memoryStore.d.ts} +1 -1
- package/dist/core/midCallSummary.d.ts +27 -0
- package/dist/{modelAdapters.d.ts → core/modelAdapters.d.ts} +59 -7
- package/dist/core/monitor.d.ts +148 -0
- package/dist/core/multilingualProof.d.ts +77 -0
- package/dist/core/noShowPredictor.d.ts +46 -0
- package/dist/core/oauth2TokenSource.d.ts +21 -0
- package/dist/core/observabilityExport.d.ts +501 -0
- package/dist/core/openaiTTS.d.ts +18 -0
- package/dist/core/operationalStatus.d.ts +87 -0
- package/dist/core/operationsRecord.d.ts +371 -0
- package/dist/{ops.d.ts → core/ops.d.ts} +70 -70
- package/dist/core/opsActionAuditRoutes.d.ts +99 -0
- package/dist/{opsConsoleRoutes.d.ts → core/opsConsoleRoutes.d.ts} +11 -8
- package/dist/{opsPresets.d.ts → core/opsPresets.d.ts} +2 -2
- package/dist/core/opsRecovery.d.ts +137 -0
- package/dist/{opsRuntime.d.ts → core/opsRuntime.d.ts} +6 -6
- package/dist/{opsSinks.d.ts → core/opsSinks.d.ts} +19 -19
- package/dist/core/opsStatus.d.ts +76 -0
- package/dist/core/opsStatusRoutes.d.ts +33 -0
- package/dist/{opsWebhook.d.ts → core/opsWebhook.d.ts} +15 -15
- package/dist/core/otelExporter.d.ts +83 -0
- package/dist/core/outcomeContract.d.ts +146 -0
- package/dist/{outcomeRecipes.d.ts → core/outcomeRecipes.d.ts} +4 -4
- package/dist/core/pathway.d.ts +94 -0
- package/dist/core/pathwayCompiler.d.ts +31 -0
- package/dist/core/pathwayGenerator.d.ts +27 -0
- package/dist/core/pathwayRuntime.d.ts +57 -0
- package/dist/core/pathwaySlotCollector.d.ts +29 -0
- package/dist/core/pathwayVisualizer.d.ts +8 -0
- package/dist/core/phoneAgent.d.ts +139 -0
- package/dist/core/phoneAgentProductionSmoke.d.ts +115 -0
- package/dist/core/phoneProvisioning.d.ts +29 -0
- package/dist/core/platformCoverage.d.ts +91 -0
- package/dist/{plugin.d.ts → core/plugin.d.ts} +2 -2
- package/dist/core/postCallAnalysis.d.ts +98 -0
- package/dist/core/postCallSurvey.d.ts +41 -0
- package/dist/{postgresStore.d.ts → core/postgresStore.d.ts} +20 -9
- package/dist/{presets.d.ts → core/presets.d.ts} +3 -3
- package/dist/core/productionReadiness.d.ts +757 -0
- package/dist/core/profileSwitchRecommendation.d.ts +350 -0
- package/dist/core/promptInjectionGuard.d.ts +30 -0
- package/dist/core/proofAssertions.d.ts +32 -0
- package/dist/core/proofPack.d.ts +211 -0
- package/dist/core/proofRunner.d.ts +79 -0
- package/dist/core/proofTrends.d.ts +966 -0
- package/dist/{providerAdapters.d.ts → core/providerAdapters.d.ts} +16 -5
- package/dist/core/providerCapabilities.d.ts +92 -0
- package/dist/core/providerDecisionTraces.d.ts +130 -0
- package/dist/{providerHealth.d.ts → core/providerHealth.d.ts} +15 -5
- package/dist/core/providerOrchestration.d.ts +109 -0
- package/dist/core/providerRouterTraces.d.ts +35 -0
- package/dist/core/providerRoutingContract.d.ts +71 -0
- package/dist/core/providerSlo.d.ts +142 -0
- package/dist/core/providerStackRecommendations.d.ts +188 -0
- package/dist/core/qualityDriftDetector.d.ts +44 -0
- package/dist/{qualityRoutes.d.ts → core/qualityRoutes.d.ts} +7 -7
- package/dist/{queue.d.ts → core/queue.d.ts} +48 -39
- package/dist/core/ragTool.d.ts +52 -0
- package/dist/core/readinessProfiles.d.ts +45 -0
- package/dist/core/realtimeChannel.d.ts +136 -0
- package/dist/core/realtimeProviderContracts.d.ts +133 -0
- package/dist/core/reconnectContract.d.ts +177 -0
- package/dist/core/recordingRedaction.d.ts +47 -0
- package/dist/core/recordingStore.d.ts +60 -0
- package/dist/core/redaction.d.ts +13 -0
- package/dist/core/reminderScheduler.d.ts +43 -0
- package/dist/{resilienceRoutes.d.ts → core/resilienceRoutes.d.ts} +45 -5
- package/dist/core/retention.d.ts +37 -0
- package/dist/core/retryPolicy.d.ts +38 -0
- package/dist/core/routeAuth.d.ts +58 -0
- package/dist/{routing.d.ts → core/routing.d.ts} +2 -2
- package/dist/{runtimeOps.d.ts → core/runtimeOps.d.ts} +3 -3
- package/dist/{s3Store.d.ts → core/s3Store.d.ts} +12 -3
- package/dist/core/scorecardCalibration.d.ts +31 -0
- package/dist/core/scribe.d.ts +50 -0
- package/dist/core/semanticTurn.d.ts +27 -0
- package/dist/{session.d.ts → core/session.d.ts} +1 -1
- package/dist/core/sessionObservability.d.ts +145 -0
- package/dist/{sessionReplay.d.ts → core/sessionReplay.d.ts} +31 -19
- package/dist/core/sessionSnapshot.d.ts +109 -0
- package/dist/core/simulationSuite.d.ts +144 -0
- package/dist/core/sloCalibration.d.ts +185 -0
- package/dist/{sqliteStore.d.ts → core/sqliteStore.d.ts} +20 -9
- package/dist/{store.d.ts → core/store.d.ts} +1 -1
- package/dist/core/supervisorPermissions.d.ts +33 -0
- package/dist/core/supervisorPresence.d.ts +49 -0
- package/dist/core/telephonyMediaRoutes.d.ts +72 -0
- package/dist/core/telephonyOutcome.d.ts +269 -0
- package/dist/core/toolContract.d.ts +161 -0
- package/dist/core/toolRuntime.d.ts +50 -0
- package/dist/{trace.d.ts → core/trace.d.ts} +61 -22
- package/dist/core/traceDeliveryRoutes.d.ts +86 -0
- package/dist/core/traceTimeline.d.ts +97 -0
- package/dist/core/transcriptAnnotator.d.ts +41 -0
- package/dist/{turnDetection.d.ts → core/turnDetection.d.ts} +1 -1
- package/dist/core/turnLatency.d.ts +95 -0
- package/dist/core/turnProfiles.d.ts +3 -0
- package/dist/core/turnQuality.d.ts +94 -0
- package/dist/{types.d.ts → core/types.d.ts} +428 -81
- package/dist/core/vapiAdapter.d.ts +160 -0
- package/dist/core/variableAnalytics.d.ts +47 -0
- package/dist/core/voiceConfiguration.d.ts +8 -0
- package/dist/core/voiceMonitoring.d.ts +444 -0
- package/dist/core/webhookFanout.d.ts +48 -0
- package/dist/core/webhookVerification.d.ts +27 -0
- package/dist/core/whisperChannel.d.ts +50 -0
- package/dist/{workflowContract.d.ts → core/workflowContract.d.ts} +21 -21
- package/dist/core/zeroDataRetention.d.ts +31 -0
- package/dist/drizzle/assistantMemory.d.ts +112 -0
- package/dist/drizzle/eval.d.ts +61 -0
- package/dist/drizzle/handoff.d.ts +62 -0
- package/dist/drizzle/incidentBundle.d.ts +61 -0
- package/dist/drizzle/index.d.ts +1105 -0
- package/dist/drizzle/index.js +3059 -0
- package/dist/drizzle/observabilityExport.d.ts +61 -0
- package/dist/drizzle/proofTrends.d.ts +126 -0
- package/dist/drizzle/runtimeStorage.d.ts +1315 -0
- package/dist/drizzle/shared.d.ts +76 -0
- package/dist/embed/index.d.ts +38 -0
- package/dist/embed/index.js +1710 -0
- package/dist/embed/voice-widget.js +10 -0
- package/dist/index.d.ts +373 -74
- package/dist/index.js +45955 -7234
- package/dist/internal/evidence.d.ts +10 -0
- package/dist/internal/html.d.ts +6 -0
- package/dist/internal/status.d.ts +7 -0
- package/dist/react/VoiceAgentSquadStatus.d.ts +5 -0
- package/dist/react/VoiceCallDebuggerLaunch.d.ts +6 -0
- package/dist/react/VoiceCallPlayer.d.ts +11 -0
- package/dist/react/VoiceCostDashboard.d.ts +10 -0
- package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
- package/dist/react/VoiceLiveAgentConsole.d.ts +11 -0
- package/dist/react/VoiceLiveCallViewer.d.ts +9 -0
- package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
- package/dist/react/VoiceOpsStatus.d.ts +1 -1
- package/dist/react/VoicePlatformCoverage.d.ts +6 -0
- package/dist/react/VoiceProfileComparison.d.ts +6 -0
- package/dist/react/VoiceProfileSwitchRecommendation.d.ts +6 -0
- package/dist/react/VoiceProofTrends.d.ts +6 -0
- package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
- package/dist/react/VoiceProviderContracts.d.ts +6 -0
- package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
- package/dist/react/VoiceProviderStatus.d.ts +6 -0
- package/dist/react/VoiceReadinessFailures.d.ts +6 -0
- package/dist/react/VoiceReconnectProfileEvidence.d.ts +6 -0
- package/dist/react/VoiceReplayTimeline.d.ts +6 -0
- package/dist/react/VoiceRoutingStatus.d.ts +6 -0
- package/dist/react/VoiceSessionObservability.d.ts +6 -0
- package/dist/react/VoiceSessionSnapshot.d.ts +6 -0
- package/dist/react/VoiceTraceTimeline.d.ts +6 -0
- package/dist/react/VoiceTurnLatency.d.ts +6 -0
- package/dist/react/VoiceTurnQuality.d.ts +6 -0
- package/dist/react/VoiceWidget.d.ts +13 -0
- package/dist/react/index.d.ts +80 -6
- package/dist/react/index.js +12925 -319
- package/dist/react/useVoiceAgentSquadStatus.d.ts +8 -0
- package/dist/react/useVoiceCallDebugger.d.ts +8 -0
- package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
- package/dist/react/useVoiceController.d.ts +4 -1
- package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/react/useVoiceLiveOps.d.ts +9 -0
- package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/react/useVoiceOpsStatus.d.ts +8 -0
- package/dist/react/useVoicePlatformCoverage.d.ts +8 -0
- package/dist/react/useVoiceProfileComparison.d.ts +8 -0
- package/dist/react/useVoiceProfileSwitchRecommendation.d.ts +8 -0
- package/dist/react/useVoiceProofTrends.d.ts +8 -0
- package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
- package/dist/react/useVoiceProviderContracts.d.ts +8 -0
- package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
- package/dist/react/useVoiceProviderStatus.d.ts +1 -1
- package/dist/react/useVoiceReadinessFailures.d.ts +8 -0
- package/dist/react/useVoiceReconnectProfileEvidence.d.ts +8 -0
- package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/react/useVoiceSessionObservability.d.ts +8 -0
- package/dist/react/useVoiceSessionSnapshot.d.ts +9 -0
- package/dist/react/useVoiceStream.d.ts +4 -1
- package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
- package/dist/react/useVoiceTurnLatency.d.ts +9 -0
- package/dist/react/useVoiceTurnQuality.d.ts +8 -0
- package/dist/react/useVoiceWorkflowStatus.d.ts +1 -1
- package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
- package/dist/svelte/createVoiceCallDebugger.d.ts +10 -0
- package/dist/svelte/createVoiceCallPlayer.d.ts +33 -0
- package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
- package/dist/svelte/createVoiceCostDashboard.d.ts +13 -0
- package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
- package/dist/svelte/createVoiceLiveAgentConsole.d.ts +23 -0
- package/dist/svelte/createVoiceLiveCallViewer.d.ts +26 -0
- package/dist/svelte/createVoiceLiveOps.d.ts +13 -0
- package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
- package/dist/svelte/createVoiceOpsStatus.d.ts +4 -4
- package/dist/svelte/createVoicePlatformCoverage.d.ts +7 -0
- package/dist/svelte/createVoiceProfileComparison.d.ts +7 -0
- package/dist/svelte/createVoiceProofTrends.d.ts +7 -0
- package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
- package/dist/svelte/createVoiceProviderContracts.d.ts +10 -0
- package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
- package/dist/svelte/createVoiceProviderStatus.d.ts +5 -3
- package/dist/svelte/createVoiceReadinessFailures.d.ts +7 -0
- package/dist/svelte/createVoiceReconnectProfileEvidence.d.ts +7 -0
- package/dist/svelte/createVoiceReplayTimeline.d.ts +13 -0
- package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
- package/dist/svelte/createVoiceSessionObservability.d.ts +10 -0
- package/dist/svelte/createVoiceSessionSnapshot.d.ts +11 -0
- package/dist/svelte/createVoiceStream.d.ts +1 -1
- package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
- package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
- package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
- package/dist/svelte/createVoiceWidget.d.ts +19 -0
- package/dist/svelte/createVoiceWorkflowStatus.d.ts +2 -2
- package/dist/svelte/index.d.ts +37 -6
- package/dist/svelte/index.js +7067 -768
- package/dist/telephony/contract.d.ts +61 -0
- package/dist/telephony/matrix.d.ts +97 -0
- package/dist/telephony/plivo.d.ts +303 -0
- package/dist/telephony/response.d.ts +1 -1
- package/dist/telephony/security.d.ts +182 -0
- package/dist/telephony/telnyx.d.ts +291 -0
- package/dist/telephony/twilio.d.ts +173 -15
- package/dist/testing/accuracy.d.ts +1 -1
- package/dist/testing/benchmark.d.ts +15 -15
- package/dist/testing/corrected.d.ts +9 -9
- package/dist/testing/duplex.d.ts +5 -5
- package/dist/testing/fixtures.d.ts +4 -4
- package/dist/testing/index.d.ts +13 -13
- package/dist/testing/index.js +6141 -874
- package/dist/testing/ioProviderSimulator.d.ts +5 -5
- package/dist/testing/providerSimulator.d.ts +5 -5
- package/dist/testing/review.d.ts +8 -8
- package/dist/testing/sessionBenchmark.d.ts +13 -13
- package/dist/testing/stt.d.ts +3 -3
- package/dist/testing/telephony.d.ts +27 -2
- package/dist/testing/tts.d.ts +2 -2
- package/dist/vue/VoiceCallDebuggerLaunch.d.ts +72 -0
- package/dist/vue/VoiceCallPlayer.d.ts +40 -0
- package/dist/vue/VoiceCostDashboard.d.ts +57 -0
- package/dist/vue/VoiceDeliveryRuntime.d.ts +34 -0
- package/dist/vue/VoiceLiveAgentConsole.d.ts +50 -0
- package/dist/vue/VoiceLiveCallViewer.d.ts +35 -0
- package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
- package/dist/vue/VoiceOpsStatus.d.ts +4 -0
- package/dist/vue/VoicePlatformCoverage.d.ts +27 -0
- package/dist/vue/VoiceProofTrends.d.ts +25 -0
- package/dist/vue/VoiceProviderCapabilities.d.ts +55 -0
- package/dist/vue/VoiceProviderContracts.d.ts +25 -0
- package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
- package/dist/vue/VoiceProviderStatus.d.ts +55 -0
- package/dist/vue/VoiceReadinessFailures.d.ts +25 -0
- package/dist/vue/VoiceReconnectProfileEvidence.d.ts +25 -0
- package/dist/vue/VoiceReplayTimeline.d.ts +17 -0
- package/dist/vue/VoiceRoutingStatus.d.ts +55 -0
- package/dist/vue/VoiceSessionObservability.d.ts +27 -0
- package/dist/vue/VoiceSessionSnapshot.d.ts +72 -0
- package/dist/vue/VoiceTurnLatency.d.ts +73 -0
- package/dist/vue/VoiceTurnQuality.d.ts +55 -0
- package/dist/vue/VoiceWidget.d.ts +77 -0
- package/dist/vue/index.d.ts +49 -6
- package/dist/vue/index.js +12224 -413
- package/dist/vue/useVoiceAgentSquadStatus.d.ts +9 -0
- package/dist/vue/useVoiceCallDebugger.d.ts +10 -0
- package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
- package/dist/vue/useVoiceController.d.ts +9 -7
- package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/vue/useVoiceLiveOps.d.ts +9 -0
- package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
- package/dist/vue/useVoicePlatformCoverage.d.ts +9 -0
- package/dist/vue/useVoiceProfileComparison.d.ts +9 -0
- package/dist/vue/useVoiceProofTrends.d.ts +9 -0
- package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
- package/dist/vue/useVoiceProviderContracts.d.ts +9 -0
- package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
- package/dist/vue/useVoiceProviderStatus.d.ts +3 -3
- package/dist/vue/useVoiceReadinessFailures.d.ts +959 -0
- package/dist/vue/useVoiceReconnectProfileEvidence.d.ts +9 -0
- package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/vue/useVoiceSessionObservability.d.ts +9 -0
- package/dist/vue/useVoiceSessionSnapshot.d.ts +10 -0
- package/dist/vue/useVoiceStream.d.ts +9 -6
- package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
- package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
- package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
- package/dist/vue/useVoiceWorkflowStatus.d.ts +3 -3
- package/package.json +51 -152
- package/dist/angular/voice-app-kit-status.service.d.ts +0 -12
- package/dist/angular/voice-ops-status.component.d.ts +0 -15
- package/dist/appKit.d.ts +0 -92
- package/dist/client/appKitStatus.d.ts +0 -19
- package/dist/react/useVoiceAppKitStatus.d.ts +0 -8
- package/dist/svelte/createVoiceAppKitStatus.d.ts +0 -8
- package/dist/turnProfiles.d.ts +0 -6
- package/dist/vue/useVoiceAppKitStatus.d.ts +0 -9
- package/fixtures/README.md +0 -57
- package/fixtures/manifest.json +0 -199
- package/fixtures/pcm/dialogue-three-clean.pcm +0 -0
- package/fixtures/pcm/dialogue-three-mixed.pcm +0 -0
- package/fixtures/pcm/dialogue-two-clean.pcm +0 -0
- package/fixtures/pcm/dialogue-two-noisy.pcm +0 -0
- package/fixtures/pcm/multiturn-three-mixed.pcm +0 -0
- package/fixtures/pcm/multiturn-two-clean.pcm +0 -0
- package/fixtures/pcm/quietly-alone-clean.pcm +0 -0
- package/fixtures/pcm/rainstorms-noisy.pcm +0 -0
- package/fixtures/pcm/stella-bulgaria-bulgarian20.pcm +0 -0
- package/fixtures/pcm/stella-ghana-english507.pcm +0 -0
- package/fixtures/pcm/stella-india-english37.pcm +0 -0
- package/fixtures/pcm/stella-jamaica-jamaican-creole-english1.pcm +0 -0
- package/fixtures/pcm/stella-liberia-liberian-pidgin-english2.pcm +0 -0
- package/fixtures/pcm/stella-pakistan-english519.pcm +0 -0
- package/fixtures/pcm/stella-sierra-leone-krio5.pcm +0 -0
- package/fixtures/pcm/stella-singapore-english655.pcm +0 -0
- package/fixtures/pcm/traveled-back-route-clean.pcm +0 -0
|
@@ -1,24 +1,48 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { VoiceOpsDispositionTaskPolicies, VoiceOpsTaskAssignmentRule, VoiceOpsTaskAssignmentRules, VoiceIntegrationWebhookConfig, StoredVoiceIntegrationEvent, StoredVoiceOpsTask, VoiceIntegrationEventStore, VoiceOpsTaskPolicy, VoiceOpsTask, VoiceOpsTaskStore } from
|
|
3
|
-
import type { VoiceIntegrationSink } from
|
|
4
|
-
import type { StoredVoiceCallReviewArtifact, VoiceCallReviewArtifact, VoiceCallReviewStore } from
|
|
5
|
-
import type { VoiceTraceEventStore } from
|
|
1
|
+
import type { MediaWebRTCStatsCollector, MediaWebRTCStatsReport, MediaWebRTCStatsReportInput, MediaWebRTCStreamContinuityInput, MediaWebRTCStreamContinuityReport } from "@absolutejs/media";
|
|
2
|
+
import type { VoiceOpsDispositionTaskPolicies, VoiceOpsTaskAssignmentRule, VoiceOpsTaskAssignmentRules, VoiceIntegrationWebhookConfig, StoredVoiceIntegrationEvent, StoredVoiceOpsTask, VoiceIntegrationEventStore, VoiceOpsTaskPolicy, VoiceOpsTask, VoiceOpsTaskStore } from "./ops";
|
|
3
|
+
import type { VoiceIntegrationSink } from "./opsSinks";
|
|
4
|
+
import type { StoredVoiceCallReviewArtifact, VoiceCallReviewArtifact, VoiceCallReviewStore } from "../testing/review";
|
|
5
|
+
import type { VoiceTraceEventStore } from "./trace";
|
|
6
|
+
import type { VoiceLiveOpsControlState } from "./liveOps";
|
|
7
|
+
import type { VoiceAuditActor, VoiceAuditEventStore } from "./audit";
|
|
8
|
+
import type { VoiceProfileSwitchGuardDecision, VoiceProfileSwitchGuardMode, VoiceProfileSwitchObservedSignals } from "./profileSwitchRecommendation";
|
|
9
|
+
import type { VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileHistoryReport } from "./proofTrends";
|
|
6
10
|
export type AudioFormat = {
|
|
7
|
-
container:
|
|
8
|
-
encoding:
|
|
11
|
+
container: "raw";
|
|
12
|
+
encoding: "alaw" | "mulaw" | "pcm_s16le";
|
|
9
13
|
sampleRateHz: number;
|
|
10
14
|
channels: 1 | 2;
|
|
11
15
|
};
|
|
12
16
|
export type AudioChunk = ArrayBuffer | ArrayBufferView;
|
|
17
|
+
/**
|
|
18
|
+
* Structural contract for an inbound noise suppressor applied before STT.
|
|
19
|
+
* Matches `@absolutejs/media`'s `NoiseSuppressor`, so any media suppressor
|
|
20
|
+
* (`createFFmpegNoiseSuppressor`, `createEnergyGateNoiseSuppressor`, a Krisp
|
|
21
|
+
* adapter, etc.) satisfies it without a hard import.
|
|
22
|
+
*/
|
|
23
|
+
export type VoiceNoiseSuppressor = {
|
|
24
|
+
readonly kind: string;
|
|
25
|
+
process: (input: {
|
|
26
|
+
format: AudioFormat;
|
|
27
|
+
pcm: ArrayBuffer | ArrayBufferView;
|
|
28
|
+
}) => Promise<{
|
|
29
|
+
bytes: Uint8Array;
|
|
30
|
+
format: AudioFormat;
|
|
31
|
+
}> | {
|
|
32
|
+
bytes: Uint8Array;
|
|
33
|
+
format: AudioFormat;
|
|
34
|
+
};
|
|
35
|
+
close?: () => Promise<void> | void;
|
|
36
|
+
};
|
|
13
37
|
export type VoiceLanguageStrategy = {
|
|
14
|
-
mode:
|
|
38
|
+
mode: "auto-detect";
|
|
15
39
|
allowedLanguages?: string[];
|
|
16
40
|
} | {
|
|
17
|
-
mode:
|
|
41
|
+
mode: "fixed";
|
|
18
42
|
primaryLanguage: string;
|
|
19
43
|
secondaryLanguages?: string[];
|
|
20
44
|
} | {
|
|
21
|
-
mode:
|
|
45
|
+
mode: "allow-switching";
|
|
22
46
|
primaryLanguage?: string;
|
|
23
47
|
secondaryLanguages: string[];
|
|
24
48
|
};
|
|
@@ -28,7 +52,7 @@ export type VoicePhraseHint = {
|
|
|
28
52
|
boost?: number;
|
|
29
53
|
metadata?: Record<string, unknown>;
|
|
30
54
|
};
|
|
31
|
-
export type VoiceCorrectionRiskTier =
|
|
55
|
+
export type VoiceCorrectionRiskTier = "safe" | "balanced" | "risky";
|
|
32
56
|
export type VoiceDomainTerm = {
|
|
33
57
|
text: string;
|
|
34
58
|
aliases?: string[];
|
|
@@ -44,12 +68,18 @@ export type VoiceLexiconEntry = {
|
|
|
44
68
|
metadata?: Record<string, unknown>;
|
|
45
69
|
pronunciation?: string;
|
|
46
70
|
};
|
|
71
|
+
export type VoiceTranscriptSentiment = {
|
|
72
|
+
label: "negative" | "neutral" | "positive" | (string & {});
|
|
73
|
+
metadata?: Record<string, unknown>;
|
|
74
|
+
score?: number;
|
|
75
|
+
};
|
|
47
76
|
export type Transcript = {
|
|
48
77
|
id: string;
|
|
49
78
|
text: string;
|
|
50
79
|
isFinal: boolean;
|
|
51
80
|
confidence?: number;
|
|
52
81
|
language?: string;
|
|
82
|
+
sentiment?: VoiceTranscriptSentiment;
|
|
53
83
|
speaker?: string | number;
|
|
54
84
|
startedAtMs?: number;
|
|
55
85
|
endedAtMs?: number;
|
|
@@ -65,7 +95,7 @@ export type VoiceTranscriptQuality = {
|
|
|
65
95
|
fallback?: VoiceFallbackDiagnostics;
|
|
66
96
|
partialTranscriptCount: number;
|
|
67
97
|
selectedTranscriptCount: number;
|
|
68
|
-
source:
|
|
98
|
+
source: "fallback" | "primary";
|
|
69
99
|
};
|
|
70
100
|
export type VoiceTurnCorrectionDiagnostics = {
|
|
71
101
|
attempted: boolean;
|
|
@@ -83,7 +113,7 @@ export type VoiceTurnCostEstimate = {
|
|
|
83
113
|
primaryAudioMs: number;
|
|
84
114
|
totalBillableAudioMs: number;
|
|
85
115
|
};
|
|
86
|
-
export type VoiceFallbackSelectionReason =
|
|
116
|
+
export type VoiceFallbackSelectionReason = "fallback-empty" | "primary-empty" | "word-count-margin" | "confidence-margin" | "word-count-tiebreak" | "kept-primary";
|
|
87
117
|
export type VoiceFallbackDiagnostics = {
|
|
88
118
|
attempted: boolean;
|
|
89
119
|
fallbackConfidence?: number;
|
|
@@ -94,31 +124,31 @@ export type VoiceFallbackDiagnostics = {
|
|
|
94
124
|
primaryWordCount: number;
|
|
95
125
|
selected: boolean;
|
|
96
126
|
selectionReason: VoiceFallbackSelectionReason;
|
|
97
|
-
trigger:
|
|
127
|
+
trigger: "empty-turn" | "low-confidence" | "empty-or-low-confidence" | "always";
|
|
98
128
|
};
|
|
99
129
|
export type VoicePartialEvent = {
|
|
100
|
-
type:
|
|
130
|
+
type: "partial";
|
|
101
131
|
transcript: Transcript;
|
|
102
132
|
receivedAt: number;
|
|
103
133
|
};
|
|
104
134
|
export type VoiceFinalEvent = {
|
|
105
|
-
type:
|
|
135
|
+
type: "final";
|
|
106
136
|
transcript: Transcript;
|
|
107
137
|
receivedAt: number;
|
|
108
138
|
};
|
|
109
139
|
export type VoiceEndOfTurnEvent = {
|
|
110
|
-
type:
|
|
111
|
-
reason:
|
|
140
|
+
type: "endOfTurn";
|
|
141
|
+
reason: "vendor" | "silence" | "manual";
|
|
112
142
|
receivedAt: number;
|
|
113
143
|
};
|
|
114
144
|
export type VoiceErrorEvent = {
|
|
115
|
-
type:
|
|
145
|
+
type: "error";
|
|
116
146
|
error: Error;
|
|
117
147
|
recoverable: boolean;
|
|
118
148
|
code?: string;
|
|
119
149
|
};
|
|
120
150
|
export type VoiceCloseEvent = {
|
|
121
|
-
type:
|
|
151
|
+
type: "close";
|
|
122
152
|
code?: number;
|
|
123
153
|
reason?: string;
|
|
124
154
|
recoverable?: boolean;
|
|
@@ -144,11 +174,11 @@ export type STTAdapterOpenOptions = {
|
|
|
144
174
|
signal?: AbortSignal;
|
|
145
175
|
};
|
|
146
176
|
export type STTAdapter<TOptions extends STTAdapterOpenOptions = STTAdapterOpenOptions> = {
|
|
147
|
-
kind:
|
|
177
|
+
kind: "stt";
|
|
148
178
|
open: (options: TOptions) => Promise<STTAdapterSession> | STTAdapterSession;
|
|
149
179
|
};
|
|
150
180
|
export type TTSAudioEvent = {
|
|
151
|
-
type:
|
|
181
|
+
type: "audio";
|
|
152
182
|
chunk: AudioChunk;
|
|
153
183
|
format: AudioFormat;
|
|
154
184
|
receivedAt: number;
|
|
@@ -161,15 +191,26 @@ export type TTSSessionEventMap = {
|
|
|
161
191
|
export type TTSAdapterSession = {
|
|
162
192
|
on: <K extends keyof TTSSessionEventMap>(event: K, handler: (payload: TTSSessionEventMap[K]) => void | Promise<void>) => () => void;
|
|
163
193
|
send: (text: string) => Promise<void>;
|
|
194
|
+
cancel?: (reason?: string) => Promise<void>;
|
|
164
195
|
close: (reason?: string) => Promise<void>;
|
|
165
196
|
};
|
|
197
|
+
export declare const ttsAdapterSessionCanCancel: (session: TTSAdapterSession) => session is TTSAdapterSession & {
|
|
198
|
+
cancel: (reason?: string) => Promise<void>;
|
|
199
|
+
};
|
|
200
|
+
export type VoiceTTSProsody = {
|
|
201
|
+
emphasis?: number;
|
|
202
|
+
pitch?: number;
|
|
203
|
+
speed?: number;
|
|
204
|
+
style?: string;
|
|
205
|
+
};
|
|
166
206
|
export type TTSAdapterOpenOptions = {
|
|
167
207
|
sessionId: string;
|
|
168
208
|
lexicon?: VoiceLexiconEntry[];
|
|
209
|
+
prosody?: VoiceTTSProsody;
|
|
169
210
|
signal?: AbortSignal;
|
|
170
211
|
};
|
|
171
212
|
export type TTSAdapter<TOptions extends TTSAdapterOpenOptions = TTSAdapterOpenOptions> = {
|
|
172
|
-
kind:
|
|
213
|
+
kind: "tts";
|
|
173
214
|
open: (options: TOptions) => Promise<TTSAdapterSession> | TTSAdapterSession;
|
|
174
215
|
};
|
|
175
216
|
export type RealtimeSessionEventMap = STTSessionEventMap & {
|
|
@@ -185,20 +226,40 @@ export type RealtimeAdapterOpenOptions = {
|
|
|
185
226
|
format: AudioFormat;
|
|
186
227
|
languageStrategy?: VoiceLanguageStrategy;
|
|
187
228
|
lexicon?: VoiceLexiconEntry[];
|
|
229
|
+
modalities?: ReadonlyArray<"audio" | "text">;
|
|
188
230
|
phraseHints?: VoicePhraseHint[];
|
|
231
|
+
promptCacheKey?: string;
|
|
232
|
+
semanticVAD?: import("./assistantMode").VoiceSemanticVADConfig;
|
|
189
233
|
signal?: AbortSignal;
|
|
190
234
|
};
|
|
191
235
|
export type RealtimeAdapter<TOptions extends RealtimeAdapterOpenOptions = RealtimeAdapterOpenOptions> = {
|
|
192
|
-
kind:
|
|
236
|
+
kind: "realtime";
|
|
193
237
|
open: (options: TOptions) => Promise<RealtimeAdapterSession> | RealtimeAdapterSession;
|
|
194
238
|
};
|
|
195
|
-
export type VoiceSessionStatus =
|
|
239
|
+
export type VoiceSessionStatus = "active" | "reconnecting" | "completed" | "failed";
|
|
240
|
+
export type VoiceReconnectClientStatus = "idle" | "reconnecting" | "resumed" | "exhausted";
|
|
241
|
+
export type VoiceReconnectClientState = {
|
|
242
|
+
attempts: number;
|
|
243
|
+
lastDisconnectAt?: number;
|
|
244
|
+
lastResumedAt?: number;
|
|
245
|
+
maxAttempts: number;
|
|
246
|
+
nextAttemptAt?: number;
|
|
247
|
+
status: VoiceReconnectClientStatus;
|
|
248
|
+
};
|
|
249
|
+
export type VoiceTurnCitation = {
|
|
250
|
+
chunkId: string;
|
|
251
|
+
score: number;
|
|
252
|
+
source?: string;
|
|
253
|
+
title?: string;
|
|
254
|
+
};
|
|
196
255
|
export type VoiceTurnRecord<TResult = unknown> = {
|
|
197
256
|
id: string;
|
|
198
257
|
text: string;
|
|
199
258
|
quality?: VoiceTranscriptQuality;
|
|
200
259
|
transcripts: Transcript[];
|
|
201
260
|
assistantText?: string;
|
|
261
|
+
attachments?: import("./agent").VoiceAgentMessageAttachment[];
|
|
262
|
+
citations?: VoiceTurnCitation[];
|
|
202
263
|
committedAt: number;
|
|
203
264
|
result?: TResult;
|
|
204
265
|
};
|
|
@@ -253,10 +314,10 @@ export type VoiceSessionSummary = {
|
|
|
253
314
|
status: VoiceSessionStatus;
|
|
254
315
|
turnCount: number;
|
|
255
316
|
};
|
|
256
|
-
export type VoiceCallDisposition =
|
|
317
|
+
export type VoiceCallDisposition = "completed" | "transferred" | "escalated" | "voicemail" | "no-answer" | "failed" | "silence-timeout" | "closed";
|
|
257
318
|
export type VoiceCallLifecycleEvent = {
|
|
258
319
|
at: number;
|
|
259
|
-
type:
|
|
320
|
+
type: "start" | "end" | "transfer" | "escalation" | "voicemail" | "no-answer";
|
|
260
321
|
disposition?: VoiceCallDisposition;
|
|
261
322
|
metadata?: Record<string, unknown>;
|
|
262
323
|
reason?: string;
|
|
@@ -269,8 +330,8 @@ export type VoiceCallLifecycleState = {
|
|
|
269
330
|
lastEventAt: number;
|
|
270
331
|
startedAt: number;
|
|
271
332
|
};
|
|
272
|
-
export type VoiceHandoffAction =
|
|
273
|
-
export type VoiceHandoffStatus =
|
|
333
|
+
export type VoiceHandoffAction = "escalate" | "no-answer" | "transfer" | "voicemail";
|
|
334
|
+
export type VoiceHandoffStatus = "delivered" | "failed" | "skipped";
|
|
274
335
|
export type VoiceHandoffResult = {
|
|
275
336
|
deliveredAt?: number;
|
|
276
337
|
deliveredTo?: string;
|
|
@@ -278,7 +339,7 @@ export type VoiceHandoffResult = {
|
|
|
278
339
|
metadata?: Record<string, unknown>;
|
|
279
340
|
status: VoiceHandoffStatus;
|
|
280
341
|
};
|
|
281
|
-
export type VoiceHandoffDeliveryQueueStatus = VoiceHandoffStatus |
|
|
342
|
+
export type VoiceHandoffDeliveryQueueStatus = VoiceHandoffStatus | "pending";
|
|
282
343
|
export type StoredVoiceHandoffDelivery<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
283
344
|
action: VoiceHandoffAction;
|
|
284
345
|
context: TContext;
|
|
@@ -326,9 +387,15 @@ export type VoiceHandoffConfig<TContext = unknown, TSession extends VoiceSession
|
|
|
326
387
|
adapters: VoiceHandoffAdapter<TContext, TSession, TResult>[];
|
|
327
388
|
deliveryQueue?: VoiceHandoffDeliveryStore<StoredVoiceHandoffDelivery<TContext, TSession, TResult>>;
|
|
328
389
|
enqueueOnly?: boolean;
|
|
329
|
-
failMode?:
|
|
390
|
+
failMode?: "record" | "throw";
|
|
391
|
+
};
|
|
392
|
+
export type VoiceSessionStore<TSession extends VoiceSessionRecord = VoiceSessionRecord> = {
|
|
393
|
+
get: (id: string) => Promise<TSession | undefined>;
|
|
394
|
+
getOrCreate: (id: string) => Promise<TSession>;
|
|
395
|
+
set: (id: string, value: TSession) => Promise<void>;
|
|
396
|
+
list: () => Promise<VoiceSessionSummary[]>;
|
|
397
|
+
remove: (id: string) => Promise<void>;
|
|
330
398
|
};
|
|
331
|
-
export type VoiceSessionStore<TSession extends VoiceSessionRecord = VoiceSessionRecord> = SessionStore<TSession, VoiceSessionSummary>;
|
|
332
399
|
export type VoiceLogger = {
|
|
333
400
|
debug?: (message: string, meta?: Record<string, unknown>) => void;
|
|
334
401
|
info?: (message: string, meta?: Record<string, unknown>) => void;
|
|
@@ -336,15 +403,15 @@ export type VoiceLogger = {
|
|
|
336
403
|
error?: (message: string, meta?: Record<string, unknown>) => void;
|
|
337
404
|
};
|
|
338
405
|
export type VoiceReconnectConfig = {
|
|
339
|
-
strategy?:
|
|
406
|
+
strategy?: "resume-last-turn" | "restart" | "fail";
|
|
340
407
|
timeout?: number;
|
|
341
408
|
maxAttempts?: number;
|
|
342
409
|
};
|
|
343
|
-
export type VoiceRuntimePreset =
|
|
344
|
-
export type VoiceSTTLifecycle =
|
|
345
|
-
export type VoiceTurnProfile =
|
|
346
|
-
export type VoiceTurnQualityProfile =
|
|
347
|
-
export type VoiceTurnFallbackTrigger =
|
|
410
|
+
export type VoiceRuntimePreset = "default" | "chat" | "guided-intake" | "dictation" | "noisy-room" | "pstn-balanced" | "pstn-fast" | "reliability";
|
|
411
|
+
export type VoiceSTTLifecycle = "continuous" | "turn-scoped";
|
|
412
|
+
export type VoiceTurnProfile = "fast" | "balanced" | "long-form";
|
|
413
|
+
export type VoiceTurnQualityProfile = "general" | "accent-heavy" | "noisy-room" | "short-command";
|
|
414
|
+
export type VoiceTurnFallbackTrigger = "empty-turn" | "low-confidence" | "empty-or-low-confidence" | "always";
|
|
348
415
|
export type VoiceSTTFallbackConfig = {
|
|
349
416
|
adapter: STTAdapter;
|
|
350
417
|
trigger?: VoiceTurnFallbackTrigger;
|
|
@@ -396,12 +463,34 @@ export type VoiceResolvedAudioConditioningConfig = {
|
|
|
396
463
|
export type VoiceSocket = {
|
|
397
464
|
send: (data: string | Uint8Array | ArrayBuffer) => void | Promise<void>;
|
|
398
465
|
close: (code?: number, reason?: string) => void | Promise<void>;
|
|
466
|
+
/**
|
|
467
|
+
* Discard any audio already buffered downstream (e.g. a telephony carrier's
|
|
468
|
+
* outbound media buffer). Called on barge-in so the caller stops hearing the
|
|
469
|
+
* assistant immediately, even when frames have already been flushed to the
|
|
470
|
+
* transport. Optional: transports without a flush concept omit it.
|
|
471
|
+
*/
|
|
472
|
+
clear?: () => void | Promise<void>;
|
|
473
|
+
};
|
|
474
|
+
export type VoiceMonitorRuntimeSessionBinding = {
|
|
475
|
+
deregister: (reason?: string) => void;
|
|
476
|
+
emitAudio: (chunk: Uint8Array | ArrayBuffer, options?: {
|
|
477
|
+
source?: "assistant" | "caller" | (string & {});
|
|
478
|
+
}) => void;
|
|
479
|
+
};
|
|
480
|
+
export type VoiceMonitorRuntimeRegisterInput = {
|
|
481
|
+
handle: VoiceSessionHandle<unknown, VoiceSessionRecord, unknown>;
|
|
482
|
+
metadata?: Record<string, unknown>;
|
|
483
|
+
sessionId: string;
|
|
484
|
+
};
|
|
485
|
+
export type VoiceMonitorRuntimeBinding = {
|
|
486
|
+
registerSession: (input: VoiceMonitorRuntimeRegisterInput) => VoiceMonitorRuntimeSessionBinding;
|
|
399
487
|
};
|
|
400
488
|
export type VoiceSessionHandle<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
401
489
|
id: string;
|
|
402
490
|
connect: (socket: VoiceSocket) => Promise<void>;
|
|
403
491
|
receiveAudio: (audio: AudioChunk) => Promise<void>;
|
|
404
|
-
|
|
492
|
+
attachUserMedia: (attachment: import("./agent").VoiceAgentMessageAttachment) => Promise<void>;
|
|
493
|
+
commitTurn: (reason?: VoiceEndOfTurnEvent["reason"]) => Promise<void>;
|
|
405
494
|
disconnect: (event?: VoiceCloseEvent) => Promise<void>;
|
|
406
495
|
complete: (result?: TResult) => Promise<void>;
|
|
407
496
|
escalate: (input: {
|
|
@@ -423,6 +512,7 @@ export type VoiceSessionHandle<TContext = unknown, TSession extends VoiceSession
|
|
|
423
512
|
reason?: string;
|
|
424
513
|
result?: TResult;
|
|
425
514
|
target: string;
|
|
515
|
+
transferMode?: "cold" | "warm";
|
|
426
516
|
}) => Promise<void>;
|
|
427
517
|
close: (reason?: string) => Promise<void>;
|
|
428
518
|
snapshot: () => Promise<TSession>;
|
|
@@ -431,10 +521,12 @@ export type VoiceRouteResult<TResult = unknown> = {
|
|
|
431
521
|
complete?: boolean;
|
|
432
522
|
result?: TResult;
|
|
433
523
|
assistantText?: string;
|
|
524
|
+
citations?: ReadonlyArray<VoiceTurnCitation>;
|
|
434
525
|
transfer?: {
|
|
435
526
|
metadata?: Record<string, unknown>;
|
|
436
527
|
reason?: string;
|
|
437
528
|
target: string;
|
|
529
|
+
transferMode?: "cold" | "warm";
|
|
438
530
|
};
|
|
439
531
|
escalate?: {
|
|
440
532
|
metadata?: Record<string, unknown>;
|
|
@@ -475,6 +567,11 @@ export type VoiceLexiconResolver<TContext = unknown> = (input: {
|
|
|
475
567
|
}) => Promise<VoiceLexiconEntry[] | void> | VoiceLexiconEntry[] | void;
|
|
476
568
|
export type VoiceOnTurnObjectHandler<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = (input: {
|
|
477
569
|
context: TContext;
|
|
570
|
+
liveOps?: {
|
|
571
|
+
control: VoiceLiveOpsControlState;
|
|
572
|
+
injectedInstruction?: string;
|
|
573
|
+
};
|
|
574
|
+
onTextDelta?: (delta: string) => void;
|
|
478
575
|
session: TSession;
|
|
479
576
|
turn: VoiceTurnRecord;
|
|
480
577
|
api: VoiceSessionHandle<TContext, TSession, TResult>;
|
|
@@ -559,7 +656,7 @@ export type VoiceRuntimeOpsConfig<TContext = unknown, TSession extends VoiceSess
|
|
|
559
656
|
disposition: VoiceCallDisposition;
|
|
560
657
|
review: StoredVoiceCallReviewArtifact;
|
|
561
658
|
session: TSession;
|
|
562
|
-
}) => Promise<Omit<VoiceOpsTask,
|
|
659
|
+
}) => Promise<Omit<VoiceOpsTask, "id"> | VoiceOpsTask | StoredVoiceOpsTask | null | void> | Omit<VoiceOpsTask, "id"> | VoiceOpsTask | StoredVoiceOpsTask | null | void;
|
|
563
660
|
resolveTaskPolicy?: (input: {
|
|
564
661
|
api: VoiceSessionHandle<TContext, TSession, TResult>;
|
|
565
662
|
context: TContext;
|
|
@@ -596,7 +693,37 @@ export type VoiceRuntimeOpsConfig<TContext = unknown, TSession extends VoiceSess
|
|
|
596
693
|
tasks?: VoiceOpsTaskStore;
|
|
597
694
|
webhook?: VoiceIntegrationWebhookConfig;
|
|
598
695
|
};
|
|
599
|
-
export type
|
|
696
|
+
export type VoiceLiveOpsRuntimeConfig = {
|
|
697
|
+
getControl: (sessionId: string) => Promise<VoiceLiveOpsControlState | null | undefined> | VoiceLiveOpsControlState | null | undefined;
|
|
698
|
+
};
|
|
699
|
+
export type VoiceProfileSwitchGuardResolverInput<TContext = unknown> = {
|
|
700
|
+
context: TContext;
|
|
701
|
+
scenarioId?: string;
|
|
702
|
+
sessionId: string;
|
|
703
|
+
};
|
|
704
|
+
export type VoicePluginProfileSwitchGuardConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
705
|
+
actor?: VoiceAuditActor;
|
|
706
|
+
allowedProfileIds?: string[] | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<string[] | undefined> | string[] | undefined);
|
|
707
|
+
audit?: VoiceAuditEventStore;
|
|
708
|
+
blockedProfileIds?: string[] | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<string[] | undefined> | string[] | undefined);
|
|
709
|
+
currentProfileId?: string | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<string | undefined> | string | undefined);
|
|
710
|
+
defaultProfileId?: string;
|
|
711
|
+
defaults: VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport> | VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport);
|
|
712
|
+
metadata?: Record<string, unknown> | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<Record<string, unknown> | undefined> | Record<string, unknown> | undefined);
|
|
713
|
+
minConfidence?: number | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<number | undefined> | number | undefined);
|
|
714
|
+
maxAutoSwitchesPerSession?: number | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<number | undefined> | number | undefined);
|
|
715
|
+
mode?: VoiceProfileSwitchGuardMode | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<VoiceProfileSwitchGuardMode | undefined> | VoiceProfileSwitchGuardMode | undefined);
|
|
716
|
+
observed?: VoiceProfileSwitchObservedSignals | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<VoiceProfileSwitchObservedSignals | undefined> | VoiceProfileSwitchObservedSignals | undefined);
|
|
717
|
+
onDecision?: (input: {
|
|
718
|
+
context: TContext;
|
|
719
|
+
decision: VoiceProfileSwitchGuardDecision;
|
|
720
|
+
scenarioId?: string;
|
|
721
|
+
sessionId: string;
|
|
722
|
+
}) => Promise<void> | void;
|
|
723
|
+
sessionMetadataKey?: string | false;
|
|
724
|
+
trace?: false | VoiceTraceEventStore;
|
|
725
|
+
};
|
|
726
|
+
export type VoiceNormalizedRouteConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = Omit<VoiceRouteConfig<TContext, TSession, TResult>, "onTurn"> & {
|
|
600
727
|
onTurn: VoiceOnTurnObjectHandler<TContext, TSession, TResult>;
|
|
601
728
|
};
|
|
602
729
|
export type VoiceScenario = {
|
|
@@ -609,131 +736,289 @@ export type VoiceExpectedSpeakerTurn = {
|
|
|
609
736
|
speaker: string;
|
|
610
737
|
text: string;
|
|
611
738
|
};
|
|
739
|
+
/**
|
|
740
|
+
* Configures one of the plugin's optional route surfaces. Pass that surface's
|
|
741
|
+
* options object to mount it, `false` (or omit) to leave it off. Surfaces whose
|
|
742
|
+
* options are entirely optional may also be enabled with `true` for defaults.
|
|
743
|
+
*/
|
|
744
|
+
export type VoiceSurfaceConfig<O> = false | O | (Record<string, never> extends O ? true : never);
|
|
612
745
|
export type VoicePluginConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
613
746
|
costTelemetry?: VoiceCostTelemetryConfig<TContext, TSession, TResult>;
|
|
614
747
|
path: string;
|
|
748
|
+
greeting?: string | ((input: {
|
|
749
|
+
session: TSession;
|
|
750
|
+
}) => string | Promise<string>);
|
|
615
751
|
languageStrategy?: VoiceLanguageStrategy;
|
|
616
752
|
lexicon?: VoiceLexiconEntry[] | VoiceLexiconResolver<TContext>;
|
|
617
753
|
phraseHints?: VoicePhraseHint[] | VoicePhraseHintResolver<TContext>;
|
|
618
754
|
preset?: VoiceRuntimePreset;
|
|
619
|
-
stt
|
|
755
|
+
stt?: STTAdapter;
|
|
620
756
|
sttFallback?: VoiceSTTFallbackConfig;
|
|
621
757
|
sttLifecycle?: VoiceSTTLifecycle;
|
|
758
|
+
realtime?: RealtimeAdapter;
|
|
759
|
+
realtimeInputFormat?: AudioFormat;
|
|
622
760
|
tts?: TTSAdapter;
|
|
623
761
|
session: VoiceSessionStore<NoInfer<TSession>>;
|
|
624
762
|
reconnect?: VoiceReconnectConfig;
|
|
625
763
|
turnDetection?: VoiceTurnDetectionConfig;
|
|
626
764
|
audioConditioning?: VoiceAudioConditioningConfig;
|
|
765
|
+
noiseSuppressor?: VoiceNoiseSuppressor;
|
|
766
|
+
noiseSuppressorFormat?: AudioFormat;
|
|
627
767
|
logger?: VoiceLogger;
|
|
628
768
|
htmx?: boolean | VoiceHTMXConfig<TSession, NoInfer<TResult>>;
|
|
629
769
|
handoff?: VoiceHandoffConfig<TContext, TSession, TResult>;
|
|
630
770
|
ops?: VoiceRuntimeOpsConfig<TContext, TSession, TResult>;
|
|
771
|
+
liveOps?: VoiceLiveOpsRuntimeConfig;
|
|
772
|
+
monitor?: VoiceMonitorRuntimeBinding;
|
|
773
|
+
profileSwitchGuard?: VoicePluginProfileSwitchGuardConfig<TContext, TSession, TResult>;
|
|
631
774
|
trace?: VoiceTraceEventStore;
|
|
775
|
+
assistantHealth?: VoiceSurfaceConfig<import("./assistantHealth").VoiceAssistantHealthRoutesOptions>;
|
|
776
|
+
auditDelivery?: VoiceSurfaceConfig<import("./auditDeliveryRoutes").VoiceAuditDeliveryRoutesOptions>;
|
|
777
|
+
auditTrail?: VoiceSurfaceConfig<import("./auditRoutes").VoiceAuditTrailRoutesOptions>;
|
|
778
|
+
bargeIn?: VoiceSurfaceConfig<import("./bargeInRoutes").VoiceBargeInRoutesOptions>;
|
|
779
|
+
browserCallProfile?: VoiceSurfaceConfig<import("./browserCallProfiles").VoiceBrowserCallProfileRoutesOptions>;
|
|
780
|
+
browserMedia?: VoiceSurfaceConfig<import("./browserMediaRoutes").VoiceBrowserMediaRoutesOptions>;
|
|
781
|
+
callDebugger?: VoiceSurfaceConfig<import("./callDebugger").VoiceCallDebuggerRoutesOptions>;
|
|
782
|
+
campaign?: VoiceSurfaceConfig<import("./campaign").VoiceCampaignRoutesOptions>;
|
|
783
|
+
competitiveCoverage?: VoiceSurfaceConfig<import("./competitiveCoverage").VoiceCompetitiveCoverageRoutesOptions>;
|
|
784
|
+
dataControl?: VoiceSurfaceConfig<import("./dataControl").VoiceDataControlRoutesOptions>;
|
|
785
|
+
deliveryRuntime?: VoiceSurfaceConfig<import("./deliveryRuntime").VoiceDeliveryRuntimeRoutesOptions>;
|
|
786
|
+
deliverySink?: VoiceSurfaceConfig<import("./deliverySinkRoutes").VoiceDeliverySinkRoutesOptions>;
|
|
787
|
+
demoReady?: VoiceSurfaceConfig<import("./demoReadyRoutes").VoiceDemoReadyRoutesOptions>;
|
|
788
|
+
diagnostics?: VoiceSurfaceConfig<import("./diagnosticsRoutes").VoiceDiagnosticsRoutesOptions>;
|
|
789
|
+
eval?: VoiceSurfaceConfig<import("./evalRoutes").VoiceEvalRoutesOptions>;
|
|
790
|
+
guardrail?: VoiceSurfaceConfig<import("./guardrails").VoiceGuardrailRoutesOptions>;
|
|
791
|
+
handoffHealth?: VoiceSurfaceConfig<import("./handoffHealth").VoiceHandoffHealthRoutesOptions>;
|
|
792
|
+
htmxDashboard?: VoiceSurfaceConfig<import("./htmxDashboardRoutes").VoiceHTMXDashboardRoutesOptions>;
|
|
793
|
+
incidentBundle?: VoiceSurfaceConfig<import("./incidentBundle").VoiceIncidentBundleRoutesOptions>;
|
|
794
|
+
incidentTimeline?: VoiceSurfaceConfig<import("./incidentTimeline").VoiceIncidentTimelineRoutesOptions>;
|
|
795
|
+
liveLatency?: VoiceSurfaceConfig<import("./liveLatency").VoiceLiveLatencyRoutesOptions>;
|
|
796
|
+
liveMonitor?: VoiceSurfaceConfig<import("./monitor").VoiceLiveMonitorRoutesOptions>;
|
|
797
|
+
liveOpsConsole?: VoiceSurfaceConfig<import("./liveOps").VoiceLiveOpsRoutesOptions>;
|
|
798
|
+
mediaPipeline?: VoiceSurfaceConfig<import("./mediaPipelineRoutes").VoiceMediaPipelineRoutesOptions>;
|
|
799
|
+
monitorReport?: VoiceSurfaceConfig<import("./voiceMonitoring").VoiceMonitorRoutesOptions>;
|
|
800
|
+
monitorRunner?: VoiceSurfaceConfig<import("./voiceMonitoring").VoiceMonitorRunnerRoutesOptions>;
|
|
801
|
+
observabilityExport?: VoiceSurfaceConfig<import("./observabilityExport").VoiceObservabilityExportRoutesOptions>;
|
|
802
|
+
observabilityExportReplay?: VoiceSurfaceConfig<import("./observabilityExport").VoiceObservabilityExportReplayRoutesOptions>;
|
|
803
|
+
operationalStatus?: VoiceSurfaceConfig<import("./operationalStatus").VoiceOperationalStatusRoutesOptions>;
|
|
804
|
+
operationsRecord?: VoiceSurfaceConfig<import("./operationsRecord").VoiceOperationsRecordRoutesOptions>;
|
|
805
|
+
opsActionAudit?: VoiceSurfaceConfig<import("./opsActionAuditRoutes").VoiceOpsActionAuditRoutesOptions>;
|
|
806
|
+
opsConsole?: VoiceSurfaceConfig<import("./opsConsoleRoutes").VoiceOpsConsoleRoutesOptions>;
|
|
807
|
+
opsRecovery?: VoiceSurfaceConfig<import("./opsRecovery").VoiceOpsRecoveryRoutesOptions>;
|
|
808
|
+
opsStatus?: VoiceSurfaceConfig<import("./opsStatus").VoiceOpsStatusRoutesOptions>;
|
|
809
|
+
opsWebhookReceiver?: VoiceSurfaceConfig<import("./opsWebhook").VoiceOpsWebhookReceiverRoutesOptions>;
|
|
810
|
+
outcomeContract?: VoiceSurfaceConfig<import("./outcomeContract").VoiceOutcomeContractRoutesOptions>;
|
|
811
|
+
phoneAgentProductionSmoke?: VoiceSurfaceConfig<import("./phoneAgentProductionSmoke").VoicePhoneAgentProductionSmokeRoutesOptions>;
|
|
812
|
+
platformCoverage?: VoiceSurfaceConfig<import("./platformCoverage").VoicePlatformCoverageRoutesOptions>;
|
|
813
|
+
postCallAnalysis?: VoiceSurfaceConfig<import("./postCallAnalysis").VoicePostCallAnalysisRoutesOptions>;
|
|
814
|
+
productionReadiness?: VoiceSurfaceConfig<import("./productionReadiness").VoiceProductionReadinessRoutesOptions>;
|
|
815
|
+
profileSwitchLiveDecision?: VoiceSurfaceConfig<import("./profileSwitchRecommendation").VoiceProfileSwitchLiveDecisionRoutesOptions>;
|
|
816
|
+
profileSwitchPolicyProof?: VoiceSurfaceConfig<import("./profileSwitchRecommendation").VoiceProfileSwitchPolicyProofRoutesOptions>;
|
|
817
|
+
profileSwitchReadiness?: VoiceSurfaceConfig<import("./profileSwitchRecommendation").VoiceProfileSwitchReadinessRoutesOptions>;
|
|
818
|
+
proofPack?: VoiceSurfaceConfig<import("./proofPack").VoiceProofPackRoutesOptions>;
|
|
819
|
+
proofTrend?: VoiceSurfaceConfig<import("./proofTrends").VoiceProofTrendRoutesOptions>;
|
|
820
|
+
proofTrendRecommendation?: VoiceSurfaceConfig<import("./proofTrends").VoiceProofTrendRecommendationRoutesOptions>;
|
|
821
|
+
providerCapability?: VoiceSurfaceConfig<import("./providerCapabilities").VoiceProviderCapabilityRoutesOptions>;
|
|
822
|
+
providerContractMatrix?: VoiceSurfaceConfig<import("./providerStackRecommendations").VoiceProviderContractMatrixRoutesOptions>;
|
|
823
|
+
providerDecisionTrace?: VoiceSurfaceConfig<import("./providerDecisionTraces").VoiceProviderDecisionTraceRoutesOptions>;
|
|
824
|
+
providerHealth?: VoiceSurfaceConfig<import("./providerHealth").VoiceProviderHealthRoutesOptions>;
|
|
825
|
+
providerOrchestration?: VoiceSurfaceConfig<import("./providerOrchestration").VoiceProviderOrchestrationRoutesOptions>;
|
|
826
|
+
providerSlo?: VoiceSurfaceConfig<import("./providerSlo").VoiceProviderSloRoutesOptions>;
|
|
827
|
+
quality?: VoiceSurfaceConfig<import("./qualityRoutes").VoiceQualityRoutesOptions>;
|
|
828
|
+
realCallEvidenceRuntime?: VoiceSurfaceConfig<import("./proofTrends").VoiceRealCallEvidenceRuntimeRoutesOptions>;
|
|
829
|
+
realCallProfileHistory?: VoiceSurfaceConfig<import("./proofTrends").VoiceRealCallProfileHistoryRoutesOptions>;
|
|
830
|
+
realCallProfileRecoveryAction?: VoiceSurfaceConfig<import("./proofTrends").VoiceRealCallProfileRecoveryActionRoutesOptions>;
|
|
831
|
+
realtimeChannel?: VoiceSurfaceConfig<import("./realtimeChannel").VoiceRealtimeChannelRoutesOptions>;
|
|
832
|
+
realtimeProviderContract?: VoiceSurfaceConfig<import("./realtimeProviderContracts").VoiceRealtimeProviderContractRoutesOptions>;
|
|
833
|
+
reconnectContract?: VoiceSurfaceConfig<import("./reconnectContract").VoiceReconnectContractRoutesOptions>;
|
|
834
|
+
reconnectProof?: VoiceSurfaceConfig<import("./reconnectContract").VoiceReconnectProofRoutesOptions>;
|
|
835
|
+
resilience?: VoiceSurfaceConfig<import("./resilienceRoutes").VoiceResilienceRoutesOptions>;
|
|
836
|
+
sessionList?: VoiceSurfaceConfig<import("./sessionReplay").VoiceSessionListRoutesOptions>;
|
|
837
|
+
sessionObservability?: VoiceSurfaceConfig<import("./sessionObservability").VoiceSessionObservabilityRoutesOptions>;
|
|
838
|
+
sessionReplay?: VoiceSurfaceConfig<import("./sessionReplay").VoiceSessionReplayRoutesOptions>;
|
|
839
|
+
sessionSnapshot?: VoiceSurfaceConfig<import("./sessionSnapshot").VoiceSessionSnapshotRoutesOptions>;
|
|
840
|
+
simulationSuite?: VoiceSurfaceConfig<import("./simulationSuite").VoiceSimulationSuiteRoutesOptions>;
|
|
841
|
+
sloCalibration?: VoiceSurfaceConfig<import("./sloCalibration").VoiceSloCalibrationRoutesOptions>;
|
|
842
|
+
sloReadinessThreshold?: VoiceSurfaceConfig<import("./sloCalibration").VoiceSloReadinessThresholdRoutesOptions>;
|
|
843
|
+
telephonyCarrierMatrix?: VoiceSurfaceConfig<import("../telephony/matrix").VoiceTelephonyCarrierMatrixRoutesOptions>;
|
|
844
|
+
telephonyMedia?: VoiceSurfaceConfig<import("./telephonyMediaRoutes").VoiceTelephonyMediaRoutesOptions>;
|
|
845
|
+
telephonyWebhook?: VoiceSurfaceConfig<import("./telephonyOutcome").VoiceTelephonyWebhookRoutesOptions>;
|
|
846
|
+
telephonyWebhookSecurity?: VoiceSurfaceConfig<import("../telephony/security").VoiceTelephonyWebhookSecurityRoutesOptions>;
|
|
847
|
+
toolContract?: VoiceSurfaceConfig<import("./toolContract").VoiceToolContractRoutesOptions>;
|
|
848
|
+
traceDelivery?: VoiceSurfaceConfig<import("./traceDeliveryRoutes").VoiceTraceDeliveryRoutesOptions>;
|
|
849
|
+
traceTimeline?: VoiceSurfaceConfig<import("./traceTimeline").VoiceTraceTimelineRoutesOptions>;
|
|
850
|
+
turnLatency?: VoiceSurfaceConfig<import("./turnLatency").VoiceTurnLatencyRoutesOptions>;
|
|
851
|
+
turnQuality?: VoiceSurfaceConfig<import("./turnQuality").VoiceTurnQualityRoutesOptions>;
|
|
632
852
|
} & VoiceRouteConfig<TContext, TSession, TResult>;
|
|
853
|
+
export type VoiceSessionRecordingConfig = {
|
|
854
|
+
channels?: ReadonlyArray<"assistant" | "user">;
|
|
855
|
+
maxBytesPerChannel?: number;
|
|
856
|
+
store: import("./recordingStore").VoiceRecordingStore;
|
|
857
|
+
userInputFormat?: AudioFormat;
|
|
858
|
+
};
|
|
633
859
|
export type CreateVoiceSessionOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
634
860
|
costTelemetry?: VoiceCostTelemetryConfig<TContext, TSession, TResult>;
|
|
635
861
|
id: string;
|
|
636
862
|
context: TContext;
|
|
637
863
|
socket: VoiceSocket;
|
|
638
|
-
|
|
864
|
+
greeting?: string | ((input: {
|
|
865
|
+
session: TSession;
|
|
866
|
+
}) => string | Promise<string>);
|
|
867
|
+
stt?: STTAdapter;
|
|
868
|
+
realtime?: RealtimeAdapter;
|
|
869
|
+
realtimeInputFormat?: AudioFormat;
|
|
639
870
|
tts?: TTSAdapter;
|
|
640
871
|
languageStrategy?: VoiceLanguageStrategy;
|
|
641
872
|
lexicon?: VoiceLexiconEntry[];
|
|
642
873
|
sttFallback?: VoiceResolvedSTTFallbackConfig;
|
|
643
874
|
store: VoiceSessionStore<TSession>;
|
|
644
875
|
trace?: VoiceTraceEventStore;
|
|
876
|
+
recording?: VoiceSessionRecordingConfig;
|
|
877
|
+
callSilenceTimeoutMs?: number;
|
|
878
|
+
amd?: import("./amdDetector").VoiceAMDDetector<TContext, TSession, TResult>;
|
|
879
|
+
costAccountant?: import("./costAccounting").VoiceCostAccountant;
|
|
880
|
+
costTelephony?: {
|
|
881
|
+
provider?: string;
|
|
882
|
+
};
|
|
883
|
+
redact?: import("./redaction").VoiceTranscriptRedactor;
|
|
884
|
+
semanticTurnDetector?: import("./semanticTurn").VoiceSemanticTurnDetector;
|
|
885
|
+
assistantMode?: import("./assistantMode").VoiceAssistantMode;
|
|
886
|
+
modalities?: ReadonlyArray<"audio" | "text">;
|
|
887
|
+
prosody?: VoiceTTSProsody;
|
|
645
888
|
reconnect: Required<VoiceReconnectConfig>;
|
|
646
889
|
phraseHints?: VoicePhraseHint[];
|
|
890
|
+
sessionMetadata?: Record<string, unknown>;
|
|
647
891
|
scenarioId?: string;
|
|
648
892
|
sttLifecycle: VoiceSTTLifecycle;
|
|
649
893
|
turnDetection: VoiceResolvedTurnDetectionConfig;
|
|
650
894
|
audioConditioning?: VoiceResolvedAudioConditioningConfig;
|
|
895
|
+
noiseSuppressor?: VoiceNoiseSuppressor;
|
|
896
|
+
noiseSuppressorFormat?: AudioFormat;
|
|
651
897
|
handoff?: VoiceHandoffConfig<TContext, TSession, TResult>;
|
|
898
|
+
liveOps?: VoiceLiveOpsRuntimeConfig;
|
|
652
899
|
route: VoiceNormalizedRouteConfig<TContext, TSession, TResult>;
|
|
653
900
|
logger?: VoiceLogger;
|
|
654
901
|
};
|
|
655
902
|
export type CreateVoiceSession = <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(options: CreateVoiceSessionOptions<TContext, TSession, TResult>) => VoiceSessionHandle<TContext, TSession, TResult>;
|
|
656
903
|
export type VoiceClientStartMessage = {
|
|
657
|
-
type:
|
|
904
|
+
type: "start";
|
|
658
905
|
sessionId?: string;
|
|
659
906
|
scenarioId?: string;
|
|
660
907
|
};
|
|
661
908
|
export type VoiceClientEndTurnMessage = {
|
|
662
|
-
type:
|
|
909
|
+
type: "end_turn";
|
|
663
910
|
};
|
|
664
911
|
export type VoiceClientCloseMessage = {
|
|
665
|
-
type:
|
|
912
|
+
type: "close";
|
|
666
913
|
reason?: string;
|
|
667
914
|
};
|
|
668
915
|
export type VoiceClientCallControlMessage = {
|
|
669
|
-
type:
|
|
670
|
-
action:
|
|
916
|
+
type: "call_control";
|
|
917
|
+
action: "complete" | "escalate" | "no-answer" | "transfer" | "voicemail";
|
|
671
918
|
metadata?: Record<string, unknown>;
|
|
672
919
|
reason?: string;
|
|
673
920
|
target?: string;
|
|
674
921
|
};
|
|
675
922
|
export type VoiceClientPingMessage = {
|
|
676
|
-
type:
|
|
923
|
+
type: "ping";
|
|
677
924
|
};
|
|
678
925
|
export type VoiceClientMessage = VoiceClientStartMessage | VoiceClientEndTurnMessage | VoiceClientCloseMessage | VoiceClientCallControlMessage | VoiceClientPingMessage;
|
|
679
926
|
export type VoiceServerSessionMessage = {
|
|
680
|
-
type:
|
|
927
|
+
type: "session";
|
|
681
928
|
sessionId: string;
|
|
682
929
|
status: VoiceSessionStatus;
|
|
683
930
|
scenarioId?: string;
|
|
931
|
+
sessionMetadata?: Record<string, unknown>;
|
|
932
|
+
};
|
|
933
|
+
export type VoiceServerReplayMessage<TResult = unknown> = {
|
|
934
|
+
type: "replay";
|
|
935
|
+
assistantTexts: string[];
|
|
936
|
+
call?: VoiceCallLifecycleState;
|
|
937
|
+
partial: string;
|
|
938
|
+
scenarioId?: string;
|
|
939
|
+
sessionId: string;
|
|
940
|
+
sessionMetadata?: Record<string, unknown>;
|
|
941
|
+
status: VoiceSessionStatus;
|
|
942
|
+
turns: VoiceTurnRecord<TResult>[];
|
|
684
943
|
};
|
|
685
944
|
export type VoiceServerPartialMessage = {
|
|
686
|
-
type:
|
|
945
|
+
type: "partial";
|
|
687
946
|
transcript: Transcript;
|
|
688
947
|
};
|
|
689
948
|
export type VoiceServerFinalMessage = {
|
|
690
|
-
type:
|
|
949
|
+
type: "final";
|
|
691
950
|
transcript: Transcript;
|
|
692
951
|
};
|
|
693
952
|
export type VoiceServerTurnMessage<TResult = unknown> = {
|
|
694
|
-
type:
|
|
953
|
+
type: "turn";
|
|
695
954
|
turn: VoiceTurnRecord<TResult>;
|
|
696
955
|
};
|
|
697
956
|
export type VoiceServerAssistantMessage = {
|
|
698
|
-
type:
|
|
957
|
+
type: "assistant";
|
|
699
958
|
text: string;
|
|
700
959
|
turnId?: string;
|
|
701
960
|
};
|
|
702
961
|
export type VoiceServerAudioMessage = {
|
|
703
|
-
type:
|
|
962
|
+
type: "audio";
|
|
704
963
|
chunkBase64: string;
|
|
705
964
|
format: AudioFormat;
|
|
706
965
|
receivedAt: number;
|
|
707
966
|
turnId?: string;
|
|
708
967
|
};
|
|
709
968
|
export type VoiceServerCompleteMessage = {
|
|
710
|
-
type:
|
|
969
|
+
type: "complete";
|
|
711
970
|
sessionId: string;
|
|
712
971
|
};
|
|
713
972
|
export type VoiceServerCallLifecycleMessage = {
|
|
714
|
-
type:
|
|
973
|
+
type: "call_lifecycle";
|
|
715
974
|
event: VoiceCallLifecycleEvent;
|
|
716
975
|
sessionId: string;
|
|
717
976
|
};
|
|
718
977
|
export type VoiceServerErrorMessage = {
|
|
719
|
-
type:
|
|
978
|
+
type: "error";
|
|
720
979
|
message: string;
|
|
721
980
|
recoverable?: boolean;
|
|
722
981
|
};
|
|
723
982
|
export type VoiceServerPongMessage = {
|
|
724
|
-
type:
|
|
983
|
+
type: "pong";
|
|
725
984
|
};
|
|
726
|
-
export type
|
|
985
|
+
export type VoiceServerConnectionMessage = {
|
|
986
|
+
type: "connection";
|
|
987
|
+
reconnect: VoiceReconnectClientState;
|
|
988
|
+
};
|
|
989
|
+
export type VoiceServerMessage<TResult = unknown> = VoiceServerSessionMessage | VoiceServerReplayMessage<TResult> | VoiceServerPartialMessage | VoiceServerFinalMessage | VoiceServerTurnMessage<TResult> | VoiceServerAssistantMessage | VoiceServerAudioMessage | VoiceServerCallLifecycleMessage | VoiceServerCompleteMessage | VoiceServerErrorMessage | VoiceServerPongMessage | VoiceServerConnectionMessage;
|
|
727
990
|
export type VoiceConnectionOptions = {
|
|
991
|
+
browserMedia?: false | VoiceBrowserMediaReporterOptions;
|
|
728
992
|
protocols?: string[];
|
|
729
993
|
scenarioId?: string;
|
|
730
994
|
reconnect?: boolean;
|
|
995
|
+
reconnectReportPath?: string;
|
|
731
996
|
maxReconnectAttempts?: number;
|
|
732
997
|
pingInterval?: number;
|
|
733
998
|
sessionId?: string;
|
|
734
999
|
};
|
|
1000
|
+
export type VoiceBrowserMediaReportPayload = {
|
|
1001
|
+
at: number;
|
|
1002
|
+
continuity?: MediaWebRTCStreamContinuityReport;
|
|
1003
|
+
report: MediaWebRTCStatsReport;
|
|
1004
|
+
scenarioId?: string | null;
|
|
1005
|
+
sessionId?: string | null;
|
|
1006
|
+
};
|
|
1007
|
+
export type VoiceBrowserMediaReporterOptions = Omit<MediaWebRTCStatsReportInput, "peerConnection"> & {
|
|
1008
|
+
fetch?: typeof fetch;
|
|
1009
|
+
getPeerConnection?: (() => MediaWebRTCStatsCollector | null | undefined) | (() => Promise<MediaWebRTCStatsCollector | null | undefined>);
|
|
1010
|
+
getScenarioId?: () => string | null | undefined;
|
|
1011
|
+
getSessionId?: () => string | null | undefined;
|
|
1012
|
+
intervalMs?: number;
|
|
1013
|
+
continuity?: false | Omit<MediaWebRTCStreamContinuityInput, "previousStats" | "stats">;
|
|
1014
|
+
onError?: (error: unknown) => void;
|
|
1015
|
+
onReport?: (payload: VoiceBrowserMediaReportPayload) => void;
|
|
1016
|
+
path?: string;
|
|
1017
|
+
peerConnection?: MediaWebRTCStatsCollector;
|
|
1018
|
+
};
|
|
735
1019
|
export type VoiceCaptureOptions = {
|
|
736
1020
|
channelCount?: 1 | 2;
|
|
1021
|
+
onAudio?: (audio: Uint8Array | ArrayBuffer, sendAudio: (audio: Uint8Array | ArrayBuffer) => void) => void;
|
|
737
1022
|
onLevel?: (level: number) => void;
|
|
738
1023
|
sampleRateHz?: number;
|
|
739
1024
|
};
|
|
@@ -747,6 +1032,46 @@ export type VoiceBargeInOptions = {
|
|
|
747
1032
|
enabled?: boolean;
|
|
748
1033
|
interruptOnPartial?: boolean;
|
|
749
1034
|
interruptThreshold?: number;
|
|
1035
|
+
monitor?: VoiceBargeInMonitor;
|
|
1036
|
+
};
|
|
1037
|
+
export type VoiceBargeInTriggerReason = "input-level" | "manual-audio" | "manual-interrupt" | "partial-transcript";
|
|
1038
|
+
export type VoiceBargeInMonitorEvent = {
|
|
1039
|
+
at: number;
|
|
1040
|
+
id: string;
|
|
1041
|
+
latencyMs?: number;
|
|
1042
|
+
playbackStopLatencyMs?: number;
|
|
1043
|
+
reason: VoiceBargeInTriggerReason;
|
|
1044
|
+
sessionId?: string | null;
|
|
1045
|
+
status: "requested" | "stopped" | "skipped";
|
|
1046
|
+
thresholdMs?: number;
|
|
1047
|
+
};
|
|
1048
|
+
export type VoiceBargeInMonitorSnapshot = {
|
|
1049
|
+
averageLatencyMs?: number;
|
|
1050
|
+
events: VoiceBargeInMonitorEvent[];
|
|
1051
|
+
failed: number;
|
|
1052
|
+
lastEvent?: VoiceBargeInMonitorEvent;
|
|
1053
|
+
passed: number;
|
|
1054
|
+
status: "empty" | "fail" | "pass" | "warn";
|
|
1055
|
+
thresholdMs: number;
|
|
1056
|
+
total: number;
|
|
1057
|
+
};
|
|
1058
|
+
export type VoiceBargeInMonitor = {
|
|
1059
|
+
getSnapshot: () => VoiceBargeInMonitorSnapshot;
|
|
1060
|
+
recordRequested: (input: {
|
|
1061
|
+
reason: VoiceBargeInTriggerReason;
|
|
1062
|
+
sessionId?: string | null;
|
|
1063
|
+
}) => VoiceBargeInMonitorEvent;
|
|
1064
|
+
recordSkipped: (input: {
|
|
1065
|
+
reason: VoiceBargeInTriggerReason;
|
|
1066
|
+
sessionId?: string | null;
|
|
1067
|
+
}) => VoiceBargeInMonitorEvent;
|
|
1068
|
+
recordStopped: (input: {
|
|
1069
|
+
latencyMs?: number;
|
|
1070
|
+
playbackStopLatencyMs?: number;
|
|
1071
|
+
reason: VoiceBargeInTriggerReason;
|
|
1072
|
+
sessionId?: string | null;
|
|
1073
|
+
}) => VoiceBargeInMonitorEvent;
|
|
1074
|
+
subscribe: (subscriber: () => void) => () => void;
|
|
750
1075
|
};
|
|
751
1076
|
export type VoiceAudioPlayerOptions = {
|
|
752
1077
|
autoStart?: boolean;
|
|
@@ -757,10 +1082,10 @@ export type VoiceDuplexControllerOptions = VoiceControllerOptions & {
|
|
|
757
1082
|
audioPlayer?: VoiceAudioPlayerOptions;
|
|
758
1083
|
bargeIn?: VoiceBargeInOptions;
|
|
759
1084
|
};
|
|
760
|
-
export type VoiceSTTRoutingGoal =
|
|
761
|
-
export type VoiceSTTRoutingCorrectionMode =
|
|
1085
|
+
export type VoiceSTTRoutingGoal = "best" | "low-cost";
|
|
1086
|
+
export type VoiceSTTRoutingCorrectionMode = "generic" | "none" | "risky-turn";
|
|
762
1087
|
export type VoiceSTTRoutingStrategy = {
|
|
763
|
-
benchmarkSessionTarget:
|
|
1088
|
+
benchmarkSessionTarget: "deepgram-corrected" | "deepgram-flux";
|
|
764
1089
|
correctionMode: VoiceSTTRoutingCorrectionMode;
|
|
765
1090
|
goal: VoiceSTTRoutingGoal;
|
|
766
1091
|
notes: string[];
|
|
@@ -774,7 +1099,7 @@ export type VoiceHTMXRenderInput<TResult = unknown, TSession extends VoiceSessio
|
|
|
774
1099
|
result?: TResult;
|
|
775
1100
|
session?: TSession;
|
|
776
1101
|
sessionId?: string;
|
|
777
|
-
status: VoiceSessionStatus |
|
|
1102
|
+
status: VoiceSessionStatus | "idle";
|
|
778
1103
|
turnCount: number;
|
|
779
1104
|
turns: VoiceTurnRecord<TResult>[];
|
|
780
1105
|
};
|
|
@@ -802,9 +1127,11 @@ export type VoiceHTMXOptions<TSession extends VoiceSessionRecord = VoiceSessionR
|
|
|
802
1127
|
export type VoiceHTMXConfig<TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoiceHTMXRenderer<TSession, TResult> | VoiceHTMXOptions<TSession, TResult>;
|
|
803
1128
|
export type VoiceStreamState<TResult = unknown> = {
|
|
804
1129
|
call: VoiceCallLifecycleState | null;
|
|
1130
|
+
sessionMetadata: Record<string, unknown> | null;
|
|
805
1131
|
sessionId: string | null;
|
|
806
1132
|
scenarioId: string | null;
|
|
807
|
-
status: VoiceSessionStatus |
|
|
1133
|
+
status: VoiceSessionStatus | "idle";
|
|
1134
|
+
reconnect: VoiceReconnectClientState;
|
|
808
1135
|
partial: string;
|
|
809
1136
|
turns: VoiceTurnRecord<TResult>[];
|
|
810
1137
|
assistantTexts: string[];
|
|
@@ -819,7 +1146,7 @@ export type VoiceStreamState<TResult = unknown> = {
|
|
|
819
1146
|
};
|
|
820
1147
|
export type VoiceStream<TResult = unknown> = {
|
|
821
1148
|
call: VoiceCallLifecycleState | null;
|
|
822
|
-
callControl: (message: Omit<VoiceClientCallControlMessage,
|
|
1149
|
+
callControl: (message: Omit<VoiceClientCallControlMessage, "type">) => void;
|
|
823
1150
|
close: () => void;
|
|
824
1151
|
start: (input?: {
|
|
825
1152
|
scenarioId?: string;
|
|
@@ -831,10 +1158,13 @@ export type VoiceStream<TResult = unknown> = {
|
|
|
831
1158
|
getSnapshot: () => VoiceStreamState<TResult>;
|
|
832
1159
|
isConnected: boolean;
|
|
833
1160
|
partial: string;
|
|
1161
|
+
reconnect: VoiceReconnectClientState;
|
|
834
1162
|
sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
|
|
1163
|
+
simulateDisconnect: () => void;
|
|
835
1164
|
sessionId: string | null;
|
|
1165
|
+
sessionMetadata: Record<string, unknown> | null;
|
|
836
1166
|
scenarioId: string | null;
|
|
837
|
-
status: VoiceSessionStatus |
|
|
1167
|
+
status: VoiceSessionStatus | "idle";
|
|
838
1168
|
subscribe: (subscriber: () => void) => () => void;
|
|
839
1169
|
turns: VoiceTurnRecord<TResult>[];
|
|
840
1170
|
assistantTexts: string[];
|
|
@@ -860,7 +1190,7 @@ export type VoiceAudioPlayerState = {
|
|
|
860
1190
|
queuedChunkCount: number;
|
|
861
1191
|
};
|
|
862
1192
|
export type VoiceAudioPlayerSource = {
|
|
863
|
-
assistantAudio: VoiceStreamState[
|
|
1193
|
+
assistantAudio: VoiceStreamState["assistantAudio"];
|
|
864
1194
|
subscribe: (subscriber: () => void) => () => void;
|
|
865
1195
|
};
|
|
866
1196
|
export type VoiceAudioPlayer = {
|
|
@@ -887,7 +1217,7 @@ export type VoiceBargeInBinding = {
|
|
|
887
1217
|
export type VoiceController<TResult = unknown> = {
|
|
888
1218
|
bindHTMX: (options: VoiceHTMXBindingOptions) => () => void;
|
|
889
1219
|
call: VoiceCallLifecycleState | null;
|
|
890
|
-
callControl: (message: Omit<VoiceClientCallControlMessage,
|
|
1220
|
+
callControl: (message: Omit<VoiceClientCallControlMessage, "type">) => void;
|
|
891
1221
|
close: () => void;
|
|
892
1222
|
endTurn: () => void;
|
|
893
1223
|
start: (input?: {
|
|
@@ -900,12 +1230,15 @@ export type VoiceController<TResult = unknown> = {
|
|
|
900
1230
|
isConnected: boolean;
|
|
901
1231
|
isRecording: boolean;
|
|
902
1232
|
partial: string;
|
|
1233
|
+
reconnect: VoiceReconnectClientState;
|
|
903
1234
|
recordingError: string | null;
|
|
904
1235
|
sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
|
|
1236
|
+
simulateDisconnect: () => void;
|
|
905
1237
|
sessionId: string | null;
|
|
1238
|
+
sessionMetadata: Record<string, unknown> | null;
|
|
906
1239
|
scenarioId: string | null;
|
|
907
1240
|
startRecording: () => Promise<void>;
|
|
908
|
-
status: VoiceSessionStatus |
|
|
1241
|
+
status: VoiceSessionStatus | "idle";
|
|
909
1242
|
stopRecording: () => void;
|
|
910
1243
|
subscribe: (subscriber: () => void) => () => void;
|
|
911
1244
|
toggleRecording: () => Promise<void>;
|
|
@@ -929,40 +1262,54 @@ export type VoiceHTMXBindingOptions = {
|
|
|
929
1262
|
sessionQueryParam?: string;
|
|
930
1263
|
};
|
|
931
1264
|
export type VoiceStoreAction<TResult = unknown> = {
|
|
932
|
-
type:
|
|
1265
|
+
type: "session";
|
|
933
1266
|
sessionId: string;
|
|
1267
|
+
sessionMetadata?: Record<string, unknown>;
|
|
934
1268
|
scenarioId?: string;
|
|
935
1269
|
status: VoiceSessionStatus;
|
|
936
1270
|
} | {
|
|
937
|
-
type:
|
|
1271
|
+
type: "replay";
|
|
1272
|
+
assistantTexts: string[];
|
|
1273
|
+
call?: VoiceCallLifecycleState;
|
|
1274
|
+
partial: string;
|
|
1275
|
+
scenarioId?: string;
|
|
1276
|
+
sessionId: string;
|
|
1277
|
+
sessionMetadata?: Record<string, unknown>;
|
|
1278
|
+
status: VoiceSessionStatus;
|
|
1279
|
+
turns: VoiceTurnRecord<TResult>[];
|
|
1280
|
+
} | {
|
|
1281
|
+
type: "call_lifecycle";
|
|
938
1282
|
event: VoiceCallLifecycleEvent;
|
|
939
1283
|
sessionId: string;
|
|
940
1284
|
} | {
|
|
941
|
-
type:
|
|
1285
|
+
type: "partial";
|
|
942
1286
|
transcript: Transcript;
|
|
943
1287
|
} | {
|
|
944
|
-
type:
|
|
1288
|
+
type: "final";
|
|
945
1289
|
transcript: Transcript;
|
|
946
1290
|
} | {
|
|
947
|
-
type:
|
|
1291
|
+
type: "turn";
|
|
948
1292
|
turn: VoiceTurnRecord<TResult>;
|
|
949
1293
|
} | {
|
|
950
|
-
type:
|
|
1294
|
+
type: "assistant";
|
|
951
1295
|
text: string;
|
|
952
1296
|
} | {
|
|
953
|
-
type:
|
|
1297
|
+
type: "audio";
|
|
954
1298
|
chunk: Uint8Array;
|
|
955
1299
|
format: AudioFormat;
|
|
956
1300
|
receivedAt: number;
|
|
957
1301
|
turnId?: string;
|
|
958
1302
|
} | {
|
|
959
|
-
type:
|
|
1303
|
+
type: "complete";
|
|
960
1304
|
sessionId: string;
|
|
961
1305
|
} | {
|
|
962
|
-
type:
|
|
1306
|
+
type: "error";
|
|
963
1307
|
message: string;
|
|
964
1308
|
} | {
|
|
965
|
-
type:
|
|
1309
|
+
type: "connected";
|
|
1310
|
+
} | {
|
|
1311
|
+
type: "connection";
|
|
1312
|
+
reconnect: VoiceReconnectClientState;
|
|
966
1313
|
} | {
|
|
967
|
-
type:
|
|
1314
|
+
type: "disconnected";
|
|
968
1315
|
};
|