@absolutejs/voice 0.0.22-beta.460 → 0.0.22-beta.461

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.js CHANGED
@@ -42399,6 +42399,7 @@ var buildVoiceProofPackInput = async (options) => {
42399
42399
  providerSlo,
42400
42400
  runId: options.runId,
42401
42401
  sections: options.sections,
42402
+ sessionObservabilityReports: supportBundle?.sessionObservabilityReports ?? options.sessionObservabilityReports,
42402
42403
  sessionSnapshots: supportBundle?.sessionSnapshots ?? options.sessionSnapshots
42403
42404
  };
42404
42405
  };
@@ -42524,9 +42525,13 @@ var createVoiceProofPackOperationsRecordSection = (records, options = {}) => {
42524
42525
  var createVoiceProofPackSupportBundleSection = (input) => {
42525
42526
  const snapshots = input.sessionSnapshots ?? [];
42526
42527
  const debuggerReports = input.callDebuggerReports ?? [];
42528
+ const observabilityReports = input.sessionObservabilityReports ?? [];
42527
42529
  const failedSnapshots = snapshots.filter((snapshot) => snapshot.status === "fail").length;
42528
42530
  const failedDebuggerReports = debuggerReports.filter((report) => report.status === "failed").length;
42529
- const warnings = snapshots.filter((snapshot) => snapshot.status === "warn").length + debuggerReports.filter((report) => report.status === "warning").length;
42531
+ const failedObservabilityReports = observabilityReports.filter((report) => report.status === "failed").length;
42532
+ const warnings = snapshots.filter((snapshot) => snapshot.status === "warn").length + debuggerReports.filter((report) => report.status === "warning").length + observabilityReports.filter((report) => report.status === "warning").length;
42533
+ const turnWaterfalls = observabilityReports.reduce((total, report) => total + report.turns.length, 0);
42534
+ const fallbacks = observabilityReports.reduce((total, report) => total + report.summary.fallbacks, 0);
42530
42535
  return {
42531
42536
  evidence: [
42532
42537
  numberEvidence("Session snapshots", snapshots.length, {
@@ -42535,20 +42540,34 @@ var createVoiceProofPackSupportBundleSection = (input) => {
42535
42540
  numberEvidence("Call debugger reports", debuggerReports.length, {
42536
42541
  passWhenPositive: true
42537
42542
  }),
42543
+ numberEvidence("Session observability reports", observabilityReports.length, {
42544
+ passWhenPositive: true
42545
+ }),
42546
+ numberEvidence("Turn waterfalls", turnWaterfalls, {
42547
+ passWhenPositive: true
42548
+ }),
42538
42549
  numberEvidence("Failed snapshots", failedSnapshots, {
42539
42550
  failWhenPositive: true
42540
42551
  }),
42541
42552
  numberEvidence("Failed debugger reports", failedDebuggerReports, {
42542
42553
  failWhenPositive: true
42543
42554
  }),
42555
+ numberEvidence("Failed observability reports", failedObservabilityReports, {
42556
+ failWhenPositive: true
42557
+ }),
42558
+ {
42559
+ label: "Provider fallbacks in observability reports",
42560
+ status: fallbacks > 0 ? "warn" : "pass",
42561
+ value: fallbacks
42562
+ },
42544
42563
  {
42545
42564
  label: "Warning support artifacts",
42546
42565
  status: warnings > 0 ? "warn" : "pass",
42547
42566
  value: warnings
42548
42567
  }
42549
42568
  ],
42550
- status: failedSnapshots > 0 || failedDebuggerReports > 0 ? "fail" : warnings > 0 ? "warn" : "pass",
42551
- summary: "Support artifacts that make the latest call debuggable.",
42569
+ status: failedSnapshots > 0 || failedDebuggerReports > 0 || failedObservabilityReports > 0 ? "fail" : warnings > 0 ? "warn" : "pass",
42570
+ summary: "Support artifacts that make calls debuggable, including turn waterfalls and per-call observability links.",
42552
42571
  title: input.title ?? "Support bundle"
42553
42572
  };
42554
42573
  };
@@ -42566,9 +42585,10 @@ var buildDerivedProofPackSections = (input) => [
42566
42585
  href: (sessionId) => input.productionReadiness?.links.operationsRecords ? `${input.productionReadiness.links.operationsRecords}/${encodeURIComponent(sessionId)}` : undefined
42567
42586
  })
42568
42587
  ] : [],
42569
- ...input.sessionSnapshots?.length || input.callDebuggerReports?.length ? [
42588
+ ...input.sessionSnapshots?.length || input.callDebuggerReports?.length || input.sessionObservabilityReports?.length ? [
42570
42589
  createVoiceProofPackSupportBundleSection({
42571
42590
  callDebuggerReports: input.callDebuggerReports,
42591
+ sessionObservabilityReports: input.sessionObservabilityReports,
42572
42592
  sessionSnapshots: input.sessionSnapshots
42573
42593
  })
42574
42594
  ] : [],
@@ -5,6 +5,7 @@ import type { VoiceCallDebuggerReport } from "./callDebugger";
5
5
  import type { VoiceOperationsRecord } from "./operationsRecord";
6
6
  import type { VoiceProductionReadinessReport } from "./productionReadiness";
7
7
  import type { VoiceProviderSloReport } from "./providerSlo";
8
+ import type { VoiceSessionObservabilityReport } from "./sessionObservability";
8
9
  import type { VoiceSessionSnapshot } from "./sessionSnapshot";
9
10
  import { type StoredVoiceTraceEvent, type VoiceTraceEventFilter, type VoiceTraceEventStore, type VoiceTraceSinkDeliveryRecord, type VoiceTraceSinkDeliveryStore } from "./trace";
10
11
  export type VoiceProofPackStatus = "fail" | "pass" | "warn";
@@ -47,6 +48,7 @@ export type VoiceProofPackInput = {
47
48
  providerSlo?: VoiceProviderSloReport;
48
49
  runId?: string;
49
50
  sections?: VoiceProofPackSection[];
51
+ sessionObservabilityReports?: VoiceSessionObservabilityReport[];
50
52
  sessionSnapshots?: VoiceSessionSnapshot[];
51
53
  };
52
54
  export type VoiceProofPackWriteResult = {
@@ -94,6 +96,7 @@ export type VoiceProofRefreshSnapshot = {
94
96
  };
95
97
  export type VoiceProofPackInputBuilderSupportBundle = {
96
98
  callDebuggerReports?: VoiceCallDebuggerReport[];
99
+ sessionObservabilityReports?: VoiceSessionObservabilityReport[];
97
100
  sessionSnapshots?: VoiceSessionSnapshot[];
98
101
  };
99
102
  export type VoiceProofPackInputBuilderLoaderInput = {
@@ -102,7 +105,7 @@ export type VoiceProofPackInputBuilderLoaderInput = {
102
105
  export type VoiceProofPackInputBuilderOperationsLoaderInput = VoiceProofPackInputBuilderLoaderInput & {
103
106
  supportBundle?: VoiceProofPackInputBuilderSupportBundle;
104
107
  };
105
- export type VoiceProofPackInputBuilderOptions = Omit<VoiceProofPackInput, "callDebuggerReports" | "observabilityExport" | "operationsRecords" | "productionReadiness" | "providerSlo" | "sessionSnapshots"> & {
108
+ export type VoiceProofPackInputBuilderOptions = Omit<VoiceProofPackInput, "callDebuggerReports" | "observabilityExport" | "operationsRecords" | "productionReadiness" | "providerSlo" | "sessionObservabilityReports" | "sessionSnapshots"> & {
106
109
  callDebuggerReports?: VoiceCallDebuggerReport[];
107
110
  context?: VoiceProofPackBuildContext;
108
111
  loadObservabilityExport?: (input: VoiceProofPackInputBuilderLoaderInput) => Promise<VoiceObservabilityExportReport> | VoiceObservabilityExportReport;
@@ -111,6 +114,7 @@ export type VoiceProofPackInputBuilderOptions = Omit<VoiceProofPackInput, "callD
111
114
  loadProviderSlo?: (input: VoiceProofPackInputBuilderLoaderInput) => Promise<VoiceProviderSloReport> | VoiceProviderSloReport;
112
115
  loadSupportBundle?: (input: VoiceProofPackInputBuilderLoaderInput) => Promise<VoiceProofPackInputBuilderSupportBundle> | VoiceProofPackInputBuilderSupportBundle;
113
116
  operationsRecords?: VoiceOperationsRecord[];
117
+ sessionObservabilityReports?: VoiceSessionObservabilityReport[];
114
118
  sessionSnapshots?: VoiceSessionSnapshot[];
115
119
  };
116
120
  export type VoiceProofPackSourceValue = VoiceProofPack | VoiceProofPackInput;
@@ -159,6 +163,7 @@ export declare const createVoiceProofPackOperationsRecordSection: (records: read
159
163
  }) => VoiceProofPackSection;
160
164
  export declare const createVoiceProofPackSupportBundleSection: (input: {
161
165
  callDebuggerReports?: readonly VoiceCallDebuggerReport[];
166
+ sessionObservabilityReports?: readonly VoiceSessionObservabilityReport[];
162
167
  sessionSnapshots?: readonly VoiceSessionSnapshot[];
163
168
  title?: string;
164
169
  }) => VoiceProofPackSection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.460",
3
+ "version": "0.0.22-beta.461",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",