@absolutejs/voice 0.0.22-beta.377 → 0.0.22-beta.378

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/README.md CHANGED
@@ -1555,6 +1555,12 @@ additionalChecks: async () => [
1555
1555
  ];
1556
1556
  ```
1557
1557
 
1558
+ Use `buildVoiceReadinessRecoveryActions(...)` when a UI or API needs a compact plan of actions attached to failed or warning readiness checks:
1559
+
1560
+ ```ts
1561
+ const recoveryPlan = buildVoiceReadinessRecoveryActions(readinessReport);
1562
+ ```
1563
+
1558
1564
  Use `createVoiceProfileTraceTagger(...)` when the app already has a trace store and needs every appended trace to carry a benchmark profile label. It wraps any `VoiceTraceEventStore`, preserves the underlying store behavior, and adds `profileId`/`benchmarkProfileId` metadata and payload fields that real-call profile history can ingest later.
1559
1565
 
1560
1566
  ```ts
package/dist/index.d.ts CHANGED
@@ -72,7 +72,7 @@ export { buildVoiceProviderOrchestrationReport, createVoiceProviderOrchestration
72
72
  export { assertVoiceProviderRoutingContractEvidence, assertVoiceProviderRoutingContract, evaluateVoiceProviderRoutingContractEvidence, runVoiceProviderRoutingContract } from './providerRoutingContract';
73
73
  export { assertVoiceProviderSloEvidence, buildVoiceProviderSloReport, createVoiceProviderSloRoutes, evaluateVoiceProviderSloEvidence, renderVoiceProviderSloHTML, renderVoiceProviderSloMarkdown } from './providerSlo';
74
74
  export { createVoicePhoneAgentProductionSmokeHTMLHandler, createVoicePhoneAgentProductionSmokeJSONHandler, createVoicePhoneAgentProductionSmokeRoutes, renderVoicePhoneAgentProductionSmokeHTML, runVoicePhoneAgentProductionSmokeContract } from './phoneAgentProductionSmoke';
75
- export { assertVoiceProductionReadinessEvidence, buildVoiceProductionReadinessGate, buildVoiceProductionReadinessReport, createVoiceProductionReadinessProofRuntime, createVoiceProductionReadinessRoutes, evaluateVoiceProductionReadinessEvidence, renderVoiceProductionReadinessHTML, summarizeVoiceProductionReadinessGate } from './productionReadiness';
75
+ export { assertVoiceProductionReadinessEvidence, buildVoiceProductionReadinessGate, buildVoiceProductionReadinessReport, buildVoiceReadinessRecoveryActions, createVoiceProductionReadinessProofRuntime, createVoiceProductionReadinessRoutes, evaluateVoiceProductionReadinessEvidence, renderVoiceProductionReadinessHTML, summarizeVoiceProductionReadinessGate } from './productionReadiness';
76
76
  export { acknowledgeVoiceMonitorIssue, buildVoiceMonitorRunReport, createVoiceMemoryMonitorIssueStore, createVoiceMemoryMonitorNotifierDeliveryReceiptStore, createVoiceMonitorRoutes, createVoiceMonitorRunner, createVoiceMonitorRunnerRoutes, createVoiceMonitorWebhookNotifier, deliverVoiceMonitorIssueNotifications, muteVoiceMonitorIssue, renderVoiceMonitorHTML, renderVoiceMonitorMarkdown, resolveVoiceMonitorIssue } from './voiceMonitoring';
77
77
  export { createVoiceReadinessProfile, recommendVoiceReadinessProfile } from './readinessProfiles';
78
78
  export { assertVoiceProviderContractMatrixEvidence, assertVoiceProviderStackEvidence, buildVoiceProviderContractMatrix, createVoiceProviderContractMatrixHTMLHandler, createVoiceProviderContractMatrixJSONHandler, createVoiceProviderContractMatrixPreset, createVoiceProviderContractMatrixRoutes, evaluateVoiceProviderContractMatrixEvidence, evaluateVoiceProviderStackEvidence, evaluateVoiceProviderStackGaps, renderVoiceProviderContractMatrixHTML, recommendVoiceProviderStack } from './providerStackRecommendations';
@@ -142,7 +142,7 @@ export type { VoicePhoneAgentCarrier, VoicePhoneAgentCarrierSummary, VoicePhoneA
142
142
  export type { VoicePhoneAgentProductionSmokeIssue, VoicePhoneAgentProductionSmokeHandlerOptions, VoicePhoneAgentProductionSmokeHTMLHandlerOptions, VoicePhoneAgentProductionSmokeOptions, VoicePhoneAgentProductionSmokeReport, VoicePhoneAgentProductionSmokeRoutesOptions, VoicePhoneAgentProductionSmokeRequirement } from './phoneAgentProductionSmoke';
143
143
  export type { VoiceOpsConsoleLink, VoiceOpsConsoleReport, VoiceOpsConsoleRoutesOptions } from './opsConsoleRoutes';
144
144
  export type { VoiceOpsStatus, VoiceOpsStatusLink, VoiceOpsStatusOptions, VoiceOpsStatusReport, VoiceOpsStatusRoutesOptions } from './opsStatus';
145
- export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessAssertionInput, VoiceProductionReadinessAssertionReport, VoiceProductionReadinessCheck, VoiceProductionReadinessGateExplanation, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateProfile, VoiceProductionReadinessGateProfileSurface, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessOperationsRecordLink, VoiceProductionReadinessOperationsRecordLinks, VoiceProductionReadinessProfileExplanation, VoiceProductionReadinessProfileSurface, VoiceProductionReadinessProofMetadata, VoiceProductionReadinessProofRuntime, VoiceProductionReadinessProofRuntimeOptions, VoiceProductionReadinessProofRuntimeSeedOptions, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRouteInput, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
145
+ export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessAssertionInput, VoiceProductionReadinessAssertionReport, VoiceProductionReadinessCheck, VoiceProductionReadinessGateExplanation, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateProfile, VoiceProductionReadinessGateProfileSurface, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessOperationsRecordLink, VoiceProductionReadinessOperationsRecordLinks, VoiceProductionReadinessProfileExplanation, VoiceProductionReadinessProfileSurface, VoiceProductionReadinessProofMetadata, VoiceProductionReadinessProofRuntime, VoiceProductionReadinessProofRuntimeOptions, VoiceProductionReadinessProofRuntimeSeedOptions, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRouteInput, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceReadinessRecoveryAction, VoiceReadinessRecoveryActionOptions, VoiceReadinessRecoveryActionPlan, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
146
146
  export type { VoiceMonitorDefinition, VoiceMonitorEvaluation, VoiceMonitorEvaluationInput, VoiceMonitorIssue, VoiceMonitorIssueStatus, VoiceMonitorIssueStore, VoiceMonitorNotifier, VoiceMonitorNotifierDeliveryInput, VoiceMonitorNotifierDeliveryOptions, VoiceMonitorNotifierDeliveryReceipt, VoiceMonitorNotifierDeliveryReceiptStore, VoiceMonitorNotifierDeliveryReport, VoiceMonitorNotifierDeliveryResult, VoiceMonitorRoutesOptions, VoiceMonitorRun, VoiceMonitorRunOptions, VoiceMonitorRunReport, VoiceMonitorRunner, VoiceMonitorRunnerOptions, VoiceMonitorRunnerRoutesOptions, VoiceMonitorRunnerTickResult, VoiceMonitorSeverity, VoiceMonitorStatus, VoiceMonitorWebhookNotifierOptions } from './voiceMonitoring';
147
147
  export type { VoiceReadinessProfileName, VoiceReadinessProfileOptions, VoiceReadinessProfileRecommendation, VoiceReadinessProfileRecommendationScore, VoiceReadinessProfileRoutesOptions } from './readinessProfiles';
148
148
  export type { VoiceProviderStackChoice, VoiceProviderStackCapabilities, VoiceProviderStackCapabilityGap, VoiceProviderStackCapabilityGapInput, VoiceProviderStackCapabilityGapReport, VoiceProviderContractCheck, VoiceProviderContractCheckStatus, VoiceProviderContractDefinition, VoiceProviderContractMatrixAssertionInput, VoiceProviderContractMatrixAssertionReport, VoiceProviderContractMatrixHandlerOptions, VoiceProviderContractMatrixHTMLHandlerOptions, VoiceProviderContractMatrixInput, VoiceProviderContractMatrixPresetOptions, VoiceProviderContractMatrixReport, VoiceProviderContractMatrixRoutesOptions, VoiceProviderContractMatrixRow, VoiceProviderStackAssertionInput, VoiceProviderStackAssertionReport, VoiceProviderStackInput, VoiceProviderStackKind, VoiceProviderStackRecommendation } from './providerStackRecommendations';
package/dist/index.js CHANGED
@@ -32553,6 +32553,36 @@ var createVoiceObservabilityExportRoutes = (options = {}) => {
32553
32553
  };
32554
32554
 
32555
32555
  // src/productionReadiness.ts
32556
+ var buildVoiceReadinessRecoveryActions = (input, options = {}) => {
32557
+ const checks = "checks" in input ? input.checks : input;
32558
+ const includeWarnings = options.includeWarnings ?? true;
32559
+ const sourceChecks = checks.filter((check) => check.status === "fail" || includeWarnings && check.status === "warn");
32560
+ const seen = new Set;
32561
+ const actions = sourceChecks.flatMap((check) => (check.actions ?? []).flatMap((action) => {
32562
+ const method = action.method ?? "GET";
32563
+ const key = `${method}:${action.href}:${check.label}`;
32564
+ if (seen.has(key)) {
32565
+ return [];
32566
+ }
32567
+ seen.add(key);
32568
+ return [
32569
+ {
32570
+ ...action,
32571
+ key,
32572
+ method,
32573
+ sourceCheckDetail: check.detail,
32574
+ sourceCheckHref: check.href,
32575
+ sourceCheckLabel: check.label,
32576
+ sourceStatus: check.status
32577
+ }
32578
+ ];
32579
+ }));
32580
+ return {
32581
+ actions,
32582
+ generatedAt: (options.now ?? (() => new Date))().toISOString(),
32583
+ sourceChecks: sourceChecks.length
32584
+ };
32585
+ };
32556
32586
  var escapeHtml52 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
32557
32587
  var formatVoiceProofFreshnessDuration = (valueMs) => {
32558
32588
  if (valueMs < 1000) {
@@ -39368,6 +39398,7 @@ export {
39368
39398
  buildVoiceRealCallProfileHistoryReport,
39369
39399
  buildVoiceRealCallProfileEvidenceFromTraceEvents,
39370
39400
  buildVoiceRealCallProfileDefaults,
39401
+ buildVoiceReadinessRecoveryActions,
39371
39402
  buildVoiceProviderSloReport,
39372
39403
  buildVoiceProviderOrchestrationReport,
39373
39404
  buildVoiceProviderDecisionTraceReport,
@@ -56,6 +56,22 @@ export type VoiceProductionReadinessCheck = {
56
56
  status: VoiceProductionReadinessStatus;
57
57
  value?: number | string;
58
58
  };
59
+ export type VoiceReadinessRecoveryAction = VoiceProductionReadinessAction & {
60
+ key: string;
61
+ sourceCheckDetail?: string;
62
+ sourceCheckHref?: string;
63
+ sourceCheckLabel: string;
64
+ sourceStatus: Exclude<VoiceProductionReadinessStatus, 'pass'>;
65
+ };
66
+ export type VoiceReadinessRecoveryActionPlan = {
67
+ actions: VoiceReadinessRecoveryAction[];
68
+ generatedAt: string;
69
+ sourceChecks: number;
70
+ };
71
+ export type VoiceReadinessRecoveryActionOptions = {
72
+ includeWarnings?: boolean;
73
+ now?: () => Date;
74
+ };
59
75
  export type VoiceProductionReadinessGateIssue = {
60
76
  code: string;
61
77
  detail?: string;
@@ -67,6 +83,7 @@ export type VoiceProductionReadinessGateIssue = {
67
83
  export type VoiceProductionReadinessGateOptions = {
68
84
  failOnWarnings?: boolean;
69
85
  };
86
+ export declare const buildVoiceReadinessRecoveryActions: (input: VoiceProductionReadinessReport | readonly VoiceProductionReadinessCheck[], options?: VoiceReadinessRecoveryActionOptions) => VoiceReadinessRecoveryActionPlan;
70
87
  export type VoiceProductionReadinessGateReport = {
71
88
  checkedAt: number;
72
89
  failures: VoiceProductionReadinessGateIssue[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.377",
3
+ "version": "0.0.22-beta.378",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",