@absolutejs/voice 0.0.22-beta.52 → 0.0.22-beta.520

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 (456) hide show
  1. package/README.md +4556 -603
  2. package/dist/agent.d.ts +79 -5
  3. package/dist/agentPerformanceReport.d.ts +40 -0
  4. package/dist/agentSquadContract.d.ts +98 -0
  5. package/dist/agentState.d.ts +12 -0
  6. package/dist/agentTools.d.ts +133 -0
  7. package/dist/aiScorecard.d.ts +32 -0
  8. package/dist/aiVoiceModel.d.ts +15 -0
  9. package/dist/amdDetector.d.ts +25 -0
  10. package/dist/angular/index.d.ts +36 -6
  11. package/dist/angular/index.js +4003 -566
  12. package/dist/angular/voice-agent-squad-status.service.d.ts +12 -0
  13. package/dist/angular/voice-call-debugger.service.d.ts +12 -0
  14. package/dist/angular/voice-call-player.service.d.ts +19 -0
  15. package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
  16. package/dist/angular/voice-controller.service.d.ts +3 -1
  17. package/dist/angular/voice-cost-dashboard.service.d.ts +15 -0
  18. package/dist/angular/voice-delivery-runtime.component.d.ts +17 -0
  19. package/dist/angular/voice-delivery-runtime.service.d.ts +16 -0
  20. package/dist/angular/voice-live-agent-console.service.d.ts +16 -0
  21. package/dist/angular/voice-live-call-viewer.service.d.ts +16 -0
  22. package/dist/angular/voice-live-ops.service.d.ts +11 -0
  23. package/dist/angular/voice-ops-action-center.service.d.ts +13 -0
  24. package/dist/angular/voice-ops-status.component.d.ts +2 -2
  25. package/dist/angular/voice-ops-status.service.d.ts +12 -0
  26. package/dist/angular/voice-platform-coverage.service.d.ts +12 -0
  27. package/dist/angular/voice-profile-comparison.service.d.ts +12 -0
  28. package/dist/angular/voice-proof-trends.service.d.ts +12 -0
  29. package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
  30. package/dist/angular/voice-provider-contracts.service.d.ts +12 -0
  31. package/dist/angular/voice-provider-status.service.d.ts +2 -2
  32. package/dist/angular/voice-readiness-failures.service.d.ts +13 -0
  33. package/dist/angular/voice-reconnect-profile-evidence.service.d.ts +12 -0
  34. package/dist/angular/voice-replay-timeline.service.d.ts +13 -0
  35. package/dist/angular/voice-routing-status.service.d.ts +11 -0
  36. package/dist/angular/voice-session-observability.service.d.ts +12 -0
  37. package/dist/angular/voice-session-snapshot.service.d.ts +13 -0
  38. package/dist/angular/voice-stream.service.d.ts +4 -1
  39. package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
  40. package/dist/angular/voice-turn-latency.service.d.ts +13 -0
  41. package/dist/angular/voice-turn-quality.service.d.ts +12 -0
  42. package/dist/angular/voice-widget.service.d.ts +18 -0
  43. package/dist/angular/voice-workflow-status.service.d.ts +2 -2
  44. package/dist/assistant.d.ts +12 -13
  45. package/dist/assistantExperiment.d.ts +41 -0
  46. package/dist/assistantHealth.d.ts +6 -6
  47. package/dist/assistantMemory.d.ts +3 -3
  48. package/dist/assistantMode.d.ts +22 -0
  49. package/dist/audioConditioning.d.ts +1 -1
  50. package/dist/audit.d.ts +131 -0
  51. package/dist/auditDeliveryRoutes.d.ts +85 -0
  52. package/dist/auditExport.d.ts +34 -0
  53. package/dist/auditRoutes.d.ts +66 -0
  54. package/dist/auditSinks.d.ts +151 -0
  55. package/dist/backchannel.d.ts +18 -0
  56. package/dist/bargeInRoutes.d.ts +56 -0
  57. package/dist/bookingFlow.d.ts +43 -0
  58. package/dist/browserCallProfiles.d.ts +120 -0
  59. package/dist/browserMediaRoutes.d.ts +62 -0
  60. package/dist/calendarAdapter.d.ts +47 -0
  61. package/dist/calendarSlots.d.ts +35 -0
  62. package/dist/callDebugger.d.ts +66 -0
  63. package/dist/callDisposition.d.ts +38 -0
  64. package/dist/callQuota.d.ts +54 -0
  65. package/dist/callScorecard.d.ts +53 -0
  66. package/dist/callerCRMLinker.d.ts +29 -0
  67. package/dist/callerMemory.d.ts +37 -0
  68. package/dist/callingWindow.d.ts +26 -0
  69. package/dist/campaign.d.ts +794 -0
  70. package/dist/campaignControls.d.ts +37 -0
  71. package/dist/campaignDialers.d.ts +111 -0
  72. package/dist/campaignTemplate.d.ts +16 -0
  73. package/dist/client/actions.d.ts +95 -1
  74. package/dist/client/agentSquadStatus.d.ts +37 -0
  75. package/dist/client/agentSquadStatusWidget.d.ts +24 -0
  76. package/dist/client/audioPlayer.d.ts +2 -2
  77. package/dist/client/bargeInMonitor.d.ts +7 -0
  78. package/dist/client/browserMedia.d.ts +8 -0
  79. package/dist/client/browserNoiseSuppression.d.ts +42 -0
  80. package/dist/client/browserVoiceSupport.d.ts +22 -0
  81. package/dist/client/callDebugger.d.ts +19 -0
  82. package/dist/client/callDebuggerWidget.d.ts +30 -0
  83. package/dist/client/callPlayer.d.ts +41 -0
  84. package/dist/client/campaignDialerProof.d.ts +23 -0
  85. package/dist/client/connection.d.ts +4 -3
  86. package/dist/client/controller.d.ts +1 -1
  87. package/dist/client/conversationAnalytics.d.ts +29 -0
  88. package/dist/client/costDashboard.d.ts +27 -0
  89. package/dist/client/createVoiceStream.d.ts +1 -1
  90. package/dist/client/deliveryRuntime.d.ts +34 -0
  91. package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
  92. package/dist/client/duplex.d.ts +2 -2
  93. package/dist/client/htmx.d.ts +1 -1
  94. package/dist/client/htmxAttributes.d.ts +28 -0
  95. package/dist/client/htmxBootstrap.js +968 -14
  96. package/dist/client/htmxDashboardRenderers.d.ts +72 -0
  97. package/dist/client/index.d.ts +104 -15
  98. package/dist/client/index.js +10150 -129
  99. package/dist/client/liveAgentConsole.d.ts +28 -0
  100. package/dist/client/liveCallViewer.d.ts +42 -0
  101. package/dist/client/liveOps.d.ts +22 -0
  102. package/dist/client/liveOpsWidget.d.ts +23 -0
  103. package/dist/client/liveTurnLatency.d.ts +41 -0
  104. package/dist/client/microphone.d.ts +4 -4
  105. package/dist/client/opsActionCenter.d.ts +54 -0
  106. package/dist/client/opsActionCenterWidget.d.ts +29 -0
  107. package/dist/client/opsActionHistory.d.ts +19 -0
  108. package/dist/client/opsActionHistoryWidget.d.ts +11 -0
  109. package/dist/client/opsStatus.d.ts +19 -0
  110. package/dist/client/opsStatusWidget.d.ts +10 -9
  111. package/dist/client/platformCoverage.d.ts +19 -0
  112. package/dist/client/platformCoverageWidget.d.ts +37 -0
  113. package/dist/client/profileComparison.d.ts +19 -0
  114. package/dist/client/profileComparisonWidget.d.ts +41 -0
  115. package/dist/client/profileSwitchRecommendation.d.ts +19 -0
  116. package/dist/client/profileSwitchRecommendationWidget.d.ts +12 -0
  117. package/dist/client/proofTrends.d.ts +19 -0
  118. package/dist/client/proofTrendsWidget.d.ts +37 -0
  119. package/dist/client/providerCapabilities.d.ts +19 -0
  120. package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
  121. package/dist/client/providerContracts.d.ts +19 -0
  122. package/dist/client/providerContractsWidget.d.ts +37 -0
  123. package/dist/client/providerSimulationControls.d.ts +33 -0
  124. package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
  125. package/dist/client/providerStatus.d.ts +1 -1
  126. package/dist/client/providerStatusWidget.d.ts +32 -0
  127. package/dist/client/readinessFailures.d.ts +19 -0
  128. package/dist/client/readinessFailuresWidget.d.ts +42 -0
  129. package/dist/client/reconnectProfileEvidence.d.ts +19 -0
  130. package/dist/client/reconnectProfileEvidenceWidget.d.ts +39 -0
  131. package/dist/client/replayTimeline.d.ts +26 -0
  132. package/dist/client/routingStatus.d.ts +19 -0
  133. package/dist/client/routingStatusWidget.d.ts +32 -0
  134. package/dist/client/sessionObservability.d.ts +19 -0
  135. package/dist/client/sessionObservabilityWidget.d.ts +31 -0
  136. package/dist/client/sessionSnapshot.d.ts +21 -0
  137. package/dist/client/sessionSnapshotWidget.d.ts +33 -0
  138. package/dist/client/store.d.ts +1 -1
  139. package/dist/client/traceTimeline.d.ts +19 -0
  140. package/dist/client/traceTimelineWidget.d.ts +36 -0
  141. package/dist/client/turnLatency.d.ts +22 -0
  142. package/dist/client/turnLatencyWidget.d.ts +33 -0
  143. package/dist/client/turnQuality.d.ts +19 -0
  144. package/dist/client/turnQualityWidget.d.ts +32 -0
  145. package/dist/client/voiceWidgetView.d.ts +50 -0
  146. package/dist/client/workflowStatus.d.ts +1 -1
  147. package/dist/competitiveCoverage.d.ts +141 -0
  148. package/dist/conversationSimulator.d.ts +73 -0
  149. package/dist/correction.d.ts +2 -2
  150. package/dist/costAccounting.d.ts +76 -0
  151. package/dist/costPredictor.d.ts +74 -0
  152. package/dist/crmCallLogger.d.ts +37 -0
  153. package/dist/crmContract.d.ts +70 -0
  154. package/dist/dataControl.d.ts +180 -0
  155. package/dist/defineVoiceAssistant.d.ts +68 -0
  156. package/dist/deliveryRuntime.d.ts +158 -0
  157. package/dist/deliverySinkRoutes.d.ts +117 -0
  158. package/dist/demoReadyRoutes.d.ts +98 -0
  159. package/dist/diagnosticsRoutes.d.ts +2 -2
  160. package/dist/dncRegistry.d.ts +38 -0
  161. package/dist/dtmfCollector.d.ts +37 -0
  162. package/dist/embed/index.d.ts +38 -0
  163. package/dist/embed/index.js +1708 -0
  164. package/dist/embed/voice-widget.js +10 -0
  165. package/dist/evalRoutes.d.ts +10 -4
  166. package/dist/fileStore.d.ts +21 -7
  167. package/dist/generated/htmxBootstrapBundle.d.ts +1 -0
  168. package/dist/guardrails.d.ts +128 -0
  169. package/dist/handoff.d.ts +6 -6
  170. package/dist/handoffHealth.d.ts +5 -5
  171. package/dist/holdAudio.d.ts +23 -0
  172. package/dist/htmx.d.ts +1 -1
  173. package/dist/htmxDashboardRoutes.d.ts +249 -0
  174. package/dist/iceServers.d.ts +34 -0
  175. package/dist/incidentBundle.d.ts +119 -0
  176. package/dist/incidentTimeline.d.ts +260 -0
  177. package/dist/index.d.ts +362 -74
  178. package/dist/index.js +46209 -7771
  179. package/dist/ivrPlan.d.ts +40 -0
  180. package/dist/latencySlo.d.ts +56 -0
  181. package/dist/liveCoach.d.ts +43 -0
  182. package/dist/liveLatency.d.ts +78 -0
  183. package/dist/liveOps.d.ts +190 -0
  184. package/dist/llmJudge.d.ts +45 -0
  185. package/dist/logger.d.ts +1 -1
  186. package/dist/mediaPipelineRoutes.d.ts +171 -0
  187. package/dist/mediaPipelineSurfaces.d.ts +48 -0
  188. package/dist/memoryStore.d.ts +1 -1
  189. package/dist/midCallSummary.d.ts +27 -0
  190. package/dist/modelAdapters.d.ts +59 -7
  191. package/dist/monitor.d.ts +148 -0
  192. package/dist/multilingualProof.d.ts +77 -0
  193. package/dist/noShowPredictor.d.ts +46 -0
  194. package/dist/oauth2TokenSource.d.ts +21 -0
  195. package/dist/observabilityExport.d.ts +501 -0
  196. package/dist/openaiTTS.d.ts +18 -0
  197. package/dist/operationalStatus.d.ts +87 -0
  198. package/dist/operationsRecord.d.ts +370 -0
  199. package/dist/ops.d.ts +12 -12
  200. package/dist/opsActionAuditRoutes.d.ts +99 -0
  201. package/dist/opsConsoleRoutes.d.ts +8 -5
  202. package/dist/opsPresets.d.ts +2 -2
  203. package/dist/opsRecovery.d.ts +137 -0
  204. package/dist/opsRuntime.d.ts +6 -6
  205. package/dist/opsSinks.d.ts +13 -13
  206. package/dist/opsStatus.d.ts +76 -0
  207. package/dist/opsStatusRoutes.d.ts +33 -0
  208. package/dist/opsWebhook.d.ts +6 -6
  209. package/dist/otelExporter.d.ts +83 -0
  210. package/dist/outcomeContract.d.ts +146 -0
  211. package/dist/outcomeRecipes.d.ts +4 -4
  212. package/dist/pathway.d.ts +94 -0
  213. package/dist/pathwayCompiler.d.ts +31 -0
  214. package/dist/pathwayRuntime.d.ts +57 -0
  215. package/dist/pathwaySlotCollector.d.ts +29 -0
  216. package/dist/pathwayVisualizer.d.ts +8 -0
  217. package/dist/phoneAgent.d.ts +139 -0
  218. package/dist/phoneAgentProductionSmoke.d.ts +115 -0
  219. package/dist/phoneProvisioning.d.ts +29 -0
  220. package/dist/platformCoverage.d.ts +91 -0
  221. package/dist/plugin.d.ts +2 -2
  222. package/dist/postCallAnalysis.d.ts +98 -0
  223. package/dist/postCallSurvey.d.ts +41 -0
  224. package/dist/postgresStore.d.ts +17 -6
  225. package/dist/presets.d.ts +3 -3
  226. package/dist/productionReadiness.d.ts +756 -0
  227. package/dist/profileSwitchRecommendation.d.ts +350 -0
  228. package/dist/promptInjectionGuard.d.ts +30 -0
  229. package/dist/proofAssertions.d.ts +32 -0
  230. package/dist/proofPack.d.ts +211 -0
  231. package/dist/proofRunner.d.ts +79 -0
  232. package/dist/proofTrends.d.ts +966 -0
  233. package/dist/providerAdapters.d.ts +16 -5
  234. package/dist/providerCapabilities.d.ts +92 -0
  235. package/dist/providerDecisionTraces.d.ts +130 -0
  236. package/dist/providerHealth.d.ts +3 -3
  237. package/dist/providerOrchestration.d.ts +109 -0
  238. package/dist/providerRouterTraces.d.ts +35 -0
  239. package/dist/providerRoutingContract.d.ts +71 -0
  240. package/dist/providerSlo.d.ts +142 -0
  241. package/dist/providerStackRecommendations.d.ts +187 -0
  242. package/dist/qualityDriftDetector.d.ts +44 -0
  243. package/dist/qualityRoutes.d.ts +4 -4
  244. package/dist/queue.d.ts +23 -14
  245. package/dist/ragTool.d.ts +52 -0
  246. package/dist/react/VoiceAgentSquadStatus.d.ts +5 -0
  247. package/dist/react/VoiceCallDebuggerLaunch.d.ts +6 -0
  248. package/dist/react/VoiceCallPlayer.d.ts +11 -0
  249. package/dist/react/VoiceCostDashboard.d.ts +10 -0
  250. package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
  251. package/dist/react/VoiceLiveAgentConsole.d.ts +11 -0
  252. package/dist/react/VoiceLiveCallViewer.d.ts +9 -0
  253. package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
  254. package/dist/react/VoiceOpsStatus.d.ts +1 -1
  255. package/dist/react/VoicePlatformCoverage.d.ts +6 -0
  256. package/dist/react/VoiceProfileComparison.d.ts +6 -0
  257. package/dist/react/VoiceProfileSwitchRecommendation.d.ts +6 -0
  258. package/dist/react/VoiceProofTrends.d.ts +6 -0
  259. package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
  260. package/dist/react/VoiceProviderContracts.d.ts +6 -0
  261. package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
  262. package/dist/react/VoiceProviderStatus.d.ts +6 -0
  263. package/dist/react/VoiceReadinessFailures.d.ts +6 -0
  264. package/dist/react/VoiceReconnectProfileEvidence.d.ts +6 -0
  265. package/dist/react/VoiceReplayTimeline.d.ts +6 -0
  266. package/dist/react/VoiceRoutingStatus.d.ts +6 -0
  267. package/dist/react/VoiceSessionObservability.d.ts +6 -0
  268. package/dist/react/VoiceSessionSnapshot.d.ts +6 -0
  269. package/dist/react/VoiceTraceTimeline.d.ts +6 -0
  270. package/dist/react/VoiceTurnLatency.d.ts +6 -0
  271. package/dist/react/VoiceTurnQuality.d.ts +6 -0
  272. package/dist/react/VoiceWidget.d.ts +13 -0
  273. package/dist/react/index.d.ts +59 -6
  274. package/dist/react/index.js +12694 -316
  275. package/dist/react/useVoiceAgentSquadStatus.d.ts +8 -0
  276. package/dist/react/useVoiceCallDebugger.d.ts +8 -0
  277. package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
  278. package/dist/react/useVoiceController.d.ts +4 -1
  279. package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
  280. package/dist/react/useVoiceLiveOps.d.ts +9 -0
  281. package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
  282. package/dist/react/useVoiceOpsStatus.d.ts +8 -0
  283. package/dist/react/useVoicePlatformCoverage.d.ts +8 -0
  284. package/dist/react/useVoiceProfileComparison.d.ts +8 -0
  285. package/dist/react/useVoiceProfileSwitchRecommendation.d.ts +8 -0
  286. package/dist/react/useVoiceProofTrends.d.ts +8 -0
  287. package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
  288. package/dist/react/useVoiceProviderContracts.d.ts +8 -0
  289. package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
  290. package/dist/react/useVoiceProviderStatus.d.ts +1 -1
  291. package/dist/react/useVoiceReadinessFailures.d.ts +8 -0
  292. package/dist/react/useVoiceReconnectProfileEvidence.d.ts +8 -0
  293. package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
  294. package/dist/react/useVoiceSessionObservability.d.ts +8 -0
  295. package/dist/react/useVoiceSessionSnapshot.d.ts +9 -0
  296. package/dist/react/useVoiceStream.d.ts +4 -1
  297. package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
  298. package/dist/react/useVoiceTurnLatency.d.ts +9 -0
  299. package/dist/react/useVoiceTurnQuality.d.ts +8 -0
  300. package/dist/react/useVoiceWorkflowStatus.d.ts +1 -1
  301. package/dist/readinessProfiles.d.ts +45 -0
  302. package/dist/realtimeChannel.d.ts +136 -0
  303. package/dist/realtimeProviderContracts.d.ts +133 -0
  304. package/dist/reconnectContract.d.ts +176 -0
  305. package/dist/recordingRedaction.d.ts +47 -0
  306. package/dist/recordingStore.d.ts +60 -0
  307. package/dist/redaction.d.ts +13 -0
  308. package/dist/reminderScheduler.d.ts +43 -0
  309. package/dist/resilienceRoutes.d.ts +45 -5
  310. package/dist/retention.d.ts +37 -0
  311. package/dist/retryPolicy.d.ts +38 -0
  312. package/dist/routeAuth.d.ts +58 -0
  313. package/dist/routing.d.ts +1 -1
  314. package/dist/runtimeOps.d.ts +3 -3
  315. package/dist/s3Store.d.ts +18 -3
  316. package/dist/scorecardCalibration.d.ts +31 -0
  317. package/dist/semanticTurn.d.ts +27 -0
  318. package/dist/session.d.ts +1 -1
  319. package/dist/sessionObservability.d.ts +145 -0
  320. package/dist/sessionReplay.d.ts +19 -7
  321. package/dist/sessionSnapshot.d.ts +109 -0
  322. package/dist/simulationSuite.d.ts +143 -0
  323. package/dist/sloCalibration.d.ts +185 -0
  324. package/dist/sqliteStore.d.ts +17 -6
  325. package/dist/store.d.ts +1 -1
  326. package/dist/supervisorPermissions.d.ts +33 -0
  327. package/dist/supervisorPresence.d.ts +49 -0
  328. package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
  329. package/dist/svelte/createVoiceCallDebugger.d.ts +12 -0
  330. package/dist/svelte/createVoiceCallPlayer.d.ts +33 -0
  331. package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
  332. package/dist/svelte/createVoiceCostDashboard.d.ts +13 -0
  333. package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
  334. package/dist/svelte/createVoiceLiveAgentConsole.d.ts +23 -0
  335. package/dist/svelte/createVoiceLiveCallViewer.d.ts +26 -0
  336. package/dist/svelte/createVoiceLiveOps.d.ts +13 -0
  337. package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
  338. package/dist/svelte/createVoiceOpsStatus.d.ts +3 -3
  339. package/dist/svelte/createVoicePlatformCoverage.d.ts +7 -0
  340. package/dist/svelte/createVoiceProfileComparison.d.ts +7 -0
  341. package/dist/svelte/createVoiceProofTrends.d.ts +7 -0
  342. package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
  343. package/dist/svelte/createVoiceProviderContracts.d.ts +10 -0
  344. package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
  345. package/dist/svelte/createVoiceProviderStatus.d.ts +4 -2
  346. package/dist/svelte/createVoiceReadinessFailures.d.ts +7 -0
  347. package/dist/svelte/createVoiceReconnectProfileEvidence.d.ts +7 -0
  348. package/dist/svelte/createVoiceReplayTimeline.d.ts +13 -0
  349. package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
  350. package/dist/svelte/createVoiceSessionObservability.d.ts +10 -0
  351. package/dist/svelte/createVoiceSessionSnapshot.d.ts +13 -0
  352. package/dist/svelte/createVoiceStream.d.ts +1 -1
  353. package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
  354. package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
  355. package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
  356. package/dist/svelte/createVoiceWidget.d.ts +19 -0
  357. package/dist/svelte/createVoiceWorkflowStatus.d.ts +1 -1
  358. package/dist/svelte/index.d.ts +37 -6
  359. package/dist/svelte/index.js +6861 -718
  360. package/dist/telephony/contract.d.ts +61 -0
  361. package/dist/telephony/matrix.d.ts +97 -0
  362. package/dist/telephony/plivo.d.ts +303 -0
  363. package/dist/telephony/response.d.ts +1 -1
  364. package/dist/telephony/security.d.ts +182 -0
  365. package/dist/telephony/telnyx.d.ts +291 -0
  366. package/dist/telephony/twilio.d.ts +147 -13
  367. package/dist/telephonyMediaRoutes.d.ts +72 -0
  368. package/dist/telephonyOutcome.d.ts +273 -0
  369. package/dist/testing/accuracy.d.ts +1 -1
  370. package/dist/testing/benchmark.d.ts +9 -9
  371. package/dist/testing/corrected.d.ts +5 -5
  372. package/dist/testing/duplex.d.ts +3 -3
  373. package/dist/testing/fixtures.d.ts +3 -3
  374. package/dist/testing/index.d.ts +13 -13
  375. package/dist/testing/index.js +5254 -152
  376. package/dist/testing/ioProviderSimulator.d.ts +5 -5
  377. package/dist/testing/providerSimulator.d.ts +5 -5
  378. package/dist/testing/review.d.ts +4 -4
  379. package/dist/testing/sessionBenchmark.d.ts +3 -3
  380. package/dist/testing/stt.d.ts +3 -3
  381. package/dist/testing/telephony.d.ts +25 -0
  382. package/dist/testing/tts.d.ts +1 -1
  383. package/dist/toolContract.d.ts +161 -0
  384. package/dist/toolRuntime.d.ts +50 -0
  385. package/dist/trace.d.ts +46 -7
  386. package/dist/traceDeliveryRoutes.d.ts +86 -0
  387. package/dist/traceTimeline.d.ts +97 -0
  388. package/dist/transcriptAnnotator.d.ts +41 -0
  389. package/dist/turnDetection.d.ts +1 -1
  390. package/dist/turnLatency.d.ts +95 -0
  391. package/dist/turnProfiles.d.ts +2 -2
  392. package/dist/turnQuality.d.ts +94 -0
  393. package/dist/types.d.ts +325 -80
  394. package/dist/vapiAdapter.d.ts +160 -0
  395. package/dist/voiceMonitoring.d.ts +444 -0
  396. package/dist/vue/VoiceCallDebuggerLaunch.d.ts +68 -0
  397. package/dist/vue/VoiceCallPlayer.d.ts +40 -0
  398. package/dist/vue/VoiceCostDashboard.d.ts +57 -0
  399. package/dist/vue/VoiceDeliveryRuntime.d.ts +30 -0
  400. package/dist/vue/VoiceLiveAgentConsole.d.ts +50 -0
  401. package/dist/vue/VoiceLiveCallViewer.d.ts +35 -0
  402. package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
  403. package/dist/vue/VoicePlatformCoverage.d.ts +23 -0
  404. package/dist/vue/VoiceProofTrends.d.ts +21 -0
  405. package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
  406. package/dist/vue/VoiceProviderContracts.d.ts +21 -0
  407. package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
  408. package/dist/vue/VoiceProviderStatus.d.ts +51 -0
  409. package/dist/vue/VoiceReadinessFailures.d.ts +21 -0
  410. package/dist/vue/VoiceReconnectProfileEvidence.d.ts +21 -0
  411. package/dist/vue/VoiceReplayTimeline.d.ts +17 -0
  412. package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
  413. package/dist/vue/VoiceSessionObservability.d.ts +23 -0
  414. package/dist/vue/VoiceSessionSnapshot.d.ts +68 -0
  415. package/dist/vue/VoiceTurnLatency.d.ts +69 -0
  416. package/dist/vue/VoiceTurnQuality.d.ts +51 -0
  417. package/dist/vue/VoiceWidget.d.ts +77 -0
  418. package/dist/vue/index.d.ts +49 -6
  419. package/dist/vue/index.js +11960 -391
  420. package/dist/vue/useVoiceAgentSquadStatus.d.ts +9 -0
  421. package/dist/vue/useVoiceCallDebugger.d.ts +10 -0
  422. package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
  423. package/dist/vue/useVoiceController.d.ts +4 -2
  424. package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
  425. package/dist/vue/useVoiceLiveOps.d.ts +9 -0
  426. package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
  427. package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
  428. package/dist/vue/useVoicePlatformCoverage.d.ts +9 -0
  429. package/dist/vue/useVoiceProfileComparison.d.ts +9 -0
  430. package/dist/vue/useVoiceProofTrends.d.ts +9 -0
  431. package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
  432. package/dist/vue/useVoiceProviderContracts.d.ts +9 -0
  433. package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
  434. package/dist/vue/useVoiceProviderStatus.d.ts +3 -3
  435. package/dist/vue/useVoiceReadinessFailures.d.ts +959 -0
  436. package/dist/vue/useVoiceReconnectProfileEvidence.d.ts +9 -0
  437. package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
  438. package/dist/vue/useVoiceSessionObservability.d.ts +9 -0
  439. package/dist/vue/useVoiceSessionSnapshot.d.ts +10 -0
  440. package/dist/vue/useVoiceStream.d.ts +5 -2
  441. package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
  442. package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
  443. package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
  444. package/dist/vue/useVoiceWorkflowStatus.d.ts +3 -3
  445. package/dist/webhookFanout.d.ts +48 -0
  446. package/dist/webhookVerification.d.ts +27 -0
  447. package/dist/whisperChannel.d.ts +50 -0
  448. package/dist/workflowContract.d.ts +8 -8
  449. package/fixtures/manifest.json +356 -197
  450. package/package.json +274 -256
  451. package/dist/angular/voice-app-kit-status.service.d.ts +0 -12
  452. package/dist/appKit.d.ts +0 -92
  453. package/dist/client/appKitStatus.d.ts +0 -19
  454. package/dist/react/useVoiceAppKitStatus.d.ts +0 -8
  455. package/dist/svelte/createVoiceAppKitStatus.d.ts +0 -8
  456. package/dist/vue/useVoiceAppKitStatus.d.ts +0 -9
