@dudko.dev/agent-web 0.0.49 → 0.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +49 -4
  2. package/dist/agent-web.js +167 -159
  3. package/dist/agent-web.js.map +1 -1
  4. package/dist/{chunk-3V27UZT6.js → chunk-DOWC4CFZ.js} +257 -3
  5. package/dist/chunk-DOWC4CFZ.js.map +1 -0
  6. package/dist/{chunk-6XHCPSZE.js → chunk-EUJWS42C.js} +56 -5
  7. package/dist/{chunk-6XHCPSZE.js.map → chunk-EUJWS42C.js.map} +1 -1
  8. package/dist/{chunk-IT77BVAD.js → chunk-HXUR2SG5.js} +2 -2
  9. package/dist/{chunk-JTZEUPIG.js → chunk-NUL6QEAX.js} +49 -49
  10. package/dist/chunk-NUL6QEAX.js.map +1 -0
  11. package/dist/chunk-R5VCITT3.js +192 -0
  12. package/dist/chunk-R5VCITT3.js.map +1 -0
  13. package/dist/{chunk-7Y5UC6L7.js → chunk-SVGIGIRR.js} +3 -3
  14. package/dist/fit-reference-worker.cjs +158 -0
  15. package/dist/fit-reference-worker.cjs.map +1 -0
  16. package/dist/fit-reference-worker.d.cts +1 -0
  17. package/dist/fit-reference-worker.d.ts +1 -0
  18. package/dist/fit-reference-worker.js +16 -0
  19. package/dist/fit-reference-worker.js.map +1 -0
  20. package/dist/index.cjs +1333 -343
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +98 -52
  23. package/dist/index.d.ts +98 -52
  24. package/dist/index.js +546 -62
  25. package/dist/index.js.map +1 -1
  26. package/dist/mcp.js +2 -2
  27. package/dist/media-fit-worker-CFK2z8LF.d.cts +149 -0
  28. package/dist/media-fit-worker-CFK2z8LF.d.ts +149 -0
  29. package/dist/{sandbox-IGTCMOOX.js → sandbox-X6T4ZOEQ.js} +3 -3
  30. package/dist/secrets.js +3 -3
  31. package/dist/{webllm-BEL5A4OF.js → webllm-EZSJGU6P.js} +2 -2
  32. package/package.json +14 -2
  33. package/dist/chunk-3V27UZT6.js.map +0 -1
  34. package/dist/chunk-JTZEUPIG.js.map +0 -1
  35. /package/dist/{chunk-IT77BVAD.js.map → chunk-HXUR2SG5.js.map} +0 -0
  36. /package/dist/{chunk-7Y5UC6L7.js.map → chunk-SVGIGIRR.js.map} +0 -0
  37. /package/dist/{sandbox-IGTCMOOX.js.map → sandbox-X6T4ZOEQ.js.map} +0 -0
  38. /package/dist/{webllm-BEL5A4OF.js.map → webllm-EZSJGU6P.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -3,6 +3,8 @@ import { P as McpSkillConsentView, B as McpElicitationSchema, y as McpElicitatio
3
3
  export { g as MCP_APPS_EXTENSION, k as MCP_APP_MAX_HTML_CHARS, l as MCP_APP_MAX_RESULT_CHARS, m as MCP_APP_MIME_TYPE, V as MCP_SKILLS_EXTENSION, W as MCP_SKILLS_MAX_PER_SERVER, X as MCP_SKILLS_MAX_TOTAL, Y as MCP_SKILL_BODY_MAX_CHARS, Z as MCP_SKILL_CONSENTS, _ as MCP_SKILL_CONSENT_DEFAULT, $ as MCP_SKILL_DESCRIPTION_MAX_CHARS, a0 as MCP_SKILL_DIRECTORY_ENTRIES_MAX, a1 as MCP_SKILL_FILE_MAX_CHARS, a2 as MCP_SKILL_MAX_RESOURCES, a3 as MCP_SKILL_MAX_TOTAL_BYTES, a4 as MCP_SKILL_SNAPSHOTS_MAX_BYTES, a5 as MCP_SKILL_SNAPSHOT_MAX_DEPTH, a6 as MCP_SKILL_SNAPSHOT_MAX_DIRECTORIES, a7 as MCP_SKILL_URI_MAX_CHARS, q as McpAppCsp, r as McpAppPermissions, b as McpAppResource, c as McpAppVisibility, x as McpElicitationFieldSchema, a8 as McpSkillsOptions, f as McpSkillsSetting, a9 as SkillDirectoryListing, G as mcpAppOrigin, aa as mcpSkillEntryRefusal, ab as mcpSkillPreamble, ac as mcpSkillUriRefusal } from './skills-ufoyTJ-B.cjs';
4
4
  import { PipelineEvent, PipelineNode, PipelineDefinition, PipelineResult, PipelineNodeRunner } from './pipeline-engine.cjs';
5
5
  export { PIPELINE_LIMITS, PIPELINE_ROUTER_SYSTEM, PipelineAbortBehaviour, PipelineCondition, PipelineEdge, PipelineGraphRunOptions, PipelineIssue, PipelineNodeContext, PipelineNodeError, PipelineNodeEvent, PipelineNodeInput, PipelineNodeOutput, PipelineNodeSource, PipelinePlan, PipelineRoute, PipelineStop, PipelineTraceEntry, PipelineUsage, PipelineValidation, PipelineValidationError, matchPipelineRoute, normalizePipeline, preparePipeline, renderPipelineNodeInput, renderPipelineRoutePrompt, runPipelineGraph, testPipelineCondition, validatePipeline } from './pipeline-engine.cjs';
6
+ import { I as IReferenceUse, M as MediaFitReference, a as IReferenceResult } from './media-fit-worker-CFK2z8LF.cjs';
7
+ export { F as FitReferenceWorker, b as FitReferenceWorkerScope, G as GENERATE_IMAGE_TOOL, c as GENERATE_SPEECH_TOOL, d as IFitReferenceOptions, e as IFittedReference, f as IImageSize, g as IMediaUsage, h as IReferenceBounds, i as IReferencePicture, j as MEDIA_AUDIO_TYPES, k as MEDIA_DEFAULT_MAX_CALLS, l as MEDIA_FIT_TIMEOUT_MS, m as MEDIA_FOLDER, n as MEDIA_IMAGE_TYPES, o as MEDIA_MAX_ATTACHED_AUDIO, p as MEDIA_MAX_AUDIO_INPUT_BYTES, q as MEDIA_MAX_IMAGE_BYTES, r as MEDIA_MAX_PROMPT_CHARS, s as MEDIA_MAX_REFERENCE_BYTES, t as MEDIA_MAX_REFERENCE_IMAGES, u as MEDIA_MAX_REFERENCE_SIDE, v as MEDIA_MAX_REFERENCE_SOURCE_BYTES, w as MEDIA_MAX_REFERENCE_SOURCE_PIXELS, x as MEDIA_MAX_REFERENCE_TOTAL_BYTES, y as MEDIA_MAX_SPEECH_BYTES, z as MEDIA_MAX_SPEECH_CHARS, A as MEDIA_MAX_TRANSCRIPT_CHARS, B as MEDIA_REFERENCE_TYPES, C as MEDIA_TIMEOUT_MS, D as MediaBudgetError, E as MediaError, H as MediaKind, S as ServeFitReferenceOptions, T as TRANSCRIBE_AUDIO_TOOL, J as acceptMedia, K as acceptReference, L as acceptReferenceSource, N as fitReferenceImage, O as fitReferenceInWorker, P as imageDimensions, Q as mediaUsageOf, R as serveFitReferenceWorker, U as sniffMediaType, V as wrapTranscript } from './media-fit-worker-CFK2z8LF.cjs';
6
8
  import { CredentialStore } from './secrets.cjs';
7
9
  export { EncryptedBlob, MemoryCredentialStore, VaultCredentialStore, decryptJSON, encryptJSON, getOrCreateVaultKey } from './secrets.cjs';
8
10
  import { A as AgentToolSet, a as AgentTool } from './types-DwSMj_Xs.cjs';
@@ -1011,7 +1013,9 @@ type AgentEventBody =
1011
1013
  /**
1012
1014
  * A media tool (`config.media`) wrote a file to the virtual file system: `path` is where (read
1013
1015
  * it with `vfs.readDataUrl(path)` to show the picture or play the audio), `mediaType` what its
1014
- * bytes are, `bytes` its size. The bytes themselves are never in an event.
1016
+ * bytes are, `bytes` its size. `references`: a `generate_image` call with `images` - whether
1017
+ * those pictures were sent (`used`; false: the model takes none), how many and their paths.
1018
+ * The bytes themselves are never in an event.
1015
1019
  */
1016
1020
  | {
1017
1021
  type: 'media.generated';
@@ -1020,6 +1024,7 @@ type AgentEventBody =
1020
1024
  mediaType: string;
1021
1025
  bytes: number;
1022
1026
  model: string;
1027
+ references?: IReferenceUse;
1023
1028
  step?: IPlanStep;
1024
1029
  }
1025
1030
  /**
@@ -1448,14 +1453,37 @@ interface SessionWatch {
1448
1453
  readonly state: SessionRunState;
1449
1454
  /**
1450
1455
  * Say something to the run in the other tab: it reaches the model at the run's next boundary,
1451
- * as `RunControl.send` does there. Resolves true when that tab took it; false when nothing
1452
- * runs, the run has no `control`, the text is empty or over `RELAY_MAX_SEND_CHARS`, the run
1453
- * already took `RELAY_MAX_SENDS`, or no answer came.
1456
+ * as `RunControl.send` does there. The answer is THAT tab's, and nothing else decides it while
1457
+ * the run goes:
1458
+ *
1459
+ * - `true` when that tab took the message (its acknowledgement);
1460
+ * - `false` when it refused it (the run has no `control`, already took `RELAY_MAX_SENDS`, or is
1461
+ * finishing), or when the run ENDED without taking it - its tab said so (`done`, `stopped`), or
1462
+ * nobody holds the session any more (`gone`: the tab closed or crashed). One tab's messages
1463
+ * keep their order and it answers a message before it says its run is over, so an end with no
1464
+ * answer before it means that run never took it.
1465
+ *
1466
+ * There is no time limit while the run's tab holds the session: a tab the browser froze in the
1467
+ * background (a phone does that to every tab out of sight) takes the message when it wakes, so
1468
+ * "no answer yet" is not a refusal - the promise stays pending, and a host that showed the text
1469
+ * as refused would hand it to a second run. Only the tab that announced the run decides: an
1470
+ * answer, or an end, posted under another tab's id is ignored (any page of the origin can post).
1471
+ *
1472
+ * Resolves `false` at once when nothing runs or the text is empty or over
1473
+ * `RELAY_MAX_SEND_CHARS`, and on `close()` - then the other tab may still take it: this watch no
1474
+ * longer knows. Where the browser cannot be asked who holds the session (no
1475
+ * `navigator.locks.query()`), a run whose tab closed is never seen to end, and a message to it
1476
+ * waits until `close()`.
1454
1477
  */
1455
1478
  send(text: string): Promise<boolean>;
1456
- /** Stop the run in the other tab. Resolves true when that tab took the request. */
1479
+ /**
1480
+ * Stop the run in the other tab. Resolves true when that tab took the request, false when it
1481
+ * refused or no answer came in 3 s. A stop may keep that bound where a message may not: it is
1482
+ * idempotent - a stop a frozen tab takes late stops the run it was meant for, and asking again
1483
+ * stops it once.
1484
+ */
1457
1485
  stop(): Promise<boolean>;
1458
- /** Stop watching. */
1486
+ /** Stop watching. A message still waiting for its answer resolves `false`. */
1459
1487
  close(): void;
1460
1488
  }
1461
1489
  /**
@@ -2543,6 +2571,26 @@ type MediaTranscriptionModel = Exclude<TranscriptionModel, string>;
2543
2571
  interface IMediaConfig {
2544
2572
  /** Mounts `generate_image` (a prompt becomes an image file in the workspace). */
2545
2573
  imageModel?: MediaImageModel | IMediaModelSpec;
2574
+ /**
2575
+ * Whether the image model takes reference pictures (`generate_image`'s `images`: files of the
2576
+ * workspace it SEES - the person's photo, "like this"). Default: what the model object declares
2577
+ * (`supportsFileInputs`, the AI SDK's own capability; unknown counts as no). When it takes none,
2578
+ * a call with `images` makes the picture from the text alone and its result says so.
2579
+ */
2580
+ imageInputs?: boolean;
2581
+ /**
2582
+ * Make a reference picture that is over the bounds (over 4096 px on its longer side, over 8 MiB,
2583
+ * or the pictures of a call over 12 MiB together) small enough to send, instead of refusing it.
2584
+ * Called with a COPY of the picture's bytes and its size in pixels, only for a PNG / JPEG / WebP
2585
+ * of the workspace within the source bounds (50 MiB, 200 MP - read from its header, so nothing
2586
+ * larger is ever decoded); its answer is checked again by the same guards. The file in the
2587
+ * workspace is never changed. `fitReferenceImage` does it with the browser's own codecs; run it
2588
+ * in a Web Worker (`fitReferenceInWorker`) so the page never waits on an encode. Default: none -
2589
+ * a picture over the bounds is refused.
2590
+ */
2591
+ fitReference?: MediaFitReference;
2592
+ /** One call of `fitReference`, in ms (its `signal` is aborted then). Default 30 000. */
2593
+ fitTimeoutMs?: number;
2546
2594
  /** Mounts `generate_speech` (text becomes an audio file in the workspace). */
2547
2595
  speechModel?: MediaSpeechModel | IMediaModelSpec;
2548
2596
  /**
@@ -2580,6 +2628,11 @@ interface IMediaFile {
2580
2628
  path: string;
2581
2629
  mediaType: string;
2582
2630
  bytes: number;
2631
+ /**
2632
+ * `generate_image` called with `images`: whether they were sent (`used`), how many, which
2633
+ * paths, and - when they were not - the sentence the model reads. Absent without `images`.
2634
+ */
2635
+ references?: IReferenceResult;
2583
2636
  }
