@runtypelabs/persona 4.24.0 → 4.25.0
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/dist/approval-ui.d.cts +63 -0
- package/dist/approval-ui.d.ts +63 -0
- package/dist/artifacts-ui.d.cts +63 -0
- package/dist/artifacts-ui.d.ts +63 -0
- package/dist/codegen.cjs +1 -1
- package/dist/codegen.js +1 -1
- package/dist/context-mentions.d.cts +63 -0
- package/dist/context-mentions.d.ts +63 -0
- package/dist/event-stream-view.d.cts +63 -0
- package/dist/event-stream-view.d.ts +63 -0
- package/dist/forms-ui.d.cts +74 -0
- package/dist/forms-ui.d.ts +74 -0
- package/dist/index.cjs +42 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -1
- package/dist/index.d.ts +75 -1
- package/dist/index.global.js +27 -27
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +42 -42
- package/dist/index.js.map +1 -1
- package/dist/session-reconnect.d.cts +63 -0
- package/dist/session-reconnect.d.ts +63 -0
- package/dist/smart-dom-reader.d.cts +63 -0
- package/dist/smart-dom-reader.d.ts +63 -0
- package/dist/theme-editor-preview.cjs +49 -49
- package/dist/theme-editor-preview.d.cts +63 -0
- package/dist/theme-editor-preview.d.ts +63 -0
- package/dist/theme-editor-preview.js +27 -27
- package/dist/theme-editor.d.cts +63 -0
- package/dist/theme-editor.d.ts +63 -0
- package/dist/voice-runtime-7DA7MJH4.js +1 -0
- package/dist/voice-runtime.cjs +1 -1
- package/dist/voice-runtime.d.cts +33 -0
- package/dist/voice-runtime.d.ts +33 -0
- package/dist/voice-runtime.js +1 -1
- package/package.json +1 -1
- package/src/index-core.ts +2 -0
- package/src/session.ts +30 -1
- package/src/session.voice.test.ts +72 -1
- package/src/types.ts +71 -0
- package/src/ui.ts +59 -0
- package/src/ui.voice-prewarm.test.ts +222 -0
- package/src/voice/runtype-voice-provider.ts +238 -27
- package/src/voice/voice.test.ts +272 -2
- package/dist/voice-runtime-EFR3R5ES.js +0 -1
|
@@ -6577,6 +6577,22 @@ type AgentWidgetStatusIndicatorConfig = {
|
|
|
6577
6577
|
/** Status text while a reconnect attempt is in flight. */
|
|
6578
6578
|
resumingText?: string;
|
|
6579
6579
|
};
|
|
6580
|
+
/** Built-in `voiceRecognition.prewarm` triggers. See {@link AgentWidgetVoiceRecognitionConfig.prewarm}. */
|
|
6581
|
+
type AgentWidgetVoicePrewarmTrigger = 'hover';
|
|
6582
|
+
/**
|
|
6583
|
+
* Custom `voiceRecognition.prewarm` trigger. Runs while the composer has a mic
|
|
6584
|
+
* button, and again when the button is rebuilt or `update()` swaps in a
|
|
6585
|
+
* different function. Call `warm()` whenever the visitor shows intent to talk
|
|
6586
|
+
* (it is safe to call repeatedly). Return a cleanup to run on replacement.
|
|
6587
|
+
*/
|
|
6588
|
+
type AgentWidgetVoicePrewarmHook = (context: {
|
|
6589
|
+
/** Fire-and-forget voice warm-up; latched and error-swallowing. */
|
|
6590
|
+
warm: () => void;
|
|
6591
|
+
/** The composer's current mic button. */
|
|
6592
|
+
micButton: HTMLButtonElement;
|
|
6593
|
+
/** The widget's mount element. */
|
|
6594
|
+
mount: HTMLElement;
|
|
6595
|
+
}) => void | (() => void);
|
|
6580
6596
|
type AgentWidgetVoiceRecognitionConfig = {
|
|
6581
6597
|
/**
|
|
6582
6598
|
* Enable the mic button and voice input. The mic still only renders when the
|
|
@@ -6642,6 +6658,29 @@ type AgentWidgetVoiceRecognitionConfig = {
|
|
|
6642
6658
|
* Fires once per turn after the reply completes.
|
|
6643
6659
|
*/
|
|
6644
6660
|
onMetrics?: (metrics: VoiceMetrics) => void;
|
|
6661
|
+
/**
|
|
6662
|
+
* Warm the voice path when the visitor shows intent to talk, before the mic
|
|
6663
|
+
* click, so the call starts faster.
|
|
6664
|
+
*
|
|
6665
|
+
* - `'hover'`: when the pointer enters the mic button, it receives focus, or
|
|
6666
|
+
* (on touch) the first pointer-down on it.
|
|
6667
|
+
* - `false`: never.
|
|
6668
|
+
* - A function: custom trigger. Called with `{ warm, micButton, mount }`
|
|
6669
|
+
* while the mic button exists (and again when the button is rebuilt or
|
|
6670
|
+
* `update()` swaps in a different function); call `warm()` whenever you
|
|
6671
|
+
* decide, e.g. when the panel opens. May return a cleanup that runs on
|
|
6672
|
+
* destroy, rebuild, or replacement. Replaces the built-in trigger.
|
|
6673
|
+
*
|
|
6674
|
+
* What `warm()` does depends on the provider: `runtype` fires its prewarm
|
|
6675
|
+
* (see `provider.runtype.prewarmMode`), a `custom` provider's optional
|
|
6676
|
+
* {@link VoiceProvider.prewarm} runs, and the browser (Web Speech) path
|
|
6677
|
+
* starts the client-token session init (as `sessionInit` does), since speech
|
|
6678
|
+
* recognition itself cannot start before the click. Warming is
|
|
6679
|
+
* fire-and-forget, latched, and never surfaces an error or UI state.
|
|
6680
|
+
*
|
|
6681
|
+
* @default 'hover' in client token mode, otherwise `false`
|
|
6682
|
+
*/
|
|
6683
|
+
prewarm?: AgentWidgetVoicePrewarmTrigger | AgentWidgetVoicePrewarmHook | false;
|
|
6645
6684
|
provider?: {
|
|
6646
6685
|
type: 'browser' | 'runtype' | 'custom';
|
|
6647
6686
|
browser?: {
|
|
@@ -6663,6 +6702,23 @@ type AgentWidgetVoiceRecognitionConfig = {
|
|
|
6663
6702
|
* `@runtypelabs/persona/voice-worklet-player` for a jitter-buffered engine.
|
|
6664
6703
|
*/
|
|
6665
6704
|
createPlaybackEngine?: () => VoicePlaybackEngine | Promise<VoicePlaybackEngine>;
|
|
6705
|
+
/**
|
|
6706
|
+
* How `prewarm()` warms the voice path (see `voiceRecognition.prewarm`).
|
|
6707
|
+
*
|
|
6708
|
+
* - `'request'` (default): a fire-and-forget
|
|
6709
|
+
* `POST {host}/v1/client/agents/{agentId}/voice/prewarm`.
|
|
6710
|
+
* - `'attach'`: open the voice WebSocket ahead of the click without
|
|
6711
|
+
* starting a call; the click then starts the call on that socket. It can
|
|
6712
|
+
* create server work before the visitor clicks, so it is opt-in.
|
|
6713
|
+
* @default 'request'
|
|
6714
|
+
*/
|
|
6715
|
+
prewarmMode?: 'request' | 'attach';
|
|
6716
|
+
/**
|
|
6717
|
+
* `'attach'` mode: how long (ms) an attached socket waits for the click
|
|
6718
|
+
* before it closes. The server clamps it to 30000..600000.
|
|
6719
|
+
* @default 30000
|
|
6720
|
+
*/
|
|
6721
|
+
attachIdleMs?: number;
|
|
6666
6722
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
6667
6723
|
pauseDuration?: number;
|
|
6668
6724
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
@@ -6963,6 +7019,13 @@ interface VoiceProvider {
|
|
|
6963
7019
|
deactivateBargeIn?(): Promise<void>;
|
|
6964
7020
|
/** Stop playback / cancel in-flight request without starting recording */
|
|
6965
7021
|
stopPlayback?(): void;
|
|
7022
|
+
/**
|
|
7023
|
+
* Warm the provider ahead of `startListening()` (the widget calls it on mic
|
|
7024
|
+
* intent, see `voiceRecognition.prewarm`). Must be fire-and-forget: never
|
|
7025
|
+
* throw, emit errors or status, or acquire the microphone. May be called
|
|
7026
|
+
* repeatedly; throttle as needed.
|
|
7027
|
+
*/
|
|
7028
|
+
prewarm?(): void;
|
|
6966
7029
|
}
|
|
6967
7030
|
/**
|
|
6968
7031
|
* Extra context for an approval decision, surfaced to `onDecision` and to the
|
package/dist/forms-ui.d.cts
CHANGED
|
@@ -6689,6 +6689,22 @@ type AgentWidgetStatusIndicatorConfig = {
|
|
|
6689
6689
|
/** Status text while a reconnect attempt is in flight. */
|
|
6690
6690
|
resumingText?: string;
|
|
6691
6691
|
};
|
|
6692
|
+
/** Built-in `voiceRecognition.prewarm` triggers. See {@link AgentWidgetVoiceRecognitionConfig.prewarm}. */
|
|
6693
|
+
type AgentWidgetVoicePrewarmTrigger = 'hover';
|
|
6694
|
+
/**
|
|
6695
|
+
* Custom `voiceRecognition.prewarm` trigger. Runs while the composer has a mic
|
|
6696
|
+
* button, and again when the button is rebuilt or `update()` swaps in a
|
|
6697
|
+
* different function. Call `warm()` whenever the visitor shows intent to talk
|
|
6698
|
+
* (it is safe to call repeatedly). Return a cleanup to run on replacement.
|
|
6699
|
+
*/
|
|
6700
|
+
type AgentWidgetVoicePrewarmHook = (context: {
|
|
6701
|
+
/** Fire-and-forget voice warm-up; latched and error-swallowing. */
|
|
6702
|
+
warm: () => void;
|
|
6703
|
+
/** The composer's current mic button. */
|
|
6704
|
+
micButton: HTMLButtonElement;
|
|
6705
|
+
/** The widget's mount element. */
|
|
6706
|
+
mount: HTMLElement;
|
|
6707
|
+
}) => void | (() => void);
|
|
6692
6708
|
type AgentWidgetVoiceRecognitionConfig = {
|
|
6693
6709
|
/**
|
|
6694
6710
|
* Enable the mic button and voice input. The mic still only renders when the
|
|
@@ -6754,6 +6770,29 @@ type AgentWidgetVoiceRecognitionConfig = {
|
|
|
6754
6770
|
* Fires once per turn after the reply completes.
|
|
6755
6771
|
*/
|
|
6756
6772
|
onMetrics?: (metrics: VoiceMetrics) => void;
|
|
6773
|
+
/**
|
|
6774
|
+
* Warm the voice path when the visitor shows intent to talk, before the mic
|
|
6775
|
+
* click, so the call starts faster.
|
|
6776
|
+
*
|
|
6777
|
+
* - `'hover'`: when the pointer enters the mic button, it receives focus, or
|
|
6778
|
+
* (on touch) the first pointer-down on it.
|
|
6779
|
+
* - `false`: never.
|
|
6780
|
+
* - A function: custom trigger. Called with `{ warm, micButton, mount }`
|
|
6781
|
+
* while the mic button exists (and again when the button is rebuilt or
|
|
6782
|
+
* `update()` swaps in a different function); call `warm()` whenever you
|
|
6783
|
+
* decide, e.g. when the panel opens. May return a cleanup that runs on
|
|
6784
|
+
* destroy, rebuild, or replacement. Replaces the built-in trigger.
|
|
6785
|
+
*
|
|
6786
|
+
* What `warm()` does depends on the provider: `runtype` fires its prewarm
|
|
6787
|
+
* (see `provider.runtype.prewarmMode`), a `custom` provider's optional
|
|
6788
|
+
* {@link VoiceProvider.prewarm} runs, and the browser (Web Speech) path
|
|
6789
|
+
* starts the client-token session init (as `sessionInit` does), since speech
|
|
6790
|
+
* recognition itself cannot start before the click. Warming is
|
|
6791
|
+
* fire-and-forget, latched, and never surfaces an error or UI state.
|
|
6792
|
+
*
|
|
6793
|
+
* @default 'hover' in client token mode, otherwise `false`
|
|
6794
|
+
*/
|
|
6795
|
+
prewarm?: AgentWidgetVoicePrewarmTrigger | AgentWidgetVoicePrewarmHook | false;
|
|
6757
6796
|
provider?: {
|
|
6758
6797
|
type: 'browser' | 'runtype' | 'custom';
|
|
6759
6798
|
browser?: {
|
|
@@ -6775,6 +6814,23 @@ type AgentWidgetVoiceRecognitionConfig = {
|
|
|
6775
6814
|
* `@runtypelabs/persona/voice-worklet-player` for a jitter-buffered engine.
|
|
6776
6815
|
*/
|
|
6777
6816
|
createPlaybackEngine?: () => VoicePlaybackEngine | Promise<VoicePlaybackEngine>;
|
|
6817
|
+
/**
|
|
6818
|
+
* How `prewarm()` warms the voice path (see `voiceRecognition.prewarm`).
|
|
6819
|
+
*
|
|
6820
|
+
* - `'request'` (default): a fire-and-forget
|
|
6821
|
+
* `POST {host}/v1/client/agents/{agentId}/voice/prewarm`.
|
|
6822
|
+
* - `'attach'`: open the voice WebSocket ahead of the click without
|
|
6823
|
+
* starting a call; the click then starts the call on that socket. It can
|
|
6824
|
+
* create server work before the visitor clicks, so it is opt-in.
|
|
6825
|
+
* @default 'request'
|
|
6826
|
+
*/
|
|
6827
|
+
prewarmMode?: 'request' | 'attach';
|
|
6828
|
+
/**
|
|
6829
|
+
* `'attach'` mode: how long (ms) an attached socket waits for the click
|
|
6830
|
+
* before it closes. The server clamps it to 30000..600000.
|
|
6831
|
+
* @default 30000
|
|
6832
|
+
*/
|
|
6833
|
+
attachIdleMs?: number;
|
|
6778
6834
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
6779
6835
|
pauseDuration?: number;
|
|
6780
6836
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
@@ -7060,6 +7116,10 @@ type VoiceConfig = {
|
|
|
7060
7116
|
* `@runtypelabs/persona/voice-worklet-player` for a jitter-buffered engine.
|
|
7061
7117
|
*/
|
|
7062
7118
|
createPlaybackEngine?: () => VoicePlaybackEngine | Promise<VoicePlaybackEngine>;
|
|
7119
|
+
/** See `voiceRecognition.provider.runtype.prewarmMode`. @default 'request' */
|
|
7120
|
+
prewarmMode?: 'request' | 'attach';
|
|
7121
|
+
/** See `voiceRecognition.provider.runtype.attachIdleMs`. @default 30000 */
|
|
7122
|
+
attachIdleMs?: number;
|
|
7063
7123
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
7064
7124
|
pauseDuration?: number;
|
|
7065
7125
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
@@ -7120,6 +7180,13 @@ interface VoiceProvider {
|
|
|
7120
7180
|
deactivateBargeIn?(): Promise<void>;
|
|
7121
7181
|
/** Stop playback / cancel in-flight request without starting recording */
|
|
7122
7182
|
stopPlayback?(): void;
|
|
7183
|
+
/**
|
|
7184
|
+
* Warm the provider ahead of `startListening()` (the widget calls it on mic
|
|
7185
|
+
* intent, see `voiceRecognition.prewarm`). Must be fire-and-forget: never
|
|
7186
|
+
* throw, emit errors or status, or acquire the microphone. May be called
|
|
7187
|
+
* repeatedly; throttle as needed.
|
|
7188
|
+
*/
|
|
7189
|
+
prewarm?(): void;
|
|
7123
7190
|
}
|
|
7124
7191
|
/**
|
|
7125
7192
|
* Extra context for an approval decision, surfaced to `onDecision` and to the
|
|
@@ -10991,6 +11058,13 @@ declare class AgentWidgetSession {
|
|
|
10991
11058
|
* Toggle voice recognition on/off
|
|
10992
11059
|
*/
|
|
10993
11060
|
toggleVoice(): Promise<void>;
|
|
11061
|
+
/**
|
|
11062
|
+
* Warm the voice path ahead of the mic click (`voiceRecognition.prewarm`).
|
|
11063
|
+
* Session-owned providers (`runtype`, `custom`) get `provider.prewarm()` once
|
|
11064
|
+
* the lazy voice runtime has installed them; the browser (Web Speech) path
|
|
11065
|
+
* warms the client-token session instead. Fire-and-forget and silent.
|
|
11066
|
+
*/
|
|
11067
|
+
prewarmVoice(): void;
|
|
10994
11068
|
/**
|
|
10995
11069
|
* Cleanup voice resources
|
|
10996
11070
|
*/
|
package/dist/forms-ui.d.ts
CHANGED
|
@@ -6689,6 +6689,22 @@ type AgentWidgetStatusIndicatorConfig = {
|
|
|
6689
6689
|
/** Status text while a reconnect attempt is in flight. */
|
|
6690
6690
|
resumingText?: string;
|
|
6691
6691
|
};
|
|
6692
|
+
/** Built-in `voiceRecognition.prewarm` triggers. See {@link AgentWidgetVoiceRecognitionConfig.prewarm}. */
|
|
6693
|
+
type AgentWidgetVoicePrewarmTrigger = 'hover';
|
|
6694
|
+
/**
|
|
6695
|
+
* Custom `voiceRecognition.prewarm` trigger. Runs while the composer has a mic
|
|
6696
|
+
* button, and again when the button is rebuilt or `update()` swaps in a
|
|
6697
|
+
* different function. Call `warm()` whenever the visitor shows intent to talk
|
|
6698
|
+
* (it is safe to call repeatedly). Return a cleanup to run on replacement.
|
|
6699
|
+
*/
|
|
6700
|
+
type AgentWidgetVoicePrewarmHook = (context: {
|
|
6701
|
+
/** Fire-and-forget voice warm-up; latched and error-swallowing. */
|
|
6702
|
+
warm: () => void;
|
|
6703
|
+
/** The composer's current mic button. */
|
|
6704
|
+
micButton: HTMLButtonElement;
|
|
6705
|
+
/** The widget's mount element. */
|
|
6706
|
+
mount: HTMLElement;
|
|
6707
|
+
}) => void | (() => void);
|
|
6692
6708
|
type AgentWidgetVoiceRecognitionConfig = {
|
|
6693
6709
|
/**
|
|
6694
6710
|
* Enable the mic button and voice input. The mic still only renders when the
|
|
@@ -6754,6 +6770,29 @@ type AgentWidgetVoiceRecognitionConfig = {
|
|
|
6754
6770
|
* Fires once per turn after the reply completes.
|
|
6755
6771
|
*/
|
|
6756
6772
|
onMetrics?: (metrics: VoiceMetrics) => void;
|
|
6773
|
+
/**
|
|
6774
|
+
* Warm the voice path when the visitor shows intent to talk, before the mic
|
|
6775
|
+
* click, so the call starts faster.
|
|
6776
|
+
*
|
|
6777
|
+
* - `'hover'`: when the pointer enters the mic button, it receives focus, or
|
|
6778
|
+
* (on touch) the first pointer-down on it.
|
|
6779
|
+
* - `false`: never.
|
|
6780
|
+
* - A function: custom trigger. Called with `{ warm, micButton, mount }`
|
|
6781
|
+
* while the mic button exists (and again when the button is rebuilt or
|
|
6782
|
+
* `update()` swaps in a different function); call `warm()` whenever you
|
|
6783
|
+
* decide, e.g. when the panel opens. May return a cleanup that runs on
|
|
6784
|
+
* destroy, rebuild, or replacement. Replaces the built-in trigger.
|
|
6785
|
+
*
|
|
6786
|
+
* What `warm()` does depends on the provider: `runtype` fires its prewarm
|
|
6787
|
+
* (see `provider.runtype.prewarmMode`), a `custom` provider's optional
|
|
6788
|
+
* {@link VoiceProvider.prewarm} runs, and the browser (Web Speech) path
|
|
6789
|
+
* starts the client-token session init (as `sessionInit` does), since speech
|
|
6790
|
+
* recognition itself cannot start before the click. Warming is
|
|
6791
|
+
* fire-and-forget, latched, and never surfaces an error or UI state.
|
|
6792
|
+
*
|
|
6793
|
+
* @default 'hover' in client token mode, otherwise `false`
|
|
6794
|
+
*/
|
|
6795
|
+
prewarm?: AgentWidgetVoicePrewarmTrigger | AgentWidgetVoicePrewarmHook | false;
|
|
6757
6796
|
provider?: {
|
|
6758
6797
|
type: 'browser' | 'runtype' | 'custom';
|
|
6759
6798
|
browser?: {
|
|
@@ -6775,6 +6814,23 @@ type AgentWidgetVoiceRecognitionConfig = {
|
|
|
6775
6814
|
* `@runtypelabs/persona/voice-worklet-player` for a jitter-buffered engine.
|
|
6776
6815
|
*/
|
|
6777
6816
|
createPlaybackEngine?: () => VoicePlaybackEngine | Promise<VoicePlaybackEngine>;
|
|
6817
|
+
/**
|
|
6818
|
+
* How `prewarm()` warms the voice path (see `voiceRecognition.prewarm`).
|
|
6819
|
+
*
|
|
6820
|
+
* - `'request'` (default): a fire-and-forget
|
|
6821
|
+
* `POST {host}/v1/client/agents/{agentId}/voice/prewarm`.
|
|
6822
|
+
* - `'attach'`: open the voice WebSocket ahead of the click without
|
|
6823
|
+
* starting a call; the click then starts the call on that socket. It can
|
|
6824
|
+
* create server work before the visitor clicks, so it is opt-in.
|
|
6825
|
+
* @default 'request'
|
|
6826
|
+
*/
|
|
6827
|
+
prewarmMode?: 'request' | 'attach';
|
|
6828
|
+
/**
|
|
6829
|
+
* `'attach'` mode: how long (ms) an attached socket waits for the click
|
|
6830
|
+
* before it closes. The server clamps it to 30000..600000.
|
|
6831
|
+
* @default 30000
|
|
6832
|
+
*/
|
|
6833
|
+
attachIdleMs?: number;
|
|
6778
6834
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
6779
6835
|
pauseDuration?: number;
|
|
6780
6836
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
@@ -7060,6 +7116,10 @@ type VoiceConfig = {
|
|
|
7060
7116
|
* `@runtypelabs/persona/voice-worklet-player` for a jitter-buffered engine.
|
|
7061
7117
|
*/
|
|
7062
7118
|
createPlaybackEngine?: () => VoicePlaybackEngine | Promise<VoicePlaybackEngine>;
|
|
7119
|
+
/** See `voiceRecognition.provider.runtype.prewarmMode`. @default 'request' */
|
|
7120
|
+
prewarmMode?: 'request' | 'attach';
|
|
7121
|
+
/** See `voiceRecognition.provider.runtype.attachIdleMs`. @default 30000 */
|
|
7122
|
+
attachIdleMs?: number;
|
|
7063
7123
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
7064
7124
|
pauseDuration?: number;
|
|
7065
7125
|
/** @deprecated No-op on the realtime path: the server's STT owns turn-taking. */
|
|
@@ -7120,6 +7180,13 @@ interface VoiceProvider {
|
|
|
7120
7180
|
deactivateBargeIn?(): Promise<void>;
|
|
7121
7181
|
/** Stop playback / cancel in-flight request without starting recording */
|
|
7122
7182
|
stopPlayback?(): void;
|
|
7183
|
+
/**
|
|
7184
|
+
* Warm the provider ahead of `startListening()` (the widget calls it on mic
|
|
7185
|
+
* intent, see `voiceRecognition.prewarm`). Must be fire-and-forget: never
|
|
7186
|
+
* throw, emit errors or status, or acquire the microphone. May be called
|
|
7187
|
+
* repeatedly; throttle as needed.
|
|
7188
|
+
*/
|
|
7189
|
+
prewarm?(): void;
|
|
7123
7190
|
}
|
|
7124
7191
|
/**
|
|
7125
7192
|
* Extra context for an approval decision, surfaced to `onDecision` and to the
|
|
@@ -10991,6 +11058,13 @@ declare class AgentWidgetSession {
|
|
|
10991
11058
|
* Toggle voice recognition on/off
|
|
10992
11059
|
*/
|
|
10993
11060
|
toggleVoice(): Promise<void>;
|
|
11061
|
+
/**
|
|
11062
|
+
* Warm the voice path ahead of the mic click (`voiceRecognition.prewarm`).
|
|
11063
|
+
* Session-owned providers (`runtype`, `custom`) get `provider.prewarm()` once
|
|
11064
|
+
* the lazy voice runtime has installed them; the browser (Web Speech) path
|
|
11065
|
+
* warms the client-token session instead. Fire-and-forget and silent.
|
|
11066
|
+
*/
|
|
11067
|
+
prewarmVoice(): void;
|
|
10994
11068
|
/**
|
|
10995
11069
|
* Cleanup voice resources
|
|
10996
11070
|
*/
|