@runtypelabs/persona 4.14.0 → 4.16.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 (119) hide show
  1. package/README.md +4 -4
  2. package/dist/animations/glyph-cycle.d.cts +1 -1
  3. package/dist/animations/glyph-cycle.d.ts +1 -1
  4. package/dist/animations/{types-DveIaNx6.d.cts → types-BpWGm7_6.d.cts} +17 -0
  5. package/dist/animations/{types-DveIaNx6.d.ts → types-BpWGm7_6.d.ts} +17 -0
  6. package/dist/animations/wipe.d.cts +1 -1
  7. package/dist/animations/wipe.d.ts +1 -1
  8. package/dist/chunk-QJ4LV2KW.js +1 -0
  9. package/dist/codegen.cjs +12 -11
  10. package/dist/codegen.js +14 -13
  11. package/dist/{context-mentions-ONG7A7M6.js → context-mentions-BTSTIBFC.js} +1 -1
  12. package/dist/context-mentions.cjs +11 -8
  13. package/dist/context-mentions.d.cts +520 -21
  14. package/dist/context-mentions.d.ts +520 -21
  15. package/dist/context-mentions.js +11 -8
  16. package/dist/index.cjs +69 -68
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +595 -46
  19. package/dist/index.d.ts +595 -46
  20. package/dist/index.global.js +60 -57
  21. package/dist/index.global.js.map +1 -1
  22. package/dist/index.js +69 -68
  23. package/dist/index.js.map +1 -1
  24. package/dist/launcher.global.js +5 -2
  25. package/dist/launcher.global.js.map +1 -1
  26. package/dist/smart-dom-reader.d.cts +520 -21
  27. package/dist/smart-dom-reader.d.ts +520 -21
  28. package/dist/testing.cjs +3 -3
  29. package/dist/testing.d.cts +7 -0
  30. package/dist/testing.d.ts +7 -0
  31. package/dist/testing.js +3 -3
  32. package/dist/theme-editor-preview.cjs +67 -67
  33. package/dist/theme-editor-preview.d.cts +534 -22
  34. package/dist/theme-editor-preview.d.ts +534 -22
  35. package/dist/theme-editor-preview.js +57 -57
  36. package/dist/theme-editor.cjs +10 -10
  37. package/dist/theme-editor.d.cts +521 -23
  38. package/dist/theme-editor.d.ts +521 -23
  39. package/dist/theme-editor.js +10 -10
  40. package/dist/theme-reference.cjs +1 -1
  41. package/dist/theme-reference.d.cts +104 -3
  42. package/dist/theme-reference.d.ts +104 -3
  43. package/dist/theme-reference.js +1 -1
  44. package/dist/widget.css +1 -1
  45. package/package.json +1 -1
  46. package/src/ask-user-question-tool.ts +10 -7
  47. package/src/components/artifact-pane.test.ts +27 -0
  48. package/src/components/artifact-pane.ts +7 -3
  49. package/src/components/artifact-preview.ts +1 -1
  50. package/src/components/composer-parts.test.ts +103 -4
  51. package/src/components/composer-parts.ts +53 -15
  52. package/src/components/header-builder.ts +27 -2
  53. package/src/components/header-layouts.test.ts +56 -0
  54. package/src/components/header-layouts.ts +29 -9
  55. package/src/components/launcher-surface.test.ts +403 -0
  56. package/src/components/launcher.ts +297 -2
  57. package/src/components/messages.ts +5 -2
  58. package/src/components/panel.ts +92 -71
  59. package/src/components/pill-composer-builder.test.ts +18 -0
  60. package/src/components/suggestions.test.ts +273 -0
  61. package/src/components/suggestions.ts +528 -86
  62. package/src/components/welcome.test.ts +121 -0
  63. package/src/components/welcome.ts +305 -0
  64. package/src/components/widget-view.test.ts +5 -3
  65. package/src/components/widget-view.ts +18 -7
  66. package/src/defaults.ts +7 -5
  67. package/src/generated/runtype-openapi-contract.ts +17 -0
  68. package/src/index-core.ts +29 -2
  69. package/src/launcher-global.ts +11 -8
  70. package/src/plugins/types.ts +136 -3
  71. package/src/presets.ts +3 -3
  72. package/src/session.ts +10 -8
  73. package/src/styles/widget-styles.test.ts +382 -0
  74. package/src/styles/widget.css +778 -4
  75. package/src/suggest-replies-tool.test.ts +233 -2
  76. package/src/suggest-replies-tool.ts +115 -39
  77. package/src/testing/mock-stream.test.ts +19 -0
  78. package/src/testing/mock-stream.ts +20 -0
  79. package/src/theme-editor/preview-utils.test.ts +34 -0
  80. package/src/theme-editor/preview-utils.ts +77 -2
  81. package/src/theme-editor/sections.test.ts +33 -0
  82. package/src/theme-editor/sections.ts +83 -6
  83. package/src/theme-reference.ts +34 -5
  84. package/src/types/theme.ts +72 -3
  85. package/src/types.ts +312 -18
  86. package/src/ui.body-top-slot.test.ts +95 -0
  87. package/src/ui.content-width.test.ts +91 -0
  88. package/src/ui.detached-panel.test.ts +1 -1
  89. package/src/ui.docked.test.ts +7 -4
  90. package/src/ui.launcher-teaser.test.ts +162 -0
  91. package/src/ui.rebuild-composer.test.ts +491 -0
  92. package/src/ui.render-welcome.test.ts +505 -0
  93. package/src/ui.scroll-additive.test.ts +91 -21
  94. package/src/ui.scroll.test.ts +302 -14
  95. package/src/ui.suggest-replies.test.ts +1112 -1
  96. package/src/ui.ts +1008 -149
  97. package/src/ui.welcome.test.ts +504 -0
  98. package/src/utils/artifact-file.test.ts +1 -1
  99. package/src/utils/artifact-gate.test.ts +27 -0
  100. package/src/utils/artifact-gate.ts +9 -0
  101. package/src/utils/attachment-manager.test.ts +37 -0
  102. package/src/utils/attachment-manager.ts +15 -0
  103. package/src/utils/auto-follow.test.ts +23 -0
  104. package/src/utils/auto-follow.ts +11 -1
  105. package/src/utils/code-generators.test.ts +40 -0
  106. package/src/utils/code-generators.ts +22 -0
  107. package/src/utils/config-merge.test.ts +24 -0
  108. package/src/utils/config-merge.ts +2 -0
  109. package/src/utils/content-width.test.ts +37 -0
  110. package/src/utils/content-width.ts +17 -0
  111. package/src/utils/icons.test.ts +26 -0
  112. package/src/utils/icons.ts +8 -0
  113. package/src/utils/plugin-storage.test.ts +94 -0
  114. package/src/utils/plugin-storage.ts +98 -0
  115. package/src/utils/theme.test.ts +216 -0
  116. package/src/utils/tokens.ts +113 -3
  117. package/src/welcome.test.ts +213 -0
  118. package/src/welcome.ts +130 -0
  119. package/dist/chunk-MMUPR2JW.js +0 -1
package/dist/index.d.cts CHANGED
@@ -2,6 +2,92 @@ import { IconNode } from 'lucide';
2
2
  import { Marked } from 'marked';
3
3
  import DOMPurify from 'dompurify';
4
4
 
5
+ interface ResolvedWelcomeConfig {
6
+ title: string;
7
+ subtitle: string;
8
+ icon?: AgentWidgetWelcomeIcon;
9
+ variant: AgentWidgetWelcomeVariant;
10
+ dismiss: AgentWidgetWelcomeDismiss;
11
+ /** Undefined under `variant: "hero"`, which suppresses the greeting. */
12
+ message?: string;
13
+ }
14
+ /**
15
+ * Per-field, presence-based precedence: `welcome.*` wins, else the legacy
16
+ * `copy` alias, else the default above.
17
+ */
18
+ declare const resolveWelcomeConfig: (config?: AgentWidgetConfig) => ResolvedWelcomeConfig;
19
+ /**
20
+ * Derived visibility, never stored. "User activity" is the same predicate the
21
+ * starters use: the session contains at least one `role: "user"` message.
22
+ */
23
+ declare const isWelcomeVisible: (resolved: ResolvedWelcomeConfig, messages: readonly AgentWidgetMessage[] | undefined) => boolean;
24
+
25
+ /**
26
+ * Synchronous key-value store handed to plugin render hooks. Backed by
27
+ * `localStorage`, namespaced per plugin id. The async `storageAdapter` cannot
28
+ * back a synchronous API and `persistState` is not a general key-value surface.
29
+ */
30
+ interface AgentWidgetPluginStorage {
31
+ get: (key: string) => string | null;
32
+ set: (key: string, value: string) => void;
33
+ remove: (key: string) => void;
34
+ }
35
+
36
+ type AgentWidgetTransformSuggestionsContext = {
37
+ /**
38
+ * Fresh copy of the suggestions entering this plugin, already normalized:
39
+ * shorthand strings expanded and the effective send/fill behavior resolved.
40
+ */
41
+ suggestions: AgentWidgetResolvedSuggestion[];
42
+ surface: AgentWidgetSuggestionSurface;
43
+ source: AgentWidgetSuggestionSource;
44
+ config: AgentWidgetConfig;
45
+ };
46
+ type AgentWidgetRenderSuggestionContext = {
47
+ /** Fully normalized suggestion, including the effective send/fill behavior. */
48
+ suggestion: AgentWidgetResolvedSuggestion;
49
+ index: number;
50
+ surface: AgentWidgetSuggestionSurface;
51
+ source: AgentWidgetSuggestionSource;
52
+ variant: AgentWidgetSuggestionVariant;
53
+ streaming: boolean;
54
+ config: AgentWidgetConfig;
55
+ /** Build Persona's standard chip, card, or list item. */
56
+ defaultRenderer: () => HTMLElement;
57
+ /**
58
+ * Run the normal selection pipeline: DOM event, plugin selection hooks, then
59
+ * send or fill. Custom renderers should call this instead of sending directly.
60
+ */
61
+ select: () => void;
62
+ };
63
+ type AgentWidgetRenderWelcomeContext = {
64
+ /** Alias-resolved welcome config; never the raw `copy.welcome*` shape. */
65
+ config: ResolvedWelcomeConfig;
66
+ variant: AgentWidgetWelcomeVariant;
67
+ /** Derived visibility for this render; governs the default renderer only. */
68
+ visible: boolean;
69
+ /** The core-owned welcome card, live-updated by `controller.update()`. */
70
+ defaultRenderer: () => HTMLElement;
71
+ sendMessage: (text: string) => void;
72
+ /** Re-run welcome arbitration: cleanups run, previous content is removed. */
73
+ requestRender: () => void;
74
+ /**
75
+ * Persona's starter renderer, wired through the full select pipeline:
76
+ * `onSuggestionSelect`, cancelable `persona:suggestion:*` events, send/fill.
77
+ */
78
+ renderStarter: (suggestion: AgentWidgetSuggestion) => HTMLElement;
79
+ /** Sync store namespaced by `persistState.keyPrefix` plus the plugin id. */
80
+ storage: AgentWidgetPluginStorage;
81
+ /** Teardown for this render; runs before the next one and on destroy. */
82
+ onCleanup: (fn: () => void) => void;
83
+ };
84
+ type AgentWidgetSuggestionSelectContext = {
85
+ suggestion: AgentWidgetResolvedSuggestion;
86
+ surface: AgentWidgetSuggestionSurface;
87
+ source: AgentWidgetSuggestionSource;
88
+ variant: AgentWidgetSuggestionVariant;
89
+ config: AgentWidgetConfig;
90
+ };
5
91
  /**
6
92
  * Plugin interface for customizing widget components
7
93
  */
