@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
package/dist/index.d.cts CHANGED
@@ -2195,8 +2195,13 @@ type ClientToolDefinition = {
2195
2195
  description: string;
2196
2196
  /** JSON Schema (per WebMCP spec) — passed through as-is. */
2197
2197
  parametersSchema?: object;
2198
- /** Set to `'webmcp'` for tools discovered via the polyfill. */
2199
- origin?: 'webmcp' | 'local';
2198
+ /**
2199
+ * `'webmcp'` for tools discovered via the polyfill (server prepends the
2200
+ * `webmcp:` wire prefix); `'sdk'` for widget/SDK-provided tools (name stays
2201
+ * bare on the wire). Matches the server's accepted enum — any other value
2202
+ * fails dispatch validation.
2203
+ */
2204
+ origin?: 'webmcp' | 'sdk';
2200
2205
  /** Origin of the page that registered the tool — for server-side audit. */
2201
2206
  pageOrigin?: string;
2202
2207
  /**
@@ -2358,6 +2363,13 @@ type AgentMessageMetadata = {
2358
2363
  * paginated stepper. Persists alongside `askUserQuestionAnswers`.
2359
2364
  */
2360
2365
  askUserQuestionIndex?: number;
2366
+ /**
2367
+ * Set to `true` once a `suggest_replies` tool call's fire-and-forget
2368
+ * `/resume` has been accepted by the server. Persisted belt-and-suspenders
2369
+ * mirror of the in-memory resolved-key dedupe, so hydration/re-emit paths
2370
+ * never re-resume the call.
2371
+ */
2372
+ suggestRepliesResolved?: boolean;
2361
2373
  };
