@absolutejs/voice 0.0.22-beta.156 → 0.0.22-beta.157
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/dist/index.d.ts +1 -1
- package/dist/index.js +46 -0
- package/dist/productionReadiness.d.ts +15 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ export type { VoicePhoneAgentCarrier, VoicePhoneAgentCarrierSummary, VoicePhoneA
|
|
|
102
102
|
export type { VoicePhoneAgentProductionSmokeIssue, VoicePhoneAgentProductionSmokeHandlerOptions, VoicePhoneAgentProductionSmokeHTMLHandlerOptions, VoicePhoneAgentProductionSmokeOptions, VoicePhoneAgentProductionSmokeReport, VoicePhoneAgentProductionSmokeRoutesOptions, VoicePhoneAgentProductionSmokeRequirement } from './phoneAgentProductionSmoke';
|
|
103
103
|
export type { VoiceOpsConsoleLink, VoiceOpsConsoleReport, VoiceOpsConsoleRoutesOptions } from './opsConsoleRoutes';
|
|
104
104
|
export type { VoiceOpsStatus, VoiceOpsStatusLink, VoiceOpsStatusOptions, VoiceOpsStatusReport, VoiceOpsStatusRoutesOptions } from './opsStatus';
|
|
105
|
-
export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessCheck, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
|
|
105
|
+
export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessCheck, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
|
|
106
106
|
export type { VoiceQualityLink, VoiceQualityMetric, VoiceQualityReport, VoiceQualityRoutesOptions, VoiceQualityStatus, VoiceQualityThresholds } from './qualityRoutes';
|
|
107
107
|
export type { VoiceResilienceIOSimulator, VoiceResilienceLink, VoiceResiliencePageData, VoiceResilienceRoutesOptions, VoiceResilienceSimulationProvider, VoiceRoutingKindSummary, VoiceRoutingDecisionSummary, VoiceRoutingDecisionSummaryOptions, VoiceRoutingEvent, VoiceRoutingEventKind, VoiceRoutingSessionSummary, VoiceRoutingSessionSummaryOptions } from './resilienceRoutes';
|
|
108
108
|
export type { VoiceIOProviderRouterEvent, VoiceIOProviderRouterOptions, VoiceIOProviderRouterPolicy, VoiceIOProviderRouterPolicyConfig, VoiceSTTProviderRouterOptions, VoiceTTSProviderRouterOptions } from './providerAdapters';
|
package/dist/index.js
CHANGED
|
@@ -20274,6 +20274,31 @@ var summarizeAuditDeliveries = async (options) => {
|
|
|
20274
20274
|
warnPendingAfterMs
|
|
20275
20275
|
};
|
|
20276
20276
|
};
|
|
20277
|
+
var summarizeOpsActionHistory = async (options) => {
|
|
20278
|
+
if (!options.opsActionHistory) {
|
|
20279
|
+
return;
|
|
20280
|
+
}
|
|
20281
|
+
const opsActionHistory = "list" in options.opsActionHistory ? {
|
|
20282
|
+
failOnFailedActions: true,
|
|
20283
|
+
store: options.opsActionHistory,
|
|
20284
|
+
warnWhenEmpty: false
|
|
20285
|
+
} : {
|
|
20286
|
+
failOnFailedActions: options.opsActionHistory.failOnFailedActions ?? true,
|
|
20287
|
+
store: options.opsActionHistory.store,
|
|
20288
|
+
warnWhenEmpty: options.opsActionHistory.warnWhenEmpty ?? false
|
|
20289
|
+
};
|
|
20290
|
+
const report = await buildVoiceOpsActionHistoryReport({
|
|
20291
|
+
audit: opsActionHistory.store
|
|
20292
|
+
});
|
|
20293
|
+
const status = report.failed > 0 ? opsActionHistory.failOnFailedActions ? "fail" : "warn" : report.total === 0 && opsActionHistory.warnWhenEmpty ? "warn" : "pass";
|
|
20294
|
+
return {
|
|
20295
|
+
failed: report.failed,
|
|
20296
|
+
passed: report.passed,
|
|
20297
|
+
status,
|
|
20298
|
+
total: report.total,
|
|
20299
|
+
warnWhenEmpty: opsActionHistory.warnWhenEmpty
|
|
20300
|
+
};
|
|
20301
|
+
};
|
|
20277
20302
|
var summarizeTraceDeliveries = async (options) => {
|
|
20278
20303
|
if (!options.traceDeliveries) {
|
|
20279
20304
|
return;
|
|
@@ -20378,6 +20403,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
20378
20403
|
handoffs,
|
|
20379
20404
|
audit,
|
|
20380
20405
|
auditDeliveries,
|
|
20406
|
+
opsActionHistory,
|
|
20381
20407
|
traceDeliveries,
|
|
20382
20408
|
deliveryRuntimeSummary,
|
|
20383
20409
|
carriers,
|
|
@@ -20407,6 +20433,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
20407
20433
|
summarizeVoiceHandoffHealth({ events }),
|
|
20408
20434
|
summarizeAuditEvidence(options),
|
|
20409
20435
|
summarizeAuditDeliveries(options),
|
|
20436
|
+
summarizeOpsActionHistory(options),
|
|
20410
20437
|
summarizeTraceDeliveries(options),
|
|
20411
20438
|
resolveDeliveryRuntime(options, { query, request }),
|
|
20412
20439
|
resolveCarriers(options, { query, request }),
|
|
@@ -20689,6 +20716,23 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
20689
20716
|
]
|
|
20690
20717
|
});
|
|
20691
20718
|
}
|
|
20719
|
+
if (opsActionHistory) {
|
|
20720
|
+
checks.push({
|
|
20721
|
+
detail: opsActionHistory.status === "pass" ? opsActionHistory.total > 0 ? `${opsActionHistory.passed} operator action(s) completed successfully.` : "No operator action failures are recorded." : opsActionHistory.failed > 0 ? `${opsActionHistory.failed} operator action(s) failed and need review.` : "No operator action history is recorded yet.",
|
|
20722
|
+
href: options.links?.opsActions ?? "/voice/ops-actions",
|
|
20723
|
+
label: "Operator action history",
|
|
20724
|
+
proofSource: proofSource("opsActions", "operatorActions"),
|
|
20725
|
+
status: opsActionHistory.status,
|
|
20726
|
+
value: `${opsActionHistory.passed}/${opsActionHistory.total}`,
|
|
20727
|
+
actions: opsActionHistory.status === "pass" ? [] : [
|
|
20728
|
+
{
|
|
20729
|
+
description: "Open operator action history and inspect failed control-plane actions.",
|
|
20730
|
+
href: options.links?.opsActions ?? "/voice/ops-actions",
|
|
20731
|
+
label: "Open action history"
|
|
20732
|
+
}
|
|
20733
|
+
]
|
|
20734
|
+
});
|
|
20735
|
+
}
|
|
20692
20736
|
if (traceDeliveries) {
|
|
20693
20737
|
checks.push({
|
|
20694
20738
|
detail: traceDeliveries.status === "pass" ? "Trace sink deliveries are clear." : traceDeliveries.staleFailing > 0 ? `${traceDeliveries.staleFailing} trace delivery item(s) are stale past ${Math.round(traceDeliveries.failPendingAfterMs / 1000)}s.` : traceDeliveries.failed > 0 || traceDeliveries.deadLettered > 0 ? `${traceDeliveries.failed} failed and ${traceDeliveries.deadLettered} dead-lettered trace delivery item(s).` : `${traceDeliveries.pending} trace delivery item(s) are pending.`,
|
|
@@ -20752,6 +20796,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
20752
20796
|
handoffs: "/handoffs",
|
|
20753
20797
|
handoffRetry: "/api/voice-handoffs/retry",
|
|
20754
20798
|
liveLatency: "/traces",
|
|
20799
|
+
opsActions: "/voice/ops-actions",
|
|
20755
20800
|
phoneAgentSmoke: "/sessions",
|
|
20756
20801
|
providerRoutingContracts: "/resilience",
|
|
20757
20802
|
quality: "/quality",
|
|
@@ -20775,6 +20820,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
20775
20820
|
total: handoffs.total
|
|
20776
20821
|
},
|
|
20777
20822
|
liveLatency,
|
|
20823
|
+
opsActionHistory,
|
|
20778
20824
|
providers: {
|
|
20779
20825
|
degraded: degradedProviders,
|
|
20780
20826
|
total: providers.length
|
|
@@ -47,6 +47,7 @@ export type VoiceProductionReadinessReport = {
|
|
|
47
47
|
handoffs?: string;
|
|
48
48
|
handoffRetry?: string;
|
|
49
49
|
liveLatency?: string;
|
|
50
|
+
opsActions?: string;
|
|
50
51
|
phoneAgentSmoke?: string;
|
|
51
52
|
providerRoutingContracts?: string;
|
|
52
53
|
quality?: string;
|
|
@@ -92,6 +93,7 @@ export type VoiceProductionReadinessReport = {
|
|
|
92
93
|
total: number;
|
|
93
94
|
warnings: number;
|
|
94
95
|
};
|
|
96
|
+
opsActionHistory?: VoiceProductionReadinessOpsActionHistorySummary;
|
|
95
97
|
providers: {
|
|
96
98
|
degraded: number;
|
|
97
99
|
total: number;
|
|
@@ -171,6 +173,13 @@ export type VoiceProductionReadinessTraceDeliverySummary = {
|
|
|
171
173
|
total: number;
|
|
172
174
|
warnPendingAfterMs: number;
|
|
173
175
|
};
|
|
176
|
+
export type VoiceProductionReadinessOpsActionHistorySummary = {
|
|
177
|
+
failed: number;
|
|
178
|
+
passed: number;
|
|
179
|
+
status: VoiceProductionReadinessStatus;
|
|
180
|
+
total: number;
|
|
181
|
+
warnWhenEmpty: boolean;
|
|
182
|
+
};
|
|
174
183
|
export type VoiceProductionReadinessDeliveryRuntimeSummary = {
|
|
175
184
|
audit?: VoiceProductionReadinessDeliveryRuntimeQueueSummary;
|
|
176
185
|
deadLettered: number;
|
|
@@ -208,6 +217,11 @@ export type VoiceProductionReadinessTraceDeliveryOptions = VoiceTraceSinkDeliver
|
|
|
208
217
|
store: VoiceTraceSinkDeliveryStore;
|
|
209
218
|
warnPendingAfterMs?: number;
|
|
210
219
|
};
|
|
220
|
+
export type VoiceProductionReadinessOpsActionHistoryOptions = VoiceAuditEventStore | {
|
|
221
|
+
failOnFailedActions?: boolean;
|
|
222
|
+
store: VoiceAuditEventStore;
|
|
223
|
+
warnWhenEmpty?: boolean;
|
|
224
|
+
};
|
|
211
225
|
export type VoiceProductionReadinessRoutesOptions = {
|
|
212
226
|
agentSquadContracts?: false | readonly VoiceAgentSquadContractReport[] | ((input: {
|
|
213
227
|
query: Record<string, unknown>;
|
|
@@ -232,6 +246,7 @@ export type VoiceProductionReadinessRoutesOptions = {
|
|
|
232
246
|
links?: VoiceProductionReadinessReport['links'];
|
|
233
247
|
llmProviders?: readonly string[];
|
|
234
248
|
name?: string;
|
|
249
|
+
opsActionHistory?: false | VoiceProductionReadinessOpsActionHistoryOptions;
|
|
235
250
|
path?: string;
|
|
236
251
|
phoneAgentSmokes?: false | readonly VoicePhoneAgentProductionSmokeReport[] | ((input: {
|
|
237
252
|
query: Record<string, unknown>;
|