@absolutejs/voice 0.0.22-beta.9 → 0.0.22-beta.91

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.
Files changed (121) hide show
  1. package/README.md +205 -0
  2. package/dist/agent.d.ts +2 -0
  3. package/dist/angular/index.d.ts +7 -0
  4. package/dist/angular/index.js +957 -43
  5. package/dist/angular/voice-app-kit-status.service.d.ts +12 -0
  6. package/dist/angular/voice-ops-status.component.d.ts +15 -0
  7. package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
  8. package/dist/angular/voice-provider-status.service.d.ts +12 -0
  9. package/dist/angular/voice-routing-status.service.d.ts +11 -0
  10. package/dist/angular/voice-stream.service.d.ts +2 -0
  11. package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
  12. package/dist/angular/voice-turn-quality.service.d.ts +12 -0
  13. package/dist/angular/voice-workflow-status.service.d.ts +12 -0
  14. package/dist/appKit.d.ts +98 -0
  15. package/dist/assistantHealth.d.ts +81 -0
  16. package/dist/client/actions.d.ts +22 -0
  17. package/dist/client/appKitStatus.d.ts +19 -0
  18. package/dist/client/connection.d.ts +3 -0
  19. package/dist/client/htmxBootstrap.js +44 -2
  20. package/dist/client/index.d.ts +30 -0
  21. package/dist/client/index.js +1463 -2
  22. package/dist/client/opsStatusWidget.d.ts +40 -0
  23. package/dist/client/providerCapabilities.d.ts +19 -0
  24. package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
  25. package/dist/client/providerSimulationControls.d.ts +33 -0
  26. package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
  27. package/dist/client/providerStatus.d.ts +19 -0
  28. package/dist/client/providerStatusWidget.d.ts +32 -0
  29. package/dist/client/routingStatus.d.ts +19 -0
  30. package/dist/client/routingStatusWidget.d.ts +28 -0
  31. package/dist/client/traceTimeline.d.ts +19 -0
  32. package/dist/client/traceTimelineWidget.d.ts +32 -0
  33. package/dist/client/turnQuality.d.ts +19 -0
  34. package/dist/client/turnQualityWidget.d.ts +32 -0
  35. package/dist/client/workflowStatus.d.ts +19 -0
  36. package/dist/diagnosticsRoutes.d.ts +44 -0
  37. package/dist/evalRoutes.d.ts +213 -0
  38. package/dist/handoff.d.ts +54 -0
  39. package/dist/handoffHealth.d.ts +94 -0
  40. package/dist/index.d.ts +62 -7
  41. package/dist/index.js +10382 -2574
  42. package/dist/modelAdapters.d.ts +75 -0
  43. package/dist/openaiTTS.d.ts +18 -0
  44. package/dist/opsConsoleRoutes.d.ts +77 -0
  45. package/dist/opsWebhook.d.ts +126 -0
  46. package/dist/outcomeContract.d.ts +112 -0
  47. package/dist/postgresStore.d.ts +2 -0
  48. package/dist/productionReadiness.d.ts +111 -0
  49. package/dist/providerAdapters.d.ts +48 -0
  50. package/dist/providerCapabilities.d.ts +92 -0
  51. package/dist/providerHealth.d.ts +79 -0
  52. package/dist/qualityRoutes.d.ts +76 -0
  53. package/dist/queue.d.ts +61 -0
  54. package/dist/react/VoiceOpsStatus.d.ts +6 -0
  55. package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
  56. package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
  57. package/dist/react/VoiceProviderStatus.d.ts +6 -0
  58. package/dist/react/VoiceRoutingStatus.d.ts +6 -0
  59. package/dist/react/VoiceTraceTimeline.d.ts +6 -0
  60. package/dist/react/VoiceTurnQuality.d.ts +6 -0
  61. package/dist/react/index.d.ts +15 -0
  62. package/dist/react/index.js +2150 -11
  63. package/dist/react/useVoiceAppKitStatus.d.ts +8 -0
  64. package/dist/react/useVoiceController.d.ts +2 -0
  65. package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
  66. package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
  67. package/dist/react/useVoiceProviderStatus.d.ts +8 -0
  68. package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
  69. package/dist/react/useVoiceStream.d.ts +2 -0
  70. package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
  71. package/dist/react/useVoiceTurnQuality.d.ts +8 -0
  72. package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
  73. package/dist/resilienceRoutes.d.ts +142 -0
  74. package/dist/sessionReplay.d.ts +175 -0
  75. package/dist/sqliteStore.d.ts +2 -0
  76. package/dist/svelte/createVoiceAppKitStatus.d.ts +8 -0
  77. package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
  78. package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
  79. package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
  80. package/dist/svelte/createVoiceProviderStatus.d.ts +10 -0
  81. package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
  82. package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
  83. package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
  84. package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
  85. package/dist/svelte/index.d.ts +9 -0
  86. package/dist/svelte/index.js +1508 -3
  87. package/dist/telephony/contract.d.ts +61 -0
  88. package/dist/telephony/matrix.d.ts +97 -0
  89. package/dist/telephony/plivo.d.ts +254 -0
  90. package/dist/telephony/telnyx.d.ts +247 -0
  91. package/dist/telephony/twilio.d.ts +132 -0
  92. package/dist/telephonyOutcome.d.ts +201 -0
  93. package/dist/testing/index.d.ts +2 -0
  94. package/dist/testing/index.js +2543 -14
  95. package/dist/testing/ioProviderSimulator.d.ts +41 -0
  96. package/dist/testing/providerSimulator.d.ts +44 -0
  97. package/dist/toolContract.d.ts +130 -0
  98. package/dist/toolRuntime.d.ts +50 -0
  99. package/dist/trace.d.ts +1 -1
  100. package/dist/traceTimeline.d.ts +93 -0
  101. package/dist/turnQuality.d.ts +94 -0
  102. package/dist/types.d.ts +84 -2
  103. package/dist/vue/VoiceOpsStatus.d.ts +30 -0
  104. package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
  105. package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
  106. package/dist/vue/VoiceProviderStatus.d.ts +51 -0
  107. package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
  108. package/dist/vue/VoiceTurnQuality.d.ts +51 -0
  109. package/dist/vue/index.d.ts +14 -0
  110. package/dist/vue/index.js +2047 -25
  111. package/dist/vue/useVoiceAppKitStatus.d.ts +9 -0
  112. package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
  113. package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
  114. package/dist/vue/useVoiceProviderStatus.d.ts +9 -0
  115. package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
  116. package/dist/vue/useVoiceStream.d.ts +2 -0
  117. package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
  118. package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
  119. package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
  120. package/dist/workflowContract.d.ts +91 -0
  121. package/package.json +1 -1
