@runtypelabs/persona 4.27.0 → 4.28.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 +13 -0
- package/dist/approval-ui.d.ts +13 -0
- package/dist/artifacts-ui.d.cts +13 -0
- package/dist/artifacts-ui.d.ts +13 -0
- package/dist/chunk-AALCT54S.js +1 -0
- package/dist/{client-history-HTRKHBAF.js → client-history-LV3KHEFA.js} +1 -1
- package/dist/client-history.js +1 -1
- package/dist/codegen.cjs +1 -1
- package/dist/codegen.js +1 -1
- package/dist/context-mentions.d.cts +13 -0
- package/dist/context-mentions.d.ts +13 -0
- package/dist/event-stream-view.d.cts +13 -0
- package/dist/event-stream-view.d.ts +13 -0
- package/dist/forms-ui.d.cts +19 -0
- package/dist/forms-ui.d.ts +19 -0
- package/dist/index.cjs +33 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +27 -27
- package/dist/index.js.map +1 -1
- package/dist/session-reconnect.d.cts +13 -0
- package/dist/session-reconnect.d.ts +13 -0
- package/dist/smart-dom-reader.d.cts +13 -0
- package/dist/smart-dom-reader.d.ts +13 -0
- package/dist/theme-editor-preview.cjs +63 -63
- package/dist/theme-editor-preview.d.cts +13 -0
- package/dist/theme-editor-preview.d.ts +13 -0
- package/dist/theme-editor-preview.js +5 -5
- package/dist/theme-editor.d.cts +13 -0
- package/dist/theme-editor.d.ts +13 -0
- package/dist/voice-runtime-LVUMPUDS.js +17 -0
- package/dist/voice-runtime.cjs +8 -8
- package/dist/voice-runtime.d.cts +24 -0
- package/dist/voice-runtime.d.ts +24 -0
- package/dist/voice-runtime.js +8 -8
- package/package.json +1 -1
- package/src/client.interrupt.test.ts +18 -0
- package/src/client.ts +7 -0
- package/src/session.ts +11 -3
- package/src/session.voice.test.ts +140 -0
- package/src/types.ts +19 -0
- package/src/voice/runtype-voice-provider.ts +93 -11
- package/src/voice/voice-clause-buffer.test.ts +143 -0
- package/src/voice/voice-clause-buffer.ts +187 -0
- package/src/voice/voice-delegation.ts +85 -3
- package/src/voice/voice.test.ts +257 -2
- package/dist/chunk-3255TNY7.js +0 -1
- package/dist/voice-runtime-RHRX4F3T.js +0 -17
package/dist/index.d.cts
CHANGED
|
@@ -7616,6 +7616,13 @@ type VoiceDelegationRequest = {
|
|
|
7616
7616
|
role: string;
|
|
7617
7617
|
content: unknown;
|
|
7618
7618
|
}>;
|
|
7619
|
+
/**
|
|
7620
|
+
* Set when the server streams delegated answers (`delegation_stream`): called
|
|
7621
|
+
* with each speakable piece of the turn's answer, in order, while it renders.
|
|
7622
|
+
* The pieces, concatenated, are a prefix of the result's `text`; the result
|
|
7623
|
+
* says how much of it with `streamedChars`.
|
|
7624
|
+
*/
|
|
7625
|
+
stream?: (text: string) => void;
|
|
7619
7626
|
};
|
|
7620
7627
|
/**
|
|
7621
7628
|
* How a delegated turn ended, or that it waits on an approval (contract
|
|
@@ -7646,6 +7653,12 @@ type VoiceDelegationResult = {
|
|
|
7646
7653
|
* @default true
|
|
7647
7654
|
*/
|
|
7648
7655
|
inChat?: boolean;
|
|
7656
|
+
/**
|
|
7657
|
+
* How many leading characters of `text` already went out through
|
|
7658
|
+
* `request.stream` (the rest, such as an approval script, is unstreamed).
|
|
7659
|
+
* Omitted or 0: nothing was streamed.
|
|
7660
|
+
*/
|
|
7661
|
+
streamedChars?: number;
|
|
7649
7662
|
/**
|
|
7650
7663
|
* Set when the turn parked on approvals (`text` then asks for the decision).
|
|
7651
7664
|
* Resolves with the terminal result once the visitor decides (or the
|
|
@@ -8558,6 +8571,14 @@ type ClientChatRequest = {
|
|
|
8558
8571
|
turnId?: RuntypeClientChatRequest['turnId'];
|
|
8559
8572
|
/** Whether this turn should interrupt a prior in-flight response (from Core public OpenAPI). */
|
|
8560
8573
|
submitMode?: RuntypeClientChatRequest['submitMode'];
|
|
8574
|
+
/**
|
|
8575
|
+
* Spoken-reply hint, set on a delegated voice turn whose reply a voice model
|
|
8576
|
+
* reads aloud: the server asks the agent for a speakable answer (the direct
|
|
8577
|
+
* answer first, in plain sentences). Not persisted into history.
|
|
8578
|
+
*/
|
|
8579
|
+
voice?: {
|
|
8580
|
+
spoken: true;
|
|
8581
|
+
};
|
|
8561
8582
|
};
|
|
8562
8583
|
/**
|
|
8563
8584
|
* Feedback types supported by the API
|
|
@@ -11022,6 +11043,12 @@ type DispatchOptions = {
|
|
|
11022
11043
|
* `submitMode: "interrupt"` so the server cancels the prior run.
|
|
11023
11044
|
*/
|
|
11024
11045
|
interrupt?: boolean;
|
|
11046
|
+
/**
|
|
11047
|
+
* Client-token only: a voice model reads the reply aloud (a delegated voice
|
|
11048
|
+
* turn). Sends `voice: { spoken: true }` so the server asks for a speakable
|
|
11049
|
+
* answer.
|
|
11050
|
+
*/
|
|
11051
|
+
voiceSpoken?: boolean;
|
|
11025
11052
|
};
|
|
11026
11053
|
type SSEHandler = (event: AgentWidgetEvent) => void;
|
|
11027
11054
|
type SSEEventCallback = (eventType: string, payload: unknown) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -7616,6 +7616,13 @@ type VoiceDelegationRequest = {
|
|
|
7616
7616
|
role: string;
|
|
7617
7617
|
content: unknown;
|
|
7618
7618
|
}>;
|
|
7619
|
+
/**
|
|
7620
|
+
* Set when the server streams delegated answers (`delegation_stream`): called
|
|
7621
|
+
* with each speakable piece of the turn's answer, in order, while it renders.
|
|
7622
|
+
* The pieces, concatenated, are a prefix of the result's `text`; the result
|
|
7623
|
+
* says how much of it with `streamedChars`.
|
|
7624
|
+
*/
|
|
7625
|
+
stream?: (text: string) => void;
|
|
7619
7626
|
};
|
|
7620
7627
|
/**
|
|
7621
7628
|
* How a delegated turn ended, or that it waits on an approval (contract
|
|
@@ -7646,6 +7653,12 @@ type VoiceDelegationResult = {
|
|
|
7646
7653
|
* @default true
|
|
7647
7654
|
*/
|
|
7648
7655
|
inChat?: boolean;
|
|
7656
|
+
/**
|
|
7657
|
+
* How many leading characters of `text` already went out through
|
|
7658
|
+
* `request.stream` (the rest, such as an approval script, is unstreamed).
|
|
7659
|
+
* Omitted or 0: nothing was streamed.
|
|
7660
|
+
*/
|
|
7661
|
+
streamedChars?: number;
|
|
7649
7662
|
/**
|
|
7650
7663
|
* Set when the turn parked on approvals (`text` then asks for the decision).
|
|
7651
7664
|
* Resolves with the terminal result once the visitor decides (or the
|
|
@@ -8558,6 +8571,14 @@ type ClientChatRequest = {
|
|
|
8558
8571
|
turnId?: RuntypeClientChatRequest['turnId'];
|
|
8559
8572
|
/** Whether this turn should interrupt a prior in-flight response (from Core public OpenAPI). */
|
|
8560
8573
|
submitMode?: RuntypeClientChatRequest['submitMode'];
|
|
8574
|
+
/**
|
|
8575
|
+
* Spoken-reply hint, set on a delegated voice turn whose reply a voice model
|
|
8576
|
+
* reads aloud: the server asks the agent for a speakable answer (the direct
|
|
8577
|
+
* answer first, in plain sentences). Not persisted into history.
|
|
8578
|
+
*/
|
|
8579
|
+
voice?: {
|
|
8580
|
+
spoken: true;
|
|
8581
|
+
};
|
|
8561
8582
|
};
|
|
8562
8583
|
/**
|
|
8563
8584
|
* Feedback types supported by the API
|
|
@@ -11022,6 +11043,12 @@ type DispatchOptions = {
|
|
|
11022
11043
|
* `submitMode: "interrupt"` so the server cancels the prior run.
|
|
11023
11044
|
*/
|
|
11024
11045
|
interrupt?: boolean;
|
|
11046
|
+
/**
|
|
11047
|
+
* Client-token only: a voice model reads the reply aloud (a delegated voice
|
|
11048
|
+
* turn). Sends `voice: { spoken: true }` so the server asks for a speakable
|
|
11049
|
+
* answer.
|
|
11050
|
+
*/
|
|
11051
|
+
voiceSpoken?: boolean;
|
|
11025
11052
|
};
|
|
11026
11053
|
type SSEHandler = (event: AgentWidgetEvent) => void;
|
|
11027
11054
|
type SSEEventCallback = (eventType: string, payload: unknown) => void;
|