@dudko.dev/agent-web-react 0.0.34 → 0.0.35

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.
package/dist/index.d.cts CHANGED
@@ -1,11 +1,107 @@
1
1
  import * as react from 'react';
2
2
  import { DependencyList, ReactNode, RefObject, ComponentType, CSSProperties } from 'react';
3
- import { RunFile, RunResult, Agent, ToolApprovalMode, AppToolCallRequest, AppSamplingRequest, AppSamplingView, AppSamplingResult, CompactResult, IUsage, AgentEventHandler, BrowserAgentConfig, VirtualFileInfo, VirtualFileSystem, CredentialStore, createWebLLMModel, WebLLMModelOptions, ModelTier, TierReason, EscalationReason, DecisionFallbackReason, AgentEvent, Skill, IPlan, ToolApprovalRequest, ToolApprovalContext, ToolApprovalDecision } from '@dudko.dev/agent-web';
4
- export { Agent, AgentEvent, AgentEventHandler, AgentLoggerSink, AgentTool, AgentToolSet, AppToolCallRequest, AttachmentsNotSupportedError, BrowserAgentConfig, CompactResult, CompactionConfig, CredentialStore, FileToolsOptions, IPlan, IPlanStep, IStepResult, IToolCall, IUsage, ImagesNotSupportedError, IndexedDBStore, LearningConfig, LogLevel, McpAppCsp, McpAppResource, McpAppToolResult, MemoryCredentialStore, MemorySkillStore, MemoryStore, ModelInput, ProviderModelSpec, ProviderType, RunControl, RunFile, RunOptions, RunResult, SessionBusyError, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillStore, StorageChange, StorageChangeKind, StorageChangeOp, SubagentInfo, SubagentToolOptions, SubagentWorkerConfig, ThinkingLevel, ThinkingSetting, TokenLimits, ToolApprovalConfig, ToolApprovalContext, ToolApprovalMode, ToolApprovalRequest, VaultCredentialStore, VfsSkillStore, VirtualFile, VirtualFileInfo, VirtualFileSystem, WatchSessionOptions, createAgent, createFileTools, createRunControl, createSubagentTool, createWebLLMModel, defineSkill, defineTool, isWebGPUAvailable, loadSkillFromUrl, markReadOnly, onStorageChange, parseSkillMarkdown, postStorageChange, preloadWebLLMModel, serveSubagentWorker, supportsImages, supportsPdf, unloadWebLLMModel, watchSession } from '@dudko.dev/agent-web';
5
- import { A as AgentUiState, C as ChatAttachment, a as ApprovalView, b as ChatMessage, c as AgentStatus, E as ElicitationIssueKind, d as ElicitationOutcomeReason, M as McpAppSandboxReason, R as RemoteRunView, L as LessonView, S as SubagentView, e as SubagentNode, P as PendingElicitation, f as McpElicitationResult, g as ElicitationView, W as WrittenFileView, T as ToolCallView, h as StepView, U as UserNoteView, D as DecisionView, i as MediaView, j as AppView, k as McpAppsConnectionLike, l as McpAppSandboxOptions, m as AppRequestView, n as TranscriptView, B as BudgetView, o as CompactionView, p as ModelLoadState, q as McpAppHost, r as AppRequestAnswerOptions } from './elicitation-BTrJ5t3c.cjs';
6
- export { s as APP_DEFAULT_HEIGHT, t as APP_MAX_HEIGHT, u as APP_MIN_HEIGHT, v as AppDownload, w as AppDownloadView, x as AppFileSaverEnv, y as AppLink, z as AppReadyDownload, F as AppResourceReader, G as ElicitationControl, H as ElicitationDraft, I as ElicitationDraftValue, J as ElicitationField, K as ElicitationFormOutcome, N as ElicitationIssue, O as ElicitationLink, Q as ElicitationOption, V as FetchView, X as MCP_APP_DISPLAY_MODES, Y as MCP_APP_MAX_ARGS_CHARS, Z as MCP_APP_MAX_DOWNLOAD_BYTES, _ as MCP_APP_MAX_FILE_NAME_CHARS, $ as MCP_APP_MAX_IN_FLIGHT, a0 as MCP_APP_MAX_MESSAGE_CHARS, a1 as MCP_APP_MAX_URL_CHARS, a2 as MCP_APP_NOTIFICATIONS, a3 as MCP_APP_OPTIONAL_REQUESTS, a4 as MCP_APP_PROTOCOL_VERSION, a5 as MCP_APP_REFUSED, a6 as MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, a7 as MCP_APP_REFUSED_DOWNLOAD_TYPES, a8 as MCP_APP_RELAY, a9 as MCP_APP_REQUESTS, aa as MCP_APP_SANDBOX_FRAME_TOKENS, ab as MCP_APP_SANDBOX_GRACE_MS, ac as MCP_APP_SANDBOX_SERVER, ad as MCP_APP_SANDBOX_TIMEOUT_MS, ae as McpAppBridge, af as McpAppBridgeHandlers, ag as McpAppBridgeOptions, ah as McpAppDisplayMode, ai as McpAppRpcError, aj as McpAppRpcMessage, ak as McpAppSandboxInput, al as McpAppSandboxLink, am as McpAppSandboxLinkOptions, an as McpAppSandboxTarget, ao as McpElicitationFieldSchema, ap as McpElicitationRequest, aq as McpElicitationSchema, ar as QueuedMessageView, as as ReplanState, at as SkillConsentView, au as StepEscalationView, av as UseMcpAppHostOptions, aw as appDisplayModeAllowed, ax as appDownloadOf, ay as appDownloadRefusal, az as appFileExtensionOf, aA as appFileNameOf, aB as appGestureOf, aC as appLinkOf, aD as appMessageTextOf, aE as appMimeTypeOf, aF as appSamplingErrorOf, aG as buildMcpAppDocument, aH as buildMcpAppSandboxShell, aI as clampAppHeight, aJ as elicitationFields, aK as elicitationFormAnswer, aL as elicitationInitialDraft, aM as elicitationLink, aN as formatCountdown, aO as grantedAppCsp, aP as mcpAppCsp, aQ as mcpAppHostCapabilities, aR as mcpAppSandboxProxyUrl, aS as mcpAppSandboxShellCsp, aT as mcpAppSandboxTarget, aU as resolveAppDownload, aV as saveAppFile, aW as useMcpAppHost } from './elicitation-BTrJ5t3c.cjs';
3
+ import { AskUserRequest, AskUserContext, AskUserAnswer, AskUserConfig, AskUserHandler, AgentEvent, RunFile, RunResult, Agent, ToolApprovalMode, AppToolCallRequest, AppSamplingRequest, AppSamplingView, AppSamplingResult, CompactResult, IUsage, AgentEventHandler, BrowserAgentConfig, VirtualFileInfo, VirtualFileSystem, CredentialStore, createWebLLMModel, WebLLMModelOptions, ModelTier, TierReason, EscalationReason, DecisionFallbackReason, Skill, IPlan, ToolApprovalRequest, ToolApprovalContext, ToolApprovalDecision } from '@dudko.dev/agent-web';
4
+ export { Agent, AgentEvent, AgentEventHandler, AgentLoggerSink, AgentTool, AgentToolSet, AppToolCallRequest, AskUserAnswer, AskUserConfig, AskUserContext, AskUserHandler, AskUserOption, AskUserRequest, AttachmentsNotSupportedError, BrowserAgentConfig, CompactResult, CompactionConfig, CredentialStore, FileToolsOptions, IPlan, IPlanStep, IStepResult, IToolCall, IUsage, ImagesNotSupportedError, IndexedDBStore, LearningConfig, LogLevel, McpAppCsp, McpAppResource, McpAppToolResult, MemoryCredentialStore, MemorySkillStore, MemoryStore, ModelInput, ProviderModelSpec, ProviderType, RunControl, RunFile, RunOptions, RunResult, SessionBusyError, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillStore, StorageChange, StorageChangeKind, StorageChangeOp, SubagentInfo, SubagentToolOptions, SubagentWorkerConfig, ThinkingLevel, ThinkingSetting, TokenLimits, ToolApprovalConfig, ToolApprovalContext, ToolApprovalMode, ToolApprovalRequest, VaultCredentialStore, VfsSkillStore, VirtualFile, VirtualFileInfo, VirtualFileSystem, WatchSessionOptions, createAgent, createFileTools, createRunControl, createSubagentTool, createWebLLMModel, defineSkill, defineTool, isWebGPUAvailable, loadSkillFromUrl, markReadOnly, onStorageChange, parseSkillMarkdown, postStorageChange, preloadWebLLMModel, serveSubagentWorker, supportsImages, supportsPdf, unloadWebLLMModel, watchSession } from '@dudko.dev/agent-web';
5
+ import { A as AgentUiState, C as ChatAttachment, a as ApprovalView, b as ChatMessage, c as AgentStatus, E as ElicitationIssueKind, d as ElicitationOutcomeReason, M as McpAppSandboxReason, R as RemoteRunView, L as LessonView, S as SubagentView, e as SubagentNode, P as PendingElicitation, f as McpElicitationResult, g as ElicitationView, W as WrittenFileView, T as ToolCallView, h as StepView, U as UserNoteView, D as DecisionView, i as MediaView, j as AppView, Q as QuestionView, k as McpAppsConnectionLike, l as McpAppSandboxOptions, m as AppRequestView, n as TranscriptView, B as BudgetView, o as CompactionView, p as ModelLoadState, q as McpAppHost, r as AppRequestAnswerOptions } from './elicitation-xMLll5W9.cjs';
6
+ export { s as APP_DEFAULT_HEIGHT, t as APP_MAX_HEIGHT, u as APP_MIN_HEIGHT, v as AppDownload, w as AppDownloadView, x as AppFileSaverEnv, y as AppLink, z as AppReadyDownload, F as AppResourceReader, G as ElicitationControl, H as ElicitationDraft, I as ElicitationDraftValue, J as ElicitationField, K as ElicitationFormOutcome, N as ElicitationIssue, O as ElicitationLink, V as ElicitationOption, X as FetchView, Y as MCP_APP_DISPLAY_MODES, Z as MCP_APP_MAX_ARGS_CHARS, _ as MCP_APP_MAX_DOWNLOAD_BYTES, $ as MCP_APP_MAX_FILE_NAME_CHARS, a0 as MCP_APP_MAX_IN_FLIGHT, a1 as MCP_APP_MAX_MESSAGE_CHARS, a2 as MCP_APP_MAX_URL_CHARS, a3 as MCP_APP_NOTIFICATIONS, a4 as MCP_APP_OPTIONAL_REQUESTS, a5 as MCP_APP_PROTOCOL_VERSION, a6 as MCP_APP_REFUSED, a7 as MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, a8 as MCP_APP_REFUSED_DOWNLOAD_TYPES, a9 as MCP_APP_RELAY, aa as MCP_APP_REQUESTS, ab as MCP_APP_SANDBOX_FRAME_TOKENS, ac as MCP_APP_SANDBOX_GRACE_MS, ad as MCP_APP_SANDBOX_SERVER, ae as MCP_APP_SANDBOX_TIMEOUT_MS, af as McpAppBridge, ag as McpAppBridgeHandlers, ah as McpAppBridgeOptions, ai as McpAppDisplayMode, aj as McpAppRpcError, ak as McpAppRpcMessage, al as McpAppSandboxInput, am as McpAppSandboxLink, an as McpAppSandboxLinkOptions, ao as McpAppSandboxTarget, ap as McpElicitationFieldSchema, aq as McpElicitationRequest, ar as McpElicitationSchema, as as QueuedMessageView, at as ReplanState, au as SkillConsentView, av as StepEscalationView, aw as UseMcpAppHostOptions, ax as appDisplayModeAllowed, ay as appDownloadOf, az as appDownloadRefusal, aA as appFileExtensionOf, aB as appFileNameOf, aC as appGestureOf, aD as appLinkOf, aE as appMessageTextOf, aF as appMimeTypeOf, aG as appSamplingErrorOf, aH as buildMcpAppDocument, aI as buildMcpAppSandboxShell, aJ as clampAppHeight, aK as elicitationFields, aL as elicitationFormAnswer, aM as elicitationInitialDraft, aN as elicitationLink, aO as formatCountdown, aP as grantedAppCsp, aQ as mcpAppCsp, aR as mcpAppHostCapabilities, aS as mcpAppSandboxProxyUrl, aT as mcpAppSandboxShellCsp, aU as mcpAppSandboxTarget, aV as resolveAppDownload, aW as saveAppFile, aX as useMcpAppHost } from './elicitation-xMLll5W9.cjs';
7
7
  export { M as MCP_APP_POLICY_TOKEN_MAX_CHARS, a as MCP_APP_SANDBOX_PROXY_READY, b as MCP_APP_SANDBOX_RESOURCE_READY, i as isMcpAppSandboxMessage, m as mcpAppPolicyToken } from './mcp-app-policy-DIUmGPJP.cjs';