2584
2637
  /** What `transcribe_audio` returns. */
2585
2638
  interface ITranscription {
@@ -3547,6 +3600,14 @@ interface RunResult {
3547
3600
  * stopped or ended). Send them as the next run. Empty when everything was delivered.
3548
3601
  */
3549
3602
  undelivered?: string[];
3603
+ /**
3604
+ * The runner's record of what the run DID - `[done: ...]`: each tool it called and how the calls
3605
+ * ended, the files written or deleted, the media made (and whether generate_image's reference
3606
+ * pictures were used), the helpers, whether a question was answered - as the session memory keeps
3607
+ * it on the assistant's message (see `withActionRecord`). Absent when no tool ran. A stopped or
3608
+ * failed run has it too: what it did before it ended.
3609
+ */
3610
+ actionRecord?: string;
3550
3611
  }
3551
3612
  interface CompactOptions {
3552
3613
  /** Session to compact (default: the config's sessionId). */
@@ -4239,6 +4300,7 @@ declare const fileToolBindingOf: (t: unknown) => FileToolBinding | undefined;
4239
4300
  * Tools that give the agent the virtual file system: list, read, write and
4240
4301
  * delete. Listing and reading are marked read-only, so the `ask-writes`
4241
4302
  * consent mode lets them through and asks before writes and deletes.
4303
+ * `fs_read` takes an optional line range (`startLine` / `endLine`) for part of a long file.
4242
4304
  */
4243
4305
  declare const createFileTools: (vfs: VirtualFileSystem, opts?: FileToolsOptions) => ToolSet;
4244
4306
 
@@ -4675,50 +4737,6 @@ declare const defineTool: <INPUT = unknown, OUTPUT = unknown>(config: Tool<INPUT
4675
4737
  readOnly?: boolean;
4676
4738
  }) => AgentTool;
4677
4739
 
4678
- declare const GENERATE_IMAGE_TOOL = "generate_image";
4679
- declare const GENERATE_SPEECH_TOOL = "generate_speech";
4680
- declare const TRANSCRIBE_AUDIO_TOOL = "transcribe_audio";
4681
- type MediaKind = 'image' | 'speech' | 'transcription';
4682
- declare const MEDIA_DEFAULT_MAX_CALLS = 8;
4683
- declare const MEDIA_TIMEOUT_MS = 120000;
4684
- declare const MEDIA_MAX_IMAGE_BYTES: number;
4685
- declare const MEDIA_MAX_SPEECH_BYTES: number;
4686
- declare const MEDIA_MAX_AUDIO_INPUT_BYTES: number;
4687
- declare const MEDIA_MAX_PROMPT_CHARS = 4000;
4688
- declare const MEDIA_MAX_SPEECH_CHARS = 4000;
4689
- declare const MEDIA_MAX_TRANSCRIPT_CHARS = 20000;
4690
- declare const MEDIA_MAX_ATTACHED_AUDIO = 4;
4691
- declare const MEDIA_FOLDER = "media";
4692
- declare class MediaError extends Error {
4693
- constructor(message: string);
4694
- toJSON(): string;
4695
- }
4696
- declare class MediaBudgetError extends MediaError {
4697
- constructor(cap: number);
4698
- }
4699
- declare const MEDIA_IMAGE_TYPES: Readonly<Record<string, string>>;
4700
- declare const MEDIA_AUDIO_TYPES: Readonly<Record<string, string>>;
4701
- declare const sniffMediaType: (bytes: Uint8Array) => string | undefined;
4702
- interface IAcceptedMedia {
4703
- mediaType: string;
4704
- ext: string;
4705
- }
4706
- declare const acceptMedia: (family: "image" | "audio", bytes: Uint8Array, maxBytes: number, what: string) => IAcceptedMedia;
4707
- interface IMediaUsage {
4708
- mediaCalls: number;
4709
- imagesGenerated: number;
4710
- speechCharacters: number;
4711
- transcriptionSeconds: number;
4712
- }
4713
- declare const mediaUsageOf: (usage: Partial<IMediaUsage> | undefined) => IMediaUsage | undefined;
4714
- interface ITranscriptBlock {
4715
- name: string;
4716
- text: string;
4717
- language?: string;
4718
- durationInSeconds?: number;
4719
- }
4720
- declare const wrapTranscript: (block: ITranscriptBlock) => string;
4721
-
4722
4740
  /**
4723
4741
  * Render a ToolSet into a plain-text catalogue for the prompted/salvage path:
4724
4742
  * `- name(hint): description`. The hint comes from `defineTool({ promptHint })`
@@ -4876,12 +4894,40 @@ declare class IndexedDBStore implements ContextStore {
4876
4894
  constructor(opts?: IndexedDBStoreOptions);
4877
4895
  load(sessionId: string): Promise<StoredMessage[]>;
4878
4896
  replace(sessionId: string, messages: StoredMessage[]): Promise<void>;
4897
+ /**
4898
+ * Read the session and write it with `message` added in ONE readwrite transaction: two appends
4899
+ * (a message the user sent during a run, written without waiting, and the answer after it)
4900
+ * cannot both read the same transcript and drop each other's message. They land in the order
4901
+ * they were made.
4902
+ */
4879
4903
  append(sessionId: string, message: StoredMessage): Promise<void>;
4880
4904
  clear(sessionId: string): Promise<void>;
4881
4905
  /** List all stored session ids. */
4882
4906
  listSessions(): Promise<string[]>;
4883
4907
  }
4884
4908
 
