@absolutejs/voice 0.0.22-beta.18 → 0.0.22-beta.180

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 (189) hide show
  1. package/README.md +1097 -5
  2. package/dist/agent.d.ts +24 -0
  3. package/dist/agentSquadContract.d.ts +64 -0
  4. package/dist/angular/index.d.ts +12 -0
  5. package/dist/angular/index.js +3196 -1111
  6. package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
  7. package/dist/angular/voice-controller.service.d.ts +1 -0
  8. package/dist/angular/voice-delivery-runtime.component.d.ts +17 -0
  9. package/dist/angular/voice-delivery-runtime.service.d.ts +16 -0
  10. package/dist/angular/voice-ops-action-center.service.d.ts +13 -0
  11. package/dist/angular/voice-ops-status.component.d.ts +15 -0
  12. package/dist/angular/voice-ops-status.service.d.ts +12 -0
  13. package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
  14. package/dist/angular/voice-provider-contracts.service.d.ts +12 -0
  15. package/dist/angular/voice-routing-status.service.d.ts +11 -0
  16. package/dist/angular/voice-stream.service.d.ts +3 -0
  17. package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
  18. package/dist/angular/voice-turn-latency.service.d.ts +13 -0
  19. package/dist/angular/voice-turn-quality.service.d.ts +12 -0
  20. package/dist/angular/voice-workflow-status.service.d.ts +12 -0
  21. package/dist/assistantHealth.d.ts +2 -0
  22. package/dist/audit.d.ts +128 -0
  23. package/dist/auditDeliveryRoutes.d.ts +85 -0
  24. package/dist/auditExport.d.ts +34 -0
  25. package/dist/auditRoutes.d.ts +66 -0
  26. package/dist/auditSinks.d.ts +151 -0
  27. package/dist/bargeInRoutes.d.ts +56 -0
  28. package/dist/campaign.d.ts +610 -0
  29. package/dist/campaignDialers.d.ts +90 -0
  30. package/dist/client/actions.d.ts +105 -0
  31. package/dist/client/bargeInMonitor.d.ts +7 -0
  32. package/dist/client/campaignDialerProof.d.ts +23 -0
  33. package/dist/client/connection.d.ts +3 -0
  34. package/dist/client/deliveryRuntime.d.ts +34 -0
  35. package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
  36. package/dist/client/duplex.d.ts +1 -1
  37. package/dist/client/htmxBootstrap.js +747 -15
  38. package/dist/client/index.d.ts +54 -0
  39. package/dist/client/index.js +2944 -20
  40. package/dist/client/liveTurnLatency.d.ts +41 -0
  41. package/dist/client/opsActionCenter.d.ts +54 -0
  42. package/dist/client/opsActionCenterWidget.d.ts +29 -0
  43. package/dist/client/opsActionHistory.d.ts +19 -0
  44. package/dist/client/opsActionHistoryWidget.d.ts +11 -0
  45. package/dist/client/opsStatus.d.ts +19 -0
  46. package/dist/client/opsStatusWidget.d.ts +40 -0
  47. package/dist/client/providerCapabilities.d.ts +19 -0
  48. package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
  49. package/dist/client/providerContracts.d.ts +19 -0
  50. package/dist/client/providerContractsWidget.d.ts +37 -0
  51. package/dist/client/providerSimulationControls.d.ts +33 -0
  52. package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
  53. package/dist/client/providerStatusWidget.d.ts +32 -0
  54. package/dist/client/routingStatus.d.ts +19 -0
  55. package/dist/client/routingStatusWidget.d.ts +28 -0
  56. package/dist/client/traceTimeline.d.ts +19 -0
  57. package/dist/client/traceTimelineWidget.d.ts +32 -0
  58. package/dist/client/turnLatency.d.ts +22 -0
  59. package/dist/client/turnLatencyWidget.d.ts +33 -0
  60. package/dist/client/turnQuality.d.ts +19 -0
  61. package/dist/client/turnQualityWidget.d.ts +32 -0
  62. package/dist/client/workflowStatus.d.ts +19 -0
  63. package/dist/dataControl.d.ts +47 -0
  64. package/dist/deliveryRuntime.d.ts +158 -0
  65. package/dist/deliverySinkRoutes.d.ts +117 -0
  66. package/dist/demoReadyRoutes.d.ts +98 -0
  67. package/dist/diagnosticsRoutes.d.ts +44 -0
  68. package/dist/evalRoutes.d.ts +213 -0
  69. package/dist/fileStore.d.ts +11 -2
  70. package/dist/handoff.d.ts +54 -0
  71. package/dist/handoffHealth.d.ts +94 -0
  72. package/dist/index.d.ts +112 -11
  73. package/dist/index.js +19259 -4988
  74. package/dist/liveLatency.d.ts +78 -0
  75. package/dist/modelAdapters.d.ts +23 -2
  76. package/dist/openaiRealtime.d.ts +27 -0
  77. package/dist/openaiTTS.d.ts +18 -0
  78. package/dist/opsActionAuditRoutes.d.ts +99 -0
  79. package/dist/opsConsoleRoutes.d.ts +80 -0
  80. package/dist/opsStatus.d.ts +76 -0
  81. package/dist/opsStatusRoutes.d.ts +33 -0
  82. package/dist/opsWebhook.d.ts +126 -0
  83. package/dist/outcomeContract.d.ts +112 -0
  84. package/dist/phoneAgent.d.ts +62 -0
  85. package/dist/phoneAgentProductionSmoke.d.ts +115 -0
  86. package/dist/postgresStore.d.ts +13 -2
  87. package/dist/productionReadiness.d.ts +369 -0
  88. package/dist/providerAdapters.d.ts +48 -0
  89. package/dist/providerCapabilities.d.ts +92 -0
  90. package/dist/providerHealth.d.ts +1 -0
  91. package/dist/providerRoutingContract.d.ts +38 -0
  92. package/dist/providerStackRecommendations.d.ts +145 -0
  93. package/dist/qualityRoutes.d.ts +76 -0
  94. package/dist/queue.d.ts +61 -0
  95. package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
  96. package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
  97. package/dist/react/VoiceOpsStatus.d.ts +6 -0
  98. package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
  99. package/dist/react/VoiceProviderContracts.d.ts +6 -0
  100. package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
  101. package/dist/react/VoiceProviderStatus.d.ts +6 -0
  102. package/dist/react/VoiceRoutingStatus.d.ts +6 -0
  103. package/dist/react/VoiceTraceTimeline.d.ts +6 -0
  104. package/dist/react/VoiceTurnLatency.d.ts +6 -0
  105. package/dist/react/VoiceTurnQuality.d.ts +6 -0
  106. package/dist/react/index.d.ts +23 -0
  107. package/dist/react/index.js +3695 -33
  108. package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
  109. package/dist/react/useVoiceController.d.ts +3 -0
  110. package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
  111. package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
  112. package/dist/react/useVoiceOpsStatus.d.ts +8 -0
  113. package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
  114. package/dist/react/useVoiceProviderContracts.d.ts +8 -0
  115. package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
  116. package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
  117. package/dist/react/useVoiceStream.d.ts +3 -0
  118. package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
  119. package/dist/react/useVoiceTurnLatency.d.ts +9 -0
  120. package/dist/react/useVoiceTurnQuality.d.ts +8 -0
  121. package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
  122. package/dist/readinessProfiles.d.ts +35 -0
  123. package/dist/reconnectContract.d.ts +87 -0
  124. package/dist/resilienceRoutes.d.ts +142 -0
  125. package/dist/sessionReplay.d.ts +185 -0
  126. package/dist/simulationSuite.d.ts +120 -0
  127. package/dist/sqliteStore.d.ts +13 -2
  128. package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
  129. package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
  130. package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
  131. package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
  132. package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
  133. package/dist/svelte/createVoiceProviderContracts.d.ts +10 -0
  134. package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
  135. package/dist/svelte/createVoiceProviderStatus.d.ts +4 -2
  136. package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
  137. package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
  138. package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
  139. package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
  140. package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
  141. package/dist/svelte/index.d.ts +12 -0
  142. package/dist/svelte/index.js +3095 -439
  143. package/dist/telephony/contract.d.ts +61 -0
  144. package/dist/telephony/matrix.d.ts +97 -0
  145. package/dist/telephony/plivo.d.ts +254 -0
  146. package/dist/telephony/telnyx.d.ts +247 -0
  147. package/dist/telephony/twilio.d.ts +135 -2
  148. package/dist/telephonyOutcome.d.ts +201 -0
  149. package/dist/testing/index.d.ts +1 -0
  150. package/dist/testing/index.js +2008 -69
  151. package/dist/testing/ioProviderSimulator.d.ts +41 -0
  152. package/dist/testing/providerSimulator.d.ts +8 -0
  153. package/dist/toolContract.d.ts +130 -0
  154. package/dist/toolRuntime.d.ts +50 -0
  155. package/dist/trace.d.ts +19 -1
  156. package/dist/traceDeliveryRoutes.d.ts +86 -0
  157. package/dist/traceTimeline.d.ts +93 -0
  158. package/dist/turnLatency.d.ts +95 -0
  159. package/dist/turnQuality.d.ts +94 -0
  160. package/dist/types.d.ts +170 -4
  161. package/dist/vue/VoiceDeliveryRuntime.d.ts +30 -0
  162. package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
  163. package/dist/vue/VoiceOpsStatus.d.ts +30 -0
  164. package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
  165. package/dist/vue/VoiceProviderContracts.d.ts +21 -0
  166. package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
  167. package/dist/vue/VoiceProviderStatus.d.ts +51 -0
  168. package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
  169. package/dist/vue/VoiceTurnLatency.d.ts +69 -0
  170. package/dist/vue/VoiceTurnQuality.d.ts +51 -0
  171. package/dist/vue/index.d.ts +22 -0
  172. package/dist/vue/index.js +3617 -53
  173. package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
  174. package/dist/vue/useVoiceController.d.ts +2 -1
  175. package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
  176. package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
  177. package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
  178. package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
  179. package/dist/vue/useVoiceProviderContracts.d.ts +9 -0
  180. package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
  181. package/dist/vue/useVoiceProviderStatus.d.ts +1 -1
  182. package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
  183. package/dist/vue/useVoiceStream.d.ts +4 -1
  184. package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
  185. package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
  186. package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
  187. package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
  188. package/dist/workflowContract.d.ts +91 -0
  189. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import type { VoiceScenarioEvalReport } from '../evalRoutes';
