@absolutejs/voice 0.0.22-beta.292 → 0.0.22-beta.293

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.
@@ -15,6 +15,7 @@ import type { VoiceAuditEventStore, VoiceAuditEventType, VoiceAuditOutcome } fro
15
15
  import { type VoiceAuditSinkDeliveryStore } from './auditSinks';
16
16
  import type { VoiceProviderContractMatrixReport, VoiceProviderStackCapabilityGapReport } from './providerStackRecommendations';
17
17
  import { type VoiceProviderSloReport, type VoiceProviderSloReportOptions } from './providerSlo';
18
+ import type { VoiceProviderOrchestrationReport } from './providerOrchestration';
18
19
  import type { VoiceCampaignReadinessProofReport } from './campaign';
19
20
  import { type VoiceOpsRecoveryReport } from './opsRecovery';
20
21
  import { type VoiceObservabilityExportDeliveryHistory, type VoiceObservabilityExportDeliveryReceiptStore, type VoiceObservabilityExportReplayReport, type VoiceObservabilityExportReplaySource, type VoiceObservabilityExportReport } from './observabilityExport';
@@ -136,6 +137,7 @@ export type VoiceProductionReadinessReport = {
136
137
  phoneAgentSmoke?: string;
137
138
  telephonyWebhookSecurity?: string;
138
139
  providerContracts?: string;
140
+ providerOrchestration?: string;
139
141
  providerRoutingContracts?: string;
140
142
  providerSlo?: string;
141
143
  quality?: string;
@@ -243,6 +245,15 @@ export type VoiceProductionReadinessReport = {
243
245
  };
244
246
  providerStack?: VoiceProviderStackCapabilityGapReport;
245
247
  providerContractMatrix?: VoiceProviderContractMatrixReport;
248
+ providerOrchestration?: {
249
+ failed: number;
250
+ issues: number;
251
+ passed: number;
252
+ providers: number;
253
+ status: VoiceProductionReadinessStatus;
254
+ surfaces: number;
255
+ warned: number;
256
+ };
246
257
  providerRecovery: VoiceProviderFallbackRecoverySummary;
247
258
  phoneAgentSmokes?: {
248
259
  failed: number;
@@ -469,6 +480,10 @@ export type VoiceProductionReadinessRoutesOptions = {
469
480
  query: Record<string, unknown>;
470
481
  request: Request;
471
482
  }) => Promise<VoiceProviderSloReport | VoiceProviderSloReportOptions> | VoiceProviderSloReport | VoiceProviderSloReportOptions);