4909
+ /** The whole record at most, in characters (UTF-16 code units, as `.length` counts them). */
4910
+ declare const ACTION_RECORD_MAX_CHARS = 300;
4911
+ /**
4912
+ * The one sentence a stage reads with a conversation that carries a record. In the USER prompt,
4913
+ * next to the conversation, and only when a record is in it: a system prompt stays as it was.
4914
+ */
4915
+ declare const ACTION_RECORD_NOTE = "NOTE: a \"[done: ...]\" line at the end of an assistant message (or of a summary) is the runner's own record of what that turn actually did - the tools it called and how each call ended, the files it wrote or deleted, the media it made and whether reference pictures were used; it outweighs anything an answer said about that turn.";
4916
+ /**
4917
+ * A text kept in the conversation - a model's answer, a summary, the user's message - with every
4918
+ * "[done:" in it made "(done:": only the runner's own record has the mark's shape.
4919
+ */
4920
+ declare const neutralizeActionRecords: (text: string) => string;
4921
+ /**
4922
+ * What the conversation keeps of an assistant's turn: its answer - with any look-alike made
4923
+ * harmless - and the runner's record on the last line. A turn without an answer (`text` empty:
4924
+ * the run was stopped, or failed) keeps a fixed sentence saying so above its record. Without a
4925
+ * record (no tool ran) it is the answer alone; `record` must be the runner's (`[done: ...]`).
4926
+ */
4927
+ declare const withActionRecord: (text: string, record?: string, ended?: "stopped" | "failed") => string;
4928
+ /** The record of a run's result, or of the error a run threw (the Node package): or undefined. */
4929
+ declare const actionRecordOf: (value: unknown) => string | undefined;
4930
+
4885
4931
  interface RunStoreOptions {
4886
4932
  /**
4887
4933
  * Keep the snapshot of a run that completed (default false). A completed run has
@@ -4999,5 +5045,5 @@ declare const postStorageChange: (dbName: string | undefined, change: StorageCha
4999
5045
  */
5000
5046
  declare const onStorageChange: (dbName: string | undefined, listener: (change: StorageChange) => void) => (() => void);
5001
5047
 
5002
- export { APP_SAMPLING_MAX_IMAGES, APP_SAMPLING_MAX_IMAGE_BYTES, APP_SAMPLING_MAX_INPUT_CHARS, APP_SAMPLING_MAX_MESSAGES, APP_SAMPLING_MAX_SYSTEM_CHARS, APP_SAMPLING_MAX_TOKENS, APP_SAMPLING_PER_APP, APP_SAMPLING_PER_MINUTE, APP_SAMPLING_REASONING_TOKENS, APP_SAMPLING_RPC_CODES, ASK_USER_DESCRIPTION_MAX_CHARS, ASK_USER_LABEL_MAX_CHARS, ASK_USER_MAX_OPTIONS, ASK_USER_MAX_PER_RUN, ASK_USER_MIN_OPTIONS, ASK_USER_OTHER_MAX_CHARS, ASK_USER_QUESTION_MAX_CHARS, ASK_USER_TIMEOUT_MAX_MS, ASK_USER_TIMEOUT_MS, ASK_USER_TOOL, AgentTool, AgentToolSet, AppSamplingError, AskUserInputError, AttachmentsNotSupportedError, ContextWindowExceededError, CredentialStore, DECISION_PROVIDERS, DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, EgressError, FILES_STORE, FIND_TOOLS_NAME, FORGET_SKILL_TOOL, GENERATE_IMAGE_TOOL, GENERATE_SPEECH_TOOL, ImagesNotSupportedError, IndexedDBRunStore, IndexedDBStore, KEYS_STORE, MEDIA_AUDIO_TYPES, MEDIA_DEFAULT_MAX_CALLS, MEDIA_FOLDER, MEDIA_IMAGE_TYPES, MEDIA_MAX_ATTACHED_AUDIO, MEDIA_MAX_AUDIO_INPUT_BYTES, MEDIA_MAX_IMAGE_BYTES, MEDIA_MAX_PROMPT_CHARS, MEDIA_MAX_SPEECH_BYTES, MEDIA_MAX_SPEECH_CHARS, MEDIA_MAX_TRANSCRIPT_CHARS, MEDIA_TIMEOUT_MS, MODEL_TIERS, McpAppToolResult, McpElicitationReason, McpElicitationSchema, McpSkillConsent, McpSkillConsentView, MediaBudgetError, MediaError, MemoryRunStore, MemorySkillStore, MemoryStore, NO_ATTACHMENT_NOTE, PipelineDefinition, PipelineEvent, PipelineNode, PipelineNodeRunner, PipelineResult, PlanSchema, PlanStepSchema, RELAY_MAX_REPLAYS_PER_SECOND, RELAY_MAX_SENDS, RELAY_MAX_SEND_CHARS, RELAY_MAX_STRING, REPLAY_NOTE, RUNS_STORE, ReplanSchema, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_GOOGLE_DEFAULT_MODEL, SEARCH_GOOGLE_NOTE, SEARCH_MAX_NOTE_CHARS, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_SUMMARY_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SECRETS_STORE, SESSIONS_STORE, SESSION_LOCK_MODES, SKILL_TOOL_NAMES, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, STORAGE_CHANGE_KINDS, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SessionBusyError, SubagentSpawnError, TOOL_APPROVAL_MODES, TOOL_APPROVAL_TIMEOUT_MS, TOOL_SEARCH_WINDOW_SHARE, TRANSCRIBE_AUDIO_TOOL, TieredPlanSchema, TieredPlanStepSchema, ToolBudgetError, ToolDeniedError, VfsSkillStore, VirtualFileSystem, WEBLLM_DEFAULT_CONTEXT_WINDOW, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, acceptMedia, adoptSubagentEvent, appSamplingRequestOf, appSamplingText, askDecisionModel, attachmentKind, buildMediaModelFromSpec, buildModelFromStage, buildSearchRequest, bytesToBase64, checkAskUserAnswer, checkAskUserInput, checkEgressUrl, checkLimits, classifyAddress, cleanAskUserText, compactHistory, compactSteps, compressHistory, contextOverflowOf, contextWindowOf, createAgent, createAppSamplingLimiter, createEgressTools, createFileTools, createFindToolsTool, createGuardedFetch, createLearning, createLogger, createMedia, createPipeline, createPlan, createRunControl, createSearchTools, createSkillTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebLLMModel, createWebSearchTool, decideReplan, decideToolPermission, decisionEgressPolicy, decisionModelFromAiSdk, defaultPrompts, defineSkill, defineTool, directBrowserOk, dispatch, escalationReasonOf, messageTokens as estimateMessagesTokens, estimateTokens, executeStep, fileToolBindingOf, findSecret, fitCompactionToWindow, generate, generateStructured, hostMatches, htmlToText, isAttachmentRefusal, isCodeExecutionTool, isDirectModel, isEscalatableError, isImageRefusal, isProviderSpec, isReadOnlyTool, isReplayedToolOutput, isTextMime, isWebGPUAvailable, learnedPreamble, limitModelOutput, loadSkillFromUrl, looksLikeJson, markCodeExecution, markReadOnly, matchRule, mediaTypeOf, mediaUsageOf, mergeProviderOptions, mimeFromPath, nextStrongerTier, nodeResolver, normalizePath, normalizeSkillName, normalizeSteps, normalizeUsage, onStorageChange, openAgentWebDB, outputCapNotice, parseExecutorResponse, parsePlainText, parsePlannerResponse, parseReplannerResponse, parseSearchResponse, parseSkillMarkdown, pickPipelineRoute, pickTier, postStorageChange, preloadWebLLMModel, renderActiveSkills, renderCatalog, renderSearchCatalog, renderSkillIndex, replanWanted, resolveAppSampling, resolveBudgets, resolveCaching, resolveCompaction, resolveConfig, resolveDecisionModel, resolveDynamicSubagents, resolveEgressPolicy, resolveEscalation, resolveModel, resolveResume, resolveStage, resolveThinking, runToolLoop, sanitizeSearchResults, schemaHintOf, searchEgressPolicy, searchEngineAnswer, searchStatusMessage, searchToolResult, searchTools, searchUsageOf, selectToolMode, serveSubagentWorker, shouldReplan, skillPreamble, sniffMediaType, splitBlocker, stageOutputCap, stageReasons, stream, supportsImages, supportsNativeTools, supportsPdf, supportsStructuredOutput, synthesizeAnswer, thinkingFor, toFilePart, toImagePart, tokenize, toolCatalogOf, toolDefinitionTokens, toolRunContextOf, unloadWebLLMModel, watchSession, webLLMContextWindow, withRollingBreakpoint, withSystem, withWebLLMContextWindow, wrapTranscript };
5003
- export type { Agent, AgentContext, AgentEvent, AgentEventHandler, AgentLogger, AgentLoggerSink, AgentWebDBOptions, AppSamplingErrorCode, AppSamplingImage, AppSamplingMessage, AppSamplingOptions, AppSamplingRequest, AppSamplingResult, AppSamplingSettings, AppSamplingView, AppToolCallRequest, AskUserAction, AskUserAnswer, AskUserCheckedAnswer, AskUserConfig, AskUserContext, AskUserHandler, AskUserOption, AskUserQuestion, AskUserReason, AskUserRequest, AttachmentKind, BrowserAgentConfig, ClearedInfo, CompactOptions, CompactResult, CompactionConfig, CompressOptions, ContextStore, DecisionFallbackReason, DecisionPoint, EffectiveToolStrategy, EgressErrorCode, EscalationConfig, EscalationReason, ExecutorPromptContext, ExecutorResult, FileToolBinding, FileToolsOptions, GenerateOptions, GuardedFetch, IAiSdkDecisionOptions, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionModelSpec, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDynamicSubagentsConfig, IEgressPolicy, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaOptions, IMediaRun, IMediaUsage, IPlan, IPlanStep, IResolvedDynamicSubagents, IResolvedEgressPolicy, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISearchAnswer, ISearchConfig, ISearchEngineAnswer, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolResult, ISearchUsage, IStepEscalation, IStepResult, ISubagentsConfig, IToolCall, ITranscription, IUsage, IWebFetchOptions, IWebSearchOptions, IndexedDBRunStoreOptions, IndexedDBStoreOptions, Learning, LearningConfig, LimitBreach, LimitKind, LoadSkillOptions, LogLevel, McpSkillOrigin, MediaImageModel, MediaKind, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, MessageEndpoint, ModelInput, ModelTier, NodeResolverOptions, OutputCap, ParentToWorker, Phase, PhaseBudgets, Pipeline, PipelineOptions, PipelineRouteOptions, PipelineRouteResult, PipelineRunOptions, PlanShape, PlannerPromptContext, PlannerResult, PromptCachingSetting, PromptParts, Prompts, ProviderModelSpec, ProviderOptionsMap, ProviderType, ProxiedToolSpec, RawAction, ReplanDecision, ReplanMode, ReplanShape, ReplanTrigger, ReplannerPromptContext, ReplannerResult, ResolvedCaching, ResolvedCompaction, ResolvedConfig, ResolvedStage, ResolvedThinking, RunControl, RunFile, RunImage, RunOptions, RunPersistence, RunResult, RunSnapshot, RunStatus, RunStoreOptions, SandboxConfig, SandboxWorkerLike, SaveSkillInput, SearchEngine, SearchFreshness, SearchProvider, SearchToolsOptions, ServeSubagentOptions, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillOrigin, SkillStore, StageInput, StageOverride, StepComplexity, StorageChange, StorageChangeKind, StorageChangeOp, StoredMessage, StructuredResult, SubagentDefaultTools, SubagentInfo, SubagentProfile, SubagentToolOptions, SubagentWorkerConfig, SynthesizerPromptContext, ThinkingConfig, ThinkingLevel, ThinkingSetting, ThinkingStage, TierReason, TokenLimits, ToolApprovalApp, ToolApprovalConfig, ToolApprovalContext, ToolApprovalDecision, ToolApprovalMode, ToolApprovalRequest, ToolCallMode, ToolCatalogEntry, ToolLoopCallbacks, ToolLoopOptions, ToolLoopResult, ToolMode, ToolPermission, ToolResultClearing, ToolRunContext, ToolSelectionStrategy, UsagePhase, VfsListener, VirtualFile, VirtualFileInfo, VirtualFileSystemOptions, WatchSessionOptions, WebLLMAppConfigLike, WebLLMModelOptions, WorkerLike, WorkerToParent };
5048
+ export { ACTION_RECORD_MAX_CHARS, ACTION_RECORD_NOTE, APP_SAMPLING_MAX_IMAGES, APP_SAMPLING_MAX_IMAGE_BYTES, APP_SAMPLING_MAX_INPUT_CHARS, APP_SAMPLING_MAX_MESSAGES, APP_SAMPLING_MAX_SYSTEM_CHARS, APP_SAMPLING_MAX_TOKENS, APP_SAMPLING_PER_APP, APP_SAMPLING_PER_MINUTE, APP_SAMPLING_REASONING_TOKENS, APP_SAMPLING_RPC_CODES, ASK_USER_DESCRIPTION_MAX_CHARS, ASK_USER_LABEL_MAX_CHARS, ASK_USER_MAX_OPTIONS, ASK_USER_MAX_PER_RUN, ASK_USER_MIN_OPTIONS, ASK_USER_OTHER_MAX_CHARS, ASK_USER_QUESTION_MAX_CHARS, ASK_USER_TIMEOUT_MAX_MS, ASK_USER_TIMEOUT_MS, ASK_USER_TOOL, AgentTool, AgentToolSet, AppSamplingError, AskUserInputError, AttachmentsNotSupportedError, ContextWindowExceededError, CredentialStore, DECISION_PROVIDERS, DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, EgressError, FILES_STORE, FIND_TOOLS_NAME, FORGET_SKILL_TOOL, IReferenceUse, ImagesNotSupportedError, IndexedDBRunStore, IndexedDBStore, KEYS_STORE, MODEL_TIERS, McpAppToolResult, McpElicitationReason, McpElicitationSchema, McpSkillConsent, McpSkillConsentView, MediaFitReference, MemoryRunStore, MemorySkillStore, MemoryStore, NO_ATTACHMENT_NOTE, PipelineDefinition, PipelineEvent, PipelineNode, PipelineNodeRunner, PipelineResult, PlanSchema, PlanStepSchema, RELAY_MAX_REPLAYS_PER_SECOND, RELAY_MAX_SENDS, RELAY_MAX_SEND_CHARS, RELAY_MAX_STRING, REPLAY_NOTE, RUNS_STORE, ReplanSchema, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_GOOGLE_DEFAULT_MODEL, SEARCH_GOOGLE_NOTE, SEARCH_MAX_NOTE_CHARS, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_SUMMARY_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SECRETS_STORE, SESSIONS_STORE, SESSION_LOCK_MODES, SKILL_TOOL_NAMES, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, STORAGE_CHANGE_KINDS, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SessionBusyError, SubagentSpawnError, TOOL_APPROVAL_MODES, TOOL_APPROVAL_TIMEOUT_MS, TOOL_SEARCH_WINDOW_SHARE, TieredPlanSchema, TieredPlanStepSchema, ToolBudgetError, ToolDeniedError, VfsSkillStore, VirtualFileSystem, WEBLLM_DEFAULT_CONTEXT_WINDOW, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, actionRecordOf, adoptSubagentEvent, appSamplingRequestOf, appSamplingText, askDecisionModel, attachmentKind, buildMediaModelFromSpec, buildModelFromStage, buildSearchRequest, bytesToBase64, checkAskUserAnswer, checkAskUserInput, checkEgressUrl, checkLimits, classifyAddress, cleanAskUserText, compactHistory, compactSteps, compressHistory, contextOverflowOf, contextWindowOf, createAgent, createAppSamplingLimiter, createEgressTools, createFileTools, createFindToolsTool, createGuardedFetch, createLearning, createLogger, createMedia, createPipeline, createPlan, createRunControl, createSearchTools, createSkillTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebLLMModel, createWebSearchTool, decideReplan, decideToolPermission, decisionEgressPolicy, decisionModelFromAiSdk, defaultPrompts, defineSkill, defineTool, directBrowserOk, dispatch, escalationReasonOf, messageTokens as estimateMessagesTokens, estimateTokens, executeStep, fileToolBindingOf, findSecret, fitCompactionToWindow, generate, generateStructured, hostMatches, htmlToText, isAttachmentRefusal, isCodeExecutionTool, isDirectModel, isEscalatableError, isImageRefusal, isProviderSpec, isReadOnlyTool, isReplayedToolOutput, isTextMime, isWebGPUAvailable, learnedPreamble, limitModelOutput, loadSkillFromUrl, looksLikeJson, markCodeExecution, markReadOnly, matchRule, mediaTypeOf, mergeProviderOptions, mimeFromPath, neutralizeActionRecords, nextStrongerTier, nodeResolver, normalizePath, normalizeSkillName, normalizeSteps, normalizeUsage, onStorageChange, openAgentWebDB, outputCapNotice, parseExecutorResponse, parsePlainText, parsePlannerResponse, parseReplannerResponse, parseSearchResponse, parseSkillMarkdown, pickPipelineRoute, pickTier, postStorageChange, preloadWebLLMModel, renderActiveSkills, renderCatalog, renderSearchCatalog, renderSkillIndex, replanWanted, resolveAppSampling, resolveBudgets, resolveCaching, resolveCompaction, resolveConfig, resolveDecisionModel, resolveDynamicSubagents, resolveEgressPolicy, resolveEscalation, resolveModel, resolveResume, resolveStage, resolveThinking, runToolLoop, sanitizeSearchResults, schemaHintOf, searchEgressPolicy, searchEngineAnswer, searchStatusMessage, searchToolResult, searchTools, searchUsageOf, selectToolMode, serveSubagentWorker, shouldReplan, skillPreamble, splitBlocker, stageOutputCap, stageReasons, stream, supportsImages, supportsNativeTools, supportsPdf, supportsStructuredOutput, synthesizeAnswer, thinkingFor, toFilePart, toImagePart, tokenize, toolCatalogOf, toolDefinitionTokens, toolRunContextOf, unloadWebLLMModel, watchSession, webLLMContextWindow, withActionRecord, withRollingBreakpoint, withSystem, withWebLLMContextWindow };
5049
+ export type { Agent, AgentContext, AgentEvent, AgentEventHandler, AgentLogger, AgentLoggerSink, AgentWebDBOptions, AppSamplingErrorCode, AppSamplingImage, AppSamplingMessage, AppSamplingOptions, AppSamplingRequest, AppSamplingResult, AppSamplingSettings, AppSamplingView, AppToolCallRequest, AskUserAction, AskUserAnswer, AskUserCheckedAnswer, AskUserConfig, AskUserContext, AskUserHandler, AskUserOption, AskUserQuestion, AskUserReason, AskUserRequest, AttachmentKind, BrowserAgentConfig, ClearedInfo, CompactOptions, CompactResult, CompactionConfig, CompressOptions, ContextStore, DecisionFallbackReason, DecisionPoint, EffectiveToolStrategy, EgressErrorCode, EscalationConfig, EscalationReason, ExecutorPromptContext, ExecutorResult, FileToolBinding, FileToolsOptions, GenerateOptions, GuardedFetch, IAiSdkDecisionOptions, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionModelSpec, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDynamicSubagentsConfig, IEgressPolicy, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaOptions, IMediaRun, IPlan, IPlanStep, IResolvedDynamicSubagents, IResolvedEgressPolicy, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISearchAnswer, ISearchConfig, ISearchEngineAnswer, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolResult, ISearchUsage, IStepEscalation, IStepResult, ISubagentsConfig, IToolCall, ITranscription, IUsage, IWebFetchOptions, IWebSearchOptions, IndexedDBRunStoreOptions, IndexedDBStoreOptions, Learning, LearningConfig, LimitBreach, LimitKind, LoadSkillOptions, LogLevel, McpSkillOrigin, MediaImageModel, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, MessageEndpoint, ModelInput, ModelTier, NodeResolverOptions, OutputCap, ParentToWorker, Phase, PhaseBudgets, Pipeline, PipelineOptions, PipelineRouteOptions, PipelineRouteResult, PipelineRunOptions, PlanShape, PlannerPromptContext, PlannerResult, PromptCachingSetting, PromptParts, Prompts, ProviderModelSpec, ProviderOptionsMap, ProviderType, ProxiedToolSpec, RawAction, ReplanDecision, ReplanMode, ReplanShape, ReplanTrigger, ReplannerPromptContext, ReplannerResult, ResolvedCaching, ResolvedCompaction, ResolvedConfig, ResolvedStage, ResolvedThinking, RunControl, RunFile, RunImage, RunOptions, RunPersistence, RunResult, RunSnapshot, RunStatus, RunStoreOptions, SandboxConfig, SandboxWorkerLike, SaveSkillInput, SearchEngine, SearchFreshness, SearchProvider, SearchToolsOptions, ServeSubagentOptions, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillOrigin, SkillStore, StageInput, StageOverride, StepComplexity, StorageChange, StorageChangeKind, StorageChangeOp, StoredMessage, StructuredResult, SubagentDefaultTools, SubagentInfo, SubagentProfile, SubagentToolOptions, SubagentWorkerConfig, SynthesizerPromptContext, ThinkingConfig, ThinkingLevel, ThinkingSetting, ThinkingStage, TierReason, TokenLimits, ToolApprovalApp, ToolApprovalConfig, ToolApprovalContext, ToolApprovalDecision, ToolApprovalMode, ToolApprovalRequest, ToolCallMode, ToolCatalogEntry, ToolLoopCallbacks, ToolLoopOptions, ToolLoopResult, ToolMode, ToolPermission, ToolResultClearing, ToolRunContext, ToolSelectionStrategy, UsagePhase, VfsListener, VirtualFile, VirtualFileInfo, VirtualFileSystemOptions, WatchSessionOptions, WebLLMAppConfigLike, WebLLMModelOptions, WorkerLike, WorkerToParent };
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ import { P as McpSkillConsentView, B as McpElicitationSchema, y as McpElicitatio
3
3
  export { g as MCP_APPS_EXTENSION, k as MCP_APP_MAX_HTML_CHARS, l as MCP_APP_MAX_RESULT_CHARS, m as MCP_APP_MIME_TYPE, V as MCP_SKILLS_EXTENSION, W as MCP_SKILLS_MAX_PER_SERVER, X as MCP_SKILLS_MAX_TOTAL, Y as MCP_SKILL_BODY_MAX_CHARS, Z as MCP_SKILL_CONSENTS, _ as MCP_SKILL_CONSENT_DEFAULT, $ as MCP_SKILL_DESCRIPTION_MAX_CHARS, a0 as MCP_SKILL_DIRECTORY_ENTRIES_MAX, a1 as MCP_SKILL_FILE_MAX_CHARS, a2 as MCP_SKILL_MAX_RESOURCES, a3 as MCP_SKILL_MAX_TOTAL_BYTES, a4 as MCP_SKILL_SNAPSHOTS_MAX_BYTES, a5 as MCP_SKILL_SNAPSHOT_MAX_DEPTH, a6 as MCP_SKILL_SNAPSHOT_MAX_DIRECTORIES, a7 as MCP_SKILL_URI_MAX_CHARS, q as McpAppCsp, r as McpAppPermissions, b as McpAppResource, c as McpAppVisibility, x as McpElicitationFieldSchema, a8 as McpSkillsOptions, f as McpSkillsSetting, a9 as SkillDirectoryListing, G as mcpAppOrigin, aa as mcpSkillEntryRefusal, ab as mcpSkillPreamble, ac as mcpSkillUriRefusal } from './skills-ufoyTJ-B.js';
4
4
  import { PipelineEvent, PipelineNode, PipelineDefinition, PipelineResult, PipelineNodeRunner } from './pipeline-engine.js';
5
5
  export { PIPELINE_LIMITS, PIPELINE_ROUTER_SYSTEM, PipelineAbortBehaviour, PipelineCondition, PipelineEdge, PipelineGraphRunOptions, PipelineIssue, PipelineNodeContext, PipelineNodeError, PipelineNodeEvent, PipelineNodeInput, PipelineNodeOutput, PipelineNodeSource, PipelinePlan, PipelineRoute, PipelineStop, PipelineTraceEntry, PipelineUsage, PipelineValidation, PipelineValidationError, matchPipelineRoute, normalizePipeline, preparePipeline, renderPipelineNodeInput, renderPipelineRoutePrompt, runPipelineGraph, testPipelineCondition, validatePipeline } from './pipeline-engine.js';
6
+ import { I as IReferenceUse, M as MediaFitReference, a as IReferenceResult } from './media-fit-worker-CFK2z8LF.js';
7
+ export { F as FitReferenceWorker, b as FitReferenceWorkerScope, G as GENERATE_IMAGE_TOOL, c as GENERATE_SPEECH_TOOL, d as IFitReferenceOptions, e as IFittedReference, f as IImageSize, g as IMediaUsage, h as IReferenceBounds, i as IReferencePicture, j as MEDIA_AUDIO_TYPES, k as MEDIA_DEFAULT_MAX_CALLS, l as MEDIA_FIT_TIMEOUT_MS, m as MEDIA_FOLDER, n as MEDIA_IMAGE_TYPES, o as MEDIA_MAX_ATTACHED_AUDIO, p as MEDIA_MAX_AUDIO_INPUT_BYTES, q as MEDIA_MAX_IMAGE_BYTES, r as MEDIA_MAX_PROMPT_CHARS, s as MEDIA_MAX_REFERENCE_BYTES, t as MEDIA_MAX_REFERENCE_IMAGES, u as MEDIA_MAX_REFERENCE_SIDE, v as MEDIA_MAX_REFERENCE_SOURCE_BYTES, w as MEDIA_MAX_REFERENCE_SOURCE_PIXELS, x as MEDIA_MAX_REFERENCE_TOTAL_BYTES, y as MEDIA_MAX_SPEECH_BYTES, z as MEDIA_MAX_SPEECH_CHARS, A as MEDIA_MAX_TRANSCRIPT_CHARS, B as MEDIA_REFERENCE_TYPES, C as MEDIA_TIMEOUT_MS, D as MediaBudgetError, E as MediaError, H as MediaKind, S as ServeFitReferenceOptions, T as TRANSCRIBE_AUDIO_TOOL, J as acceptMedia, K as acceptReference, L as acceptReferenceSource, N as fitReferenceImage, O as fitReferenceInWorker, P as imageDimensions, Q as mediaUsageOf, R as serveFitReferenceWorker, U as sniffMediaType, V as wrapTranscript } from './media-fit-worker-CFK2z8LF.js';
6
8
  import { CredentialStore } from './secrets.js';
7
9
  export { EncryptedBlob, MemoryCredentialStore, VaultCredentialStore, decryptJSON, encryptJSON, getOrCreateVaultKey } from './secrets.js';
8
10
  import { A as AgentToolSet, a as AgentTool } from './types-DwSMj_Xs.js';
@@ -1011,7 +1013,9 @@ type AgentEventBody =
1011
1013
  /**
1012
1014
  * A media tool (`config.media`) wrote a file to the virtual file system: `path` is where (read
1013
1015
  * it with `vfs.readDataUrl(path)` to show the picture or play the audio), `mediaType` what its
1014
- * bytes are, `bytes` its size. The bytes themselves are never in an event.
1016
+ * bytes are, `bytes` its size. `references`: a `generate_image` call with `images` - whether
1017
+ * those pictures were sent (`used`; false: the model takes none), how many and their paths.
1018
+ * The bytes themselves are never in an event.
1015
1019
  */
1016
1020
  | {
1017
1021
  type: 'media.generated';
@@ -1020,6 +1024,7 @@ type AgentEventBody =
1020
1024
  mediaType: string;
1021
1025
  bytes: number;
1022
1026
  model: string;
1027
+ references?: IReferenceUse;
1023
1028
  step?: IPlanStep;
1024
1029
  }
1025
1030
  /**
@@ -1448,14 +1453,37 @@ interface SessionWatch {
1448
1453
  readonly state: SessionRunState;
1449
1454
  /**
1450
1455
  * Say something to the run in the other tab: it reaches the model at the run's next boundary,
1451
- * as `RunControl.send` does there. Resolves true when that tab took it; false when nothing
1452
- * runs, the run has no `control`, the text is empty or over `RELAY_MAX_SEND_CHARS`, the run
1453
- * already took `RELAY_MAX_SENDS`, or no answer came.
1456
+ * as `RunControl.send` does there. The answer is THAT tab's, and nothing else decides it while
1457
+ * the run goes:
1458
+ *
1459
+ * - `true` when that tab took the message (its acknowledgement);
1460
+ * - `false` when it refused it (the run has no `control`, already took `RELAY_MAX_SENDS`, or is
1461
+ * finishing), or when the run ENDED without taking it - its tab said so (`done`, `stopped`), or
1462
+ * nobody holds the session any more (`gone`: the tab closed or crashed). One tab's messages
1463
+ * keep their order and it answers a message before it says its run is over, so an end with no
1464
+ * answer before it means that run never took it.
1465
+ *
1466
+ * There is no time limit while the run's tab holds the session: a tab the browser froze in the
1467
+ * background (a phone does that to every tab out of sight) takes the message when it wakes, so
1468
+ * "no answer yet" is not a refusal - the promise stays pending, and a host that showed the text
1469
+ * as refused would hand it to a second run. Only the tab that announced the run decides: an
1470
+ * answer, or an end, posted under another tab's id is ignored (any page of the origin can post).
1471
+ *
1472
+ * Resolves `false` at once when nothing runs or the text is empty or over
1473
+ * `RELAY_MAX_SEND_CHARS`, and on `close()` - then the other tab may still take it: this watch no
1474
+ * longer knows. Where the browser cannot be asked who holds the session (no
1475
+ * `navigator.locks.query()`), a run whose tab closed is never seen to end, and a message to it
1476
+ * waits until `close()`.
1454
1477
  */
1455
1478
  send(text: string): Promise<boolean>;
1456
- /** Stop the run in the other tab. Resolves true when that tab took the request. */
1479
+ /**
1480
+ * Stop the run in the other tab. Resolves true when that tab took the request, false when it
1481
+ * refused or no answer came in 3 s. A stop may keep that bound where a message may not: it is
1482
+ * idempotent - a stop a frozen tab takes late stops the run it was meant for, and asking again
1483
+ * stops it once.
1484
+ */
1457
1485
  stop(): Promise<boolean>;
1458
- /** Stop watching. */
1486
+ /** Stop watching. A message still waiting for its answer resolves `false`. */
1459
1487
  close(): void;
1460
1488
  }
1461
1489
  /**
@@ -2543,6 +2571,26 @@ type MediaTranscriptionModel = Exclude<TranscriptionModel, string>;
2543
2571
  interface IMediaConfig {
2544
2572
  /** Mounts `generate_image` (a prompt becomes an image file in the workspace). */
2545
2573
  imageModel?: MediaImageModel | IMediaModelSpec;
2574
+ /**
2575
+ * Whether the image model takes reference pictures (`generate_image`'s `images`: files of the
2576
+ * workspace it SEES - the person's photo, "like this"). Default: what the model object declares
2577
+ * (`supportsFileInputs`, the AI SDK's own capability; unknown counts as no). When it takes none,
2578
+ * a call with `images` makes the picture from the text alone and its result says so.
2579
+ */
2580
+ imageInputs?: boolean;
2581
+ /**
2582
+ * Make a reference picture that is over the bounds (over 4096 px on its longer side, over 8 MiB,
2583
+ * or the pictures of a call over 12 MiB together) small enough to send, instead of refusing it.
2584
+ * Called with a COPY of the picture's bytes and its size in pixels, only for a PNG / JPEG / WebP
2585
+ * of the workspace within the source bounds (50 MiB, 200 MP - read from its header, so nothing
2586
+ * larger is ever decoded); its answer is checked again by the same guards. The file in the
2587
+ * workspace is never changed. `fitReferenceImage` does it with the browser's own codecs; run it
2588
+ * in a Web Worker (`fitReferenceInWorker`) so the page never waits on an encode. Default: none -
2589
+ * a picture over the bounds is refused.
2590
+ */
2591
+ fitReference?: MediaFitReference;
2592
+ /** One call of `fitReference`, in ms (its `signal` is aborted then). Default 30 000. */
2593
+ fitTimeoutMs?: number;
2546
2594
  /** Mounts `generate_speech` (text becomes an audio file in the workspace). */
2547
2595
  speechModel?: MediaSpeechModel | IMediaModelSpec;
2548
2596
  /**
@@ -2580,6 +2628,11 @@ interface IMediaFile {
2580
2628
  path: string;
2581
2629
  mediaType: string;
2582
2630
  bytes: number;
2631
+ /**
2632
+ * `generate_image` called with `images`: whether they were sent (`used`), how many, which
2633
+ * paths, and - when they were not - the sentence the model reads. Absent without `images`.
2634
+ */
2635
+ references?: IReferenceResult;
2583
2636
  }
