@runtypelabs/persona 4.23.1 → 4.24.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 (158) hide show
  1. package/dist/animations/glyph-cycle.d.cts +1 -1
  2. package/dist/animations/glyph-cycle.d.ts +1 -1
  3. package/dist/animations/{types-9Vxm-PPz.d.cts → types-Db61aI9J.d.cts} +25 -2
  4. package/dist/animations/{types-9Vxm-PPz.d.ts → types-Db61aI9J.d.ts} +25 -2
  5. package/dist/animations/wipe.d.cts +1 -1
  6. package/dist/animations/wipe.d.ts +1 -1
  7. package/dist/animations-extra.d.cts +25 -2
  8. package/dist/animations-extra.d.ts +25 -2
  9. package/dist/approval-ui-3NMYNXBD.js +1 -0
  10. package/dist/approval-ui.cjs +2 -2
  11. package/dist/approval-ui.d.cts +261 -40
  12. package/dist/approval-ui.d.ts +261 -40
  13. package/dist/approval-ui.js +2 -2
  14. package/dist/{artifacts-ui-F4N6VMKF.js → artifacts-ui-IGB5YKLO.js} +4 -4
  15. package/dist/artifacts-ui.d.cts +256 -28
  16. package/dist/artifacts-ui.d.ts +256 -28
  17. package/dist/{chunk-NIKYKSNZ.js → chunk-7CO4T5KB.js} +1 -1
  18. package/dist/codegen.cjs +11 -11
  19. package/dist/codegen.js +13 -13
  20. package/dist/context-mentions.d.cts +256 -28
  21. package/dist/context-mentions.d.ts +256 -28
  22. package/dist/event-stream-view.d.cts +256 -28
  23. package/dist/event-stream-view.d.ts +256 -28
  24. package/dist/forms-ui.d.cts +291 -30
  25. package/dist/forms-ui.d.ts +291 -30
  26. package/dist/history-view.d.cts +25 -2
  27. package/dist/history-view.d.ts +25 -2
  28. package/dist/index.cjs +70 -69
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +337 -51
  31. package/dist/index.d.ts +337 -51
  32. package/dist/index.global.js +57 -54
  33. package/dist/index.global.js.map +1 -1
  34. package/dist/index.js +70 -69
  35. package/dist/index.js.map +1 -1
  36. package/dist/install.global.js +1 -1
  37. package/dist/install.global.js.map +1 -1
  38. package/dist/launcher.global.js +2 -2
  39. package/dist/launcher.global.js.map +1 -1
  40. package/dist/session-reconnect.d.cts +256 -28
  41. package/dist/session-reconnect.d.ts +256 -28
  42. package/dist/smart-dom-reader.d.cts +256 -28
  43. package/dist/smart-dom-reader.d.ts +256 -28
  44. package/dist/theme-editor-preview.cjs +74 -73
  45. package/dist/theme-editor-preview.d.cts +263 -28
  46. package/dist/theme-editor-preview.d.ts +263 -28
  47. package/dist/theme-editor-preview.js +51 -50
  48. package/dist/theme-editor.cjs +10 -10
  49. package/dist/theme-editor.d.cts +276 -30
  50. package/dist/theme-editor.d.ts +276 -30
  51. package/dist/theme-editor.js +10 -10
  52. package/dist/theme-reference.cjs +1 -1
  53. package/dist/theme-reference.d.cts +1522 -11
  54. package/dist/theme-reference.d.ts +1522 -11
  55. package/dist/theme-reference.js +1 -1
  56. package/dist/widget.css +1 -1
  57. package/package.json +3 -2
  58. package/src/__fixtures__/defaults-parity.v4.json +776 -0
  59. package/src/approval-ui-entry.ts +0 -1
  60. package/src/approval-ui-loader.ts +5 -4
  61. package/src/approval-ui.ts +0 -1
  62. package/src/client-identity-proof.test.ts +193 -0
  63. package/src/client-session-warm.test.ts +216 -0
  64. package/src/client-visitor-history.test.ts +6 -0
  65. package/src/client.tool-pair-replay.test.ts +325 -0
  66. package/src/client.ts +154 -61
  67. package/src/codegen.test.ts +24 -0
  68. package/src/components/activity-row.test.ts +100 -0
  69. package/src/components/activity-row.ts +136 -0
  70. package/src/components/approval-actions.test.ts +8 -5
  71. package/src/components/approval-actions.ts +19 -6
  72. package/src/components/approval-bubble.test.ts +56 -9
  73. package/src/components/approval-bubble.ts +36 -41
  74. package/src/components/composer-builder.ts +5 -2
  75. package/src/components/composer-parts.ts +10 -2
  76. package/src/components/header-builder.test.ts +32 -0
  77. package/src/components/header-builder.ts +7 -4
  78. package/src/components/header-layouts.test.ts +12 -0
  79. package/src/components/header-layouts.ts +3 -2
  80. package/src/components/launcher.ts +11 -2
  81. package/src/components/message-bubble.test.ts +22 -0
  82. package/src/components/message-bubble.ts +7 -3
  83. package/src/components/panel.test.ts +52 -1
  84. package/src/components/panel.ts +47 -8
  85. package/src/components/pill-composer-builder.test.ts +2 -0
  86. package/src/components/pill-composer-builder.ts +0 -1
  87. package/src/components/reasoning-bubble.ts +29 -17
  88. package/src/components/suggestions.test.ts +1 -0
  89. package/src/components/suggestions.ts +0 -16
  90. package/src/components/tool-bubble.ts +131 -114
  91. package/src/components/tool-details.test.ts +87 -0
  92. package/src/components/tool-details.ts +102 -0
  93. package/src/components/welcome.test.ts +8 -0
  94. package/src/components/welcome.ts +4 -2
  95. package/src/defaults-parity.test.ts +158 -0
  96. package/src/defaults.test.ts +69 -0
  97. package/src/defaults.ts +128 -49
  98. package/src/generated/runtype-openapi-contract.ts +28 -13
  99. package/src/index-core.ts +2 -0
  100. package/src/install.test.ts +24 -0
  101. package/src/install.ts +3 -1
  102. package/src/launcher-global.ts +2 -1
  103. package/src/launcher-variants.test.ts +52 -0
  104. package/src/runtime/init-update-reset.test.ts +21 -0
  105. package/src/session.ts +61 -9
  106. package/src/styles/widget-styles.test.ts +19 -0
  107. package/src/styles/widget.css +295 -23
  108. package/src/theme-editor/index.ts +2 -0
  109. package/src/theme-editor/preview-utils.test.ts +8 -0
  110. package/src/theme-editor/preview-utils.ts +7 -3
  111. package/src/theme-editor/sections.test.ts +31 -0
  112. package/src/theme-editor/sections.ts +55 -1
  113. package/src/theme-editor/state-preferences.test.ts +49 -0
  114. package/src/theme-editor/state.ts +73 -15
  115. package/src/theme-reference.test.ts +20 -0
  116. package/src/theme-reference.ts +11 -5
  117. package/src/tool-call-display-defaults.test.ts +33 -1
  118. package/src/types/theme.ts +80 -3
  119. package/src/types.ts +179 -23
  120. package/src/ui.activity-row.test.ts +91 -0
  121. package/src/ui.approval-plugin.test.ts +63 -0
  122. package/src/ui.composer-compact.test.ts +24 -2
  123. package/src/ui.composer-placement.test.ts +23 -0
  124. package/src/ui.detached-panel.test.ts +33 -6
  125. package/src/ui.docked.test.ts +19 -0
  126. package/src/ui.header-update-stability.test.ts +25 -0
  127. package/src/ui.identity-proof.test.ts +58 -0
  128. package/src/ui.launcher-teaser.test.ts +25 -0
  129. package/src/ui.message-width.test.ts +17 -2
  130. package/src/ui.reasoning-display.test.ts +92 -0
  131. package/src/ui.rebuild-composer.test.ts +20 -3
  132. package/src/ui.scroll.test.ts +32 -0
  133. package/src/ui.session-init.test.ts +312 -0
  134. package/src/ui.status-indicator.test.ts +82 -0
  135. package/src/ui.suggest-replies.test.ts +11 -0
  136. package/src/ui.ts +363 -74
  137. package/src/ui.v5-defaults.test.ts +144 -0
  138. package/src/ui.welcome.test.ts +92 -3
  139. package/src/utils/__snapshots__/tokens-parity.test.ts.snap +811 -140
  140. package/src/utils/code-generators.ts +14 -0
  141. package/src/utils/composer-compact.test.ts +0 -2
  142. package/src/utils/composer-compact.ts +2 -4
  143. package/src/utils/composer-placement.ts +2 -3
  144. package/src/utils/config-merge.test.ts +81 -5
  145. package/src/utils/config-merge.ts +13 -3
  146. package/src/utils/defaults-provenance.ts +67 -0
  147. package/src/utils/dock.ts +7 -1
  148. package/src/utils/launcher-variant.ts +16 -0
  149. package/src/utils/panel-config.ts +97 -0
  150. package/src/utils/status-indicator.ts +39 -0
  151. package/src/utils/theme.test.ts +182 -0
  152. package/src/utils/theme.ts +131 -18
  153. package/src/utils/tokens.test.ts +122 -1
  154. package/src/utils/tokens.ts +177 -17
  155. package/src/utils/tool-pair-replay.ts +100 -0
  156. package/src/welcome.test.ts +23 -0
  157. package/src/welcome.ts +16 -9
  158. package/dist/approval-ui-K7R5Q5OC.js +0 -1
