@absolutejs/voice 0.0.22-beta.345 → 0.0.22-beta.346

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
@@ -31123,6 +31123,12 @@ var resolveProofSources = async (options, input) => {
31123
31123
  }
31124
31124
  return typeof options.proofSources === "function" ? await options.proofSources(input) : options.proofSources;
31125
31125
  };
31126
+ var resolveAdditionalChecks = async (options, input) => {
31127
+ if (options.additionalChecks === false || options.additionalChecks === undefined) {
31128
+ return [];
31129
+ }
31130
+ return typeof options.additionalChecks === "function" ? await options.additionalChecks(input) : options.additionalChecks;
31131
+ };
31126
31132
  var isVoiceDeliveryRuntime = (value) => typeof value.summarize === "function";
31127
31133
  var resolveDeliveryRuntime = async (options, input) => {
31128
31134
  if (options.deliveryRuntime === false || options.deliveryRuntime === undefined) {
@@ -31501,7 +31507,8 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
31501
31507
  observabilityExport,
31502
31508
  observabilityExportDeliveryHistory,
31503
31509
  observabilityExportReplay,
31504
- proofSources
31510
+ proofSources,
31511
+ additionalChecks
31505
31512
  ] = await Promise.all([
31506
31513
  evaluateVoiceQuality({ events }),
31507
31514
  Promise.all([
@@ -31546,7 +31553,8 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
31546
31553
  resolveObservabilityExport(options, { query, request }),
31547
31554
  resolveObservabilityExportDeliveryHistory(options, { query, request }),
31548
31555
  resolveObservabilityExportReplay(options, { query, request }),
31549
- resolveProofSources(options, { query, request })
31556
+ resolveProofSources(options, { query, request }),
31557
+ resolveAdditionalChecks(options, { query, request })
31550
31558
  ]);
31551
31559
  const deliveryRuntime = summarizeDeliveryRuntime(deliveryRuntimeSummary);
31552
31560
  const degradedProviders = providers.filter((provider) => provider.status === "degraded" || provider.status === "rate-limited" || provider.status === "suppressed").length;
@@ -31695,6 +31703,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
31695
31703
  ]
31696
31704
  }
31697
31705
  ];
31706
+ checks.push(...additionalChecks);
31698
31707
  const proofSource = (...keys) => keys.map((key) => proofSources?.[key]).find((source) => source !== undefined);
31699
31708
  const calibratedThresholdActions = () => options.links?.sloReadinessThresholds ? [
31700
31709
  {
@@ -453,6 +453,10 @@ export type VoiceProductionReadinessRoutesOptions = {
453
453
  query: Record<string, unknown>;
454
454
  request: Request;
455
455
  }) => Promise<readonly VoiceAgentSquadContractReport[]> | readonly VoiceAgentSquadContractReport[]);
456
+ additionalChecks?: false | readonly VoiceProductionReadinessCheck[] | ((input: {
457
+ query: Record<string, unknown>;
458
+ request: Request;
459
+ }) => Promise<readonly VoiceProductionReadinessCheck[]> | readonly VoiceProductionReadinessCheck[]);
456
460
  audit?: false | VoiceProductionReadinessAuditOptions;
457
461
  auditDeliveries?: false | VoiceProductionReadinessAuditDeliveryOptions;
458
462
  bargeInReports?: false | readonly VoiceBargeInReport[] | ((input: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.345",
3
+ "version": "0.0.22-beta.346",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",