2584
2637
  /** What `transcribe_audio` returns. */
2585
2638
  interface ITranscription {
@@ -3547,6 +3600,14 @@ interface RunResult {
3547
3600
  * stopped or ended). Send them as the next run. Empty when everything was delivered.
3548
3601
  */
3549
3602
  undelivered?: string[];
3603
+ /**
3604
+ * The runner's record of what the run DID - `[done: ...]`: each tool it called and how the calls
3605
+ * ended, the files written or deleted, the media made (and whether generate_image's reference
3606
+ * pictures were used), the helpers, whether a question was answered - as the session memory keeps
3607
+ * it on the assistant's message (see `withActionRecord`). Absent when no tool ran. A stopped or
3608
+ * failed run has it too: what it did before it ended.
3609
+ */
3610
+ actionRecord?: string;
3550
3611
  }
3551
3612
  interface CompactOptions {
3552
3613
  /** Session to compact (default: the config's sessionId). */
@@ -4239,6 +4300,7 @@ declare const fileToolBindingOf: (t: unknown) => FileToolBinding | undefined;
4239
4300
  * Tools that give the agent the virtual file system: list, read, write and
4240
4301
  * delete. Listing and reading are marked read-only, so the `ask-writes`
4241
4302
  * consent mode lets them through and asks before writes and deletes.
4303
+ * `fs_read` takes an optional line range (`startLine` / `endLine`) for part of a long file.
4242
4304
  */
4243
4305
  declare const createFileTools: (vfs: VirtualFileSystem, opts?: FileToolsOptions) => ToolSet;
4244
4306
 
@@ -4675,50 +4737,6 @@ declare const defineTool: <INPUT = unknown, OUTPUT = unknown>(config: Tool<INPUT
4675
4737
  readOnly?: boolean;
4676
4738
  }) => AgentTool;
