@runtypelabs/persona 4.14.0 → 4.15.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 (81) 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 +241 -16
  14. package/dist/context-mentions.d.ts +241 -16
  15. package/dist/context-mentions.js +11 -8
  16. package/dist/index.cjs +67 -66
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +301 -41
  19. package/dist/index.d.ts +301 -41
  20. package/dist/index.global.js +59 -56
  21. package/dist/index.global.js.map +1 -1
  22. package/dist/index.js +67 -66
  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 +241 -16
  27. package/dist/smart-dom-reader.d.ts +241 -16
  28. package/dist/theme-editor-preview.cjs +66 -66
  29. package/dist/theme-editor-preview.d.cts +255 -17
  30. package/dist/theme-editor-preview.d.ts +255 -17
  31. package/dist/theme-editor-preview.js +56 -56
  32. package/dist/theme-editor.cjs +5 -5
  33. package/dist/theme-editor.d.cts +242 -17
  34. package/dist/theme-editor.d.ts +242 -17
  35. package/dist/theme-editor.js +7 -7
  36. package/dist/theme-reference.cjs +1 -1
  37. package/dist/theme-reference.d.cts +38 -0
  38. package/dist/theme-reference.d.ts +38 -0
  39. package/dist/theme-reference.js +1 -1
  40. package/dist/widget.css +1 -1
  41. package/package.json +1 -1
  42. package/src/ask-user-question-tool.ts +10 -7
  43. package/src/components/artifact-preview.ts +1 -1
  44. package/src/components/composer-parts.test.ts +103 -4
  45. package/src/components/composer-parts.ts +53 -15
  46. package/src/components/messages.ts +5 -2
  47. package/src/components/panel.ts +31 -5
  48. package/src/components/pill-composer-builder.test.ts +18 -0
  49. package/src/components/suggestions.test.ts +233 -0
  50. package/src/components/suggestions.ts +463 -81
  51. package/src/components/widget-view.ts +4 -0
  52. package/src/defaults.ts +5 -3
  53. package/src/generated/runtype-openapi-contract.ts +17 -0
  54. package/src/index-core.ts +18 -2
  55. package/src/launcher-global.ts +1 -1
  56. package/src/plugins/types.ts +71 -3
  57. package/src/presets.ts +3 -3
  58. package/src/session.ts +10 -8
  59. package/src/styles/widget-styles.test.ts +162 -0
  60. package/src/styles/widget.css +430 -0
  61. package/src/suggest-replies-tool.test.ts +233 -2
  62. package/src/suggest-replies-tool.ts +115 -39
  63. package/src/theme-editor/preview-utils.test.ts +34 -0
  64. package/src/theme-editor/preview-utils.ts +77 -2
  65. package/src/theme-editor/sections.test.ts +33 -0
  66. package/src/theme-editor/sections.ts +53 -5
  67. package/src/theme-reference.ts +9 -2
  68. package/src/types/theme.ts +32 -0
  69. package/src/types.ts +152 -16
  70. package/src/ui.detached-panel.test.ts +1 -1
  71. package/src/ui.suggest-replies.test.ts +1066 -1
  72. package/src/ui.ts +268 -20
  73. package/src/utils/artifact-file.test.ts +1 -1
  74. package/src/utils/code-generators.test.ts +40 -0
  75. package/src/utils/code-generators.ts +22 -0
  76. package/src/utils/config-merge.test.ts +24 -0
  77. package/src/utils/icons.test.ts +26 -0
  78. package/src/utils/icons.ts +8 -0
  79. package/src/utils/theme.test.ts +79 -0
  80. package/src/utils/tokens.ts +64 -0
  81. package/dist/chunk-MMUPR2JW.js +0 -1
package/dist/index.d.cts CHANGED
@@ -2,6 +2,40 @@ import { IconNode } from 'lucide';
2
2
  import { Marked } from 'marked';
3
3
  import DOMPurify from 'dompurify';
4
4
 
