@absolutejs/voice 0.0.22-beta.233 → 0.0.22-beta.234

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 CHANGED
@@ -2895,12 +2895,18 @@ app.use(
2895
2895
  maxAgeMs: 60 * 60 * 1000,
2896
2896
  store: observabilityExportDeliveryReceipts
2897
2897
  },
2898
+ observabilityExportReplay: {
2899
+ kind: 'sqlite',
2900
+ path: '.voice-runtime/observability-exports.sqlite',
2901
+ runId: 'latest-proof-pack',
2902
+ tableName: 'voice_observability_exports'
2903
+ },
2898
2904
  store: runtimeStorage.traces
2899
2905
  })
2900
2906
  );
2901
2907
  ```
2902
2908
 
2903
- Readiness adds `Observability export` and `Observability export delivery` checks. Failed export manifests fail the deploy gate, and delivery receipt history can fail or warn when no successful delivery exists or the latest success is older than your configured freshness window.
2909
+ Readiness adds `Observability export`, `Observability export delivery`, and `Observability export replay` checks. Failed export manifests fail the deploy gate, delivery receipt history can fail or warn when no successful delivery exists or the latest success is older than your configured freshness window, and replay health can fail the gate when customer-owned evidence cannot be read back cleanly from file, S3, SQLite, or Postgres.
2904
2910
 
2905
2911
  ## Production Voice Ops
2906
2912
 
package/dist/index.js CHANGED
@@ -24309,6 +24309,7 @@ var readinessGateCodes = {
24309
24309
  "Operator action history": "voice.readiness.operator_action_history",
24310
24310
  "Ops recovery": "voice.readiness.ops_recovery",
24311
24311
  "Observability export delivery": "voice.readiness.observability_export_delivery",
24312
+ "Observability export replay": "voice.readiness.observability_export_replay",
24312
24313
  "Phone agent production smoke": "voice.readiness.phone_agent_smoke",
24313
24314
  "Provider contract matrix": "voice.readiness.provider_contract_matrix",
24314
24315
  "Provider fallback recovery": "voice.readiness.provider_fallback_recovery",
@@ -24617,6 +24618,14 @@ var resolveObservabilityExportDeliveryHistory = async (options, input) => {
24617
24618
  }
24618
24619
  return;
24619
24620
  };
24621
+ var isVoiceObservabilityExportReplayReport = (value) => typeof value.checkedAt === "number" && Array.isArray(value.issues) && typeof value.status === "string" && ("summary" in value);
24622
+ var resolveObservabilityExportReplay = async (options, input) => {
24623
+ if (!options.observabilityExportReplay) {
24624
+ return;
24625
+ }
24626
+ const source = typeof options.observabilityExportReplay === "function" ? await options.observabilityExportReplay(input) : options.observabilityExportReplay;
24627
+ return isVoiceObservabilityExportReplayReport(source) ? source : replayVoiceObservabilityExport(source);
24628
+ };
24620
24629
  var summarizeTraceDeliveries = async (options) => {
24621
24630
  if (!options.traceDeliveries) {
24622
24631
  return;
@@ -24777,6 +24786,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
24777
24786
  opsRecovery,
24778
24787
  observabilityExport,
24779
24788
  observabilityExportDeliveryHistory,
24789
+ observabilityExportReplay,
24780
24790
  proofSources
24781
24791
  ] = await Promise.all([
24782
24792
  evaluateVoiceQuality({ events }),
@@ -24814,6 +24824,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
24814
24824
  resolveOpsRecovery(options, { query, request }),
24815
24825
  resolveObservabilityExport(options, { query, request }),
24816
24826
  resolveObservabilityExportDeliveryHistory(options, { query, request }),
24827
+ resolveObservabilityExportReplay(options, { query, request }),
24817
24828
  resolveProofSources(options, { query, request })
24818
24829
  ]);
24819
24830
  const deliveryRuntime = summarizeDeliveryRuntime(deliveryRuntimeSummary);
@@ -25056,6 +25067,15 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
25056
25067
  totalDestinations: observabilityExportDeliveryHistory.history.summary.totalDestinations
25057
25068
  };
25058
25069
  })() : undefined;
25070
+ const observabilityExportReplaySummary = observabilityExportReplay ? {
25071
+ artifacts: observabilityExportReplay.summary.artifacts,
25072
+ deliveryDestinations: observabilityExportReplay.summary.deliveryDestinations,
25073
+ failedArtifacts: observabilityExportReplay.summary.failedArtifacts,
25074
+ failedDeliveryDestinations: observabilityExportReplay.summary.failedDeliveryDestinations,
25075
+ issues: observabilityExportReplay.issues.length,
25076
+ status: observabilityExportReplay.status,
25077
+ validationIssues: observabilityExportReplay.summary.validationIssues
25078
+ } : undefined;
25059
25079
  if (agentSquadContractSummary) {
25060
25080
  checks.push({
25061
25081
  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.`,