4677
4739
 
4678
- declare const GENERATE_IMAGE_TOOL = "generate_image";
4679
- declare const GENERATE_SPEECH_TOOL = "generate_speech";
4680
- declare const TRANSCRIBE_AUDIO_TOOL = "transcribe_audio";
4681
- type MediaKind = 'image' | 'speech' | 'transcription';
4682
- declare const MEDIA_DEFAULT_MAX_CALLS = 8;
4683
- declare const MEDIA_TIMEOUT_MS = 120000;
4684
- declare const MEDIA_MAX_IMAGE_BYTES: number;
4685
- declare const MEDIA_MAX_SPEECH_BYTES: number;
4686
- declare const MEDIA_MAX_AUDIO_INPUT_BYTES: number;
4687
- declare const MEDIA_MAX_PROMPT_CHARS = 4000;
4688
- declare const MEDIA_MAX_SPEECH_CHARS = 4000;
4689
- declare const MEDIA_MAX_TRANSCRIPT_CHARS = 20000;
4690
- declare const MEDIA_MAX_ATTACHED_AUDIO = 4;
4691
- declare const MEDIA_FOLDER = "media";
4692
- declare class MediaError extends Error {
4693
- constructor(message: string);
4694
- toJSON(): string;
4695
- }
4696
- declare class MediaBudgetError extends MediaError {
4697
- constructor(cap: number);
4698
- }
4699
- declare const MEDIA_IMAGE_TYPES: Readonly<Record<string, string>>;
4700
- declare const MEDIA_AUDIO_TYPES: Readonly<Record<string, string>>;
4701
- declare const sniffMediaType: (bytes: Uint8Array) => string | undefined;
4702
- interface IAcceptedMedia {
4703
- mediaType: string;
4704
- ext: string;
4705
- }
4706
- declare const acceptMedia: (family: "image" | "audio", bytes: Uint8Array, maxBytes: number, what: string) => IAcceptedMedia;
4707
- interface IMediaUsage {
4708
- mediaCalls: number;
4709
- imagesGenerated: number;
4710
- speechCharacters: number;
4711
- transcriptionSeconds: number;
4712
- }
4713
- declare const mediaUsageOf: (usage: Partial<IMediaUsage> | undefined) => IMediaUsage | undefined;
4714
- interface ITranscriptBlock {
4715
- name: string;
4716
- text: string;
4717
- language?: string;
4718
- durationInSeconds?: number;
4719
- }
4720
- declare const wrapTranscript: (block: ITranscriptBlock) => string;
4721
-
4722
4740
  /**
4723
4741
  * Render a ToolSet into a plain-text catalogue for the prompted/salvage path:
4724
4742
  * `- name(hint): description`. The hint comes from `defineTool({ promptHint })`
@@ -4876,12 +4894,40 @@ declare class IndexedDBStore implements ContextStore {
4876
4894
  constructor(opts?: IndexedDBStoreOptions);
4877
4895
  load(sessionId: string): Promise<StoredMessage[]>;
4878
4896
  replace(sessionId: string, messages: StoredMessage[]): Promise<void>;
4897
+ /**
4898
+ * Read the session and write it with `message` added in ONE readwrite transaction: two appends
4899
+ * (a message the user sent during a run, written without waiting, and the answer after it)
4900
+ * cannot both read the same transcript and drop each other's message. They land in the order
4901
+ * they were made.
4902
+ */
4879
4903
  append(sessionId: string, message: StoredMessage): Promise<void>;
