@runtypelabs/persona 4.26.1 → 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 +18 -0
- package/dist/approval-ui.d.ts +18 -0
- package/dist/artifacts-ui.d.cts +18 -0
- package/dist/artifacts-ui.d.ts +18 -0
- package/dist/chunk-AALCT54S.js +1 -0
- package/dist/{client-history-GOZWBDA5.js → client-history-LV3KHEFA.js} +1 -1
- package/dist/client-history.js +1 -1
- package/dist/client-stream-N22JHTLE.js +4 -0
- package/dist/client-stream.js +3 -3
- package/dist/codegen.cjs +1 -1
- package/dist/codegen.js +1 -1
- package/dist/context-mentions.d.cts +18 -0
- package/dist/context-mentions.d.ts +18 -0
- package/dist/event-stream-view.d.cts +18 -0
- package/dist/event-stream-view.d.ts +18 -0
- package/dist/forms-ui.d.cts +26 -0
- package/dist/forms-ui.d.ts +26 -0
- package/dist/index.cjs +57 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +58 -58
- package/dist/index.js.map +1 -1
- package/dist/session-reconnect.d.cts +18 -0
- package/dist/session-reconnect.d.ts +18 -0
- package/dist/smart-dom-reader.d.cts +18 -0
- package/dist/smart-dom-reader.d.ts +18 -0
- package/dist/theme-editor-preview.cjs +66 -66
- package/dist/theme-editor-preview.d.cts +18 -0
- package/dist/theme-editor-preview.d.ts +18 -0
- package/dist/theme-editor-preview.js +31 -31
- package/dist/theme-editor.d.cts +18 -0
- package/dist/theme-editor.d.ts +18 -0
- package/dist/voice-runtime-LVUMPUDS.js +17 -0
- package/dist/voice-runtime.cjs +7 -7
- package/dist/voice-runtime.d.cts +33 -0
- package/dist/voice-runtime.d.ts +33 -0
- package/dist/voice-runtime.js +7 -7
- package/package.json +1 -1
- package/src/client-stream.ts +10 -3
- package/src/client.interrupt.test.ts +18 -0
- package/src/client.test.ts +20 -0
- package/src/client.ts +7 -0
- package/src/session.ts +16 -3
- package/src/session.voice.test.ts +199 -3
- package/src/types.ts +24 -0
- package/src/ui.composer-defer-one.test.ts +17 -0
- package/src/ui.ts +49 -12
- package/src/voice/__fixtures__/voice-wire/server/session_end-provider-error.json +6 -0
- package/src/voice/__fixtures__/voice-wire/server/session_end-unknown-reason.json +4 -0
- package/src/voice/__fixtures__/voice-wire/server/session_end.json +5 -0
- package/src/voice/runtype-voice-provider.ts +205 -21
- 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 +111 -13
- package/src/voice/voice.test.ts +433 -2
- package/dist/chunk-GKPCIQPB.js +0 -1
- package/dist/client-stream-42FOI3EC.js +0 -4
- package/dist/voice-runtime-XLU6YK2N.js +0 -17
|
@@ -7241,6 +7241,11 @@ interface VoiceProvider {
|
|
|
7241
7241
|
setSessionBridge?(bridge: VoiceSessionBridge): void;
|
|
7242
7242
|
/** The AI-disclosure notice for the live call, if one should show (speech-to-speech). */
|
|
7243
7243
|
getDisclosure?(): string | null;
|
|
7244
|
+
/**
|
|
7245
|
+
* Status-line text for the call, returned once: why the server ended it
|
|
7246
|
+
* (`session_end`) or that it is reconnecting. `null` when there is none.
|
|
7247
|
+
*/
|
|
7248
|
+
takeNotice?(): string | null;
|
|
7244
7249
|
}
|
|
7245
7250
|
/** Metadata on a {@link VoiceProvider.onTranscript} update. */
|
|
7246
7251
|
type VoiceTranscriptMetadata = {
|
|
@@ -7272,6 +7277,13 @@ type VoiceDelegationRequest = {
|
|
|
7272
7277
|
role: string;
|
|
7273
7278
|
content: unknown;
|
|
7274
7279
|
}>;
|
|
7280
|
+
/**
|
|
7281
|
+
* Set when the server streams delegated answers (`delegation_stream`): called
|
|
7282
|
+
* with each speakable piece of the turn's answer, in order, while it renders.
|
|
7283
|
+
* The pieces, concatenated, are a prefix of the result's `text`; the result
|
|
7284
|
+
* says how much of it with `streamedChars`.
|
|
7285
|
+
*/
|
|
7286
|
+
stream?: (text: string) => void;
|
|
7275
7287
|
};
|
|
7276
7288
|
/**
|
|
7277
7289
|
* How a delegated turn ended, or that it waits on an approval (contract
|
|
@@ -7302,6 +7314,12 @@ type VoiceDelegationResult = {
|
|
|
7302
7314
|
* @default true
|
|
7303
7315
|
*/
|
|
7304
7316
|
inChat?: boolean;
|
|
7317
|
+
/**
|
|
7318
|
+
* How many leading characters of `text` already went out through
|
|
7319
|
+
* `request.stream` (the rest, such as an approval script, is unstreamed).
|
|
7320
|
+
* Omitted or 0: nothing was streamed.
|
|
7321
|
+
*/
|
|
7322
|
+
streamedChars?: number;
|
|
7305
7323
|
/**
|
|
7306
7324
|
* Set when the turn parked on approvals (`text` then asks for the decision).
|
|
7307
7325
|
* Resolves with the terminal result once the visitor decides (or the
|
|
@@ -7241,6 +7241,11 @@ interface VoiceProvider {
|
|
|
7241
7241
|
setSessionBridge?(bridge: VoiceSessionBridge): void;
|
|
7242
7242
|
/** The AI-disclosure notice for the live call, if one should show (speech-to-speech). */
|
|
7243
7243
|
getDisclosure?(): string | null;
|
|
7244
|
+
/**
|
|
7245
|
+
* Status-line text for the call, returned once: why the server ended it
|
|
7246
|
+
* (`session_end`) or that it is reconnecting. `null` when there is none.
|
|
7247
|
+
*/
|
|
7248
|
+
takeNotice?(): string | null;
|
|
7244
7249
|
}
|
|
7245
7250
|
/** Metadata on a {@link VoiceProvider.onTranscript} update. */
|
|
7246
7251
|
type VoiceTranscriptMetadata = {
|
|
@@ -7272,6 +7277,13 @@ type VoiceDelegationRequest = {
|
|
|
7272
7277
|
role: string;
|
|
7273
7278
|
content: unknown;
|
|
7274
7279
|
}>;
|
|
7280
|
+
/**
|
|
7281
|
+
* Set when the server streams delegated answers (`delegation_stream`): called
|
|
7282
|
+
* with each speakable piece of the turn's answer, in order, while it renders.
|
|
7283
|
+
* The pieces, concatenated, are a prefix of the result's `text`; the result
|
|
7284
|
+
* says how much of it with `streamedChars`.
|
|
7285
|
+
*/
|
|
7286
|
+
stream?: (text: string) => void;
|
|
7275
7287
|
};
|
|
7276
7288
|
/**
|
|
7277
7289
|
* How a delegated turn ended, or that it waits on an approval (contract
|
|
@@ -7302,6 +7314,12 @@ type VoiceDelegationResult = {
|
|
|
7302
7314
|
* @default true
|
|
7303
7315
|
*/
|
|
7304
7316
|
inChat?: boolean;
|
|
7317
|
+
/**
|
|
7318
|
+
* How many leading characters of `text` already went out through
|
|
7319
|
+
* `request.stream` (the rest, such as an approval script, is unstreamed).
|
|
7320
|
+
* Omitted or 0: nothing was streamed.
|
|
7321
|
+
*/
|
|
7322
|
+
streamedChars?: number;
|
|
7305
7323
|
/**
|
|
7306
7324
|
* Set when the turn parked on approvals (`text` then asks for the decision).
|
|
7307
7325
|
* Resolves with the terminal result once the visitor decides (or the
|