@absolutejs/voice 0.0.22-beta.12 → 0.0.22-beta.121

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 (146) hide show
  1. package/README.md +411 -3
  2. package/dist/agent.d.ts +2 -0
  3. package/dist/angular/index.d.ts +9 -0
  4. package/dist/angular/index.js +1278 -44
  5. package/dist/angular/voice-app-kit-status.service.d.ts +12 -0
  6. package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
  7. package/dist/angular/voice-ops-status.component.d.ts +15 -0
  8. package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
  9. package/dist/angular/voice-provider-status.service.d.ts +12 -0
  10. package/dist/angular/voice-routing-status.service.d.ts +11 -0
  11. package/dist/angular/voice-stream.service.d.ts +2 -0
  12. package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
  13. package/dist/angular/voice-turn-latency.service.d.ts +13 -0
  14. package/dist/angular/voice-turn-quality.service.d.ts +12 -0
  15. package/dist/angular/voice-workflow-status.service.d.ts +12 -0
  16. package/dist/appKit.d.ts +100 -0
  17. package/dist/assistantHealth.d.ts +81 -0
  18. package/dist/bargeInRoutes.d.ts +56 -0
  19. package/dist/campaign.d.ts +610 -0
  20. package/dist/campaignDialers.d.ts +90 -0
  21. package/dist/client/actions.d.ts +22 -0
  22. package/dist/client/appKitStatus.d.ts +19 -0
  23. package/dist/client/bargeInMonitor.d.ts +7 -0
  24. package/dist/client/campaignDialerProof.d.ts +23 -0
  25. package/dist/client/connection.d.ts +3 -0
  26. package/dist/client/duplex.d.ts +1 -1
  27. package/dist/client/htmxBootstrap.js +587 -13
  28. package/dist/client/index.d.ts +40 -0
  29. package/dist/client/index.js +2028 -8
  30. package/dist/client/liveTurnLatency.d.ts +41 -0
  31. package/dist/client/opsStatusWidget.d.ts +40 -0
  32. package/dist/client/providerCapabilities.d.ts +19 -0
  33. package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
  34. package/dist/client/providerSimulationControls.d.ts +33 -0
  35. package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
  36. package/dist/client/providerStatus.d.ts +19 -0
  37. package/dist/client/providerStatusWidget.d.ts +32 -0
  38. package/dist/client/routingStatus.d.ts +19 -0
  39. package/dist/client/routingStatusWidget.d.ts +28 -0
  40. package/dist/client/traceTimeline.d.ts +19 -0
  41. package/dist/client/traceTimelineWidget.d.ts +32 -0
  42. package/dist/client/turnLatency.d.ts +22 -0
  43. package/dist/client/turnLatencyWidget.d.ts +33 -0
  44. package/dist/client/turnQuality.d.ts +19 -0
  45. package/dist/client/turnQualityWidget.d.ts +32 -0
  46. package/dist/client/workflowStatus.d.ts +19 -0
  47. package/dist/diagnosticsRoutes.d.ts +44 -0
  48. package/dist/evalRoutes.d.ts +213 -0
  49. package/dist/fileStore.d.ts +3 -0
  50. package/dist/handoff.d.ts +54 -0
  51. package/dist/handoffHealth.d.ts +94 -0
  52. package/dist/index.d.ts +77 -8
  53. package/dist/index.js +12658 -3061
  54. package/dist/liveLatency.d.ts +78 -0
  55. package/dist/modelAdapters.d.ts +41 -2
  56. package/dist/openaiTTS.d.ts +18 -0
  57. package/dist/opsConsoleRoutes.d.ts +77 -0
  58. package/dist/opsWebhook.d.ts +126 -0
  59. package/dist/outcomeContract.d.ts +112 -0
  60. package/dist/phoneAgent.d.ts +58 -0
  61. package/dist/postgresStore.d.ts +5 -0
  62. package/dist/productionReadiness.d.ts +121 -0
  63. package/dist/providerAdapters.d.ts +48 -0
  64. package/dist/providerCapabilities.d.ts +92 -0
  65. package/dist/providerHealth.d.ts +79 -0
  66. package/dist/qualityRoutes.d.ts +76 -0
  67. package/dist/queue.d.ts +61 -0
  68. package/dist/react/VoiceOpsStatus.d.ts +6 -0
  69. package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
  70. package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
  71. package/dist/react/VoiceProviderStatus.d.ts +6 -0
  72. package/dist/react/VoiceRoutingStatus.d.ts +6 -0
  73. package/dist/react/VoiceTraceTimeline.d.ts +6 -0
  74. package/dist/react/VoiceTurnLatency.d.ts +6 -0
  75. package/dist/react/VoiceTurnQuality.d.ts +6 -0
  76. package/dist/react/index.d.ts +18 -0
  77. package/dist/react/index.js +2606 -12
  78. package/dist/react/useVoiceAppKitStatus.d.ts +8 -0
  79. package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
  80. package/dist/react/useVoiceController.d.ts +2 -0
  81. package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
  82. package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
  83. package/dist/react/useVoiceProviderStatus.d.ts +8 -0
  84. package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
  85. package/dist/react/useVoiceStream.d.ts +2 -0
  86. package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
  87. package/dist/react/useVoiceTurnLatency.d.ts +9 -0
  88. package/dist/react/useVoiceTurnQuality.d.ts +8 -0
  89. package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
  90. package/dist/resilienceRoutes.d.ts +142 -0
  91. package/dist/sessionReplay.d.ts +175 -0
  92. package/dist/simulationSuite.d.ts +120 -0
  93. package/dist/sqliteStore.d.ts +5 -0
  94. package/dist/svelte/createVoiceAppKitStatus.d.ts +8 -0
  95. package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
  96. package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
  97. package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
  98. package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
  99. package/dist/svelte/createVoiceProviderStatus.d.ts +10 -0
  100. package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
  101. package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
  102. package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
  103. package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
  104. package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
  105. package/dist/svelte/index.d.ts +11 -0
  106. package/dist/svelte/index.js +1849 -4
  107. package/dist/telephony/contract.d.ts +61 -0
  108. package/dist/telephony/matrix.d.ts +97 -0
  109. package/dist/telephony/plivo.d.ts +254 -0
  110. package/dist/telephony/telnyx.d.ts +247 -0
  111. package/dist/telephony/twilio.d.ts +132 -0
  112. package/dist/telephonyOutcome.d.ts +201 -0
  113. package/dist/testing/index.d.ts +2 -0
  114. package/dist/testing/index.js +2640 -21
  115. package/dist/testing/ioProviderSimulator.d.ts +41 -0
  116. package/dist/testing/providerSimulator.d.ts +44 -0
  117. package/dist/toolContract.d.ts +130 -0
  118. package/dist/toolRuntime.d.ts +50 -0
  119. package/dist/trace.d.ts +1 -1
  120. package/dist/traceTimeline.d.ts +93 -0
  121. package/dist/turnLatency.d.ts +95 -0
  122. package/dist/turnQuality.d.ts +94 -0
  123. package/dist/types.d.ts +125 -2
  124. package/dist/vue/VoiceOpsStatus.d.ts +30 -0
  125. package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
  126. package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
  127. package/dist/vue/VoiceProviderStatus.d.ts +51 -0
  128. package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
  129. package/dist/vue/VoiceTurnLatency.d.ts +69 -0
  130. package/dist/vue/VoiceTurnQuality.d.ts +51 -0
  131. package/dist/vue/index.d.ts +17 -0
  132. package/dist/vue/index.js +2520 -29
  133. package/dist/vue/useVoiceAppKitStatus.d.ts +9 -0
  134. package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
  135. package/dist/vue/useVoiceController.d.ts +1 -1
  136. package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
  137. package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
  138. package/dist/vue/useVoiceProviderStatus.d.ts +9 -0
  139. package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
  140. package/dist/vue/useVoiceStream.d.ts +3 -1
  141. package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
  142. package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
  143. package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
  144. package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
  145. package/dist/workflowContract.d.ts +91 -0
  146. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ import { type VoiceAppKitStatusClientOptions } from '../client/appKitStatus';
