@absolutejs/voice 0.0.22-beta.27 → 0.0.22-beta.271

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 (225) hide show
  1. package/README.md +3234 -228
  2. package/dist/agent.d.ts +62 -0
  3. package/dist/agentSquadContract.d.ts +98 -0
  4. package/dist/angular/index.d.ts +15 -0
  5. package/dist/angular/index.js +3402 -1150
  6. package/dist/angular/voice-agent-squad-status.service.d.ts +12 -0
  7. package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
  8. package/dist/angular/voice-controller.service.d.ts +1 -0
  9. package/dist/angular/voice-delivery-runtime.component.d.ts +17 -0
  10. package/dist/angular/voice-delivery-runtime.service.d.ts +16 -0
  11. package/dist/angular/voice-live-ops.service.d.ts +11 -0
  12. package/dist/angular/voice-ops-action-center.service.d.ts +13 -0
  13. package/dist/angular/voice-ops-status.component.d.ts +15 -0
  14. package/dist/angular/voice-ops-status.service.d.ts +12 -0
  15. package/dist/angular/voice-platform-coverage.service.d.ts +12 -0
  16. package/dist/angular/voice-proof-trends.service.d.ts +12 -0
  17. package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
  18. package/dist/angular/voice-provider-contracts.service.d.ts +12 -0
  19. package/dist/angular/voice-routing-status.service.d.ts +11 -0
  20. package/dist/angular/voice-stream.service.d.ts +3 -0
  21. package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
  22. package/dist/angular/voice-turn-latency.service.d.ts +13 -0
  23. package/dist/angular/voice-turn-quality.service.d.ts +12 -0
  24. package/dist/angular/voice-workflow-status.service.d.ts +12 -0
  25. package/dist/audit.d.ts +128 -0
  26. package/dist/auditDeliveryRoutes.d.ts +85 -0
  27. package/dist/auditExport.d.ts +34 -0
  28. package/dist/auditRoutes.d.ts +66 -0
  29. package/dist/auditSinks.d.ts +151 -0
  30. package/dist/bargeInRoutes.d.ts +56 -0
  31. package/dist/campaign.d.ts +768 -0
  32. package/dist/campaignDialers.d.ts +111 -0
  33. package/dist/client/actions.d.ts +83 -0
  34. package/dist/client/agentSquadStatus.d.ts +37 -0
  35. package/dist/client/agentSquadStatusWidget.d.ts +24 -0
  36. package/dist/client/bargeInMonitor.d.ts +7 -0
  37. package/dist/client/campaignDialerProof.d.ts +23 -0
  38. package/dist/client/deliveryRuntime.d.ts +34 -0
  39. package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
  40. package/dist/client/duplex.d.ts +1 -1
  41. package/dist/client/htmxBootstrap.js +703 -13
  42. package/dist/client/index.d.ts +66 -0
  43. package/dist/client/index.js +5073 -19
  44. package/dist/client/liveOps.d.ts +22 -0
  45. package/dist/client/liveOpsWidget.d.ts +23 -0
  46. package/dist/client/liveTurnLatency.d.ts +41 -0
  47. package/dist/client/opsActionCenter.d.ts +54 -0
  48. package/dist/client/opsActionCenterWidget.d.ts +29 -0
  49. package/dist/client/opsActionHistory.d.ts +19 -0
  50. package/dist/client/opsActionHistoryWidget.d.ts +11 -0
  51. package/dist/client/opsStatus.d.ts +19 -0
  52. package/dist/client/opsStatusWidget.d.ts +40 -0
  53. package/dist/client/platformCoverage.d.ts +19 -0
  54. package/dist/client/platformCoverageWidget.d.ts +37 -0
  55. package/dist/client/proofTrends.d.ts +19 -0
  56. package/dist/client/proofTrendsWidget.d.ts +37 -0
  57. package/dist/client/providerCapabilities.d.ts +19 -0
  58. package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
  59. package/dist/client/providerContracts.d.ts +19 -0
  60. package/dist/client/providerContractsWidget.d.ts +37 -0
  61. package/dist/client/providerSimulationControls.d.ts +33 -0
  62. package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
  63. package/dist/client/providerStatusWidget.d.ts +32 -0
  64. package/dist/client/routingStatus.d.ts +19 -0
  65. package/dist/client/routingStatusWidget.d.ts +28 -0
  66. package/dist/client/traceTimeline.d.ts +19 -0
  67. package/dist/client/traceTimelineWidget.d.ts +36 -0
  68. package/dist/client/turnLatency.d.ts +22 -0
  69. package/dist/client/turnLatencyWidget.d.ts +33 -0
  70. package/dist/client/turnQuality.d.ts +19 -0
  71. package/dist/client/turnQualityWidget.d.ts +32 -0
  72. package/dist/client/workflowStatus.d.ts +19 -0
  73. package/dist/dataControl.d.ts +180 -0
  74. package/dist/deliveryRuntime.d.ts +158 -0
  75. package/dist/deliverySinkRoutes.d.ts +117 -0
  76. package/dist/demoReadyRoutes.d.ts +98 -0
  77. package/dist/diagnosticsRoutes.d.ts +44 -0
  78. package/dist/evalRoutes.d.ts +219 -0
  79. package/dist/fileStore.d.ts +14 -2
  80. package/dist/guardrails.d.ts +128 -0
  81. package/dist/handoff.d.ts +54 -0
  82. package/dist/handoffHealth.d.ts +94 -0
  83. package/dist/incidentBundle.d.ts +116 -0
  84. package/dist/index.d.ts +132 -13
  85. package/dist/index.js +25874 -5035
  86. package/dist/latencySlo.d.ts +56 -0
  87. package/dist/liveLatency.d.ts +78 -0
  88. package/dist/liveOps.d.ts +190 -0
  89. package/dist/modelAdapters.d.ts +23 -2
  90. package/dist/observabilityExport.d.ts +481 -0
  91. package/dist/openaiRealtime.d.ts +27 -0
  92. package/dist/openaiTTS.d.ts +18 -0
  93. package/dist/operationsRecord.d.ts +210 -0
  94. package/dist/opsActionAuditRoutes.d.ts +99 -0
  95. package/dist/opsConsoleRoutes.d.ts +80 -0
  96. package/dist/opsRecovery.d.ts +137 -0
  97. package/dist/opsStatus.d.ts +76 -0
  98. package/dist/opsStatusRoutes.d.ts +33 -0
  99. package/dist/outcomeContract.d.ts +146 -0
  100. package/dist/phoneAgent.d.ts +139 -0
  101. package/dist/phoneAgentProductionSmoke.d.ts +115 -0
  102. package/dist/platformCoverage.d.ts +91 -0
  103. package/dist/postCallAnalysis.d.ts +98 -0
  104. package/dist/postgresStore.d.ts +13 -2
  105. package/dist/productionReadiness.d.ts +484 -0
  106. package/dist/proofTrends.d.ts +133 -0
  107. package/dist/providerAdapters.d.ts +48 -0
  108. package/dist/providerCapabilities.d.ts +92 -0
  109. package/dist/providerHealth.d.ts +1 -0
  110. package/dist/providerRoutingContract.d.ts +71 -0
  111. package/dist/providerSlo.d.ts +142 -0
  112. package/dist/providerStackRecommendations.d.ts +187 -0
  113. package/dist/qualityRoutes.d.ts +76 -0
  114. package/dist/queue.d.ts +61 -0
  115. package/dist/react/VoiceAgentSquadStatus.d.ts +5 -0
  116. package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
  117. package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
  118. package/dist/react/VoiceOpsStatus.d.ts +6 -0
  119. package/dist/react/VoicePlatformCoverage.d.ts +6 -0
  120. package/dist/react/VoiceProofTrends.d.ts +6 -0
  121. package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
  122. package/dist/react/VoiceProviderContracts.d.ts +6 -0
  123. package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
  124. package/dist/react/VoiceProviderStatus.d.ts +6 -0
  125. package/dist/react/VoiceRoutingStatus.d.ts +6 -0
  126. package/dist/react/VoiceTraceTimeline.d.ts +6 -0
  127. package/dist/react/VoiceTurnLatency.d.ts +6 -0
  128. package/dist/react/VoiceTurnQuality.d.ts +6 -0
  129. package/dist/react/index.d.ts +30 -0
  130. package/dist/react/index.js +4773 -31
  131. package/dist/react/useVoiceAgentSquadStatus.d.ts +8 -0
  132. package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
  133. package/dist/react/useVoiceController.d.ts +2 -0
  134. package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
  135. package/dist/react/useVoiceLiveOps.d.ts +9 -0
  136. package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
  137. package/dist/react/useVoiceOpsStatus.d.ts +8 -0
  138. package/dist/react/useVoicePlatformCoverage.d.ts +8 -0
  139. package/dist/react/useVoiceProofTrends.d.ts +8 -0
  140. package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
  141. package/dist/react/useVoiceProviderContracts.d.ts +8 -0
  142. package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
  143. package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
  144. package/dist/react/useVoiceStream.d.ts +2 -0
  145. package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
  146. package/dist/react/useVoiceTurnLatency.d.ts +9 -0
  147. package/dist/react/useVoiceTurnQuality.d.ts +8 -0
  148. package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
  149. package/dist/readinessProfiles.d.ts +37 -0
  150. package/dist/reconnectContract.d.ts +87 -0
  151. package/dist/resilienceRoutes.d.ts +143 -0
  152. package/dist/sessionReplay.d.ts +12 -0
  153. package/dist/simulationSuite.d.ts +143 -0
  154. package/dist/sqliteStore.d.ts +13 -2
  155. package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
  156. package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
  157. package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
  158. package/dist/svelte/createVoiceLiveOps.d.ts +13 -0
  159. package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
  160. package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
  161. package/dist/svelte/createVoicePlatformCoverage.d.ts +7 -0
  162. package/dist/svelte/createVoiceProofTrends.d.ts +7 -0
  163. package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
  164. package/dist/svelte/createVoiceProviderContracts.d.ts +10 -0
  165. package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
  166. package/dist/svelte/createVoiceProviderStatus.d.ts +4 -2
  167. package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
  168. package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
  169. package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
  170. package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
  171. package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
  172. package/dist/svelte/index.d.ts +16 -0
  173. package/dist/svelte/index.js +4838 -420
  174. package/dist/telephony/contract.d.ts +61 -0
  175. package/dist/telephony/matrix.d.ts +97 -0
  176. package/dist/telephony/plivo.d.ts +303 -0
  177. package/dist/telephony/telnyx.d.ts +247 -0
  178. package/dist/telephony/twilio.d.ts +135 -2
  179. package/dist/telephonyOutcome.d.ts +273 -0
  180. package/dist/testing/index.d.ts +1 -0
  181. package/dist/testing/index.js +2047 -42
  182. package/dist/testing/ioProviderSimulator.d.ts +41 -0
  183. package/dist/toolContract.d.ts +161 -0
  184. package/dist/toolRuntime.d.ts +50 -0
  185. package/dist/trace.d.ts +19 -1
  186. package/dist/traceDeliveryRoutes.d.ts +86 -0
  187. package/dist/traceTimeline.d.ts +97 -0
  188. package/dist/turnLatency.d.ts +95 -0
  189. package/dist/turnQuality.d.ts +94 -0
  190. package/dist/types.d.ts +158 -3
  191. package/dist/vue/VoiceDeliveryRuntime.d.ts +30 -0
  192. package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
  193. package/dist/vue/VoiceOpsStatus.d.ts +30 -0
  194. package/dist/vue/VoicePlatformCoverage.d.ts +23 -0
  195. package/dist/vue/VoiceProofTrends.d.ts +21 -0
  196. package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
  197. package/dist/vue/VoiceProviderContracts.d.ts +21 -0
  198. package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
  199. package/dist/vue/VoiceProviderStatus.d.ts +51 -0
  200. package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
  201. package/dist/vue/VoiceTurnLatency.d.ts +69 -0
  202. package/dist/vue/VoiceTurnQuality.d.ts +51 -0
  203. package/dist/vue/index.d.ts +28 -0
  204. package/dist/vue/index.js +4553 -55
  205. package/dist/vue/useVoiceAgentSquadStatus.d.ts +9 -0
  206. package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
  207. package/dist/vue/useVoiceController.d.ts +2 -1
  208. package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
  209. package/dist/vue/useVoiceLiveOps.d.ts +9 -0
  210. package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
  211. package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
  212. package/dist/vue/useVoicePlatformCoverage.d.ts +9 -0
  213. package/dist/vue/useVoiceProofTrends.d.ts +9 -0
  214. package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
  215. package/dist/vue/useVoiceProviderContracts.d.ts +9 -0
  216. package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
  217. package/dist/vue/useVoiceProviderStatus.d.ts +1 -1
  218. package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
  219. package/dist/vue/useVoiceStream.d.ts +4 -1
  220. package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
  221. package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
  222. package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
  223. package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
  224. package/dist/workflowContract.d.ts +91 -0
  225. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -3,6 +3,7 @@ import type { VoiceOpsDispositionTaskPolicies, VoiceOpsTaskAssignmentRule, Voice
3
3
  import type { VoiceIntegrationSink } from './opsSinks';
4
4
  import type { StoredVoiceCallReviewArtifact, VoiceCallReviewArtifact, VoiceCallReviewStore } from './testing/review';
5
5
  import type { VoiceTraceEventStore } from './trace';
6
+ import type { VoiceLiveOpsControlState } from './liveOps';
6
7
  export type AudioFormat = {
7
8
  container: 'raw';
8
9
  encoding: 'alaw' | 'mulaw' | 'pcm_s16le';
@@ -193,6 +194,15 @@ export type RealtimeAdapter<TOptions extends RealtimeAdapterOpenOptions = Realti
193
194
  open: (options: TOptions) => Promise<RealtimeAdapterSession> | RealtimeAdapterSession;
194
195
  };
195
196
  export type VoiceSessionStatus = 'active' | 'reconnecting' | 'completed' | 'failed';
197
+ export type VoiceReconnectClientStatus = 'idle' | 'reconnecting' | 'resumed' | 'exhausted';
198
+ export type VoiceReconnectClientState = {
199
+ attempts: number;
200
+ lastDisconnectAt?: number;
201
+ lastResumedAt?: number;
202
+ maxAttempts: number;
203
+ nextAttemptAt?: number;
204
+ status: VoiceReconnectClientStatus;
205
+ };
196
206
  export type VoiceTurnRecord<TResult = unknown> = {
197
207
  id: string;
198
208
  text: string;
@@ -269,6 +279,65 @@ export type VoiceCallLifecycleState = {
269
279
  lastEventAt: number;
270
280
  startedAt: number;
271
281
  };
282
+ export type VoiceHandoffAction = 'escalate' | 'no-answer' | 'transfer' | 'voicemail';
283
+ export type VoiceHandoffStatus = 'delivered' | 'failed' | 'skipped';
284
+ export type VoiceHandoffResult = {
285
+ deliveredAt?: number;
286
+ deliveredTo?: string;
287
+ error?: string;
288
+ metadata?: Record<string, unknown>;
289
+ status: VoiceHandoffStatus;
290
+ };
291
+ export type VoiceHandoffDeliveryQueueStatus = VoiceHandoffStatus | 'pending';
292
+ export type StoredVoiceHandoffDelivery<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
293
+ action: VoiceHandoffAction;
294
+ context: TContext;
295
+ createdAt: number;
296
+ deliveredAt?: number;
297
+ deliveries?: Record<string, VoiceHandoffResult & {
298
+ adapterId: string;
299
+ adapterKind?: string;
300
+ }>;
301
+ deliveryAttempts?: number;
302
+ deliveryError?: string;
303
+ deliveryStatus: VoiceHandoffDeliveryQueueStatus;
304
+ id: string;
305
+ metadata?: Record<string, unknown>;
306
+ reason?: string;
307
+ result?: TResult;
308
+ session: TSession;
309
+ sessionId: string;
310
+ target?: string;
311
+ updatedAt: number;
312
+ };
313
+ export type VoiceHandoffDeliveryStore<TDelivery extends StoredVoiceHandoffDelivery = StoredVoiceHandoffDelivery> = {
314
+ get: (id: string) => Promise<TDelivery | undefined> | TDelivery | undefined;
315
+ list: () => Promise<TDelivery[]> | TDelivery[];
316
+ remove: (id: string) => Promise<void> | void;
317
+ set: (id: string, delivery: TDelivery) => Promise<void> | void;
318
+ };
319
+ export type VoiceHandoffInput<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
320
+ action: VoiceHandoffAction;
321
+ api: VoiceSessionHandle<TContext, TSession, TResult>;
322
+ context: TContext;
323
+ metadata?: Record<string, unknown>;
324
+ reason?: string;
325
+ result?: TResult;
326
+ session: TSession;
327
+ target?: string;
328
+ };
329
+ export type VoiceHandoffAdapter<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
330
+ actions?: VoiceHandoffAction[];
331
+ handoff: (input: VoiceHandoffInput<TContext, TSession, TResult>) => Promise<VoiceHandoffResult> | VoiceHandoffResult;
332
+ id: string;
333
+ kind?: string;
334
+ };
335
+ export type VoiceHandoffConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
336
+ adapters: VoiceHandoffAdapter<TContext, TSession, TResult>[];
337
+ deliveryQueue?: VoiceHandoffDeliveryStore<StoredVoiceHandoffDelivery<TContext, TSession, TResult>>;
338
+ enqueueOnly?: boolean;
339
+ failMode?: 'record' | 'throw';
340
+ };
272
341
  export type VoiceSessionStore<TSession extends VoiceSessionRecord = VoiceSessionRecord> = SessionStore<TSession, VoiceSessionSummary>;
