@absolutejs/voice 0.0.22-beta.16 → 0.0.22-beta.160
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 +1053 -5
- package/dist/agent.d.ts +24 -0
- package/dist/agentSquadContract.d.ts +64 -0
- package/dist/angular/index.d.ts +11 -0
- package/dist/angular/index.js +3072 -1106
- package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
- package/dist/angular/voice-controller.service.d.ts +1 -0
- package/dist/angular/voice-delivery-runtime.component.d.ts +17 -0
- package/dist/angular/voice-delivery-runtime.service.d.ts +16 -0
- package/dist/angular/voice-ops-action-center.service.d.ts +13 -0
- package/dist/angular/voice-ops-status.component.d.ts +15 -0
- package/dist/angular/voice-ops-status.service.d.ts +12 -0
- package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
- package/dist/angular/voice-routing-status.service.d.ts +11 -0
- package/dist/angular/voice-stream.service.d.ts +3 -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/assistantHealth.d.ts +81 -0
- package/dist/audit.d.ts +128 -0
- package/dist/auditDeliveryRoutes.d.ts +85 -0
- package/dist/auditExport.d.ts +34 -0
- package/dist/auditRoutes.d.ts +66 -0
- package/dist/auditSinks.d.ts +151 -0
- package/dist/bargeInRoutes.d.ts +56 -0
- package/dist/campaign.d.ts +610 -0
- package/dist/campaignDialers.d.ts +90 -0
- package/dist/client/actions.d.ts +105 -0
- package/dist/client/bargeInMonitor.d.ts +7 -0
- package/dist/client/campaignDialerProof.d.ts +23 -0
- package/dist/client/connection.d.ts +3 -0
- package/dist/client/deliveryRuntime.d.ts +34 -0
- package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
- package/dist/client/duplex.d.ts +1 -1
- package/dist/client/htmxBootstrap.js +747 -15
- package/dist/client/index.d.ts +50 -0
- package/dist/client/index.js +2757 -20
- package/dist/client/liveTurnLatency.d.ts +41 -0
- package/dist/client/opsActionCenter.d.ts +54 -0
- package/dist/client/opsActionCenterWidget.d.ts +29 -0
- package/dist/client/opsActionHistory.d.ts +19 -0
- package/dist/client/opsActionHistoryWidget.d.ts +11 -0
- package/dist/client/opsStatus.d.ts +19 -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/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/dataControl.d.ts +47 -0
- package/dist/deliveryRuntime.d.ts +158 -0
- package/dist/deliverySinkRoutes.d.ts +117 -0
- package/dist/demoReadyRoutes.d.ts +98 -0
- package/dist/diagnosticsRoutes.d.ts +44 -0
- package/dist/evalRoutes.d.ts +213 -0
- package/dist/fileStore.d.ts +11 -2
- package/dist/handoff.d.ts +54 -0
- package/dist/handoffHealth.d.ts +94 -0
- package/dist/index.d.ts +112 -11
- package/dist/index.js +17792 -4316
- package/dist/liveLatency.d.ts +78 -0
- package/dist/modelAdapters.d.ts +23 -2
- package/dist/openaiRealtime.d.ts +27 -0
- package/dist/openaiTTS.d.ts +18 -0
- package/dist/opsActionAuditRoutes.d.ts +99 -0
- package/dist/opsConsoleRoutes.d.ts +80 -0
- package/dist/opsStatus.d.ts +76 -0
- package/dist/opsStatusRoutes.d.ts +33 -0
- package/dist/opsWebhook.d.ts +126 -0
- package/dist/outcomeContract.d.ts +112 -0
- package/dist/phoneAgent.d.ts +62 -0
- package/dist/phoneAgentProductionSmoke.d.ts +115 -0
- package/dist/postgresStore.d.ts +13 -2
- package/dist/productionReadiness.d.ts +335 -0
- package/dist/providerAdapters.d.ts +48 -0
- package/dist/providerCapabilities.d.ts +92 -0
- package/dist/providerHealth.d.ts +1 -0
- package/dist/providerRoutingContract.d.ts +38 -0
- package/dist/qualityRoutes.d.ts +76 -0
- package/dist/queue.d.ts +61 -0
- package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
- package/dist/react/VoiceOpsActionCenter.d.ts +5 -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 +21 -0
- package/dist/react/index.js +3396 -33
- package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
- package/dist/react/useVoiceController.d.ts +3 -0
- package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/react/useVoiceOpsStatus.d.ts +8 -0
- package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
- package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
- package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/react/useVoiceStream.d.ts +3 -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/readinessProfiles.d.ts +19 -0
- package/dist/reconnectContract.d.ts +87 -0
- package/dist/resilienceRoutes.d.ts +142 -0
- package/dist/sessionReplay.d.ts +185 -0
- package/dist/simulationSuite.d.ts +120 -0
- package/dist/sqliteStore.d.ts +13 -2
- package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
- package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
- package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -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 +4 -2
- 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 +11 -0
- package/dist/svelte/index.js +2903 -439
- 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 +135 -2
- package/dist/telephonyOutcome.d.ts +201 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +2973 -156
- 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 +19 -1
- package/dist/traceDeliveryRoutes.d.ts +86 -0
- 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 +170 -4
- package/dist/vue/VoiceDeliveryRuntime.d.ts +30 -0
- package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
- 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 +20 -0
- package/dist/vue/index.js +3327 -53
- package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
- package/dist/vue/useVoiceController.d.ts +2 -1
- package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/vue/useVoiceOpsStatus.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 +1 -1
- package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/vue/useVoiceStream.d.ts +4 -1
- 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
package/dist/types.d.ts
CHANGED
|
@@ -193,6 +193,15 @@ export type RealtimeAdapter<TOptions extends RealtimeAdapterOpenOptions = Realti
|
|
|
193
193
|
open: (options: TOptions) => Promise<RealtimeAdapterSession> | RealtimeAdapterSession;
|
|
194
194
|
};
|
|
195
195
|
export type VoiceSessionStatus = 'active' | 'reconnecting' | 'completed' | 'failed';
|
|
196
|
+
export type VoiceReconnectClientStatus = 'idle' | 'reconnecting' | 'resumed' | 'exhausted';
|
|
197
|
+
export type VoiceReconnectClientState = {
|
|
198
|
+
attempts: number;
|
|
199
|
+
lastDisconnectAt?: number;
|
|
200
|
+
lastResumedAt?: number;
|
|
201
|
+
maxAttempts: number;
|
|
202
|
+
nextAttemptAt?: number;
|
|
203
|
+
status: VoiceReconnectClientStatus;
|
|
204
|
+
};
|
|
196
205
|
export type VoiceTurnRecord<TResult = unknown> = {
|
|
197
206
|
id: string;
|
|
198
207
|
text: string;
|
|
@@ -269,6 +278,65 @@ export type VoiceCallLifecycleState = {
|
|
|
269
278
|
lastEventAt: number;
|
|
270
279
|
startedAt: number;
|
|
271
280
|
};
|
|
281
|
+
export type VoiceHandoffAction = 'escalate' | 'no-answer' | 'transfer' | 'voicemail';
|
|
282
|
+
export type VoiceHandoffStatus = 'delivered' | 'failed' | 'skipped';
|
|
283
|
+
export type VoiceHandoffResult = {
|
|
284
|
+
deliveredAt?: number;
|
|
285
|
+
deliveredTo?: string;
|
|
286
|
+
error?: string;
|
|
287
|
+
metadata?: Record<string, unknown>;
|
|
288
|
+
status: VoiceHandoffStatus;
|
|
289
|
+
};
|
|
290
|
+
export type VoiceHandoffDeliveryQueueStatus = VoiceHandoffStatus | 'pending';
|
|
291
|
+
export type StoredVoiceHandoffDelivery<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
292
|
+
action: VoiceHandoffAction;
|
|
293
|
+
context: TContext;
|
|
294
|
+
createdAt: number;
|
|
295
|
+
deliveredAt?: number;
|
|
296
|
+
deliveries?: Record<string, VoiceHandoffResult & {
|
|
297
|
+
adapterId: string;
|
|
298
|
+
adapterKind?: string;
|
|
299
|
+
}>;
|
|
300
|
+
deliveryAttempts?: number;
|
|
301
|
+
deliveryError?: string;
|
|
302
|
+
deliveryStatus: VoiceHandoffDeliveryQueueStatus;
|
|
303
|
+
id: string;
|
|
304
|
+
metadata?: Record<string, unknown>;
|
|
305
|
+
reason?: string;
|
|
306
|
+
result?: TResult;
|
|
307
|
+
session: TSession;
|
|
308
|
+
sessionId: string;
|
|
309
|
+
target?: string;
|
|
310
|
+
updatedAt: number;
|
|
311
|
+
};
|
|
312
|
+
export type VoiceHandoffDeliveryStore<TDelivery extends StoredVoiceHandoffDelivery = StoredVoiceHandoffDelivery> = {
|
|
313
|
+
get: (id: string) => Promise<TDelivery | undefined> | TDelivery | undefined;
|
|
314
|
+
list: () => Promise<TDelivery[]> | TDelivery[];
|
|
315
|
+
remove: (id: string) => Promise<void> | void;
|
|
316
|
+
set: (id: string, delivery: TDelivery) => Promise<void> | void;
|
|
317
|
+
};
|
|
318
|
+
export type VoiceHandoffInput<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
319
|
+
action: VoiceHandoffAction;
|
|
320
|
+
api: VoiceSessionHandle<TContext, TSession, TResult>;
|
|
321
|
+
context: TContext;
|
|
322
|
+
metadata?: Record<string, unknown>;
|
|
323
|
+
reason?: string;
|
|
324
|
+
result?: TResult;
|
|
325
|
+
session: TSession;
|
|
326
|
+
target?: string;
|
|
327
|
+
};
|
|
328
|
+
export type VoiceHandoffAdapter<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
329
|
+
actions?: VoiceHandoffAction[];
|
|
330
|
+
handoff: (input: VoiceHandoffInput<TContext, TSession, TResult>) => Promise<VoiceHandoffResult> | VoiceHandoffResult;
|
|
331
|
+
id: string;
|
|
332
|
+
kind?: string;
|
|
333
|
+
};
|
|
334
|
+
export type VoiceHandoffConfig<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
335
|
+
adapters: VoiceHandoffAdapter<TContext, TSession, TResult>[];
|
|
336
|
+
deliveryQueue?: VoiceHandoffDeliveryStore<StoredVoiceHandoffDelivery<TContext, TSession, TResult>>;
|
|
337
|
+
enqueueOnly?: boolean;
|
|
338
|
+
failMode?: 'record' | 'throw';
|
|
339
|
+
};
|
|
272
340
|
export type VoiceSessionStore<TSession extends VoiceSessionRecord = VoiceSessionRecord> = SessionStore<TSession, VoiceSessionSummary>;
|
|
273
341
|
export type VoiceLogger = {
|
|
274
342
|
debug?: (message: string, meta?: Record<string, unknown>) => void;
|
|
@@ -557,9 +625,11 @@ export type VoicePluginConfig<TContext = unknown, TSession extends VoiceSessionR
|
|
|
557
625
|
lexicon?: VoiceLexiconEntry[] | VoiceLexiconResolver<TContext>;
|
|
558
626
|
phraseHints?: VoicePhraseHint[] | VoicePhraseHintResolver<TContext>;
|
|
559
627
|
preset?: VoiceRuntimePreset;
|
|
560
|
-
stt
|
|
628
|
+
stt?: STTAdapter;
|
|
561
629
|
sttFallback?: VoiceSTTFallbackConfig;
|
|
562
630
|
sttLifecycle?: VoiceSTTLifecycle;
|
|
631
|
+
realtime?: RealtimeAdapter;
|
|
632
|
+
realtimeInputFormat?: AudioFormat;
|
|
563
633
|
tts?: TTSAdapter;
|
|
564
634
|
session: VoiceSessionStore<NoInfer<TSession>>;
|
|
565
635
|
reconnect?: VoiceReconnectConfig;
|
|
@@ -567,6 +637,7 @@ export type VoicePluginConfig<TContext = unknown, TSession extends VoiceSessionR
|
|
|
567
637
|
audioConditioning?: VoiceAudioConditioningConfig;
|
|
568
638
|
logger?: VoiceLogger;
|
|
569
639
|
htmx?: boolean | VoiceHTMXConfig<TSession, NoInfer<TResult>>;
|
|
640
|
+
handoff?: VoiceHandoffConfig<TContext, TSession, TResult>;
|
|
570
641
|
ops?: VoiceRuntimeOpsConfig<TContext, TSession, TResult>;
|
|
571
642
|
trace?: VoiceTraceEventStore;
|
|
572
643
|
} & VoiceRouteConfig<TContext, TSession, TResult>;
|
|
@@ -575,7 +646,9 @@ export type CreateVoiceSessionOptions<TContext = unknown, TSession extends Voice
|
|
|
575
646
|
id: string;
|
|
576
647
|
context: TContext;
|
|
577
648
|
socket: VoiceSocket;
|
|
578
|
-
stt
|
|
649
|
+
stt?: STTAdapter;
|
|
650
|
+
realtime?: RealtimeAdapter;
|
|
651
|
+
realtimeInputFormat?: AudioFormat;
|
|
579
652
|
tts?: TTSAdapter;
|
|
580
653
|
languageStrategy?: VoiceLanguageStrategy;
|
|
581
654
|
lexicon?: VoiceLexiconEntry[];
|
|
@@ -588,6 +661,7 @@ export type CreateVoiceSessionOptions<TContext = unknown, TSession extends Voice
|
|
|
588
661
|
sttLifecycle: VoiceSTTLifecycle;
|
|
589
662
|
turnDetection: VoiceResolvedTurnDetectionConfig;
|
|
590
663
|
audioConditioning?: VoiceResolvedAudioConditioningConfig;
|
|
664
|
+
handoff?: VoiceHandoffConfig<TContext, TSession, TResult>;
|
|
591
665
|
route: VoiceNormalizedRouteConfig<TContext, TSession, TResult>;
|
|
592
666
|
logger?: VoiceLogger;
|
|
593
667
|
};
|
|
@@ -604,16 +678,33 @@ export type VoiceClientCloseMessage = {
|
|
|
604
678
|
type: 'close';
|
|
605
679
|
reason?: string;
|
|
606
680
|
};
|
|
681
|
+
export type VoiceClientCallControlMessage = {
|
|
682
|
+
type: 'call_control';
|
|
683
|
+
action: 'complete' | 'escalate' | 'no-answer' | 'transfer' | 'voicemail';
|
|
684
|
+
metadata?: Record<string, unknown>;
|
|
685
|
+
reason?: string;
|
|
686
|
+
target?: string;
|
|
687
|
+
};
|
|
607
688
|
export type VoiceClientPingMessage = {
|
|
608
689
|
type: 'ping';
|
|
609
690
|
};
|
|
610
|
-
export type VoiceClientMessage = VoiceClientStartMessage | VoiceClientEndTurnMessage | VoiceClientCloseMessage | VoiceClientPingMessage;
|
|
691
|
+
export type VoiceClientMessage = VoiceClientStartMessage | VoiceClientEndTurnMessage | VoiceClientCloseMessage | VoiceClientCallControlMessage | VoiceClientPingMessage;
|
|
611
692
|
export type VoiceServerSessionMessage = {
|
|
612
693
|
type: 'session';
|
|
613
694
|
sessionId: string;
|
|
614
695
|
status: VoiceSessionStatus;
|
|
615
696
|
scenarioId?: string;
|
|
616
697
|
};
|
|
698
|
+
export type VoiceServerReplayMessage<TResult = unknown> = {
|
|
699
|
+
type: 'replay';
|
|
700
|
+
assistantTexts: string[];
|
|
701
|
+
call?: VoiceCallLifecycleState;
|
|
702
|
+
partial: string;
|
|
703
|
+
scenarioId?: string;
|
|
704
|
+
sessionId: string;
|
|
705
|
+
status: VoiceSessionStatus;
|
|
706
|
+
turns: VoiceTurnRecord<TResult>[];
|
|
707
|
+
};
|
|
617
708
|
export type VoiceServerPartialMessage = {
|
|
618
709
|
type: 'partial';
|
|
619
710
|
transcript: Transcript;
|
|
@@ -642,6 +733,11 @@ export type VoiceServerCompleteMessage = {
|
|
|
642
733
|
type: 'complete';
|
|
643
734
|
sessionId: string;
|
|
644
735
|
};
|
|
736
|
+
export type VoiceServerCallLifecycleMessage = {
|
|
737
|
+
type: 'call_lifecycle';
|
|
738
|
+
event: VoiceCallLifecycleEvent;
|
|
739
|
+
sessionId: string;
|
|
740
|
+
};
|
|
645
741
|
export type VoiceServerErrorMessage = {
|
|
646
742
|
type: 'error';
|
|
647
743
|
message: string;
|
|
@@ -650,17 +746,23 @@ export type VoiceServerErrorMessage = {
|
|
|
650
746
|
export type VoiceServerPongMessage = {
|
|
651
747
|
type: 'pong';
|
|
652
748
|
};
|
|
653
|
-
export type
|
|
749
|
+
export type VoiceServerConnectionMessage = {
|
|
750
|
+
type: 'connection';
|
|
751
|
+
reconnect: VoiceReconnectClientState;
|
|
752
|
+
};
|
|
753
|
+
export type VoiceServerMessage<TResult = unknown> = VoiceServerSessionMessage | VoiceServerReplayMessage<TResult> | VoiceServerPartialMessage | VoiceServerFinalMessage | VoiceServerTurnMessage<TResult> | VoiceServerAssistantMessage | VoiceServerAudioMessage | VoiceServerCallLifecycleMessage | VoiceServerCompleteMessage | VoiceServerErrorMessage | VoiceServerPongMessage | VoiceServerConnectionMessage;
|
|
654
754
|
export type VoiceConnectionOptions = {
|
|
655
755
|
protocols?: string[];
|
|
656
756
|
scenarioId?: string;
|
|
657
757
|
reconnect?: boolean;
|
|
758
|
+
reconnectReportPath?: string;
|
|
658
759
|
maxReconnectAttempts?: number;
|
|
659
760
|
pingInterval?: number;
|
|
660
761
|
sessionId?: string;
|
|
661
762
|
};
|
|
662
763
|
export type VoiceCaptureOptions = {
|
|
663
764
|
channelCount?: 1 | 2;
|
|
765
|
+
onAudio?: (audio: Uint8Array | ArrayBuffer, sendAudio: (audio: Uint8Array | ArrayBuffer) => void) => void;
|
|
664
766
|
onLevel?: (level: number) => void;
|
|
665
767
|
sampleRateHz?: number;
|
|
666
768
|
};
|
|
@@ -674,6 +776,46 @@ export type VoiceBargeInOptions = {
|
|
|
674
776
|
enabled?: boolean;
|
|
675
777
|
interruptOnPartial?: boolean;
|
|
676
778
|
interruptThreshold?: number;
|
|
779
|
+
monitor?: VoiceBargeInMonitor;
|
|
780
|
+
};
|
|
781
|
+
export type VoiceBargeInTriggerReason = 'input-level' | 'manual-audio' | 'manual-interrupt' | 'partial-transcript';
|
|
782
|
+
export type VoiceBargeInMonitorEvent = {
|
|
783
|
+
at: number;
|
|
784
|
+
id: string;
|
|
785
|
+
latencyMs?: number;
|
|
786
|
+
playbackStopLatencyMs?: number;
|
|
787
|
+
reason: VoiceBargeInTriggerReason;
|
|
788
|
+
sessionId?: string | null;
|
|
789
|
+
status: 'requested' | 'stopped' | 'skipped';
|
|
790
|
+
thresholdMs?: number;
|
|
791
|
+
};
|
|
792
|
+
export type VoiceBargeInMonitorSnapshot = {
|
|
793
|
+
averageLatencyMs?: number;
|
|
794
|
+
events: VoiceBargeInMonitorEvent[];
|
|
795
|
+
failed: number;
|
|
796
|
+
lastEvent?: VoiceBargeInMonitorEvent;
|
|
797
|
+
passed: number;
|
|
798
|
+
status: 'empty' | 'fail' | 'pass' | 'warn';
|
|
799
|
+
thresholdMs: number;
|
|
800
|
+
total: number;
|
|
801
|
+
};
|
|
802
|
+
export type VoiceBargeInMonitor = {
|
|
803
|
+
getSnapshot: () => VoiceBargeInMonitorSnapshot;
|
|
804
|
+
recordRequested: (input: {
|
|
805
|
+
reason: VoiceBargeInTriggerReason;
|
|
806
|
+
sessionId?: string | null;
|
|
807
|
+
}) => VoiceBargeInMonitorEvent;
|
|
808
|
+
recordSkipped: (input: {
|
|
809
|
+
reason: VoiceBargeInTriggerReason;
|
|
810
|
+
sessionId?: string | null;
|
|
811
|
+
}) => VoiceBargeInMonitorEvent;
|
|
812
|
+
recordStopped: (input: {
|
|
813
|
+
latencyMs?: number;
|
|
814
|
+
playbackStopLatencyMs?: number;
|
|
815
|
+
reason: VoiceBargeInTriggerReason;
|
|
816
|
+
sessionId?: string | null;
|
|
817
|
+
}) => VoiceBargeInMonitorEvent;
|
|
818
|
+
subscribe: (subscriber: () => void) => () => void;
|
|
677
819
|
};
|
|
678
820
|
export type VoiceAudioPlayerOptions = {
|
|
679
821
|
autoStart?: boolean;
|
|
@@ -728,9 +870,11 @@ export type VoiceHTMXOptions<TSession extends VoiceSessionRecord = VoiceSessionR
|
|
|
728
870
|
};
|
|
729
871
|
export type VoiceHTMXConfig<TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoiceHTMXRenderer<TSession, TResult> | VoiceHTMXOptions<TSession, TResult>;
|
|
730
872
|
export type VoiceStreamState<TResult = unknown> = {
|
|
873
|
+
call: VoiceCallLifecycleState | null;
|
|
731
874
|
sessionId: string | null;
|
|
732
875
|
scenarioId: string | null;
|
|
733
876
|
status: VoiceSessionStatus | 'idle';
|
|
877
|
+
reconnect: VoiceReconnectClientState;
|
|
734
878
|
partial: string;
|
|
735
879
|
turns: VoiceTurnRecord<TResult>[];
|
|
736
880
|
assistantTexts: string[];
|
|
@@ -744,6 +888,8 @@ export type VoiceStreamState<TResult = unknown> = {
|
|
|
744
888
|
isConnected: boolean;
|
|
745
889
|
};
|
|
746
890
|
export type VoiceStream<TResult = unknown> = {
|
|
891
|
+
call: VoiceCallLifecycleState | null;
|
|
892
|
+
callControl: (message: Omit<VoiceClientCallControlMessage, 'type'>) => void;
|
|
747
893
|
close: () => void;
|
|
748
894
|
start: (input?: {
|
|
749
895
|
scenarioId?: string;
|
|
@@ -755,6 +901,7 @@ export type VoiceStream<TResult = unknown> = {
|
|
|
755
901
|
getSnapshot: () => VoiceStreamState<TResult>;
|
|
756
902
|
isConnected: boolean;
|
|
757
903
|
partial: string;
|
|
904
|
+
reconnect: VoiceReconnectClientState;
|
|
758
905
|
sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
|
|
759
906
|
sessionId: string | null;
|
|
760
907
|
scenarioId: string | null;
|
|
@@ -810,6 +957,8 @@ export type VoiceBargeInBinding = {
|
|
|
810
957
|
};
|
|
811
958
|
export type VoiceController<TResult = unknown> = {
|
|
812
959
|
bindHTMX: (options: VoiceHTMXBindingOptions) => () => void;
|
|
960
|
+
call: VoiceCallLifecycleState | null;
|
|
961
|
+
callControl: (message: Omit<VoiceClientCallControlMessage, 'type'>) => void;
|
|
813
962
|
close: () => void;
|
|
814
963
|
endTurn: () => void;
|
|
815
964
|
start: (input?: {
|
|
@@ -822,6 +971,7 @@ export type VoiceController<TResult = unknown> = {
|
|
|
822
971
|
isConnected: boolean;
|
|
823
972
|
isRecording: boolean;
|
|
824
973
|
partial: string;
|
|
974
|
+
reconnect: VoiceReconnectClientState;
|
|
825
975
|
recordingError: string | null;
|
|
826
976
|
sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
|
|
827
977
|
sessionId: string | null;
|
|
@@ -855,6 +1005,19 @@ export type VoiceStoreAction<TResult = unknown> = {
|
|
|
855
1005
|
sessionId: string;
|
|
856
1006
|
scenarioId?: string;
|
|
857
1007
|
status: VoiceSessionStatus;
|
|
1008
|
+
} | {
|
|
1009
|
+
type: 'replay';
|
|
1010
|
+
assistantTexts: string[];
|
|
1011
|
+
call?: VoiceCallLifecycleState;
|
|
1012
|
+
partial: string;
|
|
1013
|
+
scenarioId?: string;
|
|
1014
|
+
sessionId: string;
|
|
1015
|
+
status: VoiceSessionStatus;
|
|
1016
|
+
turns: VoiceTurnRecord<TResult>[];
|
|
1017
|
+
} | {
|
|
1018
|
+
type: 'call_lifecycle';
|
|
1019
|
+
event: VoiceCallLifecycleEvent;
|
|
1020
|
+
sessionId: string;
|
|
858
1021
|
} | {
|
|
859
1022
|
type: 'partial';
|
|
860
1023
|
transcript: Transcript;
|
|
@@ -881,6 +1044,9 @@ export type VoiceStoreAction<TResult = unknown> = {
|
|
|
881
1044
|
message: string;
|
|
882
1045
|
} | {
|
|
883
1046
|
type: 'connected';
|
|
1047
|
+
} | {
|
|
1048
|
+
type: 'connection';
|
|
1049
|
+
reconnect: VoiceReconnectClientState;
|
|
884
1050
|
} | {
|
|
885
1051
|
type: 'disconnected';
|
|
886
1052
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const VoiceDeliveryRuntime: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
description: StringConstructor;
|
|
3
|
+
includeActions: {
|
|
4
|
+
default: boolean;
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
};
|
|
7
|
+
intervalMs: NumberConstructor;
|
|
8
|
+
path: {
|
|
9
|
+
default: string;
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
title: StringConstructor;
|
|
13
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
description: StringConstructor;
|
|
17
|
+
includeActions: {
|
|
18
|
+
default: boolean;
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
};
|
|
21
|
+
intervalMs: NumberConstructor;
|
|
22
|
+
path: {
|
|
23
|
+
default: string;
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
};
|
|
26
|
+
title: StringConstructor;
|
|
27
|
+
}>> & Readonly<{}>, {
|
|
28
|
+
path: string;
|
|
29
|
+
includeActions: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import type { VoiceOpsActionDescriptor } from '../client/opsActionCenter';
|
|
3
|
+
export declare const VoiceOpsActionCenter: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
actions: PropType<VoiceOpsActionDescriptor[]>;
|
|
5
|
+
description: StringConstructor;
|
|
6
|
+
title: StringConstructor;
|
|
7
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
actions: PropType<VoiceOpsActionDescriptor[]>;
|
|
11
|
+
description: StringConstructor;
|
|
12
|
+
title: StringConstructor;
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const VoiceOpsStatus: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
description: StringConstructor;
|
|
3
|
+
includeLinks: {
|
|
4
|
+
default: boolean;
|
|
5
|
+
type: BooleanConstructor;
|
|
6
|
+
};
|
|
7
|
+
intervalMs: NumberConstructor;
|
|
8
|
+
path: {
|
|
9
|
+
default: string;
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
title: StringConstructor;
|
|
13
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
description: StringConstructor;
|
|
17
|
+
includeLinks: {
|
|
18
|
+
default: boolean;
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
};
|
|
21
|
+
intervalMs: NumberConstructor;
|
|
22
|
+
path: {
|
|
23
|
+
default: string;
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
};
|
|
26
|
+
title: StringConstructor;
|
|
27
|
+
}>> & Readonly<{}>, {
|
|
28
|
+
path: string;
|
|
29
|
+
includeLinks: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const VoiceProviderCapabilities: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
class: {
|
|
3
|
+
default: string;
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
description: {
|
|
7
|
+
default: undefined;
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
10
|
+
intervalMs: {
|
|
11
|
+
default: number;
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
};
|
|
14
|
+
path: {
|
|
15
|
+
default: string;
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
title: {
|
|
19
|
+
default: undefined;
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
class: {
|
|
26
|
+
default: string;
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
29
|
+
description: {
|
|
30
|
+
default: undefined;
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
};
|
|
33
|
+
intervalMs: {
|
|
34
|
+
default: number;
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
};
|
|
37
|
+
path: {
|
|
38
|
+
default: string;
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
title: {
|
|
42
|
+
default: undefined;
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
}>> & Readonly<{}>, {
|
|
46
|
+
description: string;
|
|
47
|
+
title: string;
|
|
48
|
+
path: string;
|
|
49
|
+
intervalMs: number;
|
|
50
|
+
class: string;
|
|
51
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import type { VoiceProviderSimulationProvider } from '../client/providerSimulationControls';
|
|
3
|
+
export declare const VoiceProviderSimulationControls: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
class: {
|
|
5
|
+
default: string;
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
};
|
|
8
|
+
fallbackRequiredMessage: {
|
|
9
|
+
default: undefined;
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
fallbackRequiredProvider: {
|
|
13
|
+
default: undefined;
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
failureMessage: {
|
|
17
|
+
default: undefined;
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
failureProviders: {
|
|
21
|
+
default: undefined;
|
|
22
|
+
type: PropType<readonly string[] | undefined>;
|
|
23
|
+
};
|
|
24
|
+
kind: {
|
|
25
|
+
default: string;
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
28
|
+
pathPrefix: {
|
|
29
|
+
default: undefined;
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
};
|
|
32
|
+
providers: {
|
|
33
|
+
required: true;
|
|
34
|
+
type: PropType<readonly VoiceProviderSimulationProvider[]>;
|
|
35
|
+
};
|
|
36
|
+
title: {
|
|
37
|
+
default: undefined;
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
40
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
class: {
|
|
44
|
+
default: string;
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
};
|
|
47
|
+
fallbackRequiredMessage: {
|
|
48
|
+
default: undefined;
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
};
|
|
51
|
+
fallbackRequiredProvider: {
|
|
52
|
+
default: undefined;
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
};
|
|
55
|
+
failureMessage: {
|
|
56
|
+
default: undefined;
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
};
|
|
59
|
+
failureProviders: {
|
|
60
|
+
default: undefined;
|
|
61
|
+
type: PropType<readonly string[] | undefined>;
|
|
62
|
+
};
|
|
63
|
+
kind: {
|
|
64
|
+
default: string;
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
};
|
|
67
|
+
pathPrefix: {
|
|
68
|
+
default: undefined;
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
};
|
|
71
|
+
providers: {
|
|
72
|
+
required: true;
|
|
73
|
+
type: PropType<readonly VoiceProviderSimulationProvider[]>;
|
|
74
|
+
};
|
|
75
|
+
title: {
|
|
76
|
+
default: undefined;
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
};
|
|
79
|
+
}>> & Readonly<{}>, {
|
|
80
|
+
kind: string;
|
|
81
|
+
title: string;
|
|
82
|
+
fallbackRequiredProvider: string;
|
|
83
|
+
fallbackRequiredMessage: string;
|
|
84
|
+
failureProviders: readonly string[] | undefined;
|
|
85
|
+
failureMessage: string;
|
|
86
|
+
pathPrefix: string;
|
|
87
|
+
class: string;
|
|
88
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const VoiceProviderStatus: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
class: {
|
|
3
|
+
default: string;
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
description: {
|
|
7
|
+
default: undefined;
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
10
|
+
intervalMs: {
|
|
11
|
+
default: number;
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
};
|
|
14
|
+
path: {
|
|
15
|
+
default: string;
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
title: {
|
|
19
|
+
default: undefined;
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
class: {
|
|
26
|
+
default: string;
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
29
|
+
description: {
|
|
30
|
+
default: undefined;
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
};
|
|
33
|
+
intervalMs: {
|
|
34
|
+
default: number;
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
};
|
|
37
|
+
path: {
|
|
38
|
+
default: string;
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
title: {
|
|
42
|
+
default: undefined;
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
}>> & Readonly<{}>, {
|
|
46
|
+
description: string;
|
|
47
|
+
title: string;
|
|
48
|
+
path: string;
|
|
49
|
+
intervalMs: number;
|
|
50
|
+
class: string;
|
|
51
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const VoiceRoutingStatus: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
class: {
|
|
3
|
+
default: string;
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
description: {
|
|
7
|
+
default: undefined;
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
10
|
+
intervalMs: {
|
|
11
|
+
default: number;
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
};
|
|
14
|
+
path: {
|
|
15
|
+
default: string;
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
title: {
|
|
19
|
+
default: undefined;
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
class: {
|
|
26
|
+
default: string;
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
29
|
+
description: {
|
|
30
|
+
default: undefined;
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
};
|
|
33
|
+
intervalMs: {
|
|
34
|
+
default: number;
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
};
|
|
37
|
+
path: {
|
|
38
|
+
default: string;
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
title: {
|
|
42
|
+
default: undefined;
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
}>> & Readonly<{}>, {
|
|
46
|
+
description: string;
|
|
47
|
+
title: string;
|
|
48
|
+
path: string;
|
|
49
|
+
intervalMs: number;
|
|
50
|
+
class: string;
|
|
51
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|