@absolutejs/voice 0.0.22-beta.219 → 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 +16 -0
- package/dist/index.js +39 -0
- package/dist/productionReadiness.d.ts +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2786,6 +2786,22 @@ const exportReport = await buildVoiceObservabilityExport({
|
|
|
2786
2786
|
|
|
2787
2787
|
The route helper exposes JSON at `/api/voice/observability-export`, Markdown at `/voice/observability-export.md`, and HTML at `/voice/observability-export`. Failed trace/audit deliveries fail the export report, pending deliveries warn, and every trace/audit envelope includes the linked operations-record URL when one is configured. This is the primitive to use when customers ask how voice evidence leaves the app without going through a hosted vendor dashboard.
|
|
2788
2788
|
|
|
2789
|
+
Pass the same report into production readiness when export health should block deploys:
|
|
2790
|
+
|
|
2791
|
+
```ts
|
|
2792
|
+
app.use(
|
|
2793
|
+
createVoiceProductionReadinessRoutes({
|
|
2794
|
+
links: {
|
|
2795
|
+
observabilityExport: '/voice/observability-export'
|
|
2796
|
+
},
|
|
2797
|
+
observabilityExport: exportReport,
|
|
2798
|
+
store: runtimeStorage.traces
|
|
2799
|
+
})
|
|
2800
|
+
);
|
|
2801
|
+
```
|
|
2802
|
+
|
|
2803
|
+
Readiness adds an `Observability export` check. Failed export deliveries fail the deploy gate; pending or missing evidence can warn through the export report instead of becoming an untracked dashboard task.
|
|
2804
|
+
|
|
2789
2805
|
## Production Voice Ops
|
|
2790
2806
|
|
|
2791
2807
|
The recommended production pattern is:
|
package/dist/index.js
CHANGED
|
@@ -22728,6 +22728,15 @@ var resolveOpsRecovery = async (options, input) => {
|
|
|
22728
22728
|
}
|
|
22729
22729
|
return options.opsRecovery;
|
|
22730
22730
|
};
|
|
22731
|
+
var resolveObservabilityExport = async (options, input) => {
|
|
22732
|
+
if (!options.observabilityExport) {
|
|
22733
|
+
return;
|
|
22734
|
+
}
|
|
22735
|
+
if (typeof options.observabilityExport === "function") {
|
|
22736
|
+
return options.observabilityExport(input);
|
|
22737
|
+
}
|
|
22738
|
+
return options.observabilityExport;
|
|
22739
|
+
};
|
|
22731
22740
|
var summarizeTraceDeliveries = async (options) => {
|
|
22732
22741
|
if (!options.traceDeliveries) {
|
|
22733
22742
|
return;
|
|
@@ -22886,6 +22895,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
22886
22895
|
bargeInReports,
|
|
22887
22896
|
campaignReadiness,
|
|
22888
22897
|
opsRecovery,
|
|
22898
|
+
observabilityExport,
|
|
22889
22899
|
proofSources
|
|
22890
22900
|
] = await Promise.all([
|
|
22891
22901
|
evaluateVoiceQuality({ events }),
|
|
@@ -22921,6 +22931,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
22921
22931
|
resolveBargeInReports(options, { query, request }),
|
|
22922
22932
|
resolveCampaignReadiness(options, { query, request }),
|
|
22923
22933
|
resolveOpsRecovery(options, { query, request }),
|
|
22934
|
+
resolveObservabilityExport(options, { query, request }),
|
|
22924
22935
|
resolveProofSources(options, { query, request })
|
|
22925
22936
|
]);
|
|
22926
22937
|
const deliveryRuntime = summarizeDeliveryRuntime(deliveryRuntimeSummary);
|
|
@@ -23140,6 +23151,14 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
23140
23151
|
status: campaignReadiness.ok ? "pass" : "fail",
|
|
23141
23152
|
total: campaignReadiness.checks.length
|
|
23142
23153
|
} : undefined;
|
|
23154
|
+
const observabilityExportSummary = observabilityExport ? {
|
|
23155
|
+
artifacts: observabilityExport.artifacts.length,
|
|
23156
|
+
auditEvents: observabilityExport.summary.auditEvents,
|
|
23157
|
+
envelopes: observabilityExport.envelopes.length,
|
|
23158
|
+
issues: observabilityExport.issues.length,
|
|
23159
|
+
status: observabilityExport.status,
|
|
23160
|
+
traceEvents: observabilityExport.summary.traceEvents
|
|
23161
|
+
} : undefined;
|
|
23143
23162
|
if (agentSquadContractSummary) {
|
|
23144
23163
|
checks.push({
|
|
23145
23164
|
detail: agentSquadContractSummary.status === "pass" ? `${agentSquadContractSummary.passed} agent squad contract(s) are passing.` : agentSquadContractSummary.total === 0 ? "No agent squad contracts are configured." : `${agentSquadContractSummary.failed} agent squad contract(s) failed.`,
|
|
@@ -23198,6 +23217,24 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
23198
23217
|
]
|
|
23199
23218
|
});
|
|
23200
23219
|
}
|
|
23220
|
+
if (observabilityExportSummary && observabilityExport) {
|
|
23221
|
+
const firstIssue = observabilityExport.issues[0];
|
|
23222
|
+
checks.push({
|
|
23223
|
+
detail: observabilityExportSummary.status === "pass" ? `${observabilityExportSummary.envelopes} observability envelope(s), ${observabilityExportSummary.artifacts} artifact(s), and no export issues are ready for customer-owned storage.` : firstIssue?.detail ?? `${observabilityExportSummary.issues} observability export issue(s) need review.`,
|
|
23224
|
+
href: options.links?.observabilityExport ?? "/voice/observability-export",
|
|
23225
|
+
label: "Observability export",
|
|
23226
|
+
proofSource: proofSource("observabilityExport", "observability"),
|
|
23227
|
+
status: observabilityExportSummary.status,
|
|
23228
|
+
value: `${observabilityExportSummary.envelopes}/${observabilityExportSummary.artifacts}`,
|
|
23229
|
+
actions: observabilityExportSummary.status === "pass" ? [] : [
|
|
23230
|
+
{
|
|
23231
|
+
description: "Open the customer-owned observability export manifest and inspect trace, audit, delivery, operations-record, and proof-pack evidence.",
|
|
23232
|
+
href: options.links?.observabilityExport ?? "/voice/observability-export",
|
|
23233
|
+
label: "Open observability export"
|
|
23234
|
+
}
|
|
23235
|
+
]
|
|
23236
|
+
});
|
|
23237
|
+
}
|
|
23201
23238
|
if (providerStack) {
|
|
23202
23239
|
const missingLanes = providerStack.gaps.filter((gap) => gap.status !== "pass");
|
|
23203
23240
|
checks.push({
|
|
@@ -23420,6 +23457,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
23420
23457
|
handoffRetry: "/api/voice-handoffs/retry",
|
|
23421
23458
|
liveLatency: "/traces",
|
|
23422
23459
|
operationsRecords: "/voice-operations",
|
|
23460
|
+
observabilityExport: "/voice/observability-export",
|
|
23423
23461
|
opsActions: "/voice/ops-actions",
|
|
23424
23462
|
opsRecovery: "/ops-recovery",
|
|
23425
23463
|
phoneAgentSmoke: "/sessions",
|
|
@@ -23457,6 +23495,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
23457
23495
|
status: opsRecovery.status,
|
|
23458
23496
|
unresolvedProviderFailures: opsRecovery.providers.unresolvedFailures
|
|
23459
23497
|
} : undefined,
|
|
23498
|
+
observabilityExport: observabilityExportSummary,
|
|
23460
23499
|
providers: {
|
|
23461
23500
|
degraded: degradedProviders,
|
|
23462
23501
|
total: providers.length
|
|
@@ -15,6 +15,7 @@ import type { VoiceProviderContractMatrixReport, VoiceProviderStackCapabilityGap
|
|
|
15
15
|
import { type VoiceProviderSloReport, type VoiceProviderSloReportOptions } from './providerSlo';
|
|
16
16
|
import type { VoiceCampaignReadinessProofReport } from './campaign';
|
|
17
17
|
import { type VoiceOpsRecoveryReport } from './opsRecovery';
|
|
18
|
+
import type { VoiceObservabilityExportReport } from './observabilityExport';
|
|
18
19
|
export type VoiceProductionReadinessStatus = 'fail' | 'pass' | 'warn';
|
|
19
20
|
export type VoiceProductionReadinessAction = {
|
|
20
21
|
description?: string;
|
|
@@ -91,6 +92,7 @@ export type VoiceProductionReadinessReport = {
|
|
|
91
92
|
handoffRetry?: string;
|
|
92
93
|
liveLatency?: string;
|
|
93
94
|
operationsRecords?: string;
|
|
95
|
+
observabilityExport?: string;
|
|
94
96
|
opsActions?: string;
|
|
95
97
|
opsRecovery?: string;
|
|
96
98
|
phoneAgentSmoke?: string;
|
|
@@ -155,6 +157,14 @@ export type VoiceProductionReadinessReport = {
|
|
|
155
157
|
status: VoiceProductionReadinessStatus;
|
|
156
158
|
unresolvedProviderFailures: number;
|
|
157
159
|
};
|
|
160
|
+
observabilityExport?: {
|
|
161
|
+
artifacts: number;
|
|
162
|
+
auditEvents: number;
|
|
163
|
+
envelopes: number;
|
|
164
|
+
issues: number;
|
|
165
|
+
status: VoiceProductionReadinessStatus;
|
|
166
|
+
traceEvents: number;
|
|
167
|
+
};
|
|
158
168
|
providers: {
|
|
159
169
|
degraded: number;
|
|
160
170
|
total: number;
|
|
@@ -338,6 +348,10 @@ export type VoiceProductionReadinessRoutesOptions = {
|
|
|
338
348
|
query: Record<string, unknown>;
|
|
339
349
|
request: Request;
|
|
340
350
|
}) => Promise<VoiceOpsRecoveryReport> | VoiceOpsRecoveryReport);
|
|
351
|
+
observabilityExport?: false | VoiceObservabilityExportReport | ((input: {
|
|
352
|
+
query: Record<string, unknown>;
|
|
353
|
+
request: Request;
|
|
354
|
+
}) => Promise<VoiceObservabilityExportReport> | VoiceObservabilityExportReport);
|
|
341
355
|
path?: string;
|
|
342
356
|
phoneAgentSmokes?: false | readonly VoicePhoneAgentProductionSmokeReport[] | ((input: {
|
|
343
357
|
query: Record<string, unknown>;
|