@absolutejs/voice 0.0.22-beta.317 → 0.0.22-beta.319

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
@@ -29036,6 +29036,7 @@ var readinessGateCodes = {
29036
29036
  "Audit evidence": "voice.readiness.audit_evidence",
29037
29037
  "Audit sink delivery": "voice.readiness.audit_sink_delivery",
29038
29038
  "Barge-in interruption proof": "voice.readiness.barge_in_interruption",
29039
+ "Browser media transport": "voice.readiness.browser_media_transport",
29039
29040
  "Campaign readiness proof": "voice.readiness.campaign_readiness",
29040
29041
  "Carrier readiness": "voice.readiness.carrier_readiness",
29041
29042
  "Delivery runtime": "voice.readiness.delivery_runtime",
@@ -29221,6 +29222,12 @@ var resolveMediaPipeline = async (options, input) => {
29221
29222
  }
29222
29223
  return typeof options.mediaPipeline === "function" ? await options.mediaPipeline(input) : options.mediaPipeline;
29223
29224
  };
29225
+ var resolveBrowserMedia = async (options, input) => {
29226
+ if (options.browserMedia === false || options.browserMedia === undefined) {
29227
+ return;
29228
+ }
29229
+ return typeof options.browserMedia === "function" ? await options.browserMedia(input) : options.browserMedia;
29230
+ };
29224
29231
  var isVoiceTelephonyWebhookSecurityReport = (value) => typeof value.generatedAt === "number" && Array.isArray(value.providers) && typeof value.status === "string";
29225
29232
  var resolveTelephonyWebhookSecurity = async (options, input) => {
29226
29233
  if (options.telephonyWebhookSecurity === false || options.telephonyWebhookSecurity === undefined) {
@@ -29605,6 +29612,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
29605
29612
  monitoring,
29606
29613
  monitoringNotifierDelivery,
29607
29614
  mediaPipeline,
29615
+ browserMedia,
29608
29616
  telephonyWebhookSecurity,
29609
29617
  reconnectContracts,
29610
29618
  bargeInReports,
@@ -29648,6 +29656,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
29648
29656
  resolveMonitoring(options, { query, request }),
29649
29657
  resolveMonitoringNotifierDelivery(options, { query, request }),
29650
29658
  resolveMediaPipeline(options, { query, request }),
29659
+ resolveBrowserMedia(options, { query, request }),
29651
29660
  resolveTelephonyWebhookSecurity(options, { query, request }),
29652
29661
  resolveReconnectContracts(options, { query, request }),
29653
29662
  resolveBargeInReports(options, { query, request }),
@@ -29835,6 +29844,17 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
29835
29844
  status: mediaPipeline.status === "pass" ? "pass" : "fail",
29836
29845
  timestampDriftMs: mediaPipeline.quality.timestampDriftMs
29837
29846
  } : undefined;
29847
+ const browserMediaSummary = browserMedia ? {
29848
+ activeCandidatePairs: browserMedia.activeCandidatePairs,
29849
+ bytesReceived: browserMedia.bytesReceived,
29850
+ bytesSent: browserMedia.bytesSent,
29851
+ issues: browserMedia.issues.length,
29852
+ jitterMs: browserMedia.jitterMs,
29853
+ liveAudioTracks: browserMedia.liveAudioTracks,
29854
+ packetLossRatio: browserMedia.packetLossRatio,
29855
+ roundTripTimeMs: browserMedia.roundTripTimeMs,
29856
+ status: browserMedia.status === "pass" ? "pass" : "fail"
29857
+ } : undefined;
29838
29858
  checks.push({
29839
29859
  detail: liveLatency.total === 0 ? "No browser live-latency measurements are recorded yet." : liveLatency.status === "pass" ? `Live browser turn latency averages ${liveLatency.averageLatencyMs}ms.` : `${liveLatency.failed} failed and ${liveLatency.warnings} warned live-latency measurement(s).`,
29840
29860
  href: firstOperationsRecordHref(operationsRecords.failingLatency) ?? options.links?.liveLatency ?? "/traces",
@@ -29902,6 +29922,31 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
29902
29922
  ]
29903
29923
  });
29904
29924
  }
