@absolutejs/voice 0.0.22-beta.6 → 0.0.22-beta.600

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.
Files changed (495) hide show
  1. package/LICENSE +88 -0
  2. package/README.md +4518 -951
  3. package/dist/angular/index.d.ts +36 -2
  4. package/dist/angular/index.js +4610 -320
  5. package/dist/angular/voice-agent-squad-status.service.d.ts +12 -0
  6. package/dist/angular/voice-call-debugger.service.d.ts +12 -0
  7. package/dist/angular/voice-call-player.service.d.ts +19 -0
  8. package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
  9. package/dist/angular/voice-controller.service.d.ts +4 -1
  10. package/dist/angular/voice-cost-dashboard.service.d.ts +15 -0
  11. package/dist/angular/voice-delivery-runtime.service.d.ts +16 -0
  12. package/dist/angular/voice-live-agent-console.service.d.ts +16 -0
  13. package/dist/angular/voice-live-call-viewer.service.d.ts +16 -0
  14. package/dist/angular/voice-live-ops.service.d.ts +11 -0
  15. package/dist/angular/voice-ops-action-center.service.d.ts +13 -0
  16. package/dist/angular/voice-ops-status.service.d.ts +12 -0
  17. package/dist/angular/voice-platform-coverage.service.d.ts +12 -0
  18. package/dist/angular/voice-profile-comparison.service.d.ts +12 -0
  19. package/dist/angular/voice-proof-trends.service.d.ts +12 -0
  20. package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
  21. package/dist/angular/voice-provider-contracts.service.d.ts +12 -0
  22. package/dist/angular/voice-provider-status.service.d.ts +12 -0
  23. package/dist/angular/voice-readiness-failures.service.d.ts +13 -0
  24. package/dist/angular/voice-reconnect-profile-evidence.service.d.ts +12 -0
  25. package/dist/angular/voice-replay-timeline.service.d.ts +13 -0
  26. package/dist/angular/voice-routing-status.service.d.ts +11 -0
  27. package/dist/angular/voice-session-observability.service.d.ts +12 -0
  28. package/dist/angular/voice-session-snapshot.service.d.ts +13 -0
  29. package/dist/angular/voice-stream.service.d.ts +7 -1
  30. package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
  31. package/dist/angular/voice-turn-latency.service.d.ts +13 -0
  32. package/dist/angular/voice-turn-quality.service.d.ts +12 -0
  33. package/dist/angular/voice-widget.service.d.ts +18 -0
  34. package/dist/angular/voice-workflow-status.service.d.ts +12 -0
  35. package/dist/client/actions.d.ts +150 -2
  36. package/dist/client/agentSquadStatus.d.ts +37 -0
  37. package/dist/client/agentSquadStatusWidget.d.ts +24 -0
  38. package/dist/client/audioPlayer.d.ts +12 -2
  39. package/dist/client/bargeInMonitor.d.ts +7 -0
  40. package/dist/client/browserMedia.d.ts +8 -0
  41. package/dist/client/browserNoiseSuppression.d.ts +42 -0
  42. package/dist/client/browserVoiceSupport.d.ts +22 -0
  43. package/dist/client/callDebugger.d.ts +21 -0
  44. package/dist/client/callDebuggerWidget.d.ts +30 -0
  45. package/dist/client/callPlayer.d.ts +41 -0
  46. package/dist/client/campaignDialerProof.d.ts +25 -0
  47. package/dist/client/connection.d.ts +9 -1
  48. package/dist/client/controller.d.ts +1 -1
  49. package/dist/client/conversationAnalytics.d.ts +30 -0
  50. package/dist/client/costDashboard.d.ts +27 -0
  51. package/dist/client/createVoiceStream.d.ts +1 -1
  52. package/dist/client/deliveryRuntime.d.ts +36 -0
  53. package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
  54. package/dist/client/duplex.d.ts +2 -2
  55. package/dist/client/htmx.d.ts +1 -1
  56. package/dist/client/htmxAttributes.d.ts +24 -0
  57. package/dist/client/htmxBootstrap.js +1383 -80
  58. package/dist/client/htmxDashboardRenderers.d.ts +71 -0
  59. package/dist/client/index.d.ts +107 -7
  60. package/dist/client/index.js +11063 -103
  61. package/dist/client/liveAgentConsole.d.ts +28 -0
  62. package/dist/client/liveCallViewer.d.ts +42 -0
  63. package/dist/client/liveOps.d.ts +22 -0
  64. package/dist/client/liveOpsWidget.d.ts +23 -0
  65. package/dist/client/liveTurnLatency.d.ts +41 -0
  66. package/dist/client/microphone.d.ts +5 -4
  67. package/dist/client/opsActionCenter.d.ts +56 -0
  68. package/dist/client/opsActionCenterWidget.d.ts +29 -0
  69. package/dist/client/opsActionHistory.d.ts +21 -0
  70. package/dist/client/opsActionHistoryWidget.d.ts +11 -0
  71. package/dist/client/opsStatus.d.ts +21 -0
  72. package/dist/client/opsStatusWidget.d.ts +40 -0
  73. package/dist/client/platformCoverage.d.ts +21 -0
  74. package/dist/client/platformCoverageWidget.d.ts +38 -0
  75. package/dist/client/profileComparison.d.ts +21 -0
  76. package/dist/client/profileComparisonWidget.d.ts +41 -0
  77. package/dist/client/profileSwitchRecommendation.d.ts +21 -0
  78. package/dist/client/profileSwitchRecommendationWidget.d.ts +12 -0
  79. package/dist/client/proofTrends.d.ts +21 -0
  80. package/dist/client/proofTrendsWidget.d.ts +38 -0
  81. package/dist/client/providerCapabilities.d.ts +21 -0
  82. package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
  83. package/dist/client/providerContracts.d.ts +21 -0
  84. package/dist/client/providerContractsWidget.d.ts +37 -0
  85. package/dist/client/providerSimulationControls.d.ts +33 -0
  86. package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
  87. package/dist/client/providerStatus.d.ts +21 -0
  88. package/dist/client/providerStatusWidget.d.ts +32 -0
  89. package/dist/client/reactiveSource.d.ts +8 -0
  90. package/dist/client/readinessFailures.d.ts +21 -0
  91. package/dist/client/readinessFailuresWidget.d.ts +42 -0
  92. package/dist/client/reconnectProfileEvidence.d.ts +21 -0
  93. package/dist/client/reconnectProfileEvidenceWidget.d.ts +39 -0
  94. package/dist/client/replayTimeline.d.ts +26 -0
  95. package/dist/client/routingStatus.d.ts +21 -0
  96. package/dist/client/routingStatusWidget.d.ts +32 -0
  97. package/dist/client/sessionObservability.d.ts +21 -0
  98. package/dist/client/sessionObservabilityWidget.d.ts +31 -0
  99. package/dist/client/sessionSnapshot.d.ts +23 -0
  100. package/dist/client/sessionSnapshotWidget.d.ts +33 -0
  101. package/dist/client/store.d.ts +1 -1
  102. package/dist/client/timeStretch.d.ts +5 -0
  103. package/dist/client/traceTimeline.d.ts +21 -0
  104. package/dist/client/traceTimelineWidget.d.ts +36 -0
  105. package/dist/client/turnLatency.d.ts +24 -0
  106. package/dist/client/turnLatencyWidget.d.ts +33 -0
  107. package/dist/client/turnQuality.d.ts +21 -0
  108. package/dist/client/turnQualityWidget.d.ts +32 -0
  109. package/dist/client/voiceWidgetView.d.ts +48 -0
  110. package/dist/client/workflowStatus.d.ts +21 -0
  111. package/dist/{agent.d.ts → core/agent.d.ts} +109 -6
  112. package/dist/core/agentPerformanceReport.d.ts +40 -0
  113. package/dist/core/agentSquadContract.d.ts +98 -0
  114. package/dist/core/agentState.d.ts +12 -0
  115. package/dist/core/agentTools.d.ts +132 -0
  116. package/dist/core/aiScorecard.d.ts +32 -0
  117. package/dist/core/aiVoiceModel.d.ts +15 -0
  118. package/dist/core/amdDetector.d.ts +25 -0
  119. package/dist/{assistant.d.ts → core/assistant.d.ts} +21 -14
  120. package/dist/core/assistantExperiment.d.ts +42 -0
  121. package/dist/core/assistantHealth.d.ts +81 -0
  122. package/dist/{assistantMemory.d.ts → core/assistantMemory.d.ts} +10 -10
  123. package/dist/core/assistantMode.d.ts +22 -0
  124. package/dist/{audioConditioning.d.ts → core/audioConditioning.d.ts} +2 -2
  125. package/dist/core/audit.d.ts +131 -0
  126. package/dist/core/auditDeliveryRoutes.d.ts +85 -0
  127. package/dist/core/auditExport.d.ts +34 -0
  128. package/dist/core/auditRoutes.d.ts +66 -0
  129. package/dist/core/auditSinks.d.ts +151 -0
  130. package/dist/core/backchannel.d.ts +24 -0
  131. package/dist/core/bargeInRoutes.d.ts +56 -0
  132. package/dist/core/bookingFlow.d.ts +43 -0
  133. package/dist/core/browserCallProfiles.d.ts +120 -0
  134. package/dist/core/browserMediaRoutes.d.ts +62 -0
  135. package/dist/core/cachedTTS.d.ts +54 -0
  136. package/dist/core/calendarAdapter.d.ts +47 -0
  137. package/dist/core/calendarSlots.d.ts +35 -0
  138. package/dist/core/callDebugger.d.ts +66 -0
  139. package/dist/core/callDisposition.d.ts +38 -0
  140. package/dist/core/callQuota.d.ts +54 -0
  141. package/dist/core/callScorecard.d.ts +53 -0
  142. package/dist/core/callerCRMLinker.d.ts +29 -0
  143. package/dist/core/callerMemory.d.ts +37 -0
  144. package/dist/core/callingWindow.d.ts +26 -0
  145. package/dist/core/campaign.d.ts +795 -0
  146. package/dist/core/campaignControls.d.ts +37 -0
  147. package/dist/core/campaignDialers.d.ts +111 -0
  148. package/dist/core/campaignTemplate.d.ts +16 -0
  149. package/dist/core/competitiveCoverage.d.ts +141 -0
  150. package/dist/core/conversationSimulator.d.ts +73 -0
  151. package/dist/{correction.d.ts → core/correction.d.ts} +5 -4
  152. package/dist/core/costAccounting.d.ts +76 -0
  153. package/dist/core/costPredictor.d.ts +74 -0
  154. package/dist/core/crmCallLogger.d.ts +37 -0
  155. package/dist/core/crmContract.d.ts +70 -0
  156. package/dist/core/dataControl.d.ts +180 -0
  157. package/dist/core/debugTiming.d.ts +11 -0
  158. package/dist/core/defineVoiceAssistant.d.ts +68 -0
  159. package/dist/core/deliveryRuntime.d.ts +159 -0
  160. package/dist/core/deliverySinkRoutes.d.ts +117 -0
  161. package/dist/core/demoReadyRoutes.d.ts +98 -0
  162. package/dist/core/diagnosticsRoutes.d.ts +44 -0
  163. package/dist/core/dncRegistry.d.ts +38 -0
  164. package/dist/core/dtmfCollector.d.ts +37 -0
  165. package/dist/core/evalRoutes.d.ts +219 -0
  166. package/dist/{fileStore.d.ts → core/fileStore.d.ts} +34 -20
  167. package/dist/core/guardrails.d.ts +128 -0
  168. package/dist/core/handoff.d.ts +54 -0
  169. package/dist/core/handoffHealth.d.ts +94 -0
  170. package/dist/core/hardenedFetch.d.ts +3 -0
  171. package/dist/core/holdAudio.d.ts +23 -0
  172. package/dist/{htmx.d.ts → core/htmx.d.ts} +2 -2
  173. package/dist/core/htmxDashboardRoutes.d.ts +250 -0
  174. package/dist/core/iceServers.d.ts +34 -0
  175. package/dist/core/incidentBundle.d.ts +119 -0
  176. package/dist/core/incidentTimeline.d.ts +260 -0
  177. package/dist/core/ivrPlan.d.ts +40 -0
  178. package/dist/core/latencySlo.d.ts +56 -0
  179. package/dist/core/liveCoach.d.ts +43 -0
  180. package/dist/core/liveLatency.d.ts +78 -0
  181. package/dist/core/liveOps.d.ts +190 -0
  182. package/dist/core/llmJudge.d.ts +45 -0
  183. package/dist/{logger.d.ts → core/logger.d.ts} +1 -2
  184. package/dist/core/mcpToolset.d.ts +58 -0
  185. package/dist/core/mediaPipelineRoutes.d.ts +171 -0
  186. package/dist/core/mediaPipelineSurfaces.d.ts +48 -0
  187. package/dist/{memoryStore.d.ts → core/memoryStore.d.ts} +1 -1
  188. package/dist/core/midCallSummary.d.ts +27 -0
  189. package/dist/core/modelAdapters.d.ts +159 -0
  190. package/dist/core/monitor.d.ts +148 -0
  191. package/dist/core/multilingualProof.d.ts +77 -0
  192. package/dist/core/noShowPredictor.d.ts +46 -0
  193. package/dist/core/oauth2TokenSource.d.ts +21 -0
  194. package/dist/core/observabilityExport.d.ts +501 -0
  195. package/dist/core/openaiTTS.d.ts +18 -0
  196. package/dist/core/operationalStatus.d.ts +87 -0
  197. package/dist/core/operationsRecord.d.ts +371 -0
  198. package/dist/{ops.d.ts → core/ops.d.ts} +70 -70
  199. package/dist/core/opsActionAuditRoutes.d.ts +99 -0
  200. package/dist/core/opsConsoleRoutes.d.ts +80 -0
  201. package/dist/{opsPresets.d.ts → core/opsPresets.d.ts} +2 -2
  202. package/dist/core/opsRecovery.d.ts +137 -0
  203. package/dist/{opsRuntime.d.ts → core/opsRuntime.d.ts} +6 -6
  204. package/dist/{opsSinks.d.ts → core/opsSinks.d.ts} +19 -19
  205. package/dist/core/opsStatus.d.ts +76 -0
  206. package/dist/core/opsStatusRoutes.d.ts +33 -0
  207. package/dist/core/opsWebhook.d.ts +126 -0
  208. package/dist/core/otelExporter.d.ts +83 -0
  209. package/dist/core/outcomeContract.d.ts +146 -0
  210. package/dist/{outcomeRecipes.d.ts → core/outcomeRecipes.d.ts} +4 -4
  211. package/dist/core/pathway.d.ts +94 -0
  212. package/dist/core/pathwayCompiler.d.ts +31 -0
  213. package/dist/core/pathwayGenerator.d.ts +27 -0
  214. package/dist/core/pathwayRuntime.d.ts +57 -0
  215. package/dist/core/pathwaySlotCollector.d.ts +29 -0
  216. package/dist/core/pathwayVisualizer.d.ts +8 -0
  217. package/dist/core/phoneAgent.d.ts +139 -0
  218. package/dist/core/phoneAgentProductionSmoke.d.ts +115 -0
  219. package/dist/core/phoneProvisioning.d.ts +29 -0
  220. package/dist/core/platformCoverage.d.ts +91 -0
  221. package/dist/{plugin.d.ts → core/plugin.d.ts} +2 -2
  222. package/dist/core/postCallAnalysis.d.ts +98 -0
  223. package/dist/core/postCallSurvey.d.ts +41 -0
  224. package/dist/{postgresStore.d.ts → core/postgresStore.d.ts} +20 -9
  225. package/dist/{presets.d.ts → core/presets.d.ts} +3 -3
  226. package/dist/core/productionReadiness.d.ts +757 -0
  227. package/dist/core/profileSwitchRecommendation.d.ts +350 -0
  228. package/dist/core/promptInjectionGuard.d.ts +30 -0
  229. package/dist/core/proofAssertions.d.ts +32 -0
  230. package/dist/core/proofPack.d.ts +211 -0
  231. package/dist/core/proofRunner.d.ts +79 -0
  232. package/dist/core/proofTrends.d.ts +966 -0
  233. package/dist/core/providerAdapters.d.ts +48 -0
  234. package/dist/core/providerCapabilities.d.ts +92 -0
  235. package/dist/core/providerDecisionTraces.d.ts +130 -0
  236. package/dist/core/providerHealth.d.ts +89 -0
  237. package/dist/core/providerOrchestration.d.ts +109 -0
  238. package/dist/core/providerRouterTraces.d.ts +35 -0
  239. package/dist/core/providerRoutingContract.d.ts +71 -0
  240. package/dist/core/providerSlo.d.ts +142 -0
  241. package/dist/core/providerStackRecommendations.d.ts +188 -0
  242. package/dist/core/qualityDriftDetector.d.ts +44 -0
  243. package/dist/core/qualityRoutes.d.ts +76 -0
  244. package/dist/{queue.d.ts → core/queue.d.ts} +90 -29
  245. package/dist/core/ragTool.d.ts +52 -0
  246. package/dist/core/readinessProfiles.d.ts +45 -0
  247. package/dist/core/realtimeChannel.d.ts +136 -0
  248. package/dist/core/realtimeProviderContracts.d.ts +133 -0
  249. package/dist/core/reconnectContract.d.ts +177 -0
  250. package/dist/core/recordingRedaction.d.ts +47 -0
  251. package/dist/core/recordingStore.d.ts +60 -0
  252. package/dist/core/redaction.d.ts +13 -0
  253. package/dist/core/reminderScheduler.d.ts +43 -0
  254. package/dist/core/resilienceRoutes.d.ts +146 -0
  255. package/dist/core/retention.d.ts +37 -0
  256. package/dist/core/retryPolicy.d.ts +38 -0
  257. package/dist/core/routeAuth.d.ts +58 -0
  258. package/dist/{routing.d.ts → core/routing.d.ts} +2 -2
  259. package/dist/{runtimeOps.d.ts → core/runtimeOps.d.ts} +3 -3
  260. package/dist/{s3Store.d.ts → core/s3Store.d.ts} +12 -3
  261. package/dist/core/scorecardCalibration.d.ts +31 -0
  262. package/dist/core/scribe.d.ts +50 -0
  263. package/dist/core/semanticTurn.d.ts +37 -0
  264. package/dist/{session.d.ts → core/session.d.ts} +1 -1
  265. package/dist/core/sessionObservability.d.ts +145 -0
  266. package/dist/core/sessionReplay.d.ts +187 -0
  267. package/dist/core/sessionSnapshot.d.ts +109 -0
  268. package/dist/core/simulationSuite.d.ts +144 -0
  269. package/dist/core/sloCalibration.d.ts +185 -0
  270. package/dist/{sqliteStore.d.ts → core/sqliteStore.d.ts} +20 -9
  271. package/dist/{store.d.ts → core/store.d.ts} +1 -1
  272. package/dist/core/supervisorPermissions.d.ts +33 -0
  273. package/dist/core/supervisorPresence.d.ts +49 -0
  274. package/dist/core/telephonyMediaRoutes.d.ts +72 -0
  275. package/dist/core/telephonyOutcome.d.ts +269 -0
  276. package/dist/core/toolContract.d.ts +161 -0
  277. package/dist/core/toolRuntime.d.ts +50 -0
  278. package/dist/{trace.d.ts → core/trace.d.ts} +61 -22
  279. package/dist/core/traceDeliveryRoutes.d.ts +86 -0
  280. package/dist/core/traceTimeline.d.ts +97 -0
  281. package/dist/core/transcriptAnnotator.d.ts +41 -0
  282. package/dist/{turnDetection.d.ts → core/turnDetection.d.ts} +2 -1
  283. package/dist/core/turnLatency.d.ts +95 -0
  284. package/dist/core/turnProfiles.d.ts +3 -0
  285. package/dist/core/turnQuality.d.ts +94 -0
  286. package/dist/core/types.d.ts +1504 -0
  287. package/dist/core/vapiAdapter.d.ts +160 -0
  288. package/dist/core/variableAnalytics.d.ts +47 -0
  289. package/dist/core/voiceConfiguration.d.ts +8 -0
  290. package/dist/core/voiceMonitoring.d.ts +444 -0
  291. package/dist/core/webhookFanout.d.ts +48 -0
  292. package/dist/core/webhookVerification.d.ts +27 -0
  293. package/dist/core/whisperChannel.d.ts +50 -0
  294. package/dist/core/workflowContract.d.ts +91 -0
  295. package/dist/core/writeBehindStore.d.ts +41 -0
  296. package/dist/core/zeroDataRetention.d.ts +31 -0
  297. package/dist/drizzle/assistantMemory.d.ts +100 -0
  298. package/dist/drizzle/eval.d.ts +55 -0
  299. package/dist/drizzle/handoff.d.ts +56 -0
  300. package/dist/drizzle/incidentBundle.d.ts +55 -0
  301. package/dist/drizzle/index.d.ts +991 -0
  302. package/dist/drizzle/index.js +3059 -0
  303. package/dist/drizzle/observabilityExport.d.ts +55 -0
  304. package/dist/drizzle/proofTrends.d.ts +114 -0
  305. package/dist/drizzle/runtimeStorage.d.ts +1183 -0
  306. package/dist/drizzle/shared.d.ts +69 -0
  307. package/dist/embed/index.d.ts +38 -0
  308. package/dist/embed/index.js +1775 -0
  309. package/dist/embed/voice-widget.js +10 -0
  310. package/dist/index.d.ts +376 -46
  311. package/dist/index.js +47984 -4451
  312. package/dist/internal/evidence.d.ts +10 -0
  313. package/dist/internal/html.d.ts +6 -0
  314. package/dist/internal/status.d.ts +7 -0
  315. package/dist/react/VoiceAgentSquadStatus.d.ts +5 -0
  316. package/dist/react/VoiceCallDebuggerLaunch.d.ts +6 -0
  317. package/dist/react/VoiceCallPlayer.d.ts +11 -0
  318. package/dist/react/VoiceCostDashboard.d.ts +10 -0
  319. package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
  320. package/dist/react/VoiceLiveAgentConsole.d.ts +11 -0
  321. package/dist/react/VoiceLiveCallViewer.d.ts +9 -0
  322. package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
  323. package/dist/react/VoiceOpsStatus.d.ts +6 -0
  324. package/dist/react/VoicePlatformCoverage.d.ts +6 -0
  325. package/dist/react/VoiceProfileComparison.d.ts +6 -0
  326. package/dist/react/VoiceProfileSwitchRecommendation.d.ts +6 -0
  327. package/dist/react/VoiceProofTrends.d.ts +6 -0
  328. package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
  329. package/dist/react/VoiceProviderContracts.d.ts +6 -0
  330. package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
  331. package/dist/react/VoiceProviderStatus.d.ts +6 -0
  332. package/dist/react/VoiceReadinessFailures.d.ts +6 -0
  333. package/dist/react/VoiceReconnectProfileEvidence.d.ts +6 -0
  334. package/dist/react/VoiceReplayTimeline.d.ts +6 -0
  335. package/dist/react/VoiceRoutingStatus.d.ts +6 -0
  336. package/dist/react/VoiceSessionObservability.d.ts +6 -0
  337. package/dist/react/VoiceSessionSnapshot.d.ts +6 -0
  338. package/dist/react/VoiceTraceTimeline.d.ts +6 -0
  339. package/dist/react/VoiceTurnLatency.d.ts +6 -0
  340. package/dist/react/VoiceTurnQuality.d.ts +6 -0
  341. package/dist/react/VoiceWidget.d.ts +13 -0
  342. package/dist/react/index.d.ts +80 -2
  343. package/dist/react/index.js +13488 -252
  344. package/dist/react/useVoiceAgentSquadStatus.d.ts +8 -0
  345. package/dist/react/useVoiceCallDebugger.d.ts +8 -0
  346. package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
  347. package/dist/react/useVoiceController.d.ts +7 -1
  348. package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
  349. package/dist/react/useVoiceLiveOps.d.ts +9 -0
  350. package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
  351. package/dist/react/useVoiceOpsStatus.d.ts +8 -0
  352. package/dist/react/useVoicePlatformCoverage.d.ts +8 -0
  353. package/dist/react/useVoiceProfileComparison.d.ts +8 -0
  354. package/dist/react/useVoiceProfileSwitchRecommendation.d.ts +8 -0
  355. package/dist/react/useVoiceProofTrends.d.ts +8 -0
  356. package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
  357. package/dist/react/useVoiceProviderContracts.d.ts +8 -0
  358. package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
  359. package/dist/react/useVoiceProviderStatus.d.ts +8 -0
  360. package/dist/react/useVoiceReadinessFailures.d.ts +8 -0
  361. package/dist/react/useVoiceReconnectProfileEvidence.d.ts +8 -0
  362. package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
  363. package/dist/react/useVoiceSessionObservability.d.ts +8 -0
  364. package/dist/react/useVoiceSessionSnapshot.d.ts +9 -0
  365. package/dist/react/useVoiceStream.d.ts +7 -1
  366. package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
  367. package/dist/react/useVoiceTurnLatency.d.ts +9 -0
  368. package/dist/react/useVoiceTurnQuality.d.ts +8 -0
  369. package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
  370. package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
  371. package/dist/svelte/createVoiceCallDebugger.d.ts +10 -0
  372. package/dist/svelte/createVoiceCallPlayer.d.ts +33 -0
  373. package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
  374. package/dist/svelte/createVoiceCostDashboard.d.ts +13 -0
  375. package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
  376. package/dist/svelte/createVoiceLiveAgentConsole.d.ts +23 -0
  377. package/dist/svelte/createVoiceLiveCallViewer.d.ts +26 -0
  378. package/dist/svelte/createVoiceLiveOps.d.ts +13 -0
  379. package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
  380. package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
  381. package/dist/svelte/createVoicePlatformCoverage.d.ts +7 -0
  382. package/dist/svelte/createVoiceProfileComparison.d.ts +7 -0
  383. package/dist/svelte/createVoiceProofTrends.d.ts +7 -0
  384. package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
  385. package/dist/svelte/createVoiceProviderContracts.d.ts +10 -0
  386. package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
  387. package/dist/svelte/createVoiceProviderStatus.d.ts +10 -0
  388. package/dist/svelte/createVoiceReadinessFailures.d.ts +7 -0
  389. package/dist/svelte/createVoiceReconnectProfileEvidence.d.ts +7 -0
  390. package/dist/svelte/createVoiceReplayTimeline.d.ts +13 -0
  391. package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
  392. package/dist/svelte/createVoiceSessionObservability.d.ts +10 -0
  393. package/dist/svelte/createVoiceSessionSnapshot.d.ts +11 -0
  394. package/dist/svelte/createVoiceStream.d.ts +1 -1
  395. package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
  396. package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
  397. package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
  398. package/dist/svelte/createVoiceWidget.d.ts +19 -0
  399. package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
  400. package/dist/svelte/index.d.ts +37 -2
  401. package/dist/svelte/index.js +7013 -222
  402. package/dist/telephony/contract.d.ts +61 -0
  403. package/dist/telephony/matrix.d.ts +97 -0
  404. package/dist/telephony/plivo.d.ts +303 -0
  405. package/dist/telephony/response.d.ts +1 -1
  406. package/dist/telephony/security.d.ts +182 -0
  407. package/dist/telephony/telnyx.d.ts +291 -0
  408. package/dist/telephony/twilio.d.ts +152 -15
  409. package/dist/testing/accuracy.d.ts +1 -1
  410. package/dist/testing/benchmark.d.ts +15 -15
  411. package/dist/testing/corrected.d.ts +9 -9
  412. package/dist/testing/duplex.d.ts +5 -5
  413. package/dist/testing/fixtures.d.ts +4 -4
  414. package/dist/testing/index.d.ts +13 -11
  415. package/dist/testing/index.js +10720 -2970
  416. package/dist/testing/ioProviderSimulator.d.ts +41 -0
  417. package/dist/testing/providerSimulator.d.ts +44 -0
  418. package/dist/testing/review.d.ts +8 -8
  419. package/dist/testing/sessionBenchmark.d.ts +13 -13
  420. package/dist/testing/stt.d.ts +3 -3
  421. package/dist/testing/telephony.d.ts +27 -2
  422. package/dist/testing/tts.d.ts +2 -2
  423. package/dist/vue/VoiceCallDebuggerLaunch.d.ts +72 -0
  424. package/dist/vue/VoiceCallPlayer.d.ts +40 -0
  425. package/dist/vue/VoiceCostDashboard.d.ts +57 -0
  426. package/dist/vue/VoiceDeliveryRuntime.d.ts +34 -0
  427. package/dist/vue/VoiceLiveAgentConsole.d.ts +50 -0
  428. package/dist/vue/VoiceLiveCallViewer.d.ts +35 -0
  429. package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
  430. package/dist/vue/VoiceOpsStatus.d.ts +34 -0
  431. package/dist/vue/VoicePlatformCoverage.d.ts +27 -0
  432. package/dist/vue/VoiceProofTrends.d.ts +25 -0
  433. package/dist/vue/VoiceProviderCapabilities.d.ts +55 -0
  434. package/dist/vue/VoiceProviderContracts.d.ts +25 -0
  435. package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
  436. package/dist/vue/VoiceProviderStatus.d.ts +55 -0
  437. package/dist/vue/VoiceReadinessFailures.d.ts +25 -0
  438. package/dist/vue/VoiceReconnectProfileEvidence.d.ts +25 -0
  439. package/dist/vue/VoiceReplayTimeline.d.ts +17 -0
  440. package/dist/vue/VoiceRoutingStatus.d.ts +55 -0
  441. package/dist/vue/VoiceSessionObservability.d.ts +27 -0
  442. package/dist/vue/VoiceSessionSnapshot.d.ts +72 -0
  443. package/dist/vue/VoiceTurnLatency.d.ts +73 -0
  444. package/dist/vue/VoiceTurnQuality.d.ts +55 -0
  445. package/dist/vue/VoiceWidget.d.ts +77 -0
  446. package/dist/vue/index.d.ts +49 -2
  447. package/dist/vue/index.js +13420 -958
  448. package/dist/vue/useVoiceAgentSquadStatus.d.ts +9 -0
  449. package/dist/vue/useVoiceCallDebugger.d.ts +10 -0
  450. package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
  451. package/dist/vue/useVoiceController.d.ts +10 -7
  452. package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
  453. package/dist/vue/useVoiceLiveOps.d.ts +9 -0
  454. package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
  455. package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
  456. package/dist/vue/useVoicePlatformCoverage.d.ts +9 -0
  457. package/dist/vue/useVoiceProfileComparison.d.ts +9 -0
  458. package/dist/vue/useVoiceProofTrends.d.ts +9 -0
  459. package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
  460. package/dist/vue/useVoiceProviderContracts.d.ts +9 -0
  461. package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
  462. package/dist/vue/useVoiceProviderStatus.d.ts +9 -0
  463. package/dist/vue/useVoiceReadinessFailures.d.ts +959 -0
  464. package/dist/vue/useVoiceReconnectProfileEvidence.d.ts +9 -0
  465. package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
  466. package/dist/vue/useVoiceSessionObservability.d.ts +9 -0
  467. package/dist/vue/useVoiceSessionSnapshot.d.ts +10 -0
  468. package/dist/vue/useVoiceStream.d.ts +11 -5
  469. package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
  470. package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
  471. package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
  472. package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
  473. package/package.json +155 -256
  474. package/dist/modelAdapters.d.ts +0 -39
  475. package/dist/turnProfiles.d.ts +0 -6
  476. package/dist/types.d.ts +0 -886
  477. package/fixtures/README.md +0 -57
  478. package/fixtures/manifest.json +0 -199
  479. package/fixtures/pcm/dialogue-three-clean.pcm +0 -0
  480. package/fixtures/pcm/dialogue-three-mixed.pcm +0 -0
  481. package/fixtures/pcm/dialogue-two-clean.pcm +0 -0
  482. package/fixtures/pcm/dialogue-two-noisy.pcm +0 -0
  483. package/fixtures/pcm/multiturn-three-mixed.pcm +0 -0
  484. package/fixtures/pcm/multiturn-two-clean.pcm +0 -0
  485. package/fixtures/pcm/quietly-alone-clean.pcm +0 -0
  486. package/fixtures/pcm/rainstorms-noisy.pcm +0 -0
  487. package/fixtures/pcm/stella-bulgaria-bulgarian20.pcm +0 -0
  488. package/fixtures/pcm/stella-ghana-english507.pcm +0 -0
  489. package/fixtures/pcm/stella-india-english37.pcm +0 -0
  490. package/fixtures/pcm/stella-jamaica-jamaican-creole-english1.pcm +0 -0
  491. package/fixtures/pcm/stella-liberia-liberian-pidgin-english2.pcm +0 -0
  492. package/fixtures/pcm/stella-pakistan-english519.pcm +0 -0
  493. package/fixtures/pcm/stella-sierra-leone-krio5.pcm +0 -0
  494. package/fixtures/pcm/stella-singapore-english655.pcm +0 -0
  495. package/fixtures/pcm/traveled-back-route-clean.pcm +0 -0