@@ -14,6 +100,25 @@ interface AgentWidgetPlugin {
14
100
  * Optional priority (higher = runs first). Default: 0
15
101
  */
16
102
  priority?: number;
103
+ /**
104
+ * Transform, filter, enrich, or reorder suggestions. Hooks receive normalized
105
+ * items and compose in plugin priority order; the return value may use the
106
+ * loose shape (string shorthand included) and is re-normalized before the next
107
+ * hook. A per-item `behavior` set here survives. `maxItems` caps the list
108
+ * after the full chain. Return an empty array to hide the surface.
109
+ */
110
+ transformSuggestions?: (context: AgentWidgetTransformSuggestionsContext) => AgentWidgetSuggestion[];
111
+ /**
112
+ * Render one starter or follow-up suggestion. Return null to use Persona's
113
+ * default chip/card/list renderer. Call `select()` from custom interaction
114
+ * controls to preserve events, selection hooks, and send/fill behavior.
115
+ */
116
+ renderSuggestion?: (context: AgentWidgetRenderSuggestionContext) => HTMLElement | null;
117
+ /**
118
+ * Observe or intercept a suggestion selection. Return false to cancel the
119
+ * built-in send/fill action. Hooks run in plugin priority order.
120
+ */
121
+ onSuggestionSelect?: (context: AgentWidgetSuggestionSelectContext) => void | boolean;
17
122
  /**
18
123
  * Custom renderer for message bubbles
19
124
  * Return null to use default renderer
@@ -32,6 +137,34 @@ interface AgentWidgetPlugin {
32
137
  defaultRenderer: () => HTMLElement;
33
138
  onToggle: () => void;
34
139
  }) => HTMLElement | null;
140
+ /**
141
+ * Custom renderer for the welcome surface (card, hero, greeting stack).
142
+ * First plugin returning an element wins; null falls through to the default,
143
+ * same contract as `renderSuggestion`.
144
+ *
145
+ * The core owns the welcome host: it stays mounted for the panel's lifetime
146
+ * and content is swapped inside it. A plugin element renders regardless of
147
+ * `ctx.visible` (derived visibility governs the default renderer only) and
148
+ * the host overlays the transcript while that element is active, so a home
149
+ * screen can return over an existing conversation. Return null again to
150
+ * clear the overlay.
151
+ *
152
+ * The ctx carries no controller: plugins are host-instantiated, so close a
153
+ * factory over the init handle (`plugin.attach(controller)`).
154
+ *
155
+ * @example
156
+ * ```typescript
157
+ * renderWelcome: ({ config, renderStarter, requestRender, onCleanup }) => {
158
+ * const root = document.createElement("div");
159
+ * root.textContent = config.title;
160
+ * root.appendChild(renderStarter({ label: "Track my order" }));
161
+ * const timer = setInterval(requestRender, 60_000);
162
+ * onCleanup(() => clearInterval(timer));
163
+ * return root;
164
+ * }
165
+ * ```
166
+ */
167
+ renderWelcome?: (context: AgentWidgetRenderWelcomeContext) => HTMLElement | null;
35
168
  /**
36
169
  * Custom renderer for panel header
37
170
  * Return null to use default renderer
@@ -76,6 +209,15 @@ interface AgentWidgetPlugin {
76
209
  * Omitted when `config.voiceRecognition.enabled` is not true.
77
210
  */
78
211
  onVoiceToggle?: () => void;
212
+ /**
213
+ * Re-run composer arbitration and swap the footer in place. The hook runs
214
+ * once at panel construction, so this is how a composer plugin unlocks
215
+ * (returns null) or re-renders later. Pending attachments, the mention
216
+ * affordances, and the composer listener registry are re-wired by the core.
217
+ */
218
+ requestRender: () => void;
219
+ /** Same sync store as the `renderWelcome` ctx, namespaced per plugin id. */
220
+ storage: AgentWidgetPluginStorage;
79
221
  }) => HTMLElement | null;
80
222
  /**
81
223
  * Custom renderer for reasoning bubbles
@@ -456,6 +598,15 @@ interface PanelTokens extends ComponentTokenSet {
456
598
  /** Background of the region revealed behind a detached panel. */
457
599
  canvasBackground?: string;
458
600
  }
