@absolutejs/voice 0.0.22-beta.43 → 0.0.22-beta.431
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 +3690 -55
- package/dist/agent.d.ts +62 -0
- package/dist/agentSquadContract.d.ts +98 -0
- package/dist/angular/index.d.ts +19 -0
- package/dist/angular/index.js +4647 -1140
- package/dist/angular/voice-agent-squad-status.service.d.ts +12 -0
- package/dist/angular/voice-call-debugger.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-platform-coverage.service.d.ts +12 -0
- package/dist/angular/voice-profile-comparison.service.d.ts +12 -0
- package/dist/angular/voice-proof-trends.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-readiness-failures.service.d.ts +13 -0
- package/dist/angular/voice-routing-status.service.d.ts +11 -0
- package/dist/angular/voice-session-snapshot.service.d.ts +13 -0
- package/dist/angular/voice-stream.service.d.ts +2 -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 +131 -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/browserCallProfiles.d.ts +120 -0
- package/dist/browserMediaRoutes.d.ts +62 -0
- package/dist/callDebugger.d.ts +66 -0
- package/dist/campaign.d.ts +794 -0
- package/dist/campaignDialers.d.ts +111 -0
- package/dist/client/actions.d.ts +94 -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/browserMedia.d.ts +8 -0
- package/dist/client/callDebugger.d.ts +19 -0
- package/dist/client/callDebuggerWidget.d.ts +30 -0
- package/dist/client/campaignDialerProof.d.ts +23 -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 +950 -14
- package/dist/client/index.d.ts +87 -0
- package/dist/client/index.js +9890 -52
- 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/platformCoverage.d.ts +19 -0
- package/dist/client/platformCoverageWidget.d.ts +37 -0
- package/dist/client/profileComparison.d.ts +19 -0
- package/dist/client/profileComparisonWidget.d.ts +41 -0
- package/dist/client/profileSwitchRecommendation.d.ts +19 -0
- package/dist/client/profileSwitchRecommendationWidget.d.ts +12 -0
- package/dist/client/proofTrends.d.ts +19 -0
- package/dist/client/proofTrendsWidget.d.ts +37 -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/readinessFailures.d.ts +19 -0
- package/dist/client/readinessFailuresWidget.d.ts +42 -0
- package/dist/client/routingStatus.d.ts +19 -0
- package/dist/client/routingStatusWidget.d.ts +32 -0
- package/dist/client/sessionSnapshot.d.ts +21 -0
- package/dist/client/sessionSnapshotWidget.d.ts +33 -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/competitiveCoverage.d.ts +141 -0
- package/dist/dataControl.d.ts +180 -0
- package/dist/deliveryRuntime.d.ts +158 -0
- package/dist/deliverySinkRoutes.d.ts +117 -0
- package/dist/demoReadyRoutes.d.ts +98 -0
- package/dist/evalRoutes.d.ts +96 -0
- package/dist/fileStore.d.ts +14 -2
- package/dist/guardrails.d.ts +128 -0
- package/dist/incidentBundle.d.ts +116 -0
- package/dist/index.d.ts +161 -18
- package/dist/index.js +34906 -6731
- package/dist/latencySlo.d.ts +56 -0
- package/dist/liveLatency.d.ts +78 -0
- package/dist/liveOps.d.ts +190 -0
- package/dist/mediaPipelineRoutes.d.ts +117 -0
- package/dist/modelAdapters.d.ts +54 -2
- package/dist/observabilityExport.d.ts +497 -0
- package/dist/openaiTTS.d.ts +18 -0
- package/dist/operationalStatus.d.ts +87 -0
- package/dist/operationsRecord.d.ts +351 -0
- package/dist/opsActionAuditRoutes.d.ts +99 -0
- package/dist/opsConsoleRoutes.d.ts +3 -0
- package/dist/opsRecovery.d.ts +137 -0
- package/dist/opsStatus.d.ts +76 -0
- package/dist/opsStatusRoutes.d.ts +33 -0
- package/dist/outcomeContract.d.ts +146 -0
- package/dist/phoneAgent.d.ts +139 -0
- package/dist/phoneAgentProductionSmoke.d.ts +115 -0
- package/dist/platformCoverage.d.ts +91 -0
- package/dist/postCallAnalysis.d.ts +98 -0
- package/dist/postgresStore.d.ts +13 -2
- package/dist/productionReadiness.d.ts +698 -0
- package/dist/profileSwitchRecommendation.d.ts +350 -0
- package/dist/proofAssertions.d.ts +32 -0
- package/dist/proofPack.d.ts +206 -0
- package/dist/proofRunner.d.ts +79 -0
- package/dist/proofTrends.d.ts +715 -0
- package/dist/providerAdapters.d.ts +12 -1
- package/dist/providerCapabilities.d.ts +92 -0
- package/dist/providerDecisionTraces.d.ts +130 -0
- package/dist/providerOrchestration.d.ts +109 -0
- package/dist/providerRouterTraces.d.ts +35 -0
- package/dist/providerRoutingContract.d.ts +71 -0
- package/dist/providerSlo.d.ts +142 -0
- package/dist/providerStackRecommendations.d.ts +187 -0
- package/dist/queue.d.ts +9 -0
- package/dist/react/VoiceAgentSquadStatus.d.ts +5 -0
- package/dist/react/VoiceCallDebuggerLaunch.d.ts +6 -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/VoicePlatformCoverage.d.ts +6 -0
- package/dist/react/VoiceProfileComparison.d.ts +6 -0
- package/dist/react/VoiceProfileSwitchRecommendation.d.ts +6 -0
- package/dist/react/VoiceProofTrends.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/VoiceReadinessFailures.d.ts +6 -0
- package/dist/react/VoiceRoutingStatus.d.ts +6 -0
- package/dist/react/VoiceSessionSnapshot.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 +40 -0
- package/dist/react/index.js +10624 -31
- package/dist/react/useVoiceAgentSquadStatus.d.ts +8 -0
- package/dist/react/useVoiceCallDebugger.d.ts +8 -0
- package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
- package/dist/react/useVoiceController.d.ts +2 -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/useVoicePlatformCoverage.d.ts +8 -0
- package/dist/react/useVoiceProfileComparison.d.ts +8 -0
- package/dist/react/useVoiceProfileSwitchRecommendation.d.ts +8 -0
- package/dist/react/useVoiceProofTrends.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/useVoiceReadinessFailures.d.ts +8 -0
- package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/react/useVoiceSessionSnapshot.d.ts +9 -0
- package/dist/react/useVoiceStream.d.ts +2 -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 +38 -0
- package/dist/realtimeChannel.d.ts +136 -0
- package/dist/realtimeProviderContracts.d.ts +133 -0
- package/dist/reconnectContract.d.ts +88 -0
- package/dist/resilienceRoutes.d.ts +40 -0
- package/dist/sessionReplay.d.ts +12 -0
- package/dist/sessionSnapshot.d.ts +109 -0
- package/dist/simulationSuite.d.ts +143 -0
- package/dist/sloCalibration.d.ts +185 -0
- package/dist/sqliteStore.d.ts +13 -2
- package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
- package/dist/svelte/createVoiceCallDebugger.d.ts +12 -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/createVoicePlatformCoverage.d.ts +7 -0
- package/dist/svelte/createVoiceProfileComparison.d.ts +7 -0
- package/dist/svelte/createVoiceProofTrends.d.ts +7 -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/createVoiceReadinessFailures.d.ts +7 -0
- package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
- package/dist/svelte/createVoiceSessionSnapshot.d.ts +13 -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 +20 -0
- package/dist/svelte/index.js +6403 -460
- package/dist/telephony/contract.d.ts +61 -0
- package/dist/telephony/matrix.d.ts +97 -0
- package/dist/telephony/plivo.d.ts +303 -0
- package/dist/telephony/security.d.ts +182 -0
- package/dist/telephony/telnyx.d.ts +291 -0
- package/dist/telephony/twilio.d.ts +136 -2
- package/dist/telephonyMediaRoutes.d.ts +72 -0
- package/dist/telephonyOutcome.d.ts +273 -0
- package/dist/testing/index.js +5363 -163
- package/dist/testing/telephony.d.ts +25 -0
- package/dist/toolContract.d.ts +161 -0
- package/dist/toolRuntime.d.ts +50 -0
- package/dist/trace.d.ts +40 -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 +157 -3
- package/dist/voiceMonitoring.d.ts +444 -0
- package/dist/vue/VoiceCallDebuggerLaunch.d.ts +68 -0
- 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/VoicePlatformCoverage.d.ts +23 -0
- package/dist/vue/VoiceProofTrends.d.ts +21 -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/VoiceReadinessFailures.d.ts +21 -0
- package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
- package/dist/vue/VoiceSessionSnapshot.d.ts +68 -0
- package/dist/vue/VoiceTurnLatency.d.ts +69 -0
- package/dist/vue/VoiceTurnQuality.d.ts +51 -0
- package/dist/vue/index.d.ts +35 -0
- package/dist/vue/index.js +10069 -56
- package/dist/vue/useVoiceAgentSquadStatus.d.ts +9 -0
- package/dist/vue/useVoiceCallDebugger.d.ts +10 -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/useVoicePlatformCoverage.d.ts +9 -0
- package/dist/vue/useVoiceProfileComparison.d.ts +9 -0
- package/dist/vue/useVoiceProofTrends.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/useVoiceReadinessFailures.d.ts +899 -0
- package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/vue/useVoiceSessionSnapshot.d.ts +10 -0
- package/dist/vue/useVoiceStream.d.ts +3 -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 +4 -1
|
@@ -0,0 +1,351 @@
|
|
|
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
|
+
kind?: string;
|
|
49
|
+
provider?: string;
|
|
50
|
+
reason?: string;
|
|
51
|
+
selectedProvider?: string;
|
|
52
|
+
status?: string;
|
|
53
|
+
surface?: string;
|
|
54
|
+
type: StoredVoiceTraceEvent['type'];
|
|
55
|
+
turnId?: string;
|
|
56
|
+
};
|
|
57
|
+
export type VoiceOperationsRecordProviderDecisionRecoveryStatus = 'degraded' | 'failed' | 'none' | 'recovered' | 'selected';
|
|
58
|
+
export type VoiceOperationsRecordProviderDecisionSummary = {
|
|
59
|
+
degraded: number;
|
|
60
|
+
errors: number;
|
|
61
|
+
fallbacks: number;
|
|
62
|
+
providers: string[];
|
|
63
|
+
recoveryStatus: VoiceOperationsRecordProviderDecisionRecoveryStatus;
|
|
64
|
+
selected: number;
|
|
65
|
+
surfaces: string[];
|
|
66
|
+
total: number;
|
|
67
|
+
};
|
|
68
|
+
export type VoiceOperationsRecordAuditSummary = {
|
|
69
|
+
error: number;
|
|
70
|
+
events: StoredVoiceAuditEvent[];
|
|
71
|
+
skipped: number;
|
|
72
|
+
success: number;
|
|
73
|
+
total: number;
|
|
74
|
+
};
|
|
75
|
+
export type VoiceOperationsRecordReviewSummary = {
|
|
76
|
+
failed: number;
|
|
77
|
+
reviews: StoredVoiceCallReviewArtifact[];
|
|
78
|
+
total: number;
|
|
79
|
+
};
|
|
80
|
+
export type VoiceOperationsRecordTaskSummary = {
|
|
81
|
+
done: number;
|
|
82
|
+
inProgress: number;
|
|
83
|
+
open: number;
|
|
84
|
+
overdue: number;
|
|
85
|
+
tasks: StoredVoiceOpsTask[];
|
|
86
|
+
total: number;
|
|
87
|
+
};
|
|
88
|
+
export type VoiceOperationsRecordIntegrationEventSummary = {
|
|
89
|
+
delivered: number;
|
|
90
|
+
events: StoredVoiceIntegrationEvent[];
|
|
91
|
+
failed: number;
|
|
92
|
+
pending: number;
|
|
93
|
+
sinkDeliveries: number;
|
|
94
|
+
skipped: number;
|
|
95
|
+
total: number;
|
|
96
|
+
};
|
|
97
|
+
export type VoiceOperationsRecordGuardrailFinding = {
|
|
98
|
+
action?: string;
|
|
99
|
+
label?: string;
|
|
100
|
+
ruleId?: string;
|
|
101
|
+
};
|
|
102
|
+
export type VoiceOperationsRecordGuardrailDecision = {
|
|
103
|
+
allowed?: boolean;
|
|
104
|
+
at: number;
|
|
105
|
+
findings: VoiceOperationsRecordGuardrailFinding[];
|
|
106
|
+
metadata?: Record<string, unknown>;
|
|
107
|
+
proof?: string;
|
|
108
|
+
stage?: string;
|
|
109
|
+
status?: string;
|
|
110
|
+
toolName?: string;
|
|
111
|
+
turnId?: string;
|
|
112
|
+
};
|
|
113
|
+
export type VoiceOperationsRecordGuardrailSummary = {
|
|
114
|
+
blocked: number;
|
|
115
|
+
decisions: VoiceOperationsRecordGuardrailDecision[];
|
|
116
|
+
passed: number;
|
|
117
|
+
stages: string[];
|
|
118
|
+
total: number;
|
|
119
|
+
warned: number;
|
|
120
|
+
};
|
|
121
|
+
export type VoiceOperationsRecordTelephonyMediaEvent = {
|
|
122
|
+
at: number;
|
|
123
|
+
audioBytes: number;
|
|
124
|
+
callSid?: string;
|
|
125
|
+
carrier?: string;
|
|
126
|
+
direction?: string;
|
|
127
|
+
event: string;
|
|
128
|
+
sequenceNumber?: string;
|
|
129
|
+
streamId?: string;
|
|
130
|
+
};
|
|
131
|
+
export type VoiceOperationsRecordTelephonyMediaSummary = {
|
|
132
|
+
audioBytes: number;
|
|
133
|
+
carriers: string[];
|
|
134
|
+
clears: number;
|
|
135
|
+
errors: number;
|
|
136
|
+
events: VoiceOperationsRecordTelephonyMediaEvent[];
|
|
137
|
+
inbound: number;
|
|
138
|
+
marks: number;
|
|
139
|
+
media: number;
|
|
140
|
+
outbound: number;
|
|
141
|
+
starts: number;
|
|
142
|
+
stops: number;
|
|
143
|
+
streamIds: string[];
|
|
144
|
+
total: number;
|
|
145
|
+
};
|
|
146
|
+
export type VoiceOperationsRecordGuardrailAssertionInput = {
|
|
147
|
+
minBlocked?: number;
|
|
148
|
+
minDecisions?: number;
|
|
149
|
+
minPassed?: number;
|
|
150
|
+
minWarned?: number;
|
|
151
|
+
proofs?: string[];
|
|
152
|
+
ruleIds?: string[];
|
|
153
|
+
stages?: string[];
|
|
154
|
+
statuses?: string[];
|
|
155
|
+
toolNames?: string[];
|
|
156
|
+
};
|
|
157
|
+
export type VoiceOperationsRecordGuardrailAssertionReport = {
|
|
158
|
+
blocked: number;
|
|
159
|
+
decisions: number;
|
|
160
|
+
issues: string[];
|
|
161
|
+
ok: boolean;
|
|
162
|
+
passed: number;
|
|
163
|
+
proofs: string[];
|
|
164
|
+
ruleIds: string[];
|
|
165
|
+
stages: string[];
|
|
166
|
+
statuses: string[];
|
|
167
|
+
toolNames: string[];
|
|
168
|
+
warned: number;
|
|
169
|
+
};
|
|
170
|
+
export type VoiceOperationsRecordProviderRecoveryAssertionInput = {
|
|
171
|
+
minDegraded?: number;
|
|
172
|
+
minErrors?: number;
|
|
173
|
+
minFallbacks?: number;
|
|
174
|
+
minSelected?: number;
|
|
175
|
+
minTotal?: number;
|
|
176
|
+
recoveryStatus?: VoiceOperationsRecordProviderDecisionRecoveryStatus;
|
|
177
|
+
requiredFallbackProviders?: string[];
|
|
178
|
+
requiredProviders?: string[];
|
|
179
|
+
requiredReasonIncludes?: string[];
|
|
180
|
+
requiredSelectedProviders?: string[];
|
|
181
|
+
requiredStatuses?: string[];
|
|
182
|
+
requiredSurfaces?: string[];
|
|
183
|
+
};
|
|
184
|
+
export type VoiceOperationsRecordProviderRecoveryAssertionReport = {
|
|
185
|
+
degraded: number;
|
|
186
|
+
errors: number;
|
|
187
|
+
fallbacks: number;
|
|
188
|
+
issues: string[];
|
|
189
|
+
ok: boolean;
|
|
190
|
+
providers: string[];
|
|
191
|
+
recoveryStatus: VoiceOperationsRecordProviderDecisionRecoveryStatus;
|
|
192
|
+
selected: number;
|
|
193
|
+
selectedProviders: string[];
|
|
194
|
+
statuses: string[];
|
|
195
|
+
surfaces: string[];
|
|
196
|
+
total: number;
|
|
197
|
+
};
|
|
198
|
+
export type VoiceOperationsRecord = {
|
|
199
|
+
audit?: VoiceOperationsRecordAuditSummary;
|
|
200
|
+
checkedAt: number;
|
|
201
|
+
guardrails: VoiceOperationsRecordGuardrailSummary;
|
|
202
|
+
handoffs: VoiceOperationsRecordAgentHandoff[];
|
|
203
|
+
integrationEvents?: VoiceOperationsRecordIntegrationEventSummary;
|
|
204
|
+
outcome: VoiceOperationsRecordOutcome;
|
|
205
|
+
providerDecisions: VoiceOperationsRecordProviderDecision[];
|
|
206
|
+
providerDecisionSummary: VoiceOperationsRecordProviderDecisionSummary;
|
|
207
|
+
providers: VoiceTraceTimelineProviderSummary[];
|
|
208
|
+
replay: VoiceSessionReplay;
|
|
209
|
+
reviews?: VoiceOperationsRecordReviewSummary;
|
|
210
|
+
sessionId: string;
|
|
211
|
+
status: VoiceOperationsRecordStatus;
|
|
212
|
+
summary: VoiceTraceSummary;
|
|
213
|
+
tasks?: VoiceOperationsRecordTaskSummary;
|
|
214
|
+
telephonyMedia: VoiceOperationsRecordTelephonyMediaSummary;
|
|
215
|
+
timeline: VoiceTraceTimelineEvent[];
|
|
216
|
+
tools: VoiceOperationsRecordTool[];
|
|
217
|
+
traceEvents: StoredVoiceTraceEvent[];
|
|
218
|
+
transcript: VoiceOperationsRecordTranscriptTurn[];
|
|
219
|
+
};
|
|
220
|
+
export type VoiceFailureReplayStatus = 'degraded' | 'failed' | 'healthy' | 'recovered';
|
|
221
|
+
export type VoiceFailureReplayProviderStep = {
|
|
222
|
+
at: number;
|
|
223
|
+
elapsedMs?: number;
|
|
224
|
+
error?: string;
|
|
225
|
+
fallbackProvider?: string;
|
|
226
|
+
kind?: string;
|
|
227
|
+
provider?: string;
|
|
228
|
+
reason?: string;
|
|
229
|
+
selectedProvider?: string;
|
|
230
|
+
status?: string;
|
|
231
|
+
surface?: string;
|
|
232
|
+
turnId?: string;
|
|
233
|
+
userHeard: string[];
|
|
234
|
+
};
|
|
235
|
+
export type VoiceFailureReplayMediaStep = {
|
|
236
|
+
at: number;
|
|
237
|
+
audioBytes: number;
|
|
238
|
+
carrier?: string;
|
|
239
|
+
direction?: string;
|
|
240
|
+
event: string;
|
|
241
|
+
issue?: string;
|
|
242
|
+
streamId?: string;
|
|
243
|
+
};
|
|
244
|
+
export type VoiceFailureReplayTurn = {
|
|
245
|
+
assistantReplies: string[];
|
|
246
|
+
committedText?: string;
|
|
247
|
+
errors: string[];
|
|
248
|
+
id: string;
|
|
249
|
+
media: VoiceFailureReplayMediaStep[];
|
|
250
|
+
providers: VoiceFailureReplayProviderStep[];
|
|
251
|
+
transcripts: string[];
|
|
252
|
+
};
|
|
253
|
+
export type VoiceFailureReplayReport = {
|
|
254
|
+
incidentMarkdown: string;
|
|
255
|
+
media: {
|
|
256
|
+
audioBytes: number;
|
|
257
|
+
clears: number;
|
|
258
|
+
errors: number;
|
|
259
|
+
issues: string[];
|
|
260
|
+
steps: VoiceFailureReplayMediaStep[];
|
|
261
|
+
total: number;
|
|
262
|
+
};
|
|
263
|
+
ok: boolean;
|
|
264
|
+
operationsRecordHref?: string;
|
|
265
|
+
providers: {
|
|
266
|
+
degraded: number;
|
|
267
|
+
errors: number;
|
|
268
|
+
fallbacks: number;
|
|
269
|
+
recoveryStatus: VoiceOperationsRecordProviderDecisionRecoveryStatus;
|
|
270
|
+
selected: number;
|
|
271
|
+
steps: VoiceFailureReplayProviderStep[];
|
|
272
|
+
total: number;
|
|
273
|
+
};
|
|
274
|
+
sessionId: string;
|
|
275
|
+
status: VoiceFailureReplayStatus;
|
|
276
|
+
summary: {
|
|
277
|
+
callDurationMs?: number;
|
|
278
|
+
issues: string[];
|
|
279
|
+
userHeard: string[];
|
|
280
|
+
};
|
|
281
|
+
turns: VoiceFailureReplayTurn[];
|
|
282
|
+
};
|
|
283
|
+
export type VoiceFailureReplayOptions = {
|
|
284
|
+
operationsRecordHref?: string | ((input: {
|
|
285
|
+
record: VoiceOperationsRecord;
|
|
286
|
+
sessionId: string;
|
|
287
|
+
}) => string);
|
|
288
|
+
};
|
|
289
|
+
export type VoiceOperationsRecordOptions = {
|
|
290
|
+
audit?: VoiceAuditEventStore;
|
|
291
|
+
evaluation?: VoiceTraceEvaluationOptions;
|
|
292
|
+
events?: StoredVoiceTraceEvent[];
|
|
293
|
+
integrationEvents?: VoiceIntegrationEventStore;
|
|
294
|
+
redact?: VoiceTraceRedactionConfig;
|
|
295
|
+
reviews?: VoiceCallReviewStore;
|
|
296
|
+
sessionId: string;
|
|
297
|
+
store?: VoiceTraceEventStore;
|
|
298
|
+
tasks?: VoiceOpsTaskStore;
|
|
299
|
+
};
|
|
300
|
+
export type VoiceOperationsRecordRoutesOptions = Omit<VoiceOperationsRecordOptions, 'sessionId'> & {
|
|
301
|
+
headers?: HeadersInit;
|
|
302
|
+
htmlPath?: false | string;
|
|
303
|
+
incidentHtmlPath?: false | string;
|
|
304
|
+
incidentPath?: false | string;
|
|
305
|
+
name?: string;
|
|
306
|
+
path?: string;
|
|
307
|
+
render?: (record: VoiceOperationsRecord) => string | Promise<string>;
|
|
308
|
+
renderIncidentMarkdown?: (record: VoiceOperationsRecord) => string | Promise<string>;
|
|
309
|
+
title?: string;
|
|
310
|
+
};
|
|
311
|
+
export declare const buildVoiceOperationsRecord: (options: VoiceOperationsRecordOptions) => Promise<VoiceOperationsRecord>;
|
|
312
|
+
export declare const evaluateVoiceOperationsRecordGuardrails: (record: VoiceOperationsRecord, input?: VoiceOperationsRecordGuardrailAssertionInput) => VoiceOperationsRecordGuardrailAssertionReport;
|
|
313
|
+
export declare const assertVoiceOperationsRecordGuardrails: (record: VoiceOperationsRecord, input?: VoiceOperationsRecordGuardrailAssertionInput) => VoiceOperationsRecordGuardrailAssertionReport;
|
|
314
|
+
export declare const evaluateVoiceOperationsRecordProviderRecovery: (record: VoiceOperationsRecord, input?: VoiceOperationsRecordProviderRecoveryAssertionInput) => VoiceOperationsRecordProviderRecoveryAssertionReport;
|
|
315
|
+
export declare const assertVoiceOperationsRecordProviderRecovery: (record: VoiceOperationsRecord, input?: VoiceOperationsRecordProviderRecoveryAssertionInput) => VoiceOperationsRecordProviderRecoveryAssertionReport;
|
|
316
|
+
export declare const buildVoiceFailureReplay: (record: VoiceOperationsRecord, options?: VoiceFailureReplayOptions) => VoiceFailureReplayReport;
|
|
317
|
+
export declare const renderVoiceFailureReplayMarkdown: (report: Omit<VoiceFailureReplayReport, "incidentMarkdown"> | VoiceFailureReplayReport) => string;
|
|
318
|
+
export declare const renderVoiceOperationsRecordIncidentMarkdown: (record: VoiceOperationsRecord) => string;
|
|
319
|
+
export declare const renderVoiceOperationsRecordGuardrailMarkdown: (record: VoiceOperationsRecord) => string;
|
|
320
|
+
export declare const renderVoiceOperationsRecordHTML: (record: VoiceOperationsRecord, options?: {
|
|
321
|
+
incidentHref?: string;
|
|
322
|
+
title?: string;
|
|
323
|
+
}) => string;
|
|
324
|
+
export declare const createVoiceOperationsRecordRoutes: (options: VoiceOperationsRecordRoutesOptions) => Elysia<"", {
|
|
325
|
+
decorator: {};
|
|
326
|
+
store: {};
|
|
327
|
+
derive: {};
|
|
328
|
+
resolve: {};
|
|
329
|
+
}, {
|
|
330
|
+
typebox: {};
|
|
331
|
+
error: {};
|
|
332
|
+
}, {
|
|
333
|
+
schema: {};
|
|
334
|
+
standaloneSchema: {};
|
|
335
|
+
macro: {};
|
|
336
|
+
macroFn: {};
|
|
337
|
+
parser: {};
|
|
338
|
+
response: {};
|
|
339
|
+
}, {}, {
|
|
340
|
+
derive: {};
|
|
341
|
+
resolve: {};
|
|
342
|
+
schema: {};
|
|
343
|
+
standaloneSchema: {};
|
|
344
|
+
response: {};
|
|
345
|
+
}, {
|
|
346
|
+
derive: {};
|
|
347
|
+
resolve: {};
|
|
348
|
+
schema: {};
|
|
349
|
+
standaloneSchema: {};
|
|
350
|
+
response: {};
|
|
351
|
+
}>;
|
|
@@ -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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceDeliverySinkReport, type VoiceDeliverySinkRoutesOptions } from './deliverySinkRoutes';
|
|
2
3
|
import { type VoiceQualityReport } from './qualityRoutes';
|
|
3
4
|
import { type VoiceRoutingEvent } from './resilienceRoutes';
|
|
4
5
|
import { type VoiceSessionListItem } from './sessionReplay';
|
|
@@ -17,6 +18,7 @@ export type VoiceOpsConsoleReport = {
|
|
|
17
18
|
total: number;
|
|
18
19
|
};
|
|
19
20
|
links: VoiceOpsConsoleLink[];
|
|
21
|
+
deliverySinks?: VoiceDeliverySinkReport;
|
|
20
22
|
providers: {
|
|
21
23
|
degraded: number;
|
|
22
24
|
healthy: number;
|
|
@@ -34,6 +36,7 @@ export type VoiceOpsConsoleReport = {
|
|
|
34
36
|
};
|
|
35
37
|
export type VoiceOpsConsoleRoutesOptions = {
|
|
36
38
|
headers?: HeadersInit;
|
|
39
|
+
deliverySinks?: false | VoiceDeliverySinkRoutesOptions;
|
|
37
40
|
links?: VoiceOpsConsoleLink[];
|
|
38
41
|
llmProviders?: readonly string[];
|
|
39
42
|
name?: string;
|
|
@@ -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>;
|