2
+ export type VoiceWorkflowStatusClientOptions = {
3
+ fetch?: typeof fetch;
4
+ intervalMs?: number;
5
+ };
6
+ export type VoiceWorkflowStatusSnapshot = {
7
+ error: string | null;
8
+ isLoading: boolean;
9
+ report?: VoiceScenarioEvalReport;
10
+ updatedAt?: number;
11
+ };
12
+ export declare const fetchVoiceWorkflowStatus: (path?: string, options?: Pick<VoiceWorkflowStatusClientOptions, "fetch">) => Promise<VoiceScenarioEvalReport>;
13
+ export declare const createVoiceWorkflowStatusStore: (path?: string, options?: VoiceWorkflowStatusClientOptions) => {
14
+ close: () => void;
15
+ getServerSnapshot: () => VoiceWorkflowStatusSnapshot;
16
+ getSnapshot: () => VoiceWorkflowStatusSnapshot;
17
+ refresh: () => Promise<VoiceScenarioEvalReport | undefined>;
18
+ subscribe: (listener: () => void) => () => void;
19
+ };
@@ -0,0 +1,47 @@
1
+ import type { VoiceCampaignStore } from './campaign';
2
+ import { type VoiceAuditActor, type VoiceAuditEventStore } from './audit';
3
+ import type { VoiceAuditSinkDeliveryStore } from './auditSinks';
4
+ import type { VoiceIntegrationEventStore, VoiceOpsTaskStore } from './ops';
5
+ import type { VoiceCallReviewStore } from './testing/review';
6
+ import type { VoiceTraceEventStore, VoiceTracePruneFilter, VoiceTraceSinkDeliveryStore } from './trace';
7
+ import type { VoiceSessionStore } from './types';
8
+ export type VoiceDataRetentionScope = 'auditDeliveries' | 'campaigns' | 'events' | 'reviews' | 'sessions' | 'tasks' | 'traceDeliveries' | 'traces';
9
+ export type VoiceDataRetentionStores = {
10
+ campaigns?: VoiceCampaignStore;
11
+ events?: VoiceIntegrationEventStore;
12
+ reviews?: VoiceCallReviewStore;
13
+ session?: VoiceSessionStore;
14
+ sessions?: VoiceSessionStore;
15
+ tasks?: VoiceOpsTaskStore;
16
+ traceDeliveries?: VoiceTraceSinkDeliveryStore;
17
+ traces?: VoiceTraceEventStore;
18
+ };
19
+ export type VoiceDataRetentionPolicy = VoiceDataRetentionStores & {
20
+ audit?: VoiceAuditEventStore;
21
+ auditDeliveries?: VoiceAuditSinkDeliveryStore;
22
+ auditActor?: VoiceAuditActor;
23
+ before?: number;
24
+ beforeOrAt?: number;
25
+ dryRun?: boolean;
26
+ keepNewest?: Partial<Record<VoiceDataRetentionScope, number>>;
27
+ limit?: number;
28
+ scopes?: VoiceDataRetentionScope[];
29
+ traceFilter?: VoiceTracePruneFilter;
30
+ };
31
+ export type VoiceDataRetentionScopeReport = {
32
+ deletedIds: string[];
33
+ deletedCount: number;
34
+ dryRun: boolean;
35
+ keepNewest?: number;
36
+ scannedCount: number;
37
+ scope: VoiceDataRetentionScope;
38
+ skippedReason?: 'missing-store' | 'missing-selector';
39
+ };
40
+ export type VoiceDataRetentionReport = {
41
+ checkedAt: number;
42
+ deletedCount: number;
43
+ dryRun: boolean;
44
+ scopes: VoiceDataRetentionScopeReport[];
45
+ };
46
+ export declare const applyVoiceDataRetentionPolicy: (options: VoiceDataRetentionPolicy) => Promise<VoiceDataRetentionReport>;
47
+ export declare const buildVoiceDataRetentionPlan: (options: Omit<VoiceDataRetentionPolicy, "dryRun">) => Promise<VoiceDataRetentionReport>;
@@ -0,0 +1,158 @@
1
+ import { Elysia } from 'elysia';
2
+ import { createVoiceAuditSinkDeliveryWorker, type VoiceAuditSinkDeliveryQueueSummary, type VoiceAuditSinkDeliveryRecord, type VoiceAuditSinkDeliveryStore, type VoiceAuditSinkDeliveryWorkerOptions, type VoiceAuditSinkDeliveryWorkerResult, type VoiceS3AuditSinkClient } from './auditSinks';
3
+ import { createVoiceTraceSinkDeliveryWorker, type VoiceRedisTaskLeaseCoordinator, type VoiceTraceSinkDeliveryQueueSummary, type VoiceTraceSinkDeliveryWorkerOptions, type VoiceTraceSinkDeliveryWorkerResult } from './queue';
4
+ import { type StoredVoiceTraceEvent, type VoiceS3TraceSinkClient, type VoiceTraceSinkDeliveryRecord, type VoiceTraceSinkDeliveryStore } from './trace';
5
+ import type { StoredVoiceAuditEvent } from './audit';
6
+ export type VoiceDeliveryRuntimeAuditConfig<TDelivery extends VoiceAuditSinkDeliveryRecord = VoiceAuditSinkDeliveryRecord> = VoiceAuditSinkDeliveryWorkerOptions<TDelivery> & {
7
+ autoStart?: boolean;
8
+ onError?: (error: unknown) => Promise<void> | void;
9
+ pollIntervalMs?: number;
10
+ };
11
+ export type VoiceDeliveryRuntimeTraceConfig<TDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord> = VoiceTraceSinkDeliveryWorkerOptions<TDelivery> & {
12
+ autoStart?: boolean;
13
+ onError?: (error: unknown) => Promise<void> | void;
14
+ pollIntervalMs?: number;
15
+ };
16
+ export type VoiceDeliveryRuntimeConfig<TAuditDelivery extends VoiceAuditSinkDeliveryRecord = VoiceAuditSinkDeliveryRecord, TTraceDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord> = {
17
+ audit?: VoiceDeliveryRuntimeAuditConfig<TAuditDelivery>;
18
+ trace?: VoiceDeliveryRuntimeTraceConfig<TTraceDelivery>;
19
+ };
20
+ export type VoiceDeliveryRuntimeTickResult = {
21
+ audit?: VoiceAuditSinkDeliveryWorkerResult;
22
+ trace?: VoiceTraceSinkDeliveryWorkerResult;
23
+ };
24
+ export type VoiceDeliveryRuntimeRequeueDeadLettersResult = {
25
+ audit: number;
26
+ trace: number;
27
+ total: number;
28
+ };
29
+ export type VoiceDeliveryRuntimeSummary = {
30
+ audit?: VoiceAuditSinkDeliveryQueueSummary;
31
+ trace?: VoiceTraceSinkDeliveryQueueSummary;
32
+ };
33
+ export type VoiceDeliveryRuntime = {
34
+ audit?: ReturnType<typeof createVoiceAuditSinkDeliveryWorker>;
35
+ isRunning: () => boolean;
36
+ requeueDeadLetters: () => Promise<VoiceDeliveryRuntimeRequeueDeadLettersResult>;
37
+ start: () => void;
38
+ stop: () => void;
39
+ summarize: () => Promise<VoiceDeliveryRuntimeSummary>;
40
+ tick: () => Promise<VoiceDeliveryRuntimeTickResult>;
41
+ trace?: ReturnType<typeof createVoiceTraceSinkDeliveryWorker>;
42
+ };
43
+ export type VoiceDeliveryRuntimeReport = {
44
+ checkedAt: number;
45
+ isRunning: boolean;
46
+ summary: VoiceDeliveryRuntimeSummary;
47
+ };
48
+ export type VoiceDeliveryRuntimeRoutesOptions = {
49
+ headers?: HeadersInit;
50
+ htmlPath?: false | string;
51
+ name?: string;
52
+ path?: string;
53
+ render?: (report: VoiceDeliveryRuntimeReport, options: {
54
+ requeueDeadLettersPath?: false | string;
55
+ tickPath?: false | string;
56
+ title?: string;
57
+ }) => string | Promise<string>;
58
+ runtime: VoiceDeliveryRuntime;
59
+ requeueDeadLettersPath?: false | string;
60
+ tickPath?: false | string;
61
+ title?: string;
62
+ };
63
+ export type VoiceDeliveryRuntimePresetMode = 'file' | 's3' | 'webhook';
64
+ export type VoiceDeliveryRuntimePresetLeaseConfig = VoiceRedisTaskLeaseCoordinator | {
65
+ audit: VoiceRedisTaskLeaseCoordinator;
66
+ trace: VoiceRedisTaskLeaseCoordinator;
67
+ };
68
+ export type VoiceDeliveryRuntimePresetBaseOptions = {
69
+ auditDeliveries: VoiceAuditSinkDeliveryStore;
70
+ auditSinkId?: string;
71
+ auditWorkerId?: string;
72
+ autoStart?: boolean;
73
+ failures?: {
74
+ maxFailures?: number;
75
+ };
76
+ leases: VoiceDeliveryRuntimePresetLeaseConfig;
77
+ pollIntervalMs?: number;
78
+ traceDeliveries: VoiceTraceSinkDeliveryStore;
79
+ traceSinkId?: string;
80
+ traceWorkerId?: string;
81
+ };
82
+ export type VoiceDeliveryRuntimeWebhookPresetOptions = VoiceDeliveryRuntimePresetBaseOptions & {
83
+ backoffMs?: number;
84
+ body?: {
85
+ audit?: (input: {
86
+ events: StoredVoiceAuditEvent[];
87
+ }) => Promise<Record<string, unknown>> | Record<string, unknown>;
88
+ trace?: (input: {
89
+ events: StoredVoiceTraceEvent[];
90
+ }) => Promise<Record<string, unknown>> | Record<string, unknown>;
91
+ };
92
+ fetch?: typeof fetch;
93
+ headers?: Record<string, string>;
94
+ mode: 'webhook';
95
+ retries?: number;
96
+ signingSecret?: string;
97
+ timeoutMs?: number;
98
+ url: string;
99
+ };
100
+ export type VoiceDeliveryRuntimeS3PresetOptions = VoiceDeliveryRuntimePresetBaseOptions & {
101
+ bucket?: string;
102
+ client?: VoiceS3AuditSinkClient & VoiceS3TraceSinkClient;
103
+ keyPrefix?: string;
104
+ mode: 's3';
105
+ };
106
+ export type VoiceDeliveryRuntimeFilePresetOptions = VoiceDeliveryRuntimePresetBaseOptions & {
107
+ directory: string;
108
+ mode: 'file';
109
+ };
110
+ export type VoiceDeliveryRuntimePresetOptions = VoiceDeliveryRuntimeFilePresetOptions | VoiceDeliveryRuntimeS3PresetOptions | VoiceDeliveryRuntimeWebhookPresetOptions;
111
+ export declare const createVoiceDeliveryRuntimePresetConfig: (options: VoiceDeliveryRuntimePresetOptions) => VoiceDeliveryRuntimeConfig;
112
+ export declare const createVoiceDeliveryRuntime: <TAuditDelivery extends VoiceAuditSinkDeliveryRecord = VoiceAuditSinkDeliveryRecord, TTraceDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord>(config: VoiceDeliveryRuntimeConfig<TAuditDelivery, TTraceDelivery>) => VoiceDeliveryRuntime;
113
+ export declare const buildVoiceDeliveryRuntimeReport: (runtime: VoiceDeliveryRuntime) => Promise<VoiceDeliveryRuntimeReport>;
114
+ export declare const renderVoiceDeliveryRuntimeHTML: (report: VoiceDeliveryRuntimeReport, options?: {
115
+ requeueDeadLettersPath?: false | string;
116
+ tickPath?: false | string;
117
+ title?: string;
118
+ }) => string;
119
+ export declare const createVoiceDeliveryRuntimeRoutes: (options: VoiceDeliveryRuntimeRoutesOptions) => Elysia<"", {
120
+ decorator: {};
121
+ store: {};
122
+ derive: {};
123
+ resolve: {};
124
+ }, {
125
+ typebox: {};
126
+ error: {};
127
+ }, {
128
+ schema: {};
129
+ standaloneSchema: {};
130
+ macro: {};
131
+ macroFn: {};
132
+ parser: {};
133
+ response: {};
134
+ }, {
135
+ [x: string]: {
136
+ get: {
137
+ body: unknown;
138
+ params: {};
139
+ query: unknown;
140
+ headers: unknown;
141
+ response: {
142
+ 200: VoiceDeliveryRuntimeReport;
143
+ };
144
+ };
145
+ };
146
+ }, {
147
+ derive: {};
148
+ resolve: {};
149
+ schema: {};
150
+ standaloneSchema: {};
151
+ response: {};
152
+ }, {
153
+ derive: {};
154
+ resolve: {};
155
+ schema: {};
156
+ standaloneSchema: {};
157
+ response: {};
158
+ }>;
@@ -0,0 +1,117 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type VoiceAuditSinkDeliveryStore, type VoiceAuditSinkDeliveryQueueSummary } from './auditSinks';
3
+ import { type VoiceTraceSinkDeliveryQueueSummary } from './queue';
4
+ import type { VoiceTraceSinkDeliveryStore } from './trace';
5
+ export type VoiceDeliverySinkKind = 'file' | 'postgres' | 's3' | 'sqlite' | 'webhook' | (string & {});
6
+ export type VoiceDeliverySinkDescriptor = {
7
+ description?: string;
8
+ href?: string;
9
+ id: string;
10
+ kind: VoiceDeliverySinkKind;
11
+ label: string;
12
+ mode?: string;
13
+ target?: string;
14
+ };
15
+ export type VoiceDeliverySinkDescriptorInput = {
16
+ description?: string;
17
+ href?: string;
18
+ id?: string;
19
+ kind: VoiceDeliverySinkKind;
20
+ label?: string;
21
+ mode?: string;
22
+ target?: string;
23
+ };
24
+ export type VoiceDeliverySinkPairOptions = {
25
+ auditHref?: string;
26
+ auditId?: string;
27
+ auditLabel?: string;
28
+ description?: string;
29
+ kind: VoiceDeliverySinkKind;
30
+ mode?: string;
31
+ target?: string;
32
+ traceHref?: string;
33
+ traceId?: string;
34
+ traceLabel?: string;
35
+ };
36
+ export type VoiceDeliverySinkReport = {
37
+ auditDeliveries?: VoiceTraceDeliverySinkSurface<VoiceAuditSinkDeliveryQueueSummary>;
38
+ checkedAt: number;
39
+ sinks: VoiceDeliverySinkDescriptor[];
40
+ status: 'fail' | 'pass' | 'warn';
41
+ traceDeliveries?: VoiceTraceDeliverySinkSurface<VoiceTraceSinkDeliveryQueueSummary>;
42
+ };
43
+ export type VoiceTraceDeliverySinkSurface<TSummary> = {
44
+ href?: string;
45
+ label: string;
46
+ summary: TSummary;
47
+ };
48
+ export type VoiceDeliverySinkRoutesOptions = {
49
+ auditDeliveries?: {
50
+ href?: string;
51
+ label?: string;
52
+ store: VoiceAuditSinkDeliveryStore;
53
+ };
54
+ headers?: HeadersInit;
55
+ htmlPath?: false | string;
56
+ name?: string;
57
+ path?: string;
58
+ render?: (report: VoiceDeliverySinkReport) => string | Promise<string>;
59
+ sinks?: readonly VoiceDeliverySinkDescriptor[];
60
+ title?: string;
61
+ traceDeliveries?: {
62
+ href?: string;
63
+ label?: string;
64
+ store: VoiceTraceSinkDeliveryStore;
65
+ };
66
+ };
67
+ export declare const createVoiceDeliverySinkDescriptor: (input: VoiceDeliverySinkDescriptorInput) => VoiceDeliverySinkDescriptor;
68
+ export declare const createVoiceFileDeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
69
+ export declare const createVoiceWebhookDeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
70
+ export declare const createVoiceS3DeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
71
+ export declare const createVoicePostgresDeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
72
+ export declare const createVoiceSQLiteDeliverySink: (input?: Omit<VoiceDeliverySinkDescriptorInput, "kind">) => VoiceDeliverySinkDescriptor;
73
+ export declare const createVoiceDeliverySinkPair: (options: VoiceDeliverySinkPairOptions) => VoiceDeliverySinkDescriptor[];
74
+ export declare const buildVoiceDeliverySinkReport: (options: VoiceDeliverySinkRoutesOptions) => Promise<VoiceDeliverySinkReport>;
75
+ export declare const renderVoiceDeliverySinkHTML: (report: VoiceDeliverySinkReport, options?: {
76
+ title?: string;
77
+ }) => string;
78
+ export declare const createVoiceDeliverySinkRoutes: (options: VoiceDeliverySinkRoutesOptions) => Elysia<"", {
79
+ decorator: {};
80
+ store: {};
81
+ derive: {};
82
+ resolve: {};
83
+ }, {
84
+ typebox: {};
85
+ error: {};
86
+ }, {
87
+ schema: {};
88
+ standaloneSchema: {};
89
+ macro: {};
90
+ macroFn: {};
91
+ parser: {};
92
+ response: {};
93
+ }, {
94
+ [x: string]: {
95
+ get: {
96
+ body: unknown;
97
+ params: {};
98
+ query: unknown;
99
+ headers: unknown;
100
+ response: {
101
+ 200: VoiceDeliverySinkReport;
102
+ };
103
+ };
104
+ };
105
+ }, {
106
+ derive: {};
107
+ resolve: {};
108
+ schema: {};
109
+ standaloneSchema: {};
110
+ response: {};
111
+ }, {
112
+ derive: {};
113
+ resolve: {};
114
+ schema: {};
115
+ standaloneSchema: {};
116
+ response: {};
117
+ }>;
@@ -0,0 +1,98 @@
1
+ import { Elysia } from 'elysia';
2
+ import type { VoiceOpsStatusReport } from './opsStatus';
3
+ import type { VoicePhoneAgentProductionSmokeReport } from './phoneAgentProductionSmoke';
4
+ import type { VoicePhoneAgentSetupReport } from './phoneAgent';
5
+ import type { VoiceProductionReadinessReport } from './productionReadiness';
6
+ export type VoiceDemoReadyStatus = 'fail' | 'pass' | 'warn';
7
+ export type VoiceDemoReadySection = {
8
+ description?: string;
9
+ href?: string;
10
+ label: string;
11
+ status: VoiceDemoReadyStatus;
12
+ value?: number | string;
13
+ };
14
+ export type VoiceDemoReadyReport = {
15
+ checkedAt: number;
16
+ sections: VoiceDemoReadySection[];
17
+ status: VoiceDemoReadyStatus;
18
+ summary: {
19
+ opsStatus?: Pick<VoiceOpsStatusReport, 'failed' | 'passed' | 'status' | 'total'>;
20
+ phoneSetup?: {
21
+ carriers: number;
22
+ ready: boolean;
23
+ };
24
+ phoneSmoke?: {
25
+ issues: number;
26
+ pass: boolean;
27
+ provider?: string;
28
+ sessionId?: string;
29
+ };
30
+ productionReadiness?: {
31
+ checks: number;
32
+ status: VoiceProductionReadinessReport['status'];
33
+ };
34
+ };
35
+ title: string;
36
+ };
37
+ type VoiceDemoReadyLoader<TValue> = TValue | ((input: {
38
+ query: Record<string, unknown>;
39
+ request: Request;
40
+ }) => Promise<TValue | undefined> | TValue | undefined);
41
+ export type VoiceDemoReadyRoutesOptions = {
42
+ opsStatus?: false | {
43
+ href?: string;
44
+ load: VoiceDemoReadyLoader<VoiceOpsStatusReport>;
45
+ };
46
+ headers?: HeadersInit;
47
+ htmlPath?: false | string;
48
+ name?: string;
49
+ path?: string;
50
+ phoneSetup?: false | {
51
+ href?: string;
52
+ load: VoiceDemoReadyLoader<VoicePhoneAgentSetupReport>;
53
+ };
54
+ phoneSmoke?: false | {
55
+ href?: string;
56
+ load: VoiceDemoReadyLoader<VoicePhoneAgentProductionSmokeReport>;
57
+ };
58
+ productionReadiness?: false | {
59
+ href?: string;
60
+ load: VoiceDemoReadyLoader<VoiceProductionReadinessReport>;
61
+ };
62
+ render?: (report: VoiceDemoReadyReport) => Promise<string> | string;
63
+ title?: string;
64
+ };
65
+ export declare const buildVoiceDemoReadyReport: (options: VoiceDemoReadyRoutesOptions, input?: {
66
+ query?: Record<string, unknown>;
67
+ request?: Request;
68
+ }) => Promise<VoiceDemoReadyReport>;
69
+ export declare const renderVoiceDemoReadyHTML: (report: VoiceDemoReadyReport) => string;
70
+ export declare const createVoiceDemoReadyRoutes: (options: VoiceDemoReadyRoutesOptions) => Elysia<"", {
71
+ decorator: {};
72
+ store: {};
73
+ derive: {};
74
+ resolve: {};
75
+ }, {
76
+ typebox: {};
77
+ error: {};
78
+ }, {
79
+ schema: {};
80
+ standaloneSchema: {};
81
+ macro: {};
82
+ macroFn: {};
83
+ parser: {};
84
+ response: {};
85
+ }, {}, {
86
+ derive: {};
87
+ resolve: {};
88
+ schema: {};
89
+ standaloneSchema: {};
90
+ response: {};
91
+ }, {
92
+ derive: {};
93
+ resolve: {};
94
+ schema: {};
95
+ standaloneSchema: {};
96
+ response: {};
97
+ }>;
98
+ export {};
@@ -0,0 +1,44 @@
1
+ import { Elysia } from 'elysia';
2
+ import { evaluateVoiceTrace, type StoredVoiceTraceEvent, type VoiceTraceEventFilter, type VoiceTraceEventStore, type VoiceTraceRedactionConfig } from './trace';
3
+ export type VoiceDiagnosticsRoutesOptions = {
4
+ evaluation?: Parameters<typeof evaluateVoiceTrace>[1];
5
+ headers?: HeadersInit;
6
+ name?: string;
7
+ path?: string;
8
+ redact?: VoiceTraceRedactionConfig;
9
+ store: VoiceTraceEventStore;
10
+ title?: string;
11
+ };
12
+ export declare const resolveVoiceDiagnosticsTraceFilter: (query: Record<string, unknown>) => VoiceTraceEventFilter;
13
+ export declare const buildVoiceDiagnosticsMarkdown: (events: StoredVoiceTraceEvent[], options?: {
14
+ evaluation?: Parameters<typeof evaluateVoiceTrace>[1];
15
+ title?: string;
16
+ }) => string;
17
+ export declare const createVoiceDiagnosticsRoutes: (options: VoiceDiagnosticsRoutesOptions) => Elysia<"", {
18
+ decorator: {};
19
+ store: {};
20
+ derive: {};
21
+ resolve: {};
22
+ }, {
23
+ typebox: {};
24
+ error: {};
25
+ }, {
26
+ schema: {};
27
+ standaloneSchema: {};
28
+ macro: {};
29
+ macroFn: {};
30
+ parser: {};
31
+ response: {};
32
+ }, {}, {
33
+ derive: {};
34
+ resolve: {};
35
+ schema: {};
36
+ standaloneSchema: {};
37
+ response: {};
38
+ }, {
39
+ derive: {};
40
+ resolve: {};
41
+ schema: {};
42
+ standaloneSchema: {};
43
+ response: {};
44
+ }>;
@@ -0,0 +1,213 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type VoiceQualityReport, type VoiceQualityThresholds } from './qualityRoutes';
3
+ import { summarizeVoiceTrace, type StoredVoiceTraceEvent, type VoiceTraceEventStore } from './trace';
4
+ export type VoiceEvalStatus = 'pass' | 'fail';
5
+ export type VoiceEvalSessionReport = {
6
+ endedAt?: number;
7
+ eventCount: number;
8
+ quality: VoiceQualityReport;
9
+ scenarioId?: string;
10
+ sessionId: string;
11
+ startedAt?: number;
12
+ status: VoiceEvalStatus;
13
+ summary: ReturnType<typeof summarizeVoiceTrace>;
14
+ };
15
+ export type VoiceEvalTrendBucket = {
16
+ endedAt: number;
17
+ failed: number;
18
+ key: string;
19
+ passed: number;
20
+ total: number;
21
+ };
22
+ export type VoiceEvalReport = {
23
+ checkedAt: number;
24
+ failed: number;
25
+ passed: number;
26
+ sessions: VoiceEvalSessionReport[];
27
+ status: VoiceEvalStatus;
28
+ total: number;
29
+ trend: VoiceEvalTrendBucket[];
30
+ };
31
+ export type VoiceEvalBaselineSummary = {
32
+ failed: number;
33
+ failedSessionIds: string[];
34
+ passRate: number;
35
+ passed: number;
36
+ total: number;
37
+ };
38
+ export type VoiceEvalBaselineComparison = {
39
+ baseline: VoiceEvalBaselineSummary;
40
+ checkedAt: number;
41
+ current: VoiceEvalBaselineSummary;
42
+ deltas: {
43
+ failed: number;
44
+ passRate: number;
45
+ passed: number;
46
+ total: number;
47
+ };
48
+ newFailedSessionIds: string[];
49
+ recoveredSessionIds: string[];
50
+ reasons: string[];
51
+ status: VoiceEvalStatus;
52
+ };
53
+ export type VoiceEvalBaselineComparisonOptions = {
54
+ failOnNewFailedSessions?: boolean;
55
+ maxFailedDelta?: number;
56
+ maxPassRateDrop?: number;
57
+ };
58
+ export type VoiceEvalBaselineStore = {
59
+ get: () => Promise<VoiceEvalReport | undefined>;
60
+ set: (report: VoiceEvalReport) => Promise<void>;
61
+ };
62
+ export type VoiceScenarioEvalDefinition = {
63
+ description?: string;
64
+ forbiddenHandoffActions?: string[];
65
+ forbiddenLifecycleTypes?: string[];
66
+ id: string;
67
+ label?: string;
68
+ maxProviderErrors?: number;
69
+ maxSessionErrors?: number;
70
+ minSessions?: number;
71
+ minTurns?: number;
72
+ requiredAssistantIncludes?: string[];
73
+ requiredDisposition?: string;
74
+ requiredHandoffActions?: string[];
75
+ requiredLifecycleTypes?: string[];
76
+ requiredPayloadPaths?: string[];
77
+ requiredTranscriptIncludes?: string[];
78
+ requiredWorkflowContracts?: string[];
79
+ scenarioId?: string;
80
+ };
81
+ export type VoiceScenarioEvalSessionResult = {
82
+ eventCount: number;
83
+ issues: string[];
84
+ sessionId: string;
85
+ status: VoiceEvalStatus;
86
+ };
87
+ export type VoiceScenarioEvalResult = {
88
+ description?: string;
89
+ failed: number;
90
+ id: string;
91
+ issues: string[];
92
+ label: string;
93
+ matchedSessions: number;
94
+ passed: number;
95
+ sessions: VoiceScenarioEvalSessionResult[];
96
+ status: VoiceEvalStatus;
97
+ };
98
+ export type VoiceScenarioEvalReport = {
99
+ checkedAt: number;
100
+ failed: number;
101
+ passed: number;
102
+ scenarios: VoiceScenarioEvalResult[];
103
+ status: VoiceEvalStatus;
104
+ total: number;
105
+ };
106
+ export type VoiceScenarioFixture = {
107
+ description?: string;
108
+ events: StoredVoiceTraceEvent[];
109
+ id: string;
110
+ label?: string;
111
+ };
112
+ export type VoiceScenarioFixtureStore = {
113
+ list: () => Promise<VoiceScenarioFixture[]>;
114
+ };
115
+ export type VoiceScenarioFixtureEvalResult = {
116
+ description?: string;
117
+ fixtureId: string;
118
+ label: string;
119
+ report: VoiceScenarioEvalReport;
120
+ status: VoiceEvalStatus;
121
+ };
122
+ export type VoiceScenarioFixtureEvalReport = {
123
+ checkedAt: number;
124
+ failed: number;
125
+ fixtures: VoiceScenarioFixtureEvalResult[];
126
+ passed: number;
127
+ status: VoiceEvalStatus;
128
+ total: number;
129
+ };
130
+ export type VoiceEvalLink = {
131
+ href: string;
132
+ label: string;
133
+ };
134
+ export type VoiceEvalRoutesOptions = {
135
+ baseline?: VoiceEvalReport | (() => Promise<VoiceEvalReport | undefined>);
136
+ baselineComparison?: VoiceEvalBaselineComparisonOptions;
137
+ baselineStore?: VoiceEvalBaselineStore;
138
+ events?: StoredVoiceTraceEvent[];
139
+ fixtures?: VoiceScenarioFixture[];
140
+ fixtureStore?: VoiceScenarioFixtureStore;
141
+ headers?: HeadersInit;
142
+ links?: VoiceEvalLink[];
143
+ limit?: number;
144
+ name?: string;
145
+ path?: string;
146
+ scenarios?: VoiceScenarioEvalDefinition[];
147
+ store?: VoiceTraceEventStore;
148
+ thresholds?: VoiceQualityThresholds;
149
+ title?: string;
150
+ };
151
+ export declare const runVoiceSessionEvals: (options?: {
152
+ events?: StoredVoiceTraceEvent[];
153
+ limit?: number;
154
+ store?: VoiceTraceEventStore;
155
+ thresholds?: VoiceQualityThresholds;
156
+ }) => Promise<VoiceEvalReport>;
157
+ export declare const runVoiceScenarioEvals: (options?: {
158
+ events?: StoredVoiceTraceEvent[];
159
+ scenarios?: VoiceScenarioEvalDefinition[];
160
+ store?: VoiceTraceEventStore;
161
+ }) => Promise<VoiceScenarioEvalReport>;
162
+ export declare const runVoiceScenarioFixtureEvals: (options?: {
163
+ fixtures?: VoiceScenarioFixture[];
164
+ fixtureStore?: VoiceScenarioFixtureStore;
165
+ scenarios?: VoiceScenarioEvalDefinition[];
166
+ }) => Promise<VoiceScenarioFixtureEvalReport>;
167
+ export declare const compareVoiceEvalBaseline: (currentReport: VoiceEvalReport, baselineReport: VoiceEvalReport, options?: VoiceEvalBaselineComparisonOptions) => VoiceEvalBaselineComparison;
168
+ export declare const createVoiceFileEvalBaselineStore: (filePath: string) => VoiceEvalBaselineStore;
169
+ export declare const createVoiceFileScenarioFixtureStore: (filePath: string) => VoiceScenarioFixtureStore;
170
+ export declare const renderVoiceEvalHTML: (report: VoiceEvalReport, options?: {
171
+ links?: VoiceEvalLink[];
172
+ title?: string;
173
+ }) => string;
174
+ export declare const renderVoiceEvalBaselineHTML: (comparison: VoiceEvalBaselineComparison, options?: {
175
+ links?: VoiceEvalLink[];
176
+ title?: string;
177
+ }) => string;
178
+ export declare const renderVoiceScenarioEvalHTML: (report: VoiceScenarioEvalReport, options?: {
179
+ links?: VoiceEvalLink[];
180
+ title?: string;
181
+ }) => string;
182
+ export declare const renderVoiceScenarioFixtureEvalHTML: (report: VoiceScenarioFixtureEvalReport, options?: {
183
+ links?: VoiceEvalLink[];
184
+ title?: string;
185
+ }) => string;
186
+ export declare const createVoiceEvalRoutes: (options: VoiceEvalRoutesOptions) => Elysia<"", {
187
+ decorator: {};
188
+ store: {};
189
+ derive: {};
190
+ resolve: {};
191
+ }, {
192
+ typebox: {};
193
+ error: {};
194
+ }, {
195
+ schema: {};
196
+ standaloneSchema: {};
197
+ macro: {};
198
+ macroFn: {};
199
+ parser: {};
200
+ response: {};
201
+ }, {}, {
202
+ derive: {};
203
+ resolve: {};
204
+ schema: {};
205
+ standaloneSchema: {};
206
+ response: {};
207
+ }, {
208
+ derive: {};
209
+ resolve: {};
210
+ schema: {};
211
+ standaloneSchema: {};
212
+ response: {};
213
+ }>;