package/dist/types.d.ts CHANGED
@@ -1,24 +1,49 @@
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';
1
+ import type { SessionStore } from "@absolutejs/absolute";
2
+ import type { MediaWebRTCStatsCollector, MediaWebRTCStatsReport, MediaWebRTCStatsReportInput, MediaWebRTCStreamContinuityInput, MediaWebRTCStreamContinuityReport } from "@absolutejs/media";
3
+ import type { VoiceOpsDispositionTaskPolicies, VoiceOpsTaskAssignmentRule, VoiceOpsTaskAssignmentRules, VoiceIntegrationWebhookConfig, StoredVoiceIntegrationEvent, StoredVoiceOpsTask, VoiceIntegrationEventStore, VoiceOpsTaskPolicy, VoiceOpsTask, VoiceOpsTaskStore } from "./ops";
4
+ import type { VoiceIntegrationSink } from "./opsSinks";
5
+ import type { StoredVoiceCallReviewArtifact, VoiceCallReviewArtifact, VoiceCallReviewStore } from "./testing/review";
6
+ import type { VoiceTraceEventStore } from "./trace";
7
+ import type { VoiceLiveOpsControlState } from "./liveOps";
8
+ import type { VoiceAuditActor, VoiceAuditEventStore } from "./audit";
9
+ import type { VoiceProfileSwitchGuardDecision, VoiceProfileSwitchGuardMode, VoiceProfileSwitchObservedSignals } from "./profileSwitchRecommendation";
10
+ import type { VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileHistoryReport } from "./proofTrends";
6
11
  export type AudioFormat = {
7
- container: 'raw';
8
- encoding: 'alaw' | 'mulaw' | 'pcm_s16le';
12
+ container: "raw";
13
+ encoding: "alaw" | "mulaw" | "pcm_s16le";
9
14
  sampleRateHz: number;
10
15
  channels: 1 | 2;
11
16
  };