4880
4904
  clear(sessionId: string): Promise<void>;
4881
4905
  /** List all stored session ids. */
4882
4906
  listSessions(): Promise<string[]>;
4883
4907
  }
4884
4908
 
4909
+ /** The whole record at most, in characters (UTF-16 code units, as `.length` counts them). */
4910
+ declare const ACTION_RECORD_MAX_CHARS = 300;
4911
+ /**
4912
+ * The one sentence a stage reads with a conversation that carries a record. In the USER prompt,
4913
+ * next to the conversation, and only when a record is in it: a system prompt stays as it was.
4914
+ */
4915
+ declare const ACTION_RECORD_NOTE = "NOTE: a \"[done: ...]\" line at the end of an assistant message (or of a summary) is the runner's own record of what that turn actually did - the tools it called and how each call ended, the files it wrote or deleted, the media it made and whether reference pictures were used; it outweighs anything an answer said about that turn.";
4916
+ /**
4917
+ * A text kept in the conversation - a model's answer, a summary, the user's message - with every
4918
+ * "[done:" in it made "(done:": only the runner's own record has the mark's shape.
4919
+ */
4920
+ declare const neutralizeActionRecords: (text: string) => string;
4921
+ /**
4922
+ * What the conversation keeps of an assistant's turn: its answer - with any look-alike made
4923
+ * harmless - and the runner's record on the last line. A turn without an answer (`text` empty:
4924
+ * the run was stopped, or failed) keeps a fixed sentence saying so above its record. Without a
4925
+ * record (no tool ran) it is the answer alone; `record` must be the runner's (`[done: ...]`).
4926
+ */
4927
+ declare const withActionRecord: (text: string, record?: string, ended?: "stopped" | "failed") => string;
4928
+ /** The record of a run's result, or of the error a run threw (the Node package): or undefined. */
4929
+ declare const actionRecordOf: (value: unknown) => string | undefined;
4930
+
4885
4931
  interface RunStoreOptions {
4886
4932
  /**
4887
4933
  * Keep the snapshot of a run that completed (default false). A completed run has
@@ -4999,5 +5045,5 @@ declare const postStorageChange: (dbName: string | undefined, change: StorageCha
4999
5045
  */
5000
5046
  declare const onStorageChange: (dbName: string | undefined, listener: (change: StorageChange) => void) => (() => void);
5001
5047
 
5002
- export { APP_SAMPLING_MAX_IMAGES, APP_SAMPLING_MAX_IMAGE_BYTES, APP_SAMPLING_MAX_INPUT_CHARS, APP_SAMPLING_MAX_MESSAGES, APP_SAMPLING_MAX_SYSTEM_CHARS, APP_SAMPLING_MAX_TOKENS, APP_SAMPLING_PER_APP, APP_SAMPLING_PER_MINUTE, APP_SAMPLING_REASONING_TOKENS, APP_SAMPLING_RPC_CODES, ASK_USER_DESCRIPTION_MAX_CHARS, ASK_USER_LABEL_MAX_CHARS, ASK_USER_MAX_OPTIONS, ASK_USER_MAX_PER_RUN, ASK_USER_MIN_OPTIONS, ASK_USER_OTHER_MAX_CHARS, ASK_USER_QUESTION_MAX_CHARS, ASK_USER_TIMEOUT_MAX_MS, ASK_USER_TIMEOUT_MS, ASK_USER_TOOL, AgentTool, AgentToolSet, AppSamplingError, AskUserInputError, AttachmentsNotSupportedError, ContextWindowExceededError, CredentialStore, DECISION_PROVIDERS, DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, EgressError, FILES_STORE, FIND_TOOLS_NAME, FORGET_SKILL_TOOL, GENERATE_IMAGE_TOOL, GENERATE_SPEECH_TOOL, ImagesNotSupportedError, IndexedDBRunStore, IndexedDBStore, KEYS_STORE, MEDIA_AUDIO_TYPES, MEDIA_DEFAULT_MAX_CALLS, MEDIA_FOLDER, MEDIA_IMAGE_TYPES, MEDIA_MAX_ATTACHED_AUDIO, MEDIA_MAX_AUDIO_INPUT_BYTES, MEDIA_MAX_IMAGE_BYTES, MEDIA_MAX_PROMPT_CHARS, MEDIA_MAX_SPEECH_BYTES, MEDIA_MAX_SPEECH_CHARS, MEDIA_MAX_TRANSCRIPT_CHARS, MEDIA_TIMEOUT_MS, MODEL_TIERS, McpAppToolResult, McpElicitationReason, McpElicitationSchema, McpSkillConsent, McpSkillConsentView, MediaBudgetError, MediaError, MemoryRunStore, MemorySkillStore, MemoryStore, NO_ATTACHMENT_NOTE, PipelineDefinition, PipelineEvent, PipelineNode, PipelineNodeRunner, PipelineResult, PlanSchema, PlanStepSchema, RELAY_MAX_REPLAYS_PER_SECOND, RELAY_MAX_SENDS, RELAY_MAX_SEND_CHARS, RELAY_MAX_STRING, REPLAY_NOTE, RUNS_STORE, ReplanSchema, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_GOOGLE_DEFAULT_MODEL, SEARCH_GOOGLE_NOTE, SEARCH_MAX_NOTE_CHARS, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_SUMMARY_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SECRETS_STORE, SESSIONS_STORE, SESSION_LOCK_MODES, SKILL_TOOL_NAMES, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, STORAGE_CHANGE_KINDS, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SessionBusyError, SubagentSpawnError, TOOL_APPROVAL_MODES, TOOL_APPROVAL_TIMEOUT_MS, TOOL_SEARCH_WINDOW_SHARE, TRANSCRIBE_AUDIO_TOOL, TieredPlanSchema, TieredPlanStepSchema, ToolBudgetError, ToolDeniedError, VfsSkillStore, VirtualFileSystem, WEBLLM_DEFAULT_CONTEXT_WINDOW, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, acceptMedia, adoptSubagentEvent, appSamplingRequestOf, appSamplingText, askDecisionModel, attachmentKind, buildMediaModelFromSpec, buildModelFromStage, buildSearchRequest, bytesToBase64, checkAskUserAnswer, checkAskUserInput, checkEgressUrl, checkLimits, classifyAddress, cleanAskUserText, compactHistory, compactSteps, compressHistory, contextOverflowOf, contextWindowOf, createAgent, createAppSamplingLimiter, createEgressTools, createFileTools, createFindToolsTool, createGuardedFetch, createLearning, createLogger, createMedia, createPipeline, createPlan, createRunControl, createSearchTools, createSkillTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebLLMModel, createWebSearchTool, decideReplan, decideToolPermission, decisionEgressPolicy, decisionModelFromAiSdk, defaultPrompts, defineSkill, defineTool, directBrowserOk, dispatch, escalationReasonOf, messageTokens as estimateMessagesTokens, estimateTokens, executeStep, fileToolBindingOf, findSecret, fitCompactionToWindow, generate, generateStructured, hostMatches, htmlToText, isAttachmentRefusal, isCodeExecutionTool, isDirectModel, isEscalatableError, isImageRefusal, isProviderSpec, isReadOnlyTool, isReplayedToolOutput, isTextMime, isWebGPUAvailable, learnedPreamble, limitModelOutput, loadSkillFromUrl, looksLikeJson, markCodeExecution, markReadOnly, matchRule, mediaTypeOf, mediaUsageOf, mergeProviderOptions, mimeFromPath, nextStrongerTier, nodeResolver, normalizePath, normalizeSkillName, normalizeSteps, normalizeUsage, onStorageChange, openAgentWebDB, outputCapNotice, parseExecutorResponse, parsePlainText, parsePlannerResponse, parseReplannerResponse, parseSearchResponse, parseSkillMarkdown, pickPipelineRoute, pickTier, postStorageChange, preloadWebLLMModel, renderActiveSkills, renderCatalog, renderSearchCatalog, renderSkillIndex, replanWanted, resolveAppSampling, resolveBudgets, resolveCaching, resolveCompaction, resolveConfig, resolveDecisionModel, resolveDynamicSubagents, resolveEgressPolicy, resolveEscalation, resolveModel, resolveResume, resolveStage, resolveThinking, runToolLoop, sanitizeSearchResults, schemaHintOf, searchEgressPolicy, searchEngineAnswer, searchStatusMessage, searchToolResult, searchTools, searchUsageOf, selectToolMode, serveSubagentWorker, shouldReplan, skillPreamble, sniffMediaType, splitBlocker, stageOutputCap, stageReasons, stream, supportsImages, supportsNativeTools, supportsPdf, supportsStructuredOutput, synthesizeAnswer, thinkingFor, toFilePart, toImagePart, tokenize, toolCatalogOf, toolDefinitionTokens, toolRunContextOf, unloadWebLLMModel, watchSession, webLLMContextWindow, withRollingBreakpoint, withSystem, withWebLLMContextWindow, wrapTranscript };
5003
- export type { Agent, AgentContext, AgentEvent, AgentEventHandler, AgentLogger, AgentLoggerSink, AgentWebDBOptions, AppSamplingErrorCode, AppSamplingImage, AppSamplingMessage, AppSamplingOptions, AppSamplingRequest, AppSamplingResult, AppSamplingSettings, AppSamplingView, AppToolCallRequest, AskUserAction, AskUserAnswer, AskUserCheckedAnswer, AskUserConfig, AskUserContext, AskUserHandler, AskUserOption, AskUserQuestion, AskUserReason, AskUserRequest, AttachmentKind, BrowserAgentConfig, ClearedInfo, CompactOptions, CompactResult, CompactionConfig, CompressOptions, ContextStore, DecisionFallbackReason, DecisionPoint, EffectiveToolStrategy, EgressErrorCode, EscalationConfig, EscalationReason, ExecutorPromptContext, ExecutorResult, FileToolBinding, FileToolsOptions, GenerateOptions, GuardedFetch, IAiSdkDecisionOptions, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionModelSpec, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDynamicSubagentsConfig, IEgressPolicy, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaOptions, IMediaRun, IMediaUsage, IPlan, IPlanStep, IResolvedDynamicSubagents, IResolvedEgressPolicy, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISearchAnswer, ISearchConfig, ISearchEngineAnswer, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolResult, ISearchUsage, IStepEscalation, IStepResult, ISubagentsConfig, IToolCall, ITranscription, IUsage, IWebFetchOptions, IWebSearchOptions, IndexedDBRunStoreOptions, IndexedDBStoreOptions, Learning, LearningConfig, LimitBreach, LimitKind, LoadSkillOptions, LogLevel, McpSkillOrigin, MediaImageModel, MediaKind, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, MessageEndpoint, ModelInput, ModelTier, NodeResolverOptions, OutputCap, ParentToWorker, Phase, PhaseBudgets, Pipeline, PipelineOptions, PipelineRouteOptions, PipelineRouteResult, PipelineRunOptions, PlanShape, PlannerPromptContext, PlannerResult, PromptCachingSetting, PromptParts, Prompts, ProviderModelSpec, ProviderOptionsMap, ProviderType, ProxiedToolSpec, RawAction, ReplanDecision, ReplanMode, ReplanShape, ReplanTrigger, ReplannerPromptContext, ReplannerResult, ResolvedCaching, ResolvedCompaction, ResolvedConfig, ResolvedStage, ResolvedThinking, RunControl, RunFile, RunImage, RunOptions, RunPersistence, RunResult, RunSnapshot, RunStatus, RunStoreOptions, SandboxConfig, SandboxWorkerLike, SaveSkillInput, SearchEngine, SearchFreshness, SearchProvider, SearchToolsOptions, ServeSubagentOptions, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillOrigin, SkillStore, StageInput, StageOverride, StepComplexity, StorageChange, StorageChangeKind, StorageChangeOp, StoredMessage, StructuredResult, SubagentDefaultTools, SubagentInfo, SubagentProfile, SubagentToolOptions, SubagentWorkerConfig, SynthesizerPromptContext, ThinkingConfig, ThinkingLevel, ThinkingSetting, ThinkingStage, TierReason, TokenLimits, ToolApprovalApp, ToolApprovalConfig, ToolApprovalContext, ToolApprovalDecision, ToolApprovalMode, ToolApprovalRequest, ToolCallMode, ToolCatalogEntry, ToolLoopCallbacks, ToolLoopOptions, ToolLoopResult, ToolMode, ToolPermission, ToolResultClearing, ToolRunContext, ToolSelectionStrategy, UsagePhase, VfsListener, VirtualFile, VirtualFileInfo, VirtualFileSystemOptions, WatchSessionOptions, WebLLMAppConfigLike, WebLLMModelOptions, WorkerLike, WorkerToParent };
5048
+ export { ACTION_RECORD_MAX_CHARS, ACTION_RECORD_NOTE, APP_SAMPLING_MAX_IMAGES, APP_SAMPLING_MAX_IMAGE_BYTES, APP_SAMPLING_MAX_INPUT_CHARS, APP_SAMPLING_MAX_MESSAGES, APP_SAMPLING_MAX_SYSTEM_CHARS, APP_SAMPLING_MAX_TOKENS, APP_SAMPLING_PER_APP, APP_SAMPLING_PER_MINUTE, APP_SAMPLING_REASONING_TOKENS, APP_SAMPLING_RPC_CODES, ASK_USER_DESCRIPTION_MAX_CHARS, ASK_USER_LABEL_MAX_CHARS, ASK_USER_MAX_OPTIONS, ASK_USER_MAX_PER_RUN, ASK_USER_MIN_OPTIONS, ASK_USER_OTHER_MAX_CHARS, ASK_USER_QUESTION_MAX_CHARS, ASK_USER_TIMEOUT_MAX_MS, ASK_USER_TIMEOUT_MS, ASK_USER_TOOL, AgentTool, AgentToolSet, AppSamplingError, AskUserInputError, AttachmentsNotSupportedError, ContextWindowExceededError, CredentialStore, DECISION_PROVIDERS, DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, EgressError, FILES_STORE, FIND_TOOLS_NAME, FORGET_SKILL_TOOL, IReferenceUse, ImagesNotSupportedError, IndexedDBRunStore, IndexedDBStore, KEYS_STORE, MODEL_TIERS, McpAppToolResult, McpElicitationReason, McpElicitationSchema, McpSkillConsent, McpSkillConsentView, MediaFitReference, MemoryRunStore, MemorySkillStore, MemoryStore, NO_ATTACHMENT_NOTE, PipelineDefinition, PipelineEvent, PipelineNode, PipelineNodeRunner, PipelineResult, PlanSchema, PlanStepSchema, RELAY_MAX_REPLAYS_PER_SECOND, RELAY_MAX_SENDS, RELAY_MAX_SEND_CHARS, RELAY_MAX_STRING, REPLAY_NOTE, RUNS_STORE, ReplanSchema, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_GOOGLE_DEFAULT_MODEL, SEARCH_GOOGLE_NOTE, SEARCH_MAX_NOTE_CHARS, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_SUMMARY_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SECRETS_STORE, SESSIONS_STORE, SESSION_LOCK_MODES, SKILL_TOOL_NAMES, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, STORAGE_CHANGE_KINDS, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SessionBusyError, SubagentSpawnError, TOOL_APPROVAL_MODES, TOOL_APPROVAL_TIMEOUT_MS, TOOL_SEARCH_WINDOW_SHARE, TieredPlanSchema, TieredPlanStepSchema, ToolBudgetError, ToolDeniedError, VfsSkillStore, VirtualFileSystem, WEBLLM_DEFAULT_CONTEXT_WINDOW, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, actionRecordOf, adoptSubagentEvent, appSamplingRequestOf, appSamplingText, askDecisionModel, attachmentKind, buildMediaModelFromSpec, buildModelFromStage, buildSearchRequest, bytesToBase64, checkAskUserAnswer, checkAskUserInput, checkEgressUrl, checkLimits, classifyAddress, cleanAskUserText, compactHistory, compactSteps, compressHistory, contextOverflowOf, contextWindowOf, createAgent, createAppSamplingLimiter, createEgressTools, createFileTools, createFindToolsTool, createGuardedFetch, createLearning, createLogger, createMedia, createPipeline, createPlan, createRunControl, createSearchTools, createSkillTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebLLMModel, createWebSearchTool, decideReplan, decideToolPermission, decisionEgressPolicy, decisionModelFromAiSdk, defaultPrompts, defineSkill, defineTool, directBrowserOk, dispatch, escalationReasonOf, messageTokens as estimateMessagesTokens, estimateTokens, executeStep, fileToolBindingOf, findSecret, fitCompactionToWindow, generate, generateStructured, hostMatches, htmlToText, isAttachmentRefusal, isCodeExecutionTool, isDirectModel, isEscalatableError, isImageRefusal, isProviderSpec, isReadOnlyTool, isReplayedToolOutput, isTextMime, isWebGPUAvailable, learnedPreamble, limitModelOutput, loadSkillFromUrl, looksLikeJson, markCodeExecution, markReadOnly, matchRule, mediaTypeOf, mergeProviderOptions, mimeFromPath, neutralizeActionRecords, nextStrongerTier, nodeResolver, normalizePath, normalizeSkillName, normalizeSteps, normalizeUsage, onStorageChange, openAgentWebDB, outputCapNotice, parseExecutorResponse, parsePlainText, parsePlannerResponse, parseReplannerResponse, parseSearchResponse, parseSkillMarkdown, pickPipelineRoute, pickTier, postStorageChange, preloadWebLLMModel, renderActiveSkills, renderCatalog, renderSearchCatalog, renderSkillIndex, replanWanted, resolveAppSampling, resolveBudgets, resolveCaching, resolveCompaction, resolveConfig, resolveDecisionModel, resolveDynamicSubagents, resolveEgressPolicy, resolveEscalation, resolveModel, resolveResume, resolveStage, resolveThinking, runToolLoop, sanitizeSearchResults, schemaHintOf, searchEgressPolicy, searchEngineAnswer, searchStatusMessage, searchToolResult, searchTools, searchUsageOf, selectToolMode, serveSubagentWorker, shouldReplan, skillPreamble, splitBlocker, stageOutputCap, stageReasons, stream, supportsImages, supportsNativeTools, supportsPdf, supportsStructuredOutput, synthesizeAnswer, thinkingFor, toFilePart, toImagePart, tokenize, toolCatalogOf, toolDefinitionTokens, toolRunContextOf, unloadWebLLMModel, watchSession, webLLMContextWindow, withActionRecord, withRollingBreakpoint, withSystem, withWebLLMContextWindow };
5049
+ export type { Agent, AgentContext, AgentEvent, AgentEventHandler, AgentLogger, AgentLoggerSink, AgentWebDBOptions, AppSamplingErrorCode, AppSamplingImage, AppSamplingMessage, AppSamplingOptions, AppSamplingRequest, AppSamplingResult, AppSamplingSettings, AppSamplingView, AppToolCallRequest, AskUserAction, AskUserAnswer, AskUserCheckedAnswer, AskUserConfig, AskUserContext, AskUserHandler, AskUserOption, AskUserQuestion, AskUserReason, AskUserRequest, AttachmentKind, BrowserAgentConfig, ClearedInfo, CompactOptions, CompactResult, CompactionConfig, CompressOptions, ContextStore, DecisionFallbackReason, DecisionPoint, EffectiveToolStrategy, EgressErrorCode, EscalationConfig, EscalationReason, ExecutorPromptContext, ExecutorResult, FileToolBinding, FileToolsOptions, GenerateOptions, GuardedFetch, IAiSdkDecisionOptions, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionModelSpec, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDynamicSubagentsConfig, IEgressPolicy, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaOptions, IMediaRun, IPlan, IPlanStep, IResolvedDynamicSubagents, IResolvedEgressPolicy, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISearchAnswer, ISearchConfig, ISearchEngineAnswer, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolResult, ISearchUsage, IStepEscalation, IStepResult, ISubagentsConfig, IToolCall, ITranscription, IUsage, IWebFetchOptions, IWebSearchOptions, IndexedDBRunStoreOptions, IndexedDBStoreOptions, Learning, LearningConfig, LimitBreach, LimitKind, LoadSkillOptions, LogLevel, McpSkillOrigin, MediaImageModel, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, MessageEndpoint, ModelInput, ModelTier, NodeResolverOptions, OutputCap, ParentToWorker, Phase, PhaseBudgets, Pipeline, PipelineOptions, PipelineRouteOptions, PipelineRouteResult, PipelineRunOptions, PlanShape, PlannerPromptContext, PlannerResult, PromptCachingSetting, PromptParts, Prompts, ProviderModelSpec, ProviderOptionsMap, ProviderType, ProxiedToolSpec, RawAction, ReplanDecision, ReplanMode, ReplanShape, ReplanTrigger, ReplannerPromptContext, ReplannerResult, ResolvedCaching, ResolvedCompaction, ResolvedConfig, ResolvedStage, ResolvedThinking, RunControl, RunFile, RunImage, RunOptions, RunPersistence, RunResult, RunSnapshot, RunStatus, RunStoreOptions, SandboxConfig, SandboxWorkerLike, SaveSkillInput, SearchEngine, SearchFreshness, SearchProvider, SearchToolsOptions, ServeSubagentOptions, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillOrigin, SkillStore, StageInput, StageOverride, StepComplexity, StorageChange, StorageChangeKind, StorageChangeOp, StoredMessage, StructuredResult, SubagentDefaultTools, SubagentInfo, SubagentProfile, SubagentToolOptions, SubagentWorkerConfig, SynthesizerPromptContext, ThinkingConfig, ThinkingLevel, ThinkingSetting, ThinkingStage, TierReason, TokenLimits, ToolApprovalApp, ToolApprovalConfig, ToolApprovalContext, ToolApprovalDecision, ToolApprovalMode, ToolApprovalRequest, ToolCallMode, ToolCatalogEntry, ToolLoopCallbacks, ToolLoopOptions, ToolLoopResult, ToolMode, ToolPermission, ToolResultClearing, ToolRunContext, ToolSelectionStrategy, UsagePhase, VfsListener, VirtualFile, VirtualFileInfo, VirtualFileSystemOptions, WatchSessionOptions, WebLLMAppConfigLike, WebLLMModelOptions, WorkerLike, WorkerToParent };