483
+ providerOrchestration?: false | VoiceProviderOrchestrationReport | ((input: {
484
+ query: Record<string, unknown>;
485
+ request: Request;
486
+ }) => Promise<VoiceProviderOrchestrationReport> | VoiceProviderOrchestrationReport);
472
487
  providerStack?: false | VoiceProviderStackCapabilityGapReport | ((input: {
473
488
  query: Record<string, unknown>;
474
489
  request: Request;
@@ -0,0 +1,109 @@
1
+ import { Elysia } from 'elysia';
2
+ import type { VoiceProviderOrchestrationProfile, VoiceProviderRouterProviderProfile } from './modelAdapters';
3
+ import type { VoiceSessionRecord } from './types';
4
+ export type VoiceProviderOrchestrationStatus = 'fail' | 'pass' | 'warn';
5
+ export type VoiceProviderOrchestrationRequirement = {
6
+ minProviders?: number;
7
+ requireBudgetPolicy?: boolean;
8
+ requireCircuitBreaker?: boolean;
9
+ requireFallback?: boolean;
10
+ requireTimeoutBudget?: boolean;
11
+ };
12
+ export type VoiceProviderOrchestrationIssue = {
13
+ code: string;
14
+ message: string;
15
+ status: Exclude<VoiceProviderOrchestrationStatus, 'pass'>;
16
+ surface?: string;
17
+ };
18
+ export type VoiceProviderOrchestrationSurfaceReport = {
19
+ allowProviders: string[];
20
+ budgetPolicy: {
21
+ maxCost?: number;
22
+ maxLatencyMs?: number;
23
+ minQuality?: number;
24
+ };
25
+ circuitBreaker: boolean;
26
+ fallbackMode?: string;
27
+ fallbackProviders: string[];
28
+ issues: VoiceProviderOrchestrationIssue[];
29
+ providerProfiles: Record<string, VoiceProviderRouterProviderProfile>;
30
+ providers: string[];
31
+ status: VoiceProviderOrchestrationStatus;
32
+ strategy?: string;
33
+ surface: string;
34
+ timeoutBudget: boolean;
35
+ timeoutMs?: number;
36
+ };
37
+ export type VoiceProviderOrchestrationReport = {
38
+ checkedAt: number;
39
+ issues: VoiceProviderOrchestrationIssue[];
40
+ profileId: string;
41
+ status: VoiceProviderOrchestrationStatus;
42
+ summary: {
43
+ failed: number;
44
+ passed: number;
45
+ providers: number;
46
+ surfaces: number;
47
+ warned: number;
48
+ };
49
+ surfaces: VoiceProviderOrchestrationSurfaceReport[];
50
+ };
51
+ export type VoiceProviderOrchestrationReportOptions<TProvider extends string = string, TSurface extends string = string> = {
52
+ defaultRequirement?: VoiceProviderOrchestrationRequirement;
53
+ profile: VoiceProviderOrchestrationProfile<unknown, VoiceSessionRecord, TProvider, TSurface>;
54
+ requirements?: Partial<Record<TSurface, VoiceProviderOrchestrationRequirement>>;
55
+ };
56
+ export type VoiceProviderOrchestrationRoutesOptions<TProvider extends string = string, TSurface extends string = string> = VoiceProviderOrchestrationReportOptions<TProvider, TSurface> & {
57
+ headers?: HeadersInit;
58
+ htmlPath?: false | string;
59
+ markdownPath?: false | string;
60
+ name?: string;
61
+ path?: string;
62
+ render?: (report: VoiceProviderOrchestrationReport) => string | Promise<string>;
63
+ title?: string;
64
+ };
65
+ export declare const buildVoiceProviderOrchestrationReport: <TProvider extends string = string, TSurface extends string = string>(options: VoiceProviderOrchestrationReportOptions<TProvider, TSurface>) => VoiceProviderOrchestrationReport;
66
+ export declare const renderVoiceProviderOrchestrationMarkdown: (report: VoiceProviderOrchestrationReport) => string;
67
+ export declare const renderVoiceProviderOrchestrationHTML: (report: VoiceProviderOrchestrationReport, options?: {
68
+ title?: string;
69
+ }) => string;
70
+ export declare const createVoiceProviderOrchestrationRoutes: <TProvider extends string = string, TSurface extends string = string>(options: VoiceProviderOrchestrationRoutesOptions<TProvider, TSurface>) => Elysia<"", {
71
+ decorator: {};
72
+ store: {};
73
+ derive: {};
74
+ resolve: {};
75
+ }, {
76
+ typebox: {};
77
+ error: {};
78
+ }, {
79
+ schema: {};
80
+ standaloneSchema: {};
81
+ macro: {};
82
+ macroFn: {};
83
+ parser: {};
84
+ response: {};
85
+ }, {
86
+ [x: string]: {
87
+ get: {
88
+ body: unknown;
89
+ params: {};
90
+ query: unknown;
91
+ headers: unknown;
92
+ response: {
93
+ 200: VoiceProviderOrchestrationReport;
94
+ };
95
+ };
96
+ };
97
+ }, {
98
+ derive: {};
99
+ resolve: {};
100
+ schema: {};
101
+ standaloneSchema: {};
102
+ response: {};
103
+ }, {
104
+ derive: {};
105
+ resolve: {};
106
+ schema: {};
107
+ standaloneSchema: {};
108
+ response: {};
109
+ }>;
@@ -56,6 +56,7 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
56
56
  readonly phoneAgentSmoke?: string | undefined;
57
57
  readonly telephonyWebhookSecurity?: string | undefined;
58
58
  readonly providerContracts?: string | undefined;
59
+ readonly providerOrchestration?: string | undefined;
59
60
  readonly providerRoutingContracts?: string | undefined;
60
61
  readonly providerSlo?: string | undefined;
61
62
  readonly quality?: string | undefined;
@@ -310,6 +311,15 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
310
311
  readonly total: number;
311
312
  readonly warned: number;
312
313
  } | undefined;
314
+ readonly providerOrchestration?: {
315
+ readonly failed: number;
316
+ readonly issues: number;
317
+ readonly passed: number;
318
+ readonly providers: number;
319
+ readonly status: import("..").VoiceProductionReadinessStatus;
320
+ readonly surfaces: number;
321
+ readonly warned: number;
322
+ } | undefined;
313
323
  readonly providerRecovery: {
314
324
  readonly recovered: number;
315
325
  readonly recoveredSessions: number;
@@ -429,6 +439,7 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
429
439
  readonly phoneAgentSmoke?: string | undefined;
430
440
  readonly telephonyWebhookSecurity?: string | undefined;
431
441
  readonly providerContracts?: string | undefined;
442
+ readonly providerOrchestration?: string | undefined;
432
443
  readonly providerRoutingContracts?: string | undefined;
433
444
  readonly providerSlo?: string | undefined;
434
445
  readonly quality?: string | undefined;
@@ -683,6 +694,15 @@ export declare const useVoiceReadinessFailures: (path?: string, options?: VoiceR
683
694
  readonly total: number;
684
695
  readonly warned: number;
685
696
  } | undefined;
697
+ readonly providerOrchestration?: {
698
+ readonly failed: number;
699
+ readonly issues: number;
700
+ readonly passed: number;
701
+ readonly providers: number;
702
+ readonly status: import("..").VoiceProductionReadinessStatus;
703
+ readonly surfaces: number;
704
+ readonly warned: number;
705
+ } | undefined;
686
706
  readonly providerRecovery: {
687
707
  readonly recovered: number;
688
708
  readonly recoveredSessions: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.292",
3
+ "version": "0.0.22-beta.293",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",