@@ -0,0 +1,40 @@
1
+ import type { VoiceAppKitStatusReport } from '../appKit';
2
+ import { type VoiceAppKitStatusClientOptions, type VoiceAppKitStatusSnapshot } from './appKitStatus';
3
+ export type VoiceOpsStatusSurfaceView = {
4
+ detail: string;
5
+ failed: number;
6
+ id: string;
7
+ label: string;
8
+ status: 'pass' | 'fail';
9
+ total: number;
10
+ };
11
+ export type VoiceOpsStatusViewModel = {
12
+ description: string;
13
+ error: string | null;
14
+ isLoading: boolean;
15
+ label: string;
16
+ links: Array<{
17
+ href: string;
18
+ label: string;
19
+ }>;
20
+ passed: number;
21
+ status: 'pass' | 'fail' | 'loading' | 'error';
22
+ surfaces: VoiceOpsStatusSurfaceView[];
23
+ title: string;
24
+ total: number;
25
+ updatedAt?: number;
26
+ };
27
+ export type VoiceOpsStatusWidgetOptions = VoiceAppKitStatusClientOptions & {
28
+ description?: string;
29
+ includeLinks?: boolean;
30
+ title?: string;
31
+ };
32
+ export declare const getVoiceOpsStatusLabel: (report?: VoiceAppKitStatusReport | null, error?: string | null) => "Needs attention" | "Passing" | "Unavailable" | "Checking";
33
+ export declare const createVoiceOpsStatusViewModel: (snapshot: VoiceAppKitStatusSnapshot, options?: VoiceOpsStatusWidgetOptions) => VoiceOpsStatusViewModel;
34
+ export declare const renderVoiceOpsStatusHTML: (snapshot: VoiceAppKitStatusSnapshot, options?: VoiceOpsStatusWidgetOptions) => string;
35
+ export declare const getVoiceOpsStatusCSS: () => string;
36
+ export declare const mountVoiceOpsStatus: (element: Element, path?: string, options?: VoiceOpsStatusWidgetOptions) => {
37
+ close: () => void;
38
+ refresh: () => Promise<VoiceAppKitStatusReport | undefined>;
39
+ };
40
+ export declare const defineVoiceOpsStatusElement: (tagName?: string) => void;
@@ -0,0 +1,19 @@
1
+ import type { VoiceProviderCapabilityReport } from '../providerCapabilities';
2
+ export type VoiceProviderCapabilitiesClientOptions = {
3
+ fetch?: typeof fetch;
4
+ intervalMs?: number;
5
+ };
6
+ export type VoiceProviderCapabilitiesSnapshot<TProvider extends string = string> = {
7
+ error: string | null;
8
+ isLoading: boolean;
9
+ report?: VoiceProviderCapabilityReport<TProvider>;
10
+ updatedAt?: number;
11
+ };
12
+ export declare const fetchVoiceProviderCapabilities: <TProvider extends string = string>(path?: string, options?: Pick<VoiceProviderCapabilitiesClientOptions, "fetch">) => Promise<VoiceProviderCapabilityReport<TProvider>>;
13
+ export declare const createVoiceProviderCapabilitiesStore: <TProvider extends string = string>(path?: string, options?: VoiceProviderCapabilitiesClientOptions) => {
14
+ close: () => void;
15
+ getServerSnapshot: () => VoiceProviderCapabilitiesSnapshot<TProvider>;
16
+ getSnapshot: () => VoiceProviderCapabilitiesSnapshot<TProvider>;
17
+ refresh: () => Promise<VoiceProviderCapabilityReport<TProvider> | undefined>;
18
+ subscribe: (listener: () => void) => () => void;
19
+ };
@@ -0,0 +1,32 @@
1
+ import type { VoiceProviderCapabilitySummary } from '../providerCapabilities';
2
+ import { type VoiceProviderCapabilitiesClientOptions, type VoiceProviderCapabilitiesSnapshot } from './providerCapabilities';
3
+ export type VoiceProviderCapabilityCardView<TProvider extends string = string> = VoiceProviderCapabilitySummary<TProvider> & {
4
+ detail: string;
5
+ label: string;
6
+ rows: Array<{
7
+ label: string;
8
+ value: string;
9
+ }>;
10
+ };
11
+ export type VoiceProviderCapabilitiesViewModel<TProvider extends string = string> = {
12
+ capabilities: VoiceProviderCapabilityCardView<TProvider>[];
13
+ description: string;
14
+ error: string | null;
15
+ isLoading: boolean;
16
+ label: string;
17
+ status: 'empty' | 'error' | 'loading' | 'ready' | 'warning';
18
+ title: string;
19
+ updatedAt?: number;
20
+ };
21
+ export type VoiceProviderCapabilitiesWidgetOptions = VoiceProviderCapabilitiesClientOptions & {
22
+ description?: string;
23
+ title?: string;
24
+ };
25
+ export declare const createVoiceProviderCapabilitiesViewModel: <TProvider extends string = string>(snapshot: VoiceProviderCapabilitiesSnapshot<TProvider>, options?: VoiceProviderCapabilitiesWidgetOptions) => VoiceProviderCapabilitiesViewModel<TProvider>;
26
+ export declare const renderVoiceProviderCapabilitiesHTML: <TProvider extends string = string>(snapshot: VoiceProviderCapabilitiesSnapshot<TProvider>, options?: VoiceProviderCapabilitiesWidgetOptions) => string;
27
+ export declare const getVoiceProviderCapabilitiesCSS: () => string;
28
+ export declare const mountVoiceProviderCapabilities: <TProvider extends string = string>(element: Element, path?: string, options?: VoiceProviderCapabilitiesWidgetOptions) => {
29
+ close: () => void;
30
+ refresh: () => Promise<import("..").VoiceProviderCapabilityReport<TProvider> | undefined>;
31
+ };
32
+ export declare const defineVoiceProviderCapabilitiesElement: (tagName?: string) => void;
@@ -0,0 +1,33 @@
1
+ import type { VoiceIOProviderFailureSimulationMode, VoiceIOProviderFailureSimulationResult } from '../testing/ioProviderSimulator';
2
+ export type VoiceProviderSimulationProvider<TProvider extends string = string> = {
3
+ configured?: boolean;
4
+ provider: TProvider;
5
+ };
6
+ export type VoiceProviderSimulationControlsOptions<TProvider extends string = string> = {
7
+ fallbackRequiredMessage?: string;
8
+ fallbackRequiredProvider?: TProvider;
9
+ failureMessage?: string;
10
+ failureProviders?: readonly TProvider[];
11
+ fetch?: typeof fetch;
12
+ intervalMs?: number;
13
+ kind?: 'stt' | 'tts' | string;
14
+ pathPrefix?: string;
15
+ providers: readonly VoiceProviderSimulationProvider<TProvider>[];
16
+ recoveryMessage?: string;
17
+ title?: string;
18
+ };
19
+ export type VoiceProviderSimulationControlsSnapshot<TProvider extends string = string> = {
20
+ error: string | null;
21
+ isRunning: boolean;
22
+ lastResult: VoiceIOProviderFailureSimulationResult<TProvider> | null;
23
+ mode: VoiceIOProviderFailureSimulationMode | null;
24
+ provider: TProvider | null;
25
+ updatedAt?: number;
26
+ };
27
+ export declare const createVoiceProviderSimulationControlsStore: <TProvider extends string = string>(options: VoiceProviderSimulationControlsOptions<TProvider>) => {
28
+ close: () => void;
29
+ getServerSnapshot: () => VoiceProviderSimulationControlsSnapshot<TProvider>;
30
+ getSnapshot: () => VoiceProviderSimulationControlsSnapshot<TProvider>;
31
+ run: (provider: TProvider, mode: VoiceIOProviderFailureSimulationMode) => Promise<VoiceIOProviderFailureSimulationResult<TProvider> | null>;
32
+ subscribe: (listener: () => void) => () => void;
33
+ };
@@ -0,0 +1,20 @@
1
+ import { createVoiceProviderSimulationControlsStore, type VoiceProviderSimulationControlsOptions, type VoiceProviderSimulationControlsSnapshot, type VoiceProviderSimulationProvider } from './providerSimulationControls';
2
+ export type VoiceProviderSimulationControlsViewModel<TProvider extends string = string> = {
3
+ canSimulateFailure: boolean;
4
+ description: string;
5
+ error: string | null;
6
+ failureProviders: VoiceProviderSimulationProvider<TProvider>[];
7
+ isRunning: boolean;
8
+ label: string;
9
+ providers: VoiceProviderSimulationProvider<TProvider>[];
10
+ resultText: string | null;
11
+ title: string;
12
+ };
13
+ export declare const createVoiceProviderSimulationControlsViewModel: <TProvider extends string = string>(snapshot: VoiceProviderSimulationControlsSnapshot<TProvider>, options: VoiceProviderSimulationControlsOptions<TProvider>) => VoiceProviderSimulationControlsViewModel<TProvider>;
14
+ export declare const renderVoiceProviderSimulationControlsHTML: <TProvider extends string = string>(snapshot: VoiceProviderSimulationControlsSnapshot<TProvider>, options: VoiceProviderSimulationControlsOptions<TProvider>) => string;
15
+ export declare const bindVoiceProviderSimulationControls: <TProvider extends string = string>(element: Element, store: ReturnType<typeof createVoiceProviderSimulationControlsStore<TProvider>>) => () => void;
16
+ export declare const mountVoiceProviderSimulationControls: <TProvider extends string = string>(element: Element, options: VoiceProviderSimulationControlsOptions<TProvider>) => {
17
+ close: () => void;
18
+ run: (provider: TProvider, mode: import("../testing").VoiceIOProviderFailureSimulationMode) => Promise<import("../testing").VoiceIOProviderFailureSimulationResult<TProvider> | null>;
19
+ };
20
+ export declare const defineVoiceProviderSimulationControlsElement: (tagName?: string) => void;
@@ -0,0 +1,19 @@
1
+ import type { VoiceProviderHealthSummary } from '../providerHealth';
2
+ export type VoiceProviderStatusClientOptions = {
3
+ fetch?: typeof fetch;
4
+ intervalMs?: number;
5
+ };
6
+ export type VoiceProviderStatusSnapshot<TProvider extends string = string> = {
7
+ error: string | null;
8
+ isLoading: boolean;
9
+ providers: VoiceProviderHealthSummary<TProvider>[];
10
+ updatedAt?: number;
11
+ };
12
+ export declare const fetchVoiceProviderStatus: <TProvider extends string = string>(path?: string, options?: Pick<VoiceProviderStatusClientOptions, "fetch">) => Promise<VoiceProviderHealthSummary<TProvider>[]>;
13
+ export declare const createVoiceProviderStatusStore: <TProvider extends string = string>(path?: string, options?: VoiceProviderStatusClientOptions) => {
14
+ close: () => void;
15
+ getServerSnapshot: () => VoiceProviderStatusSnapshot<TProvider>;
16
+ getSnapshot: () => VoiceProviderStatusSnapshot<TProvider>;
17
+ refresh: () => Promise<VoiceProviderHealthSummary<TProvider>[]>;
18
+ subscribe: (listener: () => void) => () => void;
19
+ };
@@ -0,0 +1,32 @@
1
+ import type { VoiceProviderHealthSummary } from '../providerHealth';
2
+ import { type VoiceProviderStatusClientOptions, type VoiceProviderStatusSnapshot } from './providerStatus';
3
+ export type VoiceProviderStatusCardView<TProvider extends string = string> = VoiceProviderHealthSummary<TProvider> & {
4
+ detail: string;
5
+ label: string;
6
+ rows: Array<{
7
+ label: string;
8
+ value: string;
9
+ }>;
10
+ };
11
+ export type VoiceProviderStatusViewModel<TProvider extends string = string> = {
12
+ description: string;
13
+ error: string | null;
14
+ isLoading: boolean;
15
+ label: string;
16
+ providers: VoiceProviderStatusCardView<TProvider>[];
17
+ status: 'empty' | 'error' | 'loading' | 'ready' | 'warning';
18
+ title: string;
19
+ updatedAt?: number;
20
+ };
21
+ export type VoiceProviderStatusWidgetOptions = VoiceProviderStatusClientOptions & {
22
+ description?: string;
23
+ title?: string;
24
+ };
25
+ export declare const createVoiceProviderStatusViewModel: <TProvider extends string = string>(snapshot: VoiceProviderStatusSnapshot<TProvider>, options?: VoiceProviderStatusWidgetOptions) => VoiceProviderStatusViewModel<TProvider>;
26
+ export declare const renderVoiceProviderStatusHTML: <TProvider extends string = string>(snapshot: VoiceProviderStatusSnapshot<TProvider>, options?: VoiceProviderStatusWidgetOptions) => string;
27
+ export declare const getVoiceProviderStatusCSS: () => string;
28
+ export declare const mountVoiceProviderStatus: <TProvider extends string = string>(element: Element, path?: string, options?: VoiceProviderStatusWidgetOptions) => {
29
+ close: () => void;
30
+ refresh: () => Promise<VoiceProviderHealthSummary<TProvider>[]>;
31
+ };
32
+ export declare const defineVoiceProviderStatusElement: (tagName?: string) => void;
@@ -0,0 +1,19 @@
1
+ import type { VoiceRoutingDecisionSummary } from '../resilienceRoutes';
2
+ export type VoiceRoutingStatusClientOptions = {
3
+ fetch?: typeof fetch;
4
+ intervalMs?: number;
5
+ };
6
+ export type VoiceRoutingStatusSnapshot = {
7
+ decision: VoiceRoutingDecisionSummary | null;
8
+ error: string | null;
9
+ isLoading: boolean;
10
+ updatedAt?: number;
11
+ };
12
+ export declare const fetchVoiceRoutingStatus: (path?: string, options?: Pick<VoiceRoutingStatusClientOptions, "fetch">) => Promise<import("..").VoiceRoutingEvent | null>;
13
+ export declare const createVoiceRoutingStatusStore: (path?: string, options?: VoiceRoutingStatusClientOptions) => {
14
+ close: () => void;
15
+ getServerSnapshot: () => VoiceRoutingStatusSnapshot;
16
+ getSnapshot: () => VoiceRoutingStatusSnapshot;
17
+ refresh: () => Promise<import("..").VoiceRoutingEvent | null>;
18
+ subscribe: (listener: () => void) => () => void;
19
+ };
@@ -0,0 +1,28 @@
1
+ import type { VoiceRoutingDecisionSummary } from '../resilienceRoutes';
2
+ import { type VoiceRoutingStatusClientOptions, type VoiceRoutingStatusSnapshot } from './routingStatus';
3
+ export type VoiceRoutingStatusViewModel = {
4
+ decision: VoiceRoutingDecisionSummary | null;
5
+ description: string;
6
+ error: string | null;
7
+ isLoading: boolean;
8
+ label: string;
9
+ rows: Array<{
10
+ label: string;
11
+ value: string;
12
+ }>;
13
+ status: 'empty' | 'error' | 'loading' | 'ready';
14
+ title: string;
15
+ updatedAt?: number;
16
+ };
17
+ export type VoiceRoutingStatusWidgetOptions = VoiceRoutingStatusClientOptions & {
18
+ description?: string;
19
+ title?: string;
20
+ };
21
+ export declare const createVoiceRoutingStatusViewModel: (snapshot: VoiceRoutingStatusSnapshot, options?: VoiceRoutingStatusWidgetOptions) => VoiceRoutingStatusViewModel;
22
+ export declare const renderVoiceRoutingStatusHTML: (snapshot: VoiceRoutingStatusSnapshot, options?: VoiceRoutingStatusWidgetOptions) => string;
23
+ export declare const getVoiceRoutingStatusCSS: () => string;
24
+ export declare const mountVoiceRoutingStatus: (element: Element, path?: string, options?: VoiceRoutingStatusWidgetOptions) => {
25
+ close: () => void;
26
+ refresh: () => Promise<import("..").VoiceRoutingEvent | null>;
27
+ };
28
+ export declare const defineVoiceRoutingStatusElement: (tagName?: string) => void;
@@ -0,0 +1,19 @@
1
+ import type { VoiceTraceTimelineReport } from '../traceTimeline';
2
+ export type VoiceTraceTimelineClientOptions = {
3
+ fetch?: typeof fetch;
4
+ intervalMs?: number;
5
+ };
6
+ export type VoiceTraceTimelineSnapshot = {
7
+ error: string | null;
8
+ isLoading: boolean;
9
+ report: VoiceTraceTimelineReport | null;
10
+ updatedAt?: number;
11
+ };
12
+ export declare const fetchVoiceTraceTimeline: (path?: string, options?: Pick<VoiceTraceTimelineClientOptions, "fetch">) => Promise<VoiceTraceTimelineReport>;
13
+ export declare const createVoiceTraceTimelineStore: (path?: string, options?: VoiceTraceTimelineClientOptions) => {
14
+ close: () => void;
15
+ getServerSnapshot: () => VoiceTraceTimelineSnapshot;
16
+ getSnapshot: () => VoiceTraceTimelineSnapshot;
17
+ refresh: () => Promise<VoiceTraceTimelineReport | null>;
18
+ subscribe: (listener: () => void) => () => void;
19
+ };
@@ -0,0 +1,32 @@
1
+ import type { VoiceTraceTimelineSession } from '../traceTimeline';
2
+ import { type VoiceTraceTimelineClientOptions, type VoiceTraceTimelineSnapshot } from './traceTimeline';
3
+ export type VoiceTraceTimelineSessionView = VoiceTraceTimelineSession & {
4
+ detailHref: string;
5
+ durationLabel: string;
6
+ label: string;
7
+ providerLabel: string;
8
+ };
9
+ export type VoiceTraceTimelineViewModel = {
10
+ description: string;
11
+ error: string | null;
12
+ isLoading: boolean;
13
+ label: string;
14
+ sessions: VoiceTraceTimelineSessionView[];
15
+ status: 'empty' | 'error' | 'failed' | 'loading' | 'ready' | 'warning';
16
+ title: string;
17
+ updatedAt?: number;
18
+ };
19
+ export type VoiceTraceTimelineWidgetOptions = VoiceTraceTimelineClientOptions & {
20
+ description?: string;
21
+ detailBasePath?: string;
22
+ limit?: number;
23
+ title?: string;
24
+ };
25
+ export declare const createVoiceTraceTimelineViewModel: (snapshot: VoiceTraceTimelineSnapshot, options?: VoiceTraceTimelineWidgetOptions) => VoiceTraceTimelineViewModel;
26
+ export declare const renderVoiceTraceTimelineWidgetHTML: (snapshot: VoiceTraceTimelineSnapshot, options?: VoiceTraceTimelineWidgetOptions) => string;
27
+ export declare const getVoiceTraceTimelineCSS: () => string;
28
+ export declare const mountVoiceTraceTimeline: (element: Element, path?: string, options?: VoiceTraceTimelineWidgetOptions) => {
29
+ close: () => void;
30
+ refresh: () => Promise<import("..").VoiceTraceTimelineReport | null>;
31
+ };
32
+ export declare const defineVoiceTraceTimelineElement: (tagName?: string) => void;
@@ -0,0 +1,19 @@
1
+ import type { VoiceTurnQualityReport } from '../turnQuality';
2
+ export type VoiceTurnQualityClientOptions = {
3
+ fetch?: typeof fetch;
4
+ intervalMs?: number;
5
+ };
6
+ export type VoiceTurnQualitySnapshot = {
7
+ error: string | null;
8
+ isLoading: boolean;
9
+ report?: VoiceTurnQualityReport;
10
+ updatedAt?: number;
11
+ };
12
+ export declare const fetchVoiceTurnQuality: (path?: string, options?: Pick<VoiceTurnQualityClientOptions, "fetch">) => Promise<VoiceTurnQualityReport>;
13
+ export declare const createVoiceTurnQualityStore: (path?: string, options?: VoiceTurnQualityClientOptions) => {
14
+ close: () => void;
15
+ getServerSnapshot: () => VoiceTurnQualitySnapshot;
16
+ getSnapshot: () => VoiceTurnQualitySnapshot;
17
+ refresh: () => Promise<VoiceTurnQualityReport | undefined>;
18
+ subscribe: (listener: () => void) => () => void;
19
+ };
@@ -0,0 +1,32 @@
1
+ import type { VoiceTurnQualityItem } from '../turnQuality';
2
+ import { type VoiceTurnQualityClientOptions, type VoiceTurnQualitySnapshot } from './turnQuality';
3
+ export type VoiceTurnQualityCardView = VoiceTurnQualityItem & {
4
+ detail: string;
5
+ label: string;
6
+ rows: Array<{
7
+ label: string;
8
+ value: string;
9
+ }>;
10
+ };
11
+ export type VoiceTurnQualityViewModel = {
12
+ description: string;
13
+ error: string | null;
14
+ isLoading: boolean;
15
+ label: string;
16
+ status: 'empty' | 'error' | 'loading' | 'ready' | 'warning';
17
+ title: string;
18
+ turns: VoiceTurnQualityCardView[];
19
+ updatedAt?: number;
20
+ };
21
+ export type VoiceTurnQualityWidgetOptions = VoiceTurnQualityClientOptions & {
22
+ description?: string;
23
+ title?: string;
24
+ };
25
+ export declare const createVoiceTurnQualityViewModel: (snapshot: VoiceTurnQualitySnapshot, options?: VoiceTurnQualityWidgetOptions) => VoiceTurnQualityViewModel;
26
+ export declare const renderVoiceTurnQualityHTML: (snapshot: VoiceTurnQualitySnapshot, options?: VoiceTurnQualityWidgetOptions) => string;
27
+ export declare const getVoiceTurnQualityCSS: () => string;
28
+ export declare const mountVoiceTurnQuality: (element: Element, path?: string, options?: VoiceTurnQualityWidgetOptions) => {
29
+ close: () => void;
30
+ refresh: () => Promise<import("..").VoiceTurnQualityReport | undefined>;
31
+ };
32
+ export declare const defineVoiceTurnQualityElement: (tagName?: string) => void;
@@ -0,0 +1,19 @@
1
+ import type { VoiceScenarioEvalReport } from '../evalRoutes';
2
+ export type VoiceWorkflowStatusClientOptions = {
3
+ fetch?: typeof fetch;
4
+ intervalMs?: number;
5
+ };
6
+ export type VoiceWorkflowStatusSnapshot = {
7
+ error: string | null;
8
+ isLoading: boolean;
9
+ report?: VoiceScenarioEvalReport;
10
+ updatedAt?: number;
11
+ };
12
+ export declare const fetchVoiceWorkflowStatus: (path?: string, options?: Pick<VoiceWorkflowStatusClientOptions, "fetch">) => Promise<VoiceScenarioEvalReport>;
13
+ export declare const createVoiceWorkflowStatusStore: (path?: string, options?: VoiceWorkflowStatusClientOptions) => {
14
+ close: () => void;
15
+ getServerSnapshot: () => VoiceWorkflowStatusSnapshot;
16
+ getSnapshot: () => VoiceWorkflowStatusSnapshot;
17
+ refresh: () => Promise<VoiceScenarioEvalReport | undefined>;
18
+ subscribe: (listener: () => void) => () => void;
19
+ };
@@ -0,0 +1,44 @@
1
+ import { Elysia } from 'elysia';
2
+ import { evaluateVoiceTrace, type StoredVoiceTraceEvent, type VoiceTraceEventFilter, type VoiceTraceEventStore, type VoiceTraceRedactionConfig } from './trace';
3
+ export type VoiceDiagnosticsRoutesOptions = {
4
+ evaluation?: Parameters<typeof evaluateVoiceTrace>[1];
5
+ headers?: HeadersInit;
6
+ name?: string;
7
+ path?: string;
8
+ redact?: VoiceTraceRedactionConfig;
9
+ store: VoiceTraceEventStore;
10
+ title?: string;
11
+ };
12
+ export declare const resolveVoiceDiagnosticsTraceFilter: (query: Record<string, unknown>) => VoiceTraceEventFilter;
13
+ export declare const buildVoiceDiagnosticsMarkdown: (events: StoredVoiceTraceEvent[], options?: {
14
+ evaluation?: Parameters<typeof evaluateVoiceTrace>[1];
15
+ title?: string;
16
+ }) => string;
17
+ export declare const createVoiceDiagnosticsRoutes: (options: VoiceDiagnosticsRoutesOptions) => Elysia<"", {
18
+ decorator: {};
19
+ store: {};
20
+ derive: {};
21
+ resolve: {};
22
+ }, {
23
+ typebox: {};
24
+ error: {};
25
+ }, {
26
+ schema: {};
27
+ standaloneSchema: {};
28
+ macro: {};
29
+ macroFn: {};
30
+ parser: {};
31
+ response: {};
32
+ }, {}, {
33
+ derive: {};
34
+ resolve: {};
35
+ schema: {};
36
+ standaloneSchema: {};
37
+ response: {};
38
+ }, {
39
+ derive: {};
40
+ resolve: {};
41
+ schema: {};
42
+ standaloneSchema: {};
43
+ response: {};
44
+ }>;
@@ -0,0 +1,213 @@
1
+ import { Elysia } from 'elysia';
2
+ import { type VoiceQualityReport, type VoiceQualityThresholds } from './qualityRoutes';
3
+ import { summarizeVoiceTrace, type StoredVoiceTraceEvent, type VoiceTraceEventStore } from './trace';
4
+ export type VoiceEvalStatus = 'pass' | 'fail';
5
+ export type VoiceEvalSessionReport = {
6
+ endedAt?: number;
7
+ eventCount: number;
8
+ quality: VoiceQualityReport;
9
+ scenarioId?: string;
10
+ sessionId: string;
11
+ startedAt?: number;
12
+ status: VoiceEvalStatus;
13
+ summary: ReturnType<typeof summarizeVoiceTrace>;
14
+ };
15
+ export type VoiceEvalTrendBucket = {
16
+ endedAt: number;
17
+ failed: number;
18
+ key: string;
19
+ passed: number;
20
+ total: number;
21
+ };
22
+ export type VoiceEvalReport = {
23
+ checkedAt: number;
24
+ failed: number;
25
+ passed: number;
26
+ sessions: VoiceEvalSessionReport[];
27
+ status: VoiceEvalStatus;
28
+ total: number;
29
+ trend: VoiceEvalTrendBucket[];
30
+ };
31
+ export type VoiceEvalBaselineSummary = {
32
+ failed: number;
33
+ failedSessionIds: string[];
34
+ passRate: number;
35
+ passed: number;
36
+ total: number;
37
+ };
38
+ export type VoiceEvalBaselineComparison = {
39
+ baseline: VoiceEvalBaselineSummary;
40
+ checkedAt: number;
41
+ current: VoiceEvalBaselineSummary;
42
+ deltas: {
43
+ failed: number;
44
+ passRate: number;
45
+ passed: number;
46
+ total: number;
47
+ };
48
+ newFailedSessionIds: string[];
49
+ recoveredSessionIds: string[];
50
+ reasons: string[];
51
+ status: VoiceEvalStatus;
52
+ };
53
+ export type VoiceEvalBaselineComparisonOptions = {
54
+ failOnNewFailedSessions?: boolean;
55
+ maxFailedDelta?: number;
56
+ maxPassRateDrop?: number;
57
+ };
58
+ export type VoiceEvalBaselineStore = {
59
+ get: () => Promise<VoiceEvalReport | undefined>;
60
+ set: (report: VoiceEvalReport) => Promise<void>;
61
+ };
62
+ export type VoiceScenarioEvalDefinition = {
63
+ description?: string;
64
+ forbiddenHandoffActions?: string[];
65
+ forbiddenLifecycleTypes?: string[];
66
+ id: string;
67
+ label?: string;
68
+ maxProviderErrors?: number;
69
+ maxSessionErrors?: number;
70
+ minSessions?: number;
71
+ minTurns?: number;
72
+ requiredAssistantIncludes?: string[];
73
+ requiredDisposition?: string;
74
+ requiredHandoffActions?: string[];
75
+ requiredLifecycleTypes?: string[];
76
+ requiredPayloadPaths?: string[];
77
+ requiredTranscriptIncludes?: string[];
78
+ requiredWorkflowContracts?: string[];
79
+ scenarioId?: string;
80
+ };
81
+ export type VoiceScenarioEvalSessionResult = {
82
+ eventCount: number;
83
+ issues: string[];
84
+ sessionId: string;
85
+ status: VoiceEvalStatus;
86
+ };
87
+ export type VoiceScenarioEvalResult = {
88
+ description?: string;
89
+ failed: number;
90
+ id: string;
91
+ issues: string[];
92
+ label: string;
93
+ matchedSessions: number;
94
+ passed: number;
95
+ sessions: VoiceScenarioEvalSessionResult[];
96
+ status: VoiceEvalStatus;
97
+ };
98
+ export type VoiceScenarioEvalReport = {
99
+ checkedAt: number;
100
+ failed: number;
101
+ passed: number;
102
+ scenarios: VoiceScenarioEvalResult[];
103
+ status: VoiceEvalStatus;
104
+ total: number;
105
+ };
106
+ export type VoiceScenarioFixture = {
107
+ description?: string;
108
+ events: StoredVoiceTraceEvent[];
109
+ id: string;
110
+ label?: string;
111
+ };
112
+ export type VoiceScenarioFixtureStore = {
113
+ list: () => Promise<VoiceScenarioFixture[]>;
114
+ };
115
+ export type VoiceScenarioFixtureEvalResult = {
116
+ description?: string;
117
+ fixtureId: string;
118
+ label: string;
119
+ report: VoiceScenarioEvalReport;
120
+ status: VoiceEvalStatus;
121
+ };
122
+ export type VoiceScenarioFixtureEvalReport = {
123
+ checkedAt: number;
124
+ failed: number;
125
+ fixtures: VoiceScenarioFixtureEvalResult[];
126
+ passed: number;
127
+ status: VoiceEvalStatus;
128
+ total: number;
129
+ };
130
+ export type VoiceEvalLink = {
131
+ href: string;
132
+ label: string;
133
+ };
134
+ export type VoiceEvalRoutesOptions = {
135
+ baseline?: VoiceEvalReport | (() => Promise<VoiceEvalReport | undefined>);
136
+ baselineComparison?: VoiceEvalBaselineComparisonOptions;
137
+ baselineStore?: VoiceEvalBaselineStore;
138
+ events?: StoredVoiceTraceEvent[];
139
+ fixtures?: VoiceScenarioFixture[];
140
+ fixtureStore?: VoiceScenarioFixtureStore;
141
+ headers?: HeadersInit;
142
+ links?: VoiceEvalLink[];
143
+ limit?: number;
144
+ name?: string;
145
+ path?: string;
146
+ scenarios?: VoiceScenarioEvalDefinition[];
147
+ store?: VoiceTraceEventStore;
148
+ thresholds?: VoiceQualityThresholds;
149
+ title?: string;
150
+ };
151
+ export declare const runVoiceSessionEvals: (options?: {
152
+ events?: StoredVoiceTraceEvent[];
153
+ limit?: number;
154
+ store?: VoiceTraceEventStore;
155
+ thresholds?: VoiceQualityThresholds;
156
+ }) => Promise<VoiceEvalReport>;
157
+ export declare const runVoiceScenarioEvals: (options?: {
158
+ events?: StoredVoiceTraceEvent[];
159
+ scenarios?: VoiceScenarioEvalDefinition[];
160
+ store?: VoiceTraceEventStore;
161
+ }) => Promise<VoiceScenarioEvalReport>;
162
+ export declare const runVoiceScenarioFixtureEvals: (options?: {
163
+ fixtures?: VoiceScenarioFixture[];
164
+ fixtureStore?: VoiceScenarioFixtureStore;
165
+ scenarios?: VoiceScenarioEvalDefinition[];
166
+ }) => Promise<VoiceScenarioFixtureEvalReport>;
167
+ export declare const compareVoiceEvalBaseline: (currentReport: VoiceEvalReport, baselineReport: VoiceEvalReport, options?: VoiceEvalBaselineComparisonOptions) => VoiceEvalBaselineComparison;
168
+ export declare const createVoiceFileEvalBaselineStore: (filePath: string) => VoiceEvalBaselineStore;
169
+ export declare const createVoiceFileScenarioFixtureStore: (filePath: string) => VoiceScenarioFixtureStore;
170
+ export declare const renderVoiceEvalHTML: (report: VoiceEvalReport, options?: {
171
+ links?: VoiceEvalLink[];
172
+ title?: string;
173
+ }) => string;
174
+ export declare const renderVoiceEvalBaselineHTML: (comparison: VoiceEvalBaselineComparison, options?: {
175
+ links?: VoiceEvalLink[];
176
+ title?: string;
177
+ }) => string;
178
+ export declare const renderVoiceScenarioEvalHTML: (report: VoiceScenarioEvalReport, options?: {
179
+ links?: VoiceEvalLink[];
180
+ title?: string;
181
+ }) => string;
182
+ export declare const renderVoiceScenarioFixtureEvalHTML: (report: VoiceScenarioFixtureEvalReport, options?: {
183
+ links?: VoiceEvalLink[];
184
+ title?: string;
185
+ }) => string;
186
+ export declare const createVoiceEvalRoutes: (options: VoiceEvalRoutesOptions) => Elysia<"", {
187
+ decorator: {};
188
+ store: {};
189
+ derive: {};
190
+ resolve: {};
191
+ }, {
192
+ typebox: {};
193
+ error: {};
194
+ }, {
195
+ schema: {};
196
+ standaloneSchema: {};
197
+ macro: {};
198
+ macroFn: {};
199
+ parser: {};
200
+ response: {};
201
+ }, {}, {
202
+ derive: {};
203
+ resolve: {};
204
+ schema: {};
205
+ standaloneSchema: {};
206
+ response: {};
207
+ }, {
208
+ derive: {};
209
+ resolve: {};
210
+ schema: {};
211
+ standaloneSchema: {};
212
+ response: {};
213
+ }>;