@absolutejs/voice 0.0.22-beta.13 → 0.0.22-beta.131
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 +781 -5
- package/dist/agent.d.ts +24 -0
- package/dist/agentSquadContract.d.ts +64 -0
- package/dist/angular/index.d.ts +9 -0
- package/dist/angular/index.js +1394 -46
- 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-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-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 +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 +133 -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/duplex.d.ts +1 -1
- package/dist/client/htmxBootstrap.js +697 -15
- package/dist/client/index.d.ts +40 -0
- package/dist/client/index.js +2138 -10
- package/dist/client/liveTurnLatency.d.ts +41 -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/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/dataControl.d.ts +47 -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 +104 -9
- package/dist/index.js +17310 -4708
- package/dist/liveLatency.d.ts +78 -0
- package/dist/modelAdapters.d.ts +26 -2
- package/dist/openaiRealtime.d.ts +27 -0
- package/dist/openaiTTS.d.ts +18 -0
- package/dist/opsConsoleRoutes.d.ts +77 -0
- package/dist/opsStatus.d.ts +65 -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 +227 -0
- package/dist/providerAdapters.d.ts +48 -0
- package/dist/providerCapabilities.d.ts +92 -0
- package/dist/providerHealth.d.ts +79 -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/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 +18 -0
- package/dist/react/index.js +2726 -14
- package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
- package/dist/react/useVoiceController.d.ts +3 -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/useVoiceProviderStatus.d.ts +8 -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/reconnectContract.d.ts +83 -0
- package/dist/resilienceRoutes.d.ts +142 -0
- package/dist/sessionReplay.d.ts +175 -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/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 +2152 -202
- 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 +2830 -37
- 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/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 +169 -4
- 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 +17 -0
- package/dist/vue/index.js +2636 -31
- package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
- package/dist/vue/useVoiceController.d.ts +2 -1
- 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 +9 -0
- 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,7 +746,11 @@ 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;
|
|
@@ -661,6 +761,7 @@ export type VoiceConnectionOptions = {
|
|
|
661
761
|
};
|
|
662
762
|
export type VoiceCaptureOptions = {
|
|
663
763
|
channelCount?: 1 | 2;
|
|
764
|
+
onAudio?: (audio: Uint8Array | ArrayBuffer, sendAudio: (audio: Uint8Array | ArrayBuffer) => void) => void;
|
|
664
765
|
onLevel?: (level: number) => void;
|
|
665
766
|
sampleRateHz?: number;
|
|
666
767
|
};
|
|
@@ -674,6 +775,46 @@ export type VoiceBargeInOptions = {
|
|
|
674
775
|
enabled?: boolean;
|
|
675
776
|
interruptOnPartial?: boolean;
|
|
676
777
|
interruptThreshold?: number;
|
|
778
|
+
monitor?: VoiceBargeInMonitor;
|
|
779
|
+
};
|
|
780
|
+
export type VoiceBargeInTriggerReason = 'input-level' | 'manual-audio' | 'manual-interrupt' | 'partial-transcript';
|
|
781
|
+
export type VoiceBargeInMonitorEvent = {
|
|
782
|
+
at: number;
|
|
783
|
+
id: string;
|
|
784
|
+
latencyMs?: number;
|
|
785
|
+
playbackStopLatencyMs?: number;
|
|
786
|
+
reason: VoiceBargeInTriggerReason;
|
|
787
|
+
sessionId?: string | null;
|
|
788
|
+
status: 'requested' | 'stopped' | 'skipped';
|
|
789
|
+
thresholdMs?: number;
|
|
790
|
+
};
|
|
791
|
+
export type VoiceBargeInMonitorSnapshot = {
|
|
792
|
+
averageLatencyMs?: number;
|
|
793
|
+
events: VoiceBargeInMonitorEvent[];
|
|
794
|
+
failed: number;
|
|
795
|
+
lastEvent?: VoiceBargeInMonitorEvent;
|
|
796
|
+
passed: number;
|
|
797
|
+
status: 'empty' | 'fail' | 'pass' | 'warn';
|
|
798
|
+
thresholdMs: number;
|
|
799
|
+
total: number;
|
|
800
|
+
};
|
|
801
|
+
export type VoiceBargeInMonitor = {
|
|
802
|
+
getSnapshot: () => VoiceBargeInMonitorSnapshot;
|
|
803
|
+
recordRequested: (input: {
|
|
804
|
+
reason: VoiceBargeInTriggerReason;
|
|
805
|
+
sessionId?: string | null;
|
|
806
|
+
}) => VoiceBargeInMonitorEvent;
|
|
807
|
+
recordSkipped: (input: {
|
|
808
|
+
reason: VoiceBargeInTriggerReason;
|
|
809
|
+
sessionId?: string | null;
|
|
810
|
+
}) => VoiceBargeInMonitorEvent;
|
|
811
|
+
recordStopped: (input: {
|
|
812
|
+
latencyMs?: number;
|
|
813
|
+
playbackStopLatencyMs?: number;
|
|
814
|
+
reason: VoiceBargeInTriggerReason;
|
|
815
|
+
sessionId?: string | null;
|
|
816
|
+
}) => VoiceBargeInMonitorEvent;
|
|
817
|
+
subscribe: (subscriber: () => void) => () => void;
|
|
677
818
|
};
|
|
678
819
|
export type VoiceAudioPlayerOptions = {
|
|
679
820
|
autoStart?: boolean;
|
|
@@ -728,9 +869,11 @@ export type VoiceHTMXOptions<TSession extends VoiceSessionRecord = VoiceSessionR
|
|
|
728
869
|
};
|
|
729
870
|
export type VoiceHTMXConfig<TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoiceHTMXRenderer<TSession, TResult> | VoiceHTMXOptions<TSession, TResult>;
|
|
730
871
|
export type VoiceStreamState<TResult = unknown> = {
|
|
872
|
+
call: VoiceCallLifecycleState | null;
|
|
731
873
|
sessionId: string | null;
|
|
732
874
|
scenarioId: string | null;
|
|
733
875
|
status: VoiceSessionStatus | 'idle';
|
|
876
|
+
reconnect: VoiceReconnectClientState;
|
|
734
877
|
partial: string;
|
|
735
878
|
turns: VoiceTurnRecord<TResult>[];
|
|
736
879
|
assistantTexts: string[];
|
|
@@ -744,6 +887,8 @@ export type VoiceStreamState<TResult = unknown> = {
|
|
|
744
887
|
isConnected: boolean;
|
|
745
888
|
};
|
|
746
889
|
export type VoiceStream<TResult = unknown> = {
|
|
890
|
+
call: VoiceCallLifecycleState | null;
|
|
891
|
+
callControl: (message: Omit<VoiceClientCallControlMessage, 'type'>) => void;
|
|
747
892
|
close: () => void;
|
|
748
893
|
start: (input?: {
|
|
749
894
|
scenarioId?: string;
|
|
@@ -755,6 +900,7 @@ export type VoiceStream<TResult = unknown> = {
|
|
|
755
900
|
getSnapshot: () => VoiceStreamState<TResult>;
|
|
756
901
|
isConnected: boolean;
|
|
757
902
|
partial: string;
|
|
903
|
+
reconnect: VoiceReconnectClientState;
|
|
758
904
|
sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
|
|
759
905
|
sessionId: string | null;
|
|
760
906
|
scenarioId: string | null;
|
|
@@ -810,6 +956,8 @@ export type VoiceBargeInBinding = {
|
|
|
810
956
|
};
|
|
811
957
|
export type VoiceController<TResult = unknown> = {
|
|
812
958
|
bindHTMX: (options: VoiceHTMXBindingOptions) => () => void;
|
|
959
|
+
call: VoiceCallLifecycleState | null;
|
|
960
|
+
callControl: (message: Omit<VoiceClientCallControlMessage, 'type'>) => void;
|
|
813
961
|
close: () => void;
|
|
814
962
|
endTurn: () => void;
|
|
815
963
|
start: (input?: {
|
|
@@ -822,6 +970,7 @@ export type VoiceController<TResult = unknown> = {
|
|
|
822
970
|
isConnected: boolean;
|
|
823
971
|
isRecording: boolean;
|
|
824
972
|
partial: string;
|
|
973
|
+
reconnect: VoiceReconnectClientState;
|
|
825
974
|
recordingError: string | null;
|
|
826
975
|
sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
|
|
827
976
|
sessionId: string | null;
|
|
@@ -855,6 +1004,19 @@ export type VoiceStoreAction<TResult = unknown> = {
|
|
|
855
1004
|
sessionId: string;
|
|
856
1005
|
scenarioId?: string;
|
|
857
1006
|
status: VoiceSessionStatus;
|
|
1007
|
+
} | {
|
|
1008
|
+
type: 'replay';
|
|
1009
|
+
assistantTexts: string[];
|
|
1010
|
+
call?: VoiceCallLifecycleState;
|
|
1011
|
+
partial: string;
|
|
1012
|
+
scenarioId?: string;
|
|
1013
|
+
sessionId: string;
|
|
1014
|
+
status: VoiceSessionStatus;
|
|
1015
|
+
turns: VoiceTurnRecord<TResult>[];
|
|
1016
|
+
} | {
|
|
1017
|
+
type: 'call_lifecycle';
|
|
1018
|
+
event: VoiceCallLifecycleEvent;
|
|
1019
|
+
sessionId: string;
|
|
858
1020
|
} | {
|
|
859
1021
|
type: 'partial';
|
|
860
1022
|
transcript: Transcript;
|
|
@@ -881,6 +1043,9 @@ export type VoiceStoreAction<TResult = unknown> = {
|
|
|
881
1043
|
message: string;
|
|
882
1044
|
} | {
|
|
883
1045
|
type: 'connected';
|
|
1046
|
+
} | {
|
|
1047
|
+
type: 'connection';
|
|
1048
|
+
reconnect: VoiceReconnectClientState;
|
|
884
1049
|
} | {
|
|
885
1050
|
type: 'disconnected';
|
|
886
1051
|
};
|
|
@@ -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>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare const VoiceTurnLatency: 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
|
+
proofLabel: {
|
|
19
|
+
default: undefined;
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
proofPath: {
|
|
23
|
+
default: undefined;
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
};
|
|
26
|
+
title: {
|
|
27
|
+
default: undefined;
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
class: {
|
|
34
|
+
default: string;
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
};
|
|
37
|
+
description: {
|
|
38
|
+
default: undefined;
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
intervalMs: {
|
|
42
|
+
default: number;
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
};
|
|
45
|
+
path: {
|
|
46
|
+
default: string;
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
};
|
|
49
|
+
proofLabel: {
|
|
50
|
+
default: undefined;
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
};
|
|
53
|
+
proofPath: {
|
|
54
|
+
default: undefined;
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
};
|
|
57
|
+
title: {
|
|
58
|
+
default: undefined;
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
};
|
|
61
|
+
}>> & Readonly<{}>, {
|
|
62
|
+
description: string;
|
|
63
|
+
title: string;
|
|
64
|
+
path: string;
|
|
65
|
+
intervalMs: number;
|
|
66
|
+
proofPath: string;
|
|
67
|
+
proofLabel: string;
|
|
68
|
+
class: string;
|
|
69
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|