2
+ export declare const useVoiceAppKitStatus: (path?: string, options?: VoiceAppKitStatusClientOptions) => {
3
+ refresh: () => Promise<import("..").VoiceAppKitStatusReport | undefined>;
4
+ error: string | null;
5
+ isLoading: boolean;
6
+ report?: import("..").VoiceAppKitStatusReport;
7
+ updatedAt?: number;
8
+ };
@@ -0,0 +1,10 @@
1
+ import { type VoiceCampaignDialerProofClientOptions } from '../client/campaignDialerProof';
2
+ export declare const useVoiceCampaignDialerProof: (path?: string, options?: VoiceCampaignDialerProofClientOptions) => {
3
+ refresh: () => Promise<import("..").VoiceCampaignDialerProofStatus | undefined>;
4
+ runProof: () => Promise<import("..").VoiceCampaignDialerProofReport>;
5
+ error: string | null;
6
+ isLoading: boolean;
7
+ report?: import("..").VoiceCampaignDialerProofReport;
8
+ status?: import("..").VoiceCampaignDialerProofStatus;
9
+ updatedAt?: number;
10
+ };
@@ -1,12 +1,14 @@
1
1
  import type { VoiceControllerOptions } from '../types';
2
2
  export declare const useVoiceController: <TResult = unknown>(path: string, options?: VoiceControllerOptions) => {
3
3
  bindHTMX: (options: import("..").VoiceHTMXBindingOptions) => () => void;
4
+ callControl: (message: Parameters<(message: Omit<import("..").VoiceClientCallControlMessage, "type">) => void>[0]) => void;
4
5
  close: () => void;
5
6
  endTurn: () => void;
6
7
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
7
8
  startRecording: () => Promise<void>;
8
9
  stopRecording: () => void;
9
10
  toggleRecording: () => Promise<void>;
11
+ call: import("..").VoiceCallLifecycleState | null;
10
12
  sessionId: string | null;
11
13
  scenarioId: string | null;
12
14
  status: import("..").VoiceSessionStatus | "idle";
@@ -0,0 +1,8 @@
1
+ import { type VoiceProviderCapabilitiesClientOptions } from '../client/providerCapabilities';
2
+ export declare const useVoiceProviderCapabilities: <TProvider extends string = string>(path?: string, options?: VoiceProviderCapabilitiesClientOptions) => {
3
+ refresh: () => Promise<import("..").VoiceProviderCapabilityReport<TProvider> | undefined>;
4
+ error: string | null;
5
+ isLoading: boolean;
6
+ report?: import("..").VoiceProviderCapabilityReport<TProvider> | undefined;
7
+ updatedAt?: number;
8
+ };
@@ -0,0 +1,10 @@
1
+ import { type VoiceProviderSimulationControlsOptions } from '../client/providerSimulationControls';
2
+ export declare const useVoiceProviderSimulationControls: <TProvider extends string = string>(options: VoiceProviderSimulationControlsOptions<TProvider>) => {
3
+ run: (provider: TProvider, mode: import("../testing").VoiceIOProviderFailureSimulationMode) => Promise<import("../testing").VoiceIOProviderFailureSimulationResult<TProvider> | null>;
4
+ error: string | null;
5
+ isRunning: boolean;
6
+ lastResult: import("../testing").VoiceIOProviderFailureSimulationResult<TProvider> | null;
7
+ mode: import("../testing").VoiceIOProviderFailureSimulationMode | null;
8
+ provider: TProvider | null;
9
+ updatedAt?: number;
10
+ };
@@ -0,0 +1,8 @@
1
+ import { type VoiceProviderStatusClientOptions } from '../client/providerStatus';
2
+ export declare const useVoiceProviderStatus: <TProvider extends string = string>(path?: string, options?: VoiceProviderStatusClientOptions) => {
3
+ refresh: () => Promise<import("..").VoiceProviderHealthSummary<TProvider>[]>;
4
+ error: string | null;
5
+ isLoading: boolean;
6
+ providers: import("..").VoiceProviderHealthSummary<TProvider>[];
7
+ updatedAt?: number;
8
+ };
@@ -0,0 +1,8 @@
1
+ import { type VoiceRoutingStatusClientOptions } from '../client/routingStatus';
2
+ export declare const useVoiceRoutingStatus: (path?: string, options?: VoiceRoutingStatusClientOptions) => {
3
+ refresh: () => Promise<import("..").VoiceRoutingEvent | null>;
4
+ decision: import("..").VoiceRoutingDecisionSummary | null;
5
+ error: string | null;
6
+ isLoading: boolean;
7
+ updatedAt?: number;
8
+ };
@@ -1,8 +1,10 @@
1
1
  import type { VoiceConnectionOptions } from '../types';
2
2
  export declare const useVoiceStream: <TResult = unknown>(path: string, options?: VoiceConnectionOptions) => {
3
+ callControl: (message: Parameters<(message: Omit<import("..").VoiceClientCallControlMessage, "type">) => void>[0]) => void;
3
4
  close: () => void;
4
5
  endTurn: () => void;
5
6
  sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
7
+ call: import("..").VoiceCallLifecycleState | null;
6
8
  sessionId: string | null;
7
9
  scenarioId: string | null;
8
10
  status: import("..").VoiceSessionStatus | "idle";
@@ -0,0 +1,8 @@
1
+ import { type VoiceTraceTimelineClientOptions } from '../client/traceTimeline';
2
+ export declare const useVoiceTraceTimeline: (path?: string, options?: VoiceTraceTimelineClientOptions) => {
3
+ refresh: () => Promise<import("..").VoiceTraceTimelineReport | null>;
4
+ error: string | null;
5
+ isLoading: boolean;
6
+ report: import("..").VoiceTraceTimelineReport | null;
7
+ updatedAt?: number;
8
+ };
@@ -0,0 +1,9 @@
1
+ import { type VoiceTurnLatencyClientOptions } from '../client/turnLatency';
2
+ export declare const useVoiceTurnLatency: (path?: string, options?: VoiceTurnLatencyClientOptions) => {
3
+ refresh: () => Promise<import("..").VoiceTurnLatencyReport | undefined>;
4
+ runProof: () => Promise<import("..").VoiceTurnLatencyReport | undefined>;
5
+ error: string | null;
6
+ isLoading: boolean;
7
+ report?: import("..").VoiceTurnLatencyReport;
8
+ updatedAt?: number;
9
+ };
@@ -0,0 +1,8 @@
1
+ import { type VoiceTurnQualityClientOptions } from '../client/turnQuality';
2
+ export declare const useVoiceTurnQuality: (path?: string, options?: VoiceTurnQualityClientOptions) => {
3
+ refresh: () => Promise<import("..").VoiceTurnQualityReport | undefined>;
4
+ error: string | null;
5
+ isLoading: boolean;
6
+ report?: import("..").VoiceTurnQualityReport;
7
+ updatedAt?: number;
8
+ };
@@ -0,0 +1,8 @@
1
+ import { type VoiceWorkflowStatusClientOptions } from '../client/workflowStatus';
2
+ export declare const useVoiceWorkflowStatus: (path?: string, options?: VoiceWorkflowStatusClientOptions) => {
3
+ refresh: () => Promise<import("..").VoiceScenarioEvalReport | undefined>;
4
+ error: string | null;
5
+ isLoading: boolean;
6
+ report?: import("..").VoiceScenarioEvalReport;
7
+ updatedAt?: number;
8
+ };
@@ -0,0 +1,142 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type VoiceProviderHealthSummary } from './providerHealth';
3
+ import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
4
+ import type { VoiceIOProviderFailureSimulationMode, VoiceIOProviderFailureSimulationResult } from './testing/ioProviderSimulator';
5
+ export type VoiceRoutingEventKind = 'llm' | 'stt' | 'tts';
6
+ export type VoiceRoutingEvent = {
7
+ at: number;
8
+ attempt?: number;
9
+ elapsedMs?: number;
10
+ error?: string;
11
+ fallbackProvider?: string;
12
+ kind: VoiceRoutingEventKind;
13
+ latencyBudgetMs?: number;
14
+ operation?: string;
15
+ provider?: string;
16
+ routing?: string;
17
+ selectedProvider?: string;
18
+ sessionId: string;
19
+ status?: string;
20
+ suppressionRemainingMs?: number;
21
+ timedOut: boolean;
22
+ turnId?: string;
23
+ };
24
+ export type VoiceRoutingDecisionSummary = VoiceRoutingEvent;
25
+ export type VoiceRoutingDecisionSummaryOptions = {
26
+ kind?: VoiceRoutingEventKind;
27
+ limit?: number;
28
+ sessionId?: string;
29
+ store: VoiceTraceEventStore;
30
+ };
31
+ export type VoiceRoutingKindSummary = {
32
+ errorCount: number;
33
+ fallbackCount: number;
34
+ latest?: VoiceRoutingEvent;
35
+ providers: string[];
36
+ runCount: number;
37
+ timeoutCount: number;
38
+ };
39
+ export type VoiceRoutingSessionSummary = {
40
+ errorCount: number;
41
+ eventCount: number;
42
+ fallbackCount: number;
43
+ kinds: Record<VoiceRoutingEventKind, VoiceRoutingKindSummary>;
44
+ lastEventAt: number;
45
+ sessionId: string;
46
+ startedAt: number;
47
+ status: 'healthy' | 'fallback' | 'degraded';
48
+ timeoutCount: number;
49
+ };
50
+ export type VoiceRoutingSessionSummaryOptions = {
51
+ limit?: number;
52
+ sessionId?: string;
53
+ };
54
+ export type VoiceResilienceLink = {
55
+ href: string;
56
+ label: string;
57
+ };
58
+ export type VoiceResilienceSimulationProvider<TProvider extends string = string> = {
59
+ configured?: boolean;
60
+ provider: TProvider;
61
+ };
62
+ export type VoiceResilienceIOSimulator<TProvider extends string = string> = {
63
+ failureProviders?: readonly TProvider[];
64
+ fallbackRequiredProvider?: TProvider;
65
+ fallbackRequiredMessage?: string;
66
+ failureMessage?: string;
67
+ label?: string;
68
+ pathPrefix?: string;
69
+ providers: readonly VoiceResilienceSimulationProvider<TProvider>[];
70
+ recoveryMessage?: string;
71
+ run: (provider: TProvider, mode: VoiceIOProviderFailureSimulationMode) => Promise<VoiceIOProviderFailureSimulationResult<TProvider>>;
72
+ };
73
+ export type VoiceResiliencePageData = {
74
+ links?: readonly VoiceResilienceLink[];
75
+ llmProviderHealth: VoiceProviderHealthSummary<string>[];
76
+ routingEvents: VoiceRoutingEvent[];
77
+ routingSessions: VoiceRoutingSessionSummary[];
78
+ sttProviderHealth: VoiceProviderHealthSummary<string>[];
79
+ sttSimulation?: VoiceResilienceIOSimulator<string>;
80
+ title?: string;
81
+ ttsProviderHealth: VoiceProviderHealthSummary<string>[];
82
+ ttsSimulation?: VoiceResilienceIOSimulator<string>;
83
+ };
84
+ export type VoiceResilienceRoutesOptions = {
85
+ headers?: HeadersInit;
86
+ links?: readonly VoiceResilienceLink[];
87
+ llmProviders?: readonly string[];
88
+ name?: string;
89
+ path?: string;
90
+ render?: (input: VoiceResiliencePageData) => string | Promise<string>;
91
+ sttProviders?: readonly string[];
92
+ sttSimulation?: VoiceResilienceIOSimulator<string>;
93
+ store: VoiceTraceEventStore;
94
+ title?: string;
95
+ ttsProviders?: readonly string[];
96
+ ttsSimulation?: VoiceResilienceIOSimulator<string>;
97
+ };
98
+ export declare const listVoiceRoutingEvents: (events: StoredVoiceTraceEvent[]) => VoiceRoutingEvent[];
99
+ export declare const summarizeVoiceRoutingDecision: (events: StoredVoiceTraceEvent[], options?: Omit<VoiceRoutingDecisionSummaryOptions, "store">) => VoiceRoutingDecisionSummary | null;
100
+ export declare const summarizeVoiceRoutingSessions: (events: StoredVoiceTraceEvent[] | VoiceRoutingEvent[], options?: VoiceRoutingSessionSummaryOptions) => VoiceRoutingSessionSummary[];
101
+ export declare const createVoiceRoutingDecisionSummary: (options: VoiceRoutingDecisionSummaryOptions) => Promise<VoiceRoutingDecisionSummary | null>;
102
+ export declare const renderVoiceResilienceHTML: (input: VoiceResiliencePageData) => string;
103
+ export declare const createVoiceResilienceRoutes: (options: VoiceResilienceRoutesOptions) => Elysia<"", {
104
+ decorator: {};
105
+ store: {};
106
+ derive: {};
107
+ resolve: {};
108
+ }, {
109
+ typebox: {};
110
+ error: {};
111
+ }, {
112
+ schema: {};
113
+ standaloneSchema: {};
114
+ macro: {};
115
+ macroFn: {};
116
+ parser: {};
117
+ response: {};
118
+ }, {
119
+ [x: string]: {
120
+ get: {
121
+ body: unknown;
122
+ params: {};
123
+ query: unknown;
124
+ headers: unknown;
125
+ response: {
126
+ 200: Response;
127
+ };
128
+ };
129
+ };
130
+ }, {
131
+ derive: {};
132
+ resolve: {};
133
+ schema: {};
134
+ standaloneSchema: {};
135
+ response: {};
136
+ }, {
137
+ derive: {};
138
+ resolve: {};
139
+ schema: {};
140
+ standaloneSchema: {};
141
+ response: {};
142
+ }>;
@@ -0,0 +1,175 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type StoredVoiceTraceEvent, type VoiceTraceEvaluationOptions, type VoiceTraceEventStore, type VoiceTraceRedactionConfig, type VoiceTraceSummary, type VoiceTraceEvaluation } from './trace';
3
+ export type VoiceSessionReplayTurn = {
4
+ assistantReplies: string[];
5
+ committedText?: string;
6
+ errors: Array<Record<string, unknown>>;
7
+ id: string;
8
+ modelCalls: Array<Record<string, unknown>>;
9
+ tools: Array<Record<string, unknown>>;
10
+ transcripts: Array<{
11
+ isFinal: boolean;
12
+ text?: string;
13
+ }>;
14
+ };
15
+ export type VoiceSessionReplay = {
16
+ evaluation: VoiceTraceEvaluation;
17
+ events: StoredVoiceTraceEvent[];
18
+ html: string;
19
+ markdown: string;
20
+ sessionId: string;
21
+ summary: VoiceTraceSummary;
22
+ timeline: Array<{
23
+ at: number;
24
+ offsetMs?: number;
25
+ payload: Record<string, unknown>;
26
+ turnId?: string;
27
+ type: StoredVoiceTraceEvent['type'];
28
+ }>;
29
+ turns: VoiceSessionReplayTurn[];
30
+ };
31
+ export type VoiceSessionListStatus = 'failed' | 'healthy';
32
+ export type VoiceSessionListItem = {
33
+ endedAt?: number;
34
+ errorCount: number;
35
+ eventCount: number;
36
+ latestOutcome?: string;
37
+ providerErrors: Record<string, number>;
38
+ providers: string[];
39
+ replayHref: string;
40
+ sessionId: string;
41
+ startedAt?: number;
42
+ status: VoiceSessionListStatus;
43
+ transcriptCount: number;
44
+ turnCount: number;
45
+ };
46
+ export type VoiceSessionListOptions = {
47
+ events?: StoredVoiceTraceEvent[];
48
+ limit?: number;
49
+ provider?: string;
50
+ q?: string;
51
+ replayHref?: false | string | ((session: Omit<VoiceSessionListItem, 'replayHref'>) => string);
52
+ status?: VoiceSessionListStatus | 'all';
53
+ store?: VoiceTraceEventStore;
54
+ };
55
+ export type VoiceSessionListHTMLHandlerOptions = VoiceSessionListOptions & {
56
+ headers?: HeadersInit;
57
+ render?: (sessions: VoiceSessionListItem[]) => string | Promise<string>;
58
+ };
59
+ export type VoiceSessionListRoutesOptions = VoiceSessionListHTMLHandlerOptions & {
60
+ htmlPath?: false | string;
61
+ name?: string;
62
+ path?: string;
63
+ };
64
+ export type VoiceSessionReplayOptions = {
65
+ evaluation?: VoiceTraceEvaluationOptions;
66
+ events?: StoredVoiceTraceEvent[];
67
+ redact?: VoiceTraceRedactionConfig;
68
+ sessionId: string;
69
+ store?: VoiceTraceEventStore;
70
+ title?: string;
71
+ };
72
+ export type VoiceSessionReplayHTMLHandlerOptions = Omit<VoiceSessionReplayOptions, 'sessionId'> & {
73
+ headers?: HeadersInit;
74
+ render?: (replay: VoiceSessionReplay) => string | Promise<string>;
75
+ };
76
+ export type VoiceSessionReplayRoutesOptions = VoiceSessionReplayHTMLHandlerOptions & {
77
+ htmlPath?: false | string;
78
+ name?: string;
79
+ path?: string;
80
+ };
81
+ export declare const summarizeVoiceSessionReplay: (options: VoiceSessionReplayOptions) => Promise<VoiceSessionReplay>;
82
+ export declare const summarizeVoiceSessions: (options?: VoiceSessionListOptions) => Promise<VoiceSessionListItem[]>;
83
+ export declare const renderVoiceSessionsHTML: (sessions: VoiceSessionListItem[]) => string;
84
+ export declare const createVoiceSessionsJSONHandler: (options?: VoiceSessionListOptions) => ({ query }: {
85
+ query?: Record<string, string | undefined>;
86
+ }) => Promise<VoiceSessionListItem[]>;
87
+ export declare const createVoiceSessionsHTMLHandler: (options?: VoiceSessionListHTMLHandlerOptions) => ({ query }: {
88
+ query?: Record<string, string | undefined>;
89
+ }) => Promise<Response>;
90
+ export declare const createVoiceSessionListRoutes: (options?: VoiceSessionListRoutesOptions) => Elysia<"", {
91
+ decorator: {};
92
+ store: {};
93
+ derive: {};
94
+ resolve: {};
95
+ }, {
96
+ typebox: {};
97
+ error: {};
98
+ }, {
99
+ schema: {};
100
+ standaloneSchema: {};
101
+ macro: {};
102
+ macroFn: {};
103
+ parser: {};
104
+ response: {};
105
+ }, {
106
+ [x: string]: {
107
+ get: {
108
+ body: unknown;
109
+ params: {};
110
+ query: unknown;
111
+ headers: unknown;
112
+ response: {
113
+ 200: VoiceSessionListItem[];
114
+ };
115
+ };
116
+ };
117
+ }, {
118
+ derive: {};
119
+ resolve: {};
120
+ schema: {};
121
+ standaloneSchema: {};
122
+ response: {};
123
+ }, {
124
+ derive: {};
125
+ resolve: {};
126
+ schema: {};
127
+ standaloneSchema: {};
128
+ response: {};
129
+ }>;
130
+ export declare const createVoiceSessionReplayJSONHandler: (options: Omit<VoiceSessionReplayOptions, "sessionId">) => ({ params }: {
131
+ params: Record<string, string | undefined>;
132
+ }) => Promise<VoiceSessionReplay>;
133
+ export declare const createVoiceSessionReplayHTMLHandler: (options: VoiceSessionReplayHTMLHandlerOptions) => ({ params }: {
134
+ params: Record<string, string | undefined>;
135
+ }) => Promise<Response>;
136
+ export declare const createVoiceSessionReplayRoutes: (options: VoiceSessionReplayRoutesOptions) => Elysia<"", {
137
+ decorator: {};
138
+ store: {};
139
+ derive: {};
140
+ resolve: {};
141
+ }, {
142
+ typebox: {};
143
+ error: {};
144
+ }, {
145
+ schema: {};
146
+ standaloneSchema: {};
147
+ macro: {};
148
+ macroFn: {};
149
+ parser: {};
150
+ response: {};
151
+ }, {
152
+ [x: string]: {
153
+ get: {
154
+ body: unknown;
155
+ params: {};
156
+ query: unknown;
157
+ headers: unknown;
158
+ response: {
159
+ 200: VoiceSessionReplay;
160
+ };
161
+ };
162
+ };
163
+ }, {
164
+ derive: {};
165
+ resolve: {};
166
+ schema: {};
167
+ standaloneSchema: {};
168
+ response: {};
169
+ }, {
170
+ derive: {};
171
+ resolve: {};
172
+ schema: {};
173
+ standaloneSchema: {};
174
+ response: {};
175
+ }>;
@@ -0,0 +1,120 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type VoiceEvalReport, type VoiceEvalRoutesOptions, type VoiceScenarioEvalDefinition, type VoiceScenarioEvalReport, type VoiceScenarioFixture, type VoiceScenarioFixtureEvalReport, type VoiceScenarioFixtureStore } from './evalRoutes';
3
+ import { type VoiceOutcomeContractDefinition, type VoiceOutcomeContractOptions, type VoiceOutcomeContractSuiteReport } from './outcomeContract';
4
+ import { type VoiceToolContractDefinition, type VoiceToolContractSuiteReport } from './toolContract';
5
+ import type { VoiceQualityThresholds } from './qualityRoutes';
6
+ import type { VoiceTraceEventStore } from './trace';
7
+ import type { VoiceSessionRecord } from './types';
8
+ export type VoiceSimulationSuiteStatus = 'pass' | 'fail';
9
+ export type VoiceSimulationSuiteReport = {
10
+ actions: VoiceSimulationSuiteAction[];
11
+ checkedAt: number;
12
+ failed: number;
13
+ fixtures?: VoiceScenarioFixtureEvalReport;
14
+ outcomes?: VoiceOutcomeContractSuiteReport;
15
+ passed: number;
16
+ scenarios?: VoiceScenarioEvalReport;
17
+ sessions?: VoiceEvalReport;
18
+ status: VoiceSimulationSuiteStatus;
19
+ summary: {
20
+ fixtures?: VoiceSimulationSuiteSectionSummary;
21
+ outcomes?: VoiceSimulationSuiteSectionSummary;
22
+ scenarios?: VoiceSimulationSuiteSectionSummary;
23
+ sessions?: VoiceSimulationSuiteSectionSummary;
24
+ tools?: VoiceSimulationSuiteSectionSummary;
25
+ };
26
+ tools?: VoiceToolContractSuiteReport;
27
+ total: number;
28
+ };
29
+ export type VoiceSimulationSuiteAction = {
30
+ description: string;
31
+ href?: string;
32
+ label: string;
33
+ section: 'fixtures' | 'outcomes' | 'scenarios' | 'sessions' | 'tools';
34
+ severity: 'error' | 'warning';
35
+ };
36
+ export type VoiceSimulationSuiteSectionSummary = {
37
+ failed: number;
38
+ passed: number;
39
+ status: VoiceSimulationSuiteStatus;
40
+ total: number;
41
+ };
42
+ export type VoiceSimulationSuiteOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = {
43
+ actionLinks?: {
44
+ fixtures?: string;
45
+ outcomes?: string;
46
+ scenarios?: string;
47
+ sessions?: string;
48
+ tools?: string;
49
+ };
50
+ fixtures?: VoiceScenarioFixture[];
51
+ fixtureStore?: VoiceScenarioFixtureStore;
52
+ include?: {
53
+ fixtures?: boolean;
54
+ outcomes?: boolean;
55
+ scenarios?: boolean;
56
+ sessions?: boolean;
57
+ tools?: boolean;
58
+ };
59
+ limit?: number;
60
+ outcomes?: Omit<VoiceOutcomeContractOptions<TSession>, 'contracts'> & {
61
+ contracts: VoiceOutcomeContractDefinition[];
62
+ };
63
+ scenarios?: VoiceScenarioEvalDefinition[];
64
+ store?: VoiceTraceEventStore;
65
+ thresholds?: VoiceQualityThresholds;
66
+ tools?: VoiceToolContractDefinition[];
67
+ };
68
+ export type VoiceSimulationSuiteRoutesOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = VoiceSimulationSuiteOptions<TSession> & {
69
+ headers?: HeadersInit;
70
+ htmlPath?: false | string;
71
+ name?: string;
72
+ path?: string;
73
+ render?: (report: VoiceSimulationSuiteReport) => string | Promise<string>;
74
+ title?: string;
75
+ };
76
+ export declare const runVoiceSimulationSuite: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceSimulationSuiteOptions<TSession>) => Promise<VoiceSimulationSuiteReport>;
77
+ export declare const renderVoiceSimulationSuiteHTML: (report: VoiceSimulationSuiteReport, options?: {
78
+ title?: string;
79
+ }) => string;
80
+ export declare const createVoiceSimulationSuiteRoutes: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceSimulationSuiteRoutesOptions<TSession>) => Elysia<"", {
81
+ decorator: {};
82
+ store: {};
83
+ derive: {};
84
+ resolve: {};
85
+ }, {
86
+ typebox: {};
87
+ error: {};
88
+ }, {
89
+ schema: {};
90
+ standaloneSchema: {};
91
+ macro: {};
92
+ macroFn: {};
93
+ parser: {};
94
+ response: {};
95
+ }, {
96
+ [x: string]: {
97
+ get: {
98
+ body: unknown;
99
+ params: {};
100
+ query: unknown;
101
+ headers: unknown;
102
+ response: {
103
+ 200: VoiceSimulationSuiteReport;
104
+ };
105
+ };
106
+ };
107
+ }, {
108
+ derive: {};
109
+ resolve: {};
110
+ schema: {};
111
+ standaloneSchema: {};
112
+ response: {};
113
+ }, {
114
+ derive: {};
115
+ resolve: {};
116
+ schema: {};
117
+ standaloneSchema: {};
118
+ response: {};
119
+ }>;
120
+ export type VoiceSimulationSuiteEvalRoutesOptions = VoiceEvalRoutesOptions;
@@ -1,6 +1,8 @@
1
1
  import { type StoredVoiceTraceEvent, type VoiceTraceSinkDeliveryRecord, type VoiceTraceSinkDeliveryStore, type VoiceTraceEventStore } from './trace';
