@runtypelabs/persona 3.31.0 → 3.33.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 (51) hide show
  1. package/README.md +2 -0
  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-quh7NmYD.d.cts → types-CthJFfNx.d.cts} +7 -0
  5. package/dist/animations/{types-quh7NmYD.d.ts → types-CthJFfNx.d.ts} +7 -0
  6. package/dist/animations/wipe.d.cts +1 -1
  7. package/dist/animations/wipe.d.ts +1 -1
  8. package/dist/codegen.cjs +4 -4
  9. package/dist/codegen.js +3 -3
  10. package/dist/index.cjs +43 -43
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +288 -8
  13. package/dist/index.d.ts +288 -8
  14. package/dist/index.global.js +76 -79
  15. package/dist/index.global.js.map +1 -1
  16. package/dist/index.js +43 -43
  17. package/dist/index.js.map +1 -1
  18. package/dist/launcher.global.js.map +1 -1
  19. package/dist/smart-dom-reader.d.cts +78 -2
  20. package/dist/smart-dom-reader.d.ts +78 -2
  21. package/dist/theme-editor.cjs +30 -30
  22. package/dist/theme-editor.d.cts +92 -5
  23. package/dist/theme-editor.d.ts +92 -5
  24. package/dist/theme-editor.js +30 -30
  25. package/dist/webmcp-polyfill.js +4 -0
  26. package/package.json +4 -3
  27. package/src/ask-user-question-tool.test.ts +148 -0
  28. package/src/ask-user-question-tool.ts +138 -0
  29. package/src/client.ts +43 -9
  30. package/src/components/messages.ts +10 -0
  31. package/src/components/suggestions.ts +49 -6
  32. package/src/index-core.ts +15 -0
  33. package/src/index-global.ts +39 -0
  34. package/src/runtime/host-layout.test.ts +158 -3
  35. package/src/runtime/host-layout.ts +95 -1
  36. package/src/session.ts +188 -32
  37. package/src/session.webmcp.test.ts +48 -0
  38. package/src/suggest-replies-tool.test.ts +445 -0
  39. package/src/suggest-replies-tool.ts +152 -0
  40. package/src/theme-editor/index.ts +2 -0
  41. package/src/theme-editor/webmcp/index.ts +2 -0
  42. package/src/theme-editor/webmcp/types.ts +16 -3
  43. package/src/types.ts +79 -2
  44. package/src/ui.suggest-replies.test.ts +237 -0
  45. package/src/ui.ts +57 -13
  46. package/src/utils/dock.test.ts +23 -1
  47. package/src/utils/dock.ts +2 -0
  48. package/src/version.ts +5 -2
  49. package/src/webmcp-bridge.test.ts +60 -0
  50. package/src/webmcp-bridge.ts +34 -1
  51. package/src/webmcp-polyfill.ts +16 -0
@@ -1473,8 +1473,13 @@ type ClientToolDefinition = {
1473
1473
  description: string;
1474
1474
  /** JSON Schema (per WebMCP spec) — passed through as-is. */
1475
1475
  parametersSchema?: object;
1476
- /** Set to `'webmcp'` for tools discovered via the polyfill. */
1477
- origin?: 'webmcp' | 'local';
1476
+ /**
1477
+ * `'webmcp'` for tools discovered via the polyfill (server prepends the
1478
+ * `webmcp:` wire prefix); `'sdk'` for widget/SDK-provided tools (name stays
1479
+ * bare on the wire). Matches the server's accepted enum — any other value
1480
+ * fails dispatch validation.
1481
+ */
1482
+ origin?: 'webmcp' | 'sdk';
1478
1483
  /** Origin of the page that registered the tool — for server-side audit. */
1479
1484
  pageOrigin?: string;
1480
1485
  /**
@@ -1603,6 +1608,13 @@ type AgentMessageMetadata = {
1603
1608
  * paginated stepper. Persists alongside `askUserQuestionAnswers`.
1604
1609
  */
1605
1610
  askUserQuestionIndex?: number;
1611
+ /**
1612
+ * Set to `true` once a `suggest_replies` tool call's fire-and-forget
1613
+ * `/resume` has been accepted by the server. Persisted belt-and-suspenders
1614
+ * mirror of the in-memory resolved-key dedupe, so hydration/re-emit paths
1615
+ * never re-resume the call.
1616
+ */
1617
+ suggestRepliesResolved?: boolean;
1606
1618
  };
