@absolutejs/voice 0.0.22-beta.7 → 0.0.22-beta.71
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 +6 -0
- package/dist/angular/index.js +833 -43
- 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-turn-quality.service.d.ts +12 -0
- package/dist/angular/voice-workflow-status.service.d.ts +12 -0
- package/dist/appKit.d.ts +94 -0
- package/dist/assistantHealth.d.ts +81 -0
- package/dist/client/actions.d.ts +22 -0
- package/dist/client/appKitStatus.d.ts +19 -0
- package/dist/client/connection.d.ts +3 -0
- package/dist/client/htmxBootstrap.js +44 -2
- package/dist/client/index.d.ts +26 -0
- package/dist/client/index.js +1290 -2
- 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/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 +44 -4
- package/dist/index.js +5677 -139
- package/dist/modelAdapters.d.ts +75 -0
- package/dist/opsConsoleRoutes.d.ts +77 -0
- package/dist/opsWebhook.d.ts +126 -0
- package/dist/outcomeContract.d.ts +112 -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 +52 -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/VoiceTurnQuality.d.ts +6 -0
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +1884 -11
- 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/useVoiceTurnQuality.d.ts +8 -0
- package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
- package/dist/resilienceRoutes.d.ts +117 -0
- package/dist/sessionReplay.d.ts +175 -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/createVoiceTurnQuality.d.ts +10 -0
- package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
- package/dist/svelte/index.d.ts +8 -0
- package/dist/svelte/index.js +1330 -3
- package/dist/telephonyOutcome.d.ts +178 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +1537 -7
- 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/turnQuality.d.ts +94 -0
- package/dist/types.d.ts +84 -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/VoiceTurnQuality.d.ts +51 -0
- package/dist/vue/index.d.ts +13 -0
- package/dist/vue/index.js +1934 -25
- 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/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,76 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type StoredVoiceTraceEvent, type VoiceTraceEventStore } from './trace';
|
|
3
|
+
export type VoiceQualityStatus = 'pass' | 'fail';
|
|
4
|
+
export type VoiceQualityThresholds = {
|
|
5
|
+
maxDuplicateTurnRate?: number;
|
|
6
|
+
maxEmptyTurnRate?: number;
|
|
7
|
+
maxHandoffFailureRate?: number;
|
|
8
|
+
maxMissingAssistantReplyRate?: number;
|
|
9
|
+
maxProviderAverageLatencyMs?: number;
|
|
10
|
+
maxProviderErrorRate?: number;
|
|
11
|
+
maxProviderFallbackRate?: number;
|
|
12
|
+
maxProviderTimeoutRate?: number;
|
|
13
|
+
};
|
|
14
|
+
export type VoiceQualityMetric = {
|
|
15
|
+
actual: number;
|
|
16
|
+
label: string;
|
|
17
|
+
pass: boolean;
|
|
18
|
+
threshold: number;
|
|
19
|
+
unit: 'count' | 'ms' | 'rate';
|
|
20
|
+
};
|
|
21
|
+
export type VoiceQualityReport = {
|
|
22
|
+
checkedAt: number;
|
|
23
|
+
eventCount: number;
|
|
24
|
+
metrics: Record<string, VoiceQualityMetric>;
|
|
25
|
+
status: VoiceQualityStatus;
|
|
26
|
+
thresholds: Required<VoiceQualityThresholds>;
|
|
27
|
+
};
|
|
28
|
+
export type VoiceQualityLink = {
|
|
29
|
+
href: string;
|
|
30
|
+
label: string;
|
|
31
|
+
};
|
|
32
|
+
export type VoiceQualityRoutesOptions = {
|
|
33
|
+
events?: StoredVoiceTraceEvent[];
|
|
34
|
+
headers?: HeadersInit;
|
|
35
|
+
links?: VoiceQualityLink[];
|
|
36
|
+
name?: string;
|
|
37
|
+
path?: string;
|
|
38
|
+
store?: VoiceTraceEventStore;
|
|
39
|
+
thresholds?: VoiceQualityThresholds;
|
|
40
|
+
};
|
|
41
|
+
export declare const evaluateVoiceQuality: (input: {
|
|
42
|
+
events?: StoredVoiceTraceEvent[];
|
|
43
|
+
store?: VoiceTraceEventStore;
|
|
44
|
+
thresholds?: VoiceQualityThresholds;
|
|
45
|
+
}) => Promise<VoiceQualityReport>;
|
|
46
|
+
export declare const renderVoiceQualityHTML: (report: VoiceQualityReport, options?: {
|
|
47
|
+
links?: VoiceQualityLink[];
|
|
48
|
+
}) => string;
|
|
49
|
+
export declare const createVoiceQualityRoutes: (options: VoiceQualityRoutesOptions) => Elysia<"", {
|
|
50
|
+
decorator: {};
|
|
51
|
+
store: {};
|
|
52
|
+
derive: {};
|
|
53
|
+
resolve: {};
|
|
54
|
+
}, {
|
|
55
|
+
typebox: {};
|
|
56
|
+
error: {};
|
|
57
|
+
}, {
|
|
58
|
+
schema: {};
|
|
59
|
+
standaloneSchema: {};
|
|
60
|
+
macro: {};
|
|
61
|
+
macroFn: {};
|
|
62
|
+
parser: {};
|
|
63
|
+
response: {};
|
|
64
|
+
}, {}, {
|
|
65
|
+
derive: {};
|
|
66
|
+
resolve: {};
|
|
67
|
+
schema: {};
|
|
68
|
+
standaloneSchema: {};
|
|
69
|
+
response: {};
|
|
70
|
+
}, {
|
|
71
|
+
derive: {};
|
|
72
|
+
resolve: {};
|
|
73
|
+
schema: {};
|
|
74
|
+
standaloneSchema: {};
|
|
75
|
+
response: {};
|
|
76
|
+
}>;
|
package/dist/queue.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RedisClient } from 'bun';
|
|
2
2
|
import type { VoiceIntegrationSink } from './opsSinks';
|
|
3
3
|
import type { VoiceTraceRedactionConfig, VoiceTraceSink, VoiceTraceSinkDeliveryRecord, VoiceTraceSinkDeliveryStore, VoiceTraceSinkDeliveryQueueStatus } from './trace';
|
|
4
|
+
import type { StoredVoiceHandoffDelivery, VoiceHandoffAdapter, VoiceHandoffDeliveryQueueStatus, VoiceHandoffDeliveryStore, VoiceSessionHandle, VoiceSessionRecord } from './types';
|
|
4
5
|
import type { VoiceOpsTaskPriority, StoredVoiceOpsTask, StoredVoiceIntegrationEvent, VoiceIntegrationDeliveryStatus, VoiceIntegrationEventStore, VoiceIntegrationWebhookConfig, VoiceOpsTaskKind, VoiceOpsTaskStatus, VoiceOpsTaskStore } from './ops';
|
|
5
6
|
export type VoiceOpsTaskLease = {
|
|
6
7
|
expiresAt: number;
|
|
@@ -159,6 +160,50 @@ export type VoiceTraceSinkDeliveryQueueSummary = {
|
|
|
159
160
|
skipped: number;
|
|
160
161
|
total: number;
|
|
161
162
|
};
|
|
163
|
+
export type VoiceHandoffDeliveryWorkerOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown, TDelivery extends StoredVoiceHandoffDelivery<TContext, TSession, TResult> = StoredVoiceHandoffDelivery<TContext, TSession, TResult>> = {
|
|
164
|
+
adapters: VoiceHandoffAdapter<TContext, TSession, TResult>[];
|
|
165
|
+
api: VoiceSessionHandle<TContext, TSession, TResult>;
|
|
166
|
+
deadLetters?: VoiceHandoffDeliveryStore<TDelivery>;
|
|
167
|
+
deliveries: VoiceHandoffDeliveryStore<TDelivery>;
|
|
168
|
+
failMode?: 'record' | 'throw';
|
|
169
|
+
idempotency?: VoiceIdempotencyStore;
|
|
170
|
+
idempotencyTtlSeconds?: number;
|
|
171
|
+
leaseMs?: number;
|
|
172
|
+
leases: VoiceRedisTaskLeaseCoordinator;
|
|
173
|
+
maxFailures?: number;
|
|
174
|
+
onDeadLetter?: (delivery: TDelivery) => Promise<void> | void;
|
|
175
|
+
statuses?: VoiceHandoffDeliveryQueueStatus[];
|
|
176
|
+
workerId: string;
|
|
177
|
+
};
|
|
178
|
+
export type VoiceHandoffDeliveryWorkerResult = {
|
|
179
|
+
alreadyProcessed: number;
|
|
180
|
+
attempted: number;
|
|
181
|
+
deadLettered: number;
|
|
182
|
+
delivered: number;
|
|
183
|
+
failed: number;
|
|
184
|
+
skipped: number;
|
|
185
|
+
};
|
|
186
|
+
export type VoiceHandoffDeliveryWorkerLoopOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown, TDelivery extends StoredVoiceHandoffDelivery<TContext, TSession, TResult> = StoredVoiceHandoffDelivery<TContext, TSession, TResult>> = {
|
|
187
|
+
onError?: (error: unknown) => Promise<void> | void;
|
|
188
|
+
pollIntervalMs?: number;
|
|
189
|
+
worker: ReturnType<typeof createVoiceHandoffDeliveryWorker<TContext, TSession, TResult, TDelivery>>;
|
|
190
|
+
};
|
|
191
|
+
export type VoiceHandoffDeliveryWorkerLoop = {
|
|
192
|
+
isRunning: () => boolean;
|
|
193
|
+
start: () => void;
|
|
194
|
+
stop: () => void;
|
|
195
|
+
tick: () => Promise<VoiceHandoffDeliveryWorkerResult>;
|
|
196
|
+
};
|
|
197
|
+
export type VoiceHandoffDeliveryQueueSummary = {
|
|
198
|
+
byAction: Array<[StoredVoiceHandoffDelivery['action'], number]>;
|
|
199
|
+
deadLettered: number;
|
|
200
|
+
delivered: number;
|
|
201
|
+
failed: number;
|
|
202
|
+
pending: number;
|
|
203
|
+
retryEligible: number;
|
|
204
|
+
skipped: number;
|
|
205
|
+
total: number;
|
|
206
|
+
};
|
|
162
207
|
export type VoiceOpsTaskWorkerOptions<TTask extends StoredVoiceOpsTask = StoredVoiceOpsTask> = {
|
|
163
208
|
leaseMs?: number;
|
|
164
209
|
leases: VoiceRedisTaskLeaseCoordinator;
|
|
@@ -252,6 +297,9 @@ export declare const summarizeVoiceIntegrationEvents: <TEvent extends StoredVoic
|
|
|
252
297
|
export declare const summarizeVoiceTraceSinkDeliveries: <TDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord>(deliveries: TDelivery[], input?: {
|
|
253
298
|
deadLetters?: VoiceTraceSinkDeliveryStore<TDelivery>;
|
|
254
299
|
}) => Promise<VoiceTraceSinkDeliveryQueueSummary> | VoiceTraceSinkDeliveryQueueSummary;
|
|
300
|
+
export declare const summarizeVoiceHandoffDeliveries: <TDelivery extends StoredVoiceHandoffDelivery = StoredVoiceHandoffDelivery>(deliveries: TDelivery[], input?: {
|
|
301
|
+
deadLetters?: VoiceHandoffDeliveryStore<TDelivery>;
|
|
302
|
+
}) => Promise<VoiceHandoffDeliveryQueueSummary> | VoiceHandoffDeliveryQueueSummary;
|
|
255
303
|
export declare const summarizeVoiceOpsTaskQueue: <TTask extends StoredVoiceOpsTask = StoredVoiceOpsTask>(tasks: TTask[], input?: {
|
|
256
304
|
deadLetters?: VoiceOpsTaskStore<TTask>;
|
|
257
305
|
}) => Promise<VoiceOpsTaskQueueSummary> | VoiceOpsTaskQueueSummary;
|
|
@@ -269,6 +317,10 @@ export declare const createVoiceTraceSinkDeliveryWorker: <TDelivery extends Voic
|
|
|
269
317
|
drain: () => Promise<VoiceTraceSinkDeliveryWorkerResult>;
|
|
270
318
|
};
|
|
271
319
|
export declare const createVoiceTraceSinkDeliveryWorkerLoop: <TDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord>(options: VoiceTraceSinkDeliveryWorkerLoopOptions<TDelivery>) => VoiceTraceSinkDeliveryWorkerLoop;
|
|
320
|
+
export declare const createVoiceHandoffDeliveryWorker: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown, TDelivery extends StoredVoiceHandoffDelivery<TContext, TSession, TResult> = StoredVoiceHandoffDelivery<TContext, TSession, TResult>>(options: VoiceHandoffDeliveryWorkerOptions<TContext, TSession, TResult, TDelivery>) => {
|
|
321
|
+
drain: () => Promise<VoiceHandoffDeliveryWorkerResult>;
|
|
322
|
+
};
|
|
323
|
+
export declare const createVoiceHandoffDeliveryWorkerLoop: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown, TDelivery extends StoredVoiceHandoffDelivery<TContext, TSession, TResult> = StoredVoiceHandoffDelivery<TContext, TSession, TResult>>(options: VoiceHandoffDeliveryWorkerLoopOptions<TContext, TSession, TResult, TDelivery>) => VoiceHandoffDeliveryWorkerLoop;
|
|
272
324
|
export declare const createVoiceOpsTaskWorker: <TTask extends StoredVoiceOpsTask = StoredVoiceOpsTask>(options: VoiceOpsTaskWorkerOptions<TTask>) => VoiceOpsTaskWorker<TTask>;
|
|
273
325
|
export declare const createVoiceOpsTaskProcessorWorker: <TTask extends StoredVoiceOpsTask = StoredVoiceOpsTask>(options: VoiceOpsTaskProcessorWorkerOptions<TTask>) => {
|
|
274
326
|
drain: () => Promise<VoiceOpsTaskProcessorWorkerResult>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VoiceOpsStatusWidgetOptions } from '../client/opsStatusWidget';
|
|
2
|
+
export type VoiceOpsStatusProps = VoiceOpsStatusWidgetOptions & {
|
|
3
|
+
className?: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const VoiceOpsStatus: ({ className, path, ...options }: VoiceOpsStatusProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VoiceProviderCapabilitiesWidgetOptions } from '../client/providerCapabilitiesWidget';
|
|
2
|
+
export type VoiceProviderCapabilitiesProps = VoiceProviderCapabilitiesWidgetOptions & {
|
|
3
|
+
className?: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const VoiceProviderCapabilities: ({ className, path, ...options }: VoiceProviderCapabilitiesProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { VoiceProviderSimulationControlsOptions } from '../client/providerSimulationControls';
|
|
2
|
+
export type VoiceProviderSimulationControlsProps<TProvider extends string = string> = VoiceProviderSimulationControlsOptions<TProvider> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const VoiceProviderSimulationControls: <TProvider extends string = string>({ className, ...options }: VoiceProviderSimulationControlsProps<TProvider>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VoiceProviderStatusWidgetOptions } from '../client/providerStatusWidget';
|
|
2
|
+
export type VoiceProviderStatusProps = VoiceProviderStatusWidgetOptions & {
|
|
3
|
+
className?: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const VoiceProviderStatus: ({ className, path, ...options }: VoiceProviderStatusProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VoiceRoutingStatusWidgetOptions } from '../client/routingStatusWidget';
|
|
2
|
+
export type VoiceRoutingStatusProps = VoiceRoutingStatusWidgetOptions & {
|
|
3
|
+
className?: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const VoiceRoutingStatus: ({ className, path, ...options }: VoiceRoutingStatusProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VoiceTurnQualityWidgetOptions } from '../client/turnQualityWidget';
|
|
2
|
+
export type VoiceTurnQualityProps = VoiceTurnQualityWidgetOptions & {
|
|
3
|
+
className?: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const VoiceTurnQuality: ({ className, path, ...options }: VoiceTurnQualityProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
export { VoiceOpsStatus } from './VoiceOpsStatus';
|
|
2
|
+
export { VoiceProviderSimulationControls } from './VoiceProviderSimulationControls';
|
|
3
|
+
export { VoiceProviderCapabilities } from './VoiceProviderCapabilities';
|
|
4
|
+
export { VoiceProviderStatus } from './VoiceProviderStatus';
|
|
5
|
+
export { VoiceRoutingStatus } from './VoiceRoutingStatus';
|
|
6
|
+
export { VoiceTurnQuality } from './VoiceTurnQuality';
|
|
7
|
+
export { useVoiceAppKitStatus } from './useVoiceAppKitStatus';
|
|
1
8
|
export { useVoiceStream } from './useVoiceStream';
|
|
2
9
|
export { useVoiceController } from './useVoiceController';
|
|
10
|
+
export { useVoiceProviderStatus } from './useVoiceProviderStatus';
|
|
11
|
+
export { useVoiceProviderCapabilities } from './useVoiceProviderCapabilities';
|
|
12
|
+
export { useVoiceProviderSimulationControls } from './useVoiceProviderSimulationControls';
|
|
13
|
+
export { useVoiceRoutingStatus } from './useVoiceRoutingStatus';
|
|
14
|
+
export { useVoiceTurnQuality } from './useVoiceTurnQuality';
|
|
15
|
+
export { useVoiceWorkflowStatus } from './useVoiceWorkflowStatus';
|