@absolutejs/voice 0.0.22-beta.331 → 0.0.22-beta.333

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.
@@ -3823,6 +3823,22 @@ var maxNumber = (values) => {
3823
3823
  var readProofTrendMaxLiveP95 = (report) => report.summary.maxLiveP95Ms ?? maxNumber(report.cycles.map((cycle) => cycle.liveLatency?.p95Ms));
3824
3824
  var readProofTrendMaxProviderP95 = (report) => report.summary.maxProviderP95Ms;
3825
3825
  var readProofTrendMaxTurnP95 = (report) => report.summary.maxTurnP95Ms ?? maxNumber(report.cycles.map((cycle) => cycle.turnLatency?.p95Ms));
3826
+ var readRuntimeChannelMetric = (report, key) => {
3827
+ const summaryValue = report.summary.runtimeChannel?.[key];
3828
+ return typeof summaryValue === "number" ? summaryValue : maxNumber(report.cycles.map((cycle) => {
3829
+ const value = cycle.runtimeChannel?.[key];
3830
+ return typeof value === "number" ? value : undefined;
3831
+ }));
3832
+ };
3833
+ var readProofTrendRuntimeChannel = (report) => ({
3834
+ maxBackpressureEvents: readRuntimeChannelMetric(report, "maxBackpressureEvents"),
3835
+ maxFirstAudioLatencyMs: readRuntimeChannelMetric(report, "maxFirstAudioLatencyMs"),
3836
+ maxInterruptionP95Ms: readRuntimeChannelMetric(report, "maxInterruptionP95Ms"),
3837
+ maxJitterMs: readRuntimeChannelMetric(report, "maxJitterMs"),
3838
+ maxTimestampDriftMs: readRuntimeChannelMetric(report, "maxTimestampDriftMs"),
3839
+ samples: report.summary.runtimeChannel?.samples ?? maxNumber(report.cycles.map((cycle) => cycle.runtimeChannel?.samples)),
3840
+ status: report.summary.runtimeChannel?.status
3841
+ });
3826
3842
  var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
3827
3843
  const issues = [];
3828
3844
  const requiredStatus = input.requireStatus ?? "pass";
@@ -3832,6 +3848,7 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
3832
3848
  const failedCycles = report.cycles.filter((cycle) => cycle.ok !== true).length;
3833
3849
  const maxLiveP95Ms = readProofTrendMaxLiveP95(report);
3834
3850
  const maxProviderP95Ms = readProofTrendMaxProviderP95(report);
3851
+ const runtimeChannel = readProofTrendRuntimeChannel(report);
3835
3852
  const maxTurnP95Ms = readProofTrendMaxTurnP95(report);
3836
3853
  if (report.status !== requiredStatus) {
3837
3854
  issues.push(`Expected proof trends status ${requiredStatus}, found ${report.status}.`);
@@ -3857,6 +3874,21 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
3857
3874
  if (input.maxTurnP95Ms !== undefined && (maxTurnP95Ms === undefined || maxTurnP95Ms > input.maxTurnP95Ms)) {
3858
3875
  issues.push(maxTurnP95Ms === undefined ? "Missing proof trends turn latency p95." : `Expected proof trends turn latency p95 at most ${String(input.maxTurnP95Ms)}ms, found ${String(maxTurnP95Ms)}ms.`);
3859
3876
  }
3877
+ if (input.maxRuntimeFirstAudioLatencyMs !== undefined && (runtimeChannel.maxFirstAudioLatencyMs === undefined || runtimeChannel.maxFirstAudioLatencyMs > input.maxRuntimeFirstAudioLatencyMs)) {
3878
+ issues.push(runtimeChannel.maxFirstAudioLatencyMs === undefined ? "Missing proof trends runtime-channel first audio latency." : `Expected proof trends runtime-channel first audio latency at most ${String(input.maxRuntimeFirstAudioLatencyMs)}ms, found ${String(runtimeChannel.maxFirstAudioLatencyMs)}ms.`);
3879
+ }
3880
+ if (input.maxRuntimeInterruptionP95Ms !== undefined && (runtimeChannel.maxInterruptionP95Ms === undefined || runtimeChannel.maxInterruptionP95Ms > input.maxRuntimeInterruptionP95Ms)) {
3881
+ issues.push(runtimeChannel.maxInterruptionP95Ms === undefined ? "Missing proof trends runtime-channel interruption p95." : `Expected proof trends runtime-channel interruption p95 at most ${String(input.maxRuntimeInterruptionP95Ms)}ms, found ${String(runtimeChannel.maxInterruptionP95Ms)}ms.`);
3882
+ }
3883
+ if (input.maxRuntimeJitterMs !== undefined && (runtimeChannel.maxJitterMs === undefined || runtimeChannel.maxJitterMs > input.maxRuntimeJitterMs)) {
3884
+ issues.push(runtimeChannel.maxJitterMs === undefined ? "Missing proof trends runtime-channel jitter." : `Expected proof trends runtime-channel jitter at most ${String(input.maxRuntimeJitterMs)}ms, found ${String(runtimeChannel.maxJitterMs)}ms.`);
3885
+ }
3886
+ if (input.maxRuntimeTimestampDriftMs !== undefined && (runtimeChannel.maxTimestampDriftMs === undefined || runtimeChannel.maxTimestampDriftMs > input.maxRuntimeTimestampDriftMs)) {
3887
+ issues.push(runtimeChannel.maxTimestampDriftMs === undefined ? "Missing proof trends runtime-channel timestamp drift." : `Expected proof trends runtime-channel timestamp drift at most ${String(input.maxRuntimeTimestampDriftMs)}ms, found ${String(runtimeChannel.maxTimestampDriftMs)}ms.`);
3888
+ }
3889
+ if (input.maxRuntimeBackpressureEvents !== undefined && (runtimeChannel.maxBackpressureEvents === undefined || runtimeChannel.maxBackpressureEvents > input.maxRuntimeBackpressureEvents)) {
3890
+ issues.push(runtimeChannel.maxBackpressureEvents === undefined ? "Missing proof trends runtime-channel backpressure events." : `Expected proof trends runtime-channel backpressure events at most ${String(input.maxRuntimeBackpressureEvents)}, found ${String(runtimeChannel.maxBackpressureEvents)}.`);
3891
+ }
3860
3892
  if (input.minLiveLatencySamples !== undefined) {
3861
3893
  const lowSamples = report.cycles.filter((cycle) => (cycle.liveLatency?.samples ?? 0) < input.minLiveLatencySamples).length;
3862
3894
  if (lowSamples > 0) {
@@ -3875,6 +3907,9 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
3875
3907
  issues.push(`Expected every proof trend cycle to have at least ${String(input.minTurnLatencySamples)} turn latency sample(s), found ${String(lowSamples)} low-sample cycle(s).`);
3876
3908
  }
3877
3909
  }
3910
+ if (input.minRuntimeChannelSamples !== undefined && (runtimeChannel.samples === undefined || runtimeChannel.samples < input.minRuntimeChannelSamples)) {
3911
+ issues.push(runtimeChannel.samples === undefined ? "Missing proof trends runtime-channel samples." : `Expected proof trends runtime-channel samples at least ${String(input.minRuntimeChannelSamples)}, found ${String(runtimeChannel.samples)}.`);
3912
+ }
3878
3913
  return {
3879
3914
  ageMs: report.ageMs,
3880
3915
  cycles,
@@ -3882,6 +3917,7 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
3882
3917
  issues,
3883
3918
  maxLiveP95Ms,
3884
3919
  maxProviderP95Ms,
3920
+ runtimeChannel,
3885
3921
  maxTurnP95Ms,
3886
3922
  ok: issues.length === 0,
3887
3923
  status: report.status
@@ -4,7 +4,7 @@ export type VoiceCompetitiveCoverageLevel = 'covered' | 'intentional-gap' | 'mis
4
4
  export type VoiceCompetitiveDepthLevel = 'advantage' | 'covered' | 'intentional-gap' | 'lag' | 'parity';
5
5
  export type VoiceCompetitiveEvidence = {
6
6
  href?: string;
7
- kind?: 'docs' | 'example' | 'operations-record' | 'proof' | 'readiness' | 'route' | 'test';
7
+ kind?: 'docs' | 'example' | 'failure-replay' | 'operations-record' | 'proof' | 'readiness' | 'route' | 'test';
8
8
  name: string;
9
9
  required?: boolean;
10
10
  status?: 'fail' | 'pass' | 'warn';
package/dist/index.js CHANGED
@@ -14540,6 +14540,22 @@ var maxNumber = (values) => {
14540
14540
  var readProofTrendMaxLiveP95 = (report) => report.summary.maxLiveP95Ms ?? maxNumber(report.cycles.map((cycle) => cycle.liveLatency?.p95Ms));
14541
14541
  var readProofTrendMaxProviderP95 = (report) => report.summary.maxProviderP95Ms;
14542
14542
  var readProofTrendMaxTurnP95 = (report) => report.summary.maxTurnP95Ms ?? maxNumber(report.cycles.map((cycle) => cycle.turnLatency?.p95Ms));
14543
+ var readRuntimeChannelMetric = (report, key) => {
14544
+ const summaryValue = report.summary.runtimeChannel?.[key];
14545
+ return typeof summaryValue === "number" ? summaryValue : maxNumber(report.cycles.map((cycle) => {
14546
+ const value = cycle.runtimeChannel?.[key];
14547
+ return typeof value === "number" ? value : undefined;
14548
+ }));
14549
+ };
14550
+ var readProofTrendRuntimeChannel = (report) => ({
14551
+ maxBackpressureEvents: readRuntimeChannelMetric(report, "maxBackpressureEvents"),
14552
+ maxFirstAudioLatencyMs: readRuntimeChannelMetric(report, "maxFirstAudioLatencyMs"),
14553
+ maxInterruptionP95Ms: readRuntimeChannelMetric(report, "maxInterruptionP95Ms"),
14554
+ maxJitterMs: readRuntimeChannelMetric(report, "maxJitterMs"),
14555
+ maxTimestampDriftMs: readRuntimeChannelMetric(report, "maxTimestampDriftMs"),
14556
+ samples: report.summary.runtimeChannel?.samples ?? maxNumber(report.cycles.map((cycle) => cycle.runtimeChannel?.samples)),
14557
+ status: report.summary.runtimeChannel?.status
14558
+ });
14543
14559
  var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
14544
14560
  const issues = [];
14545
14561
  const requiredStatus = input.requireStatus ?? "pass";
@@ -14549,6 +14565,7 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
14549
14565
  const failedCycles = report.cycles.filter((cycle) => cycle.ok !== true).length;
14550
14566
  const maxLiveP95Ms = readProofTrendMaxLiveP95(report);
14551
14567
  const maxProviderP95Ms = readProofTrendMaxProviderP95(report);
14568
+ const runtimeChannel = readProofTrendRuntimeChannel(report);
14552
14569
  const maxTurnP95Ms = readProofTrendMaxTurnP95(report);
14553
14570
  if (report.status !== requiredStatus) {
14554
14571
  issues.push(`Expected proof trends status ${requiredStatus}, found ${report.status}.`);
@@ -14574,6 +14591,21 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
14574
14591
  if (input.maxTurnP95Ms !== undefined && (maxTurnP95Ms === undefined || maxTurnP95Ms > input.maxTurnP95Ms)) {
14575
14592
  issues.push(maxTurnP95Ms === undefined ? "Missing proof trends turn latency p95." : `Expected proof trends turn latency p95 at most ${String(input.maxTurnP95Ms)}ms, found ${String(maxTurnP95Ms)}ms.`);
14576
14593
  }
14594
+ if (input.maxRuntimeFirstAudioLatencyMs !== undefined && (runtimeChannel.maxFirstAudioLatencyMs === undefined || runtimeChannel.maxFirstAudioLatencyMs > input.maxRuntimeFirstAudioLatencyMs)) {
14595
+ issues.push(runtimeChannel.maxFirstAudioLatencyMs === undefined ? "Missing proof trends runtime-channel first audio latency." : `Expected proof trends runtime-channel first audio latency at most ${String(input.maxRuntimeFirstAudioLatencyMs)}ms, found ${String(runtimeChannel.maxFirstAudioLatencyMs)}ms.`);
14596
+ }
14597
+ if (input.maxRuntimeInterruptionP95Ms !== undefined && (runtimeChannel.maxInterruptionP95Ms === undefined || runtimeChannel.maxInterruptionP95Ms > input.maxRuntimeInterruptionP95Ms)) {
14598
+ issues.push(runtimeChannel.maxInterruptionP95Ms === undefined ? "Missing proof trends runtime-channel interruption p95." : `Expected proof trends runtime-channel interruption p95 at most ${String(input.maxRuntimeInterruptionP95Ms)}ms, found ${String(runtimeChannel.maxInterruptionP95Ms)}ms.`);
14599
+ }
14600
+ if (input.maxRuntimeJitterMs !== undefined && (runtimeChannel.maxJitterMs === undefined || runtimeChannel.maxJitterMs > input.maxRuntimeJitterMs)) {
14601
+ issues.push(runtimeChannel.maxJitterMs === undefined ? "Missing proof trends runtime-channel jitter." : `Expected proof trends runtime-channel jitter at most ${String(input.maxRuntimeJitterMs)}ms, found ${String(runtimeChannel.maxJitterMs)}ms.`);
14602
+ }
14603
+ if (input.maxRuntimeTimestampDriftMs !== undefined && (runtimeChannel.maxTimestampDriftMs === undefined || runtimeChannel.maxTimestampDriftMs > input.maxRuntimeTimestampDriftMs)) {
14604
+ issues.push(runtimeChannel.maxTimestampDriftMs === undefined ? "Missing proof trends runtime-channel timestamp drift." : `Expected proof trends runtime-channel timestamp drift at most ${String(input.maxRuntimeTimestampDriftMs)}ms, found ${String(runtimeChannel.maxTimestampDriftMs)}ms.`);
14605
+ }
14606
+ if (input.maxRuntimeBackpressureEvents !== undefined && (runtimeChannel.maxBackpressureEvents === undefined || runtimeChannel.maxBackpressureEvents > input.maxRuntimeBackpressureEvents)) {
14607
+ issues.push(runtimeChannel.maxBackpressureEvents === undefined ? "Missing proof trends runtime-channel backpressure events." : `Expected proof trends runtime-channel backpressure events at most ${String(input.maxRuntimeBackpressureEvents)}, found ${String(runtimeChannel.maxBackpressureEvents)}.`);
14608
+ }
14577
14609
  if (input.minLiveLatencySamples !== undefined) {
14578
14610
  const lowSamples = report.cycles.filter((cycle) => (cycle.liveLatency?.samples ?? 0) < input.minLiveLatencySamples).length;
14579
14611
  if (lowSamples > 0) {
@@ -14592,6 +14624,9 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
14592
14624
  issues.push(`Expected every proof trend cycle to have at least ${String(input.minTurnLatencySamples)} turn latency sample(s), found ${String(lowSamples)} low-sample cycle(s).`);
14593
14625
  }
14594
14626
  }
14627
+ if (input.minRuntimeChannelSamples !== undefined && (runtimeChannel.samples === undefined || runtimeChannel.samples < input.minRuntimeChannelSamples)) {
14628
+ issues.push(runtimeChannel.samples === undefined ? "Missing proof trends runtime-channel samples." : `Expected proof trends runtime-channel samples at least ${String(input.minRuntimeChannelSamples)}, found ${String(runtimeChannel.samples)}.`);
14629
+ }
14595
14630
  return {
14596
14631
  ageMs: report.ageMs,
14597
14632
  cycles,
@@ -14599,6 +14634,7 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
14599
14634
  issues,
14600
14635
  maxLiveP95Ms,
14601
14636
  maxProviderP95Ms,
14637
+ runtimeChannel,
14602
14638
  maxTurnP95Ms,
14603
14639
  ok: issues.length === 0,
14604
14640
  status: report.status
@@ -15465,6 +15501,7 @@ var normalizeSample = (input) => {
15465
15501
  return {
15466
15502
  generatedAt: input.generatedAt,
15467
15503
  liveP95Ms: input.summary.maxLiveP95Ms,
15504
+ interruptionP95Ms: input.summary.runtimeChannel?.maxInterruptionP95Ms,
15468
15505
  ok: input.ok,
15469
15506
  providerP95Ms: input.summary.maxProviderP95Ms,
15470
15507
  runId: input.runId,
@@ -4,8 +4,18 @@ export type VoiceProofTrendSummary = {
4
4
  cycles?: number;
5
5
  maxLiveP95Ms?: number;
6
6
  maxProviderP95Ms?: number;
7
+ runtimeChannel?: VoiceProofTrendRuntimeChannelSummary;
7
8
  maxTurnP95Ms?: number;
8
9
  };
10
+ export type VoiceProofTrendRuntimeChannelSummary = {
11
+ maxBackpressureEvents?: number;
12
+ maxFirstAudioLatencyMs?: number;
13
+ maxInterruptionP95Ms?: number;
14
+ maxJitterMs?: number;
15
+ maxTimestampDriftMs?: number;
16
+ samples?: number;
17
+ status?: string;
18
+ };
9
19
  export type VoiceProofTrendCycle = {
10
20
  at?: string;
11
21
  cycle?: number;
@@ -26,6 +36,7 @@ export type VoiceProofTrendCycle = {
26
36
  eventsWithLatency?: number;
27
37
  status?: string;
28
38
  };
39
+ runtimeChannel?: VoiceProofTrendRuntimeChannelSummary;
29
40
  turnLatency?: {
30
41
  p95Ms?: number;
31
42
  samples?: number;
@@ -61,12 +72,18 @@ export type VoiceProofTrendReport = {
61
72
  };
62
73
  export type VoiceProofTrendAssertionInput = {
63
74
  maxAgeMs?: number;
75
+ maxRuntimeBackpressureEvents?: number;
76
+ maxRuntimeFirstAudioLatencyMs?: number;
77
+ maxRuntimeInterruptionP95Ms?: number;
78
+ maxRuntimeJitterMs?: number;
79
+ maxRuntimeTimestampDriftMs?: number;
64
80
  maxLiveP95Ms?: number;
65
81
  maxProviderP95Ms?: number;
66
82
  maxTurnP95Ms?: number;
67
83
  minCycles?: number;
68
84
  minLiveLatencySamples?: number;
69
85
  minProviderSloEventsWithLatency?: number;
86
+ minRuntimeChannelSamples?: number;
70
87
  minTurnLatencySamples?: number;
71
88
  requireAllCyclesOk?: boolean;
72
89
  requireStatus?: VoiceProofTrendStatus;
@@ -78,6 +95,7 @@ export type VoiceProofTrendAssertionReport = {
78
95
  issues: string[];
79
96
  maxLiveP95Ms?: number;
80
97
  maxProviderP95Ms?: number;
98
+ runtimeChannel?: VoiceProofTrendRuntimeChannelSummary;
81
99
  maxTurnP95Ms?: number;
82
100
  ok: boolean;
83
101
  status: VoiceProofTrendStatus;
@@ -1571,6 +1571,22 @@ var maxNumber = (values) => {
1571
1571
  var readProofTrendMaxLiveP95 = (report) => report.summary.maxLiveP95Ms ?? maxNumber(report.cycles.map((cycle) => cycle.liveLatency?.p95Ms));
1572
1572
  var readProofTrendMaxProviderP95 = (report) => report.summary.maxProviderP95Ms;
1573
1573
  var readProofTrendMaxTurnP95 = (report) => report.summary.maxTurnP95Ms ?? maxNumber(report.cycles.map((cycle) => cycle.turnLatency?.p95Ms));
1574
+ var readRuntimeChannelMetric = (report, key) => {
1575
+ const summaryValue = report.summary.runtimeChannel?.[key];
1576
+ return typeof summaryValue === "number" ? summaryValue : maxNumber(report.cycles.map((cycle) => {
1577
+ const value = cycle.runtimeChannel?.[key];
1578
+ return typeof value === "number" ? value : undefined;
1579
+ }));
1580
+ };
1581
+ var readProofTrendRuntimeChannel = (report) => ({
1582
+ maxBackpressureEvents: readRuntimeChannelMetric(report, "maxBackpressureEvents"),
1583
+ maxFirstAudioLatencyMs: readRuntimeChannelMetric(report, "maxFirstAudioLatencyMs"),
1584
+ maxInterruptionP95Ms: readRuntimeChannelMetric(report, "maxInterruptionP95Ms"),
1585
+ maxJitterMs: readRuntimeChannelMetric(report, "maxJitterMs"),
1586
+ maxTimestampDriftMs: readRuntimeChannelMetric(report, "maxTimestampDriftMs"),
1587
+ samples: report.summary.runtimeChannel?.samples ?? maxNumber(report.cycles.map((cycle) => cycle.runtimeChannel?.samples)),
1588
+ status: report.summary.runtimeChannel?.status
1589
+ });
1574
1590
  var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1575
1591
  const issues = [];
1576
1592
  const requiredStatus = input.requireStatus ?? "pass";
@@ -1580,6 +1596,7 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1580
1596
  const failedCycles = report.cycles.filter((cycle) => cycle.ok !== true).length;
1581
1597
  const maxLiveP95Ms = readProofTrendMaxLiveP95(report);
1582
1598
  const maxProviderP95Ms = readProofTrendMaxProviderP95(report);
1599
+ const runtimeChannel = readProofTrendRuntimeChannel(report);
1583
1600
  const maxTurnP95Ms = readProofTrendMaxTurnP95(report);
1584
1601
  if (report.status !== requiredStatus) {
1585
1602
  issues.push(`Expected proof trends status ${requiredStatus}, found ${report.status}.`);
@@ -1605,6 +1622,21 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1605
1622
  if (input.maxTurnP95Ms !== undefined && (maxTurnP95Ms === undefined || maxTurnP95Ms > input.maxTurnP95Ms)) {
1606
1623
  issues.push(maxTurnP95Ms === undefined ? "Missing proof trends turn latency p95." : `Expected proof trends turn latency p95 at most ${String(input.maxTurnP95Ms)}ms, found ${String(maxTurnP95Ms)}ms.`);
1607
1624
  }
1625
+ if (input.maxRuntimeFirstAudioLatencyMs !== undefined && (runtimeChannel.maxFirstAudioLatencyMs === undefined || runtimeChannel.maxFirstAudioLatencyMs > input.maxRuntimeFirstAudioLatencyMs)) {
1626
+ issues.push(runtimeChannel.maxFirstAudioLatencyMs === undefined ? "Missing proof trends runtime-channel first audio latency." : `Expected proof trends runtime-channel first audio latency at most ${String(input.maxRuntimeFirstAudioLatencyMs)}ms, found ${String(runtimeChannel.maxFirstAudioLatencyMs)}ms.`);
1627
+ }
1628
+ if (input.maxRuntimeInterruptionP95Ms !== undefined && (runtimeChannel.maxInterruptionP95Ms === undefined || runtimeChannel.maxInterruptionP95Ms > input.maxRuntimeInterruptionP95Ms)) {
1629
+ issues.push(runtimeChannel.maxInterruptionP95Ms === undefined ? "Missing proof trends runtime-channel interruption p95." : `Expected proof trends runtime-channel interruption p95 at most ${String(input.maxRuntimeInterruptionP95Ms)}ms, found ${String(runtimeChannel.maxInterruptionP95Ms)}ms.`);
1630
+ }
1631
+ if (input.maxRuntimeJitterMs !== undefined && (runtimeChannel.maxJitterMs === undefined || runtimeChannel.maxJitterMs > input.maxRuntimeJitterMs)) {
1632
+ issues.push(runtimeChannel.maxJitterMs === undefined ? "Missing proof trends runtime-channel jitter." : `Expected proof trends runtime-channel jitter at most ${String(input.maxRuntimeJitterMs)}ms, found ${String(runtimeChannel.maxJitterMs)}ms.`);
1633
+ }
1634
+ if (input.maxRuntimeTimestampDriftMs !== undefined && (runtimeChannel.maxTimestampDriftMs === undefined || runtimeChannel.maxTimestampDriftMs > input.maxRuntimeTimestampDriftMs)) {
1635
+ issues.push(runtimeChannel.maxTimestampDriftMs === undefined ? "Missing proof trends runtime-channel timestamp drift." : `Expected proof trends runtime-channel timestamp drift at most ${String(input.maxRuntimeTimestampDriftMs)}ms, found ${String(runtimeChannel.maxTimestampDriftMs)}ms.`);
1636
+ }
1637
+ if (input.maxRuntimeBackpressureEvents !== undefined && (runtimeChannel.maxBackpressureEvents === undefined || runtimeChannel.maxBackpressureEvents > input.maxRuntimeBackpressureEvents)) {
1638
+ issues.push(runtimeChannel.maxBackpressureEvents === undefined ? "Missing proof trends runtime-channel backpressure events." : `Expected proof trends runtime-channel backpressure events at most ${String(input.maxRuntimeBackpressureEvents)}, found ${String(runtimeChannel.maxBackpressureEvents)}.`);
1639
+ }
1608
1640
  if (input.minLiveLatencySamples !== undefined) {
1609
1641
  const lowSamples = report.cycles.filter((cycle) => (cycle.liveLatency?.samples ?? 0) < input.minLiveLatencySamples).length;
1610
1642
  if (lowSamples > 0) {
@@ -1623,6 +1655,9 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1623
1655
  issues.push(`Expected every proof trend cycle to have at least ${String(input.minTurnLatencySamples)} turn latency sample(s), found ${String(lowSamples)} low-sample cycle(s).`);
1624
1656
  }
1625
1657
  }
1658
+ if (input.minRuntimeChannelSamples !== undefined && (runtimeChannel.samples === undefined || runtimeChannel.samples < input.minRuntimeChannelSamples)) {
1659
+ issues.push(runtimeChannel.samples === undefined ? "Missing proof trends runtime-channel samples." : `Expected proof trends runtime-channel samples at least ${String(input.minRuntimeChannelSamples)}, found ${String(runtimeChannel.samples)}.`);
1660
+ }
1626
1661
  return {
1627
1662
  ageMs: report.ageMs,
1628
1663
  cycles,
@@ -1630,6 +1665,7 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1630
1665
  issues,
1631
1666
  maxLiveP95Ms,
1632
1667
  maxProviderP95Ms,
1668
+ runtimeChannel,
1633
1669
  maxTurnP95Ms,
1634
1670
  ok: issues.length === 0,
1635
1671
  status: report.status
package/dist/vue/index.js CHANGED
@@ -1492,6 +1492,22 @@ var maxNumber = (values) => {
1492
1492
  var readProofTrendMaxLiveP95 = (report) => report.summary.maxLiveP95Ms ?? maxNumber(report.cycles.map((cycle) => cycle.liveLatency?.p95Ms));
1493
1493
  var readProofTrendMaxProviderP95 = (report) => report.summary.maxProviderP95Ms;
1494
1494
  var readProofTrendMaxTurnP95 = (report) => report.summary.maxTurnP95Ms ?? maxNumber(report.cycles.map((cycle) => cycle.turnLatency?.p95Ms));
1495
+ var readRuntimeChannelMetric = (report, key) => {
1496
+ const summaryValue = report.summary.runtimeChannel?.[key];
1497
+ return typeof summaryValue === "number" ? summaryValue : maxNumber(report.cycles.map((cycle) => {
1498
+ const value = cycle.runtimeChannel?.[key];
1499
+ return typeof value === "number" ? value : undefined;
1500
+ }));
1501
+ };
1502
+ var readProofTrendRuntimeChannel = (report) => ({
1503
+ maxBackpressureEvents: readRuntimeChannelMetric(report, "maxBackpressureEvents"),
1504
+ maxFirstAudioLatencyMs: readRuntimeChannelMetric(report, "maxFirstAudioLatencyMs"),
1505
+ maxInterruptionP95Ms: readRuntimeChannelMetric(report, "maxInterruptionP95Ms"),
1506
+ maxJitterMs: readRuntimeChannelMetric(report, "maxJitterMs"),
1507
+ maxTimestampDriftMs: readRuntimeChannelMetric(report, "maxTimestampDriftMs"),
1508
+ samples: report.summary.runtimeChannel?.samples ?? maxNumber(report.cycles.map((cycle) => cycle.runtimeChannel?.samples)),
1509
+ status: report.summary.runtimeChannel?.status
1510
+ });
1495
1511
  var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1496
1512
  const issues = [];
1497
1513
  const requiredStatus = input.requireStatus ?? "pass";
@@ -1501,6 +1517,7 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1501
1517
  const failedCycles = report.cycles.filter((cycle) => cycle.ok !== true).length;
1502
1518
  const maxLiveP95Ms = readProofTrendMaxLiveP95(report);
1503
1519
  const maxProviderP95Ms = readProofTrendMaxProviderP95(report);
1520
+ const runtimeChannel = readProofTrendRuntimeChannel(report);
1504
1521
  const maxTurnP95Ms = readProofTrendMaxTurnP95(report);
1505
1522
  if (report.status !== requiredStatus) {
1506
1523
  issues.push(`Expected proof trends status ${requiredStatus}, found ${report.status}.`);
@@ -1526,6 +1543,21 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1526
1543
  if (input.maxTurnP95Ms !== undefined && (maxTurnP95Ms === undefined || maxTurnP95Ms > input.maxTurnP95Ms)) {
1527
1544
  issues.push(maxTurnP95Ms === undefined ? "Missing proof trends turn latency p95." : `Expected proof trends turn latency p95 at most ${String(input.maxTurnP95Ms)}ms, found ${String(maxTurnP95Ms)}ms.`);
1528
1545
  }
1546
+ if (input.maxRuntimeFirstAudioLatencyMs !== undefined && (runtimeChannel.maxFirstAudioLatencyMs === undefined || runtimeChannel.maxFirstAudioLatencyMs > input.maxRuntimeFirstAudioLatencyMs)) {
1547
+ issues.push(runtimeChannel.maxFirstAudioLatencyMs === undefined ? "Missing proof trends runtime-channel first audio latency." : `Expected proof trends runtime-channel first audio latency at most ${String(input.maxRuntimeFirstAudioLatencyMs)}ms, found ${String(runtimeChannel.maxFirstAudioLatencyMs)}ms.`);
1548
+ }
1549
+ if (input.maxRuntimeInterruptionP95Ms !== undefined && (runtimeChannel.maxInterruptionP95Ms === undefined || runtimeChannel.maxInterruptionP95Ms > input.maxRuntimeInterruptionP95Ms)) {
1550
+ issues.push(runtimeChannel.maxInterruptionP95Ms === undefined ? "Missing proof trends runtime-channel interruption p95." : `Expected proof trends runtime-channel interruption p95 at most ${String(input.maxRuntimeInterruptionP95Ms)}ms, found ${String(runtimeChannel.maxInterruptionP95Ms)}ms.`);
1551
+ }
1552
+ if (input.maxRuntimeJitterMs !== undefined && (runtimeChannel.maxJitterMs === undefined || runtimeChannel.maxJitterMs > input.maxRuntimeJitterMs)) {
1553
+ issues.push(runtimeChannel.maxJitterMs === undefined ? "Missing proof trends runtime-channel jitter." : `Expected proof trends runtime-channel jitter at most ${String(input.maxRuntimeJitterMs)}ms, found ${String(runtimeChannel.maxJitterMs)}ms.`);
1554
+ }
1555
+ if (input.maxRuntimeTimestampDriftMs !== undefined && (runtimeChannel.maxTimestampDriftMs === undefined || runtimeChannel.maxTimestampDriftMs > input.maxRuntimeTimestampDriftMs)) {
1556
+ issues.push(runtimeChannel.maxTimestampDriftMs === undefined ? "Missing proof trends runtime-channel timestamp drift." : `Expected proof trends runtime-channel timestamp drift at most ${String(input.maxRuntimeTimestampDriftMs)}ms, found ${String(runtimeChannel.maxTimestampDriftMs)}ms.`);
1557
+ }
1558
+ if (input.maxRuntimeBackpressureEvents !== undefined && (runtimeChannel.maxBackpressureEvents === undefined || runtimeChannel.maxBackpressureEvents > input.maxRuntimeBackpressureEvents)) {
1559
+ issues.push(runtimeChannel.maxBackpressureEvents === undefined ? "Missing proof trends runtime-channel backpressure events." : `Expected proof trends runtime-channel backpressure events at most ${String(input.maxRuntimeBackpressureEvents)}, found ${String(runtimeChannel.maxBackpressureEvents)}.`);
1560
+ }
1529
1561
  if (input.minLiveLatencySamples !== undefined) {
1530
1562
  const lowSamples = report.cycles.filter((cycle) => (cycle.liveLatency?.samples ?? 0) < input.minLiveLatencySamples).length;
1531
1563
  if (lowSamples > 0) {
@@ -1544,6 +1576,9 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1544
1576
  issues.push(`Expected every proof trend cycle to have at least ${String(input.minTurnLatencySamples)} turn latency sample(s), found ${String(lowSamples)} low-sample cycle(s).`);
1545
1577
  }
1546
1578
  }
1579
+ if (input.minRuntimeChannelSamples !== undefined && (runtimeChannel.samples === undefined || runtimeChannel.samples < input.minRuntimeChannelSamples)) {
1580
+ issues.push(runtimeChannel.samples === undefined ? "Missing proof trends runtime-channel samples." : `Expected proof trends runtime-channel samples at least ${String(input.minRuntimeChannelSamples)}, found ${String(runtimeChannel.samples)}.`);
1581
+ }
1547
1582
  return {
1548
1583
  ageMs: report.ageMs,
1549
1584
  cycles,
@@ -1551,6 +1586,7 @@ var evaluateVoiceProofTrendEvidence = (report, input = {}) => {
1551
1586
  issues,
1552
1587
  maxLiveP95Ms,
1553
1588
  maxProviderP95Ms,
1589
+ runtimeChannel,
1554
1590
  maxTurnP95Ms,
1555
1591
  ok: issues.length === 0,
1556
1592
  status: report.status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.331",
3
+ "version": "0.0.22-beta.333",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",