@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.
Files changed (51) hide show
  1. package/dist/approval-ui.d.cts +13 -0
  2. package/dist/approval-ui.d.ts +13 -0
  3. package/dist/artifacts-ui.d.cts +13 -0
  4. package/dist/artifacts-ui.d.ts +13 -0
  5. package/dist/chunk-AALCT54S.js +1 -0
  6. package/dist/{client-history-HTRKHBAF.js → client-history-LV3KHEFA.js} +1 -1
  7. package/dist/client-history.js +1 -1
  8. package/dist/codegen.cjs +1 -1
  9. package/dist/codegen.js +1 -1
  10. package/dist/context-mentions.d.cts +13 -0
  11. package/dist/context-mentions.d.ts +13 -0
  12. package/dist/event-stream-view.d.cts +13 -0
  13. package/dist/event-stream-view.d.ts +13 -0
  14. package/dist/forms-ui.d.cts +19 -0
  15. package/dist/forms-ui.d.ts +19 -0
  16. package/dist/index.cjs +33 -33
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +27 -0
  19. package/dist/index.d.ts +27 -0
  20. package/dist/index.global.js +1 -1
  21. package/dist/index.global.js.map +1 -1
  22. package/dist/index.js +27 -27
  23. package/dist/index.js.map +1 -1
  24. package/dist/session-reconnect.d.cts +13 -0
  25. package/dist/session-reconnect.d.ts +13 -0
  26. package/dist/smart-dom-reader.d.cts +13 -0
  27. package/dist/smart-dom-reader.d.ts +13 -0
  28. package/dist/theme-editor-preview.cjs +63 -63
  29. package/dist/theme-editor-preview.d.cts +13 -0
  30. package/dist/theme-editor-preview.d.ts +13 -0
  31. package/dist/theme-editor-preview.js +5 -5
  32. package/dist/theme-editor.d.cts +13 -0
  33. package/dist/theme-editor.d.ts +13 -0
  34. package/dist/voice-runtime-LVUMPUDS.js +17 -0
  35. package/dist/voice-runtime.cjs +8 -8
  36. package/dist/voice-runtime.d.cts +24 -0
  37. package/dist/voice-runtime.d.ts +24 -0
  38. package/dist/voice-runtime.js +8 -8
  39. package/package.json +1 -1
  40. package/src/client.interrupt.test.ts +18 -0
  41. package/src/client.ts +7 -0
  42. package/src/session.ts +11 -3
  43. package/src/session.voice.test.ts +140 -0
  44. package/src/types.ts +19 -0
  45. package/src/voice/runtype-voice-provider.ts +93 -11
  46. package/src/voice/voice-clause-buffer.test.ts +143 -0
  47. package/src/voice/voice-clause-buffer.ts +187 -0
  48. package/src/voice/voice-delegation.ts +85 -3
  49. package/src/voice/voice.test.ts +257 -2
  50. package/dist/chunk-3255TNY7.js +0 -1
  51. package/dist/voice-runtime-RHRX4F3T.js +0 -17
@@ -7125,6 +7125,13 @@ type VoiceDelegationRequest = {
7125
7125
  role: string;
7126
7126
  content: unknown;
7127
7127
  }>;
7128
+ /**
7129
+ * Set when the server streams delegated answers (`delegation_stream`): called
7130
+ * with each speakable piece of the turn's answer, in order, while it renders.
7131
+ * The pieces, concatenated, are a prefix of the result's `text`; the result
7132
+ * says how much of it with `streamedChars`.
7133
+ */
7134
+ stream?: (text: string) => void;
7128
7135
  };
7129
7136
  /**
7130
7137
  * How a delegated turn ended, or that it waits on an approval (contract
@@ -7155,6 +7162,12 @@ type VoiceDelegationResult = {
7155
7162
  * @default true
7156
7163
  */
7157
7164
  inChat?: boolean;
