@absolutejs/voice 0.0.22-beta.22 → 0.0.22-beta.220
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 +2789 -51
- package/dist/agent.d.ts +62 -0
- package/dist/agentSquadContract.d.ts +69 -0
- package/dist/angular/index.d.ts +13 -0
- package/dist/angular/index.js +3154 -1110
- package/dist/angular/voice-agent-squad-status.service.d.ts +12 -0
- 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/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 +746 -0
- package/dist/campaignDialers.d.ts +90 -0
- package/dist/client/actions.d.ts +105 -0
- package/dist/client/agentSquadStatus.d.ts +37 -0
- package/dist/client/agentSquadStatusWidget.d.ts +24 -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 +62 -0
- package/dist/client/index.js +4407 -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 +140 -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 +219 -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 +126 -13
- package/dist/index.js +22477 -5134
- package/dist/latencySlo.d.ts +56 -0
- package/dist/liveLatency.d.ts +78 -0
- package/dist/liveOps.d.ts +122 -0
- package/dist/modelAdapters.d.ts +23 -2
- package/dist/observabilityExport.d.ts +123 -0
- package/dist/openaiRealtime.d.ts +27 -0
- package/dist/openaiTTS.d.ts +18 -0
- package/dist/operationsRecord.d.ts +158 -0
- package/dist/opsActionAuditRoutes.d.ts +99 -0
- package/dist/opsConsoleRoutes.d.ts +80 -0
- package/dist/opsRecovery.d.ts +137 -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 +115 -0
- package/dist/phoneAgent.d.ts +76 -0
- package/dist/phoneAgentProductionSmoke.d.ts +115 -0
- package/dist/postgresStore.d.ts +13 -2
- package/dist/productionReadiness.d.ts +433 -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/providerSlo.d.ts +114 -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/VoiceAgentSquadStatus.d.ts +5 -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 +26 -0
- package/dist/react/index.js +4074 -33
- package/dist/react/useVoiceAgentSquadStatus.d.ts +8 -0
- 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 +36 -0
- package/dist/reconnectContract.d.ts +87 -0
- package/dist/resilienceRoutes.d.ts +143 -0
- package/dist/sessionReplay.d.ts +93 -0
- package/dist/simulationSuite.d.ts +121 -0
- package/dist/sqliteStore.d.ts +13 -2
- package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
- 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 +14 -0
- package/dist/svelte/index.js +4574 -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 +2024 -69
- package/dist/testing/ioProviderSimulator.d.ts +41 -0
- package/dist/toolContract.d.ts +133 -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 +97 -0
- package/dist/turnLatency.d.ts +95 -0
- package/dist/turnQuality.d.ts +94 -0
- package/dist/types.d.ts +180 -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 +24 -0
- package/dist/vue/index.js +3852 -57
- package/dist/vue/useVoiceAgentSquadStatus.d.ts +9 -0
- 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,56 @@
|
|
|
1
|
+
import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
|
|
2
|
+
export type VoiceLatencySLOStatus = 'empty' | 'fail' | 'pass' | 'warn';
|
|
3
|
+
export type VoiceLatencySLOStage = 'assistant_text_to_tts_send' | 'barge_in_stop' | 'commit_to_assistant_text' | 'final_to_commit' | 'live_latency' | 'provider_llm' | 'provider_stt' | 'provider_tts' | 'speech_to_commit' | 'tts_send_duration' | 'tts_to_first_audio';
|
|
4
|
+
export type VoiceLatencySLOBudget = {
|
|
5
|
+
failAfterMs: number;
|
|
6
|
+
warnAfterMs?: number;
|
|
7
|
+
};
|
|
8
|
+
export type VoiceLatencySLOMeasurement = {
|
|
9
|
+
at: number;
|
|
10
|
+
latencyMs: number;
|
|
11
|
+
label: string;
|
|
12
|
+
provider?: string;
|
|
13
|
+
sessionId: string;
|
|
14
|
+
stage: VoiceLatencySLOStage;
|
|
15
|
+
status: Exclude<VoiceLatencySLOStatus, 'empty'>;
|
|
16
|
+
turnId?: string;
|
|
17
|
+
};
|
|
18
|
+
export type VoiceLatencySLOStageSummary = {
|
|
19
|
+
averageMs?: number;
|
|
20
|
+
budget: VoiceLatencySLOBudget;
|
|
21
|
+
failed: number;
|
|
22
|
+
label: string;
|
|
23
|
+
maxMs?: number;
|
|
24
|
+
measurements: VoiceLatencySLOMeasurement[];
|
|
25
|
+
p50Ms?: number;
|
|
26
|
+
p95Ms?: number;
|
|
27
|
+
stage: VoiceLatencySLOStage;
|
|
28
|
+
status: VoiceLatencySLOStatus;
|
|
29
|
+
total: number;
|
|
30
|
+
warnings: number;
|
|
31
|
+
};
|
|
32
|
+
export type VoiceLatencySLOGateReport = {
|
|
33
|
+
checkedAt: number;
|
|
34
|
+
failed: number;
|
|
35
|
+
measurements: VoiceLatencySLOMeasurement[];
|
|
36
|
+
stages: VoiceLatencySLOStageSummary[];
|
|
37
|
+
status: VoiceLatencySLOStatus;
|
|
38
|
+
total: number;
|
|
39
|
+
warnings: number;
|
|
40
|
+
};
|
|
41
|
+
export type VoiceLatencySLOGateOptions = {
|
|
42
|
+
budgets?: Partial<Record<VoiceLatencySLOStage, VoiceLatencySLOBudget>>;
|
|
43
|
+
events?: StoredVoiceTraceEvent[];
|
|
44
|
+
failAfterMs?: number;
|
|
45
|
+
limit?: number;
|
|
46
|
+
store?: VoiceTraceEventStore;
|
|
47
|
+
warnAfterMs?: number;
|
|
48
|
+
};
|
|
49
|
+
export type VoiceLatencySLOGateError = Error & {
|
|
50
|
+
report: VoiceLatencySLOGateReport;
|
|
51
|
+
};
|
|
52
|
+
export declare const buildVoiceLatencySLOGate: (options: VoiceLatencySLOGateOptions) => Promise<VoiceLatencySLOGateReport>;
|
|
53
|
+
export declare const assertVoiceLatencySLOGate: (options: VoiceLatencySLOGateOptions) => Promise<VoiceLatencySLOGateReport>;
|
|
54
|
+
export declare const renderVoiceLatencySLOMarkdown: (report: VoiceLatencySLOGateReport, options?: {
|
|
55
|
+
title?: string;
|
|
56
|
+
}) => string;
|
|
@@ -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,123 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceAuditSinkDeliveryQueueSummary, type VoiceAuditSinkDeliveryRecord, type VoiceAuditSinkDeliveryStore } from './auditSinks';
|
|
3
|
+
import type { VoiceAuditEventStore, VoiceAuditEventType } from './audit';
|
|
4
|
+
import { type VoiceOperationsRecord } from './operationsRecord';
|
|
5
|
+
import { type VoiceTraceSinkDeliveryQueueSummary } from './queue';
|
|
6
|
+
import { type StoredVoiceTraceEvent, type VoiceTraceEventStore, type VoiceTraceEventType, type VoiceTraceRedactionConfig, type VoiceTraceSinkDeliveryRecord, type VoiceTraceSinkDeliveryStore, type VoiceTraceSummary } from './trace';
|
|
7
|
+
export type VoiceObservabilityExportStatus = 'fail' | 'pass' | 'warn';
|
|
8
|
+
export type VoiceObservabilityExportArtifactKind = 'incident' | 'markdown' | 'operations-record' | 'proof-pack' | 'readiness' | 'screenshot' | 'slo' | 'trace' | 'audit' | 'custom';
|
|
9
|
+
export type VoiceObservabilityExportArtifact = {
|
|
10
|
+
bytes?: number;
|
|
11
|
+
contentType?: string;
|
|
12
|
+
generatedAt?: number | string;
|
|
13
|
+
href?: string;
|
|
14
|
+
id: string;
|
|
15
|
+
kind: VoiceObservabilityExportArtifactKind;
|
|
16
|
+
label: string;
|
|
17
|
+
path?: string;
|
|
18
|
+
sessionId?: string;
|
|
19
|
+
status?: VoiceObservabilityExportStatus;
|
|
20
|
+
};
|
|
21
|
+
export type VoiceObservabilityExportEnvelope = {
|
|
22
|
+
at: number;
|
|
23
|
+
eventId: string;
|
|
24
|
+
eventType: VoiceTraceEventType | VoiceAuditEventType;
|
|
25
|
+
kind: 'audit' | 'trace';
|
|
26
|
+
operationsRecordHref?: string;
|
|
27
|
+
provider?: string;
|
|
28
|
+
providerKind?: string;
|
|
29
|
+
scenarioId?: string;
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
severity: VoiceObservabilityExportStatus;
|
|
32
|
+
traceId?: string;
|
|
33
|
+
};
|
|
34
|
+
export type VoiceObservabilityExportIssueCode = 'voice.observability.no_evidence' | 'voice.observability.operation_failed' | 'voice.observability.audit_delivery_failed' | 'voice.observability.audit_delivery_pending' | 'voice.observability.trace_delivery_failed' | 'voice.observability.trace_delivery_pending';
|
|
35
|
+
export type VoiceObservabilityExportIssue = {
|
|
36
|
+
code: VoiceObservabilityExportIssueCode;
|
|
37
|
+
detail?: string;
|
|
38
|
+
label: string;
|
|
39
|
+
severity: Exclude<VoiceObservabilityExportStatus, 'pass'>;
|
|
40
|
+
value?: number | string;
|
|
41
|
+
};
|
|
42
|
+
export type VoiceObservabilityExportDeliverySummary = {
|
|
43
|
+
audit?: VoiceAuditSinkDeliveryQueueSummary;
|
|
44
|
+
trace?: VoiceTraceSinkDeliveryQueueSummary;
|
|
45
|
+
};
|
|
46
|
+
export type VoiceObservabilityExportRedactionSummary = {
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
mode: 'none' | 'redacted';
|
|
49
|
+
};
|
|
50
|
+
export type VoiceObservabilityExportReport = {
|
|
51
|
+
artifacts: VoiceObservabilityExportArtifact[];
|
|
52
|
+
checkedAt: number;
|
|
53
|
+
deliveries: VoiceObservabilityExportDeliverySummary;
|
|
54
|
+
envelopes: VoiceObservabilityExportEnvelope[];
|
|
55
|
+
issues: VoiceObservabilityExportIssue[];
|
|
56
|
+
operationsRecords: VoiceOperationsRecord[];
|
|
57
|
+
redaction: VoiceObservabilityExportRedactionSummary;
|
|
58
|
+
sessionIds: string[];
|
|
59
|
+
status: VoiceObservabilityExportStatus;
|
|
60
|
+
summary: {
|
|
61
|
+
auditEvents: number;
|
|
62
|
+
events: number;
|
|
63
|
+
failedOperationsRecords: number;
|
|
64
|
+
trace: VoiceTraceSummary;
|
|
65
|
+
traceEvents: number;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export type VoiceObservabilityExportOptions = {
|
|
69
|
+
artifacts?: VoiceObservabilityExportArtifact[];
|
|
70
|
+
audit?: VoiceAuditEventStore;
|
|
71
|
+
auditDeliveries?: VoiceAuditSinkDeliveryRecord[] | VoiceAuditSinkDeliveryStore;
|
|
72
|
+
events?: StoredVoiceTraceEvent[];
|
|
73
|
+
includeOperationsRecords?: boolean;
|
|
74
|
+
links?: {
|
|
75
|
+
operationsRecord?: (sessionId: string) => string;
|
|
76
|
+
};
|
|
77
|
+
operationsRecords?: VoiceOperationsRecord[];
|
|
78
|
+
redact?: VoiceTraceRedactionConfig;
|
|
79
|
+
sessionIds?: string[];
|
|
80
|
+
store?: VoiceTraceEventStore;
|
|
81
|
+
traceDeliveries?: VoiceTraceSinkDeliveryRecord[] | VoiceTraceSinkDeliveryStore;
|
|
82
|
+
};
|
|
83
|
+
export type VoiceObservabilityExportRoutesOptions = VoiceObservabilityExportOptions & {
|
|
84
|
+
headers?: HeadersInit;
|
|
85
|
+
htmlPath?: false | string;
|
|
86
|
+
markdownPath?: false | string;
|
|
87
|
+
name?: string;
|
|
88
|
+
path?: string;
|
|
89
|
+
render?: (report: VoiceObservabilityExportReport) => string | Promise<string>;
|
|
90
|
+
title?: string;
|
|
91
|
+
};
|
|
92
|
+
export declare const buildVoiceObservabilityExport: (options?: VoiceObservabilityExportOptions) => Promise<VoiceObservabilityExportReport>;
|
|
93
|
+
export declare const renderVoiceObservabilityExportMarkdown: (report: VoiceObservabilityExportReport, options?: {
|
|
94
|
+
title?: string;
|
|
95
|
+
}) => string;
|
|
96
|
+
export declare const createVoiceObservabilityExportRoutes: (options?: VoiceObservabilityExportRoutesOptions) => Elysia<"", {
|
|
97
|
+
decorator: {};
|
|
98
|
+
store: {};
|
|
99
|
+
derive: {};
|
|
100
|
+
resolve: {};
|
|
101
|
+
}, {
|
|
102
|
+
typebox: {};
|
|
103
|
+
error: {};
|
|
104
|
+
}, {
|
|
105
|
+
schema: {};
|
|
106
|
+
standaloneSchema: {};
|
|
107
|
+
macro: {};
|
|
108
|
+
macroFn: {};
|
|
109
|
+
parser: {};
|
|
110
|
+
response: {};
|
|
111
|
+
}, {}, {
|
|
112
|
+
derive: {};
|
|
113
|
+
resolve: {};
|
|
114
|
+
schema: {};
|
|
115
|
+
standaloneSchema: {};
|
|
116
|
+
response: {};
|
|
117
|
+
}, {
|
|
118
|
+
derive: {};
|
|
119
|
+
resolve: {};
|
|
120
|
+
schema: {};
|
|
121
|
+
standaloneSchema: {};
|
|
122
|
+
response: {};
|
|
123
|
+
}>;
|
|
@@ -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,158 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type StoredVoiceAuditEvent, type VoiceAuditEventStore } from './audit';
|
|
3
|
+
import type { StoredVoiceIntegrationEvent, StoredVoiceOpsTask, VoiceIntegrationEventStore, VoiceOpsTaskStore } from './ops';
|
|
4
|
+
import { type VoiceSessionReplay } from './sessionReplay';
|
|
5
|
+
import type { StoredVoiceCallReviewArtifact, VoiceCallReviewStore } from './testing/review';
|
|
6
|
+
import { type VoiceTraceTimelineEvent, type VoiceTraceTimelineProviderSummary } from './traceTimeline';
|
|
7
|
+
import { type StoredVoiceTraceEvent, type VoiceTraceEvaluationOptions, type VoiceTraceEventStore, type VoiceTraceRedactionConfig, type VoiceTraceSummary } from './trace';
|
|
8
|
+
export type VoiceOperationsRecordStatus = 'failed' | 'healthy' | 'warning';
|
|
9
|
+
export type VoiceOperationsRecordOutcome = {
|
|
10
|
+
assistantReplies: number;
|
|
11
|
+
complete: boolean;
|
|
12
|
+
escalated: boolean;
|
|
13
|
+
noAnswer: boolean;
|
|
14
|
+
transferred: boolean;
|
|
15
|
+
voicemail: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type VoiceOperationsRecordAgentHandoff = {
|
|
18
|
+
at: number;
|
|
19
|
+
fromAgentId?: string;
|
|
20
|
+
metadata?: Record<string, unknown>;
|
|
21
|
+
reason?: string;
|
|
22
|
+
status?: string;
|
|
23
|
+
summary?: string;
|
|
24
|
+
targetAgentId?: string;
|
|
25
|
+
turnId?: string;
|
|
26
|
+
};
|
|
27
|
+
export type VoiceOperationsRecordTool = {
|
|
28
|
+
at: number;
|
|
29
|
+
elapsedMs?: number;
|
|
30
|
+
error?: string;
|
|
31
|
+
status?: string;
|
|
32
|
+
toolCallId?: string;
|
|
33
|
+
toolName?: string;
|
|
34
|
+
turnId?: string;
|
|
35
|
+
};
|
|
36
|
+
export type VoiceOperationsRecordTranscriptTurn = {
|
|
37
|
+
assistantReplies: string[];
|
|
38
|
+
committedText?: string;
|
|
39
|
+
errors: string[];
|
|
40
|
+
id: string;
|
|
41
|
+
transcripts: string[];
|
|
42
|
+
};
|
|
43
|
+
export type VoiceOperationsRecordProviderDecision = {
|
|
44
|
+
at: number;
|
|
45
|
+
elapsedMs?: number;
|
|
46
|
+
error?: string;
|
|
47
|
+
fallbackProvider?: string;
|
|
48
|
+
provider?: string;
|
|
49
|
+
reason?: string;
|
|
50
|
+
selectedProvider?: string;
|
|
51
|
+
status?: string;
|
|
52
|
+
type: StoredVoiceTraceEvent['type'];
|
|
53
|
+
turnId?: string;
|
|
54
|
+
};
|
|
55
|
+
export type VoiceOperationsRecordAuditSummary = {
|
|
56
|
+
error: number;
|
|
57
|
+
events: StoredVoiceAuditEvent[];
|
|
58
|
+
skipped: number;
|
|
59
|
+
success: number;
|
|
60
|
+
total: number;
|
|
61
|
+
};
|
|
62
|
+
export type VoiceOperationsRecordReviewSummary = {
|
|
63
|
+
failed: number;
|
|
64
|
+
reviews: StoredVoiceCallReviewArtifact[];
|
|
65
|
+
total: number;
|
|
66
|
+
};
|
|
67
|
+
export type VoiceOperationsRecordTaskSummary = {
|
|
68
|
+
done: number;
|
|
69
|
+
inProgress: number;
|
|
70
|
+
open: number;
|
|
71
|
+
overdue: number;
|
|
72
|
+
tasks: StoredVoiceOpsTask[];
|
|
73
|
+
total: number;
|
|
74
|
+
};
|
|
75
|
+
export type VoiceOperationsRecordIntegrationEventSummary = {
|
|
76
|
+
delivered: number;
|
|
77
|
+
events: StoredVoiceIntegrationEvent[];
|
|
78
|
+
failed: number;
|
|
79
|
+
pending: number;
|
|
80
|
+
sinkDeliveries: number;
|
|
81
|
+
skipped: number;
|
|
82
|
+
total: number;
|
|
83
|
+
};
|
|
84
|
+
export type VoiceOperationsRecord = {
|
|
85
|
+
audit?: VoiceOperationsRecordAuditSummary;
|
|
86
|
+
checkedAt: number;
|
|
87
|
+
handoffs: VoiceOperationsRecordAgentHandoff[];
|
|
88
|
+
integrationEvents?: VoiceOperationsRecordIntegrationEventSummary;
|
|
89
|
+
outcome: VoiceOperationsRecordOutcome;
|
|
90
|
+
providerDecisions: VoiceOperationsRecordProviderDecision[];
|
|
91
|
+
providers: VoiceTraceTimelineProviderSummary[];
|
|
92
|
+
replay: VoiceSessionReplay;
|
|
93
|
+
reviews?: VoiceOperationsRecordReviewSummary;
|
|
94
|
+
sessionId: string;
|
|
95
|
+
status: VoiceOperationsRecordStatus;
|
|
96
|
+
summary: VoiceTraceSummary;
|
|
97
|
+
tasks?: VoiceOperationsRecordTaskSummary;
|
|
98
|
+
timeline: VoiceTraceTimelineEvent[];
|
|
99
|
+
tools: VoiceOperationsRecordTool[];
|
|
100
|
+
traceEvents: StoredVoiceTraceEvent[];
|
|
101
|
+
transcript: VoiceOperationsRecordTranscriptTurn[];
|
|
102
|
+
};
|
|
103
|
+
export type VoiceOperationsRecordOptions = {
|
|
104
|
+
audit?: VoiceAuditEventStore;
|
|
105
|
+
evaluation?: VoiceTraceEvaluationOptions;
|
|
106
|
+
events?: StoredVoiceTraceEvent[];
|
|
107
|
+
integrationEvents?: VoiceIntegrationEventStore;
|
|
108
|
+
redact?: VoiceTraceRedactionConfig;
|
|
109
|
+
reviews?: VoiceCallReviewStore;
|
|
110
|
+
sessionId: string;
|
|
111
|
+
store?: VoiceTraceEventStore;
|
|
112
|
+
tasks?: VoiceOpsTaskStore;
|
|
113
|
+
};
|
|
114
|
+
export type VoiceOperationsRecordRoutesOptions = Omit<VoiceOperationsRecordOptions, 'sessionId'> & {
|
|
115
|
+
headers?: HeadersInit;
|
|
116
|
+
htmlPath?: false | string;
|
|
117
|
+
incidentHtmlPath?: false | string;
|
|
118
|
+
incidentPath?: false | string;
|
|
119
|
+
name?: string;
|
|
120
|
+
path?: string;
|
|
121
|
+
render?: (record: VoiceOperationsRecord) => string | Promise<string>;
|
|
122
|
+
renderIncidentMarkdown?: (record: VoiceOperationsRecord) => string | Promise<string>;
|
|
123
|
+
title?: string;
|
|
124
|
+
};
|
|
125
|
+
export declare const buildVoiceOperationsRecord: (options: VoiceOperationsRecordOptions) => Promise<VoiceOperationsRecord>;
|
|
126
|
+
export declare const renderVoiceOperationsRecordIncidentMarkdown: (record: VoiceOperationsRecord) => string;
|
|
127
|
+
export declare const renderVoiceOperationsRecordHTML: (record: VoiceOperationsRecord, options?: {
|
|
128
|
+
incidentHref?: string;
|
|
129
|
+
title?: string;
|
|
130
|
+
}) => string;
|
|
131
|
+
export declare const createVoiceOperationsRecordRoutes: (options: VoiceOperationsRecordRoutesOptions) => Elysia<"", {
|
|
132
|
+
decorator: {};
|
|
133
|
+
store: {};
|
|
134
|
+
derive: {};
|
|
135
|
+
resolve: {};
|
|
136
|
+
}, {
|
|
137
|
+
typebox: {};
|
|
138
|
+
error: {};
|
|
139
|
+
}, {
|
|
140
|
+
schema: {};
|
|
141
|
+
standaloneSchema: {};
|
|
142
|
+
macro: {};
|
|
143
|
+
macroFn: {};
|
|
144
|
+
parser: {};
|
|
145
|
+
response: {};
|
|
146
|
+
}, {}, {
|
|
147
|
+
derive: {};
|
|
148
|
+
resolve: {};
|
|
149
|
+
schema: {};
|
|
150
|
+
standaloneSchema: {};
|
|
151
|
+
response: {};
|
|
152
|
+
}, {
|
|
153
|
+
derive: {};
|
|
154
|
+
resolve: {};
|
|
155
|
+
schema: {};
|
|
156
|
+
standaloneSchema: {};
|
|
157
|
+
response: {};
|
|
158
|
+
}>;
|