2
2
  import type { StoredVoiceIntegrationEvent, StoredVoiceExternalObjectMap, StoredVoiceOpsTask, VoiceExternalObjectMapStore, VoiceIntegrationEventStore, VoiceOpsTaskStore } from './ops';
3
3
  import type { StoredVoiceCallReviewArtifact, VoiceCallReviewStore } from './testing/review';
4
+ import type { VoiceTelephonyWebhookIdempotencyStore } from './telephonyOutcome';
5
+ import type { VoiceCampaignStore } from './campaign';
4
6
  import type { VoiceSessionRecord, VoiceSessionStore } from './types';
5
7
  export type VoiceSQLiteStoreOptions = {
6
8
  path: string;
@@ -8,6 +10,7 @@ export type VoiceSQLiteStoreOptions = {
8
10
  tablePrefix?: string;
9
11
  };
10
12
  export type VoiceSQLiteRuntimeStorage<TSession extends VoiceSessionRecord = VoiceSessionRecord, TReview extends StoredVoiceCallReviewArtifact = StoredVoiceCallReviewArtifact, TTask extends StoredVoiceOpsTask = StoredVoiceOpsTask, TEvent extends StoredVoiceIntegrationEvent = StoredVoiceIntegrationEvent, TMapping extends StoredVoiceExternalObjectMap = StoredVoiceExternalObjectMap, TTrace extends StoredVoiceTraceEvent = StoredVoiceTraceEvent, TTraceDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord> = {
13
+ campaigns: VoiceCampaignStore;
11
14
  events: VoiceIntegrationEventStore<TEvent>;
12
15
  externalObjects: VoiceExternalObjectMapStore<TMapping>;
13
16
  reviews: VoiceCallReviewStore<TReview>;
@@ -23,4 +26,6 @@ export declare const createVoiceSQLiteIntegrationEventStore: <TEvent extends Sto
23
26
  export declare const createVoiceSQLiteExternalObjectMapStore: <TMapping extends StoredVoiceExternalObjectMap = StoredVoiceExternalObjectMap>(options: VoiceSQLiteStoreOptions) => VoiceExternalObjectMapStore<TMapping>;
24
27
  export declare const createVoiceSQLiteTraceEventStore: <TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent>(options: VoiceSQLiteStoreOptions) => VoiceTraceEventStore<TEvent>;
25
28
  export declare const createVoiceSQLiteTraceSinkDeliveryStore: <TDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord>(options: VoiceSQLiteStoreOptions) => VoiceTraceSinkDeliveryStore<TDelivery>;
29
+ export declare const createVoiceSQLiteTelephonyWebhookIdempotencyStore: <TResult = unknown>(options: VoiceSQLiteStoreOptions) => VoiceTelephonyWebhookIdempotencyStore<TResult>;
30
+ export declare const createVoiceSQLiteCampaignStore: (options: VoiceSQLiteStoreOptions) => VoiceCampaignStore;
26
31
  export declare const createVoiceSQLiteRuntimeStorage: <TSession extends VoiceSessionRecord = VoiceSessionRecord, TReview extends StoredVoiceCallReviewArtifact = StoredVoiceCallReviewArtifact, TTask extends StoredVoiceOpsTask = StoredVoiceOpsTask, TEvent extends StoredVoiceIntegrationEvent = StoredVoiceIntegrationEvent, TMapping extends StoredVoiceExternalObjectMap = StoredVoiceExternalObjectMap, TTrace extends StoredVoiceTraceEvent = StoredVoiceTraceEvent, TTraceDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord>(options: VoiceSQLiteStoreOptions) => VoiceSQLiteRuntimeStorage<TSession, TReview, TTask, TEvent, TMapping, TTrace, TTraceDelivery>;
@@ -0,0 +1,8 @@
1
+ import type { VoiceAppKitStatusClientOptions } from '../client/appKitStatus';
2
+ export declare const createVoiceAppKitStatus: (path?: string, options?: VoiceAppKitStatusClientOptions) => {
3
+ close: () => void;
4
+ getServerSnapshot: () => import("../client").VoiceAppKitStatusSnapshot;
5
+ getSnapshot: () => import("../client").VoiceAppKitStatusSnapshot;
6
+ refresh: () => Promise<import("..").VoiceAppKitStatusReport | undefined>;
7
+ subscribe: (listener: () => void) => () => void;
8
+ };
@@ -0,0 +1,9 @@
1
+ import type { VoiceCampaignDialerProofClientOptions } from '../client/campaignDialerProof';
2
+ export declare const createVoiceCampaignDialerProof: (path?: string, options?: VoiceCampaignDialerProofClientOptions) => {
3
+ close: () => void;
4
+ getServerSnapshot: () => import("../client").VoiceCampaignDialerProofSnapshot;
5
+ getSnapshot: () => import("../client").VoiceCampaignDialerProofSnapshot;
6
+ refresh: () => Promise<import("..").VoiceCampaignDialerProofStatus | undefined>;
7
+ runProof: () => Promise<import("..").VoiceCampaignDialerProofReport>;
8
+ subscribe: (listener: () => void) => () => void;
9
+ };
@@ -0,0 +1,9 @@
1
+ import { type VoiceOpsStatusWidgetOptions } from '../client/opsStatusWidget';
2
+ export declare const createVoiceOpsStatus: (path?: string, options?: VoiceOpsStatusWidgetOptions) => {
3
+ close: () => void;
4
+ getHTML: () => string;
5
+ getSnapshot: () => import("../client").VoiceAppKitStatusSnapshot;
6
+ getViewModel: () => import("../client").VoiceOpsStatusViewModel;
7
+ refresh: () => Promise<import("..").VoiceAppKitStatusReport | undefined>;
8
+ subscribe: (listener: () => void) => () => void;
9
+ };
@@ -0,0 +1,10 @@
1
+ import { type VoiceProviderCapabilitiesWidgetOptions } from '../client/providerCapabilitiesWidget';
2
+ export declare const createVoiceProviderCapabilities: <TProvider extends string = string>(path?: string, options?: VoiceProviderCapabilitiesWidgetOptions) => {
3
+ getHTML: () => string;
4
+ getViewModel: () => import("../client").VoiceProviderCapabilitiesViewModel<TProvider>;
5
+ close: () => void;
6
+ getServerSnapshot: () => import("../client").VoiceProviderCapabilitiesSnapshot<TProvider>;
7
+ getSnapshot: () => import("../client").VoiceProviderCapabilitiesSnapshot<TProvider>;
8
+ refresh: () => Promise<import("..").VoiceProviderCapabilityReport<TProvider> | undefined>;
9
+ subscribe: (listener: () => void) => () => void;
10
+ };
@@ -0,0 +1,11 @@
1
+ import type { VoiceProviderSimulationControlsOptions } from '../client/providerSimulationControls';
2
+ export declare const createVoiceProviderSimulationControls: <TProvider extends string = string>(options: VoiceProviderSimulationControlsOptions<TProvider>) => {
3
+ bind: (element: Element) => () => void;
4
+ getHTML: () => string;
5
+ getViewModel: () => import("../client").VoiceProviderSimulationControlsViewModel<TProvider>;
6
+ close: () => void;
7
+ getServerSnapshot: () => import("../client").VoiceProviderSimulationControlsSnapshot<TProvider>;
8
+ getSnapshot: () => import("../client").VoiceProviderSimulationControlsSnapshot<TProvider>;
9
+ run: (provider: TProvider, mode: import("../testing").VoiceIOProviderFailureSimulationMode) => Promise<import("../testing").VoiceIOProviderFailureSimulationResult<TProvider> | null>;
10
+ subscribe: (listener: () => void) => () => void;
11
+ };
@@ -0,0 +1,10 @@
1
+ import { type VoiceProviderStatusWidgetOptions } from '../client/providerStatusWidget';
2
+ export declare const createVoiceProviderStatus: <TProvider extends string = string>(path?: string, options?: VoiceProviderStatusWidgetOptions) => {
3
+ getHTML: () => string;
4
+ getViewModel: () => import("../client").VoiceProviderStatusViewModel<TProvider>;
5
+ close: () => void;
6
+ getServerSnapshot: () => import("../client").VoiceProviderStatusSnapshot<TProvider>;
7
+ getSnapshot: () => import("../client").VoiceProviderStatusSnapshot<TProvider>;
8
+ refresh: () => Promise<import("..").VoiceProviderHealthSummary<TProvider>[]>;
9
+ subscribe: (listener: () => void) => () => void;
10
+ };