@absolutejs/voice 0.0.22-beta.228 → 0.0.22-beta.229
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 +14 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +24 -0
- package/dist/observabilityExport.d.ts +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2753,6 +2753,19 @@ Readiness emits the stable `voice.readiness.ops_recovery` gate code when unresol
|
|
|
2753
2753
|
|
|
2754
2754
|
Use observability exports when a buyer wants the hosted-dashboard evidence graph, but inside their own storage, warehouse, SIEM, incident flow, or release notes. The export manifest links traces, audits, operations records, delivery queues, provider SLOs, readiness reports, screenshots, and proof-pack artifacts without making AbsoluteJS Voice the dashboard.
|
|
2755
2755
|
|
|
2756
|
+
Every export manifest and artifact index includes a stable schema contract:
|
|
2757
|
+
|
|
2758
|
+
```ts
|
|
2759
|
+
import {
|
|
2760
|
+
assertVoiceObservabilityExportSchema,
|
|
2761
|
+
voiceObservabilityExportSchemaId,
|
|
2762
|
+
voiceObservabilityExportSchemaVersion
|
|
2763
|
+
} from '@absolutejs/voice';
|
|
2764
|
+
|
|
2765
|
+
assertVoiceObservabilityExportSchema(exportReport);
|
|
2766
|
+
console.log(voiceObservabilityExportSchemaId, voiceObservabilityExportSchemaVersion);
|
|
2767
|
+
```
|
|
2768
|
+
|
|
2756
2769
|
```ts
|
|
2757
2770
|
import {
|
|
2758
2771
|
buildVoiceObservabilityExport,
|
|
@@ -2832,7 +2845,7 @@ const exportReport = await buildVoiceObservabilityExport({
|
|
|
2832
2845
|
});
|
|
2833
2846
|
```
|
|
2834
2847
|
|
|
2835
|
-
The route helper exposes JSON at `/api/voice/observability-export`, an artifact index at `/api/voice/observability-export/artifacts`, per-artifact downloads at `/api/voice/observability-export/artifacts/:artifactId`, delivery at `POST /api/voice/observability-export/deliveries`, delivery history at `GET /api/voice/observability-export/deliveries`, Markdown at `/voice/observability-export.md`, and HTML at `/voice/observability-export`. Path-backed artifacts are hashed with SHA-256 by default, include byte size and freshness metadata, and can fail the export when required evidence is missing or stale. File delivery writes `manifest.json`, `artifact-index.json`, and artifact files into a customer-owned archive directory; webhook delivery posts the manifest and artifact index to a buyer-owned collector, SIEM bridge, or warehouse endpoint; S3 delivery writes the same manifest, index, and artifact files through Bun's native S3 client; SQLite and Postgres delivery persist the manifest, artifact index, checksum metadata, status, run id, and timestamps into buyer-owned database tables. Delivery receipt stores persist run id, destinations, status, and target history so operators can prove exports have been continuously healthy. 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.
|
|
2848
|
+
The route helper exposes JSON at `/api/voice/observability-export`, an artifact index at `/api/voice/observability-export/artifacts`, per-artifact downloads at `/api/voice/observability-export/artifacts/:artifactId`, delivery at `POST /api/voice/observability-export/deliveries`, delivery history at `GET /api/voice/observability-export/deliveries`, Markdown at `/voice/observability-export.md`, and HTML at `/voice/observability-export`. Path-backed artifacts are hashed with SHA-256 by default, include byte size and freshness metadata, and can fail the export when required evidence is missing or stale. File delivery writes `manifest.json`, `artifact-index.json`, and artifact files into a customer-owned archive directory; webhook delivery posts the manifest and artifact index to a buyer-owned collector, SIEM bridge, or warehouse endpoint; S3 delivery writes the same manifest, index, and artifact files through Bun's native S3 client; SQLite and Postgres delivery persist the schema id/version, manifest, artifact index, checksum metadata, status, run id, and timestamps into buyer-owned database tables. Delivery receipt stores persist run id, destinations, status, schema, and target history so operators can prove exports have been continuously healthy. 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.
|
|
2836
2849
|
|
|
2837
2850
|
Pass the same report into production readiness when export health should block deploys:
|
|
2838
2851
|
|
package/dist/index.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export { createVoiceReadinessProfile, recommendVoiceReadinessProfile } from './r
|
|
|
53
53
|
export { buildVoiceProviderContractMatrix, createVoiceProviderContractMatrixHTMLHandler, createVoiceProviderContractMatrixJSONHandler, createVoiceProviderContractMatrixPreset, createVoiceProviderContractMatrixRoutes, evaluateVoiceProviderStackGaps, renderVoiceProviderContractMatrixHTML, recommendVoiceProviderStack } from './providerStackRecommendations';
|
|
54
54
|
export { buildVoiceOpsConsoleReport, createVoiceOpsConsoleRoutes, renderVoiceOpsConsoleHTML } from './opsConsoleRoutes';
|
|
55
55
|
export { buildVoiceOperationsRecord, createVoiceOperationsRecordRoutes, renderVoiceOperationsRecordHTML, renderVoiceOperationsRecordIncidentMarkdown } from './operationsRecord';
|
|
56
|
-
export { buildVoiceObservabilityArtifactIndex, buildVoiceObservabilityExportDeliveryHistory, buildVoiceObservabilityExport, createVoiceFileObservabilityExportDeliveryReceiptStore, createVoiceMemoryObservabilityExportDeliveryReceiptStore, createVoiceObservabilityExportRoutes, deliverVoiceObservabilityExport, renderVoiceObservabilityExportMarkdown } from './observabilityExport';
|
|
56
|
+
export { buildVoiceObservabilityArtifactIndex, buildVoiceObservabilityExportDeliveryHistory, buildVoiceObservabilityExport, assertVoiceObservabilityExportSchema, createVoiceObservabilityExportSchema, createVoiceFileObservabilityExportDeliveryReceiptStore, createVoiceMemoryObservabilityExportDeliveryReceiptStore, createVoiceObservabilityExportRoutes, deliverVoiceObservabilityExport, renderVoiceObservabilityExportMarkdown, voiceObservabilityExportSchemaId, voiceObservabilityExportSchemaVersion } from './observabilityExport';
|
|
57
57
|
export { buildVoiceOpsRecoveryReadinessCheck, buildVoiceOpsRecoveryReport, createVoiceOpsRecoveryRoutes, renderVoiceOpsRecoveryHTML, renderVoiceOpsRecoveryMarkdown } from './opsRecovery';
|
|
58
58
|
export { buildVoiceIncidentBundle, createStoredVoiceIncidentBundleArtifact, createVoiceIncidentBundleRoutes, createVoiceMemoryIncidentBundleStore, pruneVoiceIncidentBundleArtifacts, saveVoiceIncidentBundleArtifact } from './incidentBundle';
|
|
59
59
|
export { summarizeVoiceOpsStatus } from './opsStatus';
|
|
@@ -118,7 +118,7 @@ export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptio
|
|
|
118
118
|
export type { VoiceReadinessProfileName, VoiceReadinessProfileOptions, VoiceReadinessProfileRecommendation, VoiceReadinessProfileRecommendationScore, VoiceReadinessProfileRoutesOptions } from './readinessProfiles';
|
|
119
119
|
export type { VoiceProviderStackChoice, VoiceProviderStackCapabilities, VoiceProviderStackCapabilityGap, VoiceProviderStackCapabilityGapInput, VoiceProviderStackCapabilityGapReport, VoiceProviderContractCheck, VoiceProviderContractCheckStatus, VoiceProviderContractDefinition, VoiceProviderContractMatrixHandlerOptions, VoiceProviderContractMatrixHTMLHandlerOptions, VoiceProviderContractMatrixInput, VoiceProviderContractMatrixPresetOptions, VoiceProviderContractMatrixReport, VoiceProviderContractMatrixRoutesOptions, VoiceProviderContractMatrixRow, VoiceProviderStackInput, VoiceProviderStackKind, VoiceProviderStackRecommendation } from './providerStackRecommendations';
|
|
120
120
|
export type { VoiceOperationsRecord, VoiceOperationsRecordAgentHandoff, VoiceOperationsRecordAuditSummary, VoiceOperationsRecordIntegrationEventSummary, VoiceOperationsRecordOptions, VoiceOperationsRecordOutcome, VoiceOperationsRecordProviderDecision, VoiceOperationsRecordReviewSummary, VoiceOperationsRecordRoutesOptions, VoiceOperationsRecordStatus, VoiceOperationsRecordTaskSummary, VoiceOperationsRecordTranscriptTurn, VoiceOperationsRecordTool } from './operationsRecord';
|
|
121
|
-
export type { VoiceObservabilityExportArtifact, VoiceObservabilityExportArtifactChecksum, VoiceObservabilityExportArtifactFreshness, VoiceObservabilityExportArtifactIndex, VoiceObservabilityExportArtifactIndexItem, VoiceObservabilityExportArtifactKind, VoiceObservabilityExportDeliverySummary, VoiceObservabilityExportDeliveryDestination, VoiceObservabilityExportDeliveryDestinationResult, VoiceObservabilityExportDeliveryHistory, VoiceObservabilityExportDeliveryOptions, VoiceObservabilityExportDeliveryReceipt, VoiceObservabilityExportDeliveryReceiptStore, VoiceObservabilityExportDeliveryReport, VoiceObservabilityExportEnvelope, VoiceObservabilityExportIssue, VoiceObservabilityExportIssueCode, VoiceObservabilityExportOptions, VoiceObservabilityExportRedactionSummary, VoiceObservabilityExportReport, VoiceObservabilityExportRoutesOptions, VoiceObservabilityExportStatus } from './observabilityExport';
|
|
121
|
+
export type { VoiceObservabilityExportArtifact, VoiceObservabilityExportArtifactChecksum, VoiceObservabilityExportArtifactFreshness, VoiceObservabilityExportArtifactIndex, VoiceObservabilityExportArtifactIndexItem, VoiceObservabilityExportArtifactKind, VoiceObservabilityExportDeliverySummary, VoiceObservabilityExportDeliveryDestination, VoiceObservabilityExportDeliveryDestinationResult, VoiceObservabilityExportDeliveryHistory, VoiceObservabilityExportDeliveryOptions, VoiceObservabilityExportDeliveryReceipt, VoiceObservabilityExportDeliveryReceiptStore, VoiceObservabilityExportDeliveryReport, VoiceObservabilityExportEnvelope, VoiceObservabilityExportIssue, VoiceObservabilityExportIssueCode, VoiceObservabilityExportOptions, VoiceObservabilityExportRedactionSummary, VoiceObservabilityExportReport, VoiceObservabilityExportRoutesOptions, VoiceObservabilityExportSchema, VoiceObservabilityExportStatus } from './observabilityExport';
|
|
122
122
|
export type { VoiceOpsRecoveryFailedSession, VoiceOpsRecoveryInterventionSummary, VoiceOpsRecoveryIssue, VoiceOpsRecoveryIssueCode, VoiceOpsRecoveryLinks, VoiceOpsRecoveryProviderSummary, VoiceOpsRecoveryReport, VoiceOpsRecoveryReportOptions, VoiceOpsRecoveryRoutesOptions, VoiceOpsRecoveryStatus } from './opsRecovery';
|
|
123
123
|
export type { StoredVoiceIncidentBundleArtifact, VoiceIncidentBundle, VoiceIncidentBundleArtifactOptions, VoiceIncidentBundleFormat, VoiceIncidentBundleOptions, VoiceIncidentBundleRetentionOptions, VoiceIncidentBundleRetentionReport, VoiceIncidentBundleRoutesOptions, VoiceIncidentBundleStore, VoiceIncidentBundleStoreFilter, VoiceIncidentBundleSummary } from './incidentBundle';
|
|
124
124
|
export type { VoiceQualityLink, VoiceQualityMetric, VoiceQualityReport, VoiceQualityRoutesOptions, VoiceQualityStatus, VoiceQualityThresholds } from './qualityRoutes';
|
package/dist/index.js
CHANGED
|
@@ -22987,6 +22987,17 @@ var createVoiceOperationsRecordRoutes = (options) => {
|
|
|
22987
22987
|
};
|
|
22988
22988
|
|
|
22989
22989
|
// src/observabilityExport.ts
|
|
22990
|
+
var voiceObservabilityExportSchemaVersion = "1.0.0";
|
|
22991
|
+
var voiceObservabilityExportSchemaId = "com.absolutejs.voice.observability-export";
|
|
22992
|
+
var createVoiceObservabilityExportSchema = () => ({
|
|
22993
|
+
id: voiceObservabilityExportSchemaId,
|
|
22994
|
+
version: voiceObservabilityExportSchemaVersion
|
|
22995
|
+
});
|
|
22996
|
+
var assertVoiceObservabilityExportSchema = (input) => {
|
|
22997
|
+
if (input.schema?.id !== voiceObservabilityExportSchemaId || input.schema?.version !== voiceObservabilityExportSchemaVersion) {
|
|
22998
|
+
throw new Error(`Unsupported voice observability export schema: ${input.schema?.id ?? "missing"}@${input.schema?.version ?? "missing"}`);
|
|
22999
|
+
}
|
|
23000
|
+
};
|
|
22990
23001
|
var isDeliveryStore = (value) => !Array.isArray(value) && typeof value.list === "function";
|
|
22991
23002
|
var getString17 = (value) => typeof value === "string" ? value : undefined;
|
|
22992
23003
|
var getProviderKind = (payload) => getString17(payload.kind) ?? getString17(payload.providerKind);
|
|
@@ -23048,6 +23059,7 @@ var buildObservabilityExportDatabaseRecord = (input) => ({
|
|
|
23048
23059
|
exportStatus: input.report.status,
|
|
23049
23060
|
manifest: input.report,
|
|
23050
23061
|
runId: input.runId,
|
|
23062
|
+
schema: input.report.schema,
|
|
23051
23063
|
status: input.report.status
|
|
23052
23064
|
});
|
|
23053
23065
|
var deliverObservabilityExportToSQLite = async (input) => {
|
|
@@ -23460,6 +23472,7 @@ var buildVoiceObservabilityExport = async (options = {}) => {
|
|
|
23460
23472
|
enabled: Boolean(options.redact),
|
|
23461
23473
|
mode: options.redact ? "redacted" : "none"
|
|
23462
23474
|
},
|
|
23475
|
+
schema: createVoiceObservabilityExportSchema(),
|
|
23463
23476
|
sessionIds,
|
|
23464
23477
|
status,
|
|
23465
23478
|
summary: {
|
|
@@ -23528,6 +23541,7 @@ var buildVoiceObservabilityArtifactIndex = (report) => {
|
|
|
23528
23541
|
return {
|
|
23529
23542
|
artifacts,
|
|
23530
23543
|
checkedAt: report.checkedAt,
|
|
23544
|
+
schema: report.schema,
|
|
23531
23545
|
status: report.status,
|
|
23532
23546
|
summary: {
|
|
23533
23547
|
downloadable: artifacts.filter((artifact) => artifact.downloadHref).length,
|
|
@@ -23570,6 +23584,7 @@ var deliverVoiceObservabilityExport = async (options) => {
|
|
|
23570
23584
|
destinationKind: destination.kind,
|
|
23571
23585
|
label,
|
|
23572
23586
|
manifestBytes: byteLength(manifest),
|
|
23587
|
+
schema: options.report.schema,
|
|
23573
23588
|
status: "delivered",
|
|
23574
23589
|
target
|
|
23575
23590
|
};
|
|
@@ -23614,6 +23629,7 @@ var deliverVoiceObservabilityExport = async (options) => {
|
|
|
23614
23629
|
destinationKind: destination.kind,
|
|
23615
23630
|
label,
|
|
23616
23631
|
manifestBytes: byteLength(manifest),
|
|
23632
|
+
schema: options.report.schema,
|
|
23617
23633
|
status: "delivered",
|
|
23618
23634
|
target: destination.bucket ? `s3://${destination.bucket}/${rootKey}` : rootKey
|
|
23619
23635
|
};
|
|
@@ -23635,6 +23651,7 @@ var deliverVoiceObservabilityExport = async (options) => {
|
|
|
23635
23651
|
destinationKind: destination.kind,
|
|
23636
23652
|
label,
|
|
23637
23653
|
manifestBytes: byteLength(manifest),
|
|
23654
|
+
schema: options.report.schema,
|
|
23638
23655
|
status: "delivered",
|
|
23639
23656
|
target
|
|
23640
23657
|
};
|
|
@@ -23656,6 +23673,7 @@ var deliverVoiceObservabilityExport = async (options) => {
|
|
|
23656
23673
|
destinationKind: destination.kind,
|
|
23657
23674
|
label,
|
|
23658
23675
|
manifestBytes: byteLength(manifest),
|
|
23676
|
+
schema: options.report.schema,
|
|
23659
23677
|
status: "delivered",
|
|
23660
23678
|
target
|
|
23661
23679
|
};
|
|
@@ -23691,6 +23709,7 @@ var deliverVoiceObservabilityExport = async (options) => {
|
|
|
23691
23709
|
destinationKind: destination.kind,
|
|
23692
23710
|
label,
|
|
23693
23711
|
manifestBytes: byteLength(manifest),
|
|
23712
|
+
schema: options.report.schema,
|
|
23694
23713
|
status: "delivered",
|
|
23695
23714
|
target: destination.url
|
|
23696
23715
|
};
|
|
@@ -23703,6 +23722,7 @@ var deliverVoiceObservabilityExport = async (options) => {
|
|
|
23703
23722
|
error: error instanceof Error ? error.message : String(error),
|
|
23704
23723
|
label,
|
|
23705
23724
|
manifestBytes: byteLength(manifest),
|
|
23725
|
+
schema: options.report.schema,
|
|
23706
23726
|
status: "failed",
|
|
23707
23727
|
target: observabilityExportDeliveryFailureTarget(destination)
|
|
23708
23728
|
};
|
|
@@ -28434,6 +28454,8 @@ export {
|
|
|
28434
28454
|
withVoiceOpsTaskId,
|
|
28435
28455
|
withVoiceIntegrationEventId,
|
|
28436
28456
|
voiceTelephonyOutcomeToRouteResult,
|
|
28457
|
+
voiceObservabilityExportSchemaVersion,
|
|
28458
|
+
voiceObservabilityExportSchemaId,
|
|
28437
28459
|
voiceComplianceRedactionDefaults,
|
|
28438
28460
|
voice,
|
|
28439
28461
|
verifyVoiceTwilioWebhookSignature,
|
|
@@ -28741,6 +28763,7 @@ export {
|
|
|
28741
28763
|
createVoiceOpsConsoleRoutes,
|
|
28742
28764
|
createVoiceOpsActionAuditRoutes,
|
|
28743
28765
|
createVoiceOperationsRecordRoutes,
|
|
28766
|
+
createVoiceObservabilityExportSchema,
|
|
28744
28767
|
createVoiceObservabilityExportRoutes,
|
|
28745
28768
|
createVoiceMemoryTraceSinkDeliveryStore,
|
|
28746
28769
|
createVoiceMemoryTraceEventStore,
|
|
@@ -28898,6 +28921,7 @@ export {
|
|
|
28898
28921
|
buildVoiceAuditDeliveryReport,
|
|
28899
28922
|
assignVoiceOpsTask,
|
|
28900
28923
|
assertVoiceProviderRoutingContract,
|
|
28924
|
+
assertVoiceObservabilityExportSchema,
|
|
28901
28925
|
assertVoiceLatencySLOGate,
|
|
28902
28926
|
assertVoiceAgentSquadContract,
|
|
28903
28927
|
applyVoiceTelephonyOutcome,
|
|
@@ -8,6 +8,16 @@ import { type VoiceTraceSinkDeliveryQueueSummary } from './queue';
|
|
|
8
8
|
import { type StoredVoiceTraceEvent, type VoiceTraceEventStore, type VoiceTraceEventType, type VoiceTraceRedactionConfig, type VoiceTraceSinkDeliveryRecord, type VoiceTraceSinkDeliveryStore, type VoiceTraceSummary } from './trace';
|
|
9
9
|
import type { VoicePostgresClient } from './postgresStore';
|
|
10
10
|
export type VoiceObservabilityExportStatus = 'fail' | 'pass' | 'warn';
|
|
11
|
+
export declare const voiceObservabilityExportSchemaVersion = "1.0.0";
|
|
12
|
+
export declare const voiceObservabilityExportSchemaId = "com.absolutejs.voice.observability-export";
|
|
13
|
+
export type VoiceObservabilityExportSchema = {
|
|
14
|
+
id: typeof voiceObservabilityExportSchemaId;
|
|
15
|
+
version: typeof voiceObservabilityExportSchemaVersion;
|
|
16
|
+
};
|
|
17
|
+
export declare const createVoiceObservabilityExportSchema: () => VoiceObservabilityExportSchema;
|
|
18
|
+
export declare const assertVoiceObservabilityExportSchema: (input: {
|
|
19
|
+
schema?: Partial<VoiceObservabilityExportSchema>;
|
|
20
|
+
}) => void;
|
|
11
21
|
export type VoiceObservabilityExportArtifactKind = 'incident' | 'markdown' | 'operations-record' | 'proof-pack' | 'readiness' | 'screenshot' | 'slo' | 'trace' | 'audit' | 'custom';
|
|
12
22
|
export type VoiceObservabilityExportArtifactChecksum = {
|
|
13
23
|
algorithm: 'sha256';
|
|
@@ -74,6 +84,7 @@ export type VoiceObservabilityExportReport = {
|
|
|
74
84
|
issues: VoiceObservabilityExportIssue[];
|
|
75
85
|
operationsRecords: VoiceOperationsRecord[];
|
|
76
86
|
redaction: VoiceObservabilityExportRedactionSummary;
|
|
87
|
+
schema: VoiceObservabilityExportSchema;
|
|
77
88
|
sessionIds: string[];
|
|
78
89
|
status: VoiceObservabilityExportStatus;
|
|
79
90
|
summary: {
|
|
@@ -101,6 +112,7 @@ export type VoiceObservabilityExportArtifactIndexItem = {
|
|
|
101
112
|
export type VoiceObservabilityExportArtifactIndex = {
|
|
102
113
|
artifacts: VoiceObservabilityExportArtifactIndexItem[];
|
|
103
114
|
checkedAt: number;
|
|
115
|
+
schema: VoiceObservabilityExportSchema;
|
|
104
116
|
status: VoiceObservabilityExportStatus;
|
|
105
117
|
summary: {
|
|
106
118
|
downloadable: number;
|
|
@@ -157,6 +169,7 @@ export type VoiceObservabilityExportDeliveryDestinationResult = {
|
|
|
157
169
|
error?: string;
|
|
158
170
|
label: string;
|
|
159
171
|
manifestBytes: number;
|
|
172
|
+
schema: VoiceObservabilityExportSchema;
|
|
160
173
|
status: 'delivered' | 'failed';
|
|
161
174
|
target: string;
|
|
162
175
|
};
|