@absolutejs/voice 0.0.22-beta.25 → 0.0.22-beta.251

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 (226) hide show
  1. package/README.md +3234 -228
  2. package/dist/agent.d.ts +62 -0
  3. package/dist/agentSquadContract.d.ts +69 -0
  4. package/dist/angular/index.d.ts +15 -0
  5. package/dist/angular/index.js +3387 -1093
  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 +746 -0
  32. package/dist/campaignDialers.d.ts +90 -0
  33. package/dist/client/actions.d.ts +105 -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/connection.d.ts +3 -0
  39. package/dist/client/deliveryRuntime.d.ts +34 -0
  40. package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
  41. package/dist/client/duplex.d.ts +1 -1
  42. package/dist/client/htmxBootstrap.js +747 -15
  43. package/dist/client/index.d.ts +66 -0
  44. package/dist/client/index.js +4894 -21
  45. package/dist/client/liveOps.d.ts +22 -0
  46. package/dist/client/liveOpsWidget.d.ts +23 -0
  47. package/dist/client/liveTurnLatency.d.ts +41 -0
  48. package/dist/client/opsActionCenter.d.ts +54 -0
  49. package/dist/client/opsActionCenterWidget.d.ts +29 -0
  50. package/dist/client/opsActionHistory.d.ts +19 -0
  51. package/dist/client/opsActionHistoryWidget.d.ts +11 -0
  52. package/dist/client/opsStatus.d.ts +19 -0
  53. package/dist/client/opsStatusWidget.d.ts +40 -0
  54. package/dist/client/platformCoverage.d.ts +19 -0
  55. package/dist/client/platformCoverageWidget.d.ts +37 -0
  56. package/dist/client/proofTrends.d.ts +19 -0
  57. package/dist/client/proofTrendsWidget.d.ts +37 -0
  58. package/dist/client/providerCapabilities.d.ts +19 -0
  59. package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
  60. package/dist/client/providerContracts.d.ts +19 -0
  61. package/dist/client/providerContractsWidget.d.ts +37 -0
  62. package/dist/client/providerSimulationControls.d.ts +33 -0
  63. package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
  64. package/dist/client/providerStatusWidget.d.ts +32 -0
  65. package/dist/client/routingStatus.d.ts +19 -0
  66. package/dist/client/routingStatusWidget.d.ts +28 -0
  67. package/dist/client/traceTimeline.d.ts +19 -0
  68. package/dist/client/traceTimelineWidget.d.ts +36 -0
  69. package/dist/client/turnLatency.d.ts +22 -0
  70. package/dist/client/turnLatencyWidget.d.ts +33 -0
  71. package/dist/client/turnQuality.d.ts +19 -0
  72. package/dist/client/turnQualityWidget.d.ts +32 -0
  73. package/dist/client/workflowStatus.d.ts +19 -0
  74. package/dist/dataControl.d.ts +140 -0
  75. package/dist/deliveryRuntime.d.ts +158 -0
  76. package/dist/deliverySinkRoutes.d.ts +117 -0
  77. package/dist/demoReadyRoutes.d.ts +98 -0
  78. package/dist/diagnosticsRoutes.d.ts +44 -0
  79. package/dist/evalRoutes.d.ts +219 -0
  80. package/dist/fileStore.d.ts +14 -2
  81. package/dist/guardrails.d.ts +128 -0
  82. package/dist/handoff.d.ts +54 -0
  83. package/dist/handoffHealth.d.ts +94 -0
  84. package/dist/incidentBundle.d.ts +116 -0
  85. package/dist/index.d.ts +132 -13
  86. package/dist/index.js +24299 -4986
  87. package/dist/latencySlo.d.ts +56 -0
  88. package/dist/liveLatency.d.ts +78 -0
  89. package/dist/liveOps.d.ts +122 -0
  90. package/dist/modelAdapters.d.ts +23 -2
  91. package/dist/observabilityExport.d.ts +428 -0
  92. package/dist/openaiRealtime.d.ts +27 -0
  93. package/dist/openaiTTS.d.ts +18 -0
  94. package/dist/operationsRecord.d.ts +210 -0
  95. package/dist/opsActionAuditRoutes.d.ts +99 -0
  96. package/dist/opsConsoleRoutes.d.ts +80 -0
  97. package/dist/opsRecovery.d.ts +137 -0
  98. package/dist/opsStatus.d.ts +76 -0
  99. package/dist/opsStatusRoutes.d.ts +33 -0
  100. package/dist/outcomeContract.d.ts +115 -0
  101. package/dist/phoneAgent.d.ts +76 -0
  102. package/dist/phoneAgentProductionSmoke.d.ts +115 -0
  103. package/dist/platformCoverage.d.ts +91 -0
  104. package/dist/postCallAnalysis.d.ts +98 -0
  105. package/dist/postgresStore.d.ts +13 -2
  106. package/dist/productionReadiness.d.ts +484 -0
  107. package/dist/proofTrends.d.ts +108 -0
  108. package/dist/providerAdapters.d.ts +48 -0
  109. package/dist/providerCapabilities.d.ts +92 -0
  110. package/dist/providerHealth.d.ts +1 -0
  111. package/dist/providerRoutingContract.d.ts +38 -0
  112. package/dist/providerSlo.d.ts +142 -0
  113. package/dist/providerStackRecommendations.d.ts +145 -0
  114. package/dist/qualityRoutes.d.ts +76 -0
  115. package/dist/queue.d.ts +61 -0
  116. package/dist/react/VoiceAgentSquadStatus.d.ts +5 -0
  117. package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
  118. package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
  119. package/dist/react/VoiceOpsStatus.d.ts +6 -0
  120. package/dist/react/VoicePlatformCoverage.d.ts +6 -0
  121. package/dist/react/VoiceProofTrends.d.ts +6 -0
  122. package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
  123. package/dist/react/VoiceProviderContracts.d.ts +6 -0
  124. package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
  125. package/dist/react/VoiceProviderStatus.d.ts +6 -0
  126. package/dist/react/VoiceRoutingStatus.d.ts +6 -0
  127. package/dist/react/VoiceTraceTimeline.d.ts +6 -0
  128. package/dist/react/VoiceTurnLatency.d.ts +6 -0
  129. package/dist/react/VoiceTurnQuality.d.ts +6 -0
  130. package/dist/react/index.d.ts +30 -0
  131. package/dist/react/index.js +4739 -33
  132. package/dist/react/useVoiceAgentSquadStatus.d.ts +8 -0
  133. package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
  134. package/dist/react/useVoiceController.d.ts +3 -0
  135. package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
  136. package/dist/react/useVoiceLiveOps.d.ts +9 -0
  137. package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
  138. package/dist/react/useVoiceOpsStatus.d.ts +8 -0
  139. package/dist/react/useVoicePlatformCoverage.d.ts +8 -0
  140. package/dist/react/useVoiceProofTrends.d.ts +8 -0
  141. package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
  142. package/dist/react/useVoiceProviderContracts.d.ts +8 -0
  143. package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
  144. package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
  145. package/dist/react/useVoiceStream.d.ts +3 -0
  146. package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
  147. package/dist/react/useVoiceTurnLatency.d.ts +9 -0
  148. package/dist/react/useVoiceTurnQuality.d.ts +8 -0
  149. package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
  150. package/dist/readinessProfiles.d.ts +37 -0
  151. package/dist/reconnectContract.d.ts +87 -0
  152. package/dist/resilienceRoutes.d.ts +143 -0
  153. package/dist/sessionReplay.d.ts +12 -0
  154. package/dist/simulationSuite.d.ts +121 -0
  155. package/dist/sqliteStore.d.ts +13 -2
  156. package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
  157. package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
  158. package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
  159. package/dist/svelte/createVoiceLiveOps.d.ts +13 -0
  160. package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
  161. package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
  162. package/dist/svelte/createVoicePlatformCoverage.d.ts +7 -0
  163. package/dist/svelte/createVoiceProofTrends.d.ts +7 -0
  164. package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
  165. package/dist/svelte/createVoiceProviderContracts.d.ts +10 -0
  166. package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
  167. package/dist/svelte/createVoiceProviderStatus.d.ts +4 -2
  168. package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
  169. package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
  170. package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
  171. package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
  172. package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
  173. package/dist/svelte/index.d.ts +16 -0
  174. package/dist/svelte/index.js +4754 -439
  175. package/dist/telephony/contract.d.ts +61 -0
  176. package/dist/telephony/matrix.d.ts +97 -0
  177. package/dist/telephony/plivo.d.ts +254 -0
  178. package/dist/telephony/telnyx.d.ts +247 -0
  179. package/dist/telephony/twilio.d.ts +135 -2
  180. package/dist/telephonyOutcome.d.ts +201 -0
  181. package/dist/testing/index.d.ts +1 -0
  182. package/dist/testing/index.js +2024 -69
  183. package/dist/testing/ioProviderSimulator.d.ts +41 -0
  184. package/dist/toolContract.d.ts +133 -0
  185. package/dist/toolRuntime.d.ts +50 -0
  186. package/dist/trace.d.ts +19 -1
  187. package/dist/traceDeliveryRoutes.d.ts +86 -0
  188. package/dist/traceTimeline.d.ts +97 -0
  189. package/dist/turnLatency.d.ts +95 -0
  190. package/dist/turnQuality.d.ts +94 -0
  191. package/dist/types.d.ts +180 -4
  192. package/dist/vue/VoiceDeliveryRuntime.d.ts +30 -0
  193. package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
  194. package/dist/vue/VoiceOpsStatus.d.ts +30 -0
  195. package/dist/vue/VoicePlatformCoverage.d.ts +23 -0
  196. package/dist/vue/VoiceProofTrends.d.ts +21 -0
  197. package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
  198. package/dist/vue/VoiceProviderContracts.d.ts +21 -0
  199. package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
  200. package/dist/vue/VoiceProviderStatus.d.ts +51 -0
  201. package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
  202. package/dist/vue/VoiceTurnLatency.d.ts +69 -0
  203. package/dist/vue/VoiceTurnQuality.d.ts +51 -0
  204. package/dist/vue/index.d.ts +28 -0
  205. package/dist/vue/index.js +4519 -57
  206. package/dist/vue/useVoiceAgentSquadStatus.d.ts +9 -0
  207. package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
  208. package/dist/vue/useVoiceController.d.ts +2 -1
  209. package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
  210. package/dist/vue/useVoiceLiveOps.d.ts +9 -0
  211. package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
  212. package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
  213. package/dist/vue/useVoicePlatformCoverage.d.ts +9 -0
  214. package/dist/vue/useVoiceProofTrends.d.ts +9 -0
  215. package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
  216. package/dist/vue/useVoiceProviderContracts.d.ts +9 -0
  217. package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
  218. package/dist/vue/useVoiceProviderStatus.d.ts +1 -1
  219. package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
  220. package/dist/vue/useVoiceStream.d.ts +4 -1
  221. package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
  222. package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
  223. package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
  224. package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
  225. package/dist/workflowContract.d.ts +91 -0
  226. package/package.json +1 -1