package/dist/types.d.ts DELETED
@@ -1,886 +0,0 @@
1
- import type { SessionStore } from '@absolutejs/absolute';
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
- export type AudioFormat = {
7
- container: 'raw';
8
- encoding: 'alaw' | 'mulaw' | 'pcm_s16le';
9
- sampleRateHz: number;
10
- channels: 1 | 2;
11
- };
12
- export type AudioChunk = ArrayBuffer | ArrayBufferView;
13
- export type VoiceLanguageStrategy = {
14
- mode: 'auto-detect';
15
- allowedLanguages?: string[];
16
- } | {
17
- mode: 'fixed';
18
- primaryLanguage: string;
19
- secondaryLanguages?: string[];
20
- } | {
21
- mode: 'allow-switching';
22
- primaryLanguage?: string;
23
- secondaryLanguages: string[];
24
- };
25
- export type VoicePhraseHint = {
26
- text: string;
27
- aliases?: string[];
28
- boost?: number;
29
- metadata?: Record<string, unknown>;
30
- };
31
- export type VoiceCorrectionRiskTier = 'safe' | 'balanced' | 'risky';
32
- export type VoiceDomainTerm = {
33
- text: string;
34
- aliases?: string[];
35
- boost?: number;
36
- language?: string;
37
- metadata?: Record<string, unknown>;
38
- pronunciation?: string;
39
- };
40
- export type VoiceLexiconEntry = {
41
- text: string;
42
- aliases?: string[];
43
- language?: string;
44
- metadata?: Record<string, unknown>;
45
- pronunciation?: string;
46
- };
47
- export type Transcript = {
48
- id: string;
49
- text: string;
50
- isFinal: boolean;
51
- confidence?: number;
52
- language?: string;
53
- speaker?: string | number;
54
- startedAtMs?: number;
55
- endedAtMs?: number;
56
- vendor?: string;
57
- };
58
- export type VoiceTranscriptQuality = {
59
- averageConfidence?: number;
60
- confidenceSampleCount: number;
61
- correction?: VoiceTurnCorrectionDiagnostics;
62
- cost?: VoiceTurnCostEstimate;
63
- fallbackUsed: boolean;
64
- finalTranscriptCount: number;
65
- fallback?: VoiceFallbackDiagnostics;
66
- partialTranscriptCount: number;
67
- selectedTranscriptCount: number;
68
- source: 'fallback' | 'primary';
69
- };
70
- export type VoiceTurnCorrectionDiagnostics = {
71
- attempted: boolean;
72
- changed: boolean;
73
- correctedText: string;
74
- metadata?: Record<string, unknown>;
75
- originalText: string;
76
- provider?: string;
77
- reason?: string;
78
- };
79
- export type VoiceTurnCostEstimate = {
80
- estimatedRelativeCostUnits: number;
81
- fallbackAttemptCount: number;
82
- fallbackReplayAudioMs: number;
83
- primaryAudioMs: number;
84
- totalBillableAudioMs: number;
85
- };
86
- export type VoiceFallbackSelectionReason = 'fallback-empty' | 'primary-empty' | 'word-count-margin' | 'confidence-margin' | 'word-count-tiebreak' | 'kept-primary';
87
- export type VoiceFallbackDiagnostics = {
88
- attempted: boolean;
89
- fallbackConfidence?: number;
90
- fallbackText?: string;
91
- fallbackWordCount?: number;
92
- primaryConfidence: number;
93
- primaryText: string;
94
- primaryWordCount: number;
95
- selected: boolean;
96
- selectionReason: VoiceFallbackSelectionReason;
97
- trigger: 'empty-turn' | 'low-confidence' | 'empty-or-low-confidence' | 'always';
98
- };
99
- export type VoicePartialEvent = {
100
- type: 'partial';
101
- transcript: Transcript;
102
- receivedAt: number;
103
- };
104
- export type VoiceFinalEvent = {
105
- type: 'final';
106
- transcript: Transcript;
107
- receivedAt: number;
108
- };
109
- export type VoiceEndOfTurnEvent = {
110
- type: 'endOfTurn';
111
- reason: 'vendor' | 'silence' | 'manual';
112
- receivedAt: number;
113
- };
114
- export type VoiceErrorEvent = {
115
- type: 'error';
116
- error: Error;
117
- recoverable: boolean;
118
- code?: string;
119
- };
120
- export type VoiceCloseEvent = {
121
- type: 'close';
122
- code?: number;
123
- reason?: string;
124
- recoverable?: boolean;
125
- };
126
- export type STTSessionEventMap = {
127
- partial: VoicePartialEvent;
128
- final: VoiceFinalEvent;
129
- endOfTurn: VoiceEndOfTurnEvent;
130
- error: VoiceErrorEvent;
131
- close: VoiceCloseEvent;
132
- };
133
- export type STTAdapterSession = {
134
- on: <K extends keyof STTSessionEventMap>(event: K, handler: (payload: STTSessionEventMap[K]) => void | Promise<void>) => () => void;
135
- send: (audio: AudioChunk) => Promise<void>;
136
- close: (reason?: string) => Promise<void>;
137
- };
138
- export type STTAdapterOpenOptions = {
139
- sessionId: string;
140
- format: AudioFormat;
141
- languageStrategy?: VoiceLanguageStrategy;
142
- lexicon?: VoiceLexiconEntry[];
143
- phraseHints?: VoicePhraseHint[];
144
- signal?: AbortSignal;
145
- };
146
- export type STTAdapter<TOptions extends STTAdapterOpenOptions = STTAdapterOpenOptions> = {
147
- kind: 'stt';
148
- open: (options: TOptions) => Promise<STTAdapterSession> | STTAdapterSession;
149
- };
150
- export type TTSAudioEvent = {
151
- type: 'audio';
152
- chunk: AudioChunk;
153
- format: AudioFormat;
154
- receivedAt: number;
155
- };
156
- export type TTSSessionEventMap = {
157
- audio: TTSAudioEvent;
158
- error: VoiceErrorEvent;
159
- close: VoiceCloseEvent;
160
- };
161
- export type TTSAdapterSession = {
162
- on: <K extends keyof TTSSessionEventMap>(event: K, handler: (payload: TTSSessionEventMap[K]) => void | Promise<void>) => () => void;
163
- send: (text: string) => Promise<void>;
164
- close: (reason?: string) => Promise<void>;
165
- };
166
- export type TTSAdapterOpenOptions = {
167
- sessionId: string;
168
- lexicon?: VoiceLexiconEntry[];
169
- signal?: AbortSignal;
170
- };
171
- export type TTSAdapter<TOptions extends TTSAdapterOpenOptions = TTSAdapterOpenOptions> = {
172
- kind: 'tts';
173
- open: (options: TOptions) => Promise<TTSAdapterSession> | TTSAdapterSession;
174
- };
175
- export type RealtimeSessionEventMap = STTSessionEventMap & {
176
- audio: TTSAudioEvent;
177
- };
178
- export type RealtimeAdapterSession = {
179
- on: <K extends keyof RealtimeSessionEventMap>(event: K, handler: (payload: RealtimeSessionEventMap[K]) => void | Promise<void>) => () => void;
180
- send: (input: AudioChunk | string) => Promise<void>;
181
- close: (reason?: string) => Promise<void>;
182
- };
183
- export type RealtimeAdapterOpenOptions = {
184
- sessionId: string;
185
- format: AudioFormat;
186
- languageStrategy?: VoiceLanguageStrategy;
187
- lexicon?: VoiceLexiconEntry[];
188
- phraseHints?: VoicePhraseHint[];
189
- signal?: AbortSignal;
190
- };
191
- export type RealtimeAdapter<TOptions extends RealtimeAdapterOpenOptions = RealtimeAdapterOpenOptions> = {
192
- kind: 'realtime';
193
- open: (options: TOptions) => Promise<RealtimeAdapterSession> | RealtimeAdapterSession;
194
- };
195
- export type VoiceSessionStatus = 'active' | 'reconnecting' | 'completed' | 'failed';
196
- export type VoiceTurnRecord<TResult = unknown> = {
197
- id: string;
198
- text: string;
199
- quality?: VoiceTranscriptQuality;
200
- transcripts: Transcript[];
201
- assistantText?: string;
202
- committedAt: number;
203
- result?: TResult;
204
- };
205
- export type VoiceCostTelemetryConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
206
- fallbackPassCostUnit?: number;
207
- onTurnCost?: (input: {
208
- api: VoiceSessionHandle<TContext, TSession, TResult>;
209
- context: TContext;
210
- estimate: VoiceTurnCostEstimate;
211
- session: TSession;
212
- turn: VoiceTurnRecord<TResult>;
213
- }) => Promise<void> | void;
214
- primaryPassCostUnit?: number;
215
- };
216
- export type VoiceSessionRecord<TMeta = Record<string, never>, TResult = unknown> = {
217
- id: string;
218
- createdAt: number;
219
- lastActivityAt?: number;
220
- status: VoiceSessionStatus;
221
- transcripts: Transcript[];
222
- currentTurn: {
223
- transcripts: Transcript[];
224
- partialText: string;
225
- partialStartedAt?: number;
226
- partialEndedAt?: number;
227
- finalText: string;
228
- lastAudioAt?: number;
229
- lastSpeechAt?: number;
230
- lastTranscriptAt?: number;
231
- silenceStartedAt?: number;
232
- };
233
- turns: VoiceTurnRecord<TResult>[];
234
- committedTurnIds: string[];
235
- reconnect: {
236
- attempts: number;
237
- lastDisconnectAt?: number;
238
- };
239
- lastCommittedTurn?: {
240
- signature: string;
241
- text: string;
242
- transcriptIds: string[];
243
- committedAt: number;
244
- };
245
- call?: VoiceCallLifecycleState;
246
- metadata?: TMeta;
247
- scenarioId?: string;
248
- };
249
- export type VoiceSessionSummary = {
250
- id: string;
251
- createdAt: number;
252
- lastActivityAt?: number;
253
- status: VoiceSessionStatus;
254
- turnCount: number;
255
- };
256
- export type VoiceCallDisposition = 'completed' | 'transferred' | 'escalated' | 'voicemail' | 'no-answer' | 'failed' | 'closed';
257
- export type VoiceCallLifecycleEvent = {
258
- at: number;
259
- type: 'start' | 'end' | 'transfer' | 'escalation' | 'voicemail' | 'no-answer';
260
- disposition?: VoiceCallDisposition;
261
- metadata?: Record<string, unknown>;
262
- reason?: string;
263
- target?: string;
264
- };
265
- export type VoiceCallLifecycleState = {
266
- disposition?: VoiceCallDisposition;
267
- endedAt?: number;
268
- events: VoiceCallLifecycleEvent[];
269
- lastEventAt: number;
270
- startedAt: number;
271
- };
272
- export type VoiceSessionStore<TSession extends VoiceSessionRecord = VoiceSessionRecord> = SessionStore<TSession, VoiceSessionSummary>;
273
- export type VoiceLogger = {
274
- debug?: (message: string, meta?: Record<string, unknown>) => void;
275
- info?: (message: string, meta?: Record<string, unknown>) => void;
276
- warn?: (message: string, meta?: Record<string, unknown>) => void;
277
- error?: (message: string, meta?: Record<string, unknown>) => void;
278
- };
279
- export type VoiceReconnectConfig = {
280
- strategy?: 'resume-last-turn' | 'restart' | 'fail';
281
- timeout?: number;
282
- maxAttempts?: number;
283
- };
284
- export type VoiceRuntimePreset = 'default' | 'chat' | 'guided-intake' | 'dictation' | 'noisy-room' | 'pstn-balanced' | 'pstn-fast' | 'reliability';
285
- export type VoiceSTTLifecycle = 'continuous' | 'turn-scoped';
286
- export type VoiceTurnProfile = 'fast' | 'balanced' | 'long-form';
287
- export type VoiceTurnQualityProfile = 'general' | 'accent-heavy' | 'noisy-room' | 'short-command';
288
- export type VoiceTurnFallbackTrigger = 'empty-turn' | 'low-confidence' | 'empty-or-low-confidence' | 'always';
289
- export type VoiceSTTFallbackConfig = {
290
- adapter: STTAdapter;
291
- trigger?: VoiceTurnFallbackTrigger;
292
- confidenceThreshold?: number;
293
- minTextLength?: number;
294
- replayWindowMs?: number;
295
- settleMs?: number;
296
- completionTimeoutMs?: number;
297
- maxAttemptsPerTurn?: number;
298
- };
299
- export type VoiceResolvedSTTFallbackConfig = {
300
- adapter: STTAdapter;
301
- trigger: VoiceTurnFallbackTrigger;
302
- confidenceThreshold: number;
303
- minTextLength: number;
304
- replayWindowMs: number;
305
- settleMs: number;
306
- completionTimeoutMs: number;
307
- maxAttemptsPerTurn: number;
308
- };
309
- export type VoiceTurnDetectionConfig = {
310
- profile?: VoiceTurnProfile;
311
- qualityProfile?: VoiceTurnQualityProfile;
312
- silenceMs?: number;
313
- speechThreshold?: number;
314
- transcriptStabilityMs?: number;
315
- };
316
- export type VoiceResolvedTurnDetectionConfig = {
317
- qualityProfile: VoiceTurnQualityProfile;
318
- profile: VoiceTurnProfile;
319
- silenceMs: number;
320
- speechThreshold: number;
321
- transcriptStabilityMs: number;
322
- };
323
- export type VoiceAudioConditioningConfig = {
324
- enabled?: boolean;
325
- targetLevel?: number;
326
- maxGain?: number;
327
- noiseGateThreshold?: number;
328
- noiseGateAttenuation?: number;
329
- };
330
- export type VoiceResolvedAudioConditioningConfig = {
331
- enabled: true;
332
- targetLevel: number;
333
- maxGain: number;
334
- noiseGateThreshold: number;
335
- noiseGateAttenuation: number;
336
- };
337
- export type VoiceSocket = {
338
- send: (data: string | Uint8Array | ArrayBuffer) => void | Promise<void>;
339
- close: (code?: number, reason?: string) => void | Promise<void>;
340
- };
341
- export type VoiceSessionHandle<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
342
- id: string;
343
- connect: (socket: VoiceSocket) => Promise<void>;
344
- receiveAudio: (audio: AudioChunk) => Promise<void>;
345
- commitTurn: (reason?: VoiceEndOfTurnEvent['reason']) => Promise<void>;
346
- disconnect: (event?: VoiceCloseEvent) => Promise<void>;
347
- complete: (result?: TResult) => Promise<void>;
348
- escalate: (input: {
349
- metadata?: Record<string, unknown>;
350
- reason: string;
351
- result?: TResult;
352
- }) => Promise<void>;
353
- fail: (error: unknown) => Promise<void>;
354
- markNoAnswer: (input?: {
355
- metadata?: Record<string, unknown>;
356
- result?: TResult;
357
- }) => Promise<void>;
358
- markVoicemail: (input?: {
359
- metadata?: Record<string, unknown>;
360
- result?: TResult;
361
- }) => Promise<void>;
362
- transfer: (input: {
363
- metadata?: Record<string, unknown>;
364
- reason?: string;
365
- result?: TResult;
366
- target: string;
367
- }) => Promise<void>;
368
- close: (reason?: string) => Promise<void>;
369
- snapshot: () => Promise<TSession>;
370
- };
371
- export type VoiceRouteResult<TResult = unknown> = {
372
- complete?: boolean;
373
- result?: TResult;
374
- assistantText?: string;
375
- transfer?: {
376
- metadata?: Record<string, unknown>;
377
- reason?: string;
378
- target: string;
379
- };
380
- escalate?: {
381
- metadata?: Record<string, unknown>;
382
- reason: string;
383
- };
384
- voicemail?: {
385
- metadata?: Record<string, unknown>;
386
- };
387
- noAnswer?: {
388
- metadata?: Record<string, unknown>;
389
- };
390
- };
391
- export type VoiceTurnCorrectionResult = string | {
392
- text: string;
393
- reason?: string;
394
- provider?: string;
395
- metadata?: Record<string, unknown>;
396
- };
397
- export type VoiceTurnCorrectionHandler<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = (input: {
398
- api: VoiceSessionHandle<TContext, TSession, TResult>;
399
- context: TContext;
400
- fallback?: VoiceFallbackDiagnostics;
401
- lexicon: VoiceLexiconEntry[];
402
- phraseHints: VoicePhraseHint[];
403
- session: TSession;
404
- text: string;
405
- transcripts: Transcript[];
406
- }) => Promise<VoiceTurnCorrectionResult | void> | VoiceTurnCorrectionResult | void;
407
- export type VoicePhraseHintResolver<TContext = unknown> = (input: {
408
- context: TContext;
409
- scenarioId?: string;
410
- sessionId: string;
411
- }) => Promise<VoicePhraseHint[] | void> | VoicePhraseHint[] | void;
412
- export type VoiceLexiconResolver<TContext = unknown> = (input: {
413
- context: TContext;
414
- scenarioId?: string;
415
- sessionId: string;
416
- }) => Promise<VoiceLexiconEntry[] | void> | VoiceLexiconEntry[] | void;
417
- export type VoiceOnTurnObjectHandler<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = (input: {
418
- context: TContext;
419
- session: TSession;
420
- turn: VoiceTurnRecord;
421
- api: VoiceSessionHandle<TContext, TSession, TResult>;
422
- }) => Promise<VoiceRouteResult<TResult> | void> | VoiceRouteResult<TResult> | void;
423
- export type VoiceOnTurnHandler<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoiceOnTurnObjectHandler<TContext, TSession, TResult> | ((session: TSession, turn: VoiceTurnRecord, api: VoiceSessionHandle<TContext, TSession, TResult>, context: TContext) => Promise<VoiceRouteResult<TResult> | void> | VoiceRouteResult<TResult> | void);
424
- export type VoiceRouteConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
425
- onCallStart?: (input: {
426
- context: TContext;
427
- session: TSession;
428
- api: VoiceSessionHandle<TContext, TSession, TResult>;
429
- }) => Promise<void> | void;
430
- onCallEnd?: (input: {
431
- api: VoiceSessionHandle<TContext, TSession, TResult>;
432
- context: TContext;
433
- disposition: VoiceCallDisposition;
434
- metadata?: Record<string, unknown>;
435
- reason?: string;
436
- session: TSession;
437
- target?: string;
438
- }) => Promise<void> | void;
439
- onSession?: (input: {
440
- context: TContext;
441
- session: TSession;
442
- api: VoiceSessionHandle<TContext, TSession, TResult>;
443
- }) => Promise<void> | void;
444
- correctTurn?: VoiceTurnCorrectionHandler<TContext, TSession, TResult>;
445
- onTurn: VoiceOnTurnHandler<TContext, TSession, TResult>;
446
- onComplete: (input: {
447
- context: TContext;
448
- session: TSession;
449
- api: VoiceSessionHandle<TContext, TSession, TResult>;
450
- }) => Promise<void> | void;
451
- onError?: (input: {
452
- context: TContext;
453
- sessionId: string;
454
- session?: TSession;
455
- error: unknown;
456
- api?: VoiceSessionHandle<TContext, TSession, TResult>;
457
- }) => Promise<void> | void;
458
- onEscalation?: (input: {
459
- api: VoiceSessionHandle<TContext, TSession, TResult>;
460
- context: TContext;
461
- metadata?: Record<string, unknown>;
462
- reason: string;
463
- session: TSession;
464
- }) => Promise<void> | void;
465
- onNoAnswer?: (input: {
466
- api: VoiceSessionHandle<TContext, TSession, TResult>;
467
- context: TContext;
468
- metadata?: Record<string, unknown>;
469
- session: TSession;
470
- }) => Promise<void> | void;
471
- onTransfer?: (input: {
472
- api: VoiceSessionHandle<TContext, TSession, TResult>;
473
- context: TContext;
474
- metadata?: Record<string, unknown>;
475
- reason?: string;
476
- session: TSession;
477
- target: string;
478
- }) => Promise<void> | void;
479
- onVoicemail?: (input: {
480
- api: VoiceSessionHandle<TContext, TSession, TResult>;
481
- context: TContext;
482
- metadata?: Record<string, unknown>;
483
- session: TSession;
484
- }) => Promise<void> | void;
485
- };
486
- export type VoiceRuntimeOpsConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
487
- buildReview?: (input: {
488
- api: VoiceSessionHandle<TContext, TSession, TResult>;
489
- context: TContext;
490
- disposition: VoiceCallDisposition;
491
- metadata?: Record<string, unknown>;
492
- reason?: string;
493
- result?: TResult;
494
- session: TSession;
495
- target?: string;
496
- }) => Promise<VoiceCallReviewArtifact | StoredVoiceCallReviewArtifact | void> | VoiceCallReviewArtifact | StoredVoiceCallReviewArtifact | void;
497
- createTaskFromReview?: (input: {
498
- api: VoiceSessionHandle<TContext, TSession, TResult>;
499
- context: TContext;
500
- disposition: VoiceCallDisposition;
501
- review: StoredVoiceCallReviewArtifact;
502
- session: TSession;
503
- }) => Promise<Omit<VoiceOpsTask, 'id'> | VoiceOpsTask | StoredVoiceOpsTask | null | void> | Omit<VoiceOpsTask, 'id'> | VoiceOpsTask | StoredVoiceOpsTask | null | void;
504
- resolveTaskPolicy?: (input: {
505
- api: VoiceSessionHandle<TContext, TSession, TResult>;
506
- context: TContext;
507
- disposition: VoiceCallDisposition;
508
- metadata?: Record<string, unknown>;
509
- reason?: string;
510
- review?: StoredVoiceCallReviewArtifact;
511
- session: TSession;
512
- target?: string;
513
- task: StoredVoiceOpsTask;
514
- }) => Promise<VoiceOpsTaskPolicy | void> | VoiceOpsTaskPolicy | void;
515
- resolveTaskAssignment?: (input: {
516
- api: VoiceSessionHandle<TContext, TSession, TResult>;
517
- context: TContext;
518
- disposition: VoiceCallDisposition;
519
- metadata?: Record<string, unknown>;
520
- reason?: string;
521
- review?: StoredVoiceCallReviewArtifact;
522
- session: TSession;
523
- target?: string;
524
- task: StoredVoiceOpsTask;
525
- }) => Promise<VoiceOpsTaskAssignmentRule | void> | VoiceOpsTaskAssignmentRule | void;
526
- taskAssignmentRules?: VoiceOpsTaskAssignmentRules;
527
- taskPolicies?: VoiceOpsDispositionTaskPolicies;
528
- events?: VoiceIntegrationEventStore;
529
- onEvent?: (input: {
530
- api: VoiceSessionHandle<TContext, TSession, TResult>;
531
- context: TContext;
532
- event: StoredVoiceIntegrationEvent;
533
- session: TSession;
534
- }) => Promise<void> | void;
535
- reviews?: VoiceCallReviewStore;
536
- sinks?: VoiceIntegrationSink[];
537
- tasks?: VoiceOpsTaskStore;
538
- webhook?: VoiceIntegrationWebhookConfig;
539
- };
540
- export type VoiceNormalizedRouteConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = Omit<VoiceRouteConfig<TContext, TSession, TResult>, 'onTurn'> & {
541
- onTurn: VoiceOnTurnObjectHandler<TContext, TSession, TResult>;
542
- };
543
- export type VoiceScenario = {
544
- id: string;
545
- name?: string;
546
- description?: string;
547
- metadata?: Record<string, unknown>;
548
- };
549
- export type VoiceExpectedSpeakerTurn = {
550
- speaker: string;
551
- text: string;
552
- };
553
- export type VoicePluginConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
554
- costTelemetry?: VoiceCostTelemetryConfig<TContext, TSession, TResult>;
555
- path: string;
556
- languageStrategy?: VoiceLanguageStrategy;
557
- lexicon?: VoiceLexiconEntry[] | VoiceLexiconResolver<TContext>;
558
- phraseHints?: VoicePhraseHint[] | VoicePhraseHintResolver<TContext>;
559
- preset?: VoiceRuntimePreset;
560
- stt: STTAdapter;
561
- sttFallback?: VoiceSTTFallbackConfig;
562
- sttLifecycle?: VoiceSTTLifecycle;
563
- tts?: TTSAdapter;
564
- session: VoiceSessionStore<NoInfer<TSession>>;
565
- reconnect?: VoiceReconnectConfig;
566
- turnDetection?: VoiceTurnDetectionConfig;
567
- audioConditioning?: VoiceAudioConditioningConfig;
568
- logger?: VoiceLogger;
569
- htmx?: boolean | VoiceHTMXConfig<TSession, NoInfer<TResult>>;
570
- ops?: VoiceRuntimeOpsConfig<TContext, TSession, TResult>;
571
- trace?: VoiceTraceEventStore;
572
- } & VoiceRouteConfig<TContext, TSession, TResult>;
573
- export type CreateVoiceSessionOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
574
- costTelemetry?: VoiceCostTelemetryConfig<TContext, TSession, TResult>;
575
- id: string;
576
- context: TContext;
577
- socket: VoiceSocket;
578
- stt: STTAdapter;
579
- tts?: TTSAdapter;
580
- languageStrategy?: VoiceLanguageStrategy;
581
- lexicon?: VoiceLexiconEntry[];
582
- sttFallback?: VoiceResolvedSTTFallbackConfig;
583
- store: VoiceSessionStore<TSession>;
584
- trace?: VoiceTraceEventStore;
585
- reconnect: Required<VoiceReconnectConfig>;
586
- phraseHints?: VoicePhraseHint[];
587
- scenarioId?: string;
588
- sttLifecycle: VoiceSTTLifecycle;
589
- turnDetection: VoiceResolvedTurnDetectionConfig;
590
- audioConditioning?: VoiceResolvedAudioConditioningConfig;
591
- route: VoiceNormalizedRouteConfig<TContext, TSession, TResult>;
592
- logger?: VoiceLogger;
593
- };
594
- export type CreateVoiceSession = <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(options: CreateVoiceSessionOptions<TContext, TSession, TResult>) => VoiceSessionHandle<TContext, TSession, TResult>;
595
- export type VoiceClientStartMessage = {
596
- type: 'start';
597
- sessionId?: string;
598
- scenarioId?: string;
599
- };
600
- export type VoiceClientEndTurnMessage = {
601
- type: 'end_turn';
602
- };
603
- export type VoiceClientCloseMessage = {
604
- type: 'close';
605
- reason?: string;
606
- };
607
- export type VoiceClientPingMessage = {
608
- type: 'ping';
609
- };
610
- export type VoiceClientMessage = VoiceClientStartMessage | VoiceClientEndTurnMessage | VoiceClientCloseMessage | VoiceClientPingMessage;
611
- export type VoiceServerSessionMessage = {
612
- type: 'session';
613
- sessionId: string;
614
- status: VoiceSessionStatus;
615
- scenarioId?: string;
616
- };
617
- export type VoiceServerPartialMessage = {
618
- type: 'partial';
619
- transcript: Transcript;
620
- };
621
- export type VoiceServerFinalMessage = {
622
- type: 'final';
623
- transcript: Transcript;
624
- };
625
- export type VoiceServerTurnMessage<TResult = unknown> = {
626
- type: 'turn';
627
- turn: VoiceTurnRecord<TResult>;
628
- };
629
- export type VoiceServerAssistantMessage = {
630
- type: 'assistant';
631
- text: string;
632
- turnId?: string;
633
- };
634
- export type VoiceServerAudioMessage = {
635
- type: 'audio';
636
- chunkBase64: string;
637
- format: AudioFormat;
638
- receivedAt: number;
639
- turnId?: string;
640
- };
641
- export type VoiceServerCompleteMessage = {
642
- type: 'complete';
643
- sessionId: string;
644
- };
645
- export type VoiceServerErrorMessage = {
646
- type: 'error';
647
- message: string;
648
- recoverable?: boolean;
649
- };
650
- export type VoiceServerPongMessage = {
651
- type: 'pong';
652
- };
653
- export type VoiceServerMessage<TResult = unknown> = VoiceServerSessionMessage | VoiceServerPartialMessage | VoiceServerFinalMessage | VoiceServerTurnMessage<TResult> | VoiceServerAssistantMessage | VoiceServerAudioMessage | VoiceServerCompleteMessage | VoiceServerErrorMessage | VoiceServerPongMessage;
654
- export type VoiceConnectionOptions = {
655
- protocols?: string[];
656
- scenarioId?: string;
657
- reconnect?: boolean;
658
- maxReconnectAttempts?: number;
659
- pingInterval?: number;
660
- sessionId?: string;
661
- };
662
- export type VoiceCaptureOptions = {
663
- channelCount?: 1 | 2;
664
- onLevel?: (level: number) => void;
665
- sampleRateHz?: number;
666
- };
667
- export type VoiceControllerOptions = {
668
- preset?: VoiceRuntimePreset;
669
- connection?: VoiceConnectionOptions;
670
- capture?: VoiceCaptureOptions;
671
- autoStopOnComplete?: boolean;
672
- };
673
- export type VoiceBargeInOptions = {
674
- enabled?: boolean;
675
- interruptOnPartial?: boolean;
676
- interruptThreshold?: number;
677
- };
678
- export type VoiceAudioPlayerOptions = {
679
- autoStart?: boolean;
680
- createAudioContext?: () => AudioContext;
681
- lookaheadMs?: number;
682
- };
683
- export type VoiceDuplexControllerOptions = VoiceControllerOptions & {
684
- audioPlayer?: VoiceAudioPlayerOptions;
685
- bargeIn?: VoiceBargeInOptions;
686
- };
687
- export type VoiceSTTRoutingGoal = 'best' | 'low-cost';
688
- export type VoiceSTTRoutingCorrectionMode = 'generic' | 'none' | 'risky-turn';
689
- export type VoiceSTTRoutingStrategy = {
690
- benchmarkSessionTarget: 'deepgram-corrected' | 'deepgram-flux';
691
- correctionMode: VoiceSTTRoutingCorrectionMode;
692
- goal: VoiceSTTRoutingGoal;
693
- notes: string[];
694
- preset: VoiceRuntimePreset;
695
- sttLifecycle: VoiceSTTLifecycle;
696
- };
697
- export type VoiceHTMXRenderInput<TResult = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord> = {
698
- assistantTexts: string[];
699
- partial: string;
700
- scenarioId?: string;
701
- result?: TResult;
702
- session?: TSession;
703
- sessionId?: string;
704
- status: VoiceSessionStatus | 'idle';
705
- turnCount: number;
706
- turns: VoiceTurnRecord<TResult>[];
707
- };
708
- export type VoiceHTMXRenderConfig<TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
709
- metrics?: (input: VoiceHTMXRenderInput<TResult, TSession>) => string;
710
- status?: (input: VoiceHTMXRenderInput<TResult, TSession>) => string;
711
- turns?: (input: VoiceHTMXRenderInput<TResult, TSession>) => string;
712
- assistant?: (input: VoiceHTMXRenderInput<TResult, TSession>) => string;
713
- result?: (input: VoiceHTMXRenderInput<TResult, TSession>) => string;
714
- emptyState?: (kind: keyof VoiceHTMXTargets, input: VoiceHTMXRenderInput<TResult, TSession>) => string;
715
- };
716
- export type VoiceHTMXRenderer<TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = (input: VoiceHTMXRenderInput<TResult, TSession>) => string;
717
- export type VoiceHTMXTargets = {
718
- assistant: string;
719
- metrics: string;
720
- result: string;
721
- status: string;
722
- turns: string;
723
- };
724
- export type VoiceHTMXOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoiceHTMXRenderConfig<TSession, TResult> & {
725
- bootstrapRoute?: string;
726
- route?: string;
727
- targets?: Partial<VoiceHTMXTargets>;
728
- };
729
- export type VoiceHTMXConfig<TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoiceHTMXRenderer<TSession, TResult> | VoiceHTMXOptions<TSession, TResult>;
730
- export type VoiceStreamState<TResult = unknown> = {
731
- sessionId: string | null;
732
- scenarioId: string | null;
733
- status: VoiceSessionStatus | 'idle';
734
- partial: string;
735
- turns: VoiceTurnRecord<TResult>[];
736
- assistantTexts: string[];
737
- assistantAudio: Array<{
738
- chunk: Uint8Array;
739
- format: AudioFormat;
740
- receivedAt: number;
741
- turnId?: string;
742
- }>;
743
- error: string | null;
744
- isConnected: boolean;
745
- };
746
- export type VoiceStream<TResult = unknown> = {
747
- close: () => void;
748
- start: (input?: {
749
- scenarioId?: string;
750
- sessionId?: string;
751
- }) => Promise<void>;
752
- endTurn: () => void;
753
- error: string | null;
754
- getServerSnapshot: () => VoiceStreamState<TResult>;
755
- getSnapshot: () => VoiceStreamState<TResult>;
756
- isConnected: boolean;
757
- partial: string;
758
- sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
759
- sessionId: string | null;
760
- scenarioId: string | null;
761
- status: VoiceSessionStatus | 'idle';
762
- subscribe: (subscriber: () => void) => () => void;
763
- turns: VoiceTurnRecord<TResult>[];
764
- assistantTexts: string[];
765
- assistantAudio: Array<{
766
- chunk: Uint8Array;
767
- format: AudioFormat;
768
- receivedAt: number;
769
- turnId?: string;
770
- }>;
771
- };
772
- export type VoiceControllerState<TResult = unknown> = VoiceStreamState<TResult> & {
773
- isRecording: boolean;
774
- recordingError: string | null;
775
- };
776
- export type VoiceAudioPlayerState = {
777
- activeSourceCount: number;
778
- error: string | null;
779
- isActive: boolean;
780
- isPlaying: boolean;
781
- lastInterruptLatencyMs?: number;
782
- lastPlaybackStopLatencyMs?: number;
783
- processedChunkCount: number;
784
- queuedChunkCount: number;
785
- };
786
- export type VoiceAudioPlayerSource = {
787
- assistantAudio: VoiceStreamState['assistantAudio'];
788
- subscribe: (subscriber: () => void) => () => void;
789
- };
790
- export type VoiceAudioPlayer = {
791
- close: () => Promise<void>;
792
- error: string | null;
793
- getSnapshot: () => VoiceAudioPlayerState;
794
- activeSourceCount: number;
795
- isActive: boolean;
796
- isPlaying: boolean;
797
- interrupt: () => Promise<void>;
798
- lastInterruptLatencyMs?: number;
799
- lastPlaybackStopLatencyMs?: number;
800
- pause: () => Promise<void>;
801
- processedChunkCount: number;
802
- queuedChunkCount: number;
803
- start: () => Promise<void>;
804
- subscribe: (subscriber: () => void) => () => void;
805
- };
806
- export type VoiceBargeInBinding = {
807
- close: () => void;
808
- handleLevel: (level: number) => void;
809
- sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
810
- };
811
- export type VoiceController<TResult = unknown> = {
812
- bindHTMX: (options: VoiceHTMXBindingOptions) => () => void;
813
- close: () => void;
814
- endTurn: () => void;
815
- start: (input?: {
816
- scenarioId?: string;
817
- sessionId?: string;
818
- }) => Promise<void>;
819
- error: string | null;
820
- getServerSnapshot: () => VoiceControllerState<TResult>;
821
- getSnapshot: () => VoiceControllerState<TResult>;
822
- isConnected: boolean;
823
- isRecording: boolean;
824
- partial: string;
825
- recordingError: string | null;
826
- sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
827
- sessionId: string | null;
828
- scenarioId: string | null;
829
- startRecording: () => Promise<void>;
830
- status: VoiceSessionStatus | 'idle';
831
- stopRecording: () => void;
832
- subscribe: (subscriber: () => void) => () => void;
833
- toggleRecording: () => Promise<void>;
834
- turns: VoiceTurnRecord<TResult>[];
835
- assistantTexts: string[];
836
- assistantAudio: Array<{
837
- chunk: Uint8Array;
838
- format: AudioFormat;
839
- receivedAt: number;
840
- turnId?: string;
841
- }>;
842
- };
843
- export type VoiceDuplexController<TResult = unknown> = VoiceController<TResult> & {
844
- audioPlayer: VoiceAudioPlayer;
845
- interruptAssistant: () => Promise<void>;
846
- };
847
- export type VoiceHTMXBindingOptions = {
848
- element: Element | string;
849
- eventName?: string;
850
- route?: string;
851
- sessionQueryParam?: string;
852
- };
853
- export type VoiceStoreAction<TResult = unknown> = {
854
- type: 'session';
855
- sessionId: string;
856
- scenarioId?: string;
857
- status: VoiceSessionStatus;
858
- } | {
859
- type: 'partial';
860
- transcript: Transcript;
861
- } | {
862
- type: 'final';
863
- transcript: Transcript;
864
- } | {
865
- type: 'turn';
866
- turn: VoiceTurnRecord<TResult>;
867
- } | {
868
- type: 'assistant';
869
- text: string;
870
- } | {
871
- type: 'audio';
872
- chunk: Uint8Array;
873
- format: AudioFormat;
874
- receivedAt: number;
875
- turnId?: string;
876
- } | {
877
- type: 'complete';
878
- sessionId: string;
879
- } | {
880
- type: 'error';
881
- message: string;
882
- } | {
883
- type: 'connected';
884
- } | {
885
- type: 'disconnected';
886
- };