5
+ type AgentWidgetTransformSuggestionsContext = {
6
+ /**
7
+ * Fresh copy of the suggestions entering this plugin, already normalized:
8
+ * shorthand strings expanded and the effective send/fill behavior resolved.
9
+ */
10
+ suggestions: AgentWidgetResolvedSuggestion[];
11
+ surface: AgentWidgetSuggestionSurface;
12
+ source: AgentWidgetSuggestionSource;
13
+ config: AgentWidgetConfig;
14
+ };
15
+ type AgentWidgetRenderSuggestionContext = {
16
+ /** Fully normalized suggestion, including the effective send/fill behavior. */
17
+ suggestion: AgentWidgetResolvedSuggestion;
18
+ index: number;
19
+ surface: AgentWidgetSuggestionSurface;
20
+ source: AgentWidgetSuggestionSource;
21
+ variant: AgentWidgetSuggestionVariant;
22
+ streaming: boolean;
23
+ config: AgentWidgetConfig;
24
+ /** Build Persona's standard chip, card, or list item. */
25
+ defaultRenderer: () => HTMLElement;
26
+ /**
27
+ * Run the normal selection pipeline: DOM event, plugin selection hooks, then
28
+ * send or fill. Custom renderers should call this instead of sending directly.
29
+ */
30
+ select: () => void;
31
+ };
32
+ type AgentWidgetSuggestionSelectContext = {
33
+ suggestion: AgentWidgetResolvedSuggestion;
34
+ surface: AgentWidgetSuggestionSurface;
35
+ source: AgentWidgetSuggestionSource;
36
+ variant: AgentWidgetSuggestionVariant;
37
+ config: AgentWidgetConfig;
38
+ };
5
39
  /**
6
40
  * Plugin interface for customizing widget components
7
41
  */
@@ -14,6 +48,25 @@ interface AgentWidgetPlugin {
14
48
  * Optional priority (higher = runs first). Default: 0
15
49
  */
16
50
  priority?: number;
51
+ /**
52
+ * Transform, filter, enrich, or reorder suggestions. Hooks receive normalized
53
+ * items and compose in plugin priority order; the return value may use the
54
+ * loose shape (string shorthand included) and is re-normalized before the next
55
+ * hook. A per-item `behavior` set here survives. `maxItems` caps the list
56
+ * after the full chain. Return an empty array to hide the surface.
57
+ */
58
+ transformSuggestions?: (context: AgentWidgetTransformSuggestionsContext) => AgentWidgetSuggestion[];
59
+ /**
60
+ * Render one starter or follow-up suggestion. Return null to use Persona's
61
+ * default chip/card/list renderer. Call `select()` from custom interaction
62
+ * controls to preserve events, selection hooks, and send/fill behavior.
63
+ */
64
+ renderSuggestion?: (context: AgentWidgetRenderSuggestionContext) => HTMLElement | null;
65
+ /**
66
+ * Observe or intercept a suggestion selection. Return false to cancel the
67
+ * built-in send/fill action. Hooks run in plugin priority order.
68
+ */
69
+ onSuggestionSelect?: (context: AgentWidgetSuggestionSelectContext) => void | boolean;
17
70
  /**
18
71
  * Custom renderer for message bubbles
19
72
  * Return null to use default renderer
@@ -609,6 +662,14 @@ interface ReasoningBubbleTokens {
609
662
  interface ComposerChromeTokens {
610
663
  /** Box-shadow on the composer form (raw CSS, e.g. `none`). */
611
664
  shadow: string;
665
+ /** Inner padding of the composer form (raw CSS shorthand). @default "0.75rem 1rem" */
666
+ padding?: string;
667
+ /** Gap between the textarea row and the actions row. @default "0.5rem" */
668
+ gap?: string;
669
+ /** Composer textarea font-size. @default "0.875rem" */
670
+ fontSize?: string;
671
+ /** Composer textarea line-height. @default "1.25rem" */
672
+ lineHeight?: string;
612
673
  }