273
342
  export type VoiceLogger = {
274
343
  debug?: (message: string, meta?: Record<string, unknown>) => void;
@@ -416,6 +485,10 @@ export type VoiceLexiconResolver<TContext = unknown> = (input: {
416
485
  }) => Promise<VoiceLexiconEntry[] | void> | VoiceLexiconEntry[] | void;
417
486
  export type VoiceOnTurnObjectHandler<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = (input: {
418
487
  context: TContext;
488
+ liveOps?: {
489
+ control: VoiceLiveOpsControlState;
490
+ injectedInstruction?: string;
491
+ };
419
492
  session: TSession;
420
493
  turn: VoiceTurnRecord;
421
494
  api: VoiceSessionHandle<TContext, TSession, TResult>;
@@ -537,6 +610,9 @@ export type VoiceRuntimeOpsConfig<TContext = unknown, TSession extends VoiceSess
537
610
  tasks?: VoiceOpsTaskStore;
538
611
  webhook?: VoiceIntegrationWebhookConfig;
539
612
  };
613
+ export type VoiceLiveOpsRuntimeConfig = {
614
+ getControl: (sessionId: string) => Promise<VoiceLiveOpsControlState | null | undefined> | VoiceLiveOpsControlState | null | undefined;
615
+ };
540
616
  export type VoiceNormalizedRouteConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = Omit<VoiceRouteConfig<TContext, TSession, TResult>, 'onTurn'> & {
541
617
  onTurn: VoiceOnTurnObjectHandler<TContext, TSession, TResult>;
542
618
  };
@@ -557,9 +633,11 @@ export type VoicePluginConfig<TContext = unknown, TSession extends VoiceSessionR
557
633
  lexicon?: VoiceLexiconEntry[] | VoiceLexiconResolver<TContext>;
558
634
  phraseHints?: VoicePhraseHint[] | VoicePhraseHintResolver<TContext>;
559
635
  preset?: VoiceRuntimePreset;
560
- stt: STTAdapter;
636
+ stt?: STTAdapter;
561
637
  sttFallback?: VoiceSTTFallbackConfig;
562
638
  sttLifecycle?: VoiceSTTLifecycle;
639
+ realtime?: RealtimeAdapter;
640
+ realtimeInputFormat?: AudioFormat;
563
641
  tts?: TTSAdapter;
564
642
  session: VoiceSessionStore<NoInfer<TSession>>;
565
643
  reconnect?: VoiceReconnectConfig;
@@ -567,7 +645,9 @@ export type VoicePluginConfig<TContext = unknown, TSession extends VoiceSessionR
567
645
  audioConditioning?: VoiceAudioConditioningConfig;
568
646
  logger?: VoiceLogger;
569
647
  htmx?: boolean | VoiceHTMXConfig<TSession, NoInfer<TResult>>;
648
+ handoff?: VoiceHandoffConfig<TContext, TSession, TResult>;
570
649
  ops?: VoiceRuntimeOpsConfig<TContext, TSession, TResult>;
650
+ liveOps?: VoiceLiveOpsRuntimeConfig;
571
651
  trace?: VoiceTraceEventStore;
572
652
  } & VoiceRouteConfig<TContext, TSession, TResult>;
573
653
  export type CreateVoiceSessionOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
@@ -575,7 +655,9 @@ export type CreateVoiceSessionOptions<TContext = unknown, TSession extends Voice
575
655
  id: string;
576
656
  context: TContext;
577
657
  socket: VoiceSocket;
578
- stt: STTAdapter;
658
+ stt?: STTAdapter;
659
+ realtime?: RealtimeAdapter;
660
+ realtimeInputFormat?: AudioFormat;
579
661
  tts?: TTSAdapter;
580
662
  languageStrategy?: VoiceLanguageStrategy;
581
663
  lexicon?: VoiceLexiconEntry[];
@@ -588,6 +670,8 @@ export type CreateVoiceSessionOptions<TContext = unknown, TSession extends Voice
588
670
  sttLifecycle: VoiceSTTLifecycle;
589
671
  turnDetection: VoiceResolvedTurnDetectionConfig;
590
672
  audioConditioning?: VoiceResolvedAudioConditioningConfig;
673
+ handoff?: VoiceHandoffConfig<TContext, TSession, TResult>;
674
+ liveOps?: VoiceLiveOpsRuntimeConfig;
591
675
  route: VoiceNormalizedRouteConfig<TContext, TSession, TResult>;
592
676
  logger?: VoiceLogger;
593
677
  };
