@absolutejs/voice 0.0.22-beta.19 → 0.0.22-beta.190
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.
- package/README.md +1097 -5
- package/dist/agent.d.ts +46 -0
- package/dist/agentSquadContract.d.ts +69 -0
- package/dist/angular/index.d.ts +12 -0
- package/dist/angular/index.js +3036 -1111
- package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
- package/dist/angular/voice-controller.service.d.ts +1 -0
- package/dist/angular/voice-delivery-runtime.component.d.ts +17 -0
- package/dist/angular/voice-delivery-runtime.service.d.ts +16 -0
- package/dist/angular/voice-live-ops.service.d.ts +11 -0
- package/dist/angular/voice-ops-action-center.service.d.ts +13 -0
- package/dist/angular/voice-ops-status.component.d.ts +15 -0
- package/dist/angular/voice-ops-status.service.d.ts +12 -0
- package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
- package/dist/angular/voice-provider-contracts.service.d.ts +12 -0
- package/dist/angular/voice-routing-status.service.d.ts +11 -0
- package/dist/angular/voice-stream.service.d.ts +3 -0
- package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
- package/dist/angular/voice-turn-latency.service.d.ts +13 -0
- package/dist/angular/voice-turn-quality.service.d.ts +12 -0
- package/dist/angular/voice-workflow-status.service.d.ts +12 -0
- package/dist/assistantHealth.d.ts +2 -0
- package/dist/audit.d.ts +128 -0
- package/dist/auditDeliveryRoutes.d.ts +85 -0
- package/dist/auditExport.d.ts +34 -0
- package/dist/auditRoutes.d.ts +66 -0
- package/dist/auditSinks.d.ts +151 -0
- package/dist/bargeInRoutes.d.ts +56 -0
- package/dist/campaign.d.ts +610 -0
- package/dist/campaignDialers.d.ts +90 -0
- package/dist/client/actions.d.ts +105 -0
- package/dist/client/bargeInMonitor.d.ts +7 -0
- package/dist/client/campaignDialerProof.d.ts +23 -0
- package/dist/client/connection.d.ts +3 -0
- package/dist/client/deliveryRuntime.d.ts +34 -0
- package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
- package/dist/client/duplex.d.ts +1 -1
- package/dist/client/htmxBootstrap.js +747 -15
- package/dist/client/index.d.ts +58 -0
- package/dist/client/index.js +4235 -20
- package/dist/client/liveOps.d.ts +22 -0
- package/dist/client/liveOpsWidget.d.ts +23 -0
- package/dist/client/liveTurnLatency.d.ts +41 -0
- package/dist/client/opsActionCenter.d.ts +54 -0
- package/dist/client/opsActionCenterWidget.d.ts +29 -0
- package/dist/client/opsActionHistory.d.ts +19 -0
- package/dist/client/opsActionHistoryWidget.d.ts +11 -0
- package/dist/client/opsStatus.d.ts +19 -0
- package/dist/client/opsStatusWidget.d.ts +40 -0
- package/dist/client/providerCapabilities.d.ts +19 -0
- package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
- package/dist/client/providerContracts.d.ts +19 -0
- package/dist/client/providerContractsWidget.d.ts +37 -0
- package/dist/client/providerSimulationControls.d.ts +33 -0
- package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
- package/dist/client/providerStatusWidget.d.ts +32 -0
- package/dist/client/routingStatus.d.ts +19 -0
- package/dist/client/routingStatusWidget.d.ts +28 -0
- package/dist/client/traceTimeline.d.ts +19 -0
- package/dist/client/traceTimelineWidget.d.ts +36 -0
- package/dist/client/turnLatency.d.ts +22 -0
- package/dist/client/turnLatencyWidget.d.ts +33 -0
- package/dist/client/turnQuality.d.ts +19 -0
- package/dist/client/turnQualityWidget.d.ts +32 -0
- package/dist/client/workflowStatus.d.ts +19 -0
- package/dist/dataControl.d.ts +49 -0
- package/dist/deliveryRuntime.d.ts +158 -0
- package/dist/deliverySinkRoutes.d.ts +117 -0
- package/dist/demoReadyRoutes.d.ts +98 -0
- package/dist/diagnosticsRoutes.d.ts +44 -0
- package/dist/evalRoutes.d.ts +213 -0
- package/dist/fileStore.d.ts +14 -2
- package/dist/handoff.d.ts +54 -0
- package/dist/handoffHealth.d.ts +94 -0
- package/dist/incidentBundle.d.ts +116 -0
- package/dist/index.d.ts +118 -11
- package/dist/index.js +19502 -4373
- package/dist/liveLatency.d.ts +78 -0
- package/dist/liveOps.d.ts +122 -0
- package/dist/modelAdapters.d.ts +23 -2
- package/dist/openaiRealtime.d.ts +27 -0
- package/dist/openaiTTS.d.ts +18 -0
- package/dist/operationsRecord.d.ts +102 -0
- package/dist/opsActionAuditRoutes.d.ts +99 -0
- package/dist/opsConsoleRoutes.d.ts +80 -0
- package/dist/opsStatus.d.ts +76 -0
- package/dist/opsStatusRoutes.d.ts +33 -0
- package/dist/opsWebhook.d.ts +126 -0
- package/dist/outcomeContract.d.ts +112 -0
- package/dist/phoneAgent.d.ts +62 -0
- package/dist/phoneAgentProductionSmoke.d.ts +115 -0
- package/dist/postgresStore.d.ts +13 -2
- package/dist/productionReadiness.d.ts +383 -0
- package/dist/providerAdapters.d.ts +48 -0
- package/dist/providerCapabilities.d.ts +92 -0
- package/dist/providerHealth.d.ts +1 -0
- package/dist/providerRoutingContract.d.ts +38 -0
- package/dist/providerStackRecommendations.d.ts +145 -0
- package/dist/qualityRoutes.d.ts +76 -0
- package/dist/queue.d.ts +61 -0
- package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
- package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
- package/dist/react/VoiceOpsStatus.d.ts +6 -0
- package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
- package/dist/react/VoiceProviderContracts.d.ts +6 -0
- package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
- package/dist/react/VoiceProviderStatus.d.ts +6 -0
- package/dist/react/VoiceRoutingStatus.d.ts +6 -0
- package/dist/react/VoiceTraceTimeline.d.ts +6 -0
- package/dist/react/VoiceTurnLatency.d.ts +6 -0
- package/dist/react/VoiceTurnQuality.d.ts +6 -0
- package/dist/react/index.d.ts +24 -0
- package/dist/react/index.js +3822 -33
- package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
- package/dist/react/useVoiceController.d.ts +3 -0
- package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/react/useVoiceLiveOps.d.ts +9 -0
- package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/react/useVoiceOpsStatus.d.ts +8 -0
- package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
- package/dist/react/useVoiceProviderContracts.d.ts +8 -0
- package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
- package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/react/useVoiceStream.d.ts +3 -0
- package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
- package/dist/react/useVoiceTurnLatency.d.ts +9 -0
- package/dist/react/useVoiceTurnQuality.d.ts +8 -0
- package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
- package/dist/readinessProfiles.d.ts +35 -0
- package/dist/reconnectContract.d.ts +87 -0
- package/dist/resilienceRoutes.d.ts +142 -0
- package/dist/sessionReplay.d.ts +185 -0
- package/dist/simulationSuite.d.ts +120 -0
- package/dist/sqliteStore.d.ts +13 -2
- package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
- package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
- package/dist/svelte/createVoiceLiveOps.d.ts +13 -0
- package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
- package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
- package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
- package/dist/svelte/createVoiceProviderContracts.d.ts +10 -0
- package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
- package/dist/svelte/createVoiceProviderStatus.d.ts +4 -2
- package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
- package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
- package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
- package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
- package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
- package/dist/svelte/index.d.ts +13 -0
- package/dist/svelte/index.js +4394 -439
- package/dist/telephony/contract.d.ts +61 -0
- package/dist/telephony/matrix.d.ts +97 -0
- package/dist/telephony/plivo.d.ts +254 -0
- package/dist/telephony/telnyx.d.ts +247 -0
- package/dist/telephony/twilio.d.ts +135 -2
- package/dist/telephonyOutcome.d.ts +201 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.js +2008 -69
- package/dist/testing/ioProviderSimulator.d.ts +41 -0
- package/dist/testing/providerSimulator.d.ts +8 -0
- package/dist/toolContract.d.ts +130 -0
- package/dist/toolRuntime.d.ts +50 -0
- package/dist/trace.d.ts +19 -1
- package/dist/traceDeliveryRoutes.d.ts +86 -0
- package/dist/traceTimeline.d.ts +93 -0
- package/dist/turnLatency.d.ts +95 -0
- package/dist/turnQuality.d.ts +94 -0
- package/dist/types.d.ts +170 -4
- package/dist/vue/VoiceDeliveryRuntime.d.ts +30 -0
- package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
- package/dist/vue/VoiceOpsStatus.d.ts +30 -0
- package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
- package/dist/vue/VoiceProviderContracts.d.ts +21 -0
- package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
- package/dist/vue/VoiceProviderStatus.d.ts +51 -0
- package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
- package/dist/vue/VoiceTurnLatency.d.ts +69 -0
- package/dist/vue/VoiceTurnQuality.d.ts +51 -0
- package/dist/vue/index.d.ts +23 -0
- package/dist/vue/index.js +3738 -53
- package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
- package/dist/vue/useVoiceController.d.ts +2 -1
- package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/vue/useVoiceLiveOps.d.ts +9 -0
- package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
- package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
- package/dist/vue/useVoiceProviderContracts.d.ts +9 -0
- package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
- package/dist/vue/useVoiceProviderStatus.d.ts +1 -1
- package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/vue/useVoiceStream.d.ts +4 -1
- package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
- package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
- package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
- package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
- package/dist/workflowContract.d.ts +91 -0
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import type { VoiceTraceEventStore } from './trace';
|
|
3
|
+
export type VoiceLiveLatencyStatus = 'empty' | 'fail' | 'pass' | 'warn';
|
|
4
|
+
export type VoiceLiveLatencySample = {
|
|
5
|
+
at: number;
|
|
6
|
+
latencyMs: number;
|
|
7
|
+
sessionId: string;
|
|
8
|
+
status?: string;
|
|
9
|
+
traceId?: string;
|
|
10
|
+
};
|
|
11
|
+
export type VoiceLiveLatencyReport = {
|
|
12
|
+
averageLatencyMs?: number;
|
|
13
|
+
checkedAt: number;
|
|
14
|
+
failed: number;
|
|
15
|
+
p50LatencyMs?: number;
|
|
16
|
+
p95LatencyMs?: number;
|
|
17
|
+
recent: VoiceLiveLatencySample[];
|
|
18
|
+
status: VoiceLiveLatencyStatus;
|
|
19
|
+
total: number;
|
|
20
|
+
warnings: number;
|
|
21
|
+
};
|
|
22
|
+
export type VoiceLiveLatencyOptions = {
|
|
23
|
+
failAfterMs?: number;
|
|
24
|
+
limit?: number;
|
|
25
|
+
store: VoiceTraceEventStore;
|
|
26
|
+
warnAfterMs?: number;
|
|
27
|
+
};
|
|
28
|
+
export type VoiceLiveLatencyRoutesOptions = VoiceLiveLatencyOptions & {
|
|
29
|
+
headers?: HeadersInit;
|
|
30
|
+
htmlPath?: false | string;
|
|
31
|
+
name?: string;
|
|
32
|
+
path?: string;
|
|
33
|
+
title?: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const summarizeVoiceLiveLatency: (options: VoiceLiveLatencyOptions) => Promise<VoiceLiveLatencyReport>;
|
|
36
|
+
export declare const renderVoiceLiveLatencyHTML: (report: VoiceLiveLatencyReport, options?: {
|
|
37
|
+
title?: string;
|
|
38
|
+
}) => string;
|
|
39
|
+
export declare const createVoiceLiveLatencyRoutes: (options: VoiceLiveLatencyRoutesOptions) => Elysia<"", {
|
|
40
|
+
decorator: {};
|
|
41
|
+
store: {};
|
|
42
|
+
derive: {};
|
|
43
|
+
resolve: {};
|
|
44
|
+
}, {
|
|
45
|
+
typebox: {};
|
|
46
|
+
error: {};
|
|
47
|
+
}, {
|
|
48
|
+
schema: {};
|
|
49
|
+
standaloneSchema: {};
|
|
50
|
+
macro: {};
|
|
51
|
+
macroFn: {};
|
|
52
|
+
parser: {};
|
|
53
|
+
response: {};
|
|
54
|
+
}, {
|
|
55
|
+
[x: string]: {
|
|
56
|
+
get: {
|
|
57
|
+
body: unknown;
|
|
58
|
+
params: {};
|
|
59
|
+
query: unknown;
|
|
60
|
+
headers: unknown;
|
|
61
|
+
response: {
|
|
62
|
+
200: VoiceLiveLatencyReport;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
derive: {};
|
|
68
|
+
resolve: {};
|
|
69
|
+
schema: {};
|
|
70
|
+
standaloneSchema: {};
|
|
71
|
+
response: {};
|
|
72
|
+
}, {
|
|
73
|
+
derive: {};
|
|
74
|
+
resolve: {};
|
|
75
|
+
schema: {};
|
|
76
|
+
standaloneSchema: {};
|
|
77
|
+
response: {};
|
|
78
|
+
}>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceAuditEventStore } from './audit';
|
|
3
|
+
import { type VoiceTraceEventStore } from './trace';
|
|
4
|
+
export declare const VOICE_LIVE_OPS_ACTIONS: readonly ["assign", "create-task", "escalate", "force-handoff", "inject-instruction", "operator-takeover", "pause-assistant", "resume-assistant", "tag"];
|
|
5
|
+
export type VoiceLiveOpsAction = (typeof VOICE_LIVE_OPS_ACTIONS)[number];
|
|
6
|
+
export type VoiceLiveOpsControlStatus = 'assistant-paused' | 'assistant-resumed' | 'handoff-forced' | 'instruction-injected' | 'operator-takeover' | 'recorded';
|
|
7
|
+
export type VoiceLiveOpsControlState = {
|
|
8
|
+
assistantPaused: boolean;
|
|
9
|
+
handoffTarget?: string;
|
|
10
|
+
injectedInstruction?: string;
|
|
11
|
+
lastAction: VoiceLiveOpsAction;
|
|
12
|
+
lastUpdatedAt: number;
|
|
13
|
+
operator?: string;
|
|
14
|
+
operatorTakeover: boolean;
|
|
15
|
+
status: VoiceLiveOpsControlStatus;
|
|
16
|
+
tag?: string;
|
|
17
|
+
};
|
|
18
|
+
export type VoiceLiveOpsActionInput = {
|
|
19
|
+
action: VoiceLiveOpsAction;
|
|
20
|
+
assignee?: string;
|
|
21
|
+
detail?: string;
|
|
22
|
+
sessionId: string;
|
|
23
|
+
tag?: string;
|
|
24
|
+
};
|
|
25
|
+
export type VoiceLiveOpsActionResult = {
|
|
26
|
+
action: VoiceLiveOpsAction;
|
|
27
|
+
control: VoiceLiveOpsControlState;
|
|
28
|
+
ok: true;
|
|
29
|
+
sessionId: string;
|
|
30
|
+
};
|
|
31
|
+
export type VoiceLiveOpsControlStore = {
|
|
32
|
+
get: (sessionId: string) => Promise<VoiceLiveOpsControlState | undefined> | VoiceLiveOpsControlState | undefined;
|
|
33
|
+
set: (sessionId: string, state: VoiceLiveOpsControlState) => Promise<void> | void;
|
|
34
|
+
};
|
|
35
|
+
export type VoiceLiveOpsControllerOptions = {
|
|
36
|
+
audit?: VoiceAuditEventStore;
|
|
37
|
+
defaultAssignee?: string;
|
|
38
|
+
defaultDetail?: string;
|
|
39
|
+
defaultTag?: string;
|
|
40
|
+
onAction?: (result: VoiceLiveOpsActionResult & {
|
|
41
|
+
assignee: string;
|
|
42
|
+
detail: string;
|
|
43
|
+
tag: string;
|
|
44
|
+
}) => Promise<void> | void;
|
|
45
|
+
store?: VoiceLiveOpsControlStore;
|
|
46
|
+
trace?: VoiceTraceEventStore;
|
|
47
|
+
};
|
|
48
|
+
export type VoiceLiveOpsRoutesOptions = VoiceLiveOpsControllerOptions & {
|
|
49
|
+
controlPath?: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
path?: string;
|
|
52
|
+
};
|
|
53
|
+
export declare const createVoiceMemoryLiveOpsControlStore: () => VoiceLiveOpsControlStore;
|
|
54
|
+
export declare const getVoiceLiveOpsControlStatus: (action: VoiceLiveOpsAction) => VoiceLiveOpsControlStatus;
|
|
55
|
+
export declare const buildVoiceLiveOpsControlState: (input: VoiceLiveOpsActionInput & {
|
|
56
|
+
at?: number;
|
|
57
|
+
previous?: VoiceLiveOpsControlState;
|
|
58
|
+
}) => VoiceLiveOpsControlState;
|
|
59
|
+
export declare const createVoiceLiveOpsController: (options?: VoiceLiveOpsControllerOptions) => {
|
|
60
|
+
get: (sessionId: string) => VoiceLiveOpsControlState | Promise<VoiceLiveOpsControlState | undefined> | undefined;
|
|
61
|
+
perform: (input: VoiceLiveOpsActionInput) => Promise<VoiceLiveOpsActionResult>;
|
|
62
|
+
store: VoiceLiveOpsControlStore;
|
|
63
|
+
};
|
|
64
|
+
export declare const createVoiceLiveOpsRoutes: (options?: VoiceLiveOpsRoutesOptions) => Elysia<"", {
|
|
65
|
+
decorator: {};
|
|
66
|
+
store: {};
|
|
67
|
+
derive: {};
|
|
68
|
+
resolve: {};
|
|
69
|
+
}, {
|
|
70
|
+
typebox: {};
|
|
71
|
+
error: {};
|
|
72
|
+
}, {
|
|
73
|
+
schema: {};
|
|
74
|
+
standaloneSchema: {};
|
|
75
|
+
macro: {};
|
|
76
|
+
macroFn: {};
|
|
77
|
+
parser: {};
|
|
78
|
+
response: {};
|
|
79
|
+
}, {
|
|
80
|
+
[x: string]: {
|
|
81
|
+
post: {
|
|
82
|
+
body: unknown;
|
|
83
|
+
params: {};
|
|
84
|
+
query: unknown;
|
|
85
|
+
headers: unknown;
|
|
86
|
+
response: {
|
|
87
|
+
200: VoiceLiveOpsActionResult | {
|
|
88
|
+
error: string;
|
|
89
|
+
ok: boolean;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
} & {
|
|
95
|
+
[x: string]: {
|
|
96
|
+
get: {
|
|
97
|
+
body: unknown;
|
|
98
|
+
params: {};
|
|
99
|
+
query: unknown;
|
|
100
|
+
headers: unknown;
|
|
101
|
+
response: {
|
|
102
|
+
200: {
|
|
103
|
+
control: VoiceLiveOpsControlState | undefined;
|
|
104
|
+
ok: boolean;
|
|
105
|
+
sessionId: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}, {
|
|
111
|
+
derive: {};
|
|
112
|
+
resolve: {};
|
|
113
|
+
schema: {};
|
|
114
|
+
standaloneSchema: {};
|
|
115
|
+
response: {};
|
|
116
|
+
}, {
|
|
117
|
+
derive: {};
|
|
118
|
+
resolve: {};
|
|
119
|
+
schema: {};
|
|
120
|
+
standaloneSchema: {};
|
|
121
|
+
response: {};
|
|
122
|
+
}>;
|
package/dist/modelAdapters.d.ts
CHANGED
|
@@ -36,9 +36,11 @@ export type GeminiVoiceAssistantModelOptions = {
|
|
|
36
36
|
};
|
|
37
37
|
export type VoiceProviderRouterEvent<TProvider extends string = string> = {
|
|
38
38
|
at: number;
|
|
39
|
+
attempt: number;
|
|
39
40
|
elapsedMs: number;
|
|
40
41
|
error?: string;
|
|
41
42
|
fallbackProvider?: TProvider;
|
|
43
|
+
latencyBudgetMs?: number;
|
|
42
44
|
provider: TProvider;
|
|
43
45
|
providerHealth?: VoiceProviderRouterProviderHealth<TProvider>;
|
|
44
46
|
rateLimited?: boolean;
|
|
@@ -47,18 +49,35 @@ export type VoiceProviderRouterEvent<TProvider extends string = string> = {
|
|
|
47
49
|
suppressionRemainingMs?: number;
|
|
48
50
|
suppressedUntil?: number;
|
|
49
51
|
status: 'error' | 'fallback' | 'success';
|
|
52
|
+
timedOut?: boolean;
|
|
50
53
|
};
|
|
51
54
|
export type VoiceProviderRouterFallbackMode = 'never' | 'provider-error' | 'rate-limit';
|
|
52
|
-
export type
|
|
55
|
+
export type VoiceProviderRouterStrategy = 'balanced' | 'ordered' | 'prefer-cheapest' | 'prefer-fastest' | 'prefer-selected' | 'quality-first';
|
|
56
|
+
export type VoiceProviderRouterPolicyPreset = 'balanced' | 'cost-cap' | 'cost-first' | 'latency-first' | 'quality-first';
|
|
57
|
+
export type VoiceProviderRouterPolicyWeights = {
|
|
58
|
+
cost?: number;
|
|
59
|
+
latencyMs?: number;
|
|
60
|
+
priority?: number;
|
|
61
|
+
quality?: number;
|
|
62
|
+
};
|
|
63
|
+
export type VoiceProviderRouterPolicy<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TProvider extends string = string> = VoiceProviderRouterStrategy | VoiceProviderRouterPolicyPreset | {
|
|
53
64
|
allowProviders?: readonly TProvider[] | ((input: VoiceAgentModelInput<TContext, TSession>) => readonly TProvider[] | Promise<readonly TProvider[]>);
|
|
54
65
|
fallbackMode?: VoiceProviderRouterFallbackMode;
|
|
55
|
-
|
|
66
|
+
maxCost?: number;
|
|
67
|
+
maxLatencyMs?: number;
|
|
68
|
+
minQuality?: number;
|
|
69
|
+
scoreProvider?: (provider: TProvider, profile: VoiceProviderRouterProviderProfile | undefined) => number;
|
|
70
|
+
strategy?: VoiceProviderRouterStrategy;
|
|
71
|
+
weights?: VoiceProviderRouterPolicyWeights;
|
|
56
72
|
};
|
|
57
73
|
export type VoiceProviderRouterProviderProfile = {
|
|
58
74
|
cost?: number;
|
|
59
75
|
latencyMs?: number;
|
|
60
76
|
priority?: number;
|
|
77
|
+
quality?: number;
|
|
78
|
+
timeoutMs?: number;
|
|
61
79
|
};
|
|
80
|
+
export declare const resolveVoiceProviderRoutingPolicyPreset: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TProvider extends string = string>(preset: VoiceProviderRouterPolicyPreset, options?: Omit<Extract<VoiceProviderRouterPolicy<TContext, TSession, TProvider>, Record<string, unknown>>, "strategy">) => Extract<VoiceProviderRouterPolicy<TContext, TSession, TProvider>, Record<string, unknown>>;
|
|
62
81
|
export type VoiceProviderRouterHealthOptions = {
|
|
63
82
|
cooldownMs?: number;
|
|
64
83
|
failureThreshold?: number;
|
|
@@ -79,10 +98,12 @@ export type VoiceProviderRouterOptions<TContext = unknown, TSession extends Voic
|
|
|
79
98
|
fallbackMode?: VoiceProviderRouterFallbackMode;
|
|
80
99
|
isProviderError?: (error: unknown, provider: TProvider) => boolean;
|
|
81
100
|
isRateLimitError?: (error: unknown, provider: TProvider) => boolean;
|
|
101
|
+
isTimeoutError?: (error: unknown, provider: TProvider) => boolean;
|
|
82
102
|
onProviderEvent?: (event: VoiceProviderRouterEvent<TProvider>, input: VoiceAgentModelInput<TContext, TSession>) => Promise<void> | void;
|
|
83
103
|
policy?: VoiceProviderRouterPolicy<TContext, TSession, TProvider>;
|
|
84
104
|
providerHealth?: boolean | VoiceProviderRouterHealthOptions;
|
|
85
105
|
providerProfiles?: Partial<Record<TProvider, VoiceProviderRouterProviderProfile>>;
|
|
106
|
+
timeoutMs?: number;
|
|
86
107
|
providers: Partial<Record<TProvider, VoiceAgentModel<TContext, TSession, TResult>>>;
|
|
87
108
|
selectProvider?: (input: VoiceAgentModelInput<TContext, TSession>) => TProvider | undefined | Promise<TProvider | undefined>;
|
|
88
109
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RealtimeAdapter } from './types';
|
|
2
|
+
export type OpenAIRealtimeModel = 'gpt-realtime' | 'gpt-realtime-mini' | 'gpt-4o-realtime-preview' | 'gpt-4o-mini-realtime-preview' | (string & {});
|
|
3
|
+
export type OpenAIRealtimeVoice = 'alloy' | 'ash' | 'ballad' | 'cedar' | 'coral' | 'echo' | 'marin' | 'sage' | 'shimmer' | 'verse' | {
|
|
4
|
+
id: string;
|
|
5
|
+
} | (string & {});
|
|
6
|
+
export type OpenAIRealtimeTranscriptionModel = 'gpt-4o-mini-transcribe' | 'gpt-4o-transcribe' | 'whisper-1' | (string & {});
|
|
7
|
+
export type OpenAIRealtimeNoiseReduction = 'near_field' | 'far_field';
|
|
8
|
+
export type OpenAIRealtimeResponseMode = 'audio' | 'text';
|
|
9
|
+
export type OpenAIRealtimeAdapterOptions = {
|
|
10
|
+
apiKey: string;
|
|
11
|
+
autoCommitSilenceMs?: number;
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
emitResponseTranscripts?: boolean;
|
|
14
|
+
inputTranscriptionLanguage?: string;
|
|
15
|
+
inputTranscriptionModel?: OpenAIRealtimeTranscriptionModel | null;
|
|
16
|
+
inputTranscriptionPrompt?: string;
|
|
17
|
+
instructions?: string;
|
|
18
|
+
maxOutputTokens?: number | 'inf';
|
|
19
|
+
model?: OpenAIRealtimeModel;
|
|
20
|
+
noiseReduction?: OpenAIRealtimeNoiseReduction;
|
|
21
|
+
responseMode?: OpenAIRealtimeResponseMode;
|
|
22
|
+
speed?: number;
|
|
23
|
+
temperature?: number;
|
|
24
|
+
voice?: OpenAIRealtimeVoice;
|
|
25
|
+
webSocket?: typeof WebSocket;
|
|
26
|
+
};
|
|
27
|
+
export declare const createOpenAIRealtimeAdapter: (options: OpenAIRealtimeAdapterOptions) => RealtimeAdapter;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TTSAdapter, TTSAdapterOpenOptions, VoiceLexiconEntry } from './types';
|
|
2
|
+
export type OpenAIVoiceTTSVoice = 'alloy' | 'ash' | 'ballad' | 'cedar' | 'coral' | 'echo' | 'fable' | 'marin' | 'nova' | 'onyx' | 'sage' | 'shimmer' | 'verse' | (string & {});
|
|
3
|
+
export type OpenAIVoiceTTSOptions = {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
fetch?: typeof fetch;
|
|
7
|
+
instructions?: string | ((input: {
|
|
8
|
+
lexicon?: VoiceLexiconEntry[];
|
|
9
|
+
sessionId: string;
|
|
10
|
+
text: string;
|
|
11
|
+
}) => Promise<string | undefined> | string | undefined);
|
|
12
|
+
model?: 'gpt-4o-mini-tts' | 'tts-1' | 'tts-1-hd' | (string & {});
|
|
13
|
+
speed?: number;
|
|
14
|
+
voice?: OpenAIVoiceTTSVoice | {
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const createOpenAIVoiceTTS: (options: OpenAIVoiceTTSOptions) => TTSAdapter<TTSAdapterOpenOptions>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type StoredVoiceAuditEvent, type VoiceAuditEventStore } from './audit';
|
|
3
|
+
import { type VoiceSessionReplay } from './sessionReplay';
|
|
4
|
+
import { type VoiceTraceTimelineEvent, type VoiceTraceTimelineProviderSummary } from './traceTimeline';
|
|
5
|
+
import { type StoredVoiceTraceEvent, type VoiceTraceEvaluationOptions, type VoiceTraceEventStore, type VoiceTraceRedactionConfig, type VoiceTraceSummary } from './trace';
|
|
6
|
+
export type VoiceOperationsRecordStatus = 'failed' | 'healthy' | 'warning';
|
|
7
|
+
export type VoiceOperationsRecordOutcome = {
|
|
8
|
+
assistantReplies: number;
|
|
9
|
+
complete: boolean;
|
|
10
|
+
escalated: boolean;
|
|
11
|
+
noAnswer: boolean;
|
|
12
|
+
transferred: boolean;
|
|
13
|
+
voicemail: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type VoiceOperationsRecordAgentHandoff = {
|
|
16
|
+
at: number;
|
|
17
|
+
fromAgentId?: string;
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
19
|
+
reason?: string;
|
|
20
|
+
status?: string;
|
|
21
|
+
summary?: string;
|
|
22
|
+
targetAgentId?: string;
|
|
23
|
+
turnId?: string;
|
|
24
|
+
};
|
|
25
|
+
export type VoiceOperationsRecordTool = {
|
|
26
|
+
at: number;
|
|
27
|
+
elapsedMs?: number;
|
|
28
|
+
error?: string;
|
|
29
|
+
status?: string;
|
|
30
|
+
toolCallId?: string;
|
|
31
|
+
toolName?: string;
|
|
32
|
+
turnId?: string;
|
|
33
|
+
};
|
|
34
|
+
export type VoiceOperationsRecordAuditSummary = {
|
|
35
|
+
error: number;
|
|
36
|
+
events: StoredVoiceAuditEvent[];
|
|
37
|
+
skipped: number;
|
|
38
|
+
success: number;
|
|
39
|
+
total: number;
|
|
40
|
+
};
|
|
41
|
+
export type VoiceOperationsRecord = {
|
|
42
|
+
audit?: VoiceOperationsRecordAuditSummary;
|
|
43
|
+
checkedAt: number;
|
|
44
|
+
handoffs: VoiceOperationsRecordAgentHandoff[];
|
|
45
|
+
outcome: VoiceOperationsRecordOutcome;
|
|
46
|
+
providers: VoiceTraceTimelineProviderSummary[];
|
|
47
|
+
replay: VoiceSessionReplay;
|
|
48
|
+
sessionId: string;
|
|
49
|
+
status: VoiceOperationsRecordStatus;
|
|
50
|
+
summary: VoiceTraceSummary;
|
|
51
|
+
timeline: VoiceTraceTimelineEvent[];
|
|
52
|
+
tools: VoiceOperationsRecordTool[];
|
|
53
|
+
traceEvents: StoredVoiceTraceEvent[];
|
|
54
|
+
};
|
|
55
|
+
export type VoiceOperationsRecordOptions = {
|
|
56
|
+
audit?: VoiceAuditEventStore;
|
|
57
|
+
evaluation?: VoiceTraceEvaluationOptions;
|
|
58
|
+
events?: StoredVoiceTraceEvent[];
|
|
59
|
+
redact?: VoiceTraceRedactionConfig;
|
|
60
|
+
sessionId: string;
|
|
61
|
+
store?: VoiceTraceEventStore;
|
|
62
|
+
};
|
|
63
|
+
export type VoiceOperationsRecordRoutesOptions = Omit<VoiceOperationsRecordOptions, 'sessionId'> & {
|
|
64
|
+
headers?: HeadersInit;
|
|
65
|
+
htmlPath?: false | string;
|
|
66
|
+
name?: string;
|
|
67
|
+
path?: string;
|
|
68
|
+
render?: (record: VoiceOperationsRecord) => string | Promise<string>;
|
|
69
|
+
title?: string;
|
|
70
|
+
};
|
|
71
|
+
export declare const buildVoiceOperationsRecord: (options: VoiceOperationsRecordOptions) => Promise<VoiceOperationsRecord>;
|
|
72
|
+
export declare const renderVoiceOperationsRecordHTML: (record: VoiceOperationsRecord, options?: {
|
|
73
|
+
title?: string;
|
|
74
|
+
}) => string;
|
|
75
|
+
export declare const createVoiceOperationsRecordRoutes: (options: VoiceOperationsRecordRoutesOptions) => 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
|
+
derive: {};
|
|
92
|
+
resolve: {};
|
|
93
|
+
schema: {};
|
|
94
|
+
standaloneSchema: {};
|
|
95
|
+
response: {};
|
|
96
|
+
}, {
|
|
97
|
+
derive: {};
|
|
98
|
+
resolve: {};
|
|
99
|
+
schema: {};
|
|
100
|
+
standaloneSchema: {};
|
|
101
|
+
response: {};
|
|
102
|
+
}>;
|
|
@@ -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,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>;
|