@runtypelabs/persona 4.21.1 → 4.22.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-RNNBR5R3.js → approval-ui-K7R5Q5OC.js} +1 -1
- package/dist/approval-ui.cjs +2 -2
- package/dist/approval-ui.d.cts +73 -2
- package/dist/approval-ui.d.ts +73 -2
- package/dist/approval-ui.js +2 -2
- package/dist/artifacts-ui-F4N6VMKF.js +7 -0
- package/dist/artifacts-ui.cjs +1 -1
- package/dist/artifacts-ui.d.cts +73 -2
- package/dist/artifacts-ui.d.ts +73 -2
- package/dist/artifacts-ui.js +1 -1
- package/dist/chunk-NQLDCJAP.js +4 -0
- package/dist/codegen.cjs +1 -1
- package/dist/codegen.js +1 -1
- package/dist/context-mentions.d.cts +73 -2
- package/dist/context-mentions.d.ts +73 -2
- package/dist/event-stream-view-FKWDY3UB.js +1 -0
- package/dist/event-stream-view.cjs +1 -1
- package/dist/event-stream-view.d.cts +73 -2
- package/dist/event-stream-view.d.ts +73 -2
- package/dist/event-stream-view.js +1 -1
- package/dist/forms-ui.d.cts +73 -2
- package/dist/forms-ui.d.ts +73 -2
- package/dist/index.cjs +63 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +136 -5
- package/dist/index.d.ts +136 -5
- package/dist/index.global.js +48 -48
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +64 -64
- package/dist/index.js.map +1 -1
- package/dist/launcher.global.js +2 -2
- package/dist/launcher.global.js.map +1 -1
- package/dist/session-reconnect.d.cts +73 -2
- package/dist/session-reconnect.d.ts +73 -2
- package/dist/smart-dom-reader.d.cts +73 -2
- package/dist/smart-dom-reader.d.ts +73 -2
- package/dist/theme-editor-preview.cjs +64 -64
- package/dist/theme-editor-preview.d.cts +73 -2
- package/dist/theme-editor-preview.d.ts +73 -2
- package/dist/theme-editor-preview.js +45 -45
- package/dist/theme-editor.cjs +4 -4
- package/dist/theme-editor.d.cts +73 -2
- package/dist/theme-editor.d.ts +73 -2
- package/dist/theme-editor.js +2 -2
- package/dist/theme-reference.cjs +1 -1
- package/dist/theme-reference.d.cts +65 -1
- package/dist/theme-reference.d.ts +65 -1
- package/dist/theme-reference.js +1 -1
- package/dist/webmcp-polyfill.js +1 -4
- package/dist/webmcp-runtime-JI7T4QYF.js +6 -0
- package/dist/webmcp-runtime.cjs +2 -2
- package/dist/webmcp-runtime.d.cts +34 -2
- package/dist/webmcp-runtime.d.ts +34 -2
- package/dist/webmcp-runtime.js +2 -2
- package/package.json +2 -2
- package/src/components/artifact-preview.ts +5 -0
- package/src/components/event-stream-badge-theming.test.ts +159 -0
- package/src/components/event-stream-view.ts +50 -20
- package/src/generated/runtype-openapi-contract.ts +8 -0
- package/src/index-core.ts +2 -0
- package/src/runtime/init.registry.test.ts +56 -0
- package/src/runtime/init.ts +17 -0
- package/src/types/theme.ts +41 -1
- package/src/types.ts +38 -1
- package/src/ui.reasoning-display.test.ts +136 -2
- package/src/ui.ts +41 -10
- package/src/utils/__snapshots__/tokens-parity.test.ts.snap +1740 -0
- package/src/utils/formatting.ts +22 -0
- package/src/utils/theme.ts +16 -0
- package/src/utils/tokens.ts +59 -0
- package/src/webmcp-bridge.test.ts +132 -23
- package/src/webmcp-bridge.ts +26 -2
- package/src/webmcp-runtime-entry.ts +71 -11
- package/dist/artifacts-ui-J6AKUGTS.js +0 -7
- package/dist/chunk-HBE7LFNT.js +0 -4
- package/dist/event-stream-view-73NWKWVQ.js +0 -1
- package/dist/webmcp-runtime-P3CHZRHF.js +0 -6
package/dist/theme-editor.d.cts
CHANGED
|
@@ -25,7 +25,11 @@ interface ColorPalette {
|
|
|
25
25
|
warning: ColorShade;
|
|
26
26
|
error: ColorShade;
|
|
27
27
|
info: ColorShade;
|
|
28
|
-
|
|
28
|
+
/** Event-stream tool badge family. */
|
|
29
|
+
purple?: ColorShade;
|
|
30
|
+
/** Event-stream agent badge family. */
|
|
31
|
+
teal?: ColorShade;
|
|
32
|
+
[key: string]: ColorShade | undefined;
|
|
29
33
|
}
|
|
30
34
|
interface SpacingScale {
|
|
31
35
|
0: string;
|
|
@@ -597,6 +601,38 @@ interface ToolBubbleTokens {
|
|
|
597
601
|
interface ReasoningBubbleTokens {
|
|
598
602
|
shadow: string;
|
|
599
603
|
}
|
|
604
|
+
/** One event-stream badge chip: fill + text pair. The chip border derives
|
|
605
|
+
* from `foreground` at ~31% alpha. */
|
|
606
|
+
interface EventStreamBadgePairTokens {
|
|
607
|
+
background: TokenReference<'color'>;
|
|
608
|
+
foreground: TokenReference<'color'>;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Event-stream inspector badge chips (`features.eventStream`), one pair per
|
|
612
|
+
* unified event family. Materialized into every theme and emitted as
|
|
613
|
+
* `--persona-event-badge-<family>-{bg,fg}`, with scheme-appropriate defaults:
|
|
614
|
+
* light themes pair a 100-tone fill with a 700-tone text, the built-in dark
|
|
615
|
+
* layer flips to a 900-tone fill with a 300-tone text. `badge.default` colors
|
|
616
|
+
* event types no family matches.
|
|
617
|
+
*/
|
|
618
|
+
interface EventStreamTokens {
|
|
619
|
+
badge: {
|
|
620
|
+
/** `flow_*` events. */
|
|
621
|
+
flow: EventStreamBadgePairTokens;
|
|
622
|
+
/** `step_*` events. */
|
|
623
|
+
step: EventStreamBadgePairTokens;
|
|
624
|
+
/** `reasoning_*` events. */
|
|
625
|
+
reasoning: EventStreamBadgePairTokens;
|
|
626
|
+
/** `tool_*` events. */
|
|
627
|
+
tool: EventStreamBadgePairTokens;
|
|
628
|
+
/** `agent_*` events. */
|
|
629
|
+
agent: EventStreamBadgePairTokens;
|
|
630
|
+
/** `error` / `execution_error` events. */
|
|
631
|
+
error: EventStreamBadgePairTokens;
|
|
632
|
+
/** Any event type no other family matches. */
|
|
633
|
+
default: EventStreamBadgePairTokens;
|
|
634
|
+
};
|
|
635
|
+
}
|
|
600
636
|
/** Scrollbar appearance shared by every scroller in the widget. */
|
|
601
637
|
interface ScrollbarTokens {
|
|
602
638
|
/** Thumb color. @default semantic.colors.border */
|
|
@@ -945,6 +981,8 @@ interface ComponentTokens {
|
|
|
945
981
|
attachment: AttachmentTokens;
|
|
946
982
|
toolBubble: ToolBubbleTokens;
|
|
947
983
|
reasoningBubble: ReasoningBubbleTokens;
|
|
984
|
+
/** Event-stream inspector badge chips. */
|
|
985
|
+
eventStream?: EventStreamTokens;
|
|
948
986
|
composer: ComposerChromeTokens;
|
|
949
987
|
/** Shared motion timing for composer chrome animation. */
|
|
950
988
|
motion?: MotionTokens;
|
|
@@ -2919,6 +2957,14 @@ type ClientToolDefinition = {
|
|
|
2919
2957
|
readOnlyHint?: boolean;
|
|
2920
2958
|
untrustedContentHint?: boolean;
|
|
2921
2959
|
};
|
|
2960
|
+
/**
|
|
2961
|
+
* Hoisted copy of `annotations.untrustedContentHint`. This is the field the
|
|
2962
|
+
* server actually acts on (`InlineClientToolSchema`): it spotlights the
|
|
2963
|
+
* tool's output before the model reads it, so instructions embedded in
|
|
2964
|
+
* page-provided content (reviews, comments, emails) are not treated as
|
|
2965
|
+
* instructions. `annotations` itself is trace/dashboard metadata only.
|
|
2966
|
+
*/
|
|
2967
|
+
untrustedContentHint?: boolean;
|
|
2922
2968
|
};
|
|
2923
2969
|
/**
|
|
2924
2970
|
* Information passed to the confirm-bubble handler before a `webmcp:*` tool
|
|
@@ -4110,6 +4156,16 @@ type AgentWidgetToolCallDisplayFeature = {
|
|
|
4110
4156
|
* @default "stack"
|
|
4111
4157
|
*/
|
|
4112
4158
|
groupedMode?: "stack" | "summary";
|
|
4159
|
+
/**
|
|
4160
|
+
* What happens to a tool call row once it completes.
|
|
4161
|
+
*
|
|
4162
|
+
* - `"kept"` (default): the finished row stays in the transcript.
|
|
4163
|
+
* - `"removed"`: no row is rendered at all, so the transcript gap closes with
|
|
4164
|
+
* it. The tool call stays on the message and in `getMessages()`.
|
|
4165
|
+
*
|
|
4166
|
+
* @default "kept"
|
|
4167
|
+
*/
|
|
4168
|
+
completedVisibility?: AgentWidgetToolCallCompletedVisibility;
|
|
4113
4169
|
/**
|
|
4114
4170
|
* When false, tool call bubbles show only the collapsed summary with no
|
|
4115
4171
|
* expand/collapse toggle. Users see tool awareness without full details.
|
|
@@ -4127,6 +4183,8 @@ type AgentWidgetToolCallDisplayFeature = {
|
|
|
4127
4183
|
*/
|
|
4128
4184
|
loadingAnimation?: AgentWidgetToolCallLoadingAnimation;
|
|
4129
4185
|
};
|
|
4186
|
+
/** See `features.toolCallDisplay.completedVisibility`. */
|
|
4187
|
+
type AgentWidgetToolCallCompletedVisibility = "kept" | "removed";
|
|
4130
4188
|
type AgentWidgetReasoningDisplayFeature = {
|
|
4131
4189
|
/**
|
|
4132
4190
|
* When true, active collapsed reasoning rows can render a lightweight preview block.
|
|
@@ -4172,13 +4230,26 @@ type AgentWidgetReasoningDisplayFeature = {
|
|
|
4172
4230
|
* - `"kept"` (default): the finished row stays in the transcript.
|
|
4173
4231
|
* - `"removed"`: no row is rendered at all, so the transcript gap closes with
|
|
4174
4232
|
* it. The reasoning text stays on the message and in `getMessages()`.
|
|
4233
|
+
* - `"removed-when-short"`: behaves as `"removed"` when the completed trace
|
|
4234
|
+
* is short (see `shortThinkThreshold`), and as `"kept"` otherwise.
|
|
4175
4235
|
*
|
|
4176
4236
|
* @default "kept"
|
|
4177
4237
|
*/
|
|
4178
4238
|
completedVisibility?: AgentWidgetReasoningCompletedVisibility;
|
|
4239
|
+
/**
|
|
4240
|
+
* Thresholds used by `completedVisibility: "removed-when-short"` to decide
|
|
4241
|
+
* whether a completed trace counts as short. Duration is checked first when
|
|
4242
|
+
* the reasoning reports one; the character count is a fallback for traces
|
|
4243
|
+
* with no reported duration.
|
|
4244
|
+
* @default { durationMs: 15000, chars: 1200 }
|
|
4245
|
+
*/
|
|
4246
|
+
shortThinkThreshold?: {
|
|
4247
|
+
durationMs?: number;
|
|
4248
|
+
chars?: number;
|
|
4249
|
+
};
|
|
4179
4250
|
};
|
|
4180
4251
|
/** See `features.reasoningDisplay.completedVisibility`. */
|
|
4181
|
-
type AgentWidgetReasoningCompletedVisibility = "kept" | "removed";
|
|
4252
|
+
type AgentWidgetReasoningCompletedVisibility = "kept" | "removed" | "removed-when-short";
|
|
4182
4253
|
/**
|
|
4183
4254
|
* Reveal animation applied to assistant message text while it is streaming.
|
|
4184
4255
|
*
|
package/dist/theme-editor.d.ts
CHANGED
|
@@ -25,7 +25,11 @@ interface ColorPalette {
|
|
|
25
25
|
warning: ColorShade;
|
|
26
26
|
error: ColorShade;
|
|
27
27
|
info: ColorShade;
|
|
28
|
-
|
|
28
|
+
/** Event-stream tool badge family. */
|
|
29
|
+
purple?: ColorShade;
|
|
30
|
+
/** Event-stream agent badge family. */
|
|
31
|
+
teal?: ColorShade;
|
|
32
|
+
[key: string]: ColorShade | undefined;
|
|
29
33
|
}
|
|
30
34
|
interface SpacingScale {
|
|
31
35
|
0: string;
|
|
@@ -597,6 +601,38 @@ interface ToolBubbleTokens {
|
|
|
597
601
|
interface ReasoningBubbleTokens {
|
|
598
602
|
shadow: string;
|
|
599
603
|
}
|
|
604
|
+
/** One event-stream badge chip: fill + text pair. The chip border derives
|
|
605
|
+
* from `foreground` at ~31% alpha. */
|
|
606
|
+
interface EventStreamBadgePairTokens {
|
|
607
|
+
background: TokenReference<'color'>;
|
|
608
|
+
foreground: TokenReference<'color'>;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Event-stream inspector badge chips (`features.eventStream`), one pair per
|
|
612
|
+
* unified event family. Materialized into every theme and emitted as
|
|
613
|
+
* `--persona-event-badge-<family>-{bg,fg}`, with scheme-appropriate defaults:
|
|
614
|
+
* light themes pair a 100-tone fill with a 700-tone text, the built-in dark
|
|
615
|
+
* layer flips to a 900-tone fill with a 300-tone text. `badge.default` colors
|
|
616
|
+
* event types no family matches.
|
|
617
|
+
*/
|
|
618
|
+
interface EventStreamTokens {
|
|
619
|
+
badge: {
|
|
620
|
+
/** `flow_*` events. */
|
|
621
|
+
flow: EventStreamBadgePairTokens;
|
|
622
|
+
/** `step_*` events. */
|
|
623
|
+
step: EventStreamBadgePairTokens;
|
|
624
|
+
/** `reasoning_*` events. */
|
|
625
|
+
reasoning: EventStreamBadgePairTokens;
|
|
626
|
+
/** `tool_*` events. */
|
|
627
|
+
tool: EventStreamBadgePairTokens;
|
|
628
|
+
/** `agent_*` events. */
|
|
629
|
+
agent: EventStreamBadgePairTokens;
|
|
630
|
+
/** `error` / `execution_error` events. */
|
|
631
|
+
error: EventStreamBadgePairTokens;
|
|
632
|
+
/** Any event type no other family matches. */
|
|
633
|
+
default: EventStreamBadgePairTokens;
|
|
634
|
+
};
|
|
635
|
+
}
|
|
600
636
|
/** Scrollbar appearance shared by every scroller in the widget. */
|
|
601
637
|
interface ScrollbarTokens {
|
|
602
638
|
/** Thumb color. @default semantic.colors.border */
|
|
@@ -945,6 +981,8 @@ interface ComponentTokens {
|
|
|
945
981
|
attachment: AttachmentTokens;
|
|
946
982
|
toolBubble: ToolBubbleTokens;
|
|
947
983
|
reasoningBubble: ReasoningBubbleTokens;
|
|
984
|
+
/** Event-stream inspector badge chips. */
|
|
985
|
+
eventStream?: EventStreamTokens;
|
|
948
986
|
composer: ComposerChromeTokens;
|
|
949
987
|
/** Shared motion timing for composer chrome animation. */
|
|
950
988
|
motion?: MotionTokens;
|
|
@@ -2919,6 +2957,14 @@ type ClientToolDefinition = {
|
|
|
2919
2957
|
readOnlyHint?: boolean;
|
|
2920
2958
|
untrustedContentHint?: boolean;
|
|
2921
2959
|
};
|
|
2960
|
+
/**
|
|
2961
|
+
* Hoisted copy of `annotations.untrustedContentHint`. This is the field the
|
|
2962
|
+
* server actually acts on (`InlineClientToolSchema`): it spotlights the
|
|
2963
|
+
* tool's output before the model reads it, so instructions embedded in
|
|
2964
|
+
* page-provided content (reviews, comments, emails) are not treated as
|
|
2965
|
+
* instructions. `annotations` itself is trace/dashboard metadata only.
|
|
2966
|
+
*/
|
|
2967
|
+
untrustedContentHint?: boolean;
|
|
2922
2968
|
};
|
|
2923
2969
|
/**
|
|
2924
2970
|
* Information passed to the confirm-bubble handler before a `webmcp:*` tool
|
|
@@ -4110,6 +4156,16 @@ type AgentWidgetToolCallDisplayFeature = {
|
|
|
4110
4156
|
* @default "stack"
|
|
4111
4157
|
*/
|
|
4112
4158
|
groupedMode?: "stack" | "summary";
|
|
4159
|
+
/**
|
|
4160
|
+
* What happens to a tool call row once it completes.
|
|
4161
|
+
*
|
|
4162
|
+
* - `"kept"` (default): the finished row stays in the transcript.
|
|
4163
|
+
* - `"removed"`: no row is rendered at all, so the transcript gap closes with
|
|
4164
|
+
* it. The tool call stays on the message and in `getMessages()`.
|
|
4165
|
+
*
|
|
4166
|
+
* @default "kept"
|
|
4167
|
+
*/
|
|
4168
|
+
completedVisibility?: AgentWidgetToolCallCompletedVisibility;
|
|
4113
4169
|
/**
|
|
4114
4170
|
* When false, tool call bubbles show only the collapsed summary with no
|
|
4115
4171
|
* expand/collapse toggle. Users see tool awareness without full details.
|
|
@@ -4127,6 +4183,8 @@ type AgentWidgetToolCallDisplayFeature = {
|
|
|
4127
4183
|
*/
|
|
4128
4184
|
loadingAnimation?: AgentWidgetToolCallLoadingAnimation;
|
|
4129
4185
|
};
|
|
4186
|
+
/** See `features.toolCallDisplay.completedVisibility`. */
|
|
4187
|
+
type AgentWidgetToolCallCompletedVisibility = "kept" | "removed";
|
|
4130
4188
|
type AgentWidgetReasoningDisplayFeature = {
|
|
4131
4189
|
/**
|
|
4132
4190
|
* When true, active collapsed reasoning rows can render a lightweight preview block.
|
|
@@ -4172,13 +4230,26 @@ type AgentWidgetReasoningDisplayFeature = {
|
|
|
4172
4230
|
* - `"kept"` (default): the finished row stays in the transcript.
|
|
4173
4231
|
* - `"removed"`: no row is rendered at all, so the transcript gap closes with
|
|
4174
4232
|
* it. The reasoning text stays on the message and in `getMessages()`.
|
|
4233
|
+
* - `"removed-when-short"`: behaves as `"removed"` when the completed trace
|
|
4234
|
+
* is short (see `shortThinkThreshold`), and as `"kept"` otherwise.
|
|
4175
4235
|
*
|
|
4176
4236
|
* @default "kept"
|
|
4177
4237
|
*/
|
|
4178
4238
|
completedVisibility?: AgentWidgetReasoningCompletedVisibility;
|
|
4239
|
+
/**
|
|
4240
|
+
* Thresholds used by `completedVisibility: "removed-when-short"` to decide
|
|
4241
|
+
* whether a completed trace counts as short. Duration is checked first when
|
|
4242
|
+
* the reasoning reports one; the character count is a fallback for traces
|
|
4243
|
+
* with no reported duration.
|
|
4244
|
+
* @default { durationMs: 15000, chars: 1200 }
|
|
4245
|
+
*/
|
|
4246
|
+
shortThinkThreshold?: {
|
|
4247
|
+
durationMs?: number;
|
|
4248
|
+
chars?: number;
|
|
4249
|
+
};
|
|
4179
4250
|
};
|
|
4180
4251
|
/** See `features.reasoningDisplay.completedVisibility`. */
|
|
4181
|
-
type AgentWidgetReasoningCompletedVisibility = "kept" | "removed";
|
|
4252
|
+
type AgentWidgetReasoningCompletedVisibility = "kept" | "removed" | "removed-when-short";
|
|
4182
4253
|
/**
|
|
4183
4254
|
* Reveal animation applied to assistant message text while it is streaming.
|
|
4184
4255
|
*
|