@@ -621,6 +705,16 @@ export type VoiceServerSessionMessage = {
621
705
  status: VoiceSessionStatus;
622
706
  scenarioId?: string;
623
707
  };
708
+ export type VoiceServerReplayMessage<TResult = unknown> = {
709
+ type: 'replay';
710
+ assistantTexts: string[];
711
+ call?: VoiceCallLifecycleState;
712
+ partial: string;
713
+ scenarioId?: string;
714
+ sessionId: string;
715
+ status: VoiceSessionStatus;
716
+ turns: VoiceTurnRecord<TResult>[];
717
+ };
624
718
  export type VoiceServerPartialMessage = {
625
719
  type: 'partial';
626
720
  transcript: Transcript;
@@ -662,17 +756,23 @@ export type VoiceServerErrorMessage = {
662
756
  export type VoiceServerPongMessage = {
663
757
  type: 'pong';
664
758
  };
665
- export type VoiceServerMessage<TResult = unknown> = VoiceServerSessionMessage | VoiceServerPartialMessage | VoiceServerFinalMessage | VoiceServerTurnMessage<TResult> | VoiceServerAssistantMessage | VoiceServerAudioMessage | VoiceServerCallLifecycleMessage | VoiceServerCompleteMessage | VoiceServerErrorMessage | VoiceServerPongMessage;
759
+ export type VoiceServerConnectionMessage = {
760
+ type: 'connection';
761
+ reconnect: VoiceReconnectClientState;
762
+ };
763
+ export type VoiceServerMessage<TResult = unknown> = VoiceServerSessionMessage | VoiceServerReplayMessage<TResult> | VoiceServerPartialMessage | VoiceServerFinalMessage | VoiceServerTurnMessage<TResult> | VoiceServerAssistantMessage | VoiceServerAudioMessage | VoiceServerCallLifecycleMessage | VoiceServerCompleteMessage | VoiceServerErrorMessage | VoiceServerPongMessage | VoiceServerConnectionMessage;
666
764
  export type VoiceConnectionOptions = {
667
765
  protocols?: string[];
668
766
  scenarioId?: string;
669
767
  reconnect?: boolean;
768
+ reconnectReportPath?: string;
670
769
  maxReconnectAttempts?: number;
671
770
  pingInterval?: number;
672
771
  sessionId?: string;
673
772
  };
674
773
  export type VoiceCaptureOptions = {
675
774
  channelCount?: 1 | 2;
775
+ onAudio?: (audio: Uint8Array | ArrayBuffer, sendAudio: (audio: Uint8Array | ArrayBuffer) => void) => void;
676
776
  onLevel?: (level: number) => void;
677
777
  sampleRateHz?: number;
678
778
  };
@@ -686,6 +786,46 @@ export type VoiceBargeInOptions = {
686
786
  enabled?: boolean;
687
787
  interruptOnPartial?: boolean;
688
788
  interruptThreshold?: number;
789
+ monitor?: VoiceBargeInMonitor;
790
+ };
791
+ export type VoiceBargeInTriggerReason = 'input-level' | 'manual-audio' | 'manual-interrupt' | 'partial-transcript';
792
+ export type VoiceBargeInMonitorEvent = {
793
+ at: number;
794
+ id: string;
795
+ latencyMs?: number;
796
+ playbackStopLatencyMs?: number;
797
+ reason: VoiceBargeInTriggerReason;
798
+ sessionId?: string | null;
799
+ status: 'requested' | 'stopped' | 'skipped';
800
+ thresholdMs?: number;
801
+ };
802
+ export type VoiceBargeInMonitorSnapshot = {
803
+ averageLatencyMs?: number;
804
+ events: VoiceBargeInMonitorEvent[];
805
+ failed: number;
806
+ lastEvent?: VoiceBargeInMonitorEvent;
807
+ passed: number;
808
+ status: 'empty' | 'fail' | 'pass' | 'warn';
809
+ thresholdMs: number;
810
+ total: number;
811
+ };
812
+ export type VoiceBargeInMonitor = {
813
+ getSnapshot: () => VoiceBargeInMonitorSnapshot;
814
+ recordRequested: (input: {
815
+ reason: VoiceBargeInTriggerReason;
816
+ sessionId?: string | null;
817
+ }) => VoiceBargeInMonitorEvent;
818
+ recordSkipped: (input: {
819
+ reason: VoiceBargeInTriggerReason;
820
+ sessionId?: string | null;
821
+ }) => VoiceBargeInMonitorEvent;
822
+ recordStopped: (input: {
823
+ latencyMs?: number;
824
+ playbackStopLatencyMs?: number;
825
+ reason: VoiceBargeInTriggerReason;
826
+ sessionId?: string | null;
827
+ }) => VoiceBargeInMonitorEvent;
828
+ subscribe: (subscriber: () => void) => () => void;
689
829
  };
690
830
  export type VoiceAudioPlayerOptions = {
691
831
  autoStart?: boolean;
@@ -744,6 +884,7 @@ export type VoiceStreamState<TResult = unknown> = {
744
884
  sessionId: string | null;
745
885
  scenarioId: string | null;
746
886
  status: VoiceSessionStatus | 'idle';
887
+ reconnect: VoiceReconnectClientState;
747
888
  partial: string;
748
889
  turns: VoiceTurnRecord<TResult>[];
749
890
  assistantTexts: string[];
@@ -770,6 +911,7 @@ export type VoiceStream<TResult = unknown> = {
770
911
  getSnapshot: () => VoiceStreamState<TResult>;
771
912
  isConnected: boolean;
772
913
  partial: string;
914
+ reconnect: VoiceReconnectClientState;
773
915
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
774
916
  sessionId: string | null;
775
917
  scenarioId: string | null;
@@ -839,6 +981,7 @@ export type VoiceController<TResult = unknown> = {
839
981
  isConnected: boolean;
840
982
  isRecording: boolean;
841
983
  partial: string;
984
+ reconnect: VoiceReconnectClientState;
842
985
  recordingError: string | null;
843
986
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
844
987
  sessionId: string | null;
@@ -872,6 +1015,15 @@ export type VoiceStoreAction<TResult = unknown> = {
872
1015
  sessionId: string;
873
1016
  scenarioId?: string;
874
1017
  status: VoiceSessionStatus;
1018
+ } | {
1019
+ type: 'replay';
1020
+ assistantTexts: string[];
1021
+ call?: VoiceCallLifecycleState;
1022
+ partial: string;
1023
+ scenarioId?: string;
1024
+ sessionId: string;
1025
+ status: VoiceSessionStatus;
1026
+ turns: VoiceTurnRecord<TResult>[];
875
1027
  } | {
876
1028
  type: 'call_lifecycle';
877
1029
  event: VoiceCallLifecycleEvent;
@@ -902,6 +1054,9 @@ export type VoiceStoreAction<TResult = unknown> = {
902
1054
  message: string;
903
1055
  } | {
904
1056
  type: 'connected';
1057
+ } | {
1058
+ type: 'connection';
1059
+ reconnect: VoiceReconnectClientState;
905
1060
  } | {
906
1061
  type: 'disconnected';
907
1062
  };
@@ -0,0 +1,30 @@
1
+ export declare const VoiceDeliveryRuntime: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ description: StringConstructor;
3
+ includeActions: {
4
+ default: boolean;
5
+ type: BooleanConstructor;
6
+ };
7
+ intervalMs: NumberConstructor;
8
+ path: {
9
+ default: string;
10
+ type: StringConstructor;
11
+ };
12
+ title: StringConstructor;
13
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
14
+ [key: string]: any;
15
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ description: StringConstructor;
17
+ includeActions: {
18
+ default: boolean;
19
+ type: BooleanConstructor;
20
+ };
21
+ intervalMs: NumberConstructor;
22
+ path: {
23
+ default: string;
24
+ type: StringConstructor;
25
+ };
26
+ title: StringConstructor;
27
+ }>> & Readonly<{}>, {
28
+ path: string;
29
+ includeActions: boolean;
30
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,13 @@
1
+ import { type PropType } from 'vue';
2
+ import type { VoiceOpsActionDescriptor } from '../client/opsActionCenter';
3
+ export declare const VoiceOpsActionCenter: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ actions: PropType<VoiceOpsActionDescriptor[]>;
5
+ description: StringConstructor;
6
+ title: StringConstructor;
7
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
8
+ [key: string]: any;
9
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
10
+ actions: PropType<VoiceOpsActionDescriptor[]>;
11
+ description: StringConstructor;
12
+ title: StringConstructor;
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,30 @@
1
+ export declare const VoiceOpsStatus: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ description: StringConstructor;
3
+ includeLinks: {
4
+ default: boolean;
5
+ type: BooleanConstructor;
6
+ };
7
+ intervalMs: NumberConstructor;
8
+ path: {
9
+ default: string;
10
+ type: StringConstructor;
11
+ };
12
+ title: StringConstructor;
13
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
14
+ [key: string]: any;
15
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ description: StringConstructor;
17
+ includeLinks: {
18
+ default: boolean;
19
+ type: BooleanConstructor;
20
+ };
21
+ intervalMs: NumberConstructor;
22
+ path: {
23
+ default: string;
24
+ type: StringConstructor;
25
+ };
26
+ title: StringConstructor;
27
+ }>> & Readonly<{}>, {
28
+ path: string;
29
+ includeLinks: boolean;
30
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,23 @@
1
+ export declare const VoicePlatformCoverage: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ description: StringConstructor;
3
+ intervalMs: NumberConstructor;
4
+ limit: NumberConstructor;
5
+ path: {
6
+ default: string;
7
+ type: StringConstructor;
8
+ };
9
+ title: StringConstructor;
10
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
11
+ [key: string]: any;
12
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
+ description: StringConstructor;
14
+ intervalMs: NumberConstructor;
15
+ limit: NumberConstructor;
16
+ path: {
17
+ default: string;
18
+ type: StringConstructor;
19
+ };
20
+ title: StringConstructor;
21
+ }>> & Readonly<{}>, {
22
+ path: string;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,21 @@
1
+ export declare const VoiceProofTrends: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ description: StringConstructor;
3
+ intervalMs: NumberConstructor;
4
+ path: {
5
+ default: string;
6
+ type: StringConstructor;
7
+ };
8
+ title: StringConstructor;
9
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
10
+ [key: string]: any;
11
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
+ description: StringConstructor;
13
+ intervalMs: NumberConstructor;
14
+ path: {
15
+ default: string;
16
+ type: StringConstructor;
17
+ };
18
+ title: StringConstructor;
19
+ }>> & Readonly<{}>, {
20
+ path: string;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,51 @@
1
+ export declare const VoiceProviderCapabilities: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ class: {
3
+ default: string;
4
+ type: StringConstructor;
5
+ };
6
+ description: {
7
+ default: undefined;
8
+ type: StringConstructor;
9
+ };
10
+ intervalMs: {
11
+ default: number;
12
+ type: NumberConstructor;
13
+ };
14
+ path: {
15
+ default: string;
16
+ type: StringConstructor;
17
+ };
18
+ title: {
19
+ default: undefined;
20
+ type: StringConstructor;
21
+ };
22
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
23
+ [key: string]: any;
24
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
+ class: {
26
+ default: string;
27
+ type: StringConstructor;
28
+ };
29
+ description: {
30
+ default: undefined;
31
+ type: StringConstructor;
32
+ };
33
+ intervalMs: {
34
+ default: number;
35
+ type: NumberConstructor;
36
+ };
37
+ path: {
38
+ default: string;
39
+ type: StringConstructor;
40
+ };
41
+ title: {
42
+ default: undefined;
43
+ type: StringConstructor;
44
+ };
45
+ }>> & Readonly<{}>, {
46
+ description: string;
47
+ title: string;
48
+ path: string;
49
+ intervalMs: number;
50
+ class: string;
51
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,21 @@
1
+ export declare const VoiceProviderContracts: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ description: StringConstructor;
3
+ intervalMs: NumberConstructor;
4
+ path: {
5
+ default: string;
6
+ type: StringConstructor;
7
+ };
8
+ title: StringConstructor;
9
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
10
+ [key: string]: any;
11
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
+ description: StringConstructor;
13
+ intervalMs: NumberConstructor;
14
+ path: {
15
+ default: string;
16
+ type: StringConstructor;
17
+ };
18
+ title: StringConstructor;
19
+ }>> & Readonly<{}>, {
20
+ path: string;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,88 @@
1
+ import { type PropType } from 'vue';
2
+ import type { VoiceProviderSimulationProvider } from '../client/providerSimulationControls';
3
+ export declare const VoiceProviderSimulationControls: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ class: {
5
+ default: string;
6
+ type: StringConstructor;
7
+ };
8
+ fallbackRequiredMessage: {
9
+ default: undefined;
10
+ type: StringConstructor;
11
+ };
12
+ fallbackRequiredProvider: {
13
+ default: undefined;
14
+ type: StringConstructor;
15
+ };
16
+ failureMessage: {
17
+ default: undefined;
18
+ type: StringConstructor;
19
+ };
20
+ failureProviders: {
21
+ default: undefined;
22
+ type: PropType<readonly string[] | undefined>;
23
+ };
24
+ kind: {
25
+ default: string;
26
+ type: StringConstructor;
27
+ };
28
+ pathPrefix: {
29
+ default: undefined;
30
+ type: StringConstructor;
31
+ };
32
+ providers: {
33
+ required: true;
34
+ type: PropType<readonly VoiceProviderSimulationProvider[]>;
35
+ };
36
+ title: {
37
+ default: undefined;
38
+ type: StringConstructor;
39
+ };
40
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
41
+ [key: string]: any;
42
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
+ class: {
44
+ default: string;
45
+ type: StringConstructor;
46
+ };
47
+ fallbackRequiredMessage: {
48
+ default: undefined;
49
+ type: StringConstructor;
50
+ };
51
+ fallbackRequiredProvider: {
52
+ default: undefined;
53
+ type: StringConstructor;
54
+ };
55
+ failureMessage: {
56
+ default: undefined;
57
+ type: StringConstructor;
58
+ };
59
+ failureProviders: {
60
+ default: undefined;
61
+ type: PropType<readonly string[] | undefined>;
62
+ };
63
+ kind: {
64
+ default: string;
65
+ type: StringConstructor;
66
+ };
67
+ pathPrefix: {
68
+ default: undefined;
69
+ type: StringConstructor;
70
+ };
71
+ providers: {
72
+ required: true;
73
+ type: PropType<readonly VoiceProviderSimulationProvider[]>;
74
+ };
75
+ title: {
76
+ default: undefined;
77
+ type: StringConstructor;
78
+ };
79
+ }>> & Readonly<{}>, {
80
+ kind: string;
81
+ title: string;
82
+ fallbackRequiredProvider: string;
83
+ fallbackRequiredMessage: string;
84
+ failureProviders: readonly string[] | undefined;
85
+ failureMessage: string;
86
+ pathPrefix: string;
87
+ class: string;
88
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,51 @@
1
+ export declare const VoiceProviderStatus: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ class: {
3
+ default: string;
4
+ type: StringConstructor;
5
+ };
6
+ description: {
7
+ default: undefined;
8
+ type: StringConstructor;
9
+ };
10
+ intervalMs: {
11
+ default: number;
12
+ type: NumberConstructor;
13
+ };
14
+ path: {
15
+ default: string;
16
+ type: StringConstructor;
17
+ };
18
+ title: {
19
+ default: undefined;
20
+ type: StringConstructor;
21
+ };
22
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
23
+ [key: string]: any;
24
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
+ class: {
26
+ default: string;
27
+ type: StringConstructor;
28
+ };
29
+ description: {
30
+ default: undefined;
31
+ type: StringConstructor;
32
+ };
33
+ intervalMs: {
34
+ default: number;
35
+ type: NumberConstructor;
36
+ };
37
+ path: {
38
+ default: string;
39
+ type: StringConstructor;
40
+ };
41
+ title: {
42
+ default: undefined;
43
+ type: StringConstructor;
44
+ };
45
+ }>> & Readonly<{}>, {
46
+ description: string;
47
+ title: string;
48
+ path: string;
49
+ intervalMs: number;
50
+ class: string;
51
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,51 @@
1
+ export declare const VoiceRoutingStatus: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ class: {
3
+ default: string;
4
+ type: StringConstructor;
5
+ };
6
+ description: {
7
+ default: undefined;
8
+ type: StringConstructor;
9
+ };
10
+ intervalMs: {
11
+ default: number;
12
+ type: NumberConstructor;
13
+ };
14
+ path: {
15
+ default: string;
16
+ type: StringConstructor;
17
+ };
18
+ title: {
19
+ default: undefined;
20
+ type: StringConstructor;
21
+ };
22
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
23
+ [key: string]: any;
24
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
+ class: {
26
+ default: string;
27
+ type: StringConstructor;
28
+ };
29
+ description: {
30
+ default: undefined;
31
+ type: StringConstructor;
32
+ };
33
+ intervalMs: {
34
+ default: number;
35
+ type: NumberConstructor;
36
+ };
37
+ path: {
38
+ default: string;
39
+ type: StringConstructor;
40
+ };
41
+ title: {
42
+ default: undefined;
43
+ type: StringConstructor;
44
+ };
45
+ }>> & Readonly<{}>, {
46
+ description: string;
47
+ title: string;
48
+ path: string;
49
+ intervalMs: number;
50
+ class: string;
51
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;