@@ -25152,6 +25172,25 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
25152
25172
  ]
25153
25173
  });
25154
25174
  }
25175
+ if (observabilityExportReplaySummary && observabilityExportReplay) {
25176
+ const firstIssue = observabilityExportReplay.issues[0];
25177
+ const href = options.links?.observabilityExportDeliveries ?? options.links?.observabilityExport ?? "/api/voice/observability-export/deliveries";
25178
+ checks.push({
25179
+ detail: observabilityExportReplaySummary.status === "pass" ? `${observabilityExportReplaySummary.artifacts} exported artifact(s) and ${observabilityExportReplaySummary.deliveryDestinations} delivery destination(s) replay from customer-owned evidence.` : firstIssue?.detail ?? `${observabilityExportReplaySummary.issues} observability export replay issue(s) need review.`,
25180
+ href,
25181
+ label: "Observability export replay",
25182
+ proofSource: proofSource("observabilityExportReplay", "observabilityExportDeliveryHistory", "observability"),
25183
+ status: observabilityExportReplaySummary.status,
25184
+ value: `${observabilityExportReplaySummary.validationIssues} validation issue(s)`,
25185
+ actions: observabilityExportReplaySummary.status === "pass" ? [] : [
25186
+ {
25187
+ description: "Replay the customer-owned observability export from file, S3, SQLite, or Postgres and inspect validation, artifact, or delivery failures.",
25188
+ href,
25189
+ label: "Open export replay evidence"
25190
+ }
25191
+ ]
25192
+ });
25193
+ }
25155
25194
  if (providerStack) {
25156
25195
  const missingLanes = providerStack.gaps.filter((gap) => gap.status !== "pass");
25157
25196
  checks.push({
@@ -25415,6 +25454,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
25415
25454
  } : undefined,
25416
25455
  observabilityExport: observabilityExportSummary,
25417
25456
  observabilityExportDeliveryHistory: observabilityExportDeliveryHistorySummary,
25457
+ observabilityExportReplay: observabilityExportReplaySummary,
25418
25458
  providers: {
25419
25459
  degraded: degradedProviders,
25420
25460
  total: providers.length
@@ -15,7 +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 VoiceObservabilityExportDeliveryHistory, type VoiceObservabilityExportDeliveryReceiptStore, type VoiceObservabilityExportReport } from './observabilityExport';
18
+ import { type VoiceObservabilityExportDeliveryHistory, type VoiceObservabilityExportDeliveryReceiptStore, type VoiceObservabilityExportReplayReport, type VoiceObservabilityExportReplaySource, type VoiceObservabilityExportReport } from './observabilityExport';
19
19
  export type VoiceProductionReadinessObservabilityExportDeliveryHistoryOptions = {
20
20
  failOnMissing?: boolean;
21
21
  failOnStale?: boolean;
@@ -181,6 +181,15 @@ export type VoiceProductionReadinessReport = {
181
181
  status: VoiceProductionReadinessStatus;
182
182
  totalDestinations: number;
183
183
  };
184
+ observabilityExportReplay?: {
185
+ artifacts: number;
186
+ deliveryDestinations: number;
187
+ failedArtifacts: number;
188
+ failedDeliveryDestinations: number;
189
+ issues: number;
190
+ status: VoiceProductionReadinessStatus;
191
+ validationIssues: number;
192
+ };
184
193
  providers: {
185
194
  degraded: number;
186
195
  total: number;
@@ -372,6 +381,10 @@ export type VoiceProductionReadinessRoutesOptions = {
372
381
  query: Record<string, unknown>;
373
382
  request: Request;
374
383
  }) => Promise<VoiceObservabilityExportDeliveryHistory | VoiceObservabilityExportDeliveryReceiptStore | VoiceProductionReadinessObservabilityExportDeliveryHistoryOptions> | VoiceObservabilityExportDeliveryHistory | VoiceObservabilityExportDeliveryReceiptStore | VoiceProductionReadinessObservabilityExportDeliveryHistoryOptions);
384
+ observabilityExportReplay?: false | VoiceObservabilityExportReplayReport | VoiceObservabilityExportReplaySource | ((input: {
385
+ query: Record<string, unknown>;
386
+ request: Request;
387
+ }) => Promise<VoiceObservabilityExportReplayReport | VoiceObservabilityExportReplaySource> | VoiceObservabilityExportReplayReport | VoiceObservabilityExportReplaySource);
375
388
  path?: string;
376
389
  phoneAgentSmokes?: false | readonly VoicePhoneAgentProductionSmokeReport[] | ((input: {
377
390
  query: Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.233",
3
+ "version": "0.0.22-beta.234",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",