12
17
  export type AudioChunk = ArrayBuffer | ArrayBufferView;
18
+ /**
19
+ * Structural contract for an inbound noise suppressor applied before STT.
20
+ * Matches `@absolutejs/media`'s `NoiseSuppressor`, so any media suppressor
21
+ * (`createFFmpegNoiseSuppressor`, `createEnergyGateNoiseSuppressor`, a Krisp
22
+ * adapter, etc.) satisfies it without a hard import.
23
+ */
24
+ export type VoiceNoiseSuppressor = {
25
+ readonly kind: string;
26
+ process: (input: {
27
+ format: AudioFormat;
28
+ pcm: ArrayBuffer | ArrayBufferView;
29
+ }) => Promise<{
30
+ bytes: Uint8Array;
31
+ format: AudioFormat;
32
+ }> | {
33
+ bytes: Uint8Array;
34
+ format: AudioFormat;
35
+ };
36
+ close?: () => Promise<void> | void;
37
+ };
13
38
  export type VoiceLanguageStrategy = {
14
- mode: 'auto-detect';
39
+ mode: "auto-detect";
15
40
  allowedLanguages?: string[];
16
41
  } | {
17
- mode: 'fixed';
42
+ mode: "fixed";
18
43
  primaryLanguage: string;
19
44
  secondaryLanguages?: string[];
20
45
  } | {
21
- mode: 'allow-switching';
46
+ mode: "allow-switching";
22
47
  primaryLanguage?: string;
23
48
  secondaryLanguages: string[];
24
49
  };
