@absolutejs/voice 0.0.22-beta.10 → 0.0.22-beta.101
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 +205 -0
- package/dist/agent.d.ts +2 -0
- package/dist/angular/index.d.ts +8 -0
- package/dist/angular/index.js +1112 -44
- package/dist/angular/voice-app-kit-status.service.d.ts +12 -0
- package/dist/angular/voice-ops-status.component.d.ts +15 -0
- package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
- package/dist/angular/voice-provider-status.service.d.ts +12 -0
- package/dist/angular/voice-routing-status.service.d.ts +11 -0
- package/dist/angular/voice-stream.service.d.ts +2 -0
- package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
- package/dist/angular/voice-turn-latency.service.d.ts +13 -0
- package/dist/angular/voice-turn-quality.service.d.ts +12 -0
- package/dist/angular/voice-workflow-status.service.d.ts +12 -0
- package/dist/appKit.d.ts +100 -0
- package/dist/assistantHealth.d.ts +81 -0
- package/dist/bargeInRoutes.d.ts +56 -0
- package/dist/client/actions.d.ts +22 -0
- package/dist/client/appKitStatus.d.ts +19 -0
- package/dist/client/bargeInMonitor.d.ts +7 -0
- package/dist/client/connection.d.ts +3 -0
- package/dist/client/duplex.d.ts +1 -1
- package/dist/client/htmxBootstrap.js +587 -13
- package/dist/client/index.d.ts +38 -0
- package/dist/client/index.js +1908 -8
- package/dist/client/liveTurnLatency.d.ts +41 -0
- package/dist/client/opsStatusWidget.d.ts +40 -0
- package/dist/client/providerCapabilities.d.ts +19 -0
- package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
- package/dist/client/providerSimulationControls.d.ts +33 -0
- package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
- package/dist/client/providerStatus.d.ts +19 -0
- package/dist/client/providerStatusWidget.d.ts +32 -0
- package/dist/client/routingStatus.d.ts +19 -0
- package/dist/client/routingStatusWidget.d.ts +28 -0
- package/dist/client/traceTimeline.d.ts +19 -0
- package/dist/client/traceTimelineWidget.d.ts +32 -0
- package/dist/client/turnLatency.d.ts +22 -0
- package/dist/client/turnLatencyWidget.d.ts +33 -0
- package/dist/client/turnQuality.d.ts +19 -0
- package/dist/client/turnQualityWidget.d.ts +32 -0
- package/dist/client/workflowStatus.d.ts +19 -0
- package/dist/diagnosticsRoutes.d.ts +44 -0
- package/dist/evalRoutes.d.ts +213 -0
- package/dist/handoff.d.ts +54 -0
- package/dist/handoffHealth.d.ts +94 -0
- package/dist/index.d.ts +66 -7
- package/dist/index.js +11081 -2982
- package/dist/modelAdapters.d.ts +74 -0
- package/dist/openaiTTS.d.ts +18 -0
- package/dist/opsConsoleRoutes.d.ts +77 -0
- package/dist/opsWebhook.d.ts +126 -0
- package/dist/outcomeContract.d.ts +112 -0
- package/dist/postgresStore.d.ts +2 -0
- package/dist/productionReadiness.d.ts +111 -0
- package/dist/providerAdapters.d.ts +48 -0
- package/dist/providerCapabilities.d.ts +92 -0
- package/dist/providerHealth.d.ts +79 -0
- package/dist/qualityRoutes.d.ts +76 -0
- package/dist/queue.d.ts +61 -0
- package/dist/react/VoiceOpsStatus.d.ts +6 -0
- package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
- package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
- package/dist/react/VoiceProviderStatus.d.ts +6 -0
- package/dist/react/VoiceRoutingStatus.d.ts +6 -0
- package/dist/react/VoiceTraceTimeline.d.ts +6 -0
- package/dist/react/VoiceTurnLatency.d.ts +6 -0
- package/dist/react/VoiceTurnQuality.d.ts +6 -0
- package/dist/react/index.d.ts +17 -0
- package/dist/react/index.js +2467 -12
- package/dist/react/useVoiceAppKitStatus.d.ts +8 -0
- package/dist/react/useVoiceController.d.ts +2 -0
- package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
- package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
- package/dist/react/useVoiceProviderStatus.d.ts +8 -0
- package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/react/useVoiceStream.d.ts +2 -0
- package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
- package/dist/react/useVoiceTurnLatency.d.ts +9 -0
- package/dist/react/useVoiceTurnQuality.d.ts +8 -0
- package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
- package/dist/resilienceRoutes.d.ts +142 -0
- package/dist/sessionReplay.d.ts +175 -0
- package/dist/sqliteStore.d.ts +2 -0
- package/dist/svelte/createVoiceAppKitStatus.d.ts +8 -0
- package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
- package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
- package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
- package/dist/svelte/createVoiceProviderStatus.d.ts +10 -0
- package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
- package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
- package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
- package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
- package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
- package/dist/svelte/index.d.ts +10 -0
- package/dist/svelte/index.js +1728 -4
- package/dist/telephony/contract.d.ts +61 -0
- package/dist/telephony/matrix.d.ts +97 -0
- package/dist/telephony/plivo.d.ts +254 -0
- package/dist/telephony/telnyx.d.ts +247 -0
- package/dist/telephony/twilio.d.ts +132 -0
- package/dist/telephonyOutcome.d.ts +201 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +2637 -21
- package/dist/testing/ioProviderSimulator.d.ts +41 -0
- package/dist/testing/providerSimulator.d.ts +44 -0
- package/dist/toolContract.d.ts +130 -0
- package/dist/toolRuntime.d.ts +50 -0
- package/dist/trace.d.ts +1 -1
- package/dist/traceTimeline.d.ts +93 -0
- package/dist/turnLatency.d.ts +95 -0
- package/dist/turnQuality.d.ts +94 -0
- package/dist/types.d.ts +125 -2
- package/dist/vue/VoiceOpsStatus.d.ts +30 -0
- package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
- package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
- package/dist/vue/VoiceProviderStatus.d.ts +51 -0
- package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
- package/dist/vue/VoiceTurnLatency.d.ts +69 -0
- package/dist/vue/VoiceTurnQuality.d.ts +51 -0
- package/dist/vue/index.d.ts +16 -0
- package/dist/vue/index.js +2360 -26
- package/dist/vue/useVoiceAppKitStatus.d.ts +9 -0
- package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
- package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
- package/dist/vue/useVoiceProviderStatus.d.ts +9 -0
- package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/vue/useVoiceStream.d.ts +2 -0
- package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
- package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
- package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
- package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
- package/dist/workflowContract.d.ts +91 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceAppKitStatusClientOptions } from '../client/appKitStatus';
|
|
2
|
+
import type { VoiceAppKitStatusReport } from '../appKit';
|
|
3
|
+
export declare class VoiceAppKitStatusService {
|
|
4
|
+
connect(path?: string, options?: VoiceAppKitStatusClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceAppKitStatusReport | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceAppKitStatusReport | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { type VoiceOpsStatusViewModel } from '../client/opsStatusWidget';
|
|
3
|
+
export declare class VoiceOpsStatusComponent implements OnDestroy, OnInit {
|
|
4
|
+
description?: string;
|
|
5
|
+
includeLinks: boolean;
|
|
6
|
+
intervalMs?: number;
|
|
7
|
+
path: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
private cleanup;
|
|
10
|
+
private store?;
|
|
11
|
+
model: import("@angular/core").WritableSignal<VoiceOpsStatusViewModel>;
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
private options;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceProviderCapabilitiesClientOptions } from '../client/providerCapabilities';
|
|
2
|
+
import type { VoiceProviderCapabilityReport } from '../providerCapabilities';
|
|
3
|
+
export declare class VoiceProviderCapabilitiesService {
|
|
4
|
+
connect<TProvider extends string = string>(path?: string, options?: VoiceProviderCapabilitiesClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceProviderCapabilityReport<TProvider> | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceProviderCapabilityReport<TProvider> | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceProviderStatusClientOptions } from '../client/providerStatus';
|
|
2
|
+
import type { VoiceProviderHealthSummary } from '../providerHealth';
|
|
3
|
+
export declare class VoiceProviderStatusService {
|
|
4
|
+
connect<TProvider extends string = string>(path?: string, options?: VoiceProviderStatusClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
providers: import("@angular/core").Signal<VoiceProviderHealthSummary<TProvider>[]>;
|
|
9
|
+
refresh: () => Promise<VoiceProviderHealthSummary<TProvider>[]>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VoiceRoutingStatusClientOptions } from '../client/routingStatus';
|
|
2
|
+
export declare class VoiceRoutingStatusService {
|
|
3
|
+
connect(path?: string, options?: VoiceRoutingStatusClientOptions): {
|
|
4
|
+
close: () => void;
|
|
5
|
+
decision: import("@angular/core").Signal<import("..").VoiceRoutingEvent | null>;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<import("..").VoiceRoutingEvent | null>;
|
|
9
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -8,6 +8,8 @@ export declare class VoiceStreamService {
|
|
|
8
8
|
turnId?: string;
|
|
9
9
|
}[]>;
|
|
10
10
|
assistantTexts: import("@angular/core").Signal<string[]>;
|
|
11
|
+
call: import("@angular/core").Signal<import("..").VoiceCallLifecycleState | null>;
|
|
12
|
+
callControl: (message: Parameters<(message: Omit<import("..").VoiceClientCallControlMessage, "type">) => void>[0]) => void;
|
|
11
13
|
close: () => void;
|
|
12
14
|
endTurn: () => void;
|
|
13
15
|
error: import("@angular/core").Signal<string | null>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceTraceTimelineClientOptions } from '../client/traceTimeline';
|
|
2
|
+
import type { VoiceTraceTimelineReport } from '../traceTimeline';
|
|
3
|
+
export declare class VoiceTraceTimelineService {
|
|
4
|
+
connect(path?: string, options?: VoiceTraceTimelineClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceTraceTimelineReport | null>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceTraceTimelineReport | null>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type VoiceTurnLatencyClientOptions } from '../client/turnLatency';
|
|
2
|
+
import type { VoiceTurnLatencyReport } from '../turnLatency';
|
|
3
|
+
export declare class VoiceTurnLatencyService {
|
|
4
|
+
connect(path?: string, options?: VoiceTurnLatencyClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceTurnLatencyReport | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceTurnLatencyReport | undefined>;
|
|
10
|
+
runProof: () => Promise<VoiceTurnLatencyReport | undefined>;
|
|
11
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceTurnQualityClientOptions } from '../client/turnQuality';
|
|
2
|
+
import type { VoiceTurnQualityReport } from '../turnQuality';
|
|
3
|
+
export declare class VoiceTurnQualityService {
|
|
4
|
+
connect(path?: string, options?: VoiceTurnQualityClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceTurnQualityReport | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceTurnQualityReport | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceWorkflowStatusClientOptions } from '../client/workflowStatus';
|
|
2
|
+
import type { VoiceScenarioEvalReport } from '../evalRoutes';
|
|
3
|
+
export declare class VoiceWorkflowStatusService {
|
|
4
|
+
connect(path?: string, options?: VoiceWorkflowStatusClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceScenarioEvalReport | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceScenarioEvalReport | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
package/dist/appKit.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceAssistantHealthRoutesOptions } from './assistantHealth';
|
|
3
|
+
import { type VoiceBargeInRoutesOptions } from './bargeInRoutes';
|
|
4
|
+
import { type VoiceDiagnosticsRoutesOptions } from './diagnosticsRoutes';
|
|
5
|
+
import { type VoiceEvalRoutesOptions, type VoiceEvalLink } from './evalRoutes';
|
|
6
|
+
import { type VoiceHandoffHealthRoutesOptions } from './handoffHealth';
|
|
7
|
+
import { type VoiceOpsConsoleRoutesOptions } from './opsConsoleRoutes';
|
|
8
|
+
import { type VoiceProviderHealthRoutesOptions } from './providerHealth';
|
|
9
|
+
import { type VoiceProviderCapabilityRoutesOptions } from './providerCapabilities';
|
|
10
|
+
import { type VoiceProductionReadinessRoutesOptions } from './productionReadiness';
|
|
11
|
+
import { type VoiceQualityRoutesOptions } from './qualityRoutes';
|
|
12
|
+
import { type VoiceResilienceRoutesOptions } from './resilienceRoutes';
|
|
13
|
+
import { type VoiceSessionListRoutesOptions, type VoiceSessionReplayRoutesOptions } from './sessionReplay';
|
|
14
|
+
import { type VoiceTraceEventStore } from './trace';
|
|
15
|
+
import { type VoiceTraceTimelineRoutesOptions } from './traceTimeline';
|
|
16
|
+
export type VoiceAppKitSurface = 'assistantHealth' | 'bargeIn' | 'diagnostics' | 'evals' | 'handoffs' | 'opsConsole' | 'providerCapabilities' | 'providerHealth' | 'productionReadiness' | 'quality' | 'resilience' | 'sessionReplay' | 'sessions' | 'traceTimeline';
|
|
17
|
+
export type VoiceAppKitLink = VoiceEvalLink & {
|
|
18
|
+
description?: string;
|
|
19
|
+
statusHref?: string;
|
|
20
|
+
};
|
|
21
|
+
export type VoiceAppKitRoutesOptions<TProvider extends string = string> = {
|
|
22
|
+
appStatus?: false | VoiceAppKitStatusOptions;
|
|
23
|
+
assistantHealth?: false | Partial<VoiceAssistantHealthRoutesOptions<TProvider>>;
|
|
24
|
+
bargeIn?: false | Partial<VoiceBargeInRoutesOptions>;
|
|
25
|
+
diagnostics?: false | Partial<Omit<VoiceDiagnosticsRoutesOptions, 'store'>>;
|
|
26
|
+
evals?: false | Partial<VoiceEvalRoutesOptions>;
|
|
27
|
+
handoffs?: false | Partial<VoiceHandoffHealthRoutesOptions>;
|
|
28
|
+
headers?: HeadersInit;
|
|
29
|
+
links?: VoiceAppKitLink[];
|
|
30
|
+
llmProviders?: readonly TProvider[];
|
|
31
|
+
name?: string;
|
|
32
|
+
opsConsole?: false | Partial<VoiceOpsConsoleRoutesOptions>;
|
|
33
|
+
providerCapabilities?: false | Partial<VoiceProviderCapabilityRoutesOptions<TProvider>>;
|
|
34
|
+
providerHealth?: false | Partial<VoiceProviderHealthRoutesOptions<TProvider>>;
|
|
35
|
+
productionReadiness?: false | Partial<VoiceProductionReadinessRoutesOptions>;
|
|
36
|
+
quality?: false | Partial<VoiceQualityRoutesOptions>;
|
|
37
|
+
resilience?: false | Partial<VoiceResilienceRoutesOptions>;
|
|
38
|
+
sessionReplay?: false | Partial<VoiceSessionReplayRoutesOptions>;
|
|
39
|
+
sessions?: false | Partial<VoiceSessionListRoutesOptions>;
|
|
40
|
+
store: VoiceTraceEventStore;
|
|
41
|
+
sttProviders?: readonly string[];
|
|
42
|
+
title?: string;
|
|
43
|
+
traceTimeline?: false | Partial<VoiceTraceTimelineRoutesOptions>;
|
|
44
|
+
ttsProviders?: readonly string[];
|
|
45
|
+
};
|
|
46
|
+
export type VoiceAppKitStatus = 'pass' | 'fail';
|
|
47
|
+
export type VoiceAppKitStatusOptions = {
|
|
48
|
+
include?: {
|
|
49
|
+
handoffs?: boolean;
|
|
50
|
+
providers?: boolean;
|
|
51
|
+
quality?: boolean;
|
|
52
|
+
sessions?: boolean;
|
|
53
|
+
workflows?: boolean;
|
|
54
|
+
};
|
|
55
|
+
path?: string;
|
|
56
|
+
preferFixtureWorkflows?: boolean;
|
|
57
|
+
};
|
|
58
|
+
export type VoiceAppKitStatusReport = {
|
|
59
|
+
checkedAt: number;
|
|
60
|
+
failed: number;
|
|
61
|
+
links: VoiceAppKitLink[];
|
|
62
|
+
passed: number;
|
|
63
|
+
status: VoiceAppKitStatus;
|
|
64
|
+
surfaces: {
|
|
65
|
+
handoffs?: {
|
|
66
|
+
failed: number;
|
|
67
|
+
status: VoiceAppKitStatus;
|
|
68
|
+
total: number;
|
|
69
|
+
};
|
|
70
|
+
providers?: {
|
|
71
|
+
degraded: number;
|
|
72
|
+
status: VoiceAppKitStatus;
|
|
73
|
+
total: number;
|
|
74
|
+
};
|
|
75
|
+
quality?: {
|
|
76
|
+
status: VoiceAppKitStatus;
|
|
77
|
+
};
|
|
78
|
+
sessions?: {
|
|
79
|
+
failed: number;
|
|
80
|
+
status: VoiceAppKitStatus;
|
|
81
|
+
total: number;
|
|
82
|
+
};
|
|
83
|
+
workflows?: {
|
|
84
|
+
failed: number;
|
|
85
|
+
source: 'fixtures' | 'live';
|
|
86
|
+
status: VoiceAppKitStatus;
|
|
87
|
+
total: number;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
total: number;
|
|
91
|
+
};
|
|
92
|
+
export type VoiceAppKitRoutes<TProvider extends string = string> = {
|
|
93
|
+
links: VoiceAppKitLink[];
|
|
94
|
+
routes: Elysia;
|
|
95
|
+
surfaces: VoiceAppKitSurface[];
|
|
96
|
+
use: Elysia['use'];
|
|
97
|
+
};
|
|
98
|
+
export declare const summarizeVoiceAppKitStatus: <TProvider extends string = string>(options: VoiceAppKitRoutesOptions<TProvider>) => Promise<VoiceAppKitStatusReport>;
|
|
99
|
+
export declare const createVoiceAppKitRoutes: <TProvider extends string = string>(options: VoiceAppKitRoutesOptions<TProvider>) => VoiceAppKitRoutes<TProvider>;
|
|
100
|
+
export declare const createVoiceAppKit: <TProvider extends string = string>(options: VoiceAppKitRoutesOptions<TProvider>) => VoiceAppKitRoutes<TProvider>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceAssistantRunsSummary } from './assistant';
|
|
3
|
+
import { type VoiceProviderHealthSummary } from './providerHealth';
|
|
4
|
+
import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
|
|
5
|
+
export type VoiceAssistantHealthFailure = {
|
|
6
|
+
at: number;
|
|
7
|
+
assistantId?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
provider?: string;
|
|
10
|
+
rateLimited?: boolean;
|
|
11
|
+
replayHref?: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
status?: string;
|
|
14
|
+
turnId?: string;
|
|
15
|
+
type: StoredVoiceTraceEvent['type'];
|
|
16
|
+
};
|
|
17
|
+
export type VoiceAssistantHealthSummary<TProvider extends string = string> = {
|
|
18
|
+
assistantRuns: VoiceAssistantRunsSummary;
|
|
19
|
+
providerHealth: VoiceProviderHealthSummary<TProvider>[];
|
|
20
|
+
recentFailures: VoiceAssistantHealthFailure[];
|
|
21
|
+
};
|
|
22
|
+
export type VoiceAssistantHealthSummaryOptions<TProvider extends string = string> = {
|
|
23
|
+
events?: StoredVoiceTraceEvent[];
|
|
24
|
+
maxFailures?: number;
|
|
25
|
+
providers?: readonly TProvider[];
|
|
26
|
+
replayHref?: false | string | ((failure: Omit<VoiceAssistantHealthFailure, 'replayHref'>) => string);
|
|
27
|
+
store?: VoiceTraceEventStore;
|
|
28
|
+
};
|
|
29
|
+
export type VoiceAssistantHealthHTMLHandlerOptions<TProvider extends string = string> = VoiceAssistantHealthSummaryOptions<TProvider> & {
|
|
30
|
+
headers?: HeadersInit;
|
|
31
|
+
render?: (summary: VoiceAssistantHealthSummary<TProvider>) => string | Promise<string>;
|
|
32
|
+
};
|
|
33
|
+
export type VoiceAssistantHealthRoutesOptions<TProvider extends string = string> = VoiceAssistantHealthHTMLHandlerOptions<TProvider> & {
|
|
34
|
+
htmlPath?: false | string;
|
|
35
|
+
name?: string;
|
|
36
|
+
path?: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const summarizeVoiceAssistantHealth: <TProvider extends string = string>(options: VoiceAssistantHealthSummaryOptions<TProvider>) => Promise<VoiceAssistantHealthSummary<TProvider>>;
|
|
39
|
+
export declare const renderVoiceAssistantHealthHTML: <TProvider extends string = string>(summary: VoiceAssistantHealthSummary<TProvider>) => string;
|
|
40
|
+
export declare const createVoiceAssistantHealthJSONHandler: <TProvider extends string = string>(options: VoiceAssistantHealthSummaryOptions<TProvider>) => () => Promise<VoiceAssistantHealthSummary<TProvider>>;
|
|
41
|
+
export declare const createVoiceAssistantHealthHTMLHandler: <TProvider extends string = string>(options: VoiceAssistantHealthHTMLHandlerOptions<TProvider>) => () => Promise<Response>;
|
|
42
|
+
export declare const createVoiceAssistantHealthRoutes: <TProvider extends string = string>(options: VoiceAssistantHealthRoutesOptions<TProvider>) => Elysia<"", {
|
|
43
|
+
decorator: {};
|
|
44
|
+
store: {};
|
|
45
|
+
derive: {};
|
|
46
|
+
resolve: {};
|
|
47
|
+
}, {
|
|
48
|
+
typebox: {};
|
|
49
|
+
error: {};
|
|
50
|
+
}, {
|
|
51
|
+
schema: {};
|
|
52
|
+
standaloneSchema: {};
|
|
53
|
+
macro: {};
|
|
54
|
+
macroFn: {};
|
|
55
|
+
parser: {};
|
|
56
|
+
response: {};
|
|
57
|
+
}, {
|
|
58
|
+
[x: string]: {
|
|
59
|
+
get: {
|
|
60
|
+
body: unknown;
|
|
61
|
+
params: {};
|
|
62
|
+
query: unknown;
|
|
63
|
+
headers: unknown;
|
|
64
|
+
response: {
|
|
65
|
+
200: VoiceAssistantHealthSummary<TProvider>;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
}, {
|
|
70
|
+
derive: {};
|
|
71
|
+
resolve: {};
|
|
72
|
+
schema: {};
|
|
73
|
+
standaloneSchema: {};
|
|
74
|
+
response: {};
|
|
75
|
+
}, {
|
|
76
|
+
derive: {};
|
|
77
|
+
resolve: {};
|
|
78
|
+
schema: {};
|
|
79
|
+
standaloneSchema: {};
|
|
80
|
+
response: {};
|
|
81
|
+
}>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
|
|
3
|
+
import type { VoiceBargeInMonitorSnapshot } from './types';
|
|
4
|
+
export type VoiceBargeInRoutesOptions = {
|
|
5
|
+
headers?: HeadersInit;
|
|
6
|
+
htmlPath?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
path?: string;
|
|
9
|
+
store: VoiceTraceEventStore;
|
|
10
|
+
thresholdMs?: number;
|
|
11
|
+
title?: string;
|
|
12
|
+
};
|
|
13
|
+
export type VoiceBargeInReport = VoiceBargeInMonitorSnapshot & {
|
|
14
|
+
checkedAt: number;
|
|
15
|
+
sessions: Array<{
|
|
16
|
+
averageLatencyMs?: number;
|
|
17
|
+
failed: number;
|
|
18
|
+
passed: number;
|
|
19
|
+
sessionId: string;
|
|
20
|
+
total: number;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
23
|
+
export declare const summarizeVoiceBargeIn: (events: StoredVoiceTraceEvent[], options?: {
|
|
24
|
+
thresholdMs?: number;
|
|
25
|
+
}) => VoiceBargeInReport;
|
|
26
|
+
export declare const renderVoiceBargeInHTML: (report: VoiceBargeInReport, options?: {
|
|
27
|
+
title?: string;
|
|
28
|
+
}) => string;
|
|
29
|
+
export declare const createVoiceBargeInRoutes: (options: VoiceBargeInRoutesOptions) => Elysia<"", {
|
|
30
|
+
decorator: {};
|
|
31
|
+
store: {};
|
|
32
|
+
derive: {};
|
|
33
|
+
resolve: {};
|
|
34
|
+
}, {
|
|
35
|
+
typebox: {};
|
|
36
|
+
error: {};
|
|
37
|
+
}, {
|
|
38
|
+
schema: {};
|
|
39
|
+
standaloneSchema: {};
|
|
40
|
+
macro: {};
|
|
41
|
+
macroFn: {};
|
|
42
|
+
parser: {};
|
|
43
|
+
response: {};
|
|
44
|
+
}, {}, {
|
|
45
|
+
derive: {};
|
|
46
|
+
resolve: {};
|
|
47
|
+
schema: {};
|
|
48
|
+
standaloneSchema: {};
|
|
49
|
+
response: {};
|
|
50
|
+
}, {
|
|
51
|
+
derive: {};
|
|
52
|
+
resolve: {};
|
|
53
|
+
schema: {};
|
|
54
|
+
standaloneSchema: {};
|
|
55
|
+
response: {};
|
|
56
|
+
}>;
|
package/dist/client/actions.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
|
|
|
7
7
|
type: "audio";
|
|
8
8
|
text?: undefined;
|
|
9
9
|
sessionId?: undefined;
|
|
10
|
+
event?: undefined;
|
|
10
11
|
message?: undefined;
|
|
11
12
|
transcript?: undefined;
|
|
12
13
|
scenarioId?: undefined;
|
|
@@ -20,6 +21,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
|
|
|
20
21
|
receivedAt?: undefined;
|
|
21
22
|
turnId?: undefined;
|
|
22
23
|
sessionId?: undefined;
|
|
24
|
+
event?: undefined;
|
|
23
25
|
message?: undefined;
|
|
24
26
|
transcript?: undefined;
|
|
25
27
|
scenarioId?: undefined;
|
|
@@ -33,6 +35,21 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
|
|
|
33
35
|
receivedAt?: undefined;
|
|
34
36
|
turnId?: undefined;
|
|
35
37
|
text?: undefined;
|
|
38
|
+
event?: undefined;
|
|
39
|
+
message?: undefined;
|
|
40
|
+
transcript?: undefined;
|
|
41
|
+
scenarioId?: undefined;
|
|
42
|
+
status?: undefined;
|
|
43
|
+
turn?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
event: import("..").VoiceCallLifecycleEvent;
|
|
46
|
+
sessionId: string;
|
|
47
|
+
type: "call_lifecycle";
|
|
48
|
+
chunk?: undefined;
|
|
49
|
+
format?: undefined;
|
|
50
|
+
receivedAt?: undefined;
|
|
51
|
+
turnId?: undefined;
|
|
52
|
+
text?: undefined;
|
|
36
53
|
message?: undefined;
|
|
37
54
|
transcript?: undefined;
|
|
38
55
|
scenarioId?: undefined;
|
|
@@ -47,6 +64,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
|
|
|
47
64
|
turnId?: undefined;
|
|
48
65
|
text?: undefined;
|
|
49
66
|
sessionId?: undefined;
|
|
67
|
+
event?: undefined;
|
|
50
68
|
transcript?: undefined;
|
|
51
69
|
scenarioId?: undefined;
|
|
52
70
|
status?: undefined;
|
|
@@ -60,6 +78,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
|
|
|
60
78
|
turnId?: undefined;
|
|
61
79
|
text?: undefined;
|
|
62
80
|
sessionId?: undefined;
|
|
81
|
+
event?: undefined;
|
|
63
82
|
message?: undefined;
|
|
64
83
|
scenarioId?: undefined;
|
|
65
84
|
status?: undefined;
|
|
@@ -73,6 +92,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
|
|
|
73
92
|
turnId?: undefined;
|
|
74
93
|
text?: undefined;
|
|
75
94
|
sessionId?: undefined;
|
|
95
|
+
event?: undefined;
|
|
76
96
|
message?: undefined;
|
|
77
97
|
scenarioId?: undefined;
|
|
78
98
|
status?: undefined;
|
|
@@ -87,6 +107,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
|
|
|
87
107
|
receivedAt?: undefined;
|
|
88
108
|
turnId?: undefined;
|
|
89
109
|
text?: undefined;
|
|
110
|
+
event?: undefined;
|
|
90
111
|
message?: undefined;
|
|
91
112
|
transcript?: undefined;
|
|
92
113
|
turn?: undefined;
|
|
@@ -99,6 +120,7 @@ export declare const serverMessageToAction: <TResult = unknown>(message: VoiceSe
|
|
|
99
120
|
turnId?: undefined;
|
|
100
121
|
text?: undefined;
|
|
101
122
|
sessionId?: undefined;
|
|
123
|
+
event?: undefined;
|
|
102
124
|
message?: undefined;
|
|
103
125
|
transcript?: undefined;
|
|
104
126
|
scenarioId?: undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { VoiceAppKitStatusReport } from '../appKit';
|
|
2
|
+
export type VoiceAppKitStatusClientOptions = {
|
|
3
|
+
fetch?: typeof fetch;
|
|
4
|
+
intervalMs?: number;
|
|
5
|
+
};
|
|
6
|
+
export type VoiceAppKitStatusSnapshot = {
|
|
7
|
+
error: string | null;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
report?: VoiceAppKitStatusReport;
|
|
10
|
+
updatedAt?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const fetchVoiceAppKitStatus: (path?: string, options?: Pick<VoiceAppKitStatusClientOptions, "fetch">) => Promise<VoiceAppKitStatusReport>;
|
|
13
|
+
export declare const createVoiceAppKitStatusStore: (path?: string, options?: VoiceAppKitStatusClientOptions) => {
|
|
14
|
+
close: () => void;
|
|
15
|
+
getServerSnapshot: () => VoiceAppKitStatusSnapshot;
|
|
16
|
+
getSnapshot: () => VoiceAppKitStatusSnapshot;
|
|
17
|
+
refresh: () => Promise<VoiceAppKitStatusReport | undefined>;
|
|
18
|
+
subscribe: (listener: () => void) => () => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { VoiceBargeInMonitor } from '../types';
|
|
2
|
+
export type VoiceBargeInMonitorOptions = {
|
|
3
|
+
fetch?: typeof fetch;
|
|
4
|
+
path?: string;
|
|
5
|
+
thresholdMs?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const createVoiceBargeInMonitor: (options?: VoiceBargeInMonitorOptions) => VoiceBargeInMonitor;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { VoiceClientMessage, VoiceConnectionOptions, VoiceServerMessage } from '../types';
|
|
2
2
|
type VoiceConnectionHandle = {
|
|
3
|
+
callControl: (message: Omit<VoiceClientMessage & {
|
|
4
|
+
type: 'call_control';
|
|
5
|
+
}, 'type'>) => void;
|
|
3
6
|
start: (input?: {
|
|
4
7
|
sessionId?: string;
|
|
5
8
|
scenarioId?: string;
|
package/dist/client/duplex.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { VoiceAudioPlayer, VoiceBargeInBinding, VoiceBargeInOptions, VoiceController, VoiceDuplexController, VoiceDuplexControllerOptions } from '../types';
|
|
2
|
-
export declare const bindVoiceBargeIn: <TResult = unknown>(controller: Pick<VoiceController<TResult>, "partial" | "sendAudio" | "subscribe">, player: Pick<VoiceAudioPlayer, "interrupt" | "isPlaying">, options?: VoiceBargeInOptions) => VoiceBargeInBinding;
|
|
2
|
+
export declare const bindVoiceBargeIn: <TResult = unknown>(controller: Pick<VoiceController<TResult>, "partial" | "sendAudio" | "sessionId" | "subscribe">, player: Pick<VoiceAudioPlayer, "interrupt" | "isPlaying" | "lastInterruptLatencyMs" | "lastPlaybackStopLatencyMs">, options?: VoiceBargeInOptions) => VoiceBargeInBinding;
|
|
3
3
|
export declare const createVoiceDuplexController: <TResult = unknown>(path: string, options?: VoiceDuplexControllerOptions) => VoiceDuplexController<TResult>;
|