601
+ /** Per-element text styling shared by themable text surfaces. */
602
+ interface TextStyleTokens {
603
+ fontFamily?: string;
604
+ fontSize?: string;
605
+ fontWeight?: string;
606
+ lineHeight?: string;
607
+ letterSpacing?: string;
608
+ color?: TokenReference<'color'>;
609
+ }
459
610
  interface HeaderTokens extends ComponentTokenSet {
460
611
  background: TokenReference<'color'>;
461
612
  border: TokenReference<'color'>;
@@ -464,10 +615,14 @@ interface HeaderTokens extends ComponentTokenSet {
464
615
  iconBackground: TokenReference<'color'>;
465
616
  /** Foreground (glyph stroke or emoji text) on the header avatar tile. */
466
617
  iconForeground: TokenReference<'color'>;
467
- /** Header title line (next to the icon, or minimal layout title). */
618
+ /** Legacy alias of `title.color`; `title.color` wins when both are set. */
468
619
  titleForeground: TokenReference<'color'>;
469
- /** Header subtitle line under the title. */
620
+ /** Legacy alias of `subtitle.color`; `subtitle.color` wins when both are set. */
470
621
  subtitleForeground: TokenReference<'color'>;
622
+ /** Header title typography (next to the icon, or minimal layout title). */
623
+ title?: TextStyleTokens;
624
+ /** Header subtitle typography, for the line under the title. */
625
+ subtitle?: TextStyleTokens;
471
626
  /** Default color for clear / close icon buttons when launcher overrides are unset. */
472
627
  actionIconForeground: TokenReference<'color'>;
473
628
  /** Box-shadow on the header (e.g., a fade shadow to replace the default border). */
@@ -497,7 +652,7 @@ interface MessageTokens {
497
652
  }
498
653
  /**
499
654
  * Welcome / intro card rendered above the message list when no messages exist.
500
- * Set `copy.showWelcomeCard: false` to hide it; use `layout.slots["body-top"]`
655
+ * Set `welcome.variant: "none"` to hide it; use `layout.slots["body-top"]`
501
656
  * to replace it wholesale.
502
657
  */
503
658
  interface IntroCardTokens extends ComponentTokenSet {
@@ -506,6 +661,12 @@ interface IntroCardTokens extends ComponentTokenSet {
506
661
  padding?: TokenReference<'spacing'>;
507
662
  /** Box-shadow on the intro card (token ref or raw CSS, e.g. `none`). */
508
663
  shadow?: string;
664
+ /** Full border shorthand on the intro card (raw CSS, e.g. `"1px solid rgba(0,0,0,0.1)"`). @default "none" */
665
+ border?: string;
666
+ /** Welcome title typography. */
667
+ title?: TextStyleTokens;
668
+ /** Welcome subtitle typography. */
669
+ subtitle?: TextStyleTokens;
509
670
  }
510
671
  /** Collapsible widget chrome (tool bubbles, reasoning bubbles, approval bubbles). */
511
672
  interface CollapsibleWidgetTokens {
@@ -548,6 +709,8 @@ interface MarkdownTokens {
548
709
  background?: TokenReference<'color'>;
549
710
  borderColor?: TokenReference<'color'>;
550
711
  textColor?: TokenReference<'color'>;
712
+ /** Corner radius; follows `palette.radius.md` by default so square-corner themes get square code blocks. */
713
+ borderRadius?: TokenReference<'radius'>;
551
714
  };
552
715
  /** Table styling. */
553
716
  table?: {
@@ -605,10 +768,27 @@ interface ToolBubbleTokens {
605
768
  interface ReasoningBubbleTokens {
606
769
  shadow: string;
607
770
  }
771
+ /** Scrollbar appearance shared by every scroller in the widget. */
772
+ interface ScrollbarTokens {
773
+ /** Thumb color. @default semantic.colors.border */
774
+ thumb?: TokenReference<'color'>;
775
+ /** Track color. @default "transparent" */
776
+ track?: TokenReference<'color'>;
777
+ }
608
778
  /** Composer (message input) chrome. */
609
779
  interface ComposerChromeTokens {
610
780
  /** Box-shadow on the composer form (raw CSS, e.g. `none`). */
611
781
  shadow: string;
782
+ /** Border color of the composer form. @default semantic.colors.border */
783
+ borderColor?: TokenReference<'color'>;
784
+ /** Inner padding of the composer form (raw CSS shorthand). @default "0.75rem 1rem" */
785
+ padding?: string;
786
+ /** Gap between the textarea row and the actions row. @default "0.5rem" */
787
+ gap?: string;
788
+ /** Composer textarea font-size. @default "0.875rem" */
789
+ fontSize?: string;
790
+ /** Composer textarea line-height. @default "1.25rem" */
791
+ lineHeight?: string;
612
792
  }
613
793
  /** Artifact toolbar chrome. */
614
794
  interface ArtifactToolbarTokens {
@@ -758,6 +938,29 @@ interface ScrollToBottomTokens extends ComponentTokenSet {
758
938
  fontSize?: string;
759
939
  iconSize?: string;
760
940
  }
941
+ /** Visual tokens shared by one suggestion presentation variant. */
942
+ interface SuggestionVariantTokens extends ComponentTokenSet {
943
+ /** Space inside one item, between its icon and its copy. */
944
+ gap?: string;
945
+ /** Space between suggestion items in the container. */
946
+ itemGap?: string;
947
+ minHeight?: string;
948
+ fontSize?: string;
949
+ lineHeight?: string;
950
+ iconSize?: string;
951
+ hoverBackground?: TokenReference<'color'>;
952
+ hoverForeground?: TokenReference<'color'>;
953
+ hoverBorder?: TokenReference<'color'>;
954
+ pressedBackground?: TokenReference<'color'>;
955
+ focusRing?: TokenReference<'color'>;
956
+ disabledOpacity?: string;
957
+ }
958
+ /** Starter and follow-up suggestion chrome. */
959
+ interface SuggestionTokens {
960
+ chip: SuggestionVariantTokens;
961
+ card: SuggestionVariantTokens;
962
+ list: SuggestionVariantTokens;
963
+ }
761
964
  /** Toggle group chrome (used by createToggleGroup). */
762
965
  interface ToggleGroupTokens {
763
966
  /** Gap between toggle buttons. Default: 0 (connected). */
@@ -782,12 +985,16 @@ interface ComponentTokens {
782
985
  toolBubble: ToolBubbleTokens;
783
986
  reasoningBubble: ReasoningBubbleTokens;
784
987
  composer: ComposerChromeTokens;
988
+ /** Scrollbar appearance for every scroller in the widget. */
989
+ scrollbar?: ScrollbarTokens;
785
990
  /** Icon button styling tokens. */
786
991
  iconButton?: IconButtonTokens;
787
992
  /** Label button styling tokens. */
788
993
  labelButton?: LabelButtonTokens;
789
994
  /** Scroll-to-bottom indicator styling tokens. */
790
995
  scrollToBottom?: ScrollToBottomTokens;
996
+ /** Starter prompt and follow-up suggestion styling tokens. */
997
+ suggestion?: SuggestionTokens;
791
998
  /** Toggle group styling tokens. */
792
999
  toggleGroup?: ToggleGroupTokens;
793
1000
  /** Artifact toolbar, tab strip, and pane chrome. */
@@ -1109,7 +1316,24 @@ type RuntypeExecutionStreamEvent = ({
1109
1316
  type: "source";
1110
1317
  url?: string;
1111
1318
  [key: string]: unknown;
1319
+ } | {
1320
+ executionId: string;
1321
+ iteration?: number;
1322
+ seq: number;
1323
+ state: Record<string, unknown>;
1324
+ type: "state_snapshot";
1112
1325
  } | ({
1326
+ executionId: string;
1327
+ iteration?: number;
1328
+ patch: Array<{
1329
+ from?: string;
1330
+ op: "add" | "remove" | "replace" | "move" | "copy" | "test";
1331
+ path: string;
1332
+ value?: unknown;
1333
+ }>;
1334
+ seq: number;
1335
+ type: "state_delta";
1336
+ }) | ({
1113
1337
  executionId: string;
1114
1338
  hiddenParameterNames?: Array<string>;
1115
1339
  iteration?: number;
@@ -1481,6 +1705,7 @@ declare const LUCIDE_ICONS: {
1481
1705
  readonly plus: IconNode;
1482
1706
  readonly minus: IconNode;
1483
1707
  readonly pencil: IconNode;
1708
+ readonly "pen-line": IconNode;
1484
1709
  readonly trash: IconNode;
1485
1710
  readonly "trash-2": IconNode;
1486
1711
  readonly save: IconNode;
@@ -1523,11 +1748,13 @@ declare const LUCIDE_ICONS: {
1523
1748
  readonly folder: IconNode;
1524
1749
  readonly "folder-open": IconNode;
1525
1750
  readonly files: IconNode;
1751
+ readonly "chart-column": IconNode;
1526
1752
  readonly sparkles: IconNode;
1527
1753
  readonly zap: IconNode;
1528
1754
  readonly sun: IconNode;
1529
1755
  readonly moon: IconNode;
1530
1756
  readonly flag: IconNode;
1757
+ readonly lightbulb: IconNode;
1531
1758
  readonly monitor: IconNode;
1532
1759
  readonly smartphone: IconNode;
1533
1760
  };
@@ -2680,6 +2907,13 @@ type AgentWidgetArtifactsLayoutConfig = {
2680
2907
  * @default 520
2681
2908
  */
2682
2909
  narrowHostMaxWidth?: number;
2910
+ /**
2911
+ * Width of the slide-over artifact drawer (the narrow-host and mobile
2912
+ * presentations; `paneWidth`/`paneMaxWidth` only size the desktop split).
2913
+ * CSS length; `"100%"` makes the drawer cover the whole panel.
2914
+ * @default min(calc(100% - 1rem), 22rem)
2915
+ */
2916
+ drawerWidth?: string;
2683
2917
  /**
2684
2918
  * When true (default), widen the launcher panel while artifacts are visible and not user-dismissed.
2685
2919
  * No-op for inline embed (`launcher.enabled === false`).
@@ -3308,6 +3542,18 @@ type AgentWidgetScrollMode = "follow" | "anchor-top" | "none";
3308
3542
  * restored thread opens at a readable place rather than at the very bottom.
3309
3543
  */
3310
3544
  type AgentWidgetScrollRestorePosition = "bottom" | "last-user-turn";
3545
+ /**
3546
+ * Scrollbar visibility policy for every scroll surface in the widget.
3547
+ *
3548
+ * - `"on-scroll"` hides bars at rest and reveals them on genuine reader
3549
+ * input, keeping them visible while the reader is away from the resting
3550
+ * position: overlay-scrollbar semantics on every platform.
3551
+ * - `"auto"` keeps the themed bar under native visibility semantics: overlay
3552
+ * platforms still auto-hide, classic-scrollbar platforms (Windows,
3553
+ * always-show macOS) show it persistently.
3554
+ * - `"hidden"` never shows an indicator. Scrolling itself is unaffected.
3555
+ */
3556
+ type AgentWidgetScrollbarPolicy = "on-scroll" | "auto" | "hidden";
3311
3557
  type AgentWidgetScrollBehaviorFeature = {
3312
3558
  /** Scroll behavior during streamed responses. @default "anchor-top" */
3313
3559
  mode?: AgentWidgetScrollMode;
@@ -3352,6 +3598,13 @@ type AgentWidgetScrollBehaviorFeature = {
3352
3598
  * @default false
3353
3599
  */
3354
3600
  announce?: boolean;
3601
+ /**
3602
+ * Scrollbar visibility policy, applied to the transcript and every inner
3603
+ * scroller through one root attribute. Themable via
3604
+ * `--persona-scrollbar-thumb` and `--persona-scrollbar-track`.
3605
+ * @default "on-scroll"
3606
+ */
3607
+ scrollbar?: AgentWidgetScrollbarPolicy;
3355
3608
  };
3356
3609
  type AgentWidgetScrollToBottomFeature = {
3357
3610
  /**
@@ -3641,10 +3894,13 @@ type AgentWidgetFeatureFlags = {
3641
3894
  */
3642
3895
  askUserQuestion?: AgentWidgetAskUserQuestionFeature;
3643
3896
  /**
3644
- * Built-in `suggest_replies` quick-reply chips. When the assistant invokes
3645
- * the tool, the widget shows the suggestions as tappable chips above the
3646
- * composer (reusing the suggestion-chips surface) and immediately resumes
3647
- * the execution: fire-and-forget, no user input awaited.
3897
+ * Built-in `suggest_replies` follow-ups. When the assistant invokes the
3898
+ * tool, the widget shows the suggestions using `suggestions.followUps` and
3899
+ * immediately resumes the execution: fire-and-forget, no user input awaited.
3900
+ *
3901
+ * @deprecated Both keys moved to `suggestions.followUps`: use
3902
+ * `suggestions.followUps.enabled` and `suggestions.followUps.expose`. This
3903
+ * alias keeps working per key, with `suggestions.followUps` winning.
3648
3904
  */
3649
3905
  suggestReplies?: AgentWidgetSuggestRepliesFeature;
3650
3906
  };
@@ -3689,11 +3945,12 @@ type WidgetPreferenceSlice = {
3689
3945
  };
3690
3946
  };
3691
3947
  /**
3692
- * Feature config for the built-in `suggest_replies` quick-reply chips.
3693
- * Chips render in the existing suggestions slot above the composer and are
3694
- * styled by the widget-level `suggestionChipsConfig`. A tapped chip is sent
3695
- * verbatim as the user's next message; chips clear once any user message
3696
- * follows them.
3948
+ * Feature config for the built-in `suggest_replies` follow-ups.
3949
+ *
3950
+ * @deprecated Both keys moved to `suggestions.followUps`
3951
+ * (`suggestions.followUps.enabled` / `suggestions.followUps.expose`), which
3952
+ * also owns presentation, placement, and send/fill behavior. Resolution is
3953
+ * per key with `suggestions.followUps` winning; removal waits for 5.0.
3697
3954
  */
3698
3955
  type AgentWidgetSuggestRepliesFeature = {
3699
3956
  /**
@@ -3701,14 +3958,18 @@ type AgentWidgetSuggestRepliesFeature = {
3701
3958
  * renders as a regular tool bubble and is NOT auto-resumed: only set this
3702
3959
  * with no server-side `suggest_replies` declaration, or the execution
3703
3960
  * parks awaiting a resume that never comes.
3961
+ * @deprecated Use `suggestions.followUps.enabled`.
3704
3962
  */
3705
3963
  enabled?: boolean;
3706
3964
  /**
3707
3965
  * Advertise the built-in `suggest_replies` tool to the agent on every
3708
3966
  * dispatch via `clientTools[]`: no server-side `runtimeTools` declaration
3709
- * needed. Defaults to `false`: flows that already declare the tool via
3710
- * `runtimeTools` would otherwise present it to the model twice. Ignored
3711
- * when `enabled` is `false`.
3967
+ * needed. Defaults to `false`. Declare the tool in one place: the API
3968
+ * dedupes a double declaration by name with `clientTools[]` winning, so the
3969
+ * model still sees exactly one tool, but the widget's description and schema
3970
+ * win and the effective tool type becomes `local` (the execution pauses and
3971
+ * the widget auto-resumes it). Ignored when `enabled` is `false`.
3972
+ * @deprecated Use `suggestions.followUps.expose`.
3712
3973
  */
3713
3974
  expose?: boolean;
3714
3975
  };
@@ -3778,10 +4039,13 @@ type AgentWidgetAskUserQuestionFeature = {
3778
4039
  * matching {@link AskUserQuestionPayload}; when the model calls it, the
3779
4040
  * existing answer-pill sheet renders and the answer resumes the execution.
3780
4041
  *
3781
- * Defaults to `false`: flows that already declare `ask_user_question` via
3782
- * `runtimeTools` would otherwise present the tool to the model twice.
3783
- * Ignored when `enabled` is `false`: never offer the agent a question
3784
- * tool the widget can't render an answer UI for.
4042
+ * Defaults to `false`. Declare the tool in one place: the API dedupes a
4043
+ * double declaration by name with `clientTools[]` winning, so the model
4044
+ * still sees exactly one tool, but the widget's description and schema win
4045
+ * and the effective tool type becomes `local` (the execution pauses and the
4046
+ * widget resumes it with the user's answer). Ignored when `enabled` is
4047
+ * `false`: never offer the agent a question tool the widget can't render an
4048
+ * answer UI for.
3785
4049
  */
3786
4050
  expose?: boolean;
3787
4051
  /** Slide-in animation duration in ms. Defaults to 180. */
@@ -4246,6 +4510,57 @@ type AgentWidgetLauncherConfig = {
4246
4510
  * @example "min(380px, calc(100vw - 48px))"
4247
4511
  */
4248
4512
  collapsedMaxWidth?: string;
4513
+ /**
4514
+ * Proactive nudge bubble anchored above the collapsed floating launcher.
4515
+ * Omit it (the default) and no teaser renders.
4516
+ */
4517
+ teaser?: AgentWidgetLauncherTeaserConfig;
4518
+ };
4519
+ /**
4520
+ * Launcher teaser: a small bubble above the collapsed launcher. Clicking it
4521
+ * opens the panel and consumes the teaser exactly like an explicit dismissal.
4522
+ * Within a single page load the teaser appears at most once under either
4523
+ * frequency.
4524
+ *
4525
+ * @example
4526
+ * ```typescript
4527
+ * launcher: {
4528
+ * teaser: { text: "Need a hand picking a plan?", delayMs: 3000 }
4529
+ * }
4530
+ * ```
4531
+ */
4532
+ type AgentWidgetLauncherTeaserConfig = {
4533
+ /** Bubble copy. An empty string renders no teaser. */
4534
+ text: string;
4535
+ /**
4536
+ * Delay before the bubble appears, in milliseconds.
4537
+ * @default 0
4538
+ */
4539
+ delayMs?: number;
4540
+ /**
4541
+ * How often the teaser may return.
4542
+ *
4543
+ * `"once"`: a dismissal or a click-through is remembered in `localStorage`
4544
+ * under `` `${persistState.keyPrefix ?? "persona-"}teaser-dismissed` `` and
4545
+ * the teaser never returns on that browser. `"always"`: shows on every page
4546
+ * load, tracked in memory only. `persistState: false` downgrades `"once"` to
4547
+ * in-memory too, so the teaser reappears each load.
4548
+ *
4549
+ * Custom `storageAdapter` implementations do not participate in teaser state.
4550
+ *
4551
+ * @default "once"
4552
+ */
4553
+ frequency?: "once" | "always";
4554
+ /**
4555
+ * Render an x affordance that dismisses the teaser without opening the panel.
4556
+ * @default true
4557
+ */
4558
+ dismissible?: boolean;
4559
+ /**
4560
+ * Accessible label for the dismiss affordance.
4561
+ * @default "Dismiss message"
4562
+ */
4563
+ dismissLabel?: string;
4249
4564
  };
4250
4565
  type AgentWidgetSendButtonConfig = {
4251
4566
  borderWidth?: string;
@@ -4254,6 +4569,10 @@ type AgentWidgetSendButtonConfig = {
4254
4569
  paddingY?: string;
4255
4570
  iconText?: string;
4256
4571
  iconName?: string;
4572
+ /** Icon glyph box in icon mode, e.g. "20px". Defaults to half of `size`. */
4573
+ iconSize?: string;
4574
+ /** Stroke width for the icon glyph, in viewBox units. Default 2. */
4575
+ iconStrokeWidth?: number;
4257
4576
  useIcon?: boolean;
4258
4577
  tooltipText?: string;
4259
4578
  showTooltip?: boolean;
@@ -5022,6 +5341,177 @@ type AgentWidgetSuggestionChipsConfig = {
5022
5341
  paddingX?: string;
5023
5342
  paddingY?: string;
5024
5343
  };
5344
+ /** A suggested next action shown to the user. Strings remain supported as shorthand. */
5345
+ type AgentWidgetSuggestion = string | {
5346
+ /** Stable analytics / DOM identity. Falls back to the prompt or label. */
5347
+ id?: string;
5348
+ /** Concise visible action label. */
5349
+ label: string;
5350
+ /** Text placed in the composer or sent. Defaults to `label`. */
5351
+ prompt?: string;
5352
+ /**
5353
+ * Optional supporting copy, most useful with the `card` variant. The
5354
+ * `chip` variant ignores it and renders the label alone.
5355
+ */
5356
+ description?: string;
5357
+ /** Optional icon from Persona's bundled Lucide registry. */
5358
+ icon?: IconName;
5359
+ /**
5360
+ * CSS color for this item's glyph. Tints the icon only: label, border,
5361
+ * and background stay neutral. Ignored without an `icon`.
5362
+ */
5363
+ iconColor?: string;
5364
+ /** Override the surface's click behavior for this item. */
5365
+ behavior?: AgentWidgetSuggestionBehavior;
5366
+ /** Visually promote one high-confidence action. */
5367
+ emphasis?: "default" | "primary";
5368
+ };
5369
+ type AgentWidgetSuggestionBehavior = "send" | "fill";
5370
+ type AgentWidgetSuggestionVariant = "chip" | "card" | "list";
5371
+ type AgentWidgetSuggestionSurface = "starter" | "followUp";
5372
+ /**
5373
+ * Who produced the rendered suggestions: static config, the agent's
5374
+ * `suggest_replies` tool, or `controller.setFollowUpSuggestions`.
5375
+ */
5376
+ type AgentWidgetSuggestionSource = "config" | "agent" | "host";
5377
+ /**
5378
+ * A suggestion after Persona has normalized shorthand strings and resolved the
5379
+ * effective click behavior. Plugin hooks receive this stable shape.
5380
+ */
5381
+ type AgentWidgetResolvedSuggestion = {
5382
+ id: string;
5383
+ label: string;
5384
+ prompt: string;
5385
+ description?: string;
5386
+ icon?: IconName;
5387
+ /** CSS color for the glyph only; never the label, border, or background. */
5388
+ iconColor?: string;
5389
+ behavior: AgentWidgetSuggestionBehavior;
5390
+ emphasis: "default" | "primary";
5391
+ };
5392
+ /** Presentation keys shared by every suggestion surface. */
5393
+ type AgentWidgetSuggestionSurfaceConfig = {
5394
+ /** Item density. Defaults to `card` for starters and `chip` for follow-ups. */
5395
+ variant?: AgentWidgetSuggestionVariant;
5396
+ /** Default click behavior, overridable per item. Defaults to `send`. */
5397
+ behavior?: AgentWidgetSuggestionBehavior;
5398
+ /**
5399
+ * Layout for items past the surface width. Defaults to `wrap` on every
5400
+ * surface; `scroll` opts into a horizontal strip for large sets. Applies
5401
+ * to the `chip` variant only; the `card` and `list` layouts manage their
5402
+ * own stacking.
5403
+ */
5404
+ overflow?: "scroll" | "wrap";
5405
+ /** Maximum visible items. Defaults to 4. */
5406
+ maxItems?: number;
5407
+ };
5408
+ type AgentWidgetStarterSuggestionsConfig = AgentWidgetSuggestionSurfaceConfig & {
5409
+ /** Suggestions shown before the first user message. */
5410
+ items?: AgentWidgetSuggestion[];
5411
+ /**
5412
+ * `auto` uses the welcome surface when the welcome card renders and the
5413
+ * composer otherwise. Explicit values are literal: `welcome` renders
5414
+ * nothing when the welcome card is hidden. Defaults to `auto`.
5415
+ */
5416
+ placement?: "auto" | "welcome" | "composer";
5417
+ };
5418
+ type AgentWidgetFollowUpSuggestionsConfig = AgentWidgetSuggestionSurfaceConfig & {
5419
+ /**
5420
+ * Enable the built-in `suggest_replies` follow-ups. Defaults to true. When
5421
+ * false, `suggest_replies` renders as a regular tool bubble and is NOT
5422
+ * auto-resumed: only set this with no server-side `suggest_replies`
5423
+ * declaration, or the execution parks awaiting a resume that never comes.
5424
+ */
5425
+ enabled?: boolean;
5426
+ /**
5427
+ * Advertise the built-in `suggest_replies` tool to the agent on every
5428
+ * dispatch via `clientTools[]`: no server-side `runtimeTools` declaration
5429
+ * needed. Defaults to `false`. Declare the tool in one place: the API
5430
+ * dedupes a double declaration by name with `clientTools[]` winning, so
5431
+ * the model still sees exactly one tool, but the widget's description and
5432
+ * schema win and the effective tool type becomes `local` (the execution
5433
+ * pauses and the widget auto-resumes it). Ignored when `enabled` is
5434
+ * `false`.
5435
+ */
5436
+ expose?: boolean;
5437
+ /**
5438
+ * `auto` places follow-ups after the transcript in regular panels and above
5439
+ * the composer in composer-bar mode. Defaults to `auto`.
5440
+ */
5441
+ placement?: "auto" | "after-message" | "composer";
5442
+ };
5443
+ /**
5444
+ * Structured suggestions configuration. The legacy `suggestionChips` and
5445
+ * `suggestionChipsConfig` fields remain supported for backwards compatibility.
5446
+ */
5447
+ type AgentWidgetSuggestionsConfig = {
5448
+ starters?: AgentWidgetStarterSuggestionsConfig;
5449
+ followUps?: AgentWidgetFollowUpSuggestionsConfig;
5450
+ };
5451
+ /**
5452
+ * Which welcome surface renders.
5453
+ * `"card"` is the top-of-scroll intro card (default, back-compatible),
5454
+ * `"hero"` centers it in the empty conversation, `"none"` renders no surface.
5455
+ */
5456
+ type AgentWidgetWelcomeVariant = "card" | "hero" | "none";
5457
+ /**
5458
+ * When the welcome surface goes away. `"never"` is the default for `"card"`;
5459
+ * `"on-first-message"` is the default for `"hero"` and cannot be overridden
5460
+ * there.
5461
+ */
5462
+ type AgentWidgetWelcomeDismiss = "never" | "on-first-message";
5463
+ /**
5464
+ * Avatar or logo shown above the welcome title. Discriminated union; the
5465
+ * function form is the escape hatch for custom markup. There is deliberately
5466
+ * no raw HTML string variant (sanitization surface plus accessibility hole).
5467
+ */
5468
+ type AgentWidgetWelcomeIcon = {
5469
+ type: "lucide";
5470
+ name: IconName;
5471
+ }
5472
+ /** `alt` is required, and may be `""` for a decorative logo. */
5473
+ | {
5474
+ type: "image";
5475
+ url: string;
5476
+ alt: string;
5477
+ }
5478
+ /** Emoji or short text glyph. */
5479
+ | {
5480
+ type: "text";
5481
+ text: string;
5482
+ } | (() => HTMLElement | SVGElement);
5483
+ /**
5484
+ * First-open welcome surface. Consolidates the deprecated
5485
+ * `copy.welcomeTitle` / `copy.welcomeSubtitle` / `copy.showWelcomeCard`
5486
+ * options; a field present here wins over its legacy alias.
5487
+ *
5488
+ * All defaults live in the resolver (`resolveWelcomeConfig`), never in
5489
+ * `DEFAULT_WIDGET_CONFIG`: presence on this object is what distinguishes a
5490
+ * host-set value from a filled-in default.
5491
+ */
5492
+ interface AgentWidgetWelcomeConfig {
5493
+ /** Card or hero title. Defaults to "Hello 👋". */
5494
+ title?: string;
5495
+ /** Scope statement in the assistant's voice. Empty string omits it. */
5496
+ subtitle?: string;
5497
+ /** Avatar or logo shown above the title. */
5498
+ icon?: AgentWidgetWelcomeIcon;
5499
+ /** @default "card" */
5500
+ variant?: AgentWidgetWelcomeVariant;
5501
+ /** @default "never" for `card`, always `"on-first-message"` for `hero`. */
5502
+ dismiss?: AgentWidgetWelcomeDismiss;
5503
+ /**
5504
+ * Display-only greeting bubble pinned at transcript position zero. It is UI
5505
+ * chrome derived from config, never a session message: it does not appear in
5506
+ * `getMessages()`, is never persisted or sent to the model, `onMessage` does
5507
+ * not fire for it, and it survives `clearChat()`. Use an assistant
5508
+ * `initialMessages` entry instead when the model should see the greeting.
5509
+ *
5510
+ * Ignored (with a debug-mode warning) when `variant` is `"hero"`: the hero
5511
+ * is the greeting.
5512
+ */
5513
+ message?: string;
5514
+ }
5025
5515
  /**
5026
5516
  * Interface for pluggable stream parsers that extract text from streaming responses.
5027
5517
  * Parsers handle incremental parsing to extract text values from structured formats (JSON, XML, etc.).
@@ -5268,7 +5758,9 @@ type AgentWidgetHeaderLayoutConfig = {
5268
5758
  */
5269
5759
  render?: (context: HeaderRenderContext) => HTMLElement;
5270
5760
  /**
5271
- * Shown after the title in `minimal` header layout (e.g. chevron menu affordance).
5761
+ * Icon action buttons at the trailing edge of the `minimal` header layout,
5762
+ * clustered with the close button and sharing its chrome. For a menu
5763
+ * affordance next to the title, use `titleMenu` instead.
5272
5764
  */
5273
5765
  trailingActions?: AgentWidgetHeaderTrailingAction[];
5274
5766
  /** Called when a `trailingActions` button is clicked. */
@@ -5448,7 +5940,11 @@ type AgentWidgetLayoutConfig = {
5448
5940
  /**
5449
5941
  * Max width for the content area (messages + composer).
5450
5942
  * Applied with `margin: 0 auto` for centering.
5451
- * Accepts any CSS width value (e.g. "90ch", "720px", "80%").
5943
+ * Accepts any CSS width value (e.g. "90ch", "720px", "80%"), or "none"
5944
+ * for a full-width column. Only engages on panels wider than the cap,
5945
+ * so launcher-width panels are unaffected.
5946
+ * @default "768px" ("720px" in composer-bar mode via
5947
+ * `launcher.composerBar.contentMaxWidth`)
5452
5948
  */
5453
5949
  contentMaxWidth?: string;
5454
5950
  };
@@ -6196,7 +6692,9 @@ type AgentWidgetConfig = {
6196
6692
  */
6197
6693
  getHeaders?: AgentWidgetHeadersFunction;
6198
6694
  copy?: {
6695
+ /** @deprecated Use `welcome.title`. */
6199
6696
  welcomeTitle?: string;
6697
+ /** @deprecated Use `welcome.subtitle`. */
6200
6698
  welcomeSubtitle?: string;
6201
6699
  inputPlaceholder?: string;
6202
6700
  sendButtonLabel?: string;
@@ -6204,6 +6702,7 @@ type AgentWidgetConfig = {
6204
6702
  stopButtonLabel?: string;
6205
6703
  /**
6206
6704
  * When false, the welcome / intro card is not shown above the message list.
6705
+ * @deprecated Use `welcome.variant: "none"`.
6207
6706
  * @default true
6208
6707
  */
6209
6708
  showWelcomeCard?: boolean;
@@ -6268,7 +6767,17 @@ type AgentWidgetConfig = {
6268
6767
  * with `initialArtifacts`.
6269
6768
  */
6270
6769
  initialSelectedArtifactId?: string | null;
6770
+ /** Rich starter and follow-up suggestion surfaces. */
6771
+ suggestions?: AgentWidgetSuggestionsConfig;
6772
+ /**
6773
+ * First-open welcome surface (card, hero, or none) plus the optional
6774
+ * display-only greeting bubble. Supersedes `copy.welcomeTitle`,
6775
+ * `copy.welcomeSubtitle`, and `copy.showWelcomeCard`.
6776
+ */
6777
+ welcome?: AgentWidgetWelcomeConfig;
6778
+ /** @deprecated Prefer `suggestions.starters.items`. */
6271
6779
  suggestionChips?: string[];
6780
+ /** @deprecated Prefer semantic tokens under `theme.components.suggestion`. */
6272
6781
  suggestionChipsConfig?: AgentWidgetSuggestionChipsConfig;
6273
6782
  debug?: boolean;
6274
6783
  formEndpoint?: string;
@@ -8473,6 +8982,19 @@ type Controller = {
8473
8982
  * @deprecated Use injectMessage() instead.
8474
8983
  */
8475
8984
  injectTestMessage: (event: AgentWidgetEvent) => void;
8985
+ /**
8986
+ * Show follow-up suggestions from host code. An ephemeral UI overlay: the
8987
+ * items never enter the transcript, the wire payload, or persisted state, so
8988
+ * they do not survive a refresh. Cleared automatically when the next user
8989
+ * message appends. Latest writer wins against the agent's `suggest_replies`
8990
+ * payloads: this call overrides chips shown now, and a payload arriving
8991
+ * afterwards overrides these. Renders through the `suggestions.followUps`
8992
+ * presentation config and the full plugin and `persona:suggestReplies:*`
8993
+ * event pipeline, with source `"host"`. An empty array clears.
8994
+ */
8995
+ setFollowUpSuggestions: (items: AgentWidgetSuggestion[]) => void;
8996
+ /** Remove host-set follow-up suggestions. Agent-set chips are untouched. */
8997
+ clearFollowUpSuggestions: () => void;
8476
8998
  getMessages: () => AgentWidgetMessage[];
8477
8999
  getStatus: () => AgentWidgetSessionStatus;
8478
9000
  getPersistentMetadata: () => Record<string, unknown>;
@@ -8655,15 +9177,18 @@ declare const removeAskUserQuestionSheet: (overlay: HTMLElement | null | undefin
8655
9177
  * `clientTools[]` (set `features.askUserQuestion.expose: true`): the same
8656
9178
  * wire surface WebMCP page tools ride. The server registers it as a LOCAL
8657
9179
  * tool under its bare name (`origin: 'sdk'` tools are not `webmcp:`-prefixed),
8658
- * so when the model calls it the execution pauses with a `step_await`
8659
- * (`awaitReason: "local_tool_required"`), the widget's answer-pill sheet
8660
- * renders, and `session.resolveAskUserQuestion()` resumes the execution with
8661
- * the structured answers.
9180
+ * so when the model calls it the execution pauses with a `step_await`, the
9181
+ * widget's answer-pill sheet renders, and `session.resolveAskUserQuestion()`
9182
+ * resumes the execution with the structured answers. The public await frame
9183
+ * for a local-tool pause carries no `awaitReason`; that discriminator is
9184
+ * internal, and its absence is what marks a client-resolvable pause.
8662
9185
  *
8663
9186
  * This replaces the previous integrator burden of hand-declaring the tool in
8664
9187
  * a flow's `runtimeTools` and keeping that schema in sync with the renderer.
8665
9188
  * Flows that already declare `ask_user_question` server-side should leave
8666
- * `expose` off: the model would otherwise see the tool twice.
9189
+ * `expose` off: the API dedupes a double declaration by name with
9190
+ * `clientTools[]` winning, so the model still sees exactly one tool, but the
9191
+ * widget's description and schema silently replace the flow's.
8667
9192
  */
8668
9193
 
8669
9194
  /**
@@ -8752,14 +9277,13 @@ declare const builtInClientToolsForDispatch: (config: AgentWidgetConfig | undefi
8752
9277
  * Built-in `suggest_replies` client tool.
8753
9278
  *
8754
9279
  * The widget can advertise this tool to the agent on every dispatch via
8755
- * `clientTools[]` (set `features.suggestReplies.expose: true`): the same
9280
+ * `clientTools[]` (set `suggestions.followUps.expose: true`): the same
8756
9281
  * wire surface as `ask_user_question` and WebMCP page tools. When the model
8757
- * calls it, the execution pauses with a `step_await`
8758
- * (`awaitReason: "local_tool_required"`); unlike `ask_user_question`, the
8759
- * widget resolves it FIRE-AND-FORGET: it renders the suggestions as tappable
8760
- * chips above the composer and immediately resumes the execution with a
8761
- * canned "shown" result, so the agent's turn completes without waiting on the
8762
- * user. Tapping a chip sends its text verbatim as the user's next message.
9282
+ * calls it, the execution pauses with a `step_await` (a local-tool pause
9283
+ * carries no `awaitReason`; that discriminator is internal). Unlike
9284
+ * `ask_user_question`, the widget resolves it FIRE-AND-FORGET: it renders the
9285
+ * configured follow-up surface and immediately resumes the execution with a
9286
+ * canned "shown" result, so the turn completes without waiting on the user.
8763
9287
  *
8764
9288
  * Chip visibility is DERIVED state, not imperative show/hide: the chips of
8765
9289
  * the last `suggest_replies` tool message with no user message after it are
@@ -8770,9 +9294,10 @@ declare const builtInClientToolsForDispatch: (config: AgentWidgetConfig | undefi
8770
9294
 
8771
9295
  declare const SUGGEST_REPLIES_TOOL_NAME = "suggest_replies";
8772
9296
  /**
8773
- * JSON Schema for the tool's parameters. Mirrors what
8774
- * {@link parseSuggestRepliesPayload} hydrates the chips from, so the schema
8775
- * the model is held to and the shape the renderer expects can never drift.
9297
+ * JSON Schema for the tool's parameters. The model owns semantics only: id,
9298
+ * icon, behavior, and emphasis are presentation, and hosts set them with the
9299
+ * `transformSuggestions` plugin hook. A single object type is used because
9300
+ * strict structured-output modes reject or flatten `oneOf`.
8776
9301
  */
8777
9302
  declare const SUGGEST_REPLIES_PARAMETERS_SCHEMA: {
8778
9303
  readonly type: "object";
@@ -8783,9 +9308,26 @@ declare const SUGGEST_REPLIES_PARAMETERS_SCHEMA: {
8783
9308
  readonly maxItems: 4;
8784
9309
  readonly description: "1-4 short, distinct follow-up replies, phrased in the user's voice.";
8785
9310
  readonly items: {
8786
- readonly type: "string";
8787
- readonly minLength: 1;
8788
- readonly maxLength: 60;
9311
+ readonly type: "object";
9312
+ readonly properties: {
9313
+ readonly label: {
9314
+ readonly type: "string";
9315
+ readonly minLength: 1;
9316
+ readonly maxLength: 80;
9317
+ };
9318
+ readonly prompt: {
9319
+ readonly type: "string";
9320
+ readonly minLength: 1;
9321
+ readonly maxLength: 500;
9322
+ };
9323
+ readonly description: {
9324
+ readonly type: "string";
9325
+ readonly minLength: 1;
9326
+ readonly maxLength: 160;
9327
+ };
9328
+ };
9329
+ readonly required: readonly ["label"];
9330
+ readonly additionalProperties: false;
8789
9331
  };
8790
9332
  };
8791
9333
  };
@@ -8794,7 +9336,7 @@ declare const SUGGEST_REPLIES_PARAMETERS_SCHEMA: {
8794
9336
  };
8795
9337
  /**
8796
9338
  * The `ClientToolDefinition` shipped on `dispatch.clientTools[]` when
8797
- * `features.suggestReplies.expose` is on. Exported so integrators who prefer
9339
+ * `suggestions.followUps.expose` is on. Exported so integrators who prefer
8798
9340
  * declaring the tool server-side (a flow's `runtimeTools`) can reuse the same
8799
9341
  * description and schema instead of hand-writing them.
8800
9342
  */
@@ -8802,18 +9344,20 @@ declare const SUGGEST_REPLIES_CLIENT_TOOL: ClientToolDefinition;
8802
9344
  /** A tool-variant message produced by a `suggest_replies` call. */
8803
9345
  declare const isSuggestRepliesMessage: (message: AgentWidgetMessage) => boolean;
8804
9346
  /**
8805
- * Tolerant parse of a `suggest_replies` tool call's args into chip labels:
8806
- * accepts a JSON string or object, coerces items to trimmed strings, drops
8807
- * empties, and truncates past the renderer cap with a console warning.
9347
+ * Tolerant parse of a `suggest_replies` tool call's args into suggestion
9348
+ * items. Plain strings stay strings for older flows that emit
9349
+ * `suggestions: string[]`; objects keep only label, prompt, and description,
9350
+ * so a model that ignores `additionalProperties` cannot set presentation.
9351
+ * Hosts add id, icon, behavior, and emphasis via `transformSuggestions`.
8808
9352
  */
8809
- declare const parseSuggestRepliesPayload: (args: unknown) => string[];
9353
+ declare const parseSuggestRepliesPayload: (args: unknown) => AgentWidgetSuggestion[];
8810
9354
  /**
8811
9355
  * The chips to show right now: those of the LAST `suggest_replies` tool
8812
9356
  * message with NO user message after it, or `null` when none apply. All
8813
9357
  * calls in a turn still get resumed (the server awaits each); only the
8814
9358
  * latest renders.
8815
9359
  */
8816
- declare const latestAgentSuggestions: (messages: AgentWidgetMessage[]) => string[] | null;
9360
+ declare const latestAgentSuggestions: (messages: AgentWidgetMessage[]) => AgentWidgetSuggestion[] | null;
8817
9361
 
8818
9362
  type WidgetHostLayoutMode = "direct" | "docked";
8819
9363
  type WidgetHostLayout = {
@@ -9434,6 +9978,11 @@ declare class AttachmentManager {
9434
9978
  * Set the previews container element
9435
9979
  */
9436
9980
  setPreviewsContainer(container: HTMLElement | null): void;
9981
+ /**
9982
+ * Re-point previews at a new container and repaint from state. A composer
9983
+ * rebuild swaps the footer, so pending attachments must follow it.
9984
+ */
9985
+ remountPreviews(container: HTMLElement | null): void;
9437
9986
  /**
9438
9987
  * Update the configuration (e.g., when allowed types change)
9439
9988
  */
@@ -10533,4 +11082,4 @@ interface RovingTablistController {
10533
11082
  }
10534
11083
  declare function createRovingTablist(container: HTMLElement, options: RovingTablistOptions): RovingTablistController;
10535
11084
 
10536
- export { ASK_USER_QUESTION_CLIENT_TOOL, ASK_USER_QUESTION_PARAMETERS_SCHEMA, ASK_USER_QUESTION_TOOL_NAME, type AgentConfig, type AgentExecutionState, type AgentLoopConfig, type AgentMessageMetadata, type AgentRequestOptions, type AgentToolsConfig, type AgentWidgetActionContext, type AgentWidgetActionEventPayload, type AgentWidgetActionHandler, type AgentWidgetActionHandlerResult, type AgentWidgetActionParser, type AgentWidgetAgentRequestPayload, type AgentWidgetApproval, type AgentWidgetApprovalConfig, type AgentWidgetApprovalDecisionOptions, type AgentWidgetArtifactsFeature, type AgentWidgetArtifactsLayoutConfig, type AgentWidgetAskUserQuestionFeature, type AgentWidgetAskUserQuestionStyles, type AgentWidgetAttachmentsConfig, type AgentWidgetAvatarConfig, AgentWidgetClient, type AgentWidgetComponentRenderer, type AgentWidgetComposerConfig, type AgentWidgetConfig, type AgentWidgetConfigPatch, type AgentWidgetContextMentionChipRenderContext, type AgentWidgetContextMentionCommandContext, type AgentWidgetContextMentionComposerCapability, type AgentWidgetContextMentionConfig, type AgentWidgetContextMentionItem, type AgentWidgetContextMentionItemRenderContext, type AgentWidgetContextMentionMenuRenderContext, type AgentWidgetContextMentionPayload, type AgentWidgetContextMentionRef, type AgentWidgetContextMentionResolveContext, type AgentWidgetContextMentionSearchContext, type AgentWidgetContextMentionSource, type AgentWidgetContextMentionTokenRenderContext, type AgentWidgetContextProvider, type AgentWidgetContextProviderContext, type AgentWidgetController, type AgentWidgetControllerEventMap, type AgentWidgetCustomFetch, type AgentWidgetDockConfig, type AgentWidgetEvent, type AgentWidgetFeatureFlags, type AgentWidgetHeaderLayoutConfig, type AgentWidgetHeadersFunction, type AgentWidgetInitHandle, type AgentWidgetInitOptions, type AgentWidgetLauncherConfig, type AgentWidgetLayoutConfig, type AgentWidgetLoadingIndicatorConfig, type AgentWidgetMarkdownConfig, type AgentWidgetMarkdownOptions, type AgentWidgetMarkdownRendererOverrides, type AgentWidgetMentionLlmEntry, type AgentWidgetMentionTriggerChannel, type AgentWidgetMentionTriggerPosition, type AgentWidgetMessage, type AgentWidgetMessageActionsConfig, type AgentWidgetMessageFeedback, type AgentWidgetMessageLayoutConfig, type AgentWidgetMessageRoleLayout, type AgentWidgetParsedAction, type AgentWidgetPlugin, type AgentWidgetReadAloudEvent, type AgentWidgetRequestPayload, type AgentWidgetSSEEventParser, type AgentWidgetSSEEventResult, type AgentWidgetScrollBehaviorFeature, type AgentWidgetScrollMode, type AgentWidgetScrollRestorePosition, type AgentWidgetScrollToBottomFeature, AgentWidgetSession, type AgentWidgetSessionStatus, type AgentWidgetStorageAdapter, type AgentWidgetStoredState, type AgentWidgetStreamAnimationBuffer, type AgentWidgetStreamAnimationBuiltinType, type AgentWidgetStreamAnimationFeature, type AgentWidgetStreamAnimationPlaceholder, type AgentWidgetStreamAnimationType, type AgentWidgetStreamParser, type AgentWidgetStreamParserResult, type AgentWidgetTimestampConfig, type AgentWidgetVoiceStatusEvent, type AgentWidgetWebMcpConfig, type ArtifactConfigPayload, type ArtifactPaneTokens, type ArtifactTabTokens, type ArtifactToolbarTokens, type AskUserQuestionOption, type AskUserQuestionPayload, type AskUserQuestionPrompt, AttachmentManager, type AttachmentManagerConfig, type BorderScale, BrowserSpeechEngine, type BrowserSpeechEngineOptions, type CSATFeedbackOptions, type ClientChatRequest, type ClientFeedbackRequest, type ClientFeedbackType, type ClientInitResponse, type ClientSession, type ClientToolDefinition, type CodeFormat, type CodeGeneratorHooks, type CodeGeneratorOptions, type ColorPalette, type ColorShade, type ComboButtonHandle, type ComponentContext, type ComponentDirective, type ComponentRegistrationOptions, type ComponentRenderer, type ComponentTokens, type ComposerBuildContext, type ComposerElements, type ContentPart, type CreateComboButtonOptions, type CreateDropdownOptions, type CreateIconButtonOptions, type CreateLabelButtonOptions, type CreateStandardBubbleOptions, type CreateThemeOptions, type CreateToggleGroupOptions, DEFAULT_COMPONENTS, DEFAULT_FLOATING_LAUNCHER_MAX_WIDTH, DEFAULT_FLOATING_LAUNCHER_WIDTH, DEFAULT_PALETTE, DEFAULT_SEMANTIC, DEFAULT_WIDGET_CONFIG, type DeepPartial, type DemoCarouselHandle, type DemoCarouselItem, type DemoCarouselOptions, type DomContextMode, type DomContextOptions, type DropdownMenuHandle, type DropdownMenuItem, type EnrichedPageElement, type EventStreamBadgeColor, type EventStreamConfig, type EventStreamPayloadRenderContext, type EventStreamRowRenderContext, type EventStreamToolbarRenderContext, type EventStreamViewRenderContext, type FallbackSpeechEngineOptions, type FormatEnrichedContextOptions, type HeaderBuildContext, type HeaderElements, type HeaderLayoutContext, type HeaderLayoutRenderer, type HeaderRenderContext, type IconButtonTokens, type IconName, type IdleIndicatorRenderContext, type ImageContentPart, type InjectAssistantMessageOptions, type InjectComponentDirectiveOptions, type InjectMessageOptions, type InjectSystemMessageOptions, type InjectUserMessageOptions, type LabelButtonTokens, type LoadingIndicatorRenderContext, type LoadingIndicatorRenderer, type MarkdownParsersModule, type MarkdownProcessorOptions, type MessageActionCallbacks, type MessageContent, type MessageRenderContext, type MessageTransform, type NPSFeedbackOptions, PRESETS, PRESET_FULLSCREEN, PRESET_MINIMAL, PRESET_SHOP, type ParseOptionsConfig, type ParseRule, type PcmStreamPlayer, type PendingAttachment, type PersonaArtifactActionContext, type PersonaArtifactCustomAction, type PersonaArtifactDisplayDescriptor, type PersonaArtifactDisplayMatch, type PersonaArtifactDisplayMode, type PersonaArtifactDisplayModeInput, type PersonaArtifactDisplayResolution, type PersonaArtifactDisplayRules, type PersonaArtifactFilesDisplayRules, type PersonaArtifactKind, type PersonaArtifactManualUpsert, type PersonaArtifactPresentation, type PersonaArtifactRecord, type PersonaArtifactStatusLabelContext, type PersonaTheme, type PersonaThemePlugin, type RadiusScale, ReadAloudController, type ReadAloudListener, type ReadAloudState, type ResolvedTarget, type RovingTablistController, type RovingTablistOptions, type RuleScoringContext, type RuntypeClientChatRequest, type RuntypeClientChatStreamEvent, type RuntypeClientFeedbackRequest, type RuntypeClientFeedbackResponse, type RuntypeClientFeedbackType, type RuntypeClientInitRequest, type RuntypeClientInitResponse, type RuntypeClientResumeRequest, type RuntypeClientResumeStreamEvent, type RuntypeExecutionStreamEvent, type RuntypeFlowSSEEvent, type RuntypeStepCompleteEvent, type RuntypeStopReasonKind, type RuntypeStreamEventOf, type RuntypeTurnCompleteEvent, type SSEEventCallback, type SSEEventRecord, SUGGEST_REPLIES_CLIENT_TOOL, SUGGEST_REPLIES_PARAMETERS_SCHEMA, SUGGEST_REPLIES_TOOL_NAME, type SanitizeFunction, type SemanticColors, type SemanticSpacing, type SemanticTypography, type ShadowScale, type SlashCommandDefinition, type SlotRenderContext, type SlotRenderer, type SpacingScale, type SpeechCallbacks, type SpeechEngine, type SpeechRequest, type StreamAnimationContext, type StreamAnimationPlugin, THEME_ZONES, type TargetResolver, type TextContentPart, type ThemeValidationError, type ThemeValidationResult, type ThemeZone, type ToggleGroupHandle, type ToggleGroupItem, type ToggleGroupTokens, type TokenReference, type TypographyScale, VERSION, type VoiceConfig, type VoiceMetrics, type VoicePlaybackEngine, type VoiceProvider, type VoiceResult, type VoiceStatus, WEBMCP_TOOL_PREFIX, WebMcpBridge, type WebMcpConfirmHandler, type WebMcpConfirmInfo, type WebMcpToolResult, type WidgetArtifactLayoutPreference, type WidgetHostLayout, type WidgetHostLayoutMode, type WidgetLayoutSlot, type WidgetPreferenceCapabilities, type WidgetPreferenceParseIssue, type WidgetPreferenceParseIssueCode, type WidgetPreferenceParseResult, type WidgetPreferenceSlice, type WidgetPreset, accessibilityPlugin, animationsPlugin, applyFeaturePreferences, applyThemeVariables, attachHeaderToContainer, brandPlugin, buildComposer, buildDefaultHeader, buildHeader, buildHeaderWithLayout, buildMinimalHeader, builtInClientToolsForDispatch, canonicalArtifactDisplayMode, collectEnrichedPageContext, componentRegistry, createActionManager, createAgentExperience, createAskUserQuestionBubble, createBestAvailableVoiceProvider, createBubbleWithLayout, createCSATFeedback, createComboButton, createComponentMiddleware, createComponentStreamParser, createDefaultSanitizer, createDemoCarousel, createDirectivePostprocessor, createDropdownMenu, createFlexibleJsonStreamParser, createIconButton, createImagePart, createJsonStreamParser, createLabelButton, createLocalStorageAdapter, createMarkdownProcessor, createMarkdownProcessorFromConfig, createMessageActions, createNPSFeedback, createPlainTextParser, createPlugin, createRegexJsonParser, createRovingTablist, createSlashCommandsSource, createStandardBubble, createStaticMentionSource, createTextPart, createTheme, createThemeObserver, createToggleGroup, createTypingIndicator, createVoiceProvider, createWidgetHostLayout, createXmlParser, initAgentWidget as default, defaultActionHandlers, defaultJsonActionParser, defaultMentionFilter, defaultParseRules, detectColorScheme, directivePostprocessor, ensureAskUserQuestionSheet, escapeHtml, extractComponentDirectiveFromMessage, fileToImagePart, formatEnrichedContext, generateAssistantMessageId, generateCodeSnippet, generateMessageId, generateStableSelector, generateUserMessageId, getActiveTheme, getColorScheme, getDisplayText, getHeaderLayout, getImageParts, getPreset, hasComponentDirective, hasImages, headerLayouts, highContrastPlugin, initAgentWidget, isAskUserQuestionMessage, isComponentDirectiveType, isDockedMountMode, isSuggestRepliesMessage, isVoiceSupported, isWebMcpToolName, latestAgentSuggestions, listRegisteredStreamAnimations, loadMarkdownParsers, markdownPostprocessor, mergeWithDefaults, normalizeContent, normalizeMediaType, onMarkdownParsersReady, parseAskUserQuestionPayload, parseSuggestRepliesPayload, parseWidgetPreferenceSlice, pickBestVoice, pluginRegistry, reducedMotionPlugin, registerStreamAnimationPlugin, removeAskUserQuestionSheet, renderComponentDirective, renderLoadingIndicatorWithFallback, renderLucideIcon, resolveArtifactDisplay, resolveArtifactDisplayMode, resolveConfigPreferences, resolveDockConfig, resolveSanitizer, resolveTokens, stripWebMcpPrefix, themeToCssVariables, unregisterStreamAnimationPlugin, validateImageFile, validateTheme };
11085
+ export { ASK_USER_QUESTION_CLIENT_TOOL, ASK_USER_QUESTION_PARAMETERS_SCHEMA, ASK_USER_QUESTION_TOOL_NAME, type AgentConfig, type AgentExecutionState, type AgentLoopConfig, type AgentMessageMetadata, type AgentRequestOptions, type AgentToolsConfig, type AgentWidgetActionContext, type AgentWidgetActionEventPayload, type AgentWidgetActionHandler, type AgentWidgetActionHandlerResult, type AgentWidgetActionParser, type AgentWidgetAgentRequestPayload, type AgentWidgetApproval, type AgentWidgetApprovalConfig, type AgentWidgetApprovalDecisionOptions, type AgentWidgetArtifactsFeature, type AgentWidgetArtifactsLayoutConfig, type AgentWidgetAskUserQuestionFeature, type AgentWidgetAskUserQuestionStyles, type AgentWidgetAttachmentsConfig, type AgentWidgetAvatarConfig, AgentWidgetClient, type AgentWidgetComponentRenderer, type AgentWidgetComposerConfig, type AgentWidgetConfig, type AgentWidgetConfigPatch, type AgentWidgetContextMentionChipRenderContext, type AgentWidgetContextMentionCommandContext, type AgentWidgetContextMentionComposerCapability, type AgentWidgetContextMentionConfig, type AgentWidgetContextMentionItem, type AgentWidgetContextMentionItemRenderContext, type AgentWidgetContextMentionMenuRenderContext, type AgentWidgetContextMentionPayload, type AgentWidgetContextMentionRef, type AgentWidgetContextMentionResolveContext, type AgentWidgetContextMentionSearchContext, type AgentWidgetContextMentionSource, type AgentWidgetContextMentionTokenRenderContext, type AgentWidgetContextProvider, type AgentWidgetContextProviderContext, type AgentWidgetController, type AgentWidgetControllerEventMap, type AgentWidgetCustomFetch, type AgentWidgetDockConfig, type AgentWidgetEvent, type AgentWidgetFeatureFlags, type AgentWidgetFollowUpSuggestionsConfig, type AgentWidgetHeaderLayoutConfig, type AgentWidgetHeadersFunction, type AgentWidgetInitHandle, type AgentWidgetInitOptions, type AgentWidgetLauncherConfig, type AgentWidgetLauncherTeaserConfig, type AgentWidgetLayoutConfig, type AgentWidgetLoadingIndicatorConfig, type AgentWidgetMarkdownConfig, type AgentWidgetMarkdownOptions, type AgentWidgetMarkdownRendererOverrides, type AgentWidgetMentionLlmEntry, type AgentWidgetMentionTriggerChannel, type AgentWidgetMentionTriggerPosition, type AgentWidgetMessage, type AgentWidgetMessageActionsConfig, type AgentWidgetMessageFeedback, type AgentWidgetMessageLayoutConfig, type AgentWidgetMessageRoleLayout, type AgentWidgetParsedAction, type AgentWidgetPlugin, type AgentWidgetPluginStorage, type AgentWidgetReadAloudEvent, type AgentWidgetRenderSuggestionContext, type AgentWidgetRenderWelcomeContext, type AgentWidgetRequestPayload, type AgentWidgetResolvedSuggestion, type AgentWidgetSSEEventParser, type AgentWidgetSSEEventResult, type AgentWidgetScrollBehaviorFeature, type AgentWidgetScrollMode, type AgentWidgetScrollRestorePosition, type AgentWidgetScrollToBottomFeature, AgentWidgetSession, type AgentWidgetSessionStatus, type AgentWidgetStarterSuggestionsConfig, type AgentWidgetStorageAdapter, type AgentWidgetStoredState, type AgentWidgetStreamAnimationBuffer, type AgentWidgetStreamAnimationBuiltinType, type AgentWidgetStreamAnimationFeature, type AgentWidgetStreamAnimationPlaceholder, type AgentWidgetStreamAnimationType, type AgentWidgetStreamParser, type AgentWidgetStreamParserResult, type AgentWidgetSuggestion, type AgentWidgetSuggestionBehavior, type AgentWidgetSuggestionChipsConfig, type AgentWidgetSuggestionSelectContext, type AgentWidgetSuggestionSource, type AgentWidgetSuggestionSurface, type AgentWidgetSuggestionSurfaceConfig, type AgentWidgetSuggestionVariant, type AgentWidgetSuggestionsConfig, type AgentWidgetTimestampConfig, type AgentWidgetTransformSuggestionsContext, type AgentWidgetVoiceStatusEvent, type AgentWidgetWebMcpConfig, type AgentWidgetWelcomeConfig, type AgentWidgetWelcomeDismiss, type AgentWidgetWelcomeIcon, type AgentWidgetWelcomeVariant, type ArtifactConfigPayload, type ArtifactPaneTokens, type ArtifactTabTokens, type ArtifactToolbarTokens, type AskUserQuestionOption, type AskUserQuestionPayload, type AskUserQuestionPrompt, AttachmentManager, type AttachmentManagerConfig, type BorderScale, BrowserSpeechEngine, type BrowserSpeechEngineOptions, type CSATFeedbackOptions, type ClientChatRequest, type ClientFeedbackRequest, type ClientFeedbackType, type ClientInitResponse, type ClientSession, type ClientToolDefinition, type CodeFormat, type CodeGeneratorHooks, type CodeGeneratorOptions, type ColorPalette, type ColorShade, type ComboButtonHandle, type ComponentContext, type ComponentDirective, type ComponentRegistrationOptions, type ComponentRenderer, type ComponentTokens, type ComposerBuildContext, type ComposerElements, type ContentPart, type CreateComboButtonOptions, type CreateDropdownOptions, type CreateIconButtonOptions, type CreateLabelButtonOptions, type CreateStandardBubbleOptions, type CreateThemeOptions, type CreateToggleGroupOptions, DEFAULT_COMPONENTS, DEFAULT_FLOATING_LAUNCHER_MAX_WIDTH, DEFAULT_FLOATING_LAUNCHER_WIDTH, DEFAULT_PALETTE, DEFAULT_SEMANTIC, DEFAULT_WIDGET_CONFIG, type DeepPartial, type DemoCarouselHandle, type DemoCarouselItem, type DemoCarouselOptions, type DomContextMode, type DomContextOptions, type DropdownMenuHandle, type DropdownMenuItem, type EnrichedPageElement, type EventStreamBadgeColor, type EventStreamConfig, type EventStreamPayloadRenderContext, type EventStreamRowRenderContext, type EventStreamToolbarRenderContext, type EventStreamViewRenderContext, type FallbackSpeechEngineOptions, type FormatEnrichedContextOptions, type HeaderBuildContext, type HeaderElements, type HeaderLayoutContext, type HeaderLayoutRenderer, type HeaderRenderContext, type IconButtonTokens, type IconName, type IdleIndicatorRenderContext, type ImageContentPart, type InjectAssistantMessageOptions, type InjectComponentDirectiveOptions, type InjectMessageOptions, type InjectSystemMessageOptions, type InjectUserMessageOptions, type LabelButtonTokens, type LoadingIndicatorRenderContext, type LoadingIndicatorRenderer, type MarkdownParsersModule, type MarkdownProcessorOptions, type MessageActionCallbacks, type MessageContent, type MessageRenderContext, type MessageTransform, type NPSFeedbackOptions, PRESETS, PRESET_FULLSCREEN, PRESET_MINIMAL, PRESET_SHOP, type ParseOptionsConfig, type ParseRule, type PcmStreamPlayer, type PendingAttachment, type PersonaArtifactActionContext, type PersonaArtifactCustomAction, type PersonaArtifactDisplayDescriptor, type PersonaArtifactDisplayMatch, type PersonaArtifactDisplayMode, type PersonaArtifactDisplayModeInput, type PersonaArtifactDisplayResolution, type PersonaArtifactDisplayRules, type PersonaArtifactFilesDisplayRules, type PersonaArtifactKind, type PersonaArtifactManualUpsert, type PersonaArtifactPresentation, type PersonaArtifactRecord, type PersonaArtifactStatusLabelContext, type PersonaTheme, type PersonaThemePlugin, type RadiusScale, ReadAloudController, type ReadAloudListener, type ReadAloudState, type ResolvedTarget, type ResolvedWelcomeConfig, type RovingTablistController, type RovingTablistOptions, type RuleScoringContext, type RuntypeClientChatRequest, type RuntypeClientChatStreamEvent, type RuntypeClientFeedbackRequest, type RuntypeClientFeedbackResponse, type RuntypeClientFeedbackType, type RuntypeClientInitRequest, type RuntypeClientInitResponse, type RuntypeClientResumeRequest, type RuntypeClientResumeStreamEvent, type RuntypeExecutionStreamEvent, type RuntypeFlowSSEEvent, type RuntypeStepCompleteEvent, type RuntypeStopReasonKind, type RuntypeStreamEventOf, type RuntypeTurnCompleteEvent, type SSEEventCallback, type SSEEventRecord, SUGGEST_REPLIES_CLIENT_TOOL, SUGGEST_REPLIES_PARAMETERS_SCHEMA, SUGGEST_REPLIES_TOOL_NAME, type SanitizeFunction, type SemanticColors, type SemanticSpacing, type SemanticTypography, type ShadowScale, type SlashCommandDefinition, type SlotRenderContext, type SlotRenderer, type SpacingScale, type SpeechCallbacks, type SpeechEngine, type SpeechRequest, type StreamAnimationContext, type StreamAnimationPlugin, THEME_ZONES, type TargetResolver, type TextContentPart, type TextStyleTokens, type ThemeValidationError, type ThemeValidationResult, type ThemeZone, type ToggleGroupHandle, type ToggleGroupItem, type ToggleGroupTokens, type TokenReference, type TypographyScale, VERSION, type VoiceConfig, type VoiceMetrics, type VoicePlaybackEngine, type VoiceProvider, type VoiceResult, type VoiceStatus, WEBMCP_TOOL_PREFIX, WebMcpBridge, type WebMcpConfirmHandler, type WebMcpConfirmInfo, type WebMcpToolResult, type WidgetArtifactLayoutPreference, type WidgetHostLayout, type WidgetHostLayoutMode, type WidgetLayoutSlot, type WidgetPreferenceCapabilities, type WidgetPreferenceParseIssue, type WidgetPreferenceParseIssueCode, type WidgetPreferenceParseResult, type WidgetPreferenceSlice, type WidgetPreset, accessibilityPlugin, animationsPlugin, applyFeaturePreferences, applyThemeVariables, attachHeaderToContainer, brandPlugin, buildComposer, buildDefaultHeader, buildHeader, buildHeaderWithLayout, buildMinimalHeader, builtInClientToolsForDispatch, canonicalArtifactDisplayMode, collectEnrichedPageContext, componentRegistry, createActionManager, createAgentExperience, createAskUserQuestionBubble, createBestAvailableVoiceProvider, createBubbleWithLayout, createCSATFeedback, createComboButton, createComponentMiddleware, createComponentStreamParser, createDefaultSanitizer, createDemoCarousel, createDirectivePostprocessor, createDropdownMenu, createFlexibleJsonStreamParser, createIconButton, createImagePart, createJsonStreamParser, createLabelButton, createLocalStorageAdapter, createMarkdownProcessor, createMarkdownProcessorFromConfig, createMessageActions, createNPSFeedback, createPlainTextParser, createPlugin, createRegexJsonParser, createRovingTablist, createSlashCommandsSource, createStandardBubble, createStaticMentionSource, createTextPart, createTheme, createThemeObserver, createToggleGroup, createTypingIndicator, createVoiceProvider, createWidgetHostLayout, createXmlParser, initAgentWidget as default, defaultActionHandlers, defaultJsonActionParser, defaultMentionFilter, defaultParseRules, detectColorScheme, directivePostprocessor, ensureAskUserQuestionSheet, escapeHtml, extractComponentDirectiveFromMessage, fileToImagePart, formatEnrichedContext, generateAssistantMessageId, generateCodeSnippet, generateMessageId, generateStableSelector, generateUserMessageId, getActiveTheme, getColorScheme, getDisplayText, getHeaderLayout, getImageParts, getPreset, hasComponentDirective, hasImages, headerLayouts, highContrastPlugin, initAgentWidget, isAskUserQuestionMessage, isComponentDirectiveType, isDockedMountMode, isSuggestRepliesMessage, isVoiceSupported, isWebMcpToolName, isWelcomeVisible, latestAgentSuggestions, listRegisteredStreamAnimations, loadMarkdownParsers, markdownPostprocessor, mergeWithDefaults, normalizeContent, normalizeMediaType, onMarkdownParsersReady, parseAskUserQuestionPayload, parseSuggestRepliesPayload, parseWidgetPreferenceSlice, pickBestVoice, pluginRegistry, reducedMotionPlugin, registerStreamAnimationPlugin, removeAskUserQuestionSheet, renderComponentDirective, renderLoadingIndicatorWithFallback, renderLucideIcon, resolveArtifactDisplay, resolveArtifactDisplayMode, resolveConfigPreferences, resolveDockConfig, resolveSanitizer, resolveTokens, resolveWelcomeConfig, stripWebMcpPrefix, themeToCssVariables, unregisterStreamAnimationPlugin, validateImageFile, validateTheme };