@dudko.dev/agent-web-react 0.0.39 → 0.0.41

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
@@ -2,8 +2,8 @@ import * as react from 'react';
2
2
  import { DependencyList, ReactNode, RefObject, ComponentType, CSSProperties } from 'react';
3
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
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-DdzjMut9.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-DdzjMut9.cjs';
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-Dp6Fi6ZA.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-Dp6Fi6ZA.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
9
  /**
@@ -186,8 +186,10 @@ interface UseAgentReturn extends AgentUiState {
186
186
  /**
187
187
  * Say something to the conversation's run in another tab (`remote`): it reaches that run's
188
188
  * model at its next boundary, marked as from another tab. `false` when no such run is followed
189
- * or the text is empty. A message that tab refuses (or never answers) comes back in
190
- * `undelivered`.
189
+ * or the text is empty. Until that tab answers, the text is in `queued` marked
190
+ * `sentTo: 'another-tab'` (shown "waiting for the other tab to pick it up") - with no time
191
+ * limit: a tab the browser froze answers when it wakes. Taken, that run's own entry takes its
192
+ * place; refused, or that run ended without it, it comes back in `undelivered`.
191
193
  */
192
194
  sendRemote: (text: string) => boolean;
193
195
  /**
@@ -416,7 +418,9 @@ declare const unchangedSince: (messages: ChatMessage[], base: ChatBase | undefin
416
418
  * from here - that tab saves its own, unclipped copy. When another tab saved the chat after this
417
419
  * tab last read or wrote it (or saved a chat this tab never read), THAT record is the truth for
418
420
  * everything that is not this tab's own: this tab's own new messages - by identity, not by count,
419
- * so a reset or a trim here drops nothing there - go after it.
421
+ * so a reset or a trim here drops nothing there - go after it, each before a stored turn that
422
+ * began after its own (`ChatMessage.startedAt`: this tab saved its turn late, after another tab
423
+ * ran the next one and saved first). Without times, after it all.
420
424
  */
421
425
  declare const mergeChatRecord: (view: ChatRecord, stored: ChatRecord | undefined, base: ChatBase | undefined,
422
426
  /** The words of a title of attachments only (`chatTitle`). */
@@ -442,6 +446,8 @@ declare const saveChat: (store: ChatHistoryStore, view: ChatRecord, base: ChatBa
442
446
  * Several tabs: the list follows what other tabs of the site save (the store's `chats`
443
447
  * notices), the open chat is read again when another tab saved it and nothing runs here, and a
444
448
  * run followed from another tab (`agent.remote`) is never saved from here - its own tab saves it.
449
+ * A turn of this tab's is saved even when such a run reached it before the save began (a tab the
450
+ * browser froze, waking), and keeps its place among the other tab's turns (`mergeChatRecord`).
445
451
  */
446
452
  declare const useChatHistory: (agent: UseAgentReturn, options?: UseChatHistoryOptions) => UseChatHistoryReturn;
447
453
 
@@ -719,6 +725,23 @@ declare const speakableText: (markdown: string, options?: SpeakableOptions) => s
719
725
  * seconds; a provider takes a few thousand characters per call).
720
726
  */
721
727
  declare const splitForSpeech: (text: string, max?: number) => string[];
728
+ /** A writing system, as far as a voice needs to know: the letters it can read. */
729
+ type SpeechScript = 'latin' | 'cyrillic' | 'greek' | 'arabic' | 'hebrew' | 'han' | 'kana' | 'hangul' | 'devanagari' | 'thai' | 'georgian' | 'armenian';
730
+ /** The script a language (BCP-47) is written in: `sr-Latn` is Latin, `zh-*` Han, `ja` kana. */
731
+ declare const scriptOfLanguage: (lang: string) => SpeechScript;
732
+ /**
733
+ * The script most of a text's letters are written in (digits, signs and spaces do not count);
734
+ * a text with any kana is Japanese (it is mostly Han letters too). Undefined: no letters.
735
+ */
736
+ declare const scriptOfText: (text: string) => SpeechScript | undefined;
737
+ /**
738
+ * The language to read a text in: the first of `preferred` (the UI's language, then the
739
+ * browser's, `navigator.languages`) written in the text's script - so a Russian answer in an
740
+ * English interface is read in Russian, not spelled by an English voice -, else the script's
741
+ * usual language. A text without letters: the first preferred. Which of the languages of ONE
742
+ * script (English or French) cannot be told from the letters: the person's order decides.
743
+ */
744
+ declare const languageOfText: (text: string, preferred?: readonly (string | undefined)[]) => string | undefined;
722
745
  /** The slice of a `SpeechSynthesisVoice` used here. */