1607
1619
  type AgentWidgetRequestMiddlewareContext = {
1608
1620
  payload: AgentWidgetRequestPayload;
@@ -2248,6 +2260,37 @@ type AgentWidgetFeatureFlags = {
2248
2260
  * pills + optional free-text input.
2249
2261
  */
2250
2262
  askUserQuestion?: AgentWidgetAskUserQuestionFeature;
2263
+ /**
2264
+ * Built-in `suggest_replies` quick-reply chips. When the assistant invokes
2265
+ * the tool, the widget shows the suggestions as tappable chips above the
2266
+ * composer (reusing the suggestion-chips surface) and immediately resumes
2267
+ * the execution — fire-and-forget, no user input awaited.
2268
+ */
2269
+ suggestReplies?: AgentWidgetSuggestRepliesFeature;
2270
+ };
2271
+ /**
2272
+ * Feature config for the built-in `suggest_replies` quick-reply chips.
2273
+ * Chips render in the existing suggestions slot above the composer and are
2274
+ * styled by the widget-level `suggestionChipsConfig`. A tapped chip is sent
2275
+ * verbatim as the user's next message; chips clear once any user message
2276
+ * follows them.
2277
+ */
2278
+ type AgentWidgetSuggestRepliesFeature = {
2279
+ /**
2280
+ * Enable the feature. Defaults to true. When false, `suggest_replies`
2281
+ * renders as a regular tool bubble and is NOT auto-resumed — only set this
2282
+ * with no server-side `suggest_replies` declaration, or the execution
2283
+ * parks awaiting a resume that never comes.
2284
+ */
2285
+ enabled?: boolean;
2286
+ /**
2287
+ * Advertise the built-in `suggest_replies` tool to the agent on every
2288
+ * dispatch via `clientTools[]` — no server-side `runtimeTools` declaration
2289
+ * needed. Defaults to `false`: flows that already declare the tool via
2290
+ * `runtimeTools` would otherwise present it to the model twice. Ignored
2291
+ * when `enabled` is `false`.
2292
+ */
2293
+ expose?: boolean;
2251
2294
  };
2252
2295
  /**
2253
2296
  * Single selectable option in an `ask_user_question` prompt.
@@ -2308,6 +2351,19 @@ type AgentWidgetAskUserQuestionStyles = {
2308
2351
  type AgentWidgetAskUserQuestionFeature = {
2309
2352
  /** Enable the feature. Defaults to true. When false, `ask_user_question` renders as a regular tool bubble. */
2310
2353
  enabled?: boolean;
2354
+ /**
2355
+ * Advertise the built-in `ask_user_question` tool to the agent on every
2356
+ * dispatch via `clientTools[]` — no server-side `runtimeTools` declaration
2357
+ * needed. The tool ships with a model-facing description and JSON schema
2358
+ * matching {@link AskUserQuestionPayload}; when the model calls it, the
2359
+ * existing answer-pill sheet renders and the answer resumes the execution.
2360
+ *
2361
+ * Defaults to `false`: flows that already declare `ask_user_question` via
2362
+ * `runtimeTools` would otherwise present the tool to the model twice.
2363
+ * Ignored when `enabled` is `false` — never offer the agent a question
2364
+ * tool the widget can't render an answer UI for.
2365
+ */
2366
+ expose?: boolean;
2311
2367
  /** Slide-in animation duration in ms. Defaults to 180. */
2312
2368
  slideInMs?: number;
2313
2369
  /** Label for the free-text pill. Defaults to "Other…". */
@@ -2489,6 +2545,26 @@ type AgentWidgetDockConfig = {
2489
2545
  * it appears to emerge at full width like a floating widget.
2490
2546
  */
2491
2547
  reveal?: "resize" | "overlay" | "push" | "emerge";
2548
+ /**
2549
+ * Maximum height of the dock panel, applied as a viewport-overflow guard.
2550
+ *
2551
+ * The docked shell sizes itself with `height: 100%`, which only resolves when
2552
+ * an ancestor (usually `html, body { height: 100% }`) provides a definite
2553
+ * height. Without one, the dock column would otherwise grow with the
2554
+ * conversation and scroll off the page. This cap clamps the panel to the
2555
+ * viewport (and keeps the `resize`/`emerge` reveals pinned with
2556
+ * `position: sticky`; `push`/`overlay` get the cap only, since their
2557
+ * transform/absolute contexts defeat sticky) so a missing height chain
2558
+ * degrades gracefully instead of breaking the chat.
2559
+ *
2560
+ * - Set a CSS length (e.g. `"600px"`, `"80vh"`) to override the cap.
2561
+ * - Set `false` to disable the guard entirely (the panel then sizes purely
2562
+ * from the surrounding layout — make sure your page provides a definite
2563
+ * height all the way down to the dock target's parent).
2564
+ *
2565
+ * @default "100dvh"
2566
+ */
2567
+ maxHeight?: string | false;
2492
2568
  };
2493
2569
  /**
2494
2570
  * Layout configuration for `mountMode: "composer-bar"`. Controls how the
@@ -5768,8 +5844,15 @@ interface ToolTextContent {
5768
5844
  type: 'text';
5769
5845
  text: string;
5770
5846
  }
5847
+ /** MCP image content block: raw base64 (no `data:` prefix) plus its MIME type. */
5848
+ interface ToolImageContent {
5849
+ type: 'image';
5850
+ data: string;
5851
+ mimeType: string;
5852
+ }
5853
+ type ToolContent = ToolTextContent | ToolImageContent;
5771
5854
  interface ToolResult {
5772
- content: ToolTextContent[];
5855
+ content: ToolContent[];
5773
5856
  /** Optional machine-readable mirror of the text content. */
5774
5857
  structuredContent?: unknown;
5775
5858
  isError?: boolean;
@@ -5789,7 +5872,11 @@ interface WebMcpTool {
5789
5872
  annotations?: ToolAnnotations;
5790
5873
  execute: ToolExecute;
5791
5874
  }
5792
- /** Wrap a JSON-serializable payload in the MCP tool-result envelope. */
5875
+ /**
5876
+ * Wrap a JSON-serializable payload in the MCP tool-result envelope. Compact
5877
+ * JSON (no indentation) — the text is consumed by a model, where pretty-print
5878
+ * whitespace is pure token overhead.
5879
+ */
5793
5880
  declare function toolResult(payload: unknown): ToolResult;
5794
5881
  /**
5795
5882
  * Structural subset of `ThemeEditorState` (and the example app's `state`
@@ -5938,4 +6025,4 @@ declare function runContrastChecks(state: ThemeEditorLike, level?: ContrastLevel
5938
6025
  /** Compact contrast warnings for the regions a mutation touched. */
5939
6026
  declare function quickContrastWarnings(state: ThemeEditorLike, pairKeys: string[], variant?: 'light' | 'dark' | 'both', level?: ContrastLevel): ContrastWarning[];
5940
6027
 
5941
- export { ADVANCED_TOKENS_SECTION, ALL_ROLES, ALL_TABS, BRAND_PALETTE_SECTION, BUILT_IN_PRESETS, type BuildTranscriptStreamFramesOptions, COLORS_SECTIONS, COLOR_FAMILIES, COMPONENTS_SECTIONS, COMPONENT_COLOR_SECTIONS, COMPONENT_SHAPE_SECTIONS, CONFIGURE_SECTIONS, CONFIGURE_SUB_GROUPS, CONTRAST_PAIRS, CSS_NAMED_COLORS, type ColorScaleOptions, type CompareMode, type ConfigChangeListener, type ConfiguratorSnapshot, type ContrastCheck, type ContrastLevel, type ContrastReport, type ContrastWarning, type CreateThemeEditorToolsOptions, DEVICE_DIMENSIONS, type DetectedRoleAssignment, type EditTarget, type FieldDef, type FieldType, HOME_SUGGESTION_CHIPS, INTERFACE_ROLES_SECTION, MOCK_BROWSER_CONTENT, MOCK_WORKSPACE_CONTENT, type OnChangeCallback, PALETTE_SECTION, PREVIEW_STORAGE_ADAPTER, type PreviewConfigOptions, type PreviewDevice, type PreviewLifecycleContext, type PreviewScene, type PreviewShellMode, type PreviewShellPalette, type PreviewTranscriptEntryPreset, RADIUS_PRESETS, ROLE_ASSISTANT_MESSAGES, ROLE_BORDERS, ROLE_FAMILIES, ROLE_FAMILY_LABELS, ROLE_HEADER, ROLE_INPUT, ROLE_INTENSITIES, ROLE_LINKS_FOCUS, ROLE_PRIMARY_ACTIONS, ROLE_SCROLL_TO_BOTTOM, ROLE_SURFACES, ROLE_USER_MESSAGES, type RoleAssignmentOptions, type RoleFamily, type RoleIntensity, type RoleState, type RoleTarget, type RoleTargetKind, SEMANTIC_COLORS_SECTION, SHADE_KEYS, SHELL_STYLE_ID, STATUS_COLORS_SECTION, STATUS_PALETTE_SECTION, STYLE_SECTIONS, STYLE_SECTIONS_V2, type SectionDef, type SectionPreset, type SelectOption, type SliderOptions, type SubGroupDef, THEME_EDITOR_PRESETS, THEME_SECTION, type TabDef, type ThemeEditorLike, type ThemeEditorPreset, ThemeEditorState, type ThemePreviewHandle, type ThemePreviewOptions, type ThemeSummary, type TokenRefOptions, type ToolAnnotations, type ToolExecute, type ToolResult, type ToolTextContent, type TranscriptStreamFrame, type WebMcpTool, ZOOM_MAX, ZOOM_MIN, appendPreviewTranscriptEntry, applySceneConfig, applyShellTheme, buildPreviewConfig, buildPreviewConfigWithMessages, buildShellCss, buildSrcdoc, buildSummary, buildTranscriptStreamFrames, coerceColor, coerceFamily, coerceIntensity, coerceRadius, coerceRoundnessStyle, coerceScheme, convertFromPx, convertToPx, createPreviewMessages, createPreviewTranscriptEntry, createThemeEditorTools, createThemePreview, detectRoleAssignment, escapeHtml, findSection, formatCssValue, generateColorScale, getPreviewTranscriptPresetLabel, getShellPalette, getThemeEditorPreset, hexToHsl, hslToHex, isValidHex, normalizeColorValue, paletteColorPath, parseCssValue, presetStreamsText, quickContrastWarnings, resolveRoleAssignment, resolveThemeColorPath, rgbToHex, runContrastChecks, scopeSection, tokenRefDisplayName, toolResult, wcagContrastRatio };
6028
+ export { ADVANCED_TOKENS_SECTION, ALL_ROLES, ALL_TABS, BRAND_PALETTE_SECTION, BUILT_IN_PRESETS, type BuildTranscriptStreamFramesOptions, COLORS_SECTIONS, COLOR_FAMILIES, COMPONENTS_SECTIONS, COMPONENT_COLOR_SECTIONS, COMPONENT_SHAPE_SECTIONS, CONFIGURE_SECTIONS, CONFIGURE_SUB_GROUPS, CONTRAST_PAIRS, CSS_NAMED_COLORS, type ColorScaleOptions, type CompareMode, type ConfigChangeListener, type ConfiguratorSnapshot, type ContrastCheck, type ContrastLevel, type ContrastReport, type ContrastWarning, type CreateThemeEditorToolsOptions, DEVICE_DIMENSIONS, type DetectedRoleAssignment, type EditTarget, type FieldDef, type FieldType, HOME_SUGGESTION_CHIPS, INTERFACE_ROLES_SECTION, MOCK_BROWSER_CONTENT, MOCK_WORKSPACE_CONTENT, type OnChangeCallback, PALETTE_SECTION, PREVIEW_STORAGE_ADAPTER, type PreviewConfigOptions, type PreviewDevice, type PreviewLifecycleContext, type PreviewScene, type PreviewShellMode, type PreviewShellPalette, type PreviewTranscriptEntryPreset, RADIUS_PRESETS, ROLE_ASSISTANT_MESSAGES, ROLE_BORDERS, ROLE_FAMILIES, ROLE_FAMILY_LABELS, ROLE_HEADER, ROLE_INPUT, ROLE_INTENSITIES, ROLE_LINKS_FOCUS, ROLE_PRIMARY_ACTIONS, ROLE_SCROLL_TO_BOTTOM, ROLE_SURFACES, ROLE_USER_MESSAGES, type RoleAssignmentOptions, type RoleFamily, type RoleIntensity, type RoleState, type RoleTarget, type RoleTargetKind, SEMANTIC_COLORS_SECTION, SHADE_KEYS, SHELL_STYLE_ID, STATUS_COLORS_SECTION, STATUS_PALETTE_SECTION, STYLE_SECTIONS, STYLE_SECTIONS_V2, type SectionDef, type SectionPreset, type SelectOption, type SliderOptions, type SubGroupDef, THEME_EDITOR_PRESETS, THEME_SECTION, type TabDef, type ThemeEditorLike, type ThemeEditorPreset, ThemeEditorState, type ThemePreviewHandle, type ThemePreviewOptions, type ThemeSummary, type TokenRefOptions, type ToolAnnotations, type ToolContent, type ToolExecute, type ToolImageContent, type ToolResult, type ToolTextContent, type TranscriptStreamFrame, type WebMcpTool, ZOOM_MAX, ZOOM_MIN, appendPreviewTranscriptEntry, applySceneConfig, applyShellTheme, buildPreviewConfig, buildPreviewConfigWithMessages, buildShellCss, buildSrcdoc, buildSummary, buildTranscriptStreamFrames, coerceColor, coerceFamily, coerceIntensity, coerceRadius, coerceRoundnessStyle, coerceScheme, convertFromPx, convertToPx, createPreviewMessages, createPreviewTranscriptEntry, createThemeEditorTools, createThemePreview, detectRoleAssignment, escapeHtml, findSection, formatCssValue, generateColorScale, getPreviewTranscriptPresetLabel, getShellPalette, getThemeEditorPreset, hexToHsl, hslToHex, isValidHex, normalizeColorValue, paletteColorPath, parseCssValue, presetStreamsText, quickContrastWarnings, resolveRoleAssignment, resolveThemeColorPath, rgbToHex, runContrastChecks, scopeSection, tokenRefDisplayName, toolResult, wcagContrastRatio };
@@ -1473,8 +1473,13 @@ type ClientToolDefinition = {
1473
1473
  description: string;
1474
1474
  /** JSON Schema (per WebMCP spec) — passed through as-is. */
1475
1475
  parametersSchema?: object;
1476
- /** Set to `'webmcp'` for tools discovered via the polyfill. */
1477
- origin?: 'webmcp' | 'local';
1476
+ /**
1477
+ * `'webmcp'` for tools discovered via the polyfill (server prepends the
1478
+ * `webmcp:` wire prefix); `'sdk'` for widget/SDK-provided tools (name stays
1479
+ * bare on the wire). Matches the server's accepted enum — any other value
1480
+ * fails dispatch validation.
1481
+ */
1482
+ origin?: 'webmcp' | 'sdk';
1478
1483
  /** Origin of the page that registered the tool — for server-side audit. */
1479
1484
  pageOrigin?: string;
1480
1485
  /**
@@ -1603,6 +1608,13 @@ type AgentMessageMetadata = {
1603
1608
  * paginated stepper. Persists alongside `askUserQuestionAnswers`.
1604
1609
  */
1605
1610
  askUserQuestionIndex?: number;
1611
+ /**
1612
+ * Set to `true` once a `suggest_replies` tool call's fire-and-forget
1613
+ * `/resume` has been accepted by the server. Persisted belt-and-suspenders
1614
+ * mirror of the in-memory resolved-key dedupe, so hydration/re-emit paths
1615
+ * never re-resume the call.
1616
+ */
1617
+ suggestRepliesResolved?: boolean;
1606
1618
  };
1607
1619
  type AgentWidgetRequestMiddlewareContext = {
1608
1620
  payload: AgentWidgetRequestPayload;
@@ -2248,6 +2260,37 @@ type AgentWidgetFeatureFlags = {
2248
2260
  * pills + optional free-text input.
2249
2261
  */
2250
2262
  askUserQuestion?: AgentWidgetAskUserQuestionFeature;
2263
+ /**
2264
+ * Built-in `suggest_replies` quick-reply chips. When the assistant invokes
2265
+ * the tool, the widget shows the suggestions as tappable chips above the
2266
+ * composer (reusing the suggestion-chips surface) and immediately resumes
2267
+ * the execution — fire-and-forget, no user input awaited.
2268
+ */
2269
+ suggestReplies?: AgentWidgetSuggestRepliesFeature;
2270
+ };
2271
+ /**
2272
+ * Feature config for the built-in `suggest_replies` quick-reply chips.
2273
+ * Chips render in the existing suggestions slot above the composer and are
2274
+ * styled by the widget-level `suggestionChipsConfig`. A tapped chip is sent
2275
+ * verbatim as the user's next message; chips clear once any user message
2276
+ * follows them.
2277
+ */
2278
+ type AgentWidgetSuggestRepliesFeature = {
2279
+ /**
2280
+ * Enable the feature. Defaults to true. When false, `suggest_replies`
2281
+ * renders as a regular tool bubble and is NOT auto-resumed — only set this
2282
+ * with no server-side `suggest_replies` declaration, or the execution
2283
+ * parks awaiting a resume that never comes.
2284
+ */
2285
+ enabled?: boolean;
2286
+ /**
2287
+ * Advertise the built-in `suggest_replies` tool to the agent on every
2288
+ * dispatch via `clientTools[]` — no server-side `runtimeTools` declaration
2289
+ * needed. Defaults to `false`: flows that already declare the tool via
2290
+ * `runtimeTools` would otherwise present it to the model twice. Ignored
2291
+ * when `enabled` is `false`.
2292
+ */
2293
+ expose?: boolean;
2251
2294
  };
2252
2295
  /**
2253
2296
  * Single selectable option in an `ask_user_question` prompt.
@@ -2308,6 +2351,19 @@ type AgentWidgetAskUserQuestionStyles = {
2308
2351
  type AgentWidgetAskUserQuestionFeature = {
2309
2352
  /** Enable the feature. Defaults to true. When false, `ask_user_question` renders as a regular tool bubble. */
2310
2353
  enabled?: boolean;
2354
+ /**
2355
+ * Advertise the built-in `ask_user_question` tool to the agent on every
2356
+ * dispatch via `clientTools[]` — no server-side `runtimeTools` declaration
2357
+ * needed. The tool ships with a model-facing description and JSON schema
2358
+ * matching {@link AskUserQuestionPayload}; when the model calls it, the
2359
+ * existing answer-pill sheet renders and the answer resumes the execution.
2360
+ *
2361
+ * Defaults to `false`: flows that already declare `ask_user_question` via
2362
+ * `runtimeTools` would otherwise present the tool to the model twice.
2363
+ * Ignored when `enabled` is `false` — never offer the agent a question
2364
+ * tool the widget can't render an answer UI for.
2365
+ */
2366
+ expose?: boolean;
2311
2367
  /** Slide-in animation duration in ms. Defaults to 180. */
2312
2368
  slideInMs?: number;
2313
2369
  /** Label for the free-text pill. Defaults to "Other…". */
@@ -2489,6 +2545,26 @@ type AgentWidgetDockConfig = {
2489
2545
  * it appears to emerge at full width like a floating widget.
2490
2546
  */
2491
2547
  reveal?: "resize" | "overlay" | "push" | "emerge";
2548
+ /**
2549
+ * Maximum height of the dock panel, applied as a viewport-overflow guard.
2550
+ *
2551
+ * The docked shell sizes itself with `height: 100%`, which only resolves when
2552
+ * an ancestor (usually `html, body { height: 100% }`) provides a definite
2553
+ * height. Without one, the dock column would otherwise grow with the
2554
+ * conversation and scroll off the page. This cap clamps the panel to the
2555
+ * viewport (and keeps the `resize`/`emerge` reveals pinned with
2556
+ * `position: sticky`; `push`/`overlay` get the cap only, since their
2557
+ * transform/absolute contexts defeat sticky) so a missing height chain
2558
+ * degrades gracefully instead of breaking the chat.
2559
+ *
2560
+ * - Set a CSS length (e.g. `"600px"`, `"80vh"`) to override the cap.
2561
+ * - Set `false` to disable the guard entirely (the panel then sizes purely
2562
+ * from the surrounding layout — make sure your page provides a definite
2563
+ * height all the way down to the dock target's parent).
2564
+ *
2565
+ * @default "100dvh"
2566
+ */
2567
+ maxHeight?: string | false;
2492
2568
  };
2493
2569
  /**
2494
2570
  * Layout configuration for `mountMode: "composer-bar"`. Controls how the
@@ -5768,8 +5844,15 @@ interface ToolTextContent {
5768
5844
  type: 'text';
5769
5845
  text: string;
5770
5846
  }
5847
+ /** MCP image content block: raw base64 (no `data:` prefix) plus its MIME type. */
5848
+ interface ToolImageContent {
5849
+ type: 'image';
5850
+ data: string;
5851
+ mimeType: string;
5852
+ }
5853
+ type ToolContent = ToolTextContent | ToolImageContent;
5771
5854
  interface ToolResult {
5772
- content: ToolTextContent[];
5855
+ content: ToolContent[];
5773
5856
  /** Optional machine-readable mirror of the text content. */
5774
5857
  structuredContent?: unknown;
5775
5858
  isError?: boolean;
@@ -5789,7 +5872,11 @@ interface WebMcpTool {
5789
5872
  annotations?: ToolAnnotations;
5790
5873
  execute: ToolExecute;
5791
5874
  }
5792
- /** Wrap a JSON-serializable payload in the MCP tool-result envelope. */
5875
+ /**
5876
+ * Wrap a JSON-serializable payload in the MCP tool-result envelope. Compact
5877
+ * JSON (no indentation) — the text is consumed by a model, where pretty-print
5878
+ * whitespace is pure token overhead.
5879
+ */
5793
5880
  declare function toolResult(payload: unknown): ToolResult;
5794
5881
  /**
5795
5882
  * Structural subset of `ThemeEditorState` (and the example app's `state`
@@ -5938,4 +6025,4 @@ declare function runContrastChecks(state: ThemeEditorLike, level?: ContrastLevel
5938
6025
  /** Compact contrast warnings for the regions a mutation touched. */
5939
6026
  declare function quickContrastWarnings(state: ThemeEditorLike, pairKeys: string[], variant?: 'light' | 'dark' | 'both', level?: ContrastLevel): ContrastWarning[];
5940
6027
 
5941
- export { ADVANCED_TOKENS_SECTION, ALL_ROLES, ALL_TABS, BRAND_PALETTE_SECTION, BUILT_IN_PRESETS, type BuildTranscriptStreamFramesOptions, COLORS_SECTIONS, COLOR_FAMILIES, COMPONENTS_SECTIONS, COMPONENT_COLOR_SECTIONS, COMPONENT_SHAPE_SECTIONS, CONFIGURE_SECTIONS, CONFIGURE_SUB_GROUPS, CONTRAST_PAIRS, CSS_NAMED_COLORS, type ColorScaleOptions, type CompareMode, type ConfigChangeListener, type ConfiguratorSnapshot, type ContrastCheck, type ContrastLevel, type ContrastReport, type ContrastWarning, type CreateThemeEditorToolsOptions, DEVICE_DIMENSIONS, type DetectedRoleAssignment, type EditTarget, type FieldDef, type FieldType, HOME_SUGGESTION_CHIPS, INTERFACE_ROLES_SECTION, MOCK_BROWSER_CONTENT, MOCK_WORKSPACE_CONTENT, type OnChangeCallback, PALETTE_SECTION, PREVIEW_STORAGE_ADAPTER, type PreviewConfigOptions, type PreviewDevice, type PreviewLifecycleContext, type PreviewScene, type PreviewShellMode, type PreviewShellPalette, type PreviewTranscriptEntryPreset, RADIUS_PRESETS, ROLE_ASSISTANT_MESSAGES, ROLE_BORDERS, ROLE_FAMILIES, ROLE_FAMILY_LABELS, ROLE_HEADER, ROLE_INPUT, ROLE_INTENSITIES, ROLE_LINKS_FOCUS, ROLE_PRIMARY_ACTIONS, ROLE_SCROLL_TO_BOTTOM, ROLE_SURFACES, ROLE_USER_MESSAGES, type RoleAssignmentOptions, type RoleFamily, type RoleIntensity, type RoleState, type RoleTarget, type RoleTargetKind, SEMANTIC_COLORS_SECTION, SHADE_KEYS, SHELL_STYLE_ID, STATUS_COLORS_SECTION, STATUS_PALETTE_SECTION, STYLE_SECTIONS, STYLE_SECTIONS_V2, type SectionDef, type SectionPreset, type SelectOption, type SliderOptions, type SubGroupDef, THEME_EDITOR_PRESETS, THEME_SECTION, type TabDef, type ThemeEditorLike, type ThemeEditorPreset, ThemeEditorState, type ThemePreviewHandle, type ThemePreviewOptions, type ThemeSummary, type TokenRefOptions, type ToolAnnotations, type ToolExecute, type ToolResult, type ToolTextContent, type TranscriptStreamFrame, type WebMcpTool, ZOOM_MAX, ZOOM_MIN, appendPreviewTranscriptEntry, applySceneConfig, applyShellTheme, buildPreviewConfig, buildPreviewConfigWithMessages, buildShellCss, buildSrcdoc, buildSummary, buildTranscriptStreamFrames, coerceColor, coerceFamily, coerceIntensity, coerceRadius, coerceRoundnessStyle, coerceScheme, convertFromPx, convertToPx, createPreviewMessages, createPreviewTranscriptEntry, createThemeEditorTools, createThemePreview, detectRoleAssignment, escapeHtml, findSection, formatCssValue, generateColorScale, getPreviewTranscriptPresetLabel, getShellPalette, getThemeEditorPreset, hexToHsl, hslToHex, isValidHex, normalizeColorValue, paletteColorPath, parseCssValue, presetStreamsText, quickContrastWarnings, resolveRoleAssignment, resolveThemeColorPath, rgbToHex, runContrastChecks, scopeSection, tokenRefDisplayName, toolResult, wcagContrastRatio };
6028
+ export { ADVANCED_TOKENS_SECTION, ALL_ROLES, ALL_TABS, BRAND_PALETTE_SECTION, BUILT_IN_PRESETS, type BuildTranscriptStreamFramesOptions, COLORS_SECTIONS, COLOR_FAMILIES, COMPONENTS_SECTIONS, COMPONENT_COLOR_SECTIONS, COMPONENT_SHAPE_SECTIONS, CONFIGURE_SECTIONS, CONFIGURE_SUB_GROUPS, CONTRAST_PAIRS, CSS_NAMED_COLORS, type ColorScaleOptions, type CompareMode, type ConfigChangeListener, type ConfiguratorSnapshot, type ContrastCheck, type ContrastLevel, type ContrastReport, type ContrastWarning, type CreateThemeEditorToolsOptions, DEVICE_DIMENSIONS, type DetectedRoleAssignment, type EditTarget, type FieldDef, type FieldType, HOME_SUGGESTION_CHIPS, INTERFACE_ROLES_SECTION, MOCK_BROWSER_CONTENT, MOCK_WORKSPACE_CONTENT, type OnChangeCallback, PALETTE_SECTION, PREVIEW_STORAGE_ADAPTER, type PreviewConfigOptions, type PreviewDevice, type PreviewLifecycleContext, type PreviewScene, type PreviewShellMode, type PreviewShellPalette, type PreviewTranscriptEntryPreset, RADIUS_PRESETS, ROLE_ASSISTANT_MESSAGES, ROLE_BORDERS, ROLE_FAMILIES, ROLE_FAMILY_LABELS, ROLE_HEADER, ROLE_INPUT, ROLE_INTENSITIES, ROLE_LINKS_FOCUS, ROLE_PRIMARY_ACTIONS, ROLE_SCROLL_TO_BOTTOM, ROLE_SURFACES, ROLE_USER_MESSAGES, type RoleAssignmentOptions, type RoleFamily, type RoleIntensity, type RoleState, type RoleTarget, type RoleTargetKind, SEMANTIC_COLORS_SECTION, SHADE_KEYS, SHELL_STYLE_ID, STATUS_COLORS_SECTION, STATUS_PALETTE_SECTION, STYLE_SECTIONS, STYLE_SECTIONS_V2, type SectionDef, type SectionPreset, type SelectOption, type SliderOptions, type SubGroupDef, THEME_EDITOR_PRESETS, THEME_SECTION, type TabDef, type ThemeEditorLike, type ThemeEditorPreset, ThemeEditorState, type ThemePreviewHandle, type ThemePreviewOptions, type ThemeSummary, type TokenRefOptions, type ToolAnnotations, type ToolContent, type ToolExecute, type ToolImageContent, type ToolResult, type ToolTextContent, type TranscriptStreamFrame, type WebMcpTool, ZOOM_MAX, ZOOM_MIN, appendPreviewTranscriptEntry, applySceneConfig, applyShellTheme, buildPreviewConfig, buildPreviewConfigWithMessages, buildShellCss, buildSrcdoc, buildSummary, buildTranscriptStreamFrames, coerceColor, coerceFamily, coerceIntensity, coerceRadius, coerceRoundnessStyle, coerceScheme, convertFromPx, convertToPx, createPreviewMessages, createPreviewTranscriptEntry, createThemeEditorTools, createThemePreview, detectRoleAssignment, escapeHtml, findSection, formatCssValue, generateColorScale, getPreviewTranscriptPresetLabel, getShellPalette, getThemeEditorPreset, hexToHsl, hslToHex, isValidHex, normalizeColorValue, paletteColorPath, parseCssValue, presetStreamsText, quickContrastWarnings, resolveRoleAssignment, resolveThemeColorPath, rgbToHex, runContrastChecks, scopeSection, tokenRefDisplayName, toolResult, wcagContrastRatio };