8
8
 
9
+ /**
10
+ * The model asks the person ONE closed question (the core's `ask_user`, `config.askUser`): the
11
+ * part of it that is not React - the queue the hook hands the core as `askUser.onQuestion`, the
12
+ * answer a prompt builds, and what of a question's tool result may be kept.
13
+ *
14
+ * Pure: no React, no clock of its own (the queue takes `now`), no import of the core at run time
15
+ * (types only), so the main entry still loads next to an older core.
16
+ *
17
+ * Nothing here keeps, logs or returns what the person typed (`{ other }`) except to the one caller
18
+ * that hands it to the core: the queue passes an answer straight to the core's resolver, and
19
+ * {@link withoutOwnWords} takes the person's words out of the events before a view keeps them.
20
+ */
21
+ /** The core's tool name (`ASK_USER_TOOL`). */
22
+ declare const ASK_USER_TOOL_NAME = "ask_user";
23
+ /** The core's default for `askUser.timeoutMs` (`ASK_USER_TIMEOUT_MS`). */
24
+ declare const QUESTION_TIMEOUT_MS = 300000;
25
+ /**
26
+ * A question waiting for the person: the core's request (the question and every option are the
27
+ * MODEL's text, cleaned - show them as plain text), and when the core stops waiting for it.
28
+ */
29
+ interface PendingQuestion extends AskUserRequest {
30
+ /** Epoch ms after which the core answers it by itself ("did not answer in time"); absent: no limit. */
31
+ expiresAt?: number;
32
+ }
33
+ /**
34
+ * How long the core waits for an answer with this `askUser`; `undefined` = no limit of its own
35
+ * (`0`, `Infinity`, more than a timer holds - the core's own rules).
36
+ */
37
+ declare const questionTimeoutOf: (askUser: boolean | AskUserConfig | undefined) => number | undefined;
38
+ /**
39
+ * `config.askUser` as `useAgent` builds the agent with it: on without a handler of its own
40
+ * (`true`, `{ timeoutMs, maxPerRun }`) it gets `handler`; a host's own `onQuestion` wins, and off
41
+ * (absent, `false`) stays off - nothing is added, so the core mounts no tool.
42
+ */
43
+ declare const askUserWith: (askUser: boolean | AskUserConfig | undefined, handler: AskUserHandler) => boolean | AskUserConfig | undefined;
44
+ interface QuestionQueueOptions {
45
+ /**
46
+ * How long the core waits (ms), for `expiresAt`; `undefined` = no limit. A function is read when
47
+ * a question arrives (the settings of the agent that asks).
48
+ */
49
+ timeoutMs?: number | (() => number | undefined);
50
+ /** Called whenever the list of waiting questions changed. */
51
+ onChange?: (pending: PendingQuestion[]) => void;
52
+ /** The clock (tests). */
53
+ now?: () => number;
54
+ }
55
+ interface QuestionQueue {
56
+ /** The core's `askUser.onQuestion`: resolves when the person answers, or as `{ declined: true }`. */
57
+ handler: (request: AskUserRequest, ctx?: AskUserContext) => Promise<AskUserAnswer>;
58
+ /** The questions waiting, oldest first. */
59
+ pending: () => PendingQuestion[];
60
+ /** Answer one. False when no such question is waiting (answered, expired, cancelled). */
61
+ answer: (id: string, answer: AskUserAnswer) => boolean;
62
+ /**
63
+ * Take the waiting questions down - all of them, or those `match` picks - as declined (the run
64
+ * ended, it was stopped). The core has usually stopped waiting already; this only makes sure no
65
+ * resolver is left.
66
+ */
67
+ cancel: (match?: (question: PendingQuestion) => boolean) => void;
68
+ /** Cancel everything and stop reporting: the owner is gone. A later question is declined at once. */
69
+ dispose: () => void;
70
+ }
71
+ /**
72
+ * The questions the model is waiting on: `request.id → resolver`. A question leaves the queue
73
+ * exactly once - answered by the person, dropped because the core no longer wants the answer
74
+ * (`ctx.signal`: its time ran out, the run stopped), or cancelled by its owner (the run ended, an
75
+ * unmount) - and the queue never holds an answer: `answer` passes it straight to the resolver.
76
+ */
77
+ declare const createQuestionQueue: (options?: QuestionQueueOptions) => QuestionQueue;
78
+ /**
79
+ * Why a question ended without the person deciding: the core's `AskUserReason`
80
+ * (`handler-error`, `invalid-answer`, `cannot-park`), or its action (`timeout`, `stopped`).
81
+ */
82
+ type QuestionOutcomeReason = 'timeout' | 'stopped' | 'handler-error' | 'invalid-answer' | 'cannot-park';
83
+ /**
84
+ * The person's picks as the core's answer: the labels that were offered, in the order they were
85
+ * offered, each once - and one only unless the question allows several. `undefined` when nothing
86
+ * that was offered is picked (Send stays off).
87
+ */
88
+ declare const questionChoiceOf: (question: Pick<AskUserRequest, "options" | "multiple">, picked: readonly string[]) => AskUserAnswer | undefined;
89
+ /**
90
+ * The person's own words as the core's answer, when the question allows them and there is
91
+ * anything but spaces; `undefined` otherwise (Send stays off). The text goes to the caller only.
92
+ */
93
+ declare const questionOtherOf: (question: Pick<AskUserRequest, "allowOther">, text: string) => AskUserAnswer | undefined;
94
+ /** Whether an `ask_user` result may be kept by a view: it holds no word the person typed. */
95
+ declare const askUserOutputKept: (output: unknown, ok: boolean) => boolean;
96
+ /**
97
+ * The event with the person's own words taken out: the result of an `ask_user` call that is not
98
+ * known to hold labels only (an answer in their own words) loses its `output` - in
99
+ * `step.tool-result`, in `step.complete`'s tool calls, and in a subagent's events at any depth.
100
+ * Everything else comes back as it was (the same object). The model was given the words; the
101
+ * view, the saved chat and the event log are not.
102
+ */
103
+ declare const withoutOwnWords: (event: AgentEvent) => AgentEvent;
104
+
9
105
  interface UseAgentOptions {
10
106
  /**
11
107
  * Rebuild the agent when any of these values change — compared like a
@@ -29,6 +125,13 @@ interface UseAgentOptions {
29
125
  * (default true). Render them with `<ToolApprovalPrompt>`, or your own UI.
30
126
  */
31
127
  approvals?: boolean;
128
+ /**
129
+ * Route the model's questions (`ask_user`) into the hook (`pendingQuestions`,
130
+ * `answerQuestion`) when the config turns `askUser` on without an `onQuestion` of its own
131
+ * (`askUser: true`, or `{ timeoutMs, maxPerRun }`; default true). A host's own `onQuestion` wins;
132
+ * `askUser` off stays off. Render them with `<QuestionPrompt>`, or your own UI.
133
+ */
134
+ questions?: boolean;
32
135
  /**
33
136
  * What the run never showed the agent — a message sent while the answer was being
34
137
  * written — is sent as the next message, once the run has ended (default true).
@@ -119,6 +222,18 @@ interface UseAgentReturn extends AgentUiState {
119
222
  approve: (id: string, options?: ApproveOptions) => void;
120
223
  /** Refuse a pending call; the model is told and works around it. */
121
224
  deny: (id: string, reason?: string) => void;
225
+ /**
226
+ * The model's questions waiting for the person in THIS tab (`ask_user`, when the hook answers
227
+ * them - see `UseAgentOptions.questions`), oldest first, each with `expiresAt` when the core
228
+ * stops waiting. Another tab's questions are in `questions` (marked `remote`), never here.
229
+ */
230
+ pendingQuestions: PendingQuestion[];
231
+ /**
232
+ * Answer one: `{ choice: [label] }` (labels as offered; several only when `multiple`),
233
+ * `{ other: text }` (only when `allowOther`) or `{ declined: true }`. False when no such question
234
+ * is waiting (answered, expired, stopped). The answer goes to the core and is not kept here.
235
+ */
236
+ answerQuestion: (id: string, answer: AskUserAnswer) => boolean;
122
237
  /** The consent policy in effect. */
123
238
  approvalMode: ToolApprovalMode;
124
239
  /** Switch the consent policy live — the "autopilot" toggle. */
@@ -996,6 +1111,31 @@ interface AgentLabels {
996
1111
  /** Why a question was answered without anybody deciding, by the core's reason (+ `stopped`). */
997
1112
  elicitationReasons: Record<ElicitationOutcomeReason, string>;
998
1113
  elicitationDismiss: string;
1114
+ /** The host's own line over the model's question. */
1115
+ questionLead: string;
1116
+ /** The same when a helper asks; `role` is what the model wrote for it. */
1117
+ questionLeadHelper: (role: string | undefined, depth: number) => string;
1118
+ /** "1 of 2" - several questions are waiting. */
1119
+ questionCount: (index: number, total: number) => string;
1120
+ /** Under a question that takes several options. */
1121
+ questionSeveral: string;
1122
+ /** Sends the options picked, or the person's own words. */
1123
+ questionSend: string;
1124
+ /** Opens the field for an answer in the person's own words. */
1125
+ questionOther: string;
1126
+ /** That field's label. */
1127
+ questionOtherLabel: string;
1128
+ /** No answer: the agent goes on with its best judgment. */
1129
+ questionSkip: string;
1130
+ /** "...in 4:05": when the agent stops waiting. */
1131
+ questionExpiresIn: (time: string) => string;
1132
+ /** A question asked by the run in another tab: shown here, answered there. */
1133
+ questionRemote: string;
1134
+ /** The agent went on without an answer; `reason` is one of `questionReasons`. */
1135
+ questionAutomatic: (reason: string) => string;
1136
+ /** Why, by the core's reason (+ `timeout`, `stopped`). */
1137
+ questionReasons: Record<QuestionOutcomeReason, string>;
1138
+ questionDismiss: string;
999
1139
  /** The host's label on an app's frame: "App from server “travel”". */
1000
1140
  appFrom: (server: string) => string;
1001
1141
  /** The badge beside it. */
@@ -1110,7 +1250,7 @@ interface AgentLabels {
1110
1250
  }
1111
1251
  declare const defaultLabels: AgentLabels;
1112
1252
  /** Overrides: any label, with the nested groups merged key by key. */
1113
- type AgentLabelsOverride = Partial<Omit<AgentLabels, 'status' | 'modes' | 'commandGroups' | 'commandDescriptions' | 'thinkingLevels' | 'notices' | 'tierNames' | 'tierReasons' | 'escalationReasons' | 'subagentStatus' | 'decisionReasons' | 'elicitationErrors' | 'elicitationReasons' | 'fileKinds' | 'appSandboxReasons'>> & {
1253
+ type AgentLabelsOverride = Partial<Omit<AgentLabels, 'status' | 'modes' | 'commandGroups' | 'commandDescriptions' | 'thinkingLevels' | 'notices' | 'tierNames' | 'tierReasons' | 'escalationReasons' | 'subagentStatus' | 'decisionReasons' | 'elicitationErrors' | 'elicitationReasons' | 'questionReasons' | 'fileKinds' | 'appSandboxReasons'>> & {
1114
1254
  status?: Partial<AgentLabels['status']>;
1115
1255
  modes?: Partial<AgentLabels['modes']>;
1116
1256
  commandGroups?: Partial<AgentLabels['commandGroups']>;
@@ -1124,6 +1264,7 @@ type AgentLabelsOverride = Partial<Omit<AgentLabels, 'status' | 'modes' | 'comma
1124
1264
  decisionReasons?: Partial<AgentLabels['decisionReasons']>;
1125
1265
  elicitationErrors?: Partial<AgentLabels['elicitationErrors']>;
1126
1266
  elicitationReasons?: Partial<AgentLabels['elicitationReasons']>;
1267
+ questionReasons?: Partial<AgentLabels['questionReasons']>;
1127
1268
  fileKinds?: Partial<AgentLabels['fileKinds']>;
1128
1269
  appSandboxReasons?: Partial<AgentLabels['appSandboxReasons']>;
1129
1270
  };
@@ -1850,6 +1991,53 @@ declare const AttachmentView: ({ attachment: a }: {
1850
1991
  */
1851
1992
  declare const MessageList: ({ messages, empty, showActivity, showToolCalls, showUsage, showThoughts, showNotes, showLearned, showTiers, showReplanFailed, showDecisions, showSearchResults, showSubagents, showMedia, showFileChips, files, htmlPreview, onShowFiles, renderFile, renderFileContent, renderMedia, renderSubagent, onStopSubagent, activityOpen, liveExtra, renderContent, renderMessage, renderAttachment, renderToolCall, renderApp, showApps, imageViewer, renderImageViewer, labels, className, }: MessageListProps) => react.JSX.Element | null;
1852
1993
 
1994
+ interface QuestionPromptProps {
1995
+ /**
1996
+ * The model's questions waiting for the person (`useAgent().pendingQuestions`, or the requests
1997
+ * your own `askUser.onQuestion` was given). One is shown at a time, oldest first, with a count.
1998
+ */
1999
+ questions: PendingQuestion[];
2000
+ /**
2001
+ * The person's answer: `{ choice: [label, ...] }`, `{ other: text }` or `{ declined: true }`.
2002
+ * Wire it to `useAgent().answerQuestion`. What was typed goes to this callback and nowhere else.
2003
+ */
2004
+ onAnswer: (id: string, answer: AskUserAnswer) => void;
2005
+ /**
2006
+ * The run's questions as the reducer keeps them (`useAgent().questions`): the ones the agent
2007
+ * went on without (no answer in time, a failure) are said so, a helper's role is named, and
2008
+ * one asked in another tab is shown without its buttons.
2009
+ */
2010
+ outcomes?: QuestionView[];
2011
+ /** Say which questions the agent went on without (default true; needs `outcomes`). */
2012
+ showOutcomes?: boolean;
2013
+ /** The note of when the agent stops waiting, with the time left (default true). */
2014
+ showExpiry?: boolean;
2015
+ /** Say that a helper is the one that asks (default true). */
2016
+ showHelper?: boolean;
2017
+ /** Show a question asked by the run in another tab, without buttons (default true). */
2018
+ showRemote?: boolean;
2019
+ /** Keys 1-6 pick an option while the card has the focus (default true). */
2020
+ numberKeys?: boolean;
2021
+ /**
2022
+ * Render a question yourself: `fallback` is the built-in card, `answer` decides it. The
2023
+ * question and its options are the MODEL's text - render them as text.
2024
+ */
2025
+ renderQuestion?: (question: PendingQuestion, fallback: ReactNode, answer: (answer: AskUserAnswer) => void) => ReactNode;
2026
+ labels?: AgentLabelsOverride;
2027
+ className?: string;
2028
+ }
2029
+ /**
2030
+ * A question the agent's MODEL puts to the person (the core's `ask_user`, `config.askUser`): the
2031
+ * question, one button per option, "Other…" for an answer in their own words when the model
2032
+ * allowed one, and Skip. Shown in the transcript where the run is, not as a modal; keys 1-6 pick
2033
+ * an option while the card has the focus. Everything the model wrote is plain text.
2034
+ *
2035
+ * Wire it to {@link useAgent}'s `pendingQuestions` and `answerQuestion` (with `askUser` on in its
2036
+ * config); `<AgentChat>` renders it for you. What the person types is kept in the card only and
2037
+ * handed to `onAnswer` once: it is not in the agent's state, its events or the transcript.
2038
+ */
2039
+ declare const QuestionPrompt: ({ questions, onAnswer, outcomes, showOutcomes, showExpiry, showHelper, showRemote, numberKeys, renderQuestion, labels, className, }: QuestionPromptProps) => react.JSX.Element | null;
2040
+
1853
2041
  interface ToolApprovalPromptProps {
1854
2042
  /** Pending requests (e.g. `agent.pendingApprovals`). */
1855
2043
  approvals: ApprovalView[];
@@ -1907,6 +2095,7 @@ interface AgentChatComponents {
1907
2095
  FilesPanel?: ComponentType<FilesPanelProps>;
1908
2096
  ApprovalPrompt?: ComponentType<ToolApprovalPromptProps>;
1909
2097
  ElicitationPrompt?: ComponentType<ElicitationPromptProps>;
2098
+ QuestionPrompt?: ComponentType<QuestionPromptProps>;
1910
2099
  }
1911
2100
  /** Extra class names per part (added to the built-in `awr-` ones). */
1912
2101
  interface AgentChatClassNames {
@@ -1997,6 +2186,13 @@ interface AgentChatProps {
1997
2186
  * (default true). Shown once `elicitations` and `onElicitationAnswer` are given.
1998
2187
  */
1999
2188
  showElicitation?: boolean;
2189
+ /**
2190
+ * The questions the agent's model puts to the person (`ask_user`, with `askUser` on in the
2191
+ * agent's config), where the consent cards are (default true): the question, its options as
2192
+ * buttons, Other… and Skip. In a tab that follows another tab's run, the question is shown
2193
+ * without buttons - it is answered there.
2194
+ */
2195
+ showQuestions?: boolean;
2000
2196
  /**
2001
2197
  * In the consent card of an MCP server's skill: the collapsible preview of the instructions
2002
2198
  * the agent would read (default true; `<ToolApprovalPrompt showSkillPreview>`).
@@ -2053,6 +2249,8 @@ interface AgentChatProps {
2053
2249
  renderApproval?: ToolApprovalPromptProps['renderApproval'];
2054
2250
  /** A server's question (gets the built-in card as `fallback`, and `answer`). */
2055
2251
  renderElicitation?: ElicitationPromptProps['renderElicitation'];
2252
+ /** A question of the agent's (gets the built-in card as `fallback`, and `answer`). */
2253
+ renderQuestion?: QuestionPromptProps['renderQuestion'];
2056
2254
  slots?: AgentChatSlots;
2057
2255
  /**
2058
2256
  * How a picture in the transcript opens: in the image viewer over the chat (default true),
@@ -2600,5 +2798,5 @@ interface AppRequestPromptProps {
2600
2798
  */
2601
2799
  declare const AppRequestPrompt: ({ requests, onAnswer, renderRequest, labels, className, }: AppRequestPromptProps) => react.JSX.Element | null;
2602
2800
 
2603
- export { AgentChat, AgentComposer, AgentLabelsProvider, AgentProvider, AgentStatus, AgentUiState, ApiKeyForm, AppRequestAnswerOptions, AppRequestPrompt, AppRequestView, AppView, ApprovalModeSwitch, ApprovalView, AttachmentView, BudgetView, ChatAttachment, ChatHistoryList, ChatHistoryStore, ChatMessage, CompactionView, Composer, ContextMeter, DecisionView, ElicitationIssueKind, ElicitationOutcomeReason, ElicitationPrompt, ElicitationView, FILE_PREVIEW_CHARS, FOLLOW_LEAVE_PX, FOLLOW_REJOIN_PX, FRAME_MAX_HEIGHT, FRAME_MIN_HEIGHT, FileChip, FileChips, FilesPanel, GeneratedMedia, HTML_PREVIEW_MAX_CHARS, ImageThumb, ImageViewer, ImageViewerProvider, LearnedSkills, LessonView, McpAppFrame, McpAppHost, McpAppLine, McpAppSandboxOptions, McpAppSandboxReason, McpAppsConnectionLike, McpElicitationResult, MediaView, MessageList, ModelLoadBar, ModelLoadState, PendingElicitation, PlanView, RemoteRunView, SandboxedFrame, SourceView, StepList, StepView, SubagentNode, SubagentRow, SubagentTree, SubagentView, ToolApprovalPrompt, ToolCallRow, ToolCallView, TranscriptBlock, TranscriptView, UsageBadge, UserNoteRow, UserNoteView, agentStateReducer, agentStatusOf, attachmentKindOf, attachmentRefusal, buildSandboxedDocument, chatTitle, clampFrameHeight, createApprovalQueue, createInitialAgentState, createWebLLMEngine, decisionNote, defaultLabels, downscaleImage, escapeAttribute, fileKindOf, fileNameOf, filterCommands, followsAfterResize, followsAfterScroll, formatElapsed, imageExtensionOf, lessonsOf, linkedFilesOf, mediaFamilyOf, mergeChatRecord, mergeLabels, newChatId, noticesOf, parseSlash, pendingApprovalsOf, sandboxTokens, sandboxedCsp, saveChat, steerIntent, subagentTree, tokenizeHtml, unchangedSince, usageLine, useAgent, useAgentContext, useChatHistory, useCredentials, useFollowScroll, useLabels, useLocalModel, useOptionalAgentContext, useSpeechToText, useVirtualFiles, useWebLLMModel, webSearchOf, withAttachments, withCspFirst, withPolicyFirst };
2604
- export type { AgentAction, AgentChatClassNames, AgentChatComponents, AgentChatProps, AgentChatSlots, AgentComposerProps, AgentLabels, AgentLabelsOverride, AgentLabelsProviderProps, AgentProviderProps, ApiKeyFormProps, AppRequestPromptProps, ApprovalModeSwitchProps, ApprovalQueue, ApproveOptions, ChatBase, ChatHistoryListProps, ChatHistoryStoreOptions, ChatRecord, ChatSummary, ComposerAttachment, ComposerModelChip, ComposerNotice, ComposerProps, ComposerThinkingChip, ContextMeterProps, ConvertedFile, DownscaleOptions, ElicitationPromptProps, FileChipProps, FileChipsProps, FileKind, FilesPanelProps, GeneratedMediaProps, HtmlPreviewOptions, ImageThumbProps, ImageViewerProps, LearnedSkillsProps, LocalModelEngine, LocalModelLoadContext, LocalModelProgress, McpAppFrameProps, McpAppLineProps, MessageListProps, ModelLoadBarProps, NoticeTexts, PlanViewProps, RenderImageViewer, RenderSubagent, RenderToolCall, RunGoalOptions, SandboxedDocumentOptions, SandboxedFrameProps, ScrollMeasure, SlashCommand, SourceToken, SourceViewProps, SpeechRecognizerLike, SteerIntent, StepListProps, SubagentRowProps, SubagentTreeProps, ToolApprovalPromptProps, ToolCallRowProps, TranscriptBlockProps, UsageBadgeProps, UseAgentOptions, UseAgentReturn, UseChatHistoryOptions, UseChatHistoryReturn, UseCredentialsReturn, UseLocalModelOptions, UseLocalModelReturn, UseSpeechToTextOptions, UseSpeechToTextReturn, UseVirtualFilesReturn, UseWebLLMModelOptions, UseWebLLMModelReturn, ViewerImage, WebLLMModelFactory, WebSearchResultView, WebSearchView };
2801
+ export { ASK_USER_TOOL_NAME, AgentChat, AgentComposer, AgentLabelsProvider, AgentProvider, AgentStatus, AgentUiState, ApiKeyForm, AppRequestAnswerOptions, AppRequestPrompt, AppRequestView, AppView, ApprovalModeSwitch, ApprovalView, AttachmentView, BudgetView, ChatAttachment, ChatHistoryList, ChatHistoryStore, ChatMessage, CompactionView, Composer, ContextMeter, DecisionView, ElicitationIssueKind, ElicitationOutcomeReason, ElicitationPrompt, ElicitationView, FILE_PREVIEW_CHARS, FOLLOW_LEAVE_PX, FOLLOW_REJOIN_PX, FRAME_MAX_HEIGHT, FRAME_MIN_HEIGHT, FileChip, FileChips, FilesPanel, GeneratedMedia, HTML_PREVIEW_MAX_CHARS, ImageThumb, ImageViewer, ImageViewerProvider, LearnedSkills, LessonView, McpAppFrame, McpAppHost, McpAppLine, McpAppSandboxOptions, McpAppSandboxReason, McpAppsConnectionLike, McpElicitationResult, MediaView, MessageList, ModelLoadBar, ModelLoadState, PendingElicitation, PlanView, QUESTION_TIMEOUT_MS, QuestionPrompt, QuestionView, RemoteRunView, SandboxedFrame, SourceView, StepList, StepView, SubagentNode, SubagentRow, SubagentTree, SubagentView, ToolApprovalPrompt, ToolCallRow, ToolCallView, TranscriptBlock, TranscriptView, UsageBadge, UserNoteRow, UserNoteView, agentStateReducer, agentStatusOf, askUserOutputKept, askUserWith, attachmentKindOf, attachmentRefusal, buildSandboxedDocument, chatTitle, clampFrameHeight, createApprovalQueue, createInitialAgentState, createQuestionQueue, createWebLLMEngine, decisionNote, defaultLabels, downscaleImage, escapeAttribute, fileKindOf, fileNameOf, filterCommands, followsAfterResize, followsAfterScroll, formatElapsed, imageExtensionOf, lessonsOf, linkedFilesOf, mediaFamilyOf, mergeChatRecord, mergeLabels, newChatId, noticesOf, parseSlash, pendingApprovalsOf, questionChoiceOf, questionOtherOf, questionTimeoutOf, sandboxTokens, sandboxedCsp, saveChat, steerIntent, subagentTree, tokenizeHtml, unchangedSince, usageLine, useAgent, useAgentContext, useChatHistory, useCredentials, useFollowScroll, useLabels, useLocalModel, useOptionalAgentContext, useSpeechToText, useVirtualFiles, useWebLLMModel, webSearchOf, withAttachments, withCspFirst, withPolicyFirst, withoutOwnWords };
2802
+ export type { AgentAction, AgentChatClassNames, AgentChatComponents, AgentChatProps, AgentChatSlots, AgentComposerProps, AgentLabels, AgentLabelsOverride, AgentLabelsProviderProps, AgentProviderProps, ApiKeyFormProps, AppRequestPromptProps, ApprovalModeSwitchProps, ApprovalQueue, ApproveOptions, ChatBase, ChatHistoryListProps, ChatHistoryStoreOptions, ChatRecord, ChatSummary, ComposerAttachment, ComposerModelChip, ComposerNotice, ComposerProps, ComposerThinkingChip, ContextMeterProps, ConvertedFile, DownscaleOptions, ElicitationPromptProps, FileChipProps, FileChipsProps, FileKind, FilesPanelProps, GeneratedMediaProps, HtmlPreviewOptions, ImageThumbProps, ImageViewerProps, LearnedSkillsProps, LocalModelEngine, LocalModelLoadContext, LocalModelProgress, McpAppFrameProps, McpAppLineProps, MessageListProps, ModelLoadBarProps, NoticeTexts, PendingQuestion, PlanViewProps, QuestionOutcomeReason, QuestionPromptProps, QuestionQueue, QuestionQueueOptions, RenderImageViewer, RenderSubagent, RenderToolCall, RunGoalOptions, SandboxedDocumentOptions, SandboxedFrameProps, ScrollMeasure, SlashCommand, SourceToken, SourceViewProps, SpeechRecognizerLike, SteerIntent, StepListProps, SubagentRowProps, SubagentTreeProps, ToolApprovalPromptProps, ToolCallRowProps, TranscriptBlockProps, UsageBadgeProps, UseAgentOptions, UseAgentReturn, UseChatHistoryOptions, UseChatHistoryReturn, UseCredentialsReturn, UseLocalModelOptions, UseLocalModelReturn, UseSpeechToTextOptions, UseSpeechToTextReturn, UseVirtualFilesReturn, UseWebLLMModelOptions, UseWebLLMModelReturn, ViewerImage, WebLLMModelFactory, WebSearchResultView, WebSearchView };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,107 @@
1
1
  import * as react from 'react';
2
2
  import { DependencyList, ReactNode, RefObject, ComponentType, CSSProperties } from 'react';
3
- import { RunFile, RunResult, Agent, ToolApprovalMode, AppToolCallRequest, AppSamplingRequest, AppSamplingView, AppSamplingResult, CompactResult, IUsage, AgentEventHandler, BrowserAgentConfig, VirtualFileInfo, VirtualFileSystem, CredentialStore, createWebLLMModel, WebLLMModelOptions, ModelTier, TierReason, EscalationReason, DecisionFallbackReason, AgentEvent, Skill, IPlan, ToolApprovalRequest, ToolApprovalContext, ToolApprovalDecision } from '@dudko.dev/agent-web';
4
- export { Agent, AgentEvent, AgentEventHandler, AgentLoggerSink, AgentTool, AgentToolSet, AppToolCallRequest, AttachmentsNotSupportedError, BrowserAgentConfig, CompactResult, CompactionConfig, CredentialStore, FileToolsOptions, IPlan, IPlanStep, IStepResult, IToolCall, IUsage, ImagesNotSupportedError, IndexedDBStore, LearningConfig, LogLevel, McpAppCsp, McpAppResource, McpAppToolResult, MemoryCredentialStore, MemorySkillStore, MemoryStore, ModelInput, ProviderModelSpec, ProviderType, RunControl, RunFile, RunOptions, RunResult, SessionBusyError, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillStore, StorageChange, StorageChangeKind, StorageChangeOp, SubagentInfo, SubagentToolOptions, SubagentWorkerConfig, ThinkingLevel, ThinkingSetting, TokenLimits, ToolApprovalConfig, ToolApprovalContext, ToolApprovalMode, ToolApprovalRequest, VaultCredentialStore, VfsSkillStore, VirtualFile, VirtualFileInfo, VirtualFileSystem, WatchSessionOptions, createAgent, createFileTools, createRunControl, createSubagentTool, createWebLLMModel, defineSkill, defineTool, isWebGPUAvailable, loadSkillFromUrl, markReadOnly, onStorageChange, parseSkillMarkdown, postStorageChange, preloadWebLLMModel, serveSubagentWorker, supportsImages, supportsPdf, unloadWebLLMModel, watchSession } from '@dudko.dev/agent-web';
5
- import { A as AgentUiState, C as ChatAttachment, a as ApprovalView, b as ChatMessage, c as AgentStatus, E as ElicitationIssueKind, d as ElicitationOutcomeReason, M as McpAppSandboxReason, R as RemoteRunView, L as LessonView, S as SubagentView, e as SubagentNode, P as PendingElicitation, f as McpElicitationResult, g as ElicitationView, W as WrittenFileView, T as ToolCallView, h as StepView, U as UserNoteView, D as DecisionView, i as MediaView, j as AppView, k as McpAppsConnectionLike, l as McpAppSandboxOptions, m as AppRequestView, n as TranscriptView, B as BudgetView, o as CompactionView, p as ModelLoadState, q as McpAppHost, r as AppRequestAnswerOptions } from './elicitation-BTrJ5t3c.js';
6
- export { s as APP_DEFAULT_HEIGHT, t as APP_MAX_HEIGHT, u as APP_MIN_HEIGHT, v as AppDownload, w as AppDownloadView, x as AppFileSaverEnv, y as AppLink, z as AppReadyDownload, F as AppResourceReader, G as ElicitationControl, H as ElicitationDraft, I as ElicitationDraftValue, J as ElicitationField, K as ElicitationFormOutcome, N as ElicitationIssue, O as ElicitationLink, Q as ElicitationOption, V as FetchView, X as MCP_APP_DISPLAY_MODES, Y as MCP_APP_MAX_ARGS_CHARS, Z as MCP_APP_MAX_DOWNLOAD_BYTES, _ as MCP_APP_MAX_FILE_NAME_CHARS, $ as MCP_APP_MAX_IN_FLIGHT, a0 as MCP_APP_MAX_MESSAGE_CHARS, a1 as MCP_APP_MAX_URL_CHARS, a2 as MCP_APP_NOTIFICATIONS, a3 as MCP_APP_OPTIONAL_REQUESTS, a4 as MCP_APP_PROTOCOL_VERSION, a5 as MCP_APP_REFUSED, a6 as MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, a7 as MCP_APP_REFUSED_DOWNLOAD_TYPES, a8 as MCP_APP_RELAY, a9 as MCP_APP_REQUESTS, aa as MCP_APP_SANDBOX_FRAME_TOKENS, ab as MCP_APP_SANDBOX_GRACE_MS, ac as MCP_APP_SANDBOX_SERVER, ad as MCP_APP_SANDBOX_TIMEOUT_MS, ae as McpAppBridge, af as McpAppBridgeHandlers, ag as McpAppBridgeOptions, ah as McpAppDisplayMode, ai as McpAppRpcError, aj as McpAppRpcMessage, ak as McpAppSandboxInput, al as McpAppSandboxLink, am as McpAppSandboxLinkOptions, an as McpAppSandboxTarget, ao as McpElicitationFieldSchema, ap as McpElicitationRequest, aq as McpElicitationSchema, ar as QueuedMessageView, as as ReplanState, at as SkillConsentView, au as StepEscalationView, av as UseMcpAppHostOptions, aw as appDisplayModeAllowed, ax as appDownloadOf, ay as appDownloadRefusal, az as appFileExtensionOf, aA as appFileNameOf, aB as appGestureOf, aC as appLinkOf, aD as appMessageTextOf, aE as appMimeTypeOf, aF as appSamplingErrorOf, aG as buildMcpAppDocument, aH as buildMcpAppSandboxShell, aI as clampAppHeight, aJ as elicitationFields, aK as elicitationFormAnswer, aL as elicitationInitialDraft, aM as elicitationLink, aN as formatCountdown, aO as grantedAppCsp, aP as mcpAppCsp, aQ as mcpAppHostCapabilities, aR as mcpAppSandboxProxyUrl, aS as mcpAppSandboxShellCsp, aT as mcpAppSandboxTarget, aU as resolveAppDownload, aV as saveAppFile, aW as useMcpAppHost } from './elicitation-BTrJ5t3c.js';
3
+ import { AskUserRequest, AskUserContext, AskUserAnswer, AskUserConfig, AskUserHandler, AgentEvent, RunFile, RunResult, Agent, ToolApprovalMode, AppToolCallRequest, AppSamplingRequest, AppSamplingView, AppSamplingResult, CompactResult, IUsage, AgentEventHandler, BrowserAgentConfig, VirtualFileInfo, VirtualFileSystem, CredentialStore, createWebLLMModel, WebLLMModelOptions, ModelTier, TierReason, EscalationReason, DecisionFallbackReason, Skill, IPlan, ToolApprovalRequest, ToolApprovalContext, ToolApprovalDecision } from '@dudko.dev/agent-web';
4
+ export { Agent, AgentEvent, AgentEventHandler, AgentLoggerSink, AgentTool, AgentToolSet, AppToolCallRequest, AskUserAnswer, AskUserConfig, AskUserContext, AskUserHandler, AskUserOption, AskUserRequest, AttachmentsNotSupportedError, BrowserAgentConfig, CompactResult, CompactionConfig, CredentialStore, FileToolsOptions, IPlan, IPlanStep, IStepResult, IToolCall, IUsage, ImagesNotSupportedError, IndexedDBStore, LearningConfig, LogLevel, McpAppCsp, McpAppResource, McpAppToolResult, MemoryCredentialStore, MemorySkillStore, MemoryStore, ModelInput, ProviderModelSpec, ProviderType, RunControl, RunFile, RunOptions, RunResult, SessionBusyError, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillStore, StorageChange, StorageChangeKind, StorageChangeOp, SubagentInfo, SubagentToolOptions, SubagentWorkerConfig, ThinkingLevel, ThinkingSetting, TokenLimits, ToolApprovalConfig, ToolApprovalContext, ToolApprovalMode, ToolApprovalRequest, VaultCredentialStore, VfsSkillStore, VirtualFile, VirtualFileInfo, VirtualFileSystem, WatchSessionOptions, createAgent, createFileTools, createRunControl, createSubagentTool, createWebLLMModel, defineSkill, defineTool, isWebGPUAvailable, loadSkillFromUrl, markReadOnly, onStorageChange, parseSkillMarkdown, postStorageChange, preloadWebLLMModel, serveSubagentWorker, supportsImages, supportsPdf, unloadWebLLMModel, watchSession } from '@dudko.dev/agent-web';
5
+ import { A as AgentUiState, C as ChatAttachment, a as ApprovalView, b as ChatMessage, c as AgentStatus, E as ElicitationIssueKind, d as ElicitationOutcomeReason, M as McpAppSandboxReason, R as RemoteRunView, L as LessonView, S as SubagentView, e as SubagentNode, P as PendingElicitation, f as McpElicitationResult, g as ElicitationView, W as WrittenFileView, T as ToolCallView, h as StepView, U as UserNoteView, D as DecisionView, i as MediaView, j as AppView, Q as QuestionView, k as McpAppsConnectionLike, l as McpAppSandboxOptions, m as AppRequestView, n as TranscriptView, B as BudgetView, o as CompactionView, p as ModelLoadState, q as McpAppHost, r as AppRequestAnswerOptions } from './elicitation-xMLll5W9.js';
6
+ export { s as APP_DEFAULT_HEIGHT, t as APP_MAX_HEIGHT, u as APP_MIN_HEIGHT, v as AppDownload, w as AppDownloadView, x as AppFileSaverEnv, y as AppLink, z as AppReadyDownload, F as AppResourceReader, G as ElicitationControl, H as ElicitationDraft, I as ElicitationDraftValue, J as ElicitationField, K as ElicitationFormOutcome, N as ElicitationIssue, O as ElicitationLink, V as ElicitationOption, X as FetchView, Y as MCP_APP_DISPLAY_MODES, Z as MCP_APP_MAX_ARGS_CHARS, _ as MCP_APP_MAX_DOWNLOAD_BYTES, $ as MCP_APP_MAX_FILE_NAME_CHARS, a0 as MCP_APP_MAX_IN_FLIGHT, a1 as MCP_APP_MAX_MESSAGE_CHARS, a2 as MCP_APP_MAX_URL_CHARS, a3 as MCP_APP_NOTIFICATIONS, a4 as MCP_APP_OPTIONAL_REQUESTS, a5 as MCP_APP_PROTOCOL_VERSION, a6 as MCP_APP_REFUSED, a7 as MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, a8 as MCP_APP_REFUSED_DOWNLOAD_TYPES, a9 as MCP_APP_RELAY, aa as MCP_APP_REQUESTS, ab as MCP_APP_SANDBOX_FRAME_TOKENS, ac as MCP_APP_SANDBOX_GRACE_MS, ad as MCP_APP_SANDBOX_SERVER, ae as MCP_APP_SANDBOX_TIMEOUT_MS, af as McpAppBridge, ag as McpAppBridgeHandlers, ah as McpAppBridgeOptions, ai as McpAppDisplayMode, aj as McpAppRpcError, ak as McpAppRpcMessage, al as McpAppSandboxInput, am as McpAppSandboxLink, an as McpAppSandboxLinkOptions, ao as McpAppSandboxTarget, ap as McpElicitationFieldSchema, aq as McpElicitationRequest, ar as McpElicitationSchema, as as QueuedMessageView, at as ReplanState, au as SkillConsentView, av as StepEscalationView, aw as UseMcpAppHostOptions, ax as appDisplayModeAllowed, ay as appDownloadOf, az as appDownloadRefusal, aA as appFileExtensionOf, aB as appFileNameOf, aC as appGestureOf, aD as appLinkOf, aE as appMessageTextOf, aF as appMimeTypeOf, aG as appSamplingErrorOf, aH as buildMcpAppDocument, aI as buildMcpAppSandboxShell, aJ as clampAppHeight, aK as elicitationFields, aL as elicitationFormAnswer, aM as elicitationInitialDraft, aN as elicitationLink, aO as formatCountdown, aP as grantedAppCsp, aQ as mcpAppCsp, aR as mcpAppHostCapabilities, aS as mcpAppSandboxProxyUrl, aT as mcpAppSandboxShellCsp, aU as mcpAppSandboxTarget, aV as resolveAppDownload, aW as saveAppFile, aX as useMcpAppHost } from './elicitation-xMLll5W9.js';
7
7
  export { M as MCP_APP_POLICY_TOKEN_MAX_CHARS, a as MCP_APP_SANDBOX_PROXY_READY, b as MCP_APP_SANDBOX_RESOURCE_READY, i as isMcpAppSandboxMessage, m as mcpAppPolicyToken } from './mcp-app-policy-DIUmGPJP.js';
8
8
 
9
+ /**
10
+ * The model asks the person ONE closed question (the core's `ask_user`, `config.askUser`): the
11
+ * part of it that is not React - the queue the hook hands the core as `askUser.onQuestion`, the
12
+ * answer a prompt builds, and what of a question's tool result may be kept.
13
+ *
14
+ * Pure: no React, no clock of its own (the queue takes `now`), no import of the core at run time
15
+ * (types only), so the main entry still loads next to an older core.
16
+ *
17
+ * Nothing here keeps, logs or returns what the person typed (`{ other }`) except to the one caller
18
+ * that hands it to the core: the queue passes an answer straight to the core's resolver, and
19
+ * {@link withoutOwnWords} takes the person's words out of the events before a view keeps them.
20
+ */
21
+ /** The core's tool name (`ASK_USER_TOOL`). */
22
+ declare const ASK_USER_TOOL_NAME = "ask_user";
23
+ /** The core's default for `askUser.timeoutMs` (`ASK_USER_TIMEOUT_MS`). */
24
+ declare const QUESTION_TIMEOUT_MS = 300000;
25
+ /**
26
+ * A question waiting for the person: the core's request (the question and every option are the
27
+ * MODEL's text, cleaned - show them as plain text), and when the core stops waiting for it.
28
+ */
29
+ interface PendingQuestion extends AskUserRequest {
30
+ /** Epoch ms after which the core answers it by itself ("did not answer in time"); absent: no limit. */
31
+ expiresAt?: number;
32
+ }
33
+ /**
34
+ * How long the core waits for an answer with this `askUser`; `undefined` = no limit of its own
35
+ * (`0`, `Infinity`, more than a timer holds - the core's own rules).
36
+ */
37
+ declare const questionTimeoutOf: (askUser: boolean | AskUserConfig | undefined) => number | undefined;
38
+ /**
39
+ * `config.askUser` as `useAgent` builds the agent with it: on without a handler of its own
40
+ * (`true`, `{ timeoutMs, maxPerRun }`) it gets `handler`; a host's own `onQuestion` wins, and off
41
+ * (absent, `false`) stays off - nothing is added, so the core mounts no tool.
42
+ */
43
+ declare const askUserWith: (askUser: boolean | AskUserConfig | undefined, handler: AskUserHandler) => boolean | AskUserConfig | undefined;
44
+ interface QuestionQueueOptions {
45
+ /**
46
+ * How long the core waits (ms), for `expiresAt`; `undefined` = no limit. A function is read when
47
+ * a question arrives (the settings of the agent that asks).
48
+ */
49
+ timeoutMs?: number | (() => number | undefined);
50
+ /** Called whenever the list of waiting questions changed. */
51
+ onChange?: (pending: PendingQuestion[]) => void;
52
+ /** The clock (tests). */
53
+ now?: () => number;
54
+ }
55
+ interface QuestionQueue {
56
+ /** The core's `askUser.onQuestion`: resolves when the person answers, or as `{ declined: true }`. */
57
+ handler: (request: AskUserRequest, ctx?: AskUserContext) => Promise<AskUserAnswer>;
58
+ /** The questions waiting, oldest first. */
59
+ pending: () => PendingQuestion[];
60
+ /** Answer one. False when no such question is waiting (answered, expired, cancelled). */
61
+ answer: (id: string, answer: AskUserAnswer) => boolean;
62
+ /**
63
+ * Take the waiting questions down - all of them, or those `match` picks - as declined (the run
64
+ * ended, it was stopped). The core has usually stopped waiting already; this only makes sure no
65
+ * resolver is left.
66
+ */
67
+ cancel: (match?: (question: PendingQuestion) => boolean) => void;
68
+ /** Cancel everything and stop reporting: the owner is gone. A later question is declined at once. */
69
+ dispose: () => void;
70
+ }
71
+ /**
72
+ * The questions the model is waiting on: `request.id → resolver`. A question leaves the queue
73
+ * exactly once - answered by the person, dropped because the core no longer wants the answer
74
+ * (`ctx.signal`: its time ran out, the run stopped), or cancelled by its owner (the run ended, an
75
+ * unmount) - and the queue never holds an answer: `answer` passes it straight to the resolver.
76
+ */
77
+ declare const createQuestionQueue: (options?: QuestionQueueOptions) => QuestionQueue;
78
+ /**
79
+ * Why a question ended without the person deciding: the core's `AskUserReason`
80
+ * (`handler-error`, `invalid-answer`, `cannot-park`), or its action (`timeout`, `stopped`).
81
+ */
82
+ type QuestionOutcomeReason = 'timeout' | 'stopped' | 'handler-error' | 'invalid-answer' | 'cannot-park';
83
+ /**
84
+ * The person's picks as the core's answer: the labels that were offered, in the order they were
85
+ * offered, each once - and one only unless the question allows several. `undefined` when nothing
86
+ * that was offered is picked (Send stays off).
87
+ */
88
+ declare const questionChoiceOf: (question: Pick<AskUserRequest, "options" | "multiple">, picked: readonly string[]) => AskUserAnswer | undefined;
89
+ /**
90
+ * The person's own words as the core's answer, when the question allows them and there is
91
+ * anything but spaces; `undefined` otherwise (Send stays off). The text goes to the caller only.
92
+ */
93
+ declare const questionOtherOf: (question: Pick<AskUserRequest, "allowOther">, text: string) => AskUserAnswer | undefined;
94
+ /** Whether an `ask_user` result may be kept by a view: it holds no word the person typed. */
95
+ declare const askUserOutputKept: (output: unknown, ok: boolean) => boolean;
96
+ /**
97
+ * The event with the person's own words taken out: the result of an `ask_user` call that is not
98
+ * known to hold labels only (an answer in their own words) loses its `output` - in
99
+ * `step.tool-result`, in `step.complete`'s tool calls, and in a subagent's events at any depth.
100
+ * Everything else comes back as it was (the same object). The model was given the words; the
101
+ * view, the saved chat and the event log are not.
102
+ */
103
+ declare const withoutOwnWords: (event: AgentEvent) => AgentEvent;
104
+
9
105
  interface UseAgentOptions {
10
106
  /**
11
107
  * Rebuild the agent when any of these values change — compared like a
@@ -29,6 +125,13 @@ interface UseAgentOptions {
29
125
  * (default true). Render them with `<ToolApprovalPrompt>`, or your own UI.
30
126
  */
31
127
  approvals?: boolean;
128
+ /**
129
+ * Route the model's questions (`ask_user`) into the hook (`pendingQuestions`,
130
+ * `answerQuestion`) when the config turns `askUser` on without an `onQuestion` of its own
131
+ * (`askUser: true`, or `{ timeoutMs, maxPerRun }`; default true). A host's own `onQuestion` wins;
132
+ * `askUser` off stays off. Render them with `<QuestionPrompt>`, or your own UI.
133
+ */
134
+ questions?: boolean;
32
135
  /**
33
136
  * What the run never showed the agent — a message sent while the answer was being
34
137
  * written — is sent as the next message, once the run has ended (default true).
@@ -119,6 +222,18 @@ interface UseAgentReturn extends AgentUiState {
119
222
  approve: (id: string, options?: ApproveOptions) => void;
120
223
  /** Refuse a pending call; the model is told and works around it. */
121
224
  deny: (id: string, reason?: string) => void;
225
+ /**
226
+ * The model's questions waiting for the person in THIS tab (`ask_user`, when the hook answers
227
+ * them - see `UseAgentOptions.questions`), oldest first, each with `expiresAt` when the core
228
+ * stops waiting. Another tab's questions are in `questions` (marked `remote`), never here.
229
+ */
230
+ pendingQuestions: PendingQuestion[];
231
+ /**
232
+ * Answer one: `{ choice: [label] }` (labels as offered; several only when `multiple`),
233
+ * `{ other: text }` (only when `allowOther`) or `{ declined: true }`. False when no such question
234
+ * is waiting (answered, expired, stopped). The answer goes to the core and is not kept here.
235
+ */
236
+ answerQuestion: (id: string, answer: AskUserAnswer) => boolean;
122
237
  /** The consent policy in effect. */
123
238
  approvalMode: ToolApprovalMode;
124
239
  /** Switch the consent policy live — the "autopilot" toggle. */
@@ -996,6 +1111,31 @@ interface AgentLabels {
996
1111
  /** Why a question was answered without anybody deciding, by the core's reason (+ `stopped`). */
997
1112
  elicitationReasons: Record<ElicitationOutcomeReason, string>;
998
1113
  elicitationDismiss: string;
1114
+ /** The host's own line over the model's question. */
1115
+ questionLead: string;
1116
+ /** The same when a helper asks; `role` is what the model wrote for it. */
1117
+ questionLeadHelper: (role: string | undefined, depth: number) => string;
1118
+ /** "1 of 2" - several questions are waiting. */
1119
+ questionCount: (index: number, total: number) => string;
1120
+ /** Under a question that takes several options. */
1121
+ questionSeveral: string;
1122
+ /** Sends the options picked, or the person's own words. */
1123
+ questionSend: string;
1124
+ /** Opens the field for an answer in the person's own words. */
1125
+ questionOther: string;
1126
+ /** That field's label. */
1127
+ questionOtherLabel: string;
1128
+ /** No answer: the agent goes on with its best judgment. */
1129
+ questionSkip: string;
1130
+ /** "...in 4:05": when the agent stops waiting. */
1131
+ questionExpiresIn: (time: string) => string;
1132
+ /** A question asked by the run in another tab: shown here, answered there. */
1133
+ questionRemote: string;
1134
+ /** The agent went on without an answer; `reason` is one of `questionReasons`. */
1135
+ questionAutomatic: (reason: string) => string;
1136
+ /** Why, by the core's reason (+ `timeout`, `stopped`). */
1137
+ questionReasons: Record<QuestionOutcomeReason, string>;
1138
+ questionDismiss: string;
999
1139
  /** The host's label on an app's frame: "App from server “travel”". */
1000
1140
  appFrom: (server: string) => string;
1001
1141
  /** The badge beside it. */
@@ -1110,7 +1250,7 @@ interface AgentLabels {
1110
1250
  }
1111
1251
  declare const defaultLabels: AgentLabels;
1112
1252
  /** Overrides: any label, with the nested groups merged key by key. */
1113
- type AgentLabelsOverride = Partial<Omit<AgentLabels, 'status' | 'modes' | 'commandGroups' | 'commandDescriptions' | 'thinkingLevels' | 'notices' | 'tierNames' | 'tierReasons' | 'escalationReasons' | 'subagentStatus' | 'decisionReasons' | 'elicitationErrors' | 'elicitationReasons' | 'fileKinds' | 'appSandboxReasons'>> & {
1253
+ type AgentLabelsOverride = Partial<Omit<AgentLabels, 'status' | 'modes' | 'commandGroups' | 'commandDescriptions' | 'thinkingLevels' | 'notices' | 'tierNames' | 'tierReasons' | 'escalationReasons' | 'subagentStatus' | 'decisionReasons' | 'elicitationErrors' | 'elicitationReasons' | 'questionReasons' | 'fileKinds' | 'appSandboxReasons'>> & {
1114
1254
  status?: Partial<AgentLabels['status']>;
1115
1255
  modes?: Partial<AgentLabels['modes']>;
1116
1256
  commandGroups?: Partial<AgentLabels['commandGroups']>;
@@ -1124,6 +1264,7 @@ type AgentLabelsOverride = Partial<Omit<AgentLabels, 'status' | 'modes' | 'comma
1124
1264
  decisionReasons?: Partial<AgentLabels['decisionReasons']>;
1125
1265
  elicitationErrors?: Partial<AgentLabels['elicitationErrors']>;
1126
1266
  elicitationReasons?: Partial<AgentLabels['elicitationReasons']>;
1267
+ questionReasons?: Partial<AgentLabels['questionReasons']>;
1127
1268
  fileKinds?: Partial<AgentLabels['fileKinds']>;
1128
1269
  appSandboxReasons?: Partial<AgentLabels['appSandboxReasons']>;
1129
1270
  };
@@ -1850,6 +1991,53 @@ declare const AttachmentView: ({ attachment: a }: {
1850
1991
  */
1851
1992
  declare const MessageList: ({ messages, empty, showActivity, showToolCalls, showUsage, showThoughts, showNotes, showLearned, showTiers, showReplanFailed, showDecisions, showSearchResults, showSubagents, showMedia, showFileChips, files, htmlPreview, onShowFiles, renderFile, renderFileContent, renderMedia, renderSubagent, onStopSubagent, activityOpen, liveExtra, renderContent, renderMessage, renderAttachment, renderToolCall, renderApp, showApps, imageViewer, renderImageViewer, labels, className, }: MessageListProps) => react.JSX.Element | null;
1852
1993
 
1994
+ interface QuestionPromptProps {
1995
+ /**
1996
+ * The model's questions waiting for the person (`useAgent().pendingQuestions`, or the requests
1997
+ * your own `askUser.onQuestion` was given). One is shown at a time, oldest first, with a count.
1998
+ */
1999
+ questions: PendingQuestion[];
2000
+ /**
2001
+ * The person's answer: `{ choice: [label, ...] }`, `{ other: text }` or `{ declined: true }`.
2002
+ * Wire it to `useAgent().answerQuestion`. What was typed goes to this callback and nowhere else.
2003
+ */
2004
+ onAnswer: (id: string, answer: AskUserAnswer) => void;
2005
+ /**
2006
+ * The run's questions as the reducer keeps them (`useAgent().questions`): the ones the agent
2007
+ * went on without (no answer in time, a failure) are said so, a helper's role is named, and
2008
+ * one asked in another tab is shown without its buttons.
2009
+ */
2010
+ outcomes?: QuestionView[];
2011
+ /** Say which questions the agent went on without (default true; needs `outcomes`). */
2012
+ showOutcomes?: boolean;
2013
+ /** The note of when the agent stops waiting, with the time left (default true). */
2014
+ showExpiry?: boolean;
2015
+ /** Say that a helper is the one that asks (default true). */
2016
+ showHelper?: boolean;
2017
+ /** Show a question asked by the run in another tab, without buttons (default true). */
2018
+ showRemote?: boolean;
2019
+ /** Keys 1-6 pick an option while the card has the focus (default true). */
2020
+ numberKeys?: boolean;
2021
+ /**
2022
+ * Render a question yourself: `fallback` is the built-in card, `answer` decides it. The
2023
+ * question and its options are the MODEL's text - render them as text.
2024
+ */
2025
+ renderQuestion?: (question: PendingQuestion, fallback: ReactNode, answer: (answer: AskUserAnswer) => void) => ReactNode;
2026
+ labels?: AgentLabelsOverride;
2027
+ className?: string;
2028
+ }
2029
+ /**
2030
+ * A question the agent's MODEL puts to the person (the core's `ask_user`, `config.askUser`): the
2031
+ * question, one button per option, "Other…" for an answer in their own words when the model
2032
+ * allowed one, and Skip. Shown in the transcript where the run is, not as a modal; keys 1-6 pick
2033
+ * an option while the card has the focus. Everything the model wrote is plain text.
2034
+ *
2035
+ * Wire it to {@link useAgent}'s `pendingQuestions` and `answerQuestion` (with `askUser` on in its
2036
+ * config); `<AgentChat>` renders it for you. What the person types is kept in the card only and
2037
+ * handed to `onAnswer` once: it is not in the agent's state, its events or the transcript.
2038
+ */
2039
+ declare const QuestionPrompt: ({ questions, onAnswer, outcomes, showOutcomes, showExpiry, showHelper, showRemote, numberKeys, renderQuestion, labels, className, }: QuestionPromptProps) => react.JSX.Element | null;
2040
+
1853
2041
  interface ToolApprovalPromptProps {
1854
2042
  /** Pending requests (e.g. `agent.pendingApprovals`). */
1855
2043
  approvals: ApprovalView[];
@@ -1907,6 +2095,7 @@ interface AgentChatComponents {
1907
2095
  FilesPanel?: ComponentType<FilesPanelProps>;
1908
2096
  ApprovalPrompt?: ComponentType<ToolApprovalPromptProps>;
1909
2097
  ElicitationPrompt?: ComponentType<ElicitationPromptProps>;
2098
+ QuestionPrompt?: ComponentType<QuestionPromptProps>;
1910
2099
  }
1911
2100
  /** Extra class names per part (added to the built-in `awr-` ones). */
1912
2101
  interface AgentChatClassNames {
@@ -1997,6 +2186,13 @@ interface AgentChatProps {
1997
2186
  * (default true). Shown once `elicitations` and `onElicitationAnswer` are given.
1998
2187
  */
1999
2188
  showElicitation?: boolean;
2189
+ /**
2190
+ * The questions the agent's model puts to the person (`ask_user`, with `askUser` on in the
2191
+ * agent's config), where the consent cards are (default true): the question, its options as
2192
+ * buttons, Other… and Skip. In a tab that follows another tab's run, the question is shown
2193
+ * without buttons - it is answered there.
2194
+ */
2195
+ showQuestions?: boolean;
2000
2196
  /**
2001
2197
  * In the consent card of an MCP server's skill: the collapsible preview of the instructions
2002
2198
  * the agent would read (default true; `<ToolApprovalPrompt showSkillPreview>`).
@@ -2053,6 +2249,8 @@ interface AgentChatProps {
2053
2249
  renderApproval?: ToolApprovalPromptProps['renderApproval'];
2054
2250
  /** A server's question (gets the built-in card as `fallback`, and `answer`). */
2055
2251
  renderElicitation?: ElicitationPromptProps['renderElicitation'];
2252
+ /** A question of the agent's (gets the built-in card as `fallback`, and `answer`). */
2253
+ renderQuestion?: QuestionPromptProps['renderQuestion'];
2056
2254
  slots?: AgentChatSlots;
2057
2255
  /**
2058
2256
  * How a picture in the transcript opens: in the image viewer over the chat (default true),
@@ -2600,5 +2798,5 @@ interface AppRequestPromptProps {
2600
2798
  */
2601
2799
  declare const AppRequestPrompt: ({ requests, onAnswer, renderRequest, labels, className, }: AppRequestPromptProps) => react.JSX.Element | null;
2602
2800
 
2603
- export { AgentChat, AgentComposer, AgentLabelsProvider, AgentProvider, AgentStatus, AgentUiState, ApiKeyForm, AppRequestAnswerOptions, AppRequestPrompt, AppRequestView, AppView, ApprovalModeSwitch, ApprovalView, AttachmentView, BudgetView, ChatAttachment, ChatHistoryList, ChatHistoryStore, ChatMessage, CompactionView, Composer, ContextMeter, DecisionView, ElicitationIssueKind, ElicitationOutcomeReason, ElicitationPrompt, ElicitationView, FILE_PREVIEW_CHARS, FOLLOW_LEAVE_PX, FOLLOW_REJOIN_PX, FRAME_MAX_HEIGHT, FRAME_MIN_HEIGHT, FileChip, FileChips, FilesPanel, GeneratedMedia, HTML_PREVIEW_MAX_CHARS, ImageThumb, ImageViewer, ImageViewerProvider, LearnedSkills, LessonView, McpAppFrame, McpAppHost, McpAppLine, McpAppSandboxOptions, McpAppSandboxReason, McpAppsConnectionLike, McpElicitationResult, MediaView, MessageList, ModelLoadBar, ModelLoadState, PendingElicitation, PlanView, RemoteRunView, SandboxedFrame, SourceView, StepList, StepView, SubagentNode, SubagentRow, SubagentTree, SubagentView, ToolApprovalPrompt, ToolCallRow, ToolCallView, TranscriptBlock, TranscriptView, UsageBadge, UserNoteRow, UserNoteView, agentStateReducer, agentStatusOf, attachmentKindOf, attachmentRefusal, buildSandboxedDocument, chatTitle, clampFrameHeight, createApprovalQueue, createInitialAgentState, createWebLLMEngine, decisionNote, defaultLabels, downscaleImage, escapeAttribute, fileKindOf, fileNameOf, filterCommands, followsAfterResize, followsAfterScroll, formatElapsed, imageExtensionOf, lessonsOf, linkedFilesOf, mediaFamilyOf, mergeChatRecord, mergeLabels, newChatId, noticesOf, parseSlash, pendingApprovalsOf, sandboxTokens, sandboxedCsp, saveChat, steerIntent, subagentTree, tokenizeHtml, unchangedSince, usageLine, useAgent, useAgentContext, useChatHistory, useCredentials, useFollowScroll, useLabels, useLocalModel, useOptionalAgentContext, useSpeechToText, useVirtualFiles, useWebLLMModel, webSearchOf, withAttachments, withCspFirst, withPolicyFirst };
2604
- export type { AgentAction, AgentChatClassNames, AgentChatComponents, AgentChatProps, AgentChatSlots, AgentComposerProps, AgentLabels, AgentLabelsOverride, AgentLabelsProviderProps, AgentProviderProps, ApiKeyFormProps, AppRequestPromptProps, ApprovalModeSwitchProps, ApprovalQueue, ApproveOptions, ChatBase, ChatHistoryListProps, ChatHistoryStoreOptions, ChatRecord, ChatSummary, ComposerAttachment, ComposerModelChip, ComposerNotice, ComposerProps, ComposerThinkingChip, ContextMeterProps, ConvertedFile, DownscaleOptions, ElicitationPromptProps, FileChipProps, FileChipsProps, FileKind, FilesPanelProps, GeneratedMediaProps, HtmlPreviewOptions, ImageThumbProps, ImageViewerProps, LearnedSkillsProps, LocalModelEngine, LocalModelLoadContext, LocalModelProgress, McpAppFrameProps, McpAppLineProps, MessageListProps, ModelLoadBarProps, NoticeTexts, PlanViewProps, RenderImageViewer, RenderSubagent, RenderToolCall, RunGoalOptions, SandboxedDocumentOptions, SandboxedFrameProps, ScrollMeasure, SlashCommand, SourceToken, SourceViewProps, SpeechRecognizerLike, SteerIntent, StepListProps, SubagentRowProps, SubagentTreeProps, ToolApprovalPromptProps, ToolCallRowProps, TranscriptBlockProps, UsageBadgeProps, UseAgentOptions, UseAgentReturn, UseChatHistoryOptions, UseChatHistoryReturn, UseCredentialsReturn, UseLocalModelOptions, UseLocalModelReturn, UseSpeechToTextOptions, UseSpeechToTextReturn, UseVirtualFilesReturn, UseWebLLMModelOptions, UseWebLLMModelReturn, ViewerImage, WebLLMModelFactory, WebSearchResultView, WebSearchView };
2801
+ export { ASK_USER_TOOL_NAME, AgentChat, AgentComposer, AgentLabelsProvider, AgentProvider, AgentStatus, AgentUiState, ApiKeyForm, AppRequestAnswerOptions, AppRequestPrompt, AppRequestView, AppView, ApprovalModeSwitch, ApprovalView, AttachmentView, BudgetView, ChatAttachment, ChatHistoryList, ChatHistoryStore, ChatMessage, CompactionView, Composer, ContextMeter, DecisionView, ElicitationIssueKind, ElicitationOutcomeReason, ElicitationPrompt, ElicitationView, FILE_PREVIEW_CHARS, FOLLOW_LEAVE_PX, FOLLOW_REJOIN_PX, FRAME_MAX_HEIGHT, FRAME_MIN_HEIGHT, FileChip, FileChips, FilesPanel, GeneratedMedia, HTML_PREVIEW_MAX_CHARS, ImageThumb, ImageViewer, ImageViewerProvider, LearnedSkills, LessonView, McpAppFrame, McpAppHost, McpAppLine, McpAppSandboxOptions, McpAppSandboxReason, McpAppsConnectionLike, McpElicitationResult, MediaView, MessageList, ModelLoadBar, ModelLoadState, PendingElicitation, PlanView, QUESTION_TIMEOUT_MS, QuestionPrompt, QuestionView, RemoteRunView, SandboxedFrame, SourceView, StepList, StepView, SubagentNode, SubagentRow, SubagentTree, SubagentView, ToolApprovalPrompt, ToolCallRow, ToolCallView, TranscriptBlock, TranscriptView, UsageBadge, UserNoteRow, UserNoteView, agentStateReducer, agentStatusOf, askUserOutputKept, askUserWith, attachmentKindOf, attachmentRefusal, buildSandboxedDocument, chatTitle, clampFrameHeight, createApprovalQueue, createInitialAgentState, createQuestionQueue, createWebLLMEngine, decisionNote, defaultLabels, downscaleImage, escapeAttribute, fileKindOf, fileNameOf, filterCommands, followsAfterResize, followsAfterScroll, formatElapsed, imageExtensionOf, lessonsOf, linkedFilesOf, mediaFamilyOf, mergeChatRecord, mergeLabels, newChatId, noticesOf, parseSlash, pendingApprovalsOf, questionChoiceOf, questionOtherOf, questionTimeoutOf, sandboxTokens, sandboxedCsp, saveChat, steerIntent, subagentTree, tokenizeHtml, unchangedSince, usageLine, useAgent, useAgentContext, useChatHistory, useCredentials, useFollowScroll, useLabels, useLocalModel, useOptionalAgentContext, useSpeechToText, useVirtualFiles, useWebLLMModel, webSearchOf, withAttachments, withCspFirst, withPolicyFirst, withoutOwnWords };
2802
+ export type { AgentAction, AgentChatClassNames, AgentChatComponents, AgentChatProps, AgentChatSlots, AgentComposerProps, AgentLabels, AgentLabelsOverride, AgentLabelsProviderProps, AgentProviderProps, ApiKeyFormProps, AppRequestPromptProps, ApprovalModeSwitchProps, ApprovalQueue, ApproveOptions, ChatBase, ChatHistoryListProps, ChatHistoryStoreOptions, ChatRecord, ChatSummary, ComposerAttachment, ComposerModelChip, ComposerNotice, ComposerProps, ComposerThinkingChip, ContextMeterProps, ConvertedFile, DownscaleOptions, ElicitationPromptProps, FileChipProps, FileChipsProps, FileKind, FilesPanelProps, GeneratedMediaProps, HtmlPreviewOptions, ImageThumbProps, ImageViewerProps, LearnedSkillsProps, LocalModelEngine, LocalModelLoadContext, LocalModelProgress, McpAppFrameProps, McpAppLineProps, MessageListProps, ModelLoadBarProps, NoticeTexts, PendingQuestion, PlanViewProps, QuestionOutcomeReason, QuestionPromptProps, QuestionQueue, QuestionQueueOptions, RenderImageViewer, RenderSubagent, RenderToolCall, RunGoalOptions, SandboxedDocumentOptions, SandboxedFrameProps, ScrollMeasure, SlashCommand, SourceToken, SourceViewProps, SpeechRecognizerLike, SteerIntent, StepListProps, SubagentRowProps, SubagentTreeProps, ToolApprovalPromptProps, ToolCallRowProps, TranscriptBlockProps, UsageBadgeProps, UseAgentOptions, UseAgentReturn, UseChatHistoryOptions, UseChatHistoryReturn, UseCredentialsReturn, UseLocalModelOptions, UseLocalModelReturn, UseSpeechToTextOptions, UseSpeechToTextReturn, UseVirtualFilesReturn, UseWebLLMModelOptions, UseWebLLMModelReturn, ViewerImage, WebLLMModelFactory, WebSearchResultView, WebSearchView };