@runtypelabs/persona 3.35.0 → 3.37.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/codegen.cjs +1 -1
- package/dist/codegen.js +1 -1
- package/dist/index.cjs +46 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.global.js +33 -33
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +47 -47
- package/dist/index.js.map +1 -1
- package/dist/install.global.js +1 -1
- package/dist/install.global.js.map +1 -1
- package/dist/smart-dom-reader.d.cts +10 -0
- package/dist/smart-dom-reader.d.ts +10 -0
- package/dist/theme-editor-preview.cjs +48 -48
- package/dist/theme-editor-preview.d.cts +10 -0
- package/dist/theme-editor-preview.d.ts +10 -0
- package/dist/theme-editor-preview.js +49 -49
- package/dist/theme-editor.d.cts +10 -0
- package/dist/theme-editor.d.ts +10 -0
- package/package.json +1 -1
- package/src/client.test.ts +142 -0
- package/src/client.ts +63 -8
- package/src/generated/runtype-openapi-contract.ts +1 -0
- package/src/install.ts +4 -0
- package/src/types.ts +10 -0
- package/src/utils/__fixtures__/unified-translator.oracle.ts +669 -0
- package/src/utils/unified-event-bridge.test.ts +263 -0
- package/src/utils/unified-event-bridge.ts +431 -0
package/dist/index.d.cts
CHANGED
|
@@ -1946,6 +1946,7 @@ type RuntypeClientChatRequest = {
|
|
|
1946
1946
|
type: "object";
|
|
1947
1947
|
[key: string]: unknown;
|
|
1948
1948
|
};
|
|
1949
|
+
untrustedContentHint?: boolean;
|
|
1949
1950
|
}>;
|
|
1950
1951
|
clientToolsFingerprint?: string;
|
|
1951
1952
|
inputs?: Record<string, unknown>;
|
|
@@ -5833,6 +5834,16 @@ type AgentWidgetConfig = {
|
|
|
5833
5834
|
* ```
|
|
5834
5835
|
*/
|
|
5835
5836
|
parseSSEEvent?: AgentWidgetSSEEventParser;
|
|
5837
|
+
/**
|
|
5838
|
+
* Wire vocabulary requested from the dispatch endpoint.
|
|
5839
|
+
* - `'legacy'` (default): the current `agent_*` / `flow_*` SSE events.
|
|
5840
|
+
* - `'unified'`: opt into the API's neutral unified event vocabulary by sending
|
|
5841
|
+
* `?events=unified`; incoming frames are transparently bridged back to the same
|
|
5842
|
+
* handlers, so rendering is unchanged. Requires an upstream that honors the
|
|
5843
|
+
* param — the widget detects the actual wire mode from the first stream frame
|
|
5844
|
+
* and falls back to legacy automatically if the param was ignored.
|
|
5845
|
+
*/
|
|
5846
|
+
events?: "legacy" | "unified";
|
|
5836
5847
|
/**
|
|
5837
5848
|
* Called for every parsed SSE frame (after JSON parse), before native handling.
|
|
5838
5849
|
* Use for lightweight side effects (e.g. telemetry). Does not replace native
|
|
@@ -6461,6 +6472,13 @@ declare class AgentWidgetClient {
|
|
|
6461
6472
|
* Check if operating in agent execution mode
|
|
6462
6473
|
*/
|
|
6463
6474
|
isAgentMode(): boolean;
|
|
6475
|
+
/**
|
|
6476
|
+
* Append `?events=unified` when the widget opted into the unified vocabulary,
|
|
6477
|
+
* preserving any existing query string. No-op for the default legacy mode.
|
|
6478
|
+
* The server only switches vocabularies when it sees the param; the widget
|
|
6479
|
+
* still auto-detects the actual wire mode from the first stream frame.
|
|
6480
|
+
*/
|
|
6481
|
+
private withEventsParam;
|
|
6464
6482
|
/**
|
|
6465
6483
|
* Get the appropriate API URL based on mode
|
|
6466
6484
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1946,6 +1946,7 @@ type RuntypeClientChatRequest = {
|
|
|
1946
1946
|
type: "object";
|
|
1947
1947
|
[key: string]: unknown;
|
|
1948
1948
|
};
|
|
1949
|
+
untrustedContentHint?: boolean;
|
|
1949
1950
|
}>;
|
|
1950
1951
|
clientToolsFingerprint?: string;
|
|
1951
1952
|
inputs?: Record<string, unknown>;
|
|
@@ -5833,6 +5834,16 @@ type AgentWidgetConfig = {
|
|
|
5833
5834
|
* ```
|
|
5834
5835
|
*/
|
|
5835
5836
|
parseSSEEvent?: AgentWidgetSSEEventParser;
|
|
5837
|
+
/**
|
|
5838
|
+
* Wire vocabulary requested from the dispatch endpoint.
|
|
5839
|
+
* - `'legacy'` (default): the current `agent_*` / `flow_*` SSE events.
|
|
5840
|
+
* - `'unified'`: opt into the API's neutral unified event vocabulary by sending
|
|
5841
|
+
* `?events=unified`; incoming frames are transparently bridged back to the same
|
|
5842
|
+
* handlers, so rendering is unchanged. Requires an upstream that honors the
|
|
5843
|
+
* param — the widget detects the actual wire mode from the first stream frame
|
|
5844
|
+
* and falls back to legacy automatically if the param was ignored.
|
|
5845
|
+
*/
|
|
5846
|
+
events?: "legacy" | "unified";
|
|
5836
5847
|
/**
|
|
5837
5848
|
* Called for every parsed SSE frame (after JSON parse), before native handling.
|
|
5838
5849
|
* Use for lightweight side effects (e.g. telemetry). Does not replace native
|
|
@@ -6461,6 +6472,13 @@ declare class AgentWidgetClient {
|
|
|
6461
6472
|
* Check if operating in agent execution mode
|
|
6462
6473
|
*/
|
|
6463
6474
|
isAgentMode(): boolean;
|
|
6475
|
+
/**
|
|
6476
|
+
* Append `?events=unified` when the widget opted into the unified vocabulary,
|
|
6477
|
+
* preserving any existing query string. No-op for the default legacy mode.
|
|
6478
|
+
* The server only switches vocabularies when it sees the param; the widget
|
|
6479
|
+
* still auto-detects the actual wire mode from the first stream frame.
|
|
6480
|
+
*/
|
|
6481
|
+
private withEventsParam;
|
|
6464
6482
|
/**
|
|
6465
6483
|
* Get the appropriate API URL based on mode
|
|
6466
6484
|
*/
|