@@ -198,6 +198,8 @@ interface InputTokens extends ComponentTokenSet {
198
198
  backdropFilter?: string;
199
199
  }
200
200
  interface LauncherTokens extends ComponentTokenSet {
201
+ /** Distance from the viewport edges. Circle default: 20px; pill: 24px. */
202
+ offset?: string;
201
203
  size: string;
202
204
  iconSize: string;
203
205
  shadow: TokenReference<'shadow'>;
@@ -220,6 +222,15 @@ interface PanelTokens extends ComponentTokenSet {
220
222
  inset?: string;
221
223
  /** Background of the region revealed behind a detached panel. */
222
224
  canvasBackground?: string;
225
+ /** Chrome defaults by rendered panel mode. */
226
+ modes?: Partial<Record<'floating' | 'inline' | 'sidebar' | 'docked' | 'mobile', {
227
+ /** Full border shorthand (for example, `"1px solid var(--persona-border)"`). */
228
+ border?: string;
229
+ /** Box-shadow token reference or raw CSS shadow. */
230
+ shadow?: string;
231
+ /** Corner radius token reference or raw CSS radius. */
232
+ borderRadius?: TokenReference<'radius'>;
233
+ }>>;
223
234
  }
224
235
  /** Per-element text styling shared by themable text surfaces. */
225
236
  interface TextStyleTokens {
@@ -246,10 +257,16 @@ interface HeaderTokens extends ComponentTokenSet {
246
257
  */
247
258
  border?: TokenReference<'color'>;
248
259
  borderRadius: TokenReference<'radius'>;
260
+ /** Standard-header padding. @default "20px 24px" */
261
+ padding?: string;
262
+ /** Minimal-header padding. Explicitly wins over `padding`. @default "16px 24px" */
263
+ minimalPadding?: string;
249
264
  /** Background of the rounded avatar tile next to the title (Lucide / emoji / image). */
250
265
  iconBackground: TokenReference<'color'>;
251
266
  /** Foreground (glyph stroke or emoji text) on the header avatar tile. */
252
267
  iconForeground: TokenReference<'color'>;
268
+ /** Header identity glyph size as a fraction of its icon box. @default "0.6" */
269
+ iconScale?: string;
253
270
  /**
254
271
  * Legacy alias of `title.color`; `title.color` wins when both are set.
255
272
  * Unset, the title takes `foreground`, then the primary color.
@@ -288,6 +305,14 @@ interface HeaderTokens extends ComponentTokenSet {
288
305
  * sibling. @default "1.5"
289
306
  */
290
307
  controlStrokeWidth?: string;
308
+ /** Header control corner radius. Per-control radius overrides win. */
309
+ controlBorderRadius?: string;
310
+ /** Default control hover/focus fill. Explicit button backgrounds win. */
311
+ controlHoverBackground?: TokenReference<'color'>;
312
+ /** Default control hover/focus icon color. Explicit button colors win. */
313
+ controlHoverForeground?: TokenReference<'color'>;
314
+ /** Keyboard focus outline; unset preserves the browser default. */
315
+ controlFocusOutline?: string;
291
316
  /** Box-shadow on the header (e.g., a fade shadow to replace the default border). */
292
317
  shadow?: string;
293
318
  /** Override the header bottom border (e.g., `none`). */
@@ -462,6 +487,12 @@ interface MessageGeometryTokens {
462
487
  lineHeight?: string;
463
488
  }
464
489
  interface MessageTokens {
490
+ /** Height of the optional transcript top fade. Default 18px. */
491
+ topFadeHeight?: string;
492
+ /** Vertical gap between transcript turns. @default "12px" */
493
+ gap?: string;
494
+ /** Gap between turns in fullscreen mode; falls back to `gap`. */
495
+ fullscreenGap?: string;
465
496
  user: MessageGeometryTokens & {
466
497
  background: TokenReference<'color'>;
467
498
  text: TokenReference<'color'>;
@@ -475,6 +506,8 @@ interface MessageTokens {
475
506
  borderRadius: TokenReference<'radius'>;
476
507
  /** Assistant bubble border color (CSS color). */
477
508
  border?: TokenReference<'color'>;
509
+ /** Border width; set to 0px for a flat assistant response. @default "1px" */
510
+ borderWidth?: string;
478
511
  /** Assistant bubble box-shadow (token ref or raw CSS, e.g. `none`). */
479
512
  shadow?: string;
480
513
  };
@@ -593,12 +626,40 @@ interface AttachmentTokens {
593
626
  };
594
627
  }
595
628
  /** Tool-call row chrome (collapsible tool bubbles). */
596
- interface ToolBubbleTokens {
629
+ interface ActivityTokens {
630
+ /** Minimum activity row height. */
631
+ rowHeight?: string;
632
+ /** Group child indentation; falls back to indent when unset. V5: 0px. */
633
+ groupIndent?: string;
634
+ /** Extra vertical gap between grouped rows. V5: 0px. */
635
+ groupGap?: string;
636
+ /** Padding around expanded group children. V5: 0px. */
637
+ groupPadding?: string;
638
+ /** Gap between consecutive activity entries. V5: 0px. */
639
+ transcriptGap?: string;
640
+ /** Gap from activity to an assistant response. V5: 12px. */
641
+ responseGap?: string;
642
+ /** Expanded body padding. V5: 4px 0. */
643
+ bodyPadding?: string;
644
+ /** Expanded reasoning text size. V5: 13px. */
645
+ bodySize?: string;
646
+ /** Expanded reasoning line height. V5: 1.5. */
647
+ bodyLineHeight?: string;
648
+ /** Expanded reasoning font weight. V5: 400. */
649
+ bodyFontWeight?: string;
650
+ /** Gap between expanded detail sections. V5: 8px. */
651
+ sectionGap?: string;
652
+ labelSize?: string;
653
+ iconSize?: string;
654
+ indent?: string;
655
+ bodySurface?: TokenReference<'color'>;
656
+ }
657
+ interface ToolBubbleTokens extends ActivityTokens {
597
658
  /** Box-shadow for tool bubbles (token ref or raw CSS, e.g. `none`). */
598
659
  shadow: string;
599
660
  }
600
661
  /** Reasoning / “thinking” row chrome. */
601
- interface ReasoningBubbleTokens {
662
+ interface ReasoningBubbleTokens extends ActivityTokens {
602
663
  shadow: string;
603
664
  }
604
665
  /** One event-stream badge chip: fill + text pair. The chip border derives
@@ -732,6 +793,10 @@ interface ComposerChromeTokens {
732
793
  shadow: string;
733
794
  /** Border color of the composer form. @default semantic.colors.border */
734
795
  borderColor?: TokenReference<'color'>;
796
+ /** Focused form border color; falls back to borderColor. V5: a stronger neutral border. */
797
+ focusBorderColor?: TokenReference<'color'>;
798
+ /** Outer focus ring (CSS outline shorthand). V4: none; V5: a thin neutral ring. */
799
+ focusRing?: string;
735
800
  /** Inner padding of the composer form (raw CSS shorthand). @default "0.75rem 1rem" */
736
801
  padding?: string;
737
802
  /** Gap between the textarea row and the actions row. @default "0.5rem" */
@@ -750,12 +815,18 @@ interface ComposerChromeTokens {
750
815
  controlSize?: string;
751
816
  /** Glyph box inside those controls. @default "24px" */
752
817
  controlIconSize?: string;
818
+ /** Send/stop glyph size. Explicit sendButton.iconSize wins. V5: 18px. */
819
+ sendIconSize?: string;
820
+ /** Icon-mode submit button radius. V4 inherits the primary button; V5: 9999px. */
821
+ sendButtonRadius?: string;
822
+ /** Footer top border (CSS shorthand). V4: 1px solid divider; V5: none. */
823
+ footerBorder?: string;
753
824
  /**
754
825
  * Background painted behind an overlaid composer footer
755
826
  * (`composer.placement: "overlay"`). Any CSS `background` value, gradients
756
827
  * included — same convention as the shadow tokens. Inert under
757
828
  * `placement: "block"`.
758
- * @default "transparent"
829
+ * @default "transparent" (V4); a theme-aware 24px fade (V5)
759
830
  */
760
831
  overlayBand?: string;
761
832
  /** Segmented mode-group track. */
@@ -931,6 +1002,8 @@ interface ScrollToBottomTokens extends ComponentTokenSet {
931
1002
  }
932
1003
  /** Visual tokens shared by one suggestion presentation variant. */
933
1004
  interface SuggestionVariantTokens extends ComponentTokenSet {
1005
+ /** Label weight. V4: 500; V5: 400. */
1006
+ fontWeight?: string;
934
1007
  /** Space inside one item, between its icon and its copy. */
935
1008
  gap?: string;
936
1009
  /** Space between suggestion items in the container. */
@@ -979,6 +1052,7 @@ interface ComponentTokens {
979
1052
  voice: VoiceTokens;
980
1053
  approval: ApprovalTokens;
981
1054
  attachment: AttachmentTokens;
1055
+ activity?: ActivityTokens;
982
1056
  toolBubble: ToolBubbleTokens;
983
1057
  reasoningBubble: ReasoningBubbleTokens;
984
1058
  /** Event-stream inspector badge chips. */
@@ -1058,6 +1132,7 @@ interface ResolvedWelcomeConfig {
1058
1132
  * Optional on the interface, always populated by `resolveWelcomeConfig`:
1059
1133
  * a plugin literal built against an older minor must still type-check.
1060
1134
  */
1135
+ layout?: "top" | "centered";
1061
1136
  anchor?: AgentWidgetWelcomeAnchor;
1062
1137
  /** Percentage string; validated, falls back to "44%". */
1063
1138
  anchorComposerTop?: string;
@@ -1702,6 +1777,7 @@ type RuntypeExecutionStreamEvent = ({
1702
1777
  turnIndex?: number;
1703
1778
  type: "turn_start";
1704
1779
  }) | ({
1780
+ attributes?: Record<string, string | number | boolean>;
1705
1781
  completedAt?: string;
1706
1782
  content?: string;
1707
1783
  cost?: number;
@@ -1760,7 +1836,8 @@ type RuntypeExecutionStreamEvent = ({
1760
1836
  };
1761
1837
  turnId?: string;
1762
1838
  type: "model_call_start";
1763
- } | {
1839
+ } | ({
1840
+ attributes?: Record<string, string | number | boolean>;
1764
1841
  completedAt?: string;
1765
1842
  cost?: number;
1766
1843
  durationMs?: number;
@@ -1784,10 +1861,11 @@ type RuntypeExecutionStreamEvent = ({
1784
1861
  cacheWrite?: number;
1785
1862
  input: number;
1786
1863
  output: number;
1864
+ reasoning?: number;
1787
1865
  };
1788
1866
  turnId?: string;
1789
1867
  type: "model_call_complete";
1790
- } | {
1868
+ }) | {
1791
1869
  executionId: string;
1792
1870
  id: string;
1793
1871
  index?: number;
@@ -2887,10 +2965,32 @@ type AgentWidgetContextMentionTokenRenderContext = {
2887
2965
  ref: AgentWidgetContextMentionRef;
2888
2966
  readonly: boolean;
2889
2967
  };
2968
+ /** One earlier client-tool call replayed to the model, in `/v1/dispatch` shape. */
2969
+ type AgentWidgetReplayedToolCall = {
2970
+ toolCallId: string;
2971
+ /** Model-facing (sanitized) name, e.g. `webmcp_search`. */
2972
+ toolName: string;
2973
+ args: Record<string, unknown>;
2974
+ };
2975
+ /** The browser's answer to an {@link AgentWidgetReplayedToolCall}. */
2976
+ type AgentWidgetReplayedToolResult = {
2977
+ toolCallId: string;
2978
+ toolName: string;
2979
+ result: unknown;
2980
+ };
2981
+ /**
2982
+ * A message in the proxy/agent request payload. Earlier client-tool calls the
2983
+ * browser answered replay as an assistant message carrying `toolCalls`,
2984
+ * followed by a `tool` message carrying the matching `toolResults`; both have
2985
+ * empty `content`. Client-token mode never sends them: the server replays
2986
+ * from its own stored transcript there.
2987
+ */
2890
2988
  type AgentWidgetRequestPayloadMessage = {
2891
- role: AgentWidgetMessageRole;
2989
+ role: AgentWidgetMessageRole | "tool";
2892
2990
  content: MessageContent;
2893
2991
  createdAt: string;
2992
+ toolCalls?: AgentWidgetReplayedToolCall[];
2993
+ toolResults?: AgentWidgetReplayedToolResult[];
2894
2994
  };
2895
2995
  type AgentWidgetRequestPayload = {
2896
2996
  messages: AgentWidgetRequestPayloadMessage[];
@@ -3253,6 +3353,24 @@ type AgentMessageMetadata = {
3253
3353
  * never re-resume the call.
3254
3354
  */
3255
3355
  suggestRepliesResolved?: boolean;
3356
+ /**
3357
+ * The client-tool answer the server accepted through `/resume`, kept so
3358
+ * later proxy/agent turns can replay the call and its result to the model.
3359
+ * `toolName` is the widget's internal name (`webmcp:<name>` or a bare
3360
+ * built-in). Set only after the resume succeeds; preserved across
3361
+ * re-emissions of the tool message.
3362
+ */
3363
+ clientToolAnswer?: {
3364
+ toolCallId: string;
3365
+ toolName: string;
3366
+ args: unknown;
3367
+ result: unknown;
3368
+ /**
3369
+ * Shared by the answers posted in one `/resume`, i.e. one assistant
3370
+ * turn's parallel calls; a chained call gets a new batch.
3371
+ */
3372
+ batch?: string;
3373
+ };
3256
3374
  };
3257
3375
  type AgentWidgetRequestMiddlewareContext = {
3258
3376
  payload: AgentWidgetRequestPayload;
@@ -4250,6 +4368,14 @@ type AgentWidgetToolCallCollapsedMode = "tool-call" | "tool-name" | "tool-previe
4250
4368
  */
4251
4369
  type AgentWidgetToolCallLoadingAnimation = "none" | "pulse" | "shimmer" | "shimmer-color" | "rainbow";
4252
4370
  type AgentWidgetToolCallDisplayFeature = {
4371
+ /** Activity chrome. Defaults to card in V4 and row with future.v5Defaults. */
4372
+ variant?: "card" | "row";
4373
+ /** Row status icons: always, active/attention-needed only, or never. V5 defaults to active; V4 to always. */
4374
+ iconVisibility?: "always" | "active" | "never";
4375
+ /** Row variant: open when the first content chunk arrives. Default false in V5; true in V4. */
4376
+ autoExpand?: boolean;
4377
+ /** Row variant: collapse once after completion, in ms; false disables. Default 1000. */
4378
+ autoCollapseDelay?: number | false;
4253
4379
  /**
4254
4380
  * Controls what collapsed tool call rows show in their header/summary area.
4255
4381
  * @default "tool-call"
@@ -4280,9 +4406,10 @@ type AgentWidgetToolCallDisplayFeature = {
4280
4406
  * Controls how a grouped tool sequence is rendered.
4281
4407
  * - `"stack"`: show the group summary and each child tool row.
4282
4408
  * - `"summary"`: show one consolidated summary row only.
4409
+ * - `"collapsible"`: expandable activity group (V5 default).
4283
4410
  * @default "stack"
4284
4411
  */
4285
- groupedMode?: "stack" | "summary";
4412
+ groupedMode?: "stack" | "summary" | "collapsible";
4286
4413
  /**
4287
4414
  * What happens to a tool call row once it completes.
4288
4415
  *
@@ -4313,6 +4440,14 @@ type AgentWidgetToolCallDisplayFeature = {
4313
4440
  /** See `features.toolCallDisplay.completedVisibility`. */
4314
4441
  type AgentWidgetToolCallCompletedVisibility = "kept" | "removed";
4315
4442
  type AgentWidgetReasoningDisplayFeature = {
4443
+ /** Activity chrome. Defaults to card in V4 and row with future.v5Defaults. */
4444
+ variant?: "card" | "row";
4445
+ /** Row status icons: always, active/attention-needed only, or never. V5 defaults to active; V4 to always. */
4446
+ iconVisibility?: "always" | "active" | "never";
4447
+ /** Row variant: open when the first content chunk arrives. Default false in V5; true in V4. */
4448
+ autoExpand?: boolean;
4449
+ /** Row variant: collapse once after completion, in ms; false disables. Default 1000. */
4450
+ autoCollapseDelay?: number | false;
4316
4451
  /**
4317
4452
  * When true, active collapsed reasoning rows can render a lightweight preview block.
4318
4453
  * @default false
@@ -5013,8 +5148,8 @@ interface AgentWidgetHistoryFeature {
5013
5148
  * otherwise `"browser"`) and narrows it to what the provider advertises, so a
5014
5149
  * browser-only provider is never asked for a scope it cannot serve. An
5015
5150
  * explicit `features.history.scope` is a hard request and still fails closed
5016
- * with `unsupported_scope`. `getIdentityProof` is never called for a supplied
5017
- * provider, and `HistoryOperationContext` carries only the resolved scope;
5151
+ * with `unsupported_scope`. History operations on a supplied provider never
5152
+ * call `getIdentityProof`, and `HistoryOperationContext` carries only the resolved scope;
5018
5153
  * report your own identity through `getIdentityStatus()` /
5019
5154
  * `subscribeIdentityStatus()`, which is what the scope banner and its retry
5020
5155
  * affordance read.
@@ -5398,7 +5533,7 @@ type EventStreamConfig = {
5398
5533
  /**
5399
5534
  * Fields to extract from event payloads for description text.
5400
5535
  * The first matching field value is displayed after the badge.
5401
- * @default ["flowName", "stepName", "name", "tool", "toolName"]
5536
+ * @default ["flowName", "stepName", "reasoningText", "text", "name", "tool", "toolName"]
5402
5537
  */
5403
5538
  descriptionFields?: string[];
5404
5539
  /**
@@ -5609,6 +5744,8 @@ type AgentWidgetComposerBarPeekConfig = {
5609
5744
  streamAnimation?: AgentWidgetStreamAnimationFeature;
5610
5745
  };
5611
5746
  type AgentWidgetLauncherConfig = {
5747
+ /** Collapsed launcher shape. V4 defaults to pill; V5 defaults to circle. */
5748
+ variant?: "pill" | "circle";
5612
5749
  enabled?: boolean;
5613
5750
  title?: string;
5614
5751
  subtitle?: string;
@@ -6352,9 +6489,9 @@ type AgentWidgetComposerConfig = {
6352
6489
  /**
6353
6490
  * Where the composer footer sits relative to the transcript.
6354
6491
  *
6355
- * - `"block"` (default): the footer is a flex sibling below the scroll body.
6492
+ * - `"block"` (V4 default): the footer is a flex sibling below the scroll body.
6356
6493
  * Nothing scrolls behind it.
6357
- * - `"overlay"`: the footer is absolutely overlaid on the scroll body, so the
6494
+ * - `"overlay"` (V5 default): the footer is absolutely overlaid on the scroll body, so the
6358
6495
  * transcript scrolls behind it (the chatgpt.com / claude.ai model, where the
6359
6496
  * composer is sticky inside the scroller). The widget reserves the footer's
6360
6497
  * live height as bottom padding on the scroll body and on a plugin welcome
@@ -6366,7 +6503,7 @@ type AgentWidgetComposerConfig = {
6366
6503
  * included) and `theme.components.input.backdropFilter`.
6367
6504
  *
6368
6505
  * Ignored in composer-bar mount mode, which owns its own geometry.
6369
- * @default "block"
6506
+ * @default "block" (V4), "overlay" (V5)
6370
6507
  */
6371
6508
  placement?: ComposerPlacement;
6372
6509
  /**
@@ -6380,8 +6517,9 @@ type AgentWidgetComposerConfig = {
6380
6517
  *
6381
6518
  * `"single-row"` describes the IDLE composer only. It composes with the
6382
6519
  * compact state, so a wrapped draft, chips, attachment previews, a quote, a
6383
- * pending card, or live dictation all fall back to the stacked card, exactly
6384
- * as `data-persona-composer-compact` does today.
6520
+ * pending card all fall back to the stacked card, exactly
6521
+ * as `data-persona-composer-compact` does today. Recording alone does not
6522
+ * expand the composer; dictated text expands it when it wraps.
6385
6523
  *
6386
6524
  * Ignored in composer-bar mount mode, whose pill is already one row.
6387
6525
  * @default "stacked"
@@ -6423,7 +6561,14 @@ type AgentWidgetClearChatConfig = {
6423
6561
  showTooltip?: boolean;
6424
6562
  };
6425
6563
  type AgentWidgetStatusIndicatorConfig = {
6564
+ /** Show the indicator. Explicit false also hides transient connection states. */
6426
6565
  visible?: boolean;
6566
+ /**
6567
+ * "always" shows status beneath the composer; "transient" shows connecting,
6568
+ * reconnecting, and error status above it, hiding normal idle/streaming status.
6569
+ * Available in both defaults states. Default: "always" in v4, "transient" in v5.
6570
+ */
6571
+ mode?: "always" | "transient";
6427
6572
  /** Text alignment. Default: 'right'. */
6428
6573
  align?: 'left' | 'center' | 'right';
6429
6574
  idleText?: string;
@@ -7198,7 +7343,8 @@ type AgentWidgetResolvedSuggestion = {
7198
7343
  };
7199
7344
  /** Presentation keys shared by every suggestion surface. */
7200
7345
  type AgentWidgetSuggestionSurfaceConfig = {
7201
- /** Item density. Defaults to `card` for starters and `chip` for follow-ups. */
7346
+ /** Item density. V4 starters: card. V5 starters: chip, or card in fullscreen.
7347
+ * Follow-ups default to chip. */
7202
7348
  variant?: AgentWidgetSuggestionVariant;
7203
7349
  /** Default click behavior, overridable per item. Defaults to `send`. */
7204
7350
  behavior?: AgentWidgetSuggestionBehavior;
@@ -7209,7 +7355,7 @@ type AgentWidgetSuggestionSurfaceConfig = {
7209
7355
  * own stacking.
7210
7356
  */
7211
7357
  overflow?: "scroll" | "wrap";
7212
- /** Maximum visible items. Defaults to 4. */
7358
+ /** Maximum visible items. Defaults to 4, or 3 for V5 non-fullscreen starters. */
7213
7359
  maxItems?: number;
7214
7360
  };
7215
7361
  type AgentWidgetStarterSuggestionsConfig = AgentWidgetSuggestionSurfaceConfig & {
@@ -7263,8 +7409,8 @@ type AgentWidgetSuggestionsConfig = {
7263
7409
  type AgentWidgetWelcomeVariant = "card" | "hero" | "none";
7264
7410
  /**
7265
7411
  * When the welcome surface goes away. `"never"` is the default for `"card"`;
7266
- * `"on-first-message"` is the default for `"hero"` and cannot be overridden
7267
- * there.
7412
+ * `"on-first-message"` is forced for legacy V4 `"hero"`. V5 defaults every
7413
+ * variant to `"on-first-message"`. Explicit layout opts into overridable dismissal.
7268
7414
  */
7269
7415
  type AgentWidgetWelcomeDismiss = "never" | "on-first-message";
7270
7416
  /**
@@ -7318,7 +7464,10 @@ type AgentWidgetWelcomeAlign = "start" | "center";
7318
7464
  * host-set value from a filled-in default.
7319
7465
  */
7320
7466
  interface AgentWidgetWelcomeConfig {
7321
- /** Card or hero title. Defaults to "Hello 👋". */
7467
+ /** Vertical placement: V4 defaults to top; V5 to centered. Fullscreen centered
7468
+ * welcomes also raise the empty composer unless `anchor` is explicitly set. */
7469
+ layout?: "top" | "centered";
7470
+ /** Card or hero title. V4: "Hello 👋". V5: "What can I help with?". */
7322
7471
  title?: string;
7323
7472
  /**
7324
7473
  * Small muted line above the title, e.g. a section name. Omitted when unset
@@ -7331,19 +7480,22 @@ interface AgentWidgetWelcomeConfig {
7331
7480
  icon?: AgentWidgetWelcomeIcon;
7332
7481
  /**
7333
7482
  * Horizontal alignment of the kicker, title, subtitle, and starter
7334
- * suggestions. Unset follows the variant: `card` starts, `hero` centers.
7483
+ * suggestions. Centered layouts default to center. Otherwise unset follows
7484
+ * the variant: `card` starts, `hero` centers.
7335
7485
  */
7336
7486
  align?: AgentWidgetWelcomeAlign;
7337
7487
  /** @default "card" */
7338
7488
  variant?: AgentWidgetWelcomeVariant;
7339
- /** @default "never" for `card`, always `"on-first-message"` for `hero`. */
7489
+ /** V4: never for card, forced on-first-message for hero. V5: on-first-message
7490
+ * for all variants; explicit values win. Explicit layout also allows overriding
7491
+ * the legacy hero dismissal in V4. */
7340
7492
  dismiss?: AgentWidgetWelcomeDismiss;
7341
7493
  /**
7342
7494
  * Vertical anchoring of the greeting-plus-composer pair in the EMPTY
7343
7495
  * conversation only. On the first message the pair drops to the bottom
7344
7496
  * (animated; see `data-persona-conversation-state`).
7345
7497
  *
7346
- * - `"bottom"` (default): the composer stays pinned at the bottom.
7498
+ * - `"bottom"`: the composer stays pinned at the bottom.
7347
7499
  * - `"center"`: greeting and composer float together so the composer's top
7348
7500
  * edge lands at `anchorComposerTop` of the panel column, and the welcome
7349
7501
  * surface is end-anchored `composerGap` above it.
@@ -7351,7 +7503,8 @@ interface AgentWidgetWelcomeConfig {
7351
7503
  * Composes with either `composer.placement`. Ignored in composer-bar mount
7352
7504
  * mode. `renderWelcome` plugin content inherits the anchor: the widget
7353
7505
  * positions the overlay host and reserves the composer zone.
7354
- * @default "bottom"
7506
+ * Defaults to bottom, except centered fullscreen layouts, which center the
7507
+ * measured greeting/composer group when no anchor override is supplied.
7355
7508
  */
7356
7509
  anchor?: AgentWidgetWelcomeAnchor;
7357
7510
  /**
@@ -7843,6 +7996,9 @@ type AgentWidgetLayoutConfig = {
7843
7996
  * `launcher.composerBar.contentMaxWidth`)
7844
7997
  */
7845
7998
  contentMaxWidth?: string;
7999
+ /** Fade the transcript's top edge when content is scrolled above it.
8000
+ * Defaults to false in V4 and true with future.v5Defaults. */
8001
+ topFade?: boolean;
7846
8002
  };
7847
8003
  /**
7848
8004
  * Token types for marked renderer methods
@@ -8456,7 +8612,30 @@ type AgentWidgetLoadingIndicatorConfig = {
8456
8612
  */
8457
8613
  renderIdle?: (context: IdleIndicatorRenderContext) => HTMLElement | null;
8458
8614
  };
8615
+ /** Built-in `sessionInit` triggers. See {@link AgentWidgetConfig.sessionInit}. */
8616
+ type AgentWidgetSessionInitTrigger = 'input' | 'focus' | 'mount' | 'send';
8617
+ /**
8618
+ * Custom `sessionInit` trigger. Runs when the widget mounts in client token mode,
8619
+ * and again if `update()` swaps in a different function. Call `warm()` whenever
8620
+ * the visitor shows intent (it is safe to call repeatedly). Return a cleanup to
8621
+ * run when the widget is destroyed or the hook is replaced.
8622
+ */
8623
+ type AgentWidgetSessionInitHook = (context: {
8624
+ /** Fire-and-forget early session init; latched and error-swallowing. */
8625
+ warm: () => void;
8626
+ /** The widget's mount element. */
8627
+ mount: HTMLElement;
8628
+ }) => void | (() => void);
8459
8629
  type AgentWidgetConfig = {
8630
+ /** Opt in to upcoming major-version defaults without changing explicit settings. */
8631
+ future?: {
8632
+ /**
8633
+ * Use the v5 default styling as it rolls out in 4.x. Every affected setting
8634
+ * remains independently configurable. Explicit options and theme tokens win.
8635
+ * @default false
8636
+ */
8637
+ v5Defaults?: boolean;
8638
+ };
8460
8639
  apiUrl?: string;
8461
8640
  flowId?: string;
8462
8641
  /**
@@ -8611,6 +8790,46 @@ type AgentWidgetConfig = {
8611
8790
  * ```
8612
8791
  */
8613
8792
  onSessionExpired?: () => void;
8793
+ /**
8794
+ * When the widget calls `/v1/client/init` in client token mode, ahead of the
8795
+ * first send. Ignored outside client token mode.
8796
+ *
8797
+ * - `'input'` (default): on the composer's first user keystroke that leaves
8798
+ * non-empty text. Programmatic value changes (restored drafts,
8799
+ * `setMessage()`, history recall) do not count.
8800
+ * - `'focus'`: when the visitor focuses the composer by pointer or Tab (and
8801
+ * on first input, as a fallback). Programmatic focus, such as
8802
+ * `autoFocusInput` on open or mount, does not count.
8803
+ * - `'mount'`: as soon as the widget mounts (the behavior before this option
8804
+ * existed). Use it when a server-configured welcome message, which arrives
8805
+ * with the init response, must show before the visitor types.
8806
+ * - `'send'`: no early init; the first send initializes the session.
8807
+ * - A function: custom trigger. Called on mount (and when `update()` swaps
8808
+ * in a different function) with a `warm` callback to call whenever you
8809
+ * decide (e.g. on hover); may return a cleanup that runs on destroy or
8810
+ * replacement. Replaces the built-in triggers.
8811
+ *
8812
+ * The early init is fire-and-forget: it runs at most once per session
8813
+ * lifetime (re-armed after expiry or a new conversation), sends exactly the
8814
+ * same request the send would, and swallows errors. A failure resurfaces
8815
+ * when the send retries init. A send during an in-flight early init reuses
8816
+ * it, so only one `/v1/client/init` is issued. When visitor history is
8817
+ * enabled the widget still initializes on mount to restore the conversation.
8818
+ * Hosts can also trigger it imperatively with `controller.warmSession()`.
8819
+ *
8820
+ * @default 'input'
8821
+ *
8822
+ * @example
8823
+ * ```typescript
8824
+ * config: {
8825
+ * clientToken: 'ct_live_...',
8826
+ * sessionInit: ({ warm, mount }) => {
8827
+ * mount.addEventListener('pointerenter', warm, { once: true });
8828
+ * }
8829
+ * }
8830
+ * ```
8831
+ */
8832
+ sessionInit?: AgentWidgetSessionInitTrigger | AgentWidgetSessionInitHook;
8614
8833
  /**
8615
8834
  * Get stored session ID for session resumption (client token mode only).
8616
8835
  * Called when initializing a new session to check if there's a previous session_id
@@ -8643,13 +8862,20 @@ type AgentWidgetConfig = {
8643
8862
  */
8644
8863
  setStoredSessionId?: (sessionId: string) => void;
8645
8864
  /**
8646
- * Called immediately before any cross-device history request and before a
8865
+ * With identityProvider, called before every client-token chat POST, including retries, independently of history.
8866
+ * Also called immediately before any cross-device history request and before a
8647
8867
  * conversationId resume of a conversation discovered on another device.
8648
- * Return a fresh end-user access token (rt_eu_… / JWT). Null uses exact-browser
8649
- * scope only for a never-bound visitor; a previously bound visitor fails closed
8650
- * until resetHistoryIdentity() runs. Never cached by the widget.
8868
+ * Return a fresh end-user access token (rt_eu_… / JWT). Null stops identity-enabled chat.
8869
+ * For history only, null uses exact-browser scope for a never-bound visitor;
8870
+ * a bound visitor fails closed until resetHistoryIdentity(). Never cached.
8651
8871
  */
8652
8872
  getIdentityProof?: () => string | null | Promise<string | null>;
8873
+ /**
8874
+ * Provider name registered with Runtype, for example "clerk". Enables per-request
8875
+ * chat identity through getIdentityProof without enabling history. A missing or
8876
+ * failed proof stops the turn; omitting this preserves history-only callbacks.
8877
+ */
8878
+ identityProvider?: string;
8653
8879
  /**
8654
8880
  * Read the persisted active conversation id (client token mode only).
8655
8881
  * Called only after the internal stored-state bootstrap gate resolves.
@@ -9323,6 +9549,8 @@ type AgentWidgetReasoning = {
9323
9549
  durationMs?: number;
9324
9550
  };
9325
9551
  type AgentWidgetToolCall = {
9552
+ /** Optional approval state for activity-row status chrome. */
9553
+ approvalStatus?: "pending" | "approved" | "denied" | "timeout";
9326
9554
  id: string;
9327
9555
  name?: string;
9328
9556
  status: "pending" | "running" | "complete";
@@ -9692,7 +9920,11 @@ declare class ThemeEditorState {
9692
9920
  private history;
9693
9921
  private historyIndex;
9694
9922
  private suppressHistory;
9695
- constructor(initialTheme?: Partial<PersonaTheme>, initialConfig?: Partial<AgentWidgetConfig>, options?: {
9923
+ private authoredConfig;
9924
+ private authoredTheme;
9925
+ private mergeDefaults;
9926
+ private snapshotIntent;
9927
+ constructor(initialTheme?: DeepPartial<PersonaTheme>, initialConfig?: Partial<AgentWidgetConfig>, options?: {
9696
9928
  mergeDefaults?: boolean;
9697
9929
  });
9698
9930
  /**
@@ -9731,6 +9963,8 @@ declare class ThemeEditorState {
9731
9963
  redo(): void;
9732
9964
  exportSnapshot(): ConfiguratorSnapshot;
9733
9965
  onChange(listener: ConfigChangeListener): () => void;
9966
+ private recordIntent;
9967
+ private rebaseDefaults;
9734
9968
  private syncThemeIntoConfig;
9735
9969
  private notifyListeners;
9736
9970
  private recordHistory;
@@ -9766,6 +10000,18 @@ declare const STATUS_COLORS_SECTION: SectionDef;
9766
10000
  declare const ADVANCED_TOKENS_SECTION: SectionDef;
9767
10001
  /** V2 Style tab sections: outcome-oriented editor */
9768
10002
  declare const STYLE_SECTIONS_V2: SectionDef[];
10003
+ /**
10004
+ * Resolves editor field metadata from the same versioned config and token
10005
+ * defaults as the widget. The static field value remains the fallback for
10006
+ * presentation-only values (such as intentionally blank optional tokens).
10007
+ */
10008
+ declare function resolveEditorFieldDefault(field: FieldDef, future?: AgentWidgetConfig['future']): unknown;
10009
+ /**
10010
+ * Returns editor tabs with default metadata resolved for the selected defaults
10011
+ * version. Callers keep authored values separate; this only drives UI hints.
10012
+ */
10013
+ declare function getThemeEditorTabs(future?: AgentWidgetConfig['future']): TabDef[];
10014
+ /** Legacy editor metadata, resolved through the v4 defaults tree. */
9769
10015
  declare const ALL_TABS: TabDef[];
9770
10016
  type ThemeScope = 'theme' | 'darkTheme';
9771
10017
  type ThemeVariant = 'light' | 'dark';
@@ -10177,4 +10423,4 @@ declare function runContrastChecks(state: ThemeEditorLike, level?: ContrastLevel
10177
10423
  /** Compact contrast warnings for the regions a mutation touched. */
10178
10424
  declare function quickContrastWarnings(state: ThemeEditorLike, pairKeys: string[], variant?: 'light' | 'dark' | 'both', level?: ContrastLevel): ContrastWarning[];
10179
10425
 
10180
- export { ADVANCED_TOKENS_SECTION, ALL_ROLES, ALL_TABS, ARTIFACT_DISPLAY_PREFERENCE_SECTION, BRAND_PALETTE_SECTION, BUILT_IN_PRESETS, type BuildTranscriptStreamFramesOptions, COLORS_SECTIONS, COLOR_FAMILIES, COMPONENTS_SECTIONS, COMPONENT_COLOR_SECTIONS, COMPONENT_SHAPE_SECTIONS, CONFIGURE_SECTIONS, CONFIGURE_SUB_GROUPS, CONTRAST_PAIRS, CSS_NAMED_COLORS, type ColorScaleOptions, type CompareMode, type ConfigChangeListener, type ConfiguratorSnapshot, type ContrastCheck, type ContrastLevel, type ContrastReport, type ContrastWarning, type CreateThemeEditorToolsOptions, DEVICE_DIMENSIONS, type DetectedRoleAssignment, type EditTarget, type FieldDef, type FieldType, HOME_SUGGESTION_CHIPS, INTERFACE_ROLES_SECTION, MOCK_BROWSER_CONTENT, MOCK_WORKSPACE_CONTENT, type OnChangeCallback, PALETTE_SECTION, PREVIEW_STORAGE_ADAPTER, type PreviewConfigOptions, type PreviewScene, type PreviewShellMode, type PreviewShellPalette, type PreviewTranscriptEntryPreset, RADIUS_PRESETS, ROLE_ASSISTANT_MESSAGES, ROLE_BORDERS, ROLE_FAMILIES, ROLE_FAMILY_LABELS, ROLE_HEADER, ROLE_INPUT, ROLE_INTENSITIES, ROLE_LINKS_FOCUS, ROLE_PRIMARY_ACTIONS, ROLE_SCROLL_TO_BOTTOM, ROLE_SURFACES, ROLE_USER_MESSAGES, type RoleAssignmentOptions, type RoleFamily, type RoleIntensity, type RoleState, type RoleTarget, type RoleTargetKind, SEMANTIC_COLORS_SECTION, SHADE_KEYS, SHELL_STYLE_ID, STATUS_COLORS_SECTION, STATUS_PALETTE_SECTION, STREAM_AND_ARTIFACTS_SUB_GROUP, STYLE_SECTIONS, STYLE_SECTIONS_V2, type SectionDef, type SectionPreset, type SelectOption, type SliderOptions, type SubGroupDef, THEME_EDITOR_PRESETS, THEME_SECTION, type TabDef, type ThemeEditorLike, type ThemeEditorPreset, ThemeEditorState, type ThemeSummary, type TokenRefOptions, type ToolAnnotations, type ToolContent, type ToolExecute, type ToolImageContent, type ToolResult, type ToolTextContent, type TranscriptStreamFrame, type WebMcpTool, ZOOM_MAX, ZOOM_MIN, appendPreviewTranscriptEntry, applySceneConfig, applyShellTheme, buildPreviewConfig, buildPreviewConfigWithMessages, buildShellCss, buildSrcdoc, buildSummary, buildTranscriptStreamFrames, coerceColor, coerceFamily, coerceIntensity, coerceRadius, coerceRoundnessStyle, coerceScheme, convertFromPx, convertToPx, createPreviewMessages, createPreviewTranscriptEntry, createThemeEditorTools, detectRoleAssignment, escapeHtml, findSection, formatCssValue, generateColorScale, getPreviewTranscriptPresetLabel, getShellPalette, getThemeEditorPreset, hexToHsl, hslToHex, isValidHex, normalizeColorValue, paletteColorPath, parseCssValue, presetStreamsText, quickContrastWarnings, resolveRoleAssignment, resolveThemeColorPath, rgbToHex, runContrastChecks, scopeSection, tokenRefDisplayName, toolResult, wcagContrastRatio };
10426
+ export { ADVANCED_TOKENS_SECTION, ALL_ROLES, ALL_TABS, ARTIFACT_DISPLAY_PREFERENCE_SECTION, BRAND_PALETTE_SECTION, BUILT_IN_PRESETS, type BuildTranscriptStreamFramesOptions, COLORS_SECTIONS, COLOR_FAMILIES, COMPONENTS_SECTIONS, COMPONENT_COLOR_SECTIONS, COMPONENT_SHAPE_SECTIONS, CONFIGURE_SECTIONS, CONFIGURE_SUB_GROUPS, CONTRAST_PAIRS, CSS_NAMED_COLORS, type ColorScaleOptions, type CompareMode, type ConfigChangeListener, type ConfiguratorSnapshot, type ContrastCheck, type ContrastLevel, type ContrastReport, type ContrastWarning, type CreateThemeEditorToolsOptions, DEVICE_DIMENSIONS, type DetectedRoleAssignment, type EditTarget, type FieldDef, type FieldType, HOME_SUGGESTION_CHIPS, INTERFACE_ROLES_SECTION, MOCK_BROWSER_CONTENT, MOCK_WORKSPACE_CONTENT, type OnChangeCallback, PALETTE_SECTION, PREVIEW_STORAGE_ADAPTER, type PreviewConfigOptions, type PreviewScene, type PreviewShellMode, type PreviewShellPalette, type PreviewTranscriptEntryPreset, RADIUS_PRESETS, ROLE_ASSISTANT_MESSAGES, ROLE_BORDERS, ROLE_FAMILIES, ROLE_FAMILY_LABELS, ROLE_HEADER, ROLE_INPUT, ROLE_INTENSITIES, ROLE_LINKS_FOCUS, ROLE_PRIMARY_ACTIONS, ROLE_SCROLL_TO_BOTTOM, ROLE_SURFACES, ROLE_USER_MESSAGES, type RoleAssignmentOptions, type RoleFamily, type RoleIntensity, type RoleState, type RoleTarget, type RoleTargetKind, SEMANTIC_COLORS_SECTION, SHADE_KEYS, SHELL_STYLE_ID, STATUS_COLORS_SECTION, STATUS_PALETTE_SECTION, STREAM_AND_ARTIFACTS_SUB_GROUP, STYLE_SECTIONS, STYLE_SECTIONS_V2, type SectionDef, type SectionPreset, type SelectOption, type SliderOptions, type SubGroupDef, THEME_EDITOR_PRESETS, THEME_SECTION, type TabDef, type ThemeEditorLike, type ThemeEditorPreset, ThemeEditorState, type ThemeSummary, type TokenRefOptions, type ToolAnnotations, type ToolContent, type ToolExecute, type ToolImageContent, type ToolResult, type ToolTextContent, type TranscriptStreamFrame, type WebMcpTool, ZOOM_MAX, ZOOM_MIN, appendPreviewTranscriptEntry, applySceneConfig, applyShellTheme, buildPreviewConfig, buildPreviewConfigWithMessages, buildShellCss, buildSrcdoc, buildSummary, buildTranscriptStreamFrames, coerceColor, coerceFamily, coerceIntensity, coerceRadius, coerceRoundnessStyle, coerceScheme, convertFromPx, convertToPx, createPreviewMessages, createPreviewTranscriptEntry, createThemeEditorTools, detectRoleAssignment, escapeHtml, findSection, formatCssValue, generateColorScale, getPreviewTranscriptPresetLabel, getShellPalette, getThemeEditorPreset, getThemeEditorTabs, hexToHsl, hslToHex, isValidHex, normalizeColorValue, paletteColorPath, parseCssValue, presetStreamsText, quickContrastWarnings, resolveEditorFieldDefault, resolveRoleAssignment, resolveThemeColorPath, rgbToHex, runContrastChecks, scopeSection, tokenRefDisplayName, toolResult, wcagContrastRatio };