723
746
  interface SpeechVoiceLike {
724
747
  voiceURI: string;
@@ -728,7 +751,8 @@ interface SpeechVoiceLike {
728
751
  default?: boolean;
729
752
  }
730
753
  /**
731
- * The voice to read a language with: the person's (by `voiceURI`) while the browser has it; else
754
+ * The voice to read a language with: the person's (by `voiceURI`) while the browser has it and it
755
+ * reads that language's script; else
732
756
  * one of exactly that language (`pt-BR`), then of its base (`pt`) - a voice on the device before a
733
757
  * network one, the browser's default of the language first. Undefined: none for the language (the
734
758
  * browser then reads with its own default).
@@ -1320,6 +1344,16 @@ interface AgentLabels {
1320
1344
  notebookRevision: (n: number) => string;
1321
1345
  /** Before the sources a lesson came from. */
1322
1346
  notebookFrom: string;
1347
+ /** Before a fact that was just saved. */
1348
+ memorySaved: string;
1349
+ /** Before a fact that was just changed. */
1350
+ memoryUpdated: string;
1351
+ /** Before a fact that was just forgotten. */
1352
+ memoryForgotten: string;
1353
+ /** The card's button that takes it back. */
1354
+ memoryUndo: string;
1355
+ /** In place of the button once it was taken back. */
1356
+ memoryUndone: string;
1323
1357
  placeholder: string;
1324
1358
  listening: string;
1325
1359
  message: string;
@@ -1447,6 +1481,11 @@ interface AgentLabels {
1447
1481
  * run (`sessionBusy`) - in another tab, or in this one - to finish. Shown only while that lasts.
1448
1482
  */
1449
1483
  queuedForSession: (heldBy: 'another-tab' | 'this-tab') => string;
1484
+ /**
1485
+ * What this tab said to the conversation's run in another tab (`sendRemote`), while that tab has
1486
+ * not answered (it may be in the background, frozen by the browser): it is not refused.
1487
+ */
1488
+ queuedForOtherTab: string;
1450
1489
  /** Where a note landed: between tool calls / after a step / before the answer. */
1451
1490
  noteAt: Record<'round' | 'step' | 'final', string>;
1452
1491
  /** Messages the run ended without delivering, offered for sending. */
@@ -1931,6 +1970,28 @@ type AgentAction =
1931
1970
  texts: string[];
1932
1971
  keepQueued?: boolean;
1933
1972
  }
1973
+ /**
1974
+ * `sendRemote`: the text went to the conversation's run in another tab, which has not answered
1975
+ * yet - shown in `queued`, marked `sentTo: 'another-tab'`, until `remote-answer` with this `id`
1976
+ * (or that run's own `message.queued` for it, which takes its place).
1977
+ */
1978
+ | {
1979
+ type: 'remote-send';
1980
+ id: string;
1981
+ text: string;
1982
+ }
1983
+ /**
1984
+ * That tab's answer to `remote-send` `id`: `taken` (its run has it), `refused` (refused, or its
1985
+ * run ended without taking it - the text comes back in `undelivered`, to send again or drop), or
1986
+ * `unknown` (the watch that sent it was closed - another conversation is in view: nothing is
1987
+ * offered, as that tab may still take it). Either way the waiting entry goes.
1988
+ */
1989
+ | {
1990
+ type: 'remote-answer';
1991
+ id: string;
1992
+ text: string;
1993
+ answer: 'taken' | 'refused' | 'unknown';
1994
+ }
1934
1995
  /**
1935
1996
  * The user sent a goal and this tab's run is getting going: its turn is shown at once (a
1936
1997
  * user message and a pending answer), until the run's `run.start` takes its place.
@@ -2006,6 +2067,22 @@ interface ConvertedFile {
2006
2067
  text: string;
2007
2068
  /** Name of the text attachment (default: the file's name + ".md"). */
2008
2069
  name?: string;
2070
+ /** The attachment's note (default: `convertedFrom` - "converted from report.pdf"). */
2071
+ note?: string;
2072
+ /**
2073
+ * Pictures that go with the text (e.g. the pages of a scanned PDF): each is attached as an
2074
+ * image the composer took itself - downscaled, counted against `maxImages` / `maxTotalBytes`,
2075
+ * saved under `/attachments/` - and only when the model reads images (otherwise the refusal is
2076
+ * said and the text goes alone).
2077
+ */
2078
+ images?: ConvertedImage[];
2079
+ }
2080
+ /** A picture a `convertFile` made (`ConvertedFile.images`). */
2081
+ interface ConvertedImage {
2082
+ /** Its attachment's name, e.g. "scan-page-1.jpg". */
2083
+ name: string;
2084
+ /** The encoded picture; its `type` is the media type (an `image/*`). */
2085
+ blob: Blob;
2009
2086
  }