7165
+ /**
7166
+ * How many leading characters of `text` already went out through
7167
+ * `request.stream` (the rest, such as an approval script, is unstreamed).
7168
+ * Omitted or 0: nothing was streamed.
7169
+ */
7170
+ streamedChars?: number;
7158
7171
  /**
7159
7172
  * Set when the turn parked on approvals (`text` then asks for the decision).
7160
7173
  * Resolves with the terminal result once the visitor decides (or the
@@ -7125,6 +7125,13 @@ type VoiceDelegationRequest = {
7125
7125
  role: string;
7126
7126
  content: unknown;
7127
7127
  }>;
7128
+ /**
7129
+ * Set when the server streams delegated answers (`delegation_stream`): called
7130
+ * with each speakable piece of the turn's answer, in order, while it renders.
7131
+ * The pieces, concatenated, are a prefix of the result's `text`; the result
7132
+ * says how much of it with `streamedChars`.
7133
+ */
7134
+ stream?: (text: string) => void;
7128
7135
  };
7129
7136
  /**
7130
7137
  * How a delegated turn ended, or that it waits on an approval (contract
@@ -7155,6 +7162,12 @@ type VoiceDelegationResult = {
7155
7162
  * @default true
7156
7163
  */
7157
7164
  inChat?: boolean;
7165
+ /**
7166
+ * How many leading characters of `text` already went out through
7167
+ * `request.stream` (the rest, such as an approval script, is unstreamed).
7168
+ * Omitted or 0: nothing was streamed.
7169
+ */
7170
+ streamedChars?: number;
7158
7171
  /**
7159
7172
  * Set when the turn parked on approvals (`text` then asks for the decision).
7160
7173
  * Resolves with the terminal result once the visitor decides (or the
@@ -7394,6 +7394,13 @@ type VoiceDelegationRequest = {
7394
7394
  role: string;
7395
7395
  content: unknown;
7396
7396
  }>;
7397
+ /**
7398
+ * Set when the server streams delegated answers (`delegation_stream`): called
7399
+ * with each speakable piece of the turn's answer, in order, while it renders.
7400
+ * The pieces, concatenated, are a prefix of the result's `text`; the result
7401
+ * says how much of it with `streamedChars`.
7402
+ */
7403
+ stream?: (text: string) => void;
7397
7404
  };
7398
7405
  /**
7399
7406
  * How a delegated turn ended, or that it waits on an approval (contract
@@ -7424,6 +7431,12 @@ type VoiceDelegationResult = {
7424
7431
  * @default true
7425
7432
  */
7426
7433
  inChat?: boolean;
7434
+ /**
7435
+ * How many leading characters of `text` already went out through
7436
+ * `request.stream` (the rest, such as an approval script, is unstreamed).
7437
+ * Omitted or 0: nothing was streamed.
7438
+ */
7439
+ streamedChars?: number;
7427
7440
  /**
7428
7441
  * Set when the turn parked on approvals (`text` then asks for the decision).
7429
7442
  * Resolves with the terminal result once the visitor decides (or the
@@ -7394,6 +7394,13 @@ type VoiceDelegationRequest = {
7394
7394
  role: string;
7395
7395
  content: unknown;
7396
7396
  }>;
7397
+ /**
7398
+ * Set when the server streams delegated answers (`delegation_stream`): called
7399
+ * with each speakable piece of the turn's answer, in order, while it renders.
7400
+ * The pieces, concatenated, are a prefix of the result's `text`; the result
7401
+ * says how much of it with `streamedChars`.
7402
+ */
7403
+ stream?: (text: string) => void;
7397
7404
  };
7398
7405
  /**
7399
7406
  * How a delegated turn ended, or that it waits on an approval (contract
@@ -7424,6 +7431,12 @@ type VoiceDelegationResult = {
7424
7431
  * @default true
7425
7432
  */
7426
7433
  inChat?: boolean;
7434
+ /**
7435
+ * How many leading characters of `text` already went out through
7436
+ * `request.stream` (the rest, such as an approval script, is unstreamed).
7437
+ * Omitted or 0: nothing was streamed.
7438
+ */
7439
+ streamedChars?: number;
7427
7440
  /**
7428
7441
  * Set when the turn parked on approvals (`text` then asks for the decision).
7429
7442
  * Resolves with the terminal result once the visitor decides (or the