@@ -28,7 +53,7 @@ export type VoicePhraseHint = {
28
53
  boost?: number;
29
54
  metadata?: Record<string, unknown>;
30
55
  };
31
- export type VoiceCorrectionRiskTier = 'safe' | 'balanced' | 'risky';
56
+ export type VoiceCorrectionRiskTier = "safe" | "balanced" | "risky";
32
57
  export type VoiceDomainTerm = {
33
58
  text: string;
34
59
  aliases?: string[];
@@ -44,12 +69,18 @@ export type VoiceLexiconEntry = {
44
69
  metadata?: Record<string, unknown>;
45
70
  pronunciation?: string;
46
71
  };
72
+ export type VoiceTranscriptSentiment = {
73
+ label: "negative" | "neutral" | "positive" | (string & {});
74
+ metadata?: Record<string, unknown>;
75
+ score?: number;
76
+ };
47
77
  export type Transcript = {
48
78
  id: string;
49
79
  text: string;
50
80
  isFinal: boolean;
51
81
  confidence?: number;
52
82
  language?: string;
83
+ sentiment?: VoiceTranscriptSentiment;
53
84
  speaker?: string | number;
54
85
  startedAtMs?: number;
55
86
  endedAtMs?: number;
@@ -65,7 +96,7 @@ export type VoiceTranscriptQuality = {
65
96
  fallback?: VoiceFallbackDiagnostics;
66
97
  partialTranscriptCount: number;
67
98
  selectedTranscriptCount: number;
68
- source: 'fallback' | 'primary';
99
+ source: "fallback" | "primary";
69
100
  };
70
101
  export type VoiceTurnCorrectionDiagnostics = {
71
102
  attempted: boolean;
@@ -83,7 +114,7 @@ export type VoiceTurnCostEstimate = {
83
114
  primaryAudioMs: number;
84
115
  totalBillableAudioMs: number;
85
116
  };
86
- export type VoiceFallbackSelectionReason = 'fallback-empty' | 'primary-empty' | 'word-count-margin' | 'confidence-margin' | 'word-count-tiebreak' | 'kept-primary';
117
+ export type VoiceFallbackSelectionReason = "fallback-empty" | "primary-empty" | "word-count-margin" | "confidence-margin" | "word-count-tiebreak" | "kept-primary";
87
118
  export type VoiceFallbackDiagnostics = {
88
119
  attempted: boolean;
89
120
  fallbackConfidence?: number;
@@ -94,31 +125,31 @@ export type VoiceFallbackDiagnostics = {
94
125
  primaryWordCount: number;
95
126
  selected: boolean;
96
127
  selectionReason: VoiceFallbackSelectionReason;
97
- trigger: 'empty-turn' | 'low-confidence' | 'empty-or-low-confidence' | 'always';
128
+ trigger: "empty-turn" | "low-confidence" | "empty-or-low-confidence" | "always";
98
129
  };
99
130
  export type VoicePartialEvent = {
100
- type: 'partial';
131
+ type: "partial";
101
132
  transcript: Transcript;
102
133
  receivedAt: number;
103
134
  };
104
135
  export type VoiceFinalEvent = {
105
- type: 'final';
136
+ type: "final";
106
137
  transcript: Transcript;
107
138
  receivedAt: number;
108
139
  };
109
140
  export type VoiceEndOfTurnEvent = {
110
- type: 'endOfTurn';
111
- reason: 'vendor' | 'silence' | 'manual';
141
+ type: "endOfTurn";
142
+ reason: "vendor" | "silence" | "manual";
112
143
  receivedAt: number;
113
144
  };
114
145
  export type VoiceErrorEvent = {
115
- type: 'error';
146
+ type: "error";
116
147
  error: Error;
117
148
  recoverable: boolean;
118
149
  code?: string;
119
150
  };
120
151
  export type VoiceCloseEvent = {
121
- type: 'close';
152
+ type: "close";
122
153
  code?: number;
123
154
  reason?: string;
124
155
  recoverable?: boolean;
@@ -144,11 +175,11 @@ export type STTAdapterOpenOptions = {
144
175
  signal?: AbortSignal;
145
176
  };
146
177
  export type STTAdapter<TOptions extends STTAdapterOpenOptions = STTAdapterOpenOptions> = {
147
- kind: 'stt';
178
+ kind: "stt";
148
179
  open: (options: TOptions) => Promise<STTAdapterSession> | STTAdapterSession;
149
180
  };
150
181
  export type TTSAudioEvent = {
151
- type: 'audio';
182
+ type: "audio";
152
183
  chunk: AudioChunk;
153
184
  format: AudioFormat;
154
185
  receivedAt: number;
@@ -161,15 +192,26 @@ export type TTSSessionEventMap = {
161
192
  export type TTSAdapterSession = {
162
193
  on: <K extends keyof TTSSessionEventMap>(event: K, handler: (payload: TTSSessionEventMap[K]) => void | Promise<void>) => () => void;
163
194
  send: (text: string) => Promise<void>;
195
+ cancel?: (reason?: string) => Promise<void>;
164
196
  close: (reason?: string) => Promise<void>;
165
197
  };
198
+ export declare const ttsAdapterSessionCanCancel: (session: TTSAdapterSession) => session is TTSAdapterSession & {
199
+ cancel: (reason?: string) => Promise<void>;
200
+ };
201
+ export type VoiceTTSProsody = {
202
+ emphasis?: number;
203
+ pitch?: number;
204
+ speed?: number;
205
+ style?: string;
206
+ };
166
207
  export type TTSAdapterOpenOptions = {
167
208
  sessionId: string;
168
209
  lexicon?: VoiceLexiconEntry[];
210
+ prosody?: VoiceTTSProsody;
169
211
  signal?: AbortSignal;
170
212
  };
171
213
  export type TTSAdapter<TOptions extends TTSAdapterOpenOptions = TTSAdapterOpenOptions> = {
172
- kind: 'tts';
214
+ kind: "tts";
173
215
  open: (options: TOptions) => Promise<TTSAdapterSession> | TTSAdapterSession;
174
216
  };
175
217
  export type RealtimeSessionEventMap = STTSessionEventMap & {
@@ -185,20 +227,40 @@ export type RealtimeAdapterOpenOptions = {
185
227
  format: AudioFormat;
186
228
  languageStrategy?: VoiceLanguageStrategy;
187
229
  lexicon?: VoiceLexiconEntry[];
230
+ modalities?: ReadonlyArray<"audio" | "text">;
188
231
  phraseHints?: VoicePhraseHint[];
232
+ promptCacheKey?: string;
233
+ semanticVAD?: import("./assistantMode").VoiceSemanticVADConfig;
189
234
  signal?: AbortSignal;
190
235
  };
191
236
  export type RealtimeAdapter<TOptions extends RealtimeAdapterOpenOptions = RealtimeAdapterOpenOptions> = {
192
- kind: 'realtime';
237
+ kind: "realtime";
193
238
  open: (options: TOptions) => Promise<RealtimeAdapterSession> | RealtimeAdapterSession;
194
239
  };
195
- export type VoiceSessionStatus = 'active' | 'reconnecting' | 'completed' | 'failed';
240
+ export type VoiceSessionStatus = "active" | "reconnecting" | "completed" | "failed";
241
+ export type VoiceReconnectClientStatus = "idle" | "reconnecting" | "resumed" | "exhausted";
242
+ export type VoiceReconnectClientState = {
243
+ attempts: number;
244
+ lastDisconnectAt?: number;
245
+ lastResumedAt?: number;
246
+ maxAttempts: number;
247
+ nextAttemptAt?: number;
248
+ status: VoiceReconnectClientStatus;
249
+ };
250
+ export type VoiceTurnCitation = {
251
+ chunkId: string;
252
+ score: number;
253
+ source?: string;
254
+ title?: string;
255
+ };
196
256
  export type VoiceTurnRecord<TResult = unknown> = {
197
257
  id: string;
198
258
  text: string;
199
259
  quality?: VoiceTranscriptQuality;
200
260
  transcripts: Transcript[];
201
261
  assistantText?: string;
262
+ attachments?: import("./agent").VoiceAgentMessageAttachment[];
263
+ citations?: VoiceTurnCitation[];
202
264
  committedAt: number;
203
265
  result?: TResult;
204
266
  };
@@ -253,10 +315,10 @@ export type VoiceSessionSummary = {
253
315
  status: VoiceSessionStatus;
254
316
  turnCount: number;
255
317
  };
256
- export type VoiceCallDisposition = 'completed' | 'transferred' | 'escalated' | 'voicemail' | 'no-answer' | 'failed' | 'closed';
318
+ export type VoiceCallDisposition = "completed" | "transferred" | "escalated" | "voicemail" | "no-answer" | "failed" | "silence-timeout" | "closed";
257
319
  export type VoiceCallLifecycleEvent = {
258
320
  at: number;
259
- type: 'start' | 'end' | 'transfer' | 'escalation' | 'voicemail' | 'no-answer';
321
+ type: "start" | "end" | "transfer" | "escalation" | "voicemail" | "no-answer";
260
322
  disposition?: VoiceCallDisposition;
261
323
  metadata?: Record<string, unknown>;
262
324
  reason?: string;
@@ -269,8 +331,8 @@ export type VoiceCallLifecycleState = {
269
331
  lastEventAt: number;
270
332
  startedAt: number;
271
333
  };
272
- export type VoiceHandoffAction = 'escalate' | 'no-answer' | 'transfer' | 'voicemail';
273
- export type VoiceHandoffStatus = 'delivered' | 'failed' | 'skipped';
334
+ export type VoiceHandoffAction = "escalate" | "no-answer" | "transfer" | "voicemail";
335
+ export type VoiceHandoffStatus = "delivered" | "failed" | "skipped";
274
336
  export type VoiceHandoffResult = {
275
337
  deliveredAt?: number;
276
338
  deliveredTo?: string;
@@ -278,7 +340,7 @@ export type VoiceHandoffResult = {
278
340
  metadata?: Record<string, unknown>;
279
341
  status: VoiceHandoffStatus;
280
342
  };
281
- export type VoiceHandoffDeliveryQueueStatus = VoiceHandoffStatus | 'pending';
343
+ export type VoiceHandoffDeliveryQueueStatus = VoiceHandoffStatus | "pending";
282
344
  export type StoredVoiceHandoffDelivery<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
283
345
  action: VoiceHandoffAction;
284
346
  context: TContext;
@@ -326,7 +388,7 @@ export type VoiceHandoffConfig<TContext = unknown, TSession extends VoiceSession
326
388
  adapters: VoiceHandoffAdapter<TContext, TSession, TResult>[];
327
389
  deliveryQueue?: VoiceHandoffDeliveryStore<StoredVoiceHandoffDelivery<TContext, TSession, TResult>>;
328
390
  enqueueOnly?: boolean;
329
- failMode?: 'record' | 'throw';
391
+ failMode?: "record" | "throw";
330
392
  };
331
393
  export type VoiceSessionStore<TSession extends VoiceSessionRecord = VoiceSessionRecord> = SessionStore<TSession, VoiceSessionSummary>;
332
394
  export type VoiceLogger = {
@@ -336,15 +398,15 @@ export type VoiceLogger = {
336
398
  error?: (message: string, meta?: Record<string, unknown>) => void;
337
399
  };
338
400
  export type VoiceReconnectConfig = {
339
- strategy?: 'resume-last-turn' | 'restart' | 'fail';
401
+ strategy?: "resume-last-turn" | "restart" | "fail";
340
402
  timeout?: number;
341
403
  maxAttempts?: number;
342
404
  };
343
- export type VoiceRuntimePreset = 'default' | 'chat' | 'guided-intake' | 'dictation' | 'noisy-room' | 'pstn-balanced' | 'pstn-fast' | 'reliability';
344
- export type VoiceSTTLifecycle = 'continuous' | 'turn-scoped';
345
- export type VoiceTurnProfile = 'fast' | 'balanced' | 'long-form';
346
- export type VoiceTurnQualityProfile = 'general' | 'accent-heavy' | 'noisy-room' | 'short-command';
347
- export type VoiceTurnFallbackTrigger = 'empty-turn' | 'low-confidence' | 'empty-or-low-confidence' | 'always';
405
+ export type VoiceRuntimePreset = "default" | "chat" | "guided-intake" | "dictation" | "noisy-room" | "pstn-balanced" | "pstn-fast" | "reliability";
406
+ export type VoiceSTTLifecycle = "continuous" | "turn-scoped";
407
+ export type VoiceTurnProfile = "fast" | "balanced" | "long-form";
408
+ export type VoiceTurnQualityProfile = "general" | "accent-heavy" | "noisy-room" | "short-command";
409
+ export type VoiceTurnFallbackTrigger = "empty-turn" | "low-confidence" | "empty-or-low-confidence" | "always";
348
410
  export type VoiceSTTFallbackConfig = {
349
411
  adapter: STTAdapter;
350
412
  trigger?: VoiceTurnFallbackTrigger;
@@ -397,11 +459,26 @@ export type VoiceSocket = {
397
459
  send: (data: string | Uint8Array | ArrayBuffer) => void | Promise<void>;
398
460
  close: (code?: number, reason?: string) => void | Promise<void>;
399
461
  };
462
+ export type VoiceMonitorRuntimeSessionBinding = {
463
+ deregister: (reason?: string) => void;
464
+ emitAudio: (chunk: Uint8Array | ArrayBuffer, options?: {
465
+ source?: "assistant" | "caller" | (string & {});
466
+ }) => void;
467
+ };
468
+ export type VoiceMonitorRuntimeRegisterInput = {
469
+ handle: VoiceSessionHandle<unknown, VoiceSessionRecord, unknown>;
470
+ metadata?: Record<string, unknown>;
471
+ sessionId: string;
472
+ };
473
+ export type VoiceMonitorRuntimeBinding = {
474
+ registerSession: (input: VoiceMonitorRuntimeRegisterInput) => VoiceMonitorRuntimeSessionBinding;
475
+ };
400
476
  export type VoiceSessionHandle<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
401
477
  id: string;
402
478
  connect: (socket: VoiceSocket) => Promise<void>;
403
479
  receiveAudio: (audio: AudioChunk) => Promise<void>;
404
- commitTurn: (reason?: VoiceEndOfTurnEvent['reason']) => Promise<void>;
480
+ attachUserMedia: (attachment: import("./agent").VoiceAgentMessageAttachment) => Promise<void>;
481
+ commitTurn: (reason?: VoiceEndOfTurnEvent["reason"]) => Promise<void>;
405
482
  disconnect: (event?: VoiceCloseEvent) => Promise<void>;
406
483
  complete: (result?: TResult) => Promise<void>;
407
484
  escalate: (input: {
@@ -423,6 +500,7 @@ export type VoiceSessionHandle<TContext = unknown, TSession extends VoiceSession
423
500
  reason?: string;
424
501
  result?: TResult;
425
502
  target: string;
503
+ transferMode?: "cold" | "warm";
426
504
  }) => Promise<void>;
427
505
  close: (reason?: string) => Promise<void>;
428
506
  snapshot: () => Promise<TSession>;
@@ -431,10 +509,12 @@ export type VoiceRouteResult<TResult = unknown> = {
431
509
  complete?: boolean;
432
510
  result?: TResult;
433
511
  assistantText?: string;
512
+ citations?: ReadonlyArray<VoiceTurnCitation>;
434
513
  transfer?: {
435
514
  metadata?: Record<string, unknown>;
436
515
  reason?: string;
437
516
  target: string;
517
+ transferMode?: "cold" | "warm";
438
518
  };
439
519
  escalate?: {
440
520
  metadata?: Record<string, unknown>;
@@ -475,6 +555,10 @@ export type VoiceLexiconResolver<TContext = unknown> = (input: {
475
555
  }) => Promise<VoiceLexiconEntry[] | void> | VoiceLexiconEntry[] | void;
476
556
  export type VoiceOnTurnObjectHandler<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = (input: {
477
557
  context: TContext;
558
+ liveOps?: {
559
+ control: VoiceLiveOpsControlState;
560
+ injectedInstruction?: string;
561
+ };
478
562
  session: TSession;
479
563
  turn: VoiceTurnRecord;
480
564
  api: VoiceSessionHandle<TContext, TSession, TResult>;
@@ -559,7 +643,7 @@ export type VoiceRuntimeOpsConfig<TContext = unknown, TSession extends VoiceSess
559
643
  disposition: VoiceCallDisposition;
560
644
  review: StoredVoiceCallReviewArtifact;
561
645
  session: TSession;
562
- }) => Promise<Omit<VoiceOpsTask, 'id'> | VoiceOpsTask | StoredVoiceOpsTask | null | void> | Omit<VoiceOpsTask, 'id'> | VoiceOpsTask | StoredVoiceOpsTask | null | void;
646
+ }) => Promise<Omit<VoiceOpsTask, "id"> | VoiceOpsTask | StoredVoiceOpsTask | null | void> | Omit<VoiceOpsTask, "id"> | VoiceOpsTask | StoredVoiceOpsTask | null | void;
563
647
  resolveTaskPolicy?: (input: {
564
648
  api: VoiceSessionHandle<TContext, TSession, TResult>;
565
649
  context: TContext;
@@ -596,7 +680,37 @@ export type VoiceRuntimeOpsConfig<TContext = unknown, TSession extends VoiceSess
596
680
  tasks?: VoiceOpsTaskStore;
597
681
  webhook?: VoiceIntegrationWebhookConfig;
598
682
  };
599
- export type VoiceNormalizedRouteConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = Omit<VoiceRouteConfig<TContext, TSession, TResult>, 'onTurn'> & {
683
+ export type VoiceLiveOpsRuntimeConfig = {
684
+ getControl: (sessionId: string) => Promise<VoiceLiveOpsControlState | null | undefined> | VoiceLiveOpsControlState | null | undefined;
685
+ };
686
+ export type VoiceProfileSwitchGuardResolverInput<TContext = unknown> = {
687
+ context: TContext;
688
+ scenarioId?: string;
689
+ sessionId: string;
690
+ };
691
+ export type VoicePluginProfileSwitchGuardConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
692
+ actor?: VoiceAuditActor;
693
+ allowedProfileIds?: string[] | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<string[] | undefined> | string[] | undefined);
694
+ audit?: VoiceAuditEventStore;
695
+ blockedProfileIds?: string[] | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<string[] | undefined> | string[] | undefined);
696
+ currentProfileId?: string | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<string | undefined> | string | undefined);
697
+ defaultProfileId?: string;
698
+ defaults: VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport> | VoiceRealCallProfileDefaultsReport | VoiceRealCallProfileHistoryReport);
699
+ metadata?: Record<string, unknown> | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<Record<string, unknown> | undefined> | Record<string, unknown> | undefined);
700
+ minConfidence?: number | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<number | undefined> | number | undefined);
701
+ maxAutoSwitchesPerSession?: number | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<number | undefined> | number | undefined);
702
+ mode?: VoiceProfileSwitchGuardMode | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<VoiceProfileSwitchGuardMode | undefined> | VoiceProfileSwitchGuardMode | undefined);
703
+ observed?: VoiceProfileSwitchObservedSignals | ((input: VoiceProfileSwitchGuardResolverInput<TContext>) => Promise<VoiceProfileSwitchObservedSignals | undefined> | VoiceProfileSwitchObservedSignals | undefined);
704
+ onDecision?: (input: {
705
+ context: TContext;
706
+ decision: VoiceProfileSwitchGuardDecision;
707
+ scenarioId?: string;
708
+ sessionId: string;
709
+ }) => Promise<void> | void;
710
+ sessionMetadataKey?: string | false;
711
+ trace?: false | VoiceTraceEventStore;
712
+ };
713
+ export type VoiceNormalizedRouteConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = Omit<VoiceRouteConfig<TContext, TSession, TResult>, "onTurn"> & {
600
714
  onTurn: VoiceOnTurnObjectHandler<TContext, TSession, TResult>;
601
715
  };
602
716
  export type VoiceScenario = {
@@ -616,124 +730,193 @@ export type VoicePluginConfig<TContext = unknown, TSession extends VoiceSessionR
616
730
  lexicon?: VoiceLexiconEntry[] | VoiceLexiconResolver<TContext>;
617
731
  phraseHints?: VoicePhraseHint[] | VoicePhraseHintResolver<TContext>;
618
732
  preset?: VoiceRuntimePreset;
619
- stt: STTAdapter;
733
+ stt?: STTAdapter;
620
734
  sttFallback?: VoiceSTTFallbackConfig;
621
735
  sttLifecycle?: VoiceSTTLifecycle;
736
+ realtime?: RealtimeAdapter;
737
+ realtimeInputFormat?: AudioFormat;
622
738
  tts?: TTSAdapter;
623
739
  session: VoiceSessionStore<NoInfer<TSession>>;
624
740
  reconnect?: VoiceReconnectConfig;
625
741
  turnDetection?: VoiceTurnDetectionConfig;
626
742
  audioConditioning?: VoiceAudioConditioningConfig;
743
+ noiseSuppressor?: VoiceNoiseSuppressor;
744
+ noiseSuppressorFormat?: AudioFormat;
627
745
  logger?: VoiceLogger;
628
746
  htmx?: boolean | VoiceHTMXConfig<TSession, NoInfer<TResult>>;
629
747
  handoff?: VoiceHandoffConfig<TContext, TSession, TResult>;
630
748
  ops?: VoiceRuntimeOpsConfig<TContext, TSession, TResult>;
749
+ liveOps?: VoiceLiveOpsRuntimeConfig;
750
+ monitor?: VoiceMonitorRuntimeBinding;
751
+ profileSwitchGuard?: VoicePluginProfileSwitchGuardConfig<TContext, TSession, TResult>;
631
752
  trace?: VoiceTraceEventStore;
632
753
  } & VoiceRouteConfig<TContext, TSession, TResult>;
754
+ export type VoiceSessionRecordingConfig = {
755
+ channels?: ReadonlyArray<"assistant" | "user">;
756
+ maxBytesPerChannel?: number;
757
+ store: import("./recordingStore").VoiceRecordingStore;
758
+ userInputFormat?: AudioFormat;
759
+ };
633
760
  export type CreateVoiceSessionOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
634
761
  costTelemetry?: VoiceCostTelemetryConfig<TContext, TSession, TResult>;
635
762
  id: string;
636
763
  context: TContext;
637
764
  socket: VoiceSocket;
638
- stt: STTAdapter;
765
+ stt?: STTAdapter;
766
+ realtime?: RealtimeAdapter;
767
+ realtimeInputFormat?: AudioFormat;
639
768
  tts?: TTSAdapter;
640
769
  languageStrategy?: VoiceLanguageStrategy;
641
770
  lexicon?: VoiceLexiconEntry[];
642
771
  sttFallback?: VoiceResolvedSTTFallbackConfig;
643
772
  store: VoiceSessionStore<TSession>;
644
773
  trace?: VoiceTraceEventStore;
774
+ recording?: VoiceSessionRecordingConfig;
775
+ callSilenceTimeoutMs?: number;
776
+ amd?: import("./amdDetector").VoiceAMDDetector<TContext, TSession, TResult>;
777
+ costAccountant?: import("./costAccounting").VoiceCostAccountant;
778
+ costTelephony?: {
779
+ provider?: string;
780
+ };
781
+ redact?: import("./redaction").VoiceTranscriptRedactor;
782
+ semanticTurnDetector?: import("./semanticTurn").VoiceSemanticTurnDetector;
783
+ assistantMode?: import("./assistantMode").VoiceAssistantMode;
784
+ modalities?: ReadonlyArray<"audio" | "text">;
785
+ prosody?: VoiceTTSProsody;
645
786
  reconnect: Required<VoiceReconnectConfig>;
646
787
  phraseHints?: VoicePhraseHint[];
788
+ sessionMetadata?: Record<string, unknown>;
647
789
  scenarioId?: string;
648
790
  sttLifecycle: VoiceSTTLifecycle;
649
791
  turnDetection: VoiceResolvedTurnDetectionConfig;
650
792
  audioConditioning?: VoiceResolvedAudioConditioningConfig;
793
+ noiseSuppressor?: VoiceNoiseSuppressor;
794
+ noiseSuppressorFormat?: AudioFormat;
651
795
  handoff?: VoiceHandoffConfig<TContext, TSession, TResult>;
796
+ liveOps?: VoiceLiveOpsRuntimeConfig;
652
797
  route: VoiceNormalizedRouteConfig<TContext, TSession, TResult>;
653
798
  logger?: VoiceLogger;
654
799
  };
655
800
  export type CreateVoiceSession = <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(options: CreateVoiceSessionOptions<TContext, TSession, TResult>) => VoiceSessionHandle<TContext, TSession, TResult>;
656
801
  export type VoiceClientStartMessage = {
657
- type: 'start';
802
+ type: "start";
658
803
  sessionId?: string;
659
804
  scenarioId?: string;
660
805
  };
661
806
  export type VoiceClientEndTurnMessage = {
662
- type: 'end_turn';
807
+ type: "end_turn";
663
808
  };
664
809
  export type VoiceClientCloseMessage = {
665
- type: 'close';
810
+ type: "close";
666
811
  reason?: string;
667
812
  };
668
813
  export type VoiceClientCallControlMessage = {
669
- type: 'call_control';
670
- action: 'complete' | 'escalate' | 'no-answer' | 'transfer' | 'voicemail';
814
+ type: "call_control";
815
+ action: "complete" | "escalate" | "no-answer" | "transfer" | "voicemail";
671
816
  metadata?: Record<string, unknown>;
672
817
  reason?: string;
673
818
  target?: string;
674
819
  };
675
820
  export type VoiceClientPingMessage = {
676
- type: 'ping';
821
+ type: "ping";
677
822
  };
678
823
  export type VoiceClientMessage = VoiceClientStartMessage | VoiceClientEndTurnMessage | VoiceClientCloseMessage | VoiceClientCallControlMessage | VoiceClientPingMessage;
679
824
  export type VoiceServerSessionMessage = {
680
- type: 'session';
825
+ type: "session";
681
826
  sessionId: string;
682
827
  status: VoiceSessionStatus;
683
828
  scenarioId?: string;
829
+ sessionMetadata?: Record<string, unknown>;
830
+ };
831
+ export type VoiceServerReplayMessage<TResult = unknown> = {
832
+ type: "replay";
833
+ assistantTexts: string[];
834
+ call?: VoiceCallLifecycleState;
835
+ partial: string;
836
+ scenarioId?: string;
837
+ sessionId: string;
838
+ sessionMetadata?: Record<string, unknown>;
839
+ status: VoiceSessionStatus;
840
+ turns: VoiceTurnRecord<TResult>[];
684
841
  };
685
842
  export type VoiceServerPartialMessage = {
686
- type: 'partial';
843
+ type: "partial";
687
844
  transcript: Transcript;
688
845
  };
689
846
  export type VoiceServerFinalMessage = {
690
- type: 'final';
847
+ type: "final";
691
848
  transcript: Transcript;
692
849
  };
693
850
  export type VoiceServerTurnMessage<TResult = unknown> = {
694
- type: 'turn';
851
+ type: "turn";
695
852
  turn: VoiceTurnRecord<TResult>;
696
853
  };
697
854
  export type VoiceServerAssistantMessage = {
698
- type: 'assistant';
855
+ type: "assistant";
699
856
  text: string;
700
857
  turnId?: string;
701
858
  };
702
859
  export type VoiceServerAudioMessage = {
703
- type: 'audio';
860
+ type: "audio";
704
861
  chunkBase64: string;
705
862
  format: AudioFormat;
706
863
  receivedAt: number;
707
864
  turnId?: string;
708
865
  };
709
866
  export type VoiceServerCompleteMessage = {
710
- type: 'complete';
867
+ type: "complete";
711
868
  sessionId: string;
712
869
  };
713
870
  export type VoiceServerCallLifecycleMessage = {
714
- type: 'call_lifecycle';
871
+ type: "call_lifecycle";
715
872
  event: VoiceCallLifecycleEvent;
716
873
  sessionId: string;
717
874
  };
718
875
  export type VoiceServerErrorMessage = {
719
- type: 'error';
876
+ type: "error";
720
877
  message: string;
721
878
  recoverable?: boolean;
722
879
  };
723
880
  export type VoiceServerPongMessage = {
724
- type: 'pong';
881
+ type: "pong";
725
882
  };
726
- export type VoiceServerMessage<TResult = unknown> = VoiceServerSessionMessage | VoiceServerPartialMessage | VoiceServerFinalMessage | VoiceServerTurnMessage<TResult> | VoiceServerAssistantMessage | VoiceServerAudioMessage | VoiceServerCallLifecycleMessage | VoiceServerCompleteMessage | VoiceServerErrorMessage | VoiceServerPongMessage;
883
+ export type VoiceServerConnectionMessage = {
884
+ type: "connection";
885
+ reconnect: VoiceReconnectClientState;
886
+ };
887
+ export type VoiceServerMessage<TResult = unknown> = VoiceServerSessionMessage | VoiceServerReplayMessage<TResult> | VoiceServerPartialMessage | VoiceServerFinalMessage | VoiceServerTurnMessage<TResult> | VoiceServerAssistantMessage | VoiceServerAudioMessage | VoiceServerCallLifecycleMessage | VoiceServerCompleteMessage | VoiceServerErrorMessage | VoiceServerPongMessage | VoiceServerConnectionMessage;
727
888
  export type VoiceConnectionOptions = {
889
+ browserMedia?: false | VoiceBrowserMediaReporterOptions;
728
890
  protocols?: string[];
729
891
  scenarioId?: string;
730
892
  reconnect?: boolean;
893
+ reconnectReportPath?: string;
731
894
  maxReconnectAttempts?: number;
732
895
  pingInterval?: number;
733
896
  sessionId?: string;
734
897
  };
898
+ export type VoiceBrowserMediaReportPayload = {
899
+ at: number;
900
+ continuity?: MediaWebRTCStreamContinuityReport;
901
+ report: MediaWebRTCStatsReport;
902
+ scenarioId?: string | null;
903
+ sessionId?: string | null;
904
+ };
905
+ export type VoiceBrowserMediaReporterOptions = Omit<MediaWebRTCStatsReportInput, "peerConnection"> & {
906
+ fetch?: typeof fetch;
907
+ getPeerConnection?: (() => MediaWebRTCStatsCollector | null | undefined) | (() => Promise<MediaWebRTCStatsCollector | null | undefined>);
908
+ getScenarioId?: () => string | null | undefined;
909
+ getSessionId?: () => string | null | undefined;
910
+ intervalMs?: number;
911
+ continuity?: false | Omit<MediaWebRTCStreamContinuityInput, "previousStats" | "stats">;
912
+ onError?: (error: unknown) => void;
913
+ onReport?: (payload: VoiceBrowserMediaReportPayload) => void;
914
+ path?: string;
915
+ peerConnection?: MediaWebRTCStatsCollector;
916
+ };
735
917
  export type VoiceCaptureOptions = {
736
918
  channelCount?: 1 | 2;
919
+ onAudio?: (audio: Uint8Array | ArrayBuffer, sendAudio: (audio: Uint8Array | ArrayBuffer) => void) => void;
737
920
  onLevel?: (level: number) => void;
738
921
  sampleRateHz?: number;
739
922
  };
@@ -747,6 +930,46 @@ export type VoiceBargeInOptions = {
747
930
  enabled?: boolean;
748
931
  interruptOnPartial?: boolean;
749
932
  interruptThreshold?: number;
933
+ monitor?: VoiceBargeInMonitor;
934
+ };
935
+ export type VoiceBargeInTriggerReason = "input-level" | "manual-audio" | "manual-interrupt" | "partial-transcript";
936
+ export type VoiceBargeInMonitorEvent = {
937
+ at: number;
938
+ id: string;
939
+ latencyMs?: number;
940
+ playbackStopLatencyMs?: number;
941
+ reason: VoiceBargeInTriggerReason;
942
+ sessionId?: string | null;
943
+ status: "requested" | "stopped" | "skipped";
944
+ thresholdMs?: number;
945
+ };
946
+ export type VoiceBargeInMonitorSnapshot = {
947
+ averageLatencyMs?: number;
948
+ events: VoiceBargeInMonitorEvent[];
949
+ failed: number;
950
+ lastEvent?: VoiceBargeInMonitorEvent;
951
+ passed: number;
952
+ status: "empty" | "fail" | "pass" | "warn";
953
+ thresholdMs: number;
954
+ total: number;
955
+ };
956
+ export type VoiceBargeInMonitor = {
957
+ getSnapshot: () => VoiceBargeInMonitorSnapshot;
958
+ recordRequested: (input: {
959
+ reason: VoiceBargeInTriggerReason;
960
+ sessionId?: string | null;
961
+ }) => VoiceBargeInMonitorEvent;
962
+ recordSkipped: (input: {
963
+ reason: VoiceBargeInTriggerReason;
964
+ sessionId?: string | null;
965
+ }) => VoiceBargeInMonitorEvent;
966
+ recordStopped: (input: {
967
+ latencyMs?: number;
968
+ playbackStopLatencyMs?: number;
969
+ reason: VoiceBargeInTriggerReason;
970
+ sessionId?: string | null;
971
+ }) => VoiceBargeInMonitorEvent;
972
+ subscribe: (subscriber: () => void) => () => void;
750
973
  };
751
974
  export type VoiceAudioPlayerOptions = {
752
975
  autoStart?: boolean;
@@ -757,10 +980,10 @@ export type VoiceDuplexControllerOptions = VoiceControllerOptions & {
757
980
  audioPlayer?: VoiceAudioPlayerOptions;
758
981
  bargeIn?: VoiceBargeInOptions;
759
982
  };
760
- export type VoiceSTTRoutingGoal = 'best' | 'low-cost';
761
- export type VoiceSTTRoutingCorrectionMode = 'generic' | 'none' | 'risky-turn';
983
+ export type VoiceSTTRoutingGoal = "best" | "low-cost";
984
+ export type VoiceSTTRoutingCorrectionMode = "generic" | "none" | "risky-turn";
762
985
  export type VoiceSTTRoutingStrategy = {
763
- benchmarkSessionTarget: 'deepgram-corrected' | 'deepgram-flux';
986
+ benchmarkSessionTarget: "deepgram-corrected" | "deepgram-flux";
764
987
  correctionMode: VoiceSTTRoutingCorrectionMode;
765
988
  goal: VoiceSTTRoutingGoal;
766
989
  notes: string[];
@@ -774,7 +997,7 @@ export type VoiceHTMXRenderInput<TResult = unknown, TSession extends VoiceSessio
774
997
  result?: TResult;
775
998
  session?: TSession;
776
999
  sessionId?: string;
777
- status: VoiceSessionStatus | 'idle';
1000
+ status: VoiceSessionStatus | "idle";
778
1001
  turnCount: number;
779
1002
  turns: VoiceTurnRecord<TResult>[];
780
1003
  };
@@ -802,9 +1025,11 @@ export type VoiceHTMXOptions<TSession extends VoiceSessionRecord = VoiceSessionR
802
1025
  export type VoiceHTMXConfig<TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoiceHTMXRenderer<TSession, TResult> | VoiceHTMXOptions<TSession, TResult>;
803
1026
  export type VoiceStreamState<TResult = unknown> = {
804
1027
  call: VoiceCallLifecycleState | null;
1028
+ sessionMetadata: Record<string, unknown> | null;
805
1029
  sessionId: string | null;
806
1030
  scenarioId: string | null;
807
- status: VoiceSessionStatus | 'idle';
1031
+ status: VoiceSessionStatus | "idle";
1032
+ reconnect: VoiceReconnectClientState;
808
1033
  partial: string;
809
1034
  turns: VoiceTurnRecord<TResult>[];
810
1035
  assistantTexts: string[];
@@ -819,7 +1044,7 @@ export type VoiceStreamState<TResult = unknown> = {
819
1044
  };
820
1045
  export type VoiceStream<TResult = unknown> = {
821
1046
  call: VoiceCallLifecycleState | null;
822
- callControl: (message: Omit<VoiceClientCallControlMessage, 'type'>) => void;
1047
+ callControl: (message: Omit<VoiceClientCallControlMessage, "type">) => void;
823
1048
  close: () => void;
824
1049
  start: (input?: {
825
1050
  scenarioId?: string;
@@ -831,10 +1056,13 @@ export type VoiceStream<TResult = unknown> = {
831
1056
  getSnapshot: () => VoiceStreamState<TResult>;
832
1057
  isConnected: boolean;
833
1058
  partial: string;
1059
+ reconnect: VoiceReconnectClientState;
834
1060
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
1061
+ simulateDisconnect: () => void;
835
1062
  sessionId: string | null;
1063
+ sessionMetadata: Record<string, unknown> | null;
836
1064
  scenarioId: string | null;
837
- status: VoiceSessionStatus | 'idle';
1065
+ status: VoiceSessionStatus | "idle";
838
1066
  subscribe: (subscriber: () => void) => () => void;
839
1067
  turns: VoiceTurnRecord<TResult>[];
840
1068
  assistantTexts: string[];
@@ -860,7 +1088,7 @@ export type VoiceAudioPlayerState = {
860
1088
  queuedChunkCount: number;
861
1089
  };
862
1090
  export type VoiceAudioPlayerSource = {
863
- assistantAudio: VoiceStreamState['assistantAudio'];
1091
+ assistantAudio: VoiceStreamState["assistantAudio"];
864
1092
  subscribe: (subscriber: () => void) => () => void;
865
1093
  };
866
1094
  export type VoiceAudioPlayer = {
@@ -887,7 +1115,7 @@ export type VoiceBargeInBinding = {
887
1115
  export type VoiceController<TResult = unknown> = {
888
1116
  bindHTMX: (options: VoiceHTMXBindingOptions) => () => void;
889
1117
  call: VoiceCallLifecycleState | null;
890
- callControl: (message: Omit<VoiceClientCallControlMessage, 'type'>) => void;
1118
+ callControl: (message: Omit<VoiceClientCallControlMessage, "type">) => void;
891
1119
  close: () => void;
892
1120
  endTurn: () => void;
893
1121
  start: (input?: {
@@ -900,12 +1128,15 @@ export type VoiceController<TResult = unknown> = {
900
1128
  isConnected: boolean;
901
1129
  isRecording: boolean;
902
1130
  partial: string;
1131
+ reconnect: VoiceReconnectClientState;
903
1132
  recordingError: string | null;
904
1133
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
1134
+ simulateDisconnect: () => void;
905
1135
  sessionId: string | null;
1136
+ sessionMetadata: Record<string, unknown> | null;
906
1137
  scenarioId: string | null;
907
1138
  startRecording: () => Promise<void>;
908
- status: VoiceSessionStatus | 'idle';
1139
+ status: VoiceSessionStatus | "idle";
909
1140
  stopRecording: () => void;
910
1141
  subscribe: (subscriber: () => void) => () => void;
911
1142
  toggleRecording: () => Promise<void>;
@@ -929,40 +1160,54 @@ export type VoiceHTMXBindingOptions = {
929
1160
  sessionQueryParam?: string;
930
1161
  };
931
1162
  export type VoiceStoreAction<TResult = unknown> = {
932
- type: 'session';
1163
+ type: "session";
933
1164
  sessionId: string;
1165
+ sessionMetadata?: Record<string, unknown>;
934
1166
  scenarioId?: string;
935
1167
  status: VoiceSessionStatus;
936
1168
  } | {
937
- type: 'call_lifecycle';
1169
+ type: "replay";
1170
+ assistantTexts: string[];
1171
+ call?: VoiceCallLifecycleState;
1172
+ partial: string;
1173
+ scenarioId?: string;
1174
+ sessionId: string;
1175
+ sessionMetadata?: Record<string, unknown>;
1176
+ status: VoiceSessionStatus;
1177
+ turns: VoiceTurnRecord<TResult>[];
1178
+ } | {
1179
+ type: "call_lifecycle";
938
1180
  event: VoiceCallLifecycleEvent;
939
1181
  sessionId: string;
940
1182
  } | {
941
- type: 'partial';
1183
+ type: "partial";
942
1184
  transcript: Transcript;
943
1185
  } | {
944
- type: 'final';
1186
+ type: "final";
945
1187
  transcript: Transcript;
946
1188
  } | {
947
- type: 'turn';
1189
+ type: "turn";
948
1190
  turn: VoiceTurnRecord<TResult>;
949
1191
  } | {
950
- type: 'assistant';
1192
+ type: "assistant";
951
1193
  text: string;
952
1194
  } | {
953
- type: 'audio';
1195
+ type: "audio";
954
1196
  chunk: Uint8Array;
955
1197
  format: AudioFormat;
956
1198
  receivedAt: number;
957
1199
  turnId?: string;
958
1200
  } | {
959
- type: 'complete';
1201
+ type: "complete";
960
1202
  sessionId: string;
961
1203
  } | {
962
- type: 'error';
1204
+ type: "error";
963
1205
  message: string;
964
1206
  } | {
965
- type: 'connected';
1207
+ type: "connected";
1208
+ } | {
1209
+ type: "connection";
1210
+ reconnect: VoiceReconnectClientState;
966
1211
  } | {
967
- type: 'disconnected';
1212
+ type: "disconnected";
968
1213
  };