@absolutejs/voice 0.0.22-beta.323 → 0.0.22-beta.324

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
@@ -29776,6 +29776,12 @@ var resolveBrowserMedia = async (options, input) => {
29776
29776
  }
29777
29777
  return typeof options.browserMedia === "function" ? await options.browserMedia(input) : options.browserMedia;
29778
29778
  };
29779
+ var resolveTelephonyMedia = async (options, input) => {
29780
+ if (options.telephonyMedia === false || options.telephonyMedia === undefined) {
29781
+ return;
29782
+ }
29783
+ return typeof options.telephonyMedia === "function" ? await options.telephonyMedia(input) : options.telephonyMedia;
29784
+ };
29779
29785
  var isVoiceTelephonyWebhookSecurityReport = (value) => typeof value.generatedAt === "number" && Array.isArray(value.providers) && typeof value.status === "string";
29780
29786
  var resolveTelephonyWebhookSecurity = async (options, input) => {
29781
29787
  if (options.telephonyWebhookSecurity === false || options.telephonyWebhookSecurity === undefined) {
@@ -30161,6 +30167,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
30161
30167
  monitoringNotifierDelivery,
30162
30168
  mediaPipeline,
30163
30169
  browserMedia,
30170
+ telephonyMedia,
30164
30171
  telephonyWebhookSecurity,
30165
30172
  reconnectContracts,
30166
30173
  bargeInReports,
@@ -30205,6 +30212,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
30205
30212
  resolveMonitoringNotifierDelivery(options, { query, request }),
30206
30213
  resolveMediaPipeline(options, { query, request }),
30207
30214
  resolveBrowserMedia(options, { query, request }),
30215
+ resolveTelephonyMedia(options, { query, request }),
30208
30216
  resolveTelephonyWebhookSecurity(options, { query, request }),
30209
30217
  resolveReconnectContracts(options, { query, request }),
30210
30218
  resolveBargeInReports(options, { query, request }),
@@ -30403,6 +30411,14 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
30403
30411
  roundTripTimeMs: browserMedia.roundTripTimeMs,
30404
30412
  status: browserMedia.status === "pass" ? "pass" : "fail"
30405
30413
  } : undefined;
30414
+ const telephonyMediaSummary = telephonyMedia ? {
30415
+ audioBytes: telephonyMedia.carriers.reduce((total, carrier) => total + carrier.audioBytes, 0),
30416
+ carriers: telephonyMedia.carriers.length,
30417
+ failed: telephonyMedia.carriers.filter((carrier) => carrier.status !== "pass").length,
30418
+ issues: telephonyMedia.issues.length,
30419
+ passed: telephonyMedia.carriers.filter((carrier) => carrier.status === "pass").length,
30420
+ status: telephonyMedia.status === "pass" ? "pass" : "fail"
30421
+ } : undefined;
30406
30422
  checks.push({
30407
30423
  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).`,
30408
30424
  href: firstOperationsRecordHref(operationsRecords.failingLatency) ?? options.links?.liveLatency ?? "/traces",
@@ -30495,6 +30511,31 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
30495
30511
  ]
30496
30512
  });
30497
30513
  }
30514
+ if (telephonyMedia && telephonyMediaSummary) {
30515
+ const firstIssue = telephonyMedia.issues[0];
30516
+ checks.push({
30517
+ detail: telephonyMediaSummary.status === "pass" ? `Telephony media serializers are passing for ${telephonyMediaSummary.passed}/${telephonyMediaSummary.carriers} carrier(s) with ${telephonyMediaSummary.audioBytes} audio byte(s) parsed into MediaFrame objects.` : firstIssue ?? `${telephonyMediaSummary.issues} telephony media serializer issue(s) need review.`,
30518
+ href: options.links?.telephonyMedia ?? "/voice/telephony-media",
30519
+ label: "Telephony media serializers",
30520
+ proofSource: proofSource("telephonyMedia", "carrierMediaSerializers"),
30521
+ gateExplanation: telephonyMediaSummary.status === "pass" ? undefined : {
30522
+ evidenceHref: options.links?.telephonyMedia ?? "/voice/telephony-media",
30523
+ observed: firstIssue ?? `${telephonyMediaSummary.issues} issue(s)`,
30524
+ remediation: "Inspect carrier media serializer proof, fix payload parsing or outbound envelope serialization, then rerun readiness proof.",
30525
+ thresholdLabel: "Telephony media serializer status",
30526
+ unit: "status"
30527
+ },
30528
+ status: telephonyMediaSummary.status,
30529
+ value: telephonyMediaSummary.status === "pass" ? `${telephonyMediaSummary.passed}/${telephonyMediaSummary.carriers}` : `${telephonyMediaSummary.failed}/${telephonyMediaSummary.carriers} failing`,
30530
+ actions: telephonyMediaSummary.status === "pass" ? [] : [
30531
+ {
30532
+ description: "Open telephony media proof and inspect carrier media payload parsing, MediaFrame shape, and outbound envelope serialization.",
30533
+ href: options.links?.telephonyMedia ?? "/voice/telephony-media",
30534
+ label: "Open telephony media proof"
30535
+ }
30536
+ ]
30537
+ });
30538
+ }
30498
30539
  const carrierSummary = carriers ? {
30499
30540
  failing: carriers.summary.failing,
30500
30541
  providers: carriers.summary.providers,
@@ -31071,6 +31112,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
31071
31112
  opsActions: "/voice/ops-actions",
31072
31113
  opsRecovery: "/ops-recovery",
31073
31114
  phoneAgentSmoke: "/sessions",
31115
+ telephonyMedia: "/voice/telephony-media",
31074
31116
  telephonyWebhookSecurity: "/api/voice/telephony/webhook-security",
31075
31117
  providerContracts: "/provider-contracts",
31076
31118
  providerOrchestration: "/voice/provider-orchestration",
@@ -31124,6 +31166,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
31124
31166
  providerOrchestration: providerOrchestrationSummary,
31125
31167
  providerRecovery,
31126
31168
  phoneAgentSmokes: phoneAgentSmokeSummary,
31169
+ telephonyMedia: telephonyMediaSummary,
31127
31170
  telephonyWebhookSecurity: telephonyWebhookSecuritySummary,
31128
31171
  providerRoutingContracts: providerRoutingContractSummary,
31129
31172
  providerSlo: providerSloSummary,
@@ -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 { VoiceTelephonyMediaReport } from './telephonyMediaRoutes';
23
24
  import type { MediaWebRTCStatsReport } from '@absolutejs/media';
24
25
  export type VoiceProductionReadinessObservabilityExportDeliveryHistoryOptions = {
25
26
  failOnMissing?: boolean;
@@ -140,6 +141,7 @@ export type VoiceProductionReadinessReport = {
140
141
  opsRecovery?: string;
141
142
  phoneAgentSmoke?: string;
142
143
  telephonyWebhookSecurity?: string;
144
+ telephonyMedia?: string;
143
145
  providerContracts?: string;
144
146
  providerOrchestration?: string;
145
147
  providerRoutingContracts?: string;
@@ -294,6 +296,14 @@ export type VoiceProductionReadinessReport = {
294
296
  status: VoiceProductionReadinessStatus;
295
297
  warned: number;
296
298
  };
299
+ telephonyMedia?: {
300
+ audioBytes: number;
301
+ carriers: number;
302
+ failed: number;
303
+ issues: number;
304
+ passed: number;
305
+ status: VoiceProductionReadinessStatus;
306
+ };
297
307
  providerRoutingContracts?: {
298
308
  failed: number;
299
309
  passed: number;
@@ -481,6 +491,10 @@ export type VoiceProductionReadinessRoutesOptions = {
481
491
  query: Record<string, unknown>;
482
492
  request: Request;
483
493
  }) => Promise<MediaWebRTCStatsReport> | MediaWebRTCStatsReport);
494
+ telephonyMedia?: false | VoiceTelephonyMediaReport | ((input: {
495
+ query: Record<string, unknown>;
496
+ request: Request;
497
+ }) => Promise<VoiceTelephonyMediaReport> | VoiceTelephonyMediaReport);
484
498
  opsActionHistory?: false | VoiceProductionReadinessOpsActionHistoryOptions;
485
499
  opsRecovery?: false | VoiceOpsRecoveryReport | ((input: {
486
500
  query: Record<string, unknown>;
@@ -57,6 +57,7 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
57
57
  readonly opsRecovery?: string | undefined;
58
58
  readonly phoneAgentSmoke?: string | undefined;
59
59
  readonly telephonyWebhookSecurity?: string | undefined;
60
+ readonly telephonyMedia?: string | undefined;
60
61
  readonly providerContracts?: string | undefined;
61
62
  readonly providerOrchestration?: string | undefined;
62
63
  readonly providerRoutingContracts?: string | undefined;
@@ -373,6 +374,14 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
373
374
  readonly status: import("..").VoiceProductionReadinessStatus;
374
375
  readonly warned: number;
375
376
  } | undefined;
377
+ readonly telephonyMedia?: {
378
+ readonly audioBytes: number;
379
+ readonly carriers: number;
380
+ readonly failed: number;
381
+ readonly issues: number;
382
+ readonly passed: number;
383
+ readonly status: import("..").VoiceProductionReadinessStatus;
384
+ } | undefined;
376
385
  readonly providerRoutingContracts?: {
377
386
  readonly failed: number;
378
387
  readonly passed: number;
@@ -471,6 +480,7 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
471
480
  readonly opsRecovery?: string | undefined;
472
481
  readonly phoneAgentSmoke?: string | undefined;
473
482
  readonly telephonyWebhookSecurity?: string | undefined;
483
+ readonly telephonyMedia?: string | undefined;
474
484
  readonly providerContracts?: string | undefined;
475
485
  readonly providerOrchestration?: string | undefined;
476
486
  readonly providerRoutingContracts?: string | undefined;
@@ -787,6 +797,14 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
787
797
  readonly status: import("..").VoiceProductionReadinessStatus;
788
798
  readonly warned: number;
789
799
  } | undefined;
800
+ readonly telephonyMedia?: {
801
+ readonly audioBytes: number;
802
+ readonly carriers: number;
803
+ readonly failed: number;
804
+ readonly issues: number;
805
+ readonly passed: number;
806
+ readonly status: import("..").VoiceProductionReadinessStatus;
807
+ } | undefined;
790
808
  readonly providerRoutingContracts?: {
791
809
  readonly failed: number;
792
810
  readonly passed: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.323",
3
+ "version": "0.0.22-beta.324",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",