613
674
  /** Artifact toolbar chrome. */
614
675
  interface ArtifactToolbarTokens {
@@ -758,6 +819,26 @@ interface ScrollToBottomTokens extends ComponentTokenSet {
758
819
  fontSize?: string;
759
820
  iconSize?: string;
760
821
  }
822
+ /** Visual tokens shared by one suggestion presentation variant. */
823
+ interface SuggestionVariantTokens extends ComponentTokenSet {
824
+ gap?: string;
825
+ minHeight?: string;
826
+ fontSize?: string;
827
+ lineHeight?: string;
828
+ iconSize?: string;
829
+ hoverBackground?: TokenReference<'color'>;
830
+ hoverForeground?: TokenReference<'color'>;
831
+ hoverBorder?: TokenReference<'color'>;
832
+ pressedBackground?: TokenReference<'color'>;
833
+ focusRing?: TokenReference<'color'>;
834
+ disabledOpacity?: string;
835
+ }
836
+ /** Starter and follow-up suggestion chrome. */
837
+ interface SuggestionTokens {
838
+ chip: SuggestionVariantTokens;
839
+ card: SuggestionVariantTokens;
840
+ list: SuggestionVariantTokens;
841
+ }
761
842
  /** Toggle group chrome (used by createToggleGroup). */
762
843
  interface ToggleGroupTokens {
763
844
  /** Gap between toggle buttons. Default: 0 (connected). */
@@ -788,6 +869,8 @@ interface ComponentTokens {
788
869
  labelButton?: LabelButtonTokens;
789
870
  /** Scroll-to-bottom indicator styling tokens. */
790
871
  scrollToBottom?: ScrollToBottomTokens;
872
+ /** Starter prompt and follow-up suggestion styling tokens. */
873
+ suggestion?: SuggestionTokens;
791
874
  /** Toggle group styling tokens. */
792
875
  toggleGroup?: ToggleGroupTokens;
793
876
  /** Artifact toolbar, tab strip, and pane chrome. */
@@ -1109,7 +1192,24 @@ type RuntypeExecutionStreamEvent = ({
1109
1192
  type: "source";
1110
1193
  url?: string;
1111
1194
  [key: string]: unknown;
1195
+ } | {
1196
+ executionId: string;
1197
+ iteration?: number;
1198
+ seq: number;
1199
+ state: Record<string, unknown>;
1200
+ type: "state_snapshot";
1112
1201
  } | ({
1202
+ executionId: string;
1203
+ iteration?: number;
1204
+ patch: Array<{
1205
+ from?: string;
1206
+ op: "add" | "remove" | "replace" | "move" | "copy" | "test";
1207
+ path: string;
1208
+ value?: unknown;
1209
+ }>;
1210
+ seq: number;
1211
+ type: "state_delta";
1212
+ }) | ({
1113
1213
  executionId: string;
1114
1214
  hiddenParameterNames?: Array<string>;
1115
1215
  iteration?: number;
@@ -1481,6 +1581,7 @@ declare const LUCIDE_ICONS: {
1481
1581
  readonly plus: IconNode;
1482
1582
  readonly minus: IconNode;
1483
1583
  readonly pencil: IconNode;
1584
+ readonly "pen-line": IconNode;
1484
1585
  readonly trash: IconNode;
1485
1586
  readonly "trash-2": IconNode;
1486
1587
  readonly save: IconNode;
@@ -1523,11 +1624,13 @@ declare const LUCIDE_ICONS: {
1523
1624
  readonly folder: IconNode;
1524
1625
  readonly "folder-open": IconNode;
1525
1626
  readonly files: IconNode;
1627
+ readonly "chart-column": IconNode;
1526
1628
  readonly sparkles: IconNode;
1527
1629
  readonly zap: IconNode;
1528
1630
  readonly sun: IconNode;
1529
1631
  readonly moon: IconNode;
1530
1632
  readonly flag: IconNode;
1633
+ readonly lightbulb: IconNode;
1531
1634
  readonly monitor: IconNode;
1532
1635
  readonly smartphone: IconNode;
1533
1636
  };
@@ -3641,10 +3744,13 @@ type AgentWidgetFeatureFlags = {
3641
3744
  */
3642
3745
  askUserQuestion?: AgentWidgetAskUserQuestionFeature;
3643
3746
  /**
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.
3747
+ * Built-in `suggest_replies` follow-ups. When the assistant invokes the
3748
+ * tool, the widget shows the suggestions using `suggestions.followUps` and
3749
+ * immediately resumes the execution: fire-and-forget, no user input awaited.
3750
+ *
3751
+ * @deprecated Both keys moved to `suggestions.followUps`: use
3752
+ * `suggestions.followUps.enabled` and `suggestions.followUps.expose`. This
3753
+ * alias keeps working per key, with `suggestions.followUps` winning.
3648
3754
  */
3649
3755
  suggestReplies?: AgentWidgetSuggestRepliesFeature;
3650
3756
  };
@@ -3689,11 +3795,12 @@ type WidgetPreferenceSlice = {
3689
3795
  };
3690
3796
  };
3691
3797
  /**
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.
3798
+ * Feature config for the built-in `suggest_replies` follow-ups.
3799
+ *
3800
+ * @deprecated Both keys moved to `suggestions.followUps`
3801
+ * (`suggestions.followUps.enabled` / `suggestions.followUps.expose`), which
3802
+ * also owns presentation, placement, and send/fill behavior. Resolution is
3803
+ * per key with `suggestions.followUps` winning; removal waits for 5.0.
3697
3804
  */
3698
3805
  type AgentWidgetSuggestRepliesFeature = {
3699
3806
  /**
@@ -3701,14 +3808,18 @@ type AgentWidgetSuggestRepliesFeature = {
3701
3808
  * renders as a regular tool bubble and is NOT auto-resumed: only set this
3702
3809
  * with no server-side `suggest_replies` declaration, or the execution
3703
3810
  * parks awaiting a resume that never comes.
3811
+ * @deprecated Use `suggestions.followUps.enabled`.
3704
3812
  */
3705
3813
  enabled?: boolean;
3706
3814
  /**
3707
3815
  * Advertise the built-in `suggest_replies` tool to the agent on every
3708
3816
  * 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`.
3817
+ * needed. Defaults to `false`. Declare the tool in one place: the API
3818
+ * dedupes a double declaration by name with `clientTools[]` winning, so the
3819
+ * model still sees exactly one tool, but the widget's description and schema
3820
+ * win and the effective tool type becomes `local` (the execution pauses and
3821
+ * the widget auto-resumes it). Ignored when `enabled` is `false`.
3822
+ * @deprecated Use `suggestions.followUps.expose`.
3712
3823
  */
3713
3824
  expose?: boolean;
3714
3825
  };
@@ -3778,10 +3889,13 @@ type AgentWidgetAskUserQuestionFeature = {
3778
3889
  * matching {@link AskUserQuestionPayload}; when the model calls it, the
3779
3890
  * existing answer-pill sheet renders and the answer resumes the execution.
3780
3891
  *
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.
3892
+ * Defaults to `false`. Declare the tool in one place: the API dedupes a
3893
+ * double declaration by name with `clientTools[]` winning, so the model
3894
+ * still sees exactly one tool, but the widget's description and schema win
3895
+ * and the effective tool type becomes `local` (the execution pauses and the
3896
+ * widget resumes it with the user's answer). Ignored when `enabled` is
3897
+ * `false`: never offer the agent a question tool the widget can't render an
3898
+ * answer UI for.
3785
3899
  */
3786
3900
  expose?: boolean;
3787
3901
  /** Slide-in animation duration in ms. Defaults to 180. */
@@ -4254,6 +4368,10 @@ type AgentWidgetSendButtonConfig = {
4254
4368
  paddingY?: string;
4255
4369
  iconText?: string;
4256
4370
  iconName?: string;
4371
+ /** Icon glyph box in icon mode, e.g. "20px". Defaults to half of `size`. */
4372
+ iconSize?: string;
4373
+ /** Stroke width for the icon glyph, in viewBox units. Default 2. */
4374
+ iconStrokeWidth?: number;
4257
4375
  useIcon?: boolean;
4258
4376
  tooltipText?: string;
4259
4377
  showTooltip?: boolean;
@@ -5022,6 +5140,109 @@ type AgentWidgetSuggestionChipsConfig = {
5022
5140
  paddingX?: string;
5023
5141
  paddingY?: string;
5024
5142
  };
5143
+ /** A suggested next action shown to the user. Strings remain supported as shorthand. */
5144
+ type AgentWidgetSuggestion = string | {
5145
+ /** Stable analytics / DOM identity. Falls back to the prompt or label. */
5146
+ id?: string;
5147
+ /** Concise visible action label. */
5148
+ label: string;
5149
+ /** Text placed in the composer or sent. Defaults to `label`. */
5150
+ prompt?: string;
5151
+ /** Optional supporting copy, most useful with the `card` variant. */
5152
+ description?: string;
5153
+ /** Optional icon from Persona's bundled Lucide registry. */
5154
+ icon?: IconName;
5155
+ /**
5156
+ * CSS color for this item's glyph. Tints the icon only: label, border,
5157
+ * and background stay neutral. Ignored without an `icon`.
5158
+ */
5159
+ iconColor?: string;
5160
+ /** Override the surface's click behavior for this item. */
5161
+ behavior?: AgentWidgetSuggestionBehavior;
5162
+ /** Visually promote one high-confidence action. */
5163
+ emphasis?: "default" | "primary";
5164
+ };
5165
+ type AgentWidgetSuggestionBehavior = "send" | "fill";
5166
+ type AgentWidgetSuggestionVariant = "chip" | "card" | "list";
5167
+ type AgentWidgetSuggestionSurface = "starter" | "followUp";
5168
+ /**
5169
+ * Who produced the rendered suggestions: static config, the agent's
5170
+ * `suggest_replies` tool, or `controller.setFollowUpSuggestions`.
5171
+ */
5172
+ type AgentWidgetSuggestionSource = "config" | "agent" | "host";
5173
+ /**
5174
+ * A suggestion after Persona has normalized shorthand strings and resolved the
5175
+ * effective click behavior. Plugin hooks receive this stable shape.
5176
+ */
5177
+ type AgentWidgetResolvedSuggestion = {
5178
+ id: string;
5179
+ label: string;
5180
+ prompt: string;
5181
+ description?: string;
5182
+ icon?: IconName;
5183
+ /** CSS color for the glyph only; never the label, border, or background. */
5184
+ iconColor?: string;
5185
+ behavior: AgentWidgetSuggestionBehavior;
5186
+ emphasis: "default" | "primary";
5187
+ };
5188
+ /** Presentation keys shared by every suggestion surface. */
5189
+ type AgentWidgetSuggestionSurfaceConfig = {
5190
+ /** Item density. Defaults to `card` for starters and `chip` for follow-ups. */
5191
+ variant?: AgentWidgetSuggestionVariant;
5192
+ /** Default click behavior, overridable per item. Defaults to `send`. */
5193
+ behavior?: AgentWidgetSuggestionBehavior;
5194
+ /**
5195
+ * Layout for items past the surface width. Defaults to `wrap` for starters
5196
+ * and `scroll` for follow-ups. Applies to the `chip` variant only; the
5197
+ * `card` and `list` layouts manage their own stacking.
5198
+ */
5199
+ overflow?: "scroll" | "wrap";
5200
+ /** Maximum visible items. Defaults to 4. */
5201
+ maxItems?: number;
5202
+ };
5203
+ type AgentWidgetStarterSuggestionsConfig = AgentWidgetSuggestionSurfaceConfig & {
5204
+ /** Suggestions shown before the first user message. */
5205
+ items?: AgentWidgetSuggestion[];
5206
+ /**
5207
+ * `auto` uses the welcome surface when the welcome card renders and the
5208
+ * composer otherwise. Explicit values are literal: `welcome` renders
5209
+ * nothing when the welcome card is hidden. Defaults to `auto`.
5210
+ */
5211
+ placement?: "auto" | "welcome" | "composer";
5212
+ };
5213
+ type AgentWidgetFollowUpSuggestionsConfig = AgentWidgetSuggestionSurfaceConfig & {
5214
+ /**
5215
+ * Enable the built-in `suggest_replies` follow-ups. Defaults to true. When
5216
+ * false, `suggest_replies` renders as a regular tool bubble and is NOT
5217
+ * auto-resumed: only set this with no server-side `suggest_replies`
5218
+ * declaration, or the execution parks awaiting a resume that never comes.
5219
+ */
5220
+ enabled?: boolean;
5221
+ /**
5222
+ * Advertise the built-in `suggest_replies` tool to the agent on every
5223
+ * dispatch via `clientTools[]`: no server-side `runtimeTools` declaration
5224
+ * needed. Defaults to `false`. Declare the tool in one place: the API
5225
+ * dedupes a double declaration by name with `clientTools[]` winning, so
5226
+ * the model still sees exactly one tool, but the widget's description and
5227
+ * schema win and the effective tool type becomes `local` (the execution
5228
+ * pauses and the widget auto-resumes it). Ignored when `enabled` is
5229
+ * `false`.
5230
+ */
5231
+ expose?: boolean;
5232
+ /**
5233
+ * `auto` places follow-ups after the transcript in regular panels and above
5234
+ * the composer in composer-bar mode. Defaults to `auto`.
5235
+ */
5236
+ placement?: "auto" | "after-message" | "composer";
5237
+ };
5238
+ /**
5239
+ * Structured suggestions configuration. The legacy `suggestionChips` and
5240
+ * `suggestionChipsConfig` fields remain supported for backwards compatibility.
5241
+ */
5242
+ type AgentWidgetSuggestionsConfig = {
5243
+ starters?: AgentWidgetStarterSuggestionsConfig;
5244
+ followUps?: AgentWidgetFollowUpSuggestionsConfig;
5245
+ };
5025
5246
  /**
5026
5247
  * Interface for pluggable stream parsers that extract text from streaming responses.
5027
5248
  * Parsers handle incremental parsing to extract text values from structured formats (JSON, XML, etc.).
@@ -6268,7 +6489,11 @@ type AgentWidgetConfig = {
6268
6489
  * with `initialArtifacts`.
6269
6490
  */
6270
6491
  initialSelectedArtifactId?: string | null;
6492
+ /** Rich starter and follow-up suggestion surfaces. */
6493
+ suggestions?: AgentWidgetSuggestionsConfig;
6494
+ /** @deprecated Prefer `suggestions.starters.items`. */
6271
6495
  suggestionChips?: string[];
6496
+ /** @deprecated Prefer semantic tokens under `theme.components.suggestion`. */
6272
6497
  suggestionChipsConfig?: AgentWidgetSuggestionChipsConfig;
6273
6498
  debug?: boolean;
6274
6499
  formEndpoint?: string;
@@ -8473,6 +8698,19 @@ type Controller = {
8473
8698
  * @deprecated Use injectMessage() instead.
8474
8699
  */
8475
8700
  injectTestMessage: (event: AgentWidgetEvent) => void;
8701
+ /**
8702
+ * Show follow-up suggestions from host code. An ephemeral UI overlay: the
8703
+ * items never enter the transcript, the wire payload, or persisted state, so
8704
+ * they do not survive a refresh. Cleared automatically when the next user
8705
+ * message appends. Latest writer wins against the agent's `suggest_replies`
8706
+ * payloads: this call overrides chips shown now, and a payload arriving
8707
+ * afterwards overrides these. Renders through the `suggestions.followUps`
8708
+ * presentation config and the full plugin and `persona:suggestReplies:*`
8709
+ * event pipeline, with source `"host"`. An empty array clears.
8710
+ */
8711
+ setFollowUpSuggestions: (items: AgentWidgetSuggestion[]) => void;
8712
+ /** Remove host-set follow-up suggestions. Agent-set chips are untouched. */
8713
+ clearFollowUpSuggestions: () => void;
8476
8714
  getMessages: () => AgentWidgetMessage[];
8477
8715
  getStatus: () => AgentWidgetSessionStatus;
8478
8716
  getPersistentMetadata: () => Record<string, unknown>;
@@ -8655,15 +8893,18 @@ declare const removeAskUserQuestionSheet: (overlay: HTMLElement | null | undefin
8655
8893
  * `clientTools[]` (set `features.askUserQuestion.expose: true`): the same
8656
8894
  * wire surface WebMCP page tools ride. The server registers it as a LOCAL
8657
8895
  * 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.
8896
+ * so when the model calls it the execution pauses with a `step_await`, the
8897
+ * widget's answer-pill sheet renders, and `session.resolveAskUserQuestion()`
8898
+ * resumes the execution with the structured answers. The public await frame
8899
+ * for a local-tool pause carries no `awaitReason`; that discriminator is
8900
+ * internal, and its absence is what marks a client-resolvable pause.
8662
8901
  *
8663
8902
  * This replaces the previous integrator burden of hand-declaring the tool in
8664
8903
  * a flow's `runtimeTools` and keeping that schema in sync with the renderer.
8665
8904
  * Flows that already declare `ask_user_question` server-side should leave
8666
- * `expose` off: the model would otherwise see the tool twice.
8905
+ * `expose` off: the API dedupes a double declaration by name with
8906
+ * `clientTools[]` winning, so the model still sees exactly one tool, but the
8907
+ * widget's description and schema silently replace the flow's.
8667
8908
  */
8668
8909
 
8669
8910
  /**
@@ -8752,14 +8993,13 @@ declare const builtInClientToolsForDispatch: (config: AgentWidgetConfig | undefi
8752
8993
  * Built-in `suggest_replies` client tool.
8753
8994
  *
8754
8995
  * The widget can advertise this tool to the agent on every dispatch via
8755
- * `clientTools[]` (set `features.suggestReplies.expose: true`): the same
8996
+ * `clientTools[]` (set `suggestions.followUps.expose: true`): the same
8756
8997
  * 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.
8998
+ * calls it, the execution pauses with a `step_await` (a local-tool pause
8999
+ * carries no `awaitReason`; that discriminator is internal). Unlike
9000
+ * `ask_user_question`, the widget resolves it FIRE-AND-FORGET: it renders the
9001
+ * configured follow-up surface and immediately resumes the execution with a
9002
+ * canned "shown" result, so the turn completes without waiting on the user.
8763
9003
  *
8764
9004
  * Chip visibility is DERIVED state, not imperative show/hide: the chips of
8765
9005
  * the last `suggest_replies` tool message with no user message after it are
@@ -8770,9 +9010,10 @@ declare const builtInClientToolsForDispatch: (config: AgentWidgetConfig | undefi
8770
9010
 
8771
9011
  declare const SUGGEST_REPLIES_TOOL_NAME = "suggest_replies";
8772
9012
  /**
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.
9013
+ * JSON Schema for the tool's parameters. The model owns semantics only: id,
9014
+ * icon, behavior, and emphasis are presentation, and hosts set them with the
9015
+ * `transformSuggestions` plugin hook. A single object type is used because
9016
+ * strict structured-output modes reject or flatten `oneOf`.
8776
9017
  */
8777
9018
  declare const SUGGEST_REPLIES_PARAMETERS_SCHEMA: {
8778
9019
  readonly type: "object";
@@ -8783,9 +9024,26 @@ declare const SUGGEST_REPLIES_PARAMETERS_SCHEMA: {
8783
9024
  readonly maxItems: 4;
8784
9025
  readonly description: "1-4 short, distinct follow-up replies, phrased in the user's voice.";
8785
9026
  readonly items: {
8786
- readonly type: "string";
8787
- readonly minLength: 1;
8788
- readonly maxLength: 60;
9027
+ readonly type: "object";
9028
+ readonly properties: {
9029
+ readonly label: {
9030
+ readonly type: "string";
9031
+ readonly minLength: 1;
9032
+ readonly maxLength: 80;
9033
+ };
9034
+ readonly prompt: {
9035
+ readonly type: "string";
9036
+ readonly minLength: 1;
9037
+ readonly maxLength: 500;
9038
+ };
9039
+ readonly description: {
9040
+ readonly type: "string";
9041
+ readonly minLength: 1;
9042
+ readonly maxLength: 160;
9043
+ };
9044
+ };
9045
+ readonly required: readonly ["label"];
9046
+ readonly additionalProperties: false;
8789
9047
  };
8790
9048
  };
8791
9049
  };
@@ -8794,7 +9052,7 @@ declare const SUGGEST_REPLIES_PARAMETERS_SCHEMA: {
8794
9052
  };
8795
9053
  /**
8796
9054
  * The `ClientToolDefinition` shipped on `dispatch.clientTools[]` when
8797
- * `features.suggestReplies.expose` is on. Exported so integrators who prefer
9055
+ * `suggestions.followUps.expose` is on. Exported so integrators who prefer
8798
9056
  * declaring the tool server-side (a flow's `runtimeTools`) can reuse the same
8799
9057
  * description and schema instead of hand-writing them.
8800
9058
  */
@@ -8802,18 +9060,20 @@ declare const SUGGEST_REPLIES_CLIENT_TOOL: ClientToolDefinition;
8802
9060
  /** A tool-variant message produced by a `suggest_replies` call. */
8803
9061
  declare const isSuggestRepliesMessage: (message: AgentWidgetMessage) => boolean;
8804
9062
  /**
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.
9063
+ * Tolerant parse of a `suggest_replies` tool call's args into suggestion
9064
+ * items. Plain strings stay strings for older flows that emit
9065
+ * `suggestions: string[]`; objects keep only label, prompt, and description,
9066
+ * so a model that ignores `additionalProperties` cannot set presentation.
9067
+ * Hosts add id, icon, behavior, and emphasis via `transformSuggestions`.
8808
9068
  */
8809
- declare const parseSuggestRepliesPayload: (args: unknown) => string[];
9069
+ declare const parseSuggestRepliesPayload: (args: unknown) => AgentWidgetSuggestion[];
8810
9070
  /**
8811
9071
  * The chips to show right now: those of the LAST `suggest_replies` tool
8812
9072
  * message with NO user message after it, or `null` when none apply. All
8813
9073
  * calls in a turn still get resumed (the server awaits each); only the
8814
9074
  * latest renders.
8815
9075
  */
8816
- declare const latestAgentSuggestions: (messages: AgentWidgetMessage[]) => string[] | null;
9076
+ declare const latestAgentSuggestions: (messages: AgentWidgetMessage[]) => AgentWidgetSuggestion[] | null;
8817
9077
 
8818
9078
  type WidgetHostLayoutMode = "direct" | "docked";
8819
9079
  type WidgetHostLayout = {
@@ -10533,4 +10793,4 @@ interface RovingTablistController {
10533
10793
  }
10534
10794
  declare function createRovingTablist(container: HTMLElement, options: RovingTablistOptions): RovingTablistController;
10535
10795
 
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 };
10796
+ 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 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 AgentWidgetRenderSuggestionContext, 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 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 };