2010
2087
  interface AgentComposerProps {
2011
2088
  /** The agent from `useAgent()` (or `useAgentContext()`). */
@@ -2494,7 +2571,12 @@ declare const StepList: ({ steps, subagents, approvals, notes, showNotes, onStop
2494
2571
  interface ReadAloudOptions {
2495
2572
  /** The engine: `createBrowserSpeaker()` (the device's voices) or `createAudioSpeaker(...)`. Keep it stable. */
2496
2573
  speak: SpeakText;
2497
- /** The answers' language (BCP-47): the browser's voice is picked for it. */
2574
+ /**
2575
+ * The interface's language (BCP-47), the first choice for a text in its script: each answer is
2576
+ * read in ITS language - the script of its letters decides (`languageOfText`: this, then the
2577
+ * browser's languages, then the script's usual one), so a Russian answer in an English
2578
+ * interface is read by a Russian voice.
2579
+ */
2498
2580
  lang?: string;
2499
2581
  /** What is read of an answer. Default: its Markdown as words (`speakableText`, code left out). */
2500
2582
  textOf?: (message: ChatMessage) => string;
@@ -2571,6 +2653,15 @@ interface MessageListProps {
2571
2653
  readAloud?: ReadAloudOptions;
2572
2654
  /** Tool calls inside the activity. */
2573
2655
  renderToolCall?: RenderToolCall;
2656
+ /**
2657
+ * A tool call as a card in the answer itself - outside the folded activity, above the text -
2658
+ * for the calls the user should see without opening it (a fact remembered, an order placed):
2659
+ * return a node for those (`<MemoryCard>` is one), `null` / `undefined` for the rest. Called for
2660
+ * every tool call of an assistant turn, in order; nothing is drawn without it.
2661
+ */
2662
+ renderToolCard?: (call: ToolCallView, message: ChatMessage) => ReactNode;
2663
+ /** Draw the tool cards (default true; needs `renderToolCard`). */
2664
+ showToolCards?: boolean;
2574
2665
  /**
2575
2666
  * The MCP Apps an answer's tool calls came with (`message.apps`), drawn between its activity
2576
2667
  * and its text. `<AgentChat mcpApps>` passes `<McpAppFrame>`; without this prop none is drawn.
@@ -2613,7 +2704,7 @@ declare const AttachmentView: ({ attachment: a, files, labels, }: {
2613
2704
  * subagents, consent decisions — and the tokens it spent by kind. Every part
2614
2705
  * can be hidden, relabelled or rendered by the host.
2615
2706
  */
2616
- 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, readAloud, labels, className, }: MessageListProps) => react.JSX.Element | null;
2707
+ 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, renderToolCard, showToolCards, renderApp, showApps, imageViewer, renderImageViewer, readAloud, labels, className, }: MessageListProps) => react.JSX.Element | null;
2617
2708
 
2618
2709
  interface QuestionPromptProps {
2619
2710
  /**
@@ -2868,6 +2959,10 @@ interface AgentChatProps {
2868
2959
  */
2869
2960
  readAloud?: MessageListProps['readAloud'];
2870
2961
  renderToolCall?: RenderToolCall;
2962
+ /** A tool call as a card in the answer, outside the activity (`<MemoryCard>`; see `MessageList`). */
2963
+ renderToolCard?: MessageListProps['renderToolCard'];
2964
+ /** Draw the tool cards (default true; needs `renderToolCard`). */
2965
+ showToolCards?: boolean;
2871
2966
  /** A node of the subagent tree. */
2872
2967
  renderSubagent?: RenderSubagent;
2873
2968
  /** A generated image / audio file. */
@@ -2999,6 +3094,34 @@ interface LearnedSkillsProps {
2999
3094
  */
3000
3095
  declare const LearnedSkills: ({ controller, lessons, onForget, showSources, empty, hideTitle, labels, className, }: LearnedSkillsProps) => react.JSX.Element;
3001
3096
 
3097
+ interface MemoryCardProps {
3098
+ /** What happened: a fact saved, a fact changed, a fact forgotten. */
3099
+ kind: 'saved' | 'updated' | 'forgotten';
3100
+ /** The fact: as it was saved or changed to, or as it was when it was forgotten. Drawn as text. */
3101
+ text: string;
3102
+ /**
3103
+ * Take it back - the host does the work (delete the fact saved, put back the one forgotten or
3104
+ * changed). Absent: no button.
3105
+ */
3106
+ onUndo?: () => void | Promise<unknown>;
3107
+ /**
3108
+ * It has been taken back: the host knows (its store no longer has the fact saved, or has the one
3109
+ * forgotten again) - "Undone" in place of the button, even after a reload.
3110
+ */
3111
+ undone?: boolean;
3112
+ /** Why the last Undo did not go through, in the host's words (shown under the text). */
3113
+ problem?: string;
3114
+ labels?: AgentLabelsOverride;
3115
+ className?: string;
3116
+ }
3117
+ /**
3118
+ * One fact the host's app remembered, changed or forgot about the user, as a card in the answer -
3119
+ * its text and an Undo. The package keeps no memory of its own: the host decides which tool calls
3120
+ * are memory (`<AgentChat renderToolCard>`), what Undo does and when it is undone. The text is a
3121
+ * text node, never markup.
3122
+ */
3123
+ declare const MemoryCard: ({ kind, text, onUndo, undone, problem, labels, className, }: MemoryCardProps) => react.JSX.Element;
3124
+
3002
3125
  interface ComposerProps {
3003
3126
  /** Called with the trimmed text when the user submits. */
3004
3127
  onSubmit: (text: string) => void;
@@ -3428,5 +3551,5 @@ interface AppRequestPromptProps {
3428
3551
  */
3429
3552
  declare const AppRequestPrompt: ({ requests, onAnswer, renderRequest, labels, className, }: AppRequestPromptProps) => react.JSX.Element | null;
3430
3553
 
3431
- export { ASK_USER_TOOL_NAME, ATTACHMENT_BOUNDS, 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, MicError, ModelLoadBar, ModelLoadState, PendingElicitation, PlanView, QUESTION_TIMEOUT_MS, QuestionPrompt, QuestionView, RECORDING_DEFAULT_MAX_MS, RECORDING_TYPES, RemoteRunView, SandboxedFrame, SourceView, SpeechOutputError, StepList, StepView, SubagentNode, SubagentRow, SubagentTree, SubagentView, ToolApprovalPrompt, ToolCallRow, ToolCallView, TranscriptBlock, TranscriptView, UsageBadge, UserNoteRow, UserNoteView, agentStateReducer, agentStatusOf, askUserOutputKept, askUserWith, attachmentKindOf, attachmentOverLimit, attachmentRefusal, attachmentTransformOf, attachmentsText, audioExtensionOf, audioTypeOf, buildSandboxedDocument, chatTitle, clampFrameHeight, createApprovalQueue, createAudioSpeaker, createBrowserSpeaker, createInitialAgentState, createQuestionQueue, createRecordingRecognizer, createWebLLMEngine, decisionNote, defaultLabels, downscaleImage, escapeAttribute, fileKindOf, fileNameOf, filterCommands, followsAfterResize, followsAfterScroll, formatClock, formatElapsed, imageExtensionOf, imageSizeOf, lessonsOf, linkedFilesOf, mediaFamilyOf, menuKeyTarget, menuSections, mergeChatRecord, mergeLabels, messageOverLimit, micProblemOf, micProblemText, newChatId, noticesOf, parseSlash, pendingApprovalsOf, pickRecordingType, questionChoiceOf, questionOtherOf, questionTimeoutOf, recordingSupported, sandboxTokens, sandboxedCsp, saveChat, settleAudioDuration, speakableText, speechSynthesisSupported, splitForSpeech, startRecording, steerIntent, stopTracks, subagentTree, tokenizeHtml, unchangedSince, usageLine, useAgent, useAgentContext, useAudioRecorder, useChatHistory, useCredentials, useFollowScroll, useLabels, useLocalModel, useOptionalAgentContext, useReadAloud, useSpeechToText, useSpeechVoices, useVirtualFiles, useWebLLMModel, voiceFor, voiceMessageName, voicesOf, webSearchOf, withAttachments, withCspFirst, withPolicyFirst, withoutOwnWords };
3432
- export type { AgentAction, AgentChatClassNames, AgentChatComponents, AgentChatProps, AgentChatSlots, AgentComposerProps, AgentLabels, AgentLabelsOverride, AgentLabelsProviderProps, AgentProviderProps, ApiKeyFormProps, AppRequestPromptProps, ApprovalModeSwitchProps, ApprovalQueue, ApproveOptions, AttachmentBounds, AttachmentOverLimit, AttachmentTexts, AttachmentTransform, AudioLike, AudioSpeakerOptions, BrowserSpeakerOptions, ChatBase, ChatHistoryListProps, ChatHistoryStoreOptions, ChatRecord, ChatSummary, ComposerAttachment, ComposerModelChip, ComposerModelOption, ComposerNotice, ComposerProps, ComposerThinkingChip, ContextMeterProps, ConvertedFile, DownscaleOptions, ElicitationPromptProps, FileChipProps, FileChipsProps, FileKind, FilesPanelProps, GeneratedMediaProps, HtmlPreviewOptions, ImageSize, ImageThumbProps, ImageViewerProps, LearnedSkillsProps, LocalModelEngine, LocalModelLoadContext, LocalModelProgress, McpAppFrameProps, McpAppLineProps, MediaRecorderConstructorLike, MediaRecorderLike, MenuSection, MessageListProps, MicProblem, ModelLoadBarProps, NoticeTexts, PendingQuestion, PlanViewProps, QuestionOutcomeReason, QuestionPromptProps, QuestionQueue, QuestionQueueOptions, ReadAloudOptions, ReadAloudState, RecordedAudio, Recording, RecordingDeps, RecordingRecognizerOptions, RenderImageViewer, RenderSubagent, RenderToolCall, RunGoalOptions, SandboxedDocumentOptions, SandboxedFrameProps, ScrollMeasure, SlashCommand, SourceToken, SourceViewProps, SpeakText, SpeakableOptions, SpeechPlayback, SpeechRecognizerLike, SpeechSynthesisLike, SpeechUtteranceLike, SpeechVoiceLike, StartRecordingOptions, SteerIntent, StepListProps, SubagentRowProps, SubagentTreeProps, SynthesizeSpeech, ToolApprovalPromptProps, ToolCallRowProps, TranscribeAudio, TranscriptBlockProps, UsageBadgeProps, UseAgentOptions, UseAgentReturn, UseAudioRecorderOptions, UseAudioRecorderReturn, UseChatHistoryOptions, UseChatHistoryReturn, UseCredentialsReturn, UseLocalModelOptions, UseLocalModelReturn, UseReadAloudReturn, UseSpeechToTextOptions, UseSpeechToTextReturn, UseVirtualFilesReturn, UseWebLLMModelOptions, UseWebLLMModelReturn, ViewerImage, WebLLMModelFactory, WebSearchResultView, WebSearchView };
3554
+ export { ASK_USER_TOOL_NAME, ATTACHMENT_BOUNDS, 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, MemoryCard, MessageList, MicError, ModelLoadBar, ModelLoadState, PendingElicitation, PlanView, QUESTION_TIMEOUT_MS, QuestionPrompt, QuestionView, RECORDING_DEFAULT_MAX_MS, RECORDING_TYPES, RemoteRunView, SandboxedFrame, SourceView, SpeechOutputError, StepList, StepView, SubagentNode, SubagentRow, SubagentTree, SubagentView, ToolApprovalPrompt, ToolCallRow, ToolCallView, TranscriptBlock, TranscriptView, UsageBadge, UserNoteRow, UserNoteView, agentStateReducer, agentStatusOf, askUserOutputKept, askUserWith, attachmentKindOf, attachmentOverLimit, attachmentRefusal, attachmentTransformOf, attachmentsText, audioExtensionOf, audioTypeOf, buildSandboxedDocument, chatTitle, clampFrameHeight, createApprovalQueue, createAudioSpeaker, createBrowserSpeaker, createInitialAgentState, createQuestionQueue, createRecordingRecognizer, createWebLLMEngine, decisionNote, defaultLabels, downscaleImage, escapeAttribute, fileKindOf, fileNameOf, filterCommands, followsAfterResize, followsAfterScroll, formatClock, formatElapsed, imageExtensionOf, imageSizeOf, languageOfText, lessonsOf, linkedFilesOf, mediaFamilyOf, menuKeyTarget, menuSections, mergeChatRecord, mergeLabels, messageOverLimit, micProblemOf, micProblemText, newChatId, noticesOf, parseSlash, pendingApprovalsOf, pickRecordingType, questionChoiceOf, questionOtherOf, questionTimeoutOf, recordingSupported, sandboxTokens, sandboxedCsp, saveChat, scriptOfLanguage, scriptOfText, settleAudioDuration, speakableText, speechSynthesisSupported, splitForSpeech, startRecording, steerIntent, stopTracks, subagentTree, tokenizeHtml, unchangedSince, usageLine, useAgent, useAgentContext, useAudioRecorder, useChatHistory, useCredentials, useFollowScroll, useLabels, useLocalModel, useOptionalAgentContext, useReadAloud, useSpeechToText, useSpeechVoices, useVirtualFiles, useWebLLMModel, voiceFor, voiceMessageName, voicesOf, webSearchOf, withAttachments, withCspFirst, withPolicyFirst, withoutOwnWords };
3555
+ export type { AgentAction, AgentChatClassNames, AgentChatComponents, AgentChatProps, AgentChatSlots, AgentComposerProps, AgentLabels, AgentLabelsOverride, AgentLabelsProviderProps, AgentProviderProps, ApiKeyFormProps, AppRequestPromptProps, ApprovalModeSwitchProps, ApprovalQueue, ApproveOptions, AttachmentBounds, AttachmentOverLimit, AttachmentTexts, AttachmentTransform, AudioLike, AudioSpeakerOptions, BrowserSpeakerOptions, ChatBase, ChatHistoryListProps, ChatHistoryStoreOptions, ChatRecord, ChatSummary, ComposerAttachment, ComposerModelChip, ComposerModelOption, ComposerNotice, ComposerProps, ComposerThinkingChip, ContextMeterProps, ConvertedFile, ConvertedImage, DownscaleOptions, ElicitationPromptProps, FileChipProps, FileChipsProps, FileKind, FilesPanelProps, GeneratedMediaProps, HtmlPreviewOptions, ImageSize, ImageThumbProps, ImageViewerProps, LearnedSkillsProps, LocalModelEngine, LocalModelLoadContext, LocalModelProgress, McpAppFrameProps, McpAppLineProps, MediaRecorderConstructorLike, MediaRecorderLike, MemoryCardProps, MenuSection, MessageListProps, MicProblem, ModelLoadBarProps, NoticeTexts, PendingQuestion, PlanViewProps, QuestionOutcomeReason, QuestionPromptProps, QuestionQueue, QuestionQueueOptions, ReadAloudOptions, ReadAloudState, RecordedAudio, Recording, RecordingDeps, RecordingRecognizerOptions, RenderImageViewer, RenderSubagent, RenderToolCall, RunGoalOptions, SandboxedDocumentOptions, SandboxedFrameProps, ScrollMeasure, SlashCommand, SourceToken, SourceViewProps, SpeakText, SpeakableOptions, SpeechPlayback, SpeechRecognizerLike, SpeechScript, SpeechSynthesisLike, SpeechUtteranceLike, SpeechVoiceLike, StartRecordingOptions, SteerIntent, StepListProps, SubagentRowProps, SubagentTreeProps, SynthesizeSpeech, ToolApprovalPromptProps, ToolCallRowProps, TranscribeAudio, TranscriptBlockProps, UsageBadgeProps, UseAgentOptions, UseAgentReturn, UseAudioRecorderOptions, UseAudioRecorderReturn, UseChatHistoryOptions, UseChatHistoryReturn, UseCredentialsReturn, UseLocalModelOptions, UseLocalModelReturn, UseReadAloudReturn, UseSpeechToTextOptions, UseSpeechToTextReturn, UseVirtualFilesReturn, UseWebLLMModelOptions, UseWebLLMModelReturn, ViewerImage, WebLLMModelFactory, WebSearchResultView, WebSearchView };
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import * as react from 'react';
2
2
  import { DependencyList, ReactNode, RefObject, ComponentType, CSSProperties } from 'react';
3
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
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-DdzjMut9.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-DdzjMut9.js';
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-Dp6Fi6ZA.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-Dp6Fi6ZA.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
9
  /**
@@ -186,8 +186,10 @@ interface UseAgentReturn extends AgentUiState {
186
186
  /**
187
187
  * Say something to the conversation's run in another tab (`remote`): it reaches that run's
188
188
  * model at its next boundary, marked as from another tab. `false` when no such run is followed
189
- * or the text is empty. A message that tab refuses (or never answers) comes back in
190
- * `undelivered`.
189
+ * or the text is empty. Until that tab answers, the text is in `queued` marked
190
+ * `sentTo: 'another-tab'` (shown "waiting for the other tab to pick it up") - with no time
191
+ * limit: a tab the browser froze answers when it wakes. Taken, that run's own entry takes its
192
+ * place; refused, or that run ended without it, it comes back in `undelivered`.
191
193
  */
192
194
  sendRemote: (text: string) => boolean;
193
195
  /**
@@ -416,7 +418,9 @@ declare const unchangedSince: (messages: ChatMessage[], base: ChatBase | undefin
416
418
  * from here - that tab saves its own, unclipped copy. When another tab saved the chat after this
417
419
  * tab last read or wrote it (or saved a chat this tab never read), THAT record is the truth for
418
420
  * everything that is not this tab's own: this tab's own new messages - by identity, not by count,
419
- * so a reset or a trim here drops nothing there - go after it.
421
+ * so a reset or a trim here drops nothing there - go after it, each before a stored turn that
422
+ * began after its own (`ChatMessage.startedAt`: this tab saved its turn late, after another tab
423
+ * ran the next one and saved first). Without times, after it all.
420
424
  */
421
425
  declare const mergeChatRecord: (view: ChatRecord, stored: ChatRecord | undefined, base: ChatBase | undefined,
422
426
  /** The words of a title of attachments only (`chatTitle`). */
@@ -442,6 +446,8 @@ declare const saveChat: (store: ChatHistoryStore, view: ChatRecord, base: ChatBa
442
446
  * Several tabs: the list follows what other tabs of the site save (the store's `chats`
443
447
  * notices), the open chat is read again when another tab saved it and nothing runs here, and a
444
448
  * run followed from another tab (`agent.remote`) is never saved from here - its own tab saves it.
449
+ * A turn of this tab's is saved even when such a run reached it before the save began (a tab the
450
+ * browser froze, waking), and keeps its place among the other tab's turns (`mergeChatRecord`).
445
451
  */
446
452
  declare const useChatHistory: (agent: UseAgentReturn, options?: UseChatHistoryOptions) => UseChatHistoryReturn;
447
453
 
@@ -719,6 +725,23 @@ declare const speakableText: (markdown: string, options?: SpeakableOptions) => s
719
725
  * seconds; a provider takes a few thousand characters per call).
720
726
  */
721
727
  declare const splitForSpeech: (text: string, max?: number) => string[];
728
+ /** A writing system, as far as a voice needs to know: the letters it can read. */
729
+ type SpeechScript = 'latin' | 'cyrillic' | 'greek' | 'arabic' | 'hebrew' | 'han' | 'kana' | 'hangul' | 'devanagari' | 'thai' | 'georgian' | 'armenian';
730
+ /** The script a language (BCP-47) is written in: `sr-Latn` is Latin, `zh-*` Han, `ja` kana. */
731
+ declare const scriptOfLanguage: (lang: string) => SpeechScript;
732
+ /**
733
+ * The script most of a text's letters are written in (digits, signs and spaces do not count);
734
+ * a text with any kana is Japanese (it is mostly Han letters too). Undefined: no letters.
735
+ */
736
+ declare const scriptOfText: (text: string) => SpeechScript | undefined;
737
+ /**
738
+ * The language to read a text in: the first of `preferred` (the UI's language, then the
739
+ * browser's, `navigator.languages`) written in the text's script - so a Russian answer in an
740
+ * English interface is read in Russian, not spelled by an English voice -, else the script's
741
+ * usual language. A text without letters: the first preferred. Which of the languages of ONE
742
+ * script (English or French) cannot be told from the letters: the person's order decides.
743
+ */
744
+ declare const languageOfText: (text: string, preferred?: readonly (string | undefined)[]) => string | undefined;
722
745
  /** The slice of a `SpeechSynthesisVoice` used here. */
723
746
  interface SpeechVoiceLike {
724
747
  voiceURI: string;
@@ -728,7 +751,8 @@ interface SpeechVoiceLike {
728
751
  default?: boolean;
729
752
  }
730
753
  /**
731
- * The voice to read a language with: the person's (by `voiceURI`) while the browser has it; else
754
+ * The voice to read a language with: the person's (by `voiceURI`) while the browser has it and it
755
+ * reads that language's script; else
732
756
  * one of exactly that language (`pt-BR`), then of its base (`pt`) - a voice on the device before a
733
757
  * network one, the browser's default of the language first. Undefined: none for the language (the
734
758
  * browser then reads with its own default).
@@ -1320,6 +1344,16 @@ interface AgentLabels {
1320
1344
  notebookRevision: (n: number) => string;
1321
1345
  /** Before the sources a lesson came from. */
1322
1346
  notebookFrom: string;
1347
+ /** Before a fact that was just saved. */
1348
+ memorySaved: string;
1349
+ /** Before a fact that was just changed. */
1350
+ memoryUpdated: string;
1351
+ /** Before a fact that was just forgotten. */
1352
+ memoryForgotten: string;
1353
+ /** The card's button that takes it back. */
1354
+ memoryUndo: string;
1355
+ /** In place of the button once it was taken back. */
1356
+ memoryUndone: string;
1323
1357
  placeholder: string;
1324
1358
  listening: string;
1325
1359
  message: string;
@@ -1447,6 +1481,11 @@ interface AgentLabels {
1447
1481
  * run (`sessionBusy`) - in another tab, or in this one - to finish. Shown only while that lasts.
1448
1482
  */
1449
1483
  queuedForSession: (heldBy: 'another-tab' | 'this-tab') => string;
1484
+ /**
1485
+ * What this tab said to the conversation's run in another tab (`sendRemote`), while that tab has
1486
+ * not answered (it may be in the background, frozen by the browser): it is not refused.
1487
+ */
1488
+ queuedForOtherTab: string;
1450
1489
  /** Where a note landed: between tool calls / after a step / before the answer. */
1451
1490
  noteAt: Record<'round' | 'step' | 'final', string>;
1452
1491
  /** Messages the run ended without delivering, offered for sending. */
@@ -1931,6 +1970,28 @@ type AgentAction =
1931
1970
  texts: string[];
1932
1971
  keepQueued?: boolean;
1933
1972
  }
1973
+ /**
1974
+ * `sendRemote`: the text went to the conversation's run in another tab, which has not answered
1975
+ * yet - shown in `queued`, marked `sentTo: 'another-tab'`, until `remote-answer` with this `id`
1976
+ * (or that run's own `message.queued` for it, which takes its place).
1977
+ */
1978
+ | {
1979
+ type: 'remote-send';
1980
+ id: string;
1981
+ text: string;
1982
+ }
1983
+ /**
1984
+ * That tab's answer to `remote-send` `id`: `taken` (its run has it), `refused` (refused, or its
1985
+ * run ended without taking it - the text comes back in `undelivered`, to send again or drop), or
1986
+ * `unknown` (the watch that sent it was closed - another conversation is in view: nothing is
1987
+ * offered, as that tab may still take it). Either way the waiting entry goes.
1988
+ */
1989
+ | {
1990
+ type: 'remote-answer';
1991
+ id: string;
1992
+ text: string;
1993
+ answer: 'taken' | 'refused' | 'unknown';
1994
+ }
1934
1995
  /**
1935
1996
  * The user sent a goal and this tab's run is getting going: its turn is shown at once (a
1936
1997
  * user message and a pending answer), until the run's `run.start` takes its place.
@@ -2006,6 +2067,22 @@ interface ConvertedFile {
2006
2067
  text: string;
2007
2068
  /** Name of the text attachment (default: the file's name + ".md"). */
2008
2069
  name?: string;
2070
+ /** The attachment's note (default: `convertedFrom` - "converted from report.pdf"). */
2071
+ note?: string;
2072
+ /**
2073
+ * Pictures that go with the text (e.g. the pages of a scanned PDF): each is attached as an
2074
+ * image the composer took itself - downscaled, counted against `maxImages` / `maxTotalBytes`,
2075
+ * saved under `/attachments/` - and only when the model reads images (otherwise the refusal is
2076
+ * said and the text goes alone).
2077
+ */
2078
+ images?: ConvertedImage[];
2079
+ }
2080
+ /** A picture a `convertFile` made (`ConvertedFile.images`). */
2081
+ interface ConvertedImage {
2082
+ /** Its attachment's name, e.g. "scan-page-1.jpg". */
2083
+ name: string;
2084
+ /** The encoded picture; its `type` is the media type (an `image/*`). */
2085
+ blob: Blob;
2009
2086
  }
2010
2087
  interface AgentComposerProps {
2011
2088
  /** The agent from `useAgent()` (or `useAgentContext()`). */
@@ -2494,7 +2571,12 @@ declare const StepList: ({ steps, subagents, approvals, notes, showNotes, onStop
2494
2571
  interface ReadAloudOptions {
2495
2572
  /** The engine: `createBrowserSpeaker()` (the device's voices) or `createAudioSpeaker(...)`. Keep it stable. */
2496
2573
  speak: SpeakText;
2497
- /** The answers' language (BCP-47): the browser's voice is picked for it. */
2574
+ /**
2575
+ * The interface's language (BCP-47), the first choice for a text in its script: each answer is
2576
+ * read in ITS language - the script of its letters decides (`languageOfText`: this, then the
2577
+ * browser's languages, then the script's usual one), so a Russian answer in an English
2578
+ * interface is read by a Russian voice.
2579
+ */
2498
2580
  lang?: string;
2499
2581
  /** What is read of an answer. Default: its Markdown as words (`speakableText`, code left out). */
2500
2582
  textOf?: (message: ChatMessage) => string;
@@ -2571,6 +2653,15 @@ interface MessageListProps {
2571
2653
  readAloud?: ReadAloudOptions;
2572
2654
  /** Tool calls inside the activity. */
2573
2655
  renderToolCall?: RenderToolCall;
2656
+ /**
2657
+ * A tool call as a card in the answer itself - outside the folded activity, above the text -
2658
+ * for the calls the user should see without opening it (a fact remembered, an order placed):
2659
+ * return a node for those (`<MemoryCard>` is one), `null` / `undefined` for the rest. Called for
2660
+ * every tool call of an assistant turn, in order; nothing is drawn without it.
2661
+ */
2662
+ renderToolCard?: (call: ToolCallView, message: ChatMessage) => ReactNode;
2663
+ /** Draw the tool cards (default true; needs `renderToolCard`). */
2664
+ showToolCards?: boolean;
2574
2665
  /**
2575
2666
  * The MCP Apps an answer's tool calls came with (`message.apps`), drawn between its activity
2576
2667
  * and its text. `<AgentChat mcpApps>` passes `<McpAppFrame>`; without this prop none is drawn.
@@ -2613,7 +2704,7 @@ declare const AttachmentView: ({ attachment: a, files, labels, }: {
2613
2704
  * subagents, consent decisions — and the tokens it spent by kind. Every part
2614
2705
  * can be hidden, relabelled or rendered by the host.
2615
2706
  */
2616
- 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, readAloud, labels, className, }: MessageListProps) => react.JSX.Element | null;
2707
+ 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, renderToolCard, showToolCards, renderApp, showApps, imageViewer, renderImageViewer, readAloud, labels, className, }: MessageListProps) => react.JSX.Element | null;
2617
2708
 
2618
2709
  interface QuestionPromptProps {
2619
2710
  /**
@@ -2868,6 +2959,10 @@ interface AgentChatProps {
2868
2959
  */
2869
2960
  readAloud?: MessageListProps['readAloud'];
2870
2961
  renderToolCall?: RenderToolCall;
2962
+ /** A tool call as a card in the answer, outside the activity (`<MemoryCard>`; see `MessageList`). */
2963
+ renderToolCard?: MessageListProps['renderToolCard'];
2964
+ /** Draw the tool cards (default true; needs `renderToolCard`). */
2965
+ showToolCards?: boolean;
2871
2966
  /** A node of the subagent tree. */
2872
2967
  renderSubagent?: RenderSubagent;
2873
2968
  /** A generated image / audio file. */
@@ -2999,6 +3094,34 @@ interface LearnedSkillsProps {
2999
3094
  */
3000
3095
  declare const LearnedSkills: ({ controller, lessons, onForget, showSources, empty, hideTitle, labels, className, }: LearnedSkillsProps) => react.JSX.Element;
3001
3096
 
3097
+ interface MemoryCardProps {
3098
+ /** What happened: a fact saved, a fact changed, a fact forgotten. */
3099
+ kind: 'saved' | 'updated' | 'forgotten';
3100
+ /** The fact: as it was saved or changed to, or as it was when it was forgotten. Drawn as text. */
3101
+ text: string;
3102
+ /**
3103
+ * Take it back - the host does the work (delete the fact saved, put back the one forgotten or
3104
+ * changed). Absent: no button.
3105
+ */
3106
+ onUndo?: () => void | Promise<unknown>;
3107
+ /**
3108
+ * It has been taken back: the host knows (its store no longer has the fact saved, or has the one
3109
+ * forgotten again) - "Undone" in place of the button, even after a reload.
3110
+ */
3111
+ undone?: boolean;
3112
+ /** Why the last Undo did not go through, in the host's words (shown under the text). */
3113
+ problem?: string;
3114
+ labels?: AgentLabelsOverride;
3115
+ className?: string;
3116
+ }
3117
+ /**
3118
+ * One fact the host's app remembered, changed or forgot about the user, as a card in the answer -
3119
+ * its text and an Undo. The package keeps no memory of its own: the host decides which tool calls
3120
+ * are memory (`<AgentChat renderToolCard>`), what Undo does and when it is undone. The text is a
3121
+ * text node, never markup.
3122
+ */
3123
+ declare const MemoryCard: ({ kind, text, onUndo, undone, problem, labels, className, }: MemoryCardProps) => react.JSX.Element;
3124
+
3002
3125
  interface ComposerProps {
3003
3126
  /** Called with the trimmed text when the user submits. */
3004
3127
  onSubmit: (text: string) => void;
@@ -3428,5 +3551,5 @@ interface AppRequestPromptProps {
3428
3551
  */
3429
3552
  declare const AppRequestPrompt: ({ requests, onAnswer, renderRequest, labels, className, }: AppRequestPromptProps) => react.JSX.Element | null;
3430
3553
 
3431
- export { ASK_USER_TOOL_NAME, ATTACHMENT_BOUNDS, 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, MicError, ModelLoadBar, ModelLoadState, PendingElicitation, PlanView, QUESTION_TIMEOUT_MS, QuestionPrompt, QuestionView, RECORDING_DEFAULT_MAX_MS, RECORDING_TYPES, RemoteRunView, SandboxedFrame, SourceView, SpeechOutputError, StepList, StepView, SubagentNode, SubagentRow, SubagentTree, SubagentView, ToolApprovalPrompt, ToolCallRow, ToolCallView, TranscriptBlock, TranscriptView, UsageBadge, UserNoteRow, UserNoteView, agentStateReducer, agentStatusOf, askUserOutputKept, askUserWith, attachmentKindOf, attachmentOverLimit, attachmentRefusal, attachmentTransformOf, attachmentsText, audioExtensionOf, audioTypeOf, buildSandboxedDocument, chatTitle, clampFrameHeight, createApprovalQueue, createAudioSpeaker, createBrowserSpeaker, createInitialAgentState, createQuestionQueue, createRecordingRecognizer, createWebLLMEngine, decisionNote, defaultLabels, downscaleImage, escapeAttribute, fileKindOf, fileNameOf, filterCommands, followsAfterResize, followsAfterScroll, formatClock, formatElapsed, imageExtensionOf, imageSizeOf, lessonsOf, linkedFilesOf, mediaFamilyOf, menuKeyTarget, menuSections, mergeChatRecord, mergeLabels, messageOverLimit, micProblemOf, micProblemText, newChatId, noticesOf, parseSlash, pendingApprovalsOf, pickRecordingType, questionChoiceOf, questionOtherOf, questionTimeoutOf, recordingSupported, sandboxTokens, sandboxedCsp, saveChat, settleAudioDuration, speakableText, speechSynthesisSupported, splitForSpeech, startRecording, steerIntent, stopTracks, subagentTree, tokenizeHtml, unchangedSince, usageLine, useAgent, useAgentContext, useAudioRecorder, useChatHistory, useCredentials, useFollowScroll, useLabels, useLocalModel, useOptionalAgentContext, useReadAloud, useSpeechToText, useSpeechVoices, useVirtualFiles, useWebLLMModel, voiceFor, voiceMessageName, voicesOf, webSearchOf, withAttachments, withCspFirst, withPolicyFirst, withoutOwnWords };
3432
- export type { AgentAction, AgentChatClassNames, AgentChatComponents, AgentChatProps, AgentChatSlots, AgentComposerProps, AgentLabels, AgentLabelsOverride, AgentLabelsProviderProps, AgentProviderProps, ApiKeyFormProps, AppRequestPromptProps, ApprovalModeSwitchProps, ApprovalQueue, ApproveOptions, AttachmentBounds, AttachmentOverLimit, AttachmentTexts, AttachmentTransform, AudioLike, AudioSpeakerOptions, BrowserSpeakerOptions, ChatBase, ChatHistoryListProps, ChatHistoryStoreOptions, ChatRecord, ChatSummary, ComposerAttachment, ComposerModelChip, ComposerModelOption, ComposerNotice, ComposerProps, ComposerThinkingChip, ContextMeterProps, ConvertedFile, DownscaleOptions, ElicitationPromptProps, FileChipProps, FileChipsProps, FileKind, FilesPanelProps, GeneratedMediaProps, HtmlPreviewOptions, ImageSize, ImageThumbProps, ImageViewerProps, LearnedSkillsProps, LocalModelEngine, LocalModelLoadContext, LocalModelProgress, McpAppFrameProps, McpAppLineProps, MediaRecorderConstructorLike, MediaRecorderLike, MenuSection, MessageListProps, MicProblem, ModelLoadBarProps, NoticeTexts, PendingQuestion, PlanViewProps, QuestionOutcomeReason, QuestionPromptProps, QuestionQueue, QuestionQueueOptions, ReadAloudOptions, ReadAloudState, RecordedAudio, Recording, RecordingDeps, RecordingRecognizerOptions, RenderImageViewer, RenderSubagent, RenderToolCall, RunGoalOptions, SandboxedDocumentOptions, SandboxedFrameProps, ScrollMeasure, SlashCommand, SourceToken, SourceViewProps, SpeakText, SpeakableOptions, SpeechPlayback, SpeechRecognizerLike, SpeechSynthesisLike, SpeechUtteranceLike, SpeechVoiceLike, StartRecordingOptions, SteerIntent, StepListProps, SubagentRowProps, SubagentTreeProps, SynthesizeSpeech, ToolApprovalPromptProps, ToolCallRowProps, TranscribeAudio, TranscriptBlockProps, UsageBadgeProps, UseAgentOptions, UseAgentReturn, UseAudioRecorderOptions, UseAudioRecorderReturn, UseChatHistoryOptions, UseChatHistoryReturn, UseCredentialsReturn, UseLocalModelOptions, UseLocalModelReturn, UseReadAloudReturn, UseSpeechToTextOptions, UseSpeechToTextReturn, UseVirtualFilesReturn, UseWebLLMModelOptions, UseWebLLMModelReturn, ViewerImage, WebLLMModelFactory, WebSearchResultView, WebSearchView };
3554
+ export { ASK_USER_TOOL_NAME, ATTACHMENT_BOUNDS, 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, MemoryCard, MessageList, MicError, ModelLoadBar, ModelLoadState, PendingElicitation, PlanView, QUESTION_TIMEOUT_MS, QuestionPrompt, QuestionView, RECORDING_DEFAULT_MAX_MS, RECORDING_TYPES, RemoteRunView, SandboxedFrame, SourceView, SpeechOutputError, StepList, StepView, SubagentNode, SubagentRow, SubagentTree, SubagentView, ToolApprovalPrompt, ToolCallRow, ToolCallView, TranscriptBlock, TranscriptView, UsageBadge, UserNoteRow, UserNoteView, agentStateReducer, agentStatusOf, askUserOutputKept, askUserWith, attachmentKindOf, attachmentOverLimit, attachmentRefusal, attachmentTransformOf, attachmentsText, audioExtensionOf, audioTypeOf, buildSandboxedDocument, chatTitle, clampFrameHeight, createApprovalQueue, createAudioSpeaker, createBrowserSpeaker, createInitialAgentState, createQuestionQueue, createRecordingRecognizer, createWebLLMEngine, decisionNote, defaultLabels, downscaleImage, escapeAttribute, fileKindOf, fileNameOf, filterCommands, followsAfterResize, followsAfterScroll, formatClock, formatElapsed, imageExtensionOf, imageSizeOf, languageOfText, lessonsOf, linkedFilesOf, mediaFamilyOf, menuKeyTarget, menuSections, mergeChatRecord, mergeLabels, messageOverLimit, micProblemOf, micProblemText, newChatId, noticesOf, parseSlash, pendingApprovalsOf, pickRecordingType, questionChoiceOf, questionOtherOf, questionTimeoutOf, recordingSupported, sandboxTokens, sandboxedCsp, saveChat, scriptOfLanguage, scriptOfText, settleAudioDuration, speakableText, speechSynthesisSupported, splitForSpeech, startRecording, steerIntent, stopTracks, subagentTree, tokenizeHtml, unchangedSince, usageLine, useAgent, useAgentContext, useAudioRecorder, useChatHistory, useCredentials, useFollowScroll, useLabels, useLocalModel, useOptionalAgentContext, useReadAloud, useSpeechToText, useSpeechVoices, useVirtualFiles, useWebLLMModel, voiceFor, voiceMessageName, voicesOf, webSearchOf, withAttachments, withCspFirst, withPolicyFirst, withoutOwnWords };
3555
+ export type { AgentAction, AgentChatClassNames, AgentChatComponents, AgentChatProps, AgentChatSlots, AgentComposerProps, AgentLabels, AgentLabelsOverride, AgentLabelsProviderProps, AgentProviderProps, ApiKeyFormProps, AppRequestPromptProps, ApprovalModeSwitchProps, ApprovalQueue, ApproveOptions, AttachmentBounds, AttachmentOverLimit, AttachmentTexts, AttachmentTransform, AudioLike, AudioSpeakerOptions, BrowserSpeakerOptions, ChatBase, ChatHistoryListProps, ChatHistoryStoreOptions, ChatRecord, ChatSummary, ComposerAttachment, ComposerModelChip, ComposerModelOption, ComposerNotice, ComposerProps, ComposerThinkingChip, ContextMeterProps, ConvertedFile, ConvertedImage, DownscaleOptions, ElicitationPromptProps, FileChipProps, FileChipsProps, FileKind, FilesPanelProps, GeneratedMediaProps, HtmlPreviewOptions, ImageSize, ImageThumbProps, ImageViewerProps, LearnedSkillsProps, LocalModelEngine, LocalModelLoadContext, LocalModelProgress, McpAppFrameProps, McpAppLineProps, MediaRecorderConstructorLike, MediaRecorderLike, MemoryCardProps, MenuSection, MessageListProps, MicProblem, ModelLoadBarProps, NoticeTexts, PendingQuestion, PlanViewProps, QuestionOutcomeReason, QuestionPromptProps, QuestionQueue, QuestionQueueOptions, ReadAloudOptions, ReadAloudState, RecordedAudio, Recording, RecordingDeps, RecordingRecognizerOptions, RenderImageViewer, RenderSubagent, RenderToolCall, RunGoalOptions, SandboxedDocumentOptions, SandboxedFrameProps, ScrollMeasure, SlashCommand, SourceToken, SourceViewProps, SpeakText, SpeakableOptions, SpeechPlayback, SpeechRecognizerLike, SpeechScript, SpeechSynthesisLike, SpeechUtteranceLike, SpeechVoiceLike, StartRecordingOptions, SteerIntent, StepListProps, SubagentRowProps, SubagentTreeProps, SynthesizeSpeech, ToolApprovalPromptProps, ToolCallRowProps, TranscribeAudio, TranscriptBlockProps, UsageBadgeProps, UseAgentOptions, UseAgentReturn, UseAudioRecorderOptions, UseAudioRecorderReturn, UseChatHistoryOptions, UseChatHistoryReturn, UseCredentialsReturn, UseLocalModelOptions, UseLocalModelReturn, UseReadAloudReturn, UseSpeechToTextOptions, UseSpeechToTextReturn, UseVirtualFilesReturn, UseWebLLMModelOptions, UseWebLLMModelReturn, ViewerImage, WebLLMModelFactory, WebSearchResultView, WebSearchView };