@@ -0,0 +1,99 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type StoredVoiceAuditEvent, type VoiceAuditEventStore } from './audit';
3
+ import { type VoiceTraceEventStore } from './trace';
4
+ export type VoiceOpsActionAuditRecord = {
5
+ actionId: string;
6
+ body?: unknown;
7
+ error?: string;
8
+ ok: boolean;
9
+ ranAt: number;
10
+ status: number;
11
+ };
12
+ export type VoiceOpsActionAuditRoutesOptions = {
13
+ audit?: VoiceAuditEventStore;
14
+ historyHtmlPath?: false | string;
15
+ historyPath?: false | string;
16
+ name?: string;
17
+ path?: string;
18
+ trace?: VoiceTraceEventStore;
19
+ };
20
+ export type VoiceOpsActionHistoryEntry = {
21
+ actionId: string;
22
+ at: number;
23
+ error?: string;
24
+ eventId: string;
25
+ ok: boolean;
26
+ status?: number;
27
+ traceId?: string;
28
+ };
29
+ export type VoiceOpsActionHistoryReport = {
30
+ checkedAt: number;
31
+ entries: VoiceOpsActionHistoryEntry[];
32
+ failed: number;
33
+ passed: number;
34
+ total: number;
35
+ };
36
+ export declare const recordVoiceOpsActionAudit: (record: VoiceOpsActionAuditRecord, options: Pick<VoiceOpsActionAuditRoutesOptions, "audit" | "trace">) => Promise<{
37
+ audit: StoredVoiceAuditEvent<Record<string, unknown>> | (Omit<import("./audit").VoiceAuditEvent<Record<string, unknown>>, "at" | "id"> & {
38
+ at: number;
39
+ id: string;
40
+ }) | undefined;
41
+ ok: boolean;
42
+ trace: (import("./trace").VoiceTraceEvent<Record<string, unknown>> & {
43
+ id: string;
44
+ }) | undefined;
45
+ }>;
46
+ export declare const createVoiceOpsActionAuditRoutes: (options: VoiceOpsActionAuditRoutesOptions) => Elysia<"", {
47
+ decorator: {};
48
+ store: {};
49
+ derive: {};
50
+ resolve: {};
51
+ }, {
52
+ typebox: {};
53
+ error: {};
54
+ }, {
55
+ schema: {};
56
+ standaloneSchema: {};
57
+ macro: {};
58
+ macroFn: {};
59
+ parser: {};
60
+ response: {};
61
+ }, {
62
+ [x: string]: {
63
+ post: {
64
+ body: unknown;
65
+ params: {};
66
+ query: unknown;
67
+ headers: unknown;
68
+ response: {
69
+ 200: {
70
+ audit: StoredVoiceAuditEvent<Record<string, unknown>> | (Omit<import("./audit").VoiceAuditEvent<Record<string, unknown>>, "at" | "id"> & {
71
+ at: number;
72
+ id: string;
73
+ }) | undefined;
74
+ ok: boolean;
75
+ trace: (import("./trace").VoiceTraceEvent<Record<string, unknown>> & {
76
+ id: string;
77
+ }) | undefined;
78
+ } | {
79
+ error: string;
80
+ ok: boolean;
81
+ };
82
+ };
83
+ };
84
+ };
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 declare const buildVoiceOpsActionHistoryReport: (options: Pick<VoiceOpsActionAuditRoutesOptions, "audit">) => Promise<VoiceOpsActionHistoryReport>;
99
+ export declare const renderVoiceOpsActionHistoryHTML: (report: VoiceOpsActionHistoryReport) => string;
@@ -0,0 +1,80 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type VoiceDeliverySinkReport, type VoiceDeliverySinkRoutesOptions } from './deliverySinkRoutes';
3
+ import { type VoiceQualityReport } from './qualityRoutes';
4
+ import { type VoiceRoutingEvent } from './resilienceRoutes';
5
+ import { type VoiceSessionListItem } from './sessionReplay';
6
+ import { summarizeVoiceTrace, type VoiceTraceEventStore } from './trace';
7
+ export type VoiceOpsConsoleLink = {
8
+ description?: string;
9
+ href: string;
10
+ label: string;
11
+ statusHref?: string;
12
+ };
13
+ export type VoiceOpsConsoleReport = {
14
+ checkedAt: number;
15
+ eventCount: number;
16
+ handoffs: {
17
+ failed: number;
18
+ total: number;
19
+ };
20
+ links: VoiceOpsConsoleLink[];
21
+ deliverySinks?: VoiceDeliverySinkReport;
22
+ providers: {
23
+ degraded: number;
24
+ healthy: number;
25
+ total: number;
26
+ };
27
+ quality: VoiceQualityReport;
28
+ recentRoutingEvents: VoiceRoutingEvent[];
29
+ recentSessions: VoiceSessionListItem[];
30
+ sessions: {
31
+ failed: number;
32
+ healthy: number;
33
+ total: number;
34
+ };
35
+ trace: ReturnType<typeof summarizeVoiceTrace>;
36
+ };
37
+ export type VoiceOpsConsoleRoutesOptions = {
38
+ headers?: HeadersInit;
39
+ deliverySinks?: false | VoiceDeliverySinkRoutesOptions;
40
+ links?: VoiceOpsConsoleLink[];
41
+ llmProviders?: readonly string[];
42
+ name?: string;
43
+ path?: string;
44
+ store: VoiceTraceEventStore;
45
+ sttProviders?: readonly string[];
46
+ title?: string;
47
+ ttsProviders?: readonly string[];
48
+ };
49
+ export declare const buildVoiceOpsConsoleReport: (options: VoiceOpsConsoleRoutesOptions) => Promise<VoiceOpsConsoleReport>;
50
+ export declare const renderVoiceOpsConsoleHTML: (report: VoiceOpsConsoleReport, options?: {
51
+ title?: string;
52
+ }) => string;
53
+ export declare const createVoiceOpsConsoleRoutes: (options: VoiceOpsConsoleRoutesOptions) => Elysia<"", {
54
+ decorator: {};
55
+ store: {};
56
+ derive: {};
57
+ resolve: {};
58
+ }, {
59
+ typebox: {};
60
+ error: {};
61
+ }, {
62
+ schema: {};
63
+ standaloneSchema: {};
64
+ macro: {};
65
+ macroFn: {};
66
+ parser: {};
67
+ response: {};
68
+ }, {}, {
69
+ derive: {};
70
+ resolve: {};
71
+ schema: {};
72
+ standaloneSchema: {};
73
+ response: {};
74
+ }, {
75
+ derive: {};
76
+ resolve: {};
77
+ schema: {};
78
+ standaloneSchema: {};
79
+ response: {};
80
+ }>;
@@ -0,0 +1,137 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type VoiceAuditSinkDeliveryQueueSummary, type VoiceAuditSinkDeliveryStore } from './auditSinks';
3
+ import { type VoiceLatencySLOGateOptions, type VoiceLatencySLOGateReport } from './latencySlo';
4
+ import { type VoiceHandoffDeliveryQueueSummary, type VoiceTraceSinkDeliveryQueueSummary } from './queue';
5
+ import { type VoiceProviderHealthSummary } from './providerHealth';
6
+ import type { VoiceProductionReadinessCheck } from './productionReadiness';
7
+ import type { VoiceHandoffDeliveryStore } from './types';
8
+ import type { StoredVoiceTraceEvent, VoiceTraceEventStore, VoiceTraceSinkDeliveryStore } from './trace';
9
+ export type VoiceOpsRecoveryStatus = 'fail' | 'pass' | 'warn';
10
+ export type VoiceOpsRecoveryIssueCode = 'voice.ops_recovery.audit_delivery_failed' | 'voice.ops_recovery.audit_delivery_pending' | 'voice.ops_recovery.handoff_failed' | 'voice.ops_recovery.handoff_pending' | 'voice.ops_recovery.latency_slo_failed' | 'voice.ops_recovery.latency_slo_warn' | 'voice.ops_recovery.provider_unresolved_failure' | 'voice.ops_recovery.trace_delivery_failed' | 'voice.ops_recovery.trace_delivery_pending';
11
+ export type VoiceOpsRecoveryIssue = {
12
+ code: VoiceOpsRecoveryIssueCode;
13
+ detail?: string;
14
+ href?: string;
15
+ label: string;
16
+ severity: Exclude<VoiceOpsRecoveryStatus, 'pass'>;
17
+ value?: number | string;
18
+ };
19
+ export type VoiceOpsRecoveryProviderSummary<TProvider extends string = string> = {
20
+ healthy: number;
21
+ providers: VoiceProviderHealthSummary<TProvider>[];
22
+ recoveredFallbacks: number;
23
+ unresolvedFailures: number;
24
+ };
25
+ export type VoiceOpsRecoveryInterventionSummary = {
26
+ events: Array<{
27
+ action?: string;
28
+ at: number;
29
+ operatorId?: string;
30
+ sessionId: string;
31
+ traceId?: string;
32
+ }>;
33
+ total: number;
34
+ };
35
+ export type VoiceOpsRecoveryFailedSession = {
36
+ at: number;
37
+ error?: string;
38
+ operationsRecordHref?: string;
39
+ provider?: string;
40
+ sessionId: string;
41
+ traceId?: string;
42
+ };
43
+ export type VoiceOpsRecoveryReport<TProvider extends string = string> = {
44
+ auditDeliveries?: VoiceAuditSinkDeliveryQueueSummary;
45
+ checkedAt: number;
46
+ failedSessions: VoiceOpsRecoveryFailedSession[];
47
+ handoffDeliveries?: VoiceHandoffDeliveryQueueSummary;
48
+ interventions: VoiceOpsRecoveryInterventionSummary;
49
+ issues: VoiceOpsRecoveryIssue[];
50
+ latency?: VoiceLatencySLOGateReport;
51
+ providers: VoiceOpsRecoveryProviderSummary<TProvider>;
52
+ status: VoiceOpsRecoveryStatus;
53
+ traceDeliveries?: VoiceTraceSinkDeliveryQueueSummary;
54
+ };
55
+ export type VoiceOpsRecoveryLinks = {
56
+ auditDeliveries?: string;
57
+ handoffs?: string;
58
+ operationsRecords?: string | ((sessionId: string) => string);
59
+ providers?: string;
60
+ sessions?: string | ((sessionId: string) => string);
61
+ traceDeliveries?: string;
62
+ traces?: string | ((sessionId: string) => string);
63
+ };
64
+ export type VoiceOpsRecoveryReportOptions<TProvider extends string = string> = {
65
+ auditDeliveryDeadLetters?: VoiceAuditSinkDeliveryStore;
66
+ auditDeliveries?: VoiceAuditSinkDeliveryStore;
67
+ events?: StoredVoiceTraceEvent[];
68
+ handoffDeliveryDeadLetters?: VoiceHandoffDeliveryStore;
69
+ handoffDeliveries?: VoiceHandoffDeliveryStore;
70
+ latency?: VoiceLatencySLOGateOptions | false;
71
+ limit?: number;
72
+ links?: VoiceOpsRecoveryLinks;
73
+ providers?: readonly TProvider[];
74
+ traceDeliveryDeadLetters?: VoiceTraceSinkDeliveryStore;
75
+ traceDeliveries?: VoiceTraceSinkDeliveryStore;
76
+ traces?: VoiceTraceEventStore;
77
+ };
78
+ export type VoiceOpsRecoveryRoutesOptions<TProvider extends string = string> = VoiceOpsRecoveryReportOptions<TProvider> & {
79
+ headers?: HeadersInit;
80
+ htmlPath?: false | string;
81
+ markdownPath?: false | string;
82
+ name?: string;
83
+ path?: string;
84
+ render?: (report: VoiceOpsRecoveryReport<TProvider>) => string | Promise<string>;
85
+ title?: string;
86
+ };
87
+ export declare const buildVoiceOpsRecoveryReport: <TProvider extends string = string>(options?: VoiceOpsRecoveryReportOptions<TProvider>) => Promise<VoiceOpsRecoveryReport<TProvider>>;
88
+ export declare const buildVoiceOpsRecoveryReadinessCheck: (report: VoiceOpsRecoveryReport, options?: {
89
+ href?: string;
90
+ label?: string;
91
+ }) => VoiceProductionReadinessCheck;
92
+ export declare const renderVoiceOpsRecoveryMarkdown: (report: VoiceOpsRecoveryReport, options?: {
93
+ title?: string;
94
+ }) => string;
95
+ export declare const renderVoiceOpsRecoveryHTML: (report: VoiceOpsRecoveryReport, options?: {
96
+ title?: string;
97
+ }) => string;
98
+ export declare const createVoiceOpsRecoveryRoutes: <TProvider extends string = string>(options?: VoiceOpsRecoveryRoutesOptions<TProvider>) => Elysia<"", {
99
+ decorator: {};
100
+ store: {};
101
+ derive: {};
102
+ resolve: {};
103
+ }, {
104
+ typebox: {};
105
+ error: {};
106
+ }, {
107
+ schema: {};
108
+ standaloneSchema: {};
109
+ macro: {};
110
+ macroFn: {};
111
+ parser: {};
112
+ response: {};
113
+ }, {
114
+ [x: string]: {
115
+ get: {
116
+ body: unknown;
117
+ params: {};
118
+ query: unknown;
119
+ headers: unknown;
120
+ response: {
121
+ 200: VoiceOpsRecoveryReport<TProvider>;
122
+ };
123
+ };
124
+ };
125
+ }, {
126
+ derive: {};
127
+ resolve: {};
128
+ schema: {};
129
+ standaloneSchema: {};
130
+ response: {};
131
+ }, {
132
+ derive: {};
133
+ resolve: {};
134
+ schema: {};
135
+ standaloneSchema: {};
136
+ response: {};
137
+ }>;
@@ -0,0 +1,76 @@
1
+ import { type VoiceEvalLink, type VoiceEvalRoutesOptions } from './evalRoutes';
2
+ import { type VoiceDeliverySinkRoutesOptions } from './deliverySinkRoutes';
3
+ import { type VoiceQualityRoutesOptions } from './qualityRoutes';
4
+ import { type VoiceProviderFallbackRecoverySummary } from './sessionReplay';
5
+ import { type VoiceTraceEventStore } from './trace';
6
+ export type VoiceOpsStatus = 'pass' | 'fail';
7
+ export type VoiceOpsStatusLink = VoiceEvalLink & {
8
+ description?: string;
9
+ statusHref?: string;
10
+ };
11
+ export type VoiceOpsStatusOptions<TProvider extends string = string> = {
12
+ deliverySinks?: false | VoiceDeliverySinkRoutesOptions;
13
+ evals?: false | Partial<VoiceEvalRoutesOptions>;
14
+ include?: {
15
+ deliverySinks?: boolean;
16
+ handoffs?: boolean;
17
+ providers?: boolean;
18
+ providerRecovery?: boolean;
19
+ quality?: boolean;
20
+ sessions?: boolean;
21
+ workflows?: boolean;
22
+ };
23
+ links?: VoiceOpsStatusLink[];
24
+ llmProviders?: readonly TProvider[];
25
+ preferFixtureWorkflows?: boolean;
26
+ quality?: false | Partial<VoiceQualityRoutesOptions>;
27
+ store: VoiceTraceEventStore;
28
+ sttProviders?: readonly string[];
29
+ ttsProviders?: readonly string[];
30
+ };
31
+ export type VoiceOpsStatusReport = {
32
+ checkedAt: number;
33
+ failed: number;
34
+ links: VoiceOpsStatusLink[];
35
+ passed: number;
36
+ status: VoiceOpsStatus;
37
+ surfaces: {
38
+ handoffs?: {
39
+ failed: number;
40
+ status: VoiceOpsStatus;
41
+ total: number;
42
+ };
43
+ deliverySinks?: {
44
+ auditTotal: number;
45
+ status: VoiceOpsStatus;
46
+ traceTotal: number;
47
+ };
48
+ providers?: {
49
+ degraded: number;
50
+ status: VoiceOpsStatus;
51
+ total: number;
52
+ };
53
+ providerRecovery?: VoiceProviderFallbackRecoverySummary;
54
+ quality?: {
55
+ status: VoiceOpsStatus;
56
+ };
57
+ sessions?: {
58
+ failed: number;
59
+ status: VoiceOpsStatus;
60
+ total: number;
61
+ };
62
+ workflows?: {
63
+ failed: number;
64
+ source: 'fixtures' | 'live';
65
+ status: VoiceOpsStatus;
66
+ total: number;
67
+ };
68
+ };
69
+ total: number;
70
+ };
71
+ export type VoiceOpsStatusRoutesOptions<TProvider extends string = string> = VoiceOpsStatusOptions<TProvider> & {
72
+ headers?: HeadersInit;
73
+ name?: string;
74
+ path?: string;
75
+ };
76
+ export declare const summarizeVoiceOpsStatus: <TProvider extends string = string>(options: VoiceOpsStatusOptions<TProvider>) => Promise<VoiceOpsStatusReport>;
@@ -0,0 +1,33 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type VoiceOpsStatusReport, type VoiceOpsStatusRoutesOptions } from './opsStatus';
3
+ export declare const renderVoiceOpsStatusHTML: (report: VoiceOpsStatusReport, options?: {
4
+ title?: string;
5
+ }) => string;
6
+ export declare const createVoiceOpsStatusRoutes: (options: VoiceOpsStatusRoutesOptions) => Elysia<"", {
7
+ decorator: {};
8
+ store: {};
9
+ derive: {};
10
+ resolve: {};
11
+ }, {
12
+ typebox: {};
13
+ error: {};
14
+ }, {
15
+ schema: {};
16
+ standaloneSchema: {};
17
+ macro: {};
18
+ macroFn: {};
19
+ parser: {};
20
+ response: {};
21
+ }, {}, {
22
+ derive: {};
23
+ resolve: {};
24
+ schema: {};
25
+ standaloneSchema: {};
26
+ response: {};
27
+ }, {
28
+ derive: {};
29
+ resolve: {};
30
+ schema: {};
31
+ standaloneSchema: {};
32
+ response: {};
33
+ }>;
@@ -0,0 +1,115 @@
1
+ import { Elysia } from 'elysia';
2
+ import type { StoredVoiceHandoffDelivery, VoiceCallDisposition, VoiceHandoffAction, VoiceHandoffDeliveryStore, VoiceSessionRecord, VoiceSessionStore } from './types';
3
+ import type { StoredVoiceIntegrationEvent, StoredVoiceOpsTask, VoiceIntegrationEventType } from './ops';
4
+ import type { StoredVoiceCallReviewArtifact } from './testing/review';
5
+ export type VoiceOutcomeContractStatus = 'pass' | 'fail';
6
+ export type VoiceOutcomeContractDefinition = {
7
+ description?: string;
8
+ expectedDisposition?: VoiceCallDisposition;
9
+ id: string;
10
+ label?: string;
11
+ minSessions?: number;
12
+ minTasks?: number;
13
+ requireHandoffActions?: VoiceHandoffAction[];
14
+ requireIntegrationEvents?: VoiceIntegrationEventType[];
15
+ requireReview?: boolean;
16
+ requireTask?: boolean;
17
+ scenarioId?: string;
18
+ };
19
+ export type VoiceOutcomeContractIssue = {
20
+ code: string;
21
+ message: string;
22
+ };
23
+ export type VoiceOutcomeContractReport = {
24
+ contractId: string;
25
+ description?: string;
26
+ issues: VoiceOutcomeContractIssue[];
27
+ label?: string;
28
+ matched: {
29
+ handoffs: number;
30
+ integrationEvents: number;
31
+ reviews: number;
32
+ sessions: number;
33
+ tasks: number;
34
+ };
35
+ operationsRecordHrefs: string[];
36
+ pass: boolean;
37
+ sessionIds: string[];
38
+ };
39
+ export type VoiceOutcomeContractSuiteReport = {
40
+ checkedAt: number;
41
+ contracts: VoiceOutcomeContractReport[];
42
+ failed: number;
43
+ passed: number;
44
+ status: VoiceOutcomeContractStatus;
45
+ total: number;
46
+ };
47
+ type ListStore<T> = {
48
+ list: () => Promise<T[]> | T[];
49
+ };
50
+ export type VoiceOutcomeContractOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = {
51
+ contracts: VoiceOutcomeContractDefinition[];
52
+ events?: StoredVoiceIntegrationEvent[] | ListStore<StoredVoiceIntegrationEvent>;
53
+ handoffs?: StoredVoiceHandoffDelivery[] | VoiceHandoffDeliveryStore;
54
+ operationsRecordHref?: false | string | ((sessionId: string) => string);
55
+ reviews?: StoredVoiceCallReviewArtifact[] | ListStore<StoredVoiceCallReviewArtifact>;
56
+ sessions?: TSession[] | VoiceSessionStore<TSession>;
57
+ tasks?: StoredVoiceOpsTask[] | ListStore<StoredVoiceOpsTask>;
58
+ };
59
+ export type VoiceOutcomeContractHTMLHandlerOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = VoiceOutcomeContractOptions<TSession> & {
60
+ headers?: HeadersInit;
61
+ render?: (report: VoiceOutcomeContractSuiteReport) => string | Promise<string>;
62
+ title?: string;
63
+ };
64
+ export type VoiceOutcomeContractRoutesOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = VoiceOutcomeContractHTMLHandlerOptions<TSession> & {
65
+ htmlPath?: false | string;
66
+ name?: string;
67
+ path?: string;
68
+ };
69
+ export declare const runVoiceOutcomeContractSuite: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceOutcomeContractOptions<TSession>) => Promise<VoiceOutcomeContractSuiteReport>;
70
+ export declare const renderVoiceOutcomeContractHTML: (report: VoiceOutcomeContractSuiteReport, options?: {
71
+ title?: string;
72
+ }) => string;
73
+ export declare const createVoiceOutcomeContractJSONHandler: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceOutcomeContractOptions<TSession>) => () => Promise<VoiceOutcomeContractSuiteReport>;
74
+ export declare const createVoiceOutcomeContractHTMLHandler: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceOutcomeContractHTMLHandlerOptions<TSession>) => () => Promise<Response>;
75
+ export declare const createVoiceOutcomeContractRoutes: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceOutcomeContractRoutesOptions<TSession>) => Elysia<"", {
76
+ decorator: {};
77
+ store: {};
78
+ derive: {};
79
+ resolve: {};
80
+ }, {
81
+ typebox: {};
82
+ error: {};
83
+ }, {
84
+ schema: {};
85
+ standaloneSchema: {};
86
+ macro: {};
87
+ macroFn: {};
88
+ parser: {};
89
+ response: {};
90
+ }, {
91
+ [x: string]: {
92
+ get: {
93
+ body: unknown;
94
+ params: {};
95
+ query: unknown;
96
+ headers: unknown;
97
+ response: {
98
+ 200: VoiceOutcomeContractSuiteReport;
99
+ };
100
+ };
101
+ };
102
+ }, {
103
+ derive: {};
104
+ resolve: {};
105
+ schema: {};
106
+ standaloneSchema: {};
107
+ response: {};
108
+ }, {
109
+ derive: {};
110
+ resolve: {};
111
+ schema: {};
112
+ standaloneSchema: {};
113
+ response: {};
114
+ }>;
115
+ export {};
@@ -0,0 +1,76 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type PlivoVoiceRoutesOptions } from './telephony/plivo';
3
+ import { type TelnyxVoiceRoutesOptions } from './telephony/telnyx';
4
+ import { type TwilioVoiceRoutesOptions } from './telephony/twilio';
5
+ import { type VoiceTelephonyCarrierMatrix, type VoiceTelephonyCarrierMatrixRoutesOptions } from './telephony/matrix';
6
+ import { type VoicePhoneAgentProductionSmokeRoutesOptions } from './phoneAgentProductionSmoke';
7
+ import type { VoiceSessionRecord } from './types';
8
+ export type VoicePhoneAgentLifecycleStage = 'ringing' | 'answered' | 'media-started' | 'transcript' | 'assistant-response' | 'transfer' | 'voicemail' | 'no-answer' | 'completed' | 'failed';
9
+ type VoicePhoneAgentCarrierBase = {
10
+ name?: string;
11
+ smokePath?: false | string;
12
+ setupPath?: false | string;
13
+ };
14
+ export type VoicePhoneAgentTwilioCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentCarrierBase & {
15
+ options: TwilioVoiceRoutesOptions<TContext, TSession, TResult>;
16
+ provider: 'twilio';
17
+ };
18
+ export type VoicePhoneAgentTelnyxCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentCarrierBase & {
19
+ options?: TelnyxVoiceRoutesOptions<TContext, TSession, TResult>;
20
+ provider: 'telnyx';
21
+ };
22
+ export type VoicePhoneAgentPlivoCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentCarrierBase & {
23
+ options?: PlivoVoiceRoutesOptions<TContext, TSession, TResult>;
24
+ provider: 'plivo';
25
+ };
26
+ export type VoicePhoneAgentCarrier<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoicePhoneAgentTwilioCarrier<TContext, TSession, TResult> | VoicePhoneAgentTelnyxCarrier<TContext, TSession, TResult> | VoicePhoneAgentPlivoCarrier<TContext, TSession, TResult>;
27
+ export type VoicePhoneAgentRoutesOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
28
+ carriers: readonly VoicePhoneAgentCarrier<TContext, TSession, TResult>[];
29
+ matrix?: false | Omit<VoiceTelephonyCarrierMatrixRoutesOptions, 'load'>;
30
+ name?: string;
31
+ productionSmoke?: false | VoicePhoneAgentProductionSmokeRoutesOptions;
32
+ setup?: false | {
33
+ path?: string;
34
+ title?: string;
35
+ };
36
+ };
37
+ export type VoicePhoneAgentCarrierSummary = {
38
+ name?: string;
39
+ provider: 'plivo' | 'telnyx' | 'twilio';
40
+ setupPath?: false | string;
41
+ smokePath?: false | string;
42
+ };
43
+ export type VoicePhoneAgentSetupInstruction = {
44
+ answerLabel: string;
45
+ answerUrl?: string;
46
+ carrierName: string;
47
+ issues: string[];
48
+ provider: 'plivo' | 'telnyx' | 'twilio';
49
+ setupPath?: false | string;
50
+ smokePath?: false | string;
51
+ status: 'fail' | 'pass' | 'unknown' | 'warn';
52
+ steps: string[];
53
+ streamUrl?: string;
54
+ webhookUrl?: string;
55
+ };
56
+ export type VoicePhoneAgentRoutes = {
57
+ carriers: VoicePhoneAgentCarrierSummary[];
58
+ matrixPath?: string;
59
+ productionSmokePath?: string;
60
+ routes: Elysia;
61
+ setupPath?: string;
62
+ };
63
+ export type VoicePhoneAgentSetupReport = {
64
+ carriers: VoicePhoneAgentCarrierSummary[];
65
+ generatedAt: number;
66
+ lifecycleStages: VoicePhoneAgentLifecycleStage[];
67
+ matrix?: VoiceTelephonyCarrierMatrix;
68
+ matrixPath?: string;
69
+ productionSmokePath?: string;
70
+ ready: boolean;
71
+ setupInstructions: VoicePhoneAgentSetupInstruction[];
72
+ setupPath?: string;
73
+ title: string;
74
+ };
75
+ export declare const createVoicePhoneAgent: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(options: VoicePhoneAgentRoutesOptions<TContext, TSession, TResult>) => VoicePhoneAgentRoutes;
76
+ export {};