2362
2374
  type AgentWidgetRequestMiddlewareContext = {
2363
2375
  payload: AgentWidgetRequestPayload;
@@ -3003,6 +3015,37 @@ type AgentWidgetFeatureFlags = {
3003
3015
  * pills + optional free-text input.
3004
3016
  */
3005
3017
  askUserQuestion?: AgentWidgetAskUserQuestionFeature;
3018
+ /**
3019
+ * Built-in `suggest_replies` quick-reply chips. When the assistant invokes
3020
+ * the tool, the widget shows the suggestions as tappable chips above the
3021
+ * composer (reusing the suggestion-chips surface) and immediately resumes
3022
+ * the execution — fire-and-forget, no user input awaited.
3023
+ */
3024
+ suggestReplies?: AgentWidgetSuggestRepliesFeature;
3025
+ };
3026
+ /**
3027
+ * Feature config for the built-in `suggest_replies` quick-reply chips.
3028
+ * Chips render in the existing suggestions slot above the composer and are
3029
+ * styled by the widget-level `suggestionChipsConfig`. A tapped chip is sent
3030
+ * verbatim as the user's next message; chips clear once any user message
3031
+ * follows them.
3032
+ */
3033
+ type AgentWidgetSuggestRepliesFeature = {
3034
+ /**
3035
+ * Enable the feature. Defaults to true. When false, `suggest_replies`
3036
+ * renders as a regular tool bubble and is NOT auto-resumed — only set this
3037
+ * with no server-side `suggest_replies` declaration, or the execution
3038
+ * parks awaiting a resume that never comes.
3039
+ */
3040
+ enabled?: boolean;
3041
+ /**
3042
+ * Advertise the built-in `suggest_replies` tool to the agent on every
3043
+ * dispatch via `clientTools[]` — no server-side `runtimeTools` declaration
3044
+ * needed. Defaults to `false`: flows that already declare the tool via
3045
+ * `runtimeTools` would otherwise present it to the model twice. Ignored
3046
+ * when `enabled` is `false`.
3047
+ */
3048
+ expose?: boolean;
3006
3049
  };
3007
3050
  /**
3008
3051
  * Single selectable option in an `ask_user_question` prompt.
@@ -3063,6 +3106,19 @@ type AgentWidgetAskUserQuestionStyles = {
3063
3106
  type AgentWidgetAskUserQuestionFeature = {
3064
3107
  /** Enable the feature. Defaults to true. When false, `ask_user_question` renders as a regular tool bubble. */
3065
3108
  enabled?: boolean;
3109
+ /**
3110
+ * Advertise the built-in `ask_user_question` tool to the agent on every
3111
+ * dispatch via `clientTools[]` — no server-side `runtimeTools` declaration
3112
+ * needed. The tool ships with a model-facing description and JSON schema
3113
+ * matching {@link AskUserQuestionPayload}; when the model calls it, the
3114
+ * existing answer-pill sheet renders and the answer resumes the execution.
3115
+ *
3116
+ * Defaults to `false`: flows that already declare `ask_user_question` via
3117
+ * `runtimeTools` would otherwise present the tool to the model twice.
3118
+ * Ignored when `enabled` is `false` — never offer the agent a question
3119
+ * tool the widget can't render an answer UI for.
3120
+ */
3121
+ expose?: boolean;
3066
3122
  /** Slide-in animation duration in ms. Defaults to 180. */
3067
3123
  slideInMs?: number;
3068
3124
  /** Label for the free-text pill. Defaults to "Other…". */
@@ -3244,6 +3300,26 @@ type AgentWidgetDockConfig = {
3244
3300
  * it appears to emerge at full width like a floating widget.
3245
3301
  */
3246
3302
  reveal?: "resize" | "overlay" | "push" | "emerge";
3303
+ /**
3304
+ * Maximum height of the dock panel, applied as a viewport-overflow guard.
3305
+ *
3306
+ * The docked shell sizes itself with `height: 100%`, which only resolves when
3307
+ * an ancestor (usually `html, body { height: 100% }`) provides a definite
3308
+ * height. Without one, the dock column would otherwise grow with the
3309
+ * conversation and scroll off the page. This cap clamps the panel to the
3310
+ * viewport (and keeps the `resize`/`emerge` reveals pinned with
3311
+ * `position: sticky`; `push`/`overlay` get the cap only, since their
3312
+ * transform/absolute contexts defeat sticky) so a missing height chain
3313
+ * degrades gracefully instead of breaking the chat.
3314
+ *
3315
+ * - Set a CSS length (e.g. `"600px"`, `"80vh"`) to override the cap.
3316
+ * - Set `false` to disable the guard entirely (the panel then sizes purely
3317
+ * from the surrounding layout — make sure your page provides a definite
3318
+ * height all the way down to the dock target's parent).
3319
+ *
3320
+ * @default "100dvh"
3321
+ */
3322
+ maxHeight?: string | false;
3247
3323
  };
3248
3324
  /**
3249
3325
  * Layout configuration for `mountMode: "composer-bar"`. Controls how the
@@ -6034,6 +6110,25 @@ declare class AgentWidgetClient {
6034
6110
  private clientToolsFingerprintSessionId;
6035
6111
  private readonly webMcpBridge;
6036
6112
  constructor(config?: AgentWidgetConfig);
6113
+ /**
6114
+ * Refresh config in place WITHOUT tearing down the live connection or the
6115
+ * WebMCP bridge. `AgentWidgetSession.updateConfig` calls this when only
6116
+ * connection-irrelevant fields changed (theme, copy, layout, suggestions, …),
6117
+ * so a UI update that lands mid-turn — e.g. a `webmcp:*` tool restyling the
6118
+ * widget while the agent's turn is still streaming — doesn't abandon the
6119
+ * in-flight stream/resume. Connection or request-shaping changes (apiUrl,
6120
+ * clientToken, webmcp, headers, parser, …) take the full client rebuild path
6121
+ * in the session instead, which is the only place the bridge is recreated.
6122
+ *
6123
+ * Only the live-read `config` is refreshed (e.g. `iterationDisplay`); the
6124
+ * constructor-derived request-shaping fields (apiUrl, headers, parser,
6125
+ * contextProviders, middleware, …) are left untouched because the session
6126
+ * routes any change to those down the full-rebuild path instead — so they are
6127
+ * guaranteed unchanged here. The `webMcpBridge` instance and its
6128
+ * installed-polyfill memo are deliberately preserved, which keeps any
6129
+ * in-flight resolve alive.
6130
+ */
6131
+ updateConfig(next: AgentWidgetConfig): void;
6037
6132
  /**
6038
6133
  * Set callback for capturing raw SSE events
6039
6134
  */
@@ -6559,7 +6654,8 @@ declare class AgentWidgetSession {
6559
6654
  markAskUserQuestionResolved(toolMessage: AgentWidgetMessage, answers?: Record<string, string | string[]>): void;
6560
6655
  resolveAskUserQuestion(toolMessage: AgentWidgetMessage, answer: string | Record<string, string | string[]>): Promise<void>;
6561
6656
  /**
6562
- * Collect a `webmcp:*` LOCAL-tool `step_await` into a per-executionId batch
6657
+ * Collect an auto-resolving LOCAL-tool `step_await` (`webmcp:*` page tools
6658
+ * and the built-in `suggest_replies`) into a per-executionId batch
6563
6659
  * and schedule a single deferred flush. Parallel calls (core#3878) emit
6564
6660
  * several `step_await`s for ONE paused execution within the same stream tick;
6565
6661
  * buffering them and flushing once lets us post ONE `/resume` keyed by the
@@ -6596,6 +6692,17 @@ declare class AgentWidgetSession {
6596
6692
  */
6597
6693
  private flushWebMcpAwaitBatch;
6598
6694
  private resolveWebMcpToolStartedAt;
6695
+ /**
6696
+ * Persisted-resolution guard for `suggest_replies`. The in-memory dedupe
6697
+ * sets (`webMcpInflightKeys` / `webMcpResolvedKeys`) are cleared by
6698
+ * hydrateMessages/clearMessages/cancel, but `suggestRepliesResolved`
6699
+ * survives on the stored message — so a stale `step_await` re-emit after a
6700
+ * hydration must not re-POST `/resume` for an already-resolved call (the
6701
+ * historical double-resume failure mode the batching work exists to avoid).
6702
+ * Checks the LIVE message first; the handleEvent snapshot is a fresh wire
6703
+ * skeleton whose metadata never carries the flag.
6704
+ */
6705
+ private isSuggestRepliesAlreadyResolved;
6599
6706
  private markWebMcpToolRunning;
6600
6707
  private markWebMcpToolComplete;
6601
6708
  /**
@@ -6614,12 +6721,16 @@ declare class AgentWidgetSession {
6614
6721
  */
6615
6722
  private resolveWebMcpToolCallBatch;
6616
6723
  /**
6617
- * Resolve a paused `webmcp:*` LOCAL tool call by executing it against the
6618
- * host page's tool registry and posting the result to `/resume`.
6724
+ * Resolve a paused auto-resolving LOCAL tool call and post the result to
6725
+ * `/resume`: `webmcp:*` calls execute against the host page's tool
6726
+ * registry; the built-in `suggest_replies` skips execution entirely and
6727
+ * resumes with a canned "shown" result (the chips render from the message
6728
+ * list, not from this resolve).
6619
6729
  *
6620
6730
  * Triggered automatically from `handleEvent` when a `step_await`-derived
6621
- * message arrives with a `webmcp:` prefix — the user does not click a
6622
- * pill; the bridge's confirm-bubble gate is the only interactive surface.
6731
+ * message arrives for such a tool — the user does not click a pill; the
6732
+ * bridge's confirm-bubble gate (WebMCP only) is the only interactive
6733
+ * surface.
6623
6734
  *
6624
6735
  * Idempotent on the message's `toolCall.id`: re-emits of the same step_await
6625
6736
  * (e.g. from message coalescing) won't double-fire `tool.execute`. Failure
@@ -6893,6 +7004,175 @@ declare const ensureAskUserQuestionSheet: (message: AgentWidgetMessage, config:
6893
7004
  */
6894
7005
  declare const removeAskUserQuestionSheet: (overlay: HTMLElement | null | undefined, toolCallId?: string) => void;
6895
7006
 
7007
+ /**
7008
+ * Built-in `ask_user_question` client tool.
7009
+ *
7010
+ * The widget can advertise this tool to the agent on every dispatch via
7011
+ * `clientTools[]` (set `features.askUserQuestion.expose: true`) — the same
7012
+ * wire surface WebMCP page tools ride. The server registers it as a LOCAL
7013
+ * tool under its bare name (`origin: 'sdk'` tools are not `webmcp:`-prefixed),
7014
+ * so when the model calls it the execution pauses with a `step_await`
7015
+ * (`awaitReason: "local_tool_required"`), the widget's answer-pill sheet
7016
+ * renders, and `session.resolveAskUserQuestion()` resumes the execution with
7017
+ * the structured answers.
7018
+ *
7019
+ * This replaces the previous integrator burden of hand-declaring the tool in
7020
+ * a flow's `runtimeTools` and keeping that schema in sync with the renderer.
7021
+ * Flows that already declare `ask_user_question` server-side should leave
7022
+ * `expose` off — the model would otherwise see the tool twice.
7023
+ */
7024
+
7025
+ /**
7026
+ * JSON Schema for the tool's parameters. Mirrors {@link AskUserQuestionPayload}
7027
+ * — the shape `parseAskUserQuestionPayload` hydrates the answer sheet from —
7028
+ * so the schema the model is held to and the schema the renderer expects can
7029
+ * never drift.
7030
+ */
7031
+ declare const ASK_USER_QUESTION_PARAMETERS_SCHEMA: {
7032
+ readonly type: "object";
7033
+ readonly properties: {
7034
+ readonly questions: {
7035
+ readonly type: "array";
7036
+ readonly minItems: 1;
7037
+ readonly maxItems: 8;
7038
+ readonly description: "Questions to ask the user. Prefer a single question.";
7039
+ readonly items: {
7040
+ readonly type: "object";
7041
+ readonly properties: {
7042
+ readonly question: {
7043
+ readonly type: "string";
7044
+ readonly description: "The complete question, ending with a question mark.";
7045
+ };
7046
+ readonly header: {
7047
+ readonly type: "string";
7048
+ readonly maxLength: 12;
7049
+ readonly description: "Short topic label, e.g. \"Auth method\".";
7050
+ };
7051
+ readonly options: {
7052
+ readonly type: "array";
7053
+ readonly minItems: 2;
7054
+ readonly maxItems: 4;
7055
+ readonly description: "2-4 distinct choices. Do NOT add an \"Other\" option — free text is automatic.";
7056
+ readonly items: {
7057
+ readonly type: "object";
7058
+ readonly properties: {
7059
+ readonly label: {
7060
+ readonly type: "string";
7061
+ readonly description: "Concise choice text (1-5 words).";
7062
+ };
7063
+ readonly description: {
7064
+ readonly type: "string";
7065
+ readonly description: "What the option means or implies.";
7066
+ };
7067
+ };
7068
+ readonly required: readonly ["label"];
7069
+ readonly additionalProperties: false;
7070
+ };
7071
+ };
7072
+ readonly multiSelect: {
7073
+ readonly type: "boolean";
7074
+ readonly description: "Allow selecting multiple options. Default false.";
7075
+ };
7076
+ readonly allowFreeText: {
7077
+ readonly type: "boolean";
7078
+ readonly description: "Show a free-text input. Default true.";
7079
+ };
7080
+ };
7081
+ readonly required: readonly ["question", "options"];
7082
+ readonly additionalProperties: false;
7083
+ };
7084
+ };
7085
+ };
7086
+ readonly required: readonly ["questions"];
7087
+ readonly additionalProperties: false;
7088
+ };
7089
+ /**
7090
+ * The `ClientToolDefinition` shipped on `dispatch.clientTools[]` when
7091
+ * `features.askUserQuestion.expose` is on. Exported so integrators who prefer
7092
+ * declaring the tool server-side (a flow's `runtimeTools`) can reuse the same
7093
+ * description and schema instead of hand-writing them.
7094
+ */
7095
+ declare const ASK_USER_QUESTION_CLIENT_TOOL: ClientToolDefinition;
7096
+ /**
7097
+ * Built-in client tools to append to a dispatch's `clientTools[]` for the
7098
+ * given widget config: `ask_user_question` and `suggest_replies`; future
7099
+ * built-in local tools join here.
7100
+ *
7101
+ * Each tool is gated on BOTH of its feature flags: `expose` opts the tool
7102
+ * into the agent's catalog, and `enabled !== false` guarantees the widget can
7103
+ * actually render UI (and, for fire-and-forget tools, auto-resume) for it —
7104
+ * exposing a tool with its feature disabled would park the execution on a
7105
+ * generic tool bubble with no way to advance.
7106
+ */
7107
+ declare const builtInClientToolsForDispatch: (config: AgentWidgetConfig | undefined) => ClientToolDefinition[];
7108
+
7109
+ /**
7110
+ * Built-in `suggest_replies` client tool.
7111
+ *
7112
+ * The widget can advertise this tool to the agent on every dispatch via
7113
+ * `clientTools[]` (set `features.suggestReplies.expose: true`) — the same
7114
+ * wire surface as `ask_user_question` and WebMCP page tools. When the model
7115
+ * calls it, the execution pauses with a `step_await`
7116
+ * (`awaitReason: "local_tool_required"`); unlike `ask_user_question`, the
7117
+ * widget resolves it FIRE-AND-FORGET — it renders the suggestions as tappable
7118
+ * chips above the composer and immediately resumes the execution with a
7119
+ * canned "shown" result, so the agent's turn completes without waiting on the
7120
+ * user. Tapping a chip sends its text verbatim as the user's next message.
7121
+ *
7122
+ * Chip visibility is DERIVED state, not imperative show/hide: the chips of
7123
+ * the last `suggest_replies` tool message with no user message after it are
7124
+ * shown (see {@link latestAgentSuggestions}). That single rule covers
7125
+ * soft-dismiss on any user message (typed, voice, or chip click), restore on
7126
+ * reload/hydration, and latest-wins when a turn carries multiple calls.
7127
+ */
7128
+
7129
+ declare const SUGGEST_REPLIES_TOOL_NAME = "suggest_replies";
7130
+ /**
7131
+ * JSON Schema for the tool's parameters. Mirrors what
7132
+ * {@link parseSuggestRepliesPayload} hydrates the chips from, so the schema
7133
+ * the model is held to and the shape the renderer expects can never drift.
7134
+ */
7135
+ declare const SUGGEST_REPLIES_PARAMETERS_SCHEMA: {
7136
+ readonly type: "object";
7137
+ readonly properties: {
7138
+ readonly suggestions: {
7139
+ readonly type: "array";
7140
+ readonly minItems: 1;
7141
+ readonly maxItems: 4;
7142
+ readonly description: "1-4 short, distinct follow-up replies, phrased in the user's voice.";
7143
+ readonly items: {
7144
+ readonly type: "string";
7145
+ readonly minLength: 1;
7146
+ readonly maxLength: 60;
7147
+ };
7148
+ };
7149
+ };
7150
+ readonly required: readonly ["suggestions"];
7151
+ readonly additionalProperties: false;
7152
+ };
7153
+ /**
7154
+ * The `ClientToolDefinition` shipped on `dispatch.clientTools[]` when
7155
+ * `features.suggestReplies.expose` is on. Exported so integrators who prefer
7156
+ * declaring the tool server-side (a flow's `runtimeTools`) can reuse the same
7157
+ * description and schema instead of hand-writing them.
7158
+ */
7159
+ declare const SUGGEST_REPLIES_CLIENT_TOOL: ClientToolDefinition;
7160
+ /** A tool-variant message produced by a `suggest_replies` call. */
7161
+ declare const isSuggestRepliesMessage: (message: AgentWidgetMessage) => boolean;
7162
+ /**
7163
+ * Tolerant parse of a `suggest_replies` tool call's args into chip labels:
7164
+ * accepts a JSON string or object, coerces items to trimmed strings, drops
7165
+ * empties, and truncates past the renderer cap with a console warning.
7166
+ */
7167
+ declare const parseSuggestRepliesPayload: (args: unknown) => string[];
7168
+ /**
7169
+ * The chips to show right now: those of the LAST `suggest_replies` tool
7170
+ * message with NO user message after it, or `null` when none apply. All
7171
+ * calls in a turn still get resumed (the server awaits each); only the
7172
+ * latest renders.
7173
+ */
7174
+ declare const latestAgentSuggestions: (messages: AgentWidgetMessage[]) => string[] | null;
7175
+
6896
7176
  type WidgetHostLayoutMode = "direct" | "docked";
6897
7177
  type WidgetHostLayout = {
6898
7178
  mode: WidgetHostLayoutMode;
@@ -8671,4 +8951,4 @@ interface DemoCarouselHandle {
8671
8951
  }
8672
8952
  declare function createDemoCarousel(container: HTMLElement, options: DemoCarouselOptions): DemoCarouselHandle;
8673
8953
 
8674
- export { 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 AgentWidgetComposerConfig, type AgentWidgetConfig, 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 AgentWidgetMessage, type AgentWidgetMessageActionsConfig, type AgentWidgetMessageFeedback, type AgentWidgetMessageLayoutConfig, type AgentWidgetParsedAction, type AgentWidgetPlugin, type AgentWidgetRequestPayload, type AgentWidgetSSEEventParser, type AgentWidgetSSEEventResult, AgentWidgetSession, type AgentWidgetSessionStatus, type AgentWidgetStreamAnimationBuffer, type AgentWidgetStreamAnimationBuiltinType, type AgentWidgetStreamAnimationFeature, type AgentWidgetStreamAnimationPlaceholder, type AgentWidgetStreamAnimationType, type AgentWidgetStreamParser, type AgentWidgetStreamParserResult, type AgentWidgetTimestampConfig, type AgentWidgetWebMcpConfig, type ArtifactConfigPayload, type ArtifactPaneTokens, type ArtifactTabTokens, type ArtifactToolbarTokens, type AskUserQuestionOption, type AskUserQuestionPayload, type AskUserQuestionPrompt, AttachmentManager, type AttachmentManagerConfig, type BorderScale, 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 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 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 MarkdownProcessorOptions, type MessageActionCallbacks, type MessageContent, type MessageRenderContext, type MessageTransform, type NPSFeedbackOptions, PRESETS, PRESET_FULLSCREEN, PRESET_MINIMAL, PRESET_SHOP, type ParseOptionsConfig, type ParseRule, type PendingAttachment, type PersonaArtifactKind, type PersonaArtifactManualUpsert, type PersonaArtifactRecord, type PersonaTheme, type PersonaThemePlugin, type RadiusScale, type RuleScoringContext, type RuntypeAgentSSEEvent, type RuntypeAgentTurnCompleteEvent, type RuntypeClientChatRequest, type RuntypeClientChatStreamEvent, type RuntypeClientFeedbackRequest, type RuntypeClientFeedbackResponse, type RuntypeClientFeedbackType, type RuntypeClientInitRequest, type RuntypeClientInitResponse, type RuntypeClientResumeRequest, type RuntypeClientResumeStreamEvent, type RuntypeDispatchSSEEvent, type RuntypeFlowSSEEvent, type RuntypeStepCompleteEvent, type RuntypeStopReasonKind, type RuntypeStreamEventOf, type SSEEventCallback, type SSEEventRecord, type SanitizeFunction, type SemanticColors, type SemanticSpacing, type SemanticTypography, type ShadowScale, type SlotRenderContext, type SlotRenderer, type SpacingScale, type StreamAnimationContext, type StreamAnimationPlugin, THEME_ZONES, type TextContentPart, type ThemeValidationError, type ThemeValidationResult, type ThemeZone, type ToggleGroupHandle, type ToggleGroupItem, type ToggleGroupTokens, type TokenReference, type TypographyScale, VERSION, type VoiceConfig, type VoiceProvider, type VoiceResult, type VoiceStatus, WEBMCP_TOOL_PREFIX, WebMcpBridge, type WebMcpConfirmHandler, type WebMcpConfirmInfo, type WebMcpToolResult, type WidgetHostLayout, type WidgetHostLayoutMode, type WidgetLayoutSlot, type WidgetPreset, accessibilityPlugin, animationsPlugin, applyThemeVariables, attachHeaderToContainer, brandPlugin, buildComposer, buildDefaultHeader, buildHeader, buildHeaderWithLayout, buildMinimalHeader, 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, createStandardBubble, createTextPart, createTheme, createThemeObserver, createToggleGroup, createTypingIndicator, createVoiceProvider, createWidgetHostLayout, createXmlParser, initAgentWidget as default, defaultActionHandlers, defaultJsonActionParser, 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, isVoiceSupported, isWebMcpToolName, listRegisteredStreamAnimations, markdownPostprocessor, mergeWithDefaults, normalizeContent, parseAskUserQuestionPayload, pluginRegistry, reducedMotionPlugin, registerStreamAnimationPlugin, removeAskUserQuestionSheet, renderComponentDirective, renderLoadingIndicatorWithFallback, renderLucideIcon, resolveDockConfig, resolveSanitizer, resolveTokens, stripWebMcpPrefix, themeToCssVariables, unregisterStreamAnimationPlugin, validateImageFile, validateTheme };
8954
+ 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 AgentWidgetComposerConfig, type AgentWidgetConfig, 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 AgentWidgetMessage, type AgentWidgetMessageActionsConfig, type AgentWidgetMessageFeedback, type AgentWidgetMessageLayoutConfig, type AgentWidgetParsedAction, type AgentWidgetPlugin, type AgentWidgetRequestPayload, type AgentWidgetSSEEventParser, type AgentWidgetSSEEventResult, AgentWidgetSession, type AgentWidgetSessionStatus, type AgentWidgetStreamAnimationBuffer, type AgentWidgetStreamAnimationBuiltinType, type AgentWidgetStreamAnimationFeature, type AgentWidgetStreamAnimationPlaceholder, type AgentWidgetStreamAnimationType, type AgentWidgetStreamParser, type AgentWidgetStreamParserResult, type AgentWidgetTimestampConfig, type AgentWidgetWebMcpConfig, type ArtifactConfigPayload, type ArtifactPaneTokens, type ArtifactTabTokens, type ArtifactToolbarTokens, type AskUserQuestionOption, type AskUserQuestionPayload, type AskUserQuestionPrompt, AttachmentManager, type AttachmentManagerConfig, type BorderScale, 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 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 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 MarkdownProcessorOptions, type MessageActionCallbacks, type MessageContent, type MessageRenderContext, type MessageTransform, type NPSFeedbackOptions, PRESETS, PRESET_FULLSCREEN, PRESET_MINIMAL, PRESET_SHOP, type ParseOptionsConfig, type ParseRule, type PendingAttachment, type PersonaArtifactKind, type PersonaArtifactManualUpsert, type PersonaArtifactRecord, type PersonaTheme, type PersonaThemePlugin, type RadiusScale, type RuleScoringContext, type RuntypeAgentSSEEvent, type RuntypeAgentTurnCompleteEvent, type RuntypeClientChatRequest, type RuntypeClientChatStreamEvent, type RuntypeClientFeedbackRequest, type RuntypeClientFeedbackResponse, type RuntypeClientFeedbackType, type RuntypeClientInitRequest, type RuntypeClientInitResponse, type RuntypeClientResumeRequest, type RuntypeClientResumeStreamEvent, type RuntypeDispatchSSEEvent, type RuntypeFlowSSEEvent, type RuntypeStepCompleteEvent, type RuntypeStopReasonKind, type RuntypeStreamEventOf, 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 SlotRenderContext, type SlotRenderer, type SpacingScale, type StreamAnimationContext, type StreamAnimationPlugin, THEME_ZONES, type TextContentPart, type ThemeValidationError, type ThemeValidationResult, type ThemeZone, type ToggleGroupHandle, type ToggleGroupItem, type ToggleGroupTokens, type TokenReference, type TypographyScale, VERSION, type VoiceConfig, type VoiceProvider, type VoiceResult, type VoiceStatus, WEBMCP_TOOL_PREFIX, WebMcpBridge, type WebMcpConfirmHandler, type WebMcpConfirmInfo, type WebMcpToolResult, type WidgetHostLayout, type WidgetHostLayoutMode, type WidgetLayoutSlot, type WidgetPreset, accessibilityPlugin, animationsPlugin, applyThemeVariables, attachHeaderToContainer, brandPlugin, buildComposer, buildDefaultHeader, buildHeader, buildHeaderWithLayout, buildMinimalHeader, builtInClientToolsForDispatch, 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, createStandardBubble, createTextPart, createTheme, createThemeObserver, createToggleGroup, createTypingIndicator, createVoiceProvider, createWidgetHostLayout, createXmlParser, initAgentWidget as default, defaultActionHandlers, defaultJsonActionParser, 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, markdownPostprocessor, mergeWithDefaults, normalizeContent, parseAskUserQuestionPayload, parseSuggestRepliesPayload, pluginRegistry, reducedMotionPlugin, registerStreamAnimationPlugin, removeAskUserQuestionSheet, renderComponentDirective, renderLoadingIndicatorWithFallback, renderLucideIcon, resolveDockConfig, resolveSanitizer, resolveTokens, stripWebMcpPrefix, themeToCssVariables, unregisterStreamAnimationPlugin, validateImageFile, validateTheme };