29925
+ if (browserMedia && browserMediaSummary) {
29926
+ const firstIssue = browserMedia.issues[0];
29927
+ checks.push({
29928
+ detail: browserMediaSummary.status === "pass" ? `Browser media transport is passing with ${browserMediaSummary.activeCandidatePairs} active candidate pair(s), ${browserMediaSummary.liveAudioTracks} live audio track(s), ${String(browserMediaSummary.roundTripTimeMs ?? "n/a")}ms RTT, ${String(browserMediaSummary.jitterMs ?? "n/a")}ms jitter, and ${browserMediaSummary.packetLossRatio} packet loss ratio.` : firstIssue?.message ?? `${browserMediaSummary.issues} browser media transport issue(s) need review.`,
29929
+ href: options.links?.browserMedia ?? "/voice/browser-media",
29930
+ label: "Browser media transport",
29931
+ proofSource: proofSource("browserMedia", "webrtcStats"),
29932
+ gateExplanation: browserMediaSummary.status === "pass" ? undefined : {
29933
+ evidenceHref: options.links?.browserMedia ?? "/voice/browser-media",
29934
+ observed: firstIssue?.code ?? `${browserMediaSummary.issues} issue(s)`,
29935
+ remediation: "Inspect browser WebRTC media stats, fix packet loss, RTT, jitter, candidate-pair, or audio-track issues, then rerun readiness proof.",
29936
+ thresholdLabel: "Browser media transport status",
29937
+ unit: "status"
29938
+ },
29939
+ status: browserMediaSummary.status,
29940
+ value: browserMediaSummary.status === "pass" ? `${browserMediaSummary.packetLossRatio} loss` : `${browserMediaSummary.issues} issue(s)`,
29941
+ actions: browserMediaSummary.status === "pass" ? [] : [
29942
+ {
29943
+ description: "Open browser media transport proof and inspect WebRTC packet loss, RTT, jitter, bytes, candidate-pair, and audio-track evidence.",
29944
+ href: options.links?.browserMedia ?? "/voice/browser-media",
29945
+ label: "Open browser media proof"
29946
+ }
29947
+ ]
29948
+ });
29949
+ }
29905
29950
  const carrierSummary = carriers ? {
29906
29951
  failing: carriers.summary.failing,
29907
29952
  providers: carriers.summary.providers,
@@ -30462,6 +30507,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
30462
30507
  audit: "/audit",
30463
30508
  auditDeliveries: "/audit",
30464
30509
  bargeIn: "/barge-in",
30510
+ browserMedia: "/voice/browser-media",
30465
30511
  campaignReadiness: "/api/voice/campaigns/readiness-proof",
30466
30512
  carriers: "/carriers",
30467
30513
  deliveryRuntime: "/delivery-runtime",
@@ -30499,6 +30545,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
30499
30545
  audit,
30500
30546
  auditDeliveries,
30501
30547
  bargeIn: bargeInSummary,
30548
+ browserMedia: browserMediaSummary,
30502
30549
  campaignReadiness: campaignReadinessSummary,
30503
30550
  carriers: carrierSummary,
30504
30551
  deliveryRuntime,
@@ -20,6 +20,7 @@ import type { VoiceCampaignReadinessProofReport } from './campaign';
20
20
  import { type VoiceOpsRecoveryReport } from './opsRecovery';
21
21
  import { type VoiceObservabilityExportDeliveryHistory, type VoiceObservabilityExportDeliveryReceiptStore, type VoiceObservabilityExportReplayReport, type VoiceObservabilityExportReplaySource, type VoiceObservabilityExportReport } from './observabilityExport';
22
22
  import type { VoiceMediaPipelineReport } from './mediaPipelineRoutes';
23
+ import type { MediaWebRTCStatsReport } from '@absolutejs/media';
23
24
  export type VoiceProductionReadinessObservabilityExportDeliveryHistoryOptions = {
24
25
  failOnMissing?: boolean;
25
26
  failOnStale?: boolean;
@@ -133,6 +134,7 @@ export type VoiceProductionReadinessReport = {
133
134
  observabilityExportDeliveries?: string;
134
135
  monitoring?: string;
135
136
  monitoringNotifierDelivery?: string;
137
+ browserMedia?: string;
136
138
  mediaPipeline?: string;
137
139
  opsActions?: string;
138
140
  opsRecovery?: string;
@@ -220,6 +222,17 @@ export type VoiceProductionReadinessReport = {
220
222
  status: VoiceProductionReadinessStatus;
221
223
  timestampDriftMs?: number;
222
224
  };
225
+ browserMedia?: {
226
+ activeCandidatePairs: number;
227
+ bytesReceived: number;
228
+ bytesSent: number;
229
+ issues: number;
230
+ jitterMs?: number;
231
+ liveAudioTracks: number;
232
+ packetLossRatio: number;
233
+ roundTripTimeMs?: number;
234
+ status: VoiceProductionReadinessStatus;
235
+ };
223
236
  opsActionHistory?: VoiceProductionReadinessOpsActionHistorySummary;
224
237
  opsRecovery?: {
225
238
  issues: number;
@@ -464,6 +477,10 @@ export type VoiceProductionReadinessRoutesOptions = {
464
477
  query: Record<string, unknown>;
465
478
  request: Request;
466
479
  }) => Promise<VoiceMediaPipelineReport> | VoiceMediaPipelineReport);
480
+ browserMedia?: false | MediaWebRTCStatsReport | ((input: {
481
+ query: Record<string, unknown>;
482
+ request: Request;
483
+ }) => Promise<MediaWebRTCStatsReport> | MediaWebRTCStatsReport);
467
484
  opsActionHistory?: false | VoiceProductionReadinessOpsActionHistoryOptions;
468
485
  opsRecovery?: false | VoiceOpsRecoveryReport | ((input: {
469
486
  query: Record<string, unknown>;
@@ -51,6 +51,7 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
51
51
  readonly observabilityExportDeliveries?: string | undefined;
52
52
  readonly monitoring?: string | undefined;
53
53
  readonly monitoringNotifierDelivery?: string | undefined;
54
+ readonly browserMedia?: string | undefined;
54
55
  readonly mediaPipeline?: string | undefined;
55
56
  readonly opsActions?: string | undefined;
56
57
  readonly opsRecovery?: string | undefined;
@@ -249,6 +250,17 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
249
250
  readonly status: import("..").VoiceProductionReadinessStatus;
250
251
  readonly timestampDriftMs?: number | undefined;
251
252
  } | undefined;
253
+ readonly browserMedia?: {
254
+ readonly activeCandidatePairs: number;
255
+ readonly bytesReceived: number;
256
+ readonly bytesSent: number;
257
+ readonly issues: number;
258
+ readonly jitterMs?: number | undefined;
259
+ readonly liveAudioTracks: number;
260
+ readonly packetLossRatio: number;
261
+ readonly roundTripTimeMs?: number | undefined;
262
+ readonly status: import("..").VoiceProductionReadinessStatus;
263
+ } | undefined;
252
264
  readonly opsActionHistory?: {
253
265
  readonly failed: number;
254
266
  readonly passed: number;
@@ -453,6 +465,7 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
453
465
  readonly observabilityExportDeliveries?: string | undefined;
454
466
  readonly monitoring?: string | undefined;
455
467
  readonly monitoringNotifierDelivery?: string | undefined;
468
+ readonly browserMedia?: string | undefined;
456
469
  readonly mediaPipeline?: string | undefined;
457
470
  readonly opsActions?: string | undefined;
458
471
  readonly opsRecovery?: string | undefined;
@@ -651,6 +664,17 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
651
664
  readonly status: import("..").VoiceProductionReadinessStatus;
652
665
  readonly timestampDriftMs?: number | undefined;
653
666
  } | undefined;
667
+ readonly browserMedia?: {
668
+ readonly activeCandidatePairs: number;
669
+ readonly bytesReceived: number;
670
+ readonly bytesSent: number;
671
+ readonly issues: number;
672
+ readonly jitterMs?: number | undefined;
673
+ readonly liveAudioTracks: number;
674
+ readonly packetLossRatio: number;
675
+ readonly roundTripTimeMs?: number | undefined;
676
+ readonly status: import("..").VoiceProductionReadinessStatus;
677
+ } | undefined;
654
678
  readonly opsActionHistory?: {
655
679
  readonly failed: number;
656
680
  readonly passed: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.317",
3
+ "version": "0.0.22-beta.319",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -246,7 +246,7 @@
246
246
  }
247
247
  },
248
248
  "dependencies": {
249
- "@absolutejs/media": "0.0.1-beta.2"
249
+ "@absolutejs/media": "0.0.1-beta.4"
250
250
  },
251
251
  "devDependencies": {
252
252
  "@absolutejs/absolute": "0.19.0-beta.646",