@dudko.dev/agent-web 0.0.47 → 0.0.49

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 (42) hide show
  1. package/README.md +13 -3
  2. package/dist/agent-web.js +137 -137
  3. package/dist/agent-web.js.map +1 -1
  4. package/dist/{chunk-Y6CD3WOK.js → chunk-6D4RB3H5.js} +11 -213
  5. package/dist/chunk-6D4RB3H5.js.map +1 -0
  6. package/dist/{chunk-PTJA7V23.js → chunk-6XHCPSZE.js} +5 -3
  7. package/dist/{chunk-PTJA7V23.js.map → chunk-6XHCPSZE.js.map} +1 -1
  8. package/dist/{chunk-Y4MIIBPB.js → chunk-7D2CJQB2.js} +1 -100
  9. package/dist/chunk-7D2CJQB2.js.map +1 -0
  10. package/dist/chunk-7Y5UC6L7.js +52 -0
  11. package/dist/chunk-7Y5UC6L7.js.map +1 -0
  12. package/dist/chunk-IT77BVAD.js +99 -0
  13. package/dist/chunk-IT77BVAD.js.map +1 -0
  14. package/dist/chunk-JTZEUPIG.js +217 -0
  15. package/dist/chunk-JTZEUPIG.js.map +1 -0
  16. package/dist/index.cjs +79 -27
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +72 -75
  19. package/dist/index.d.ts +72 -75
  20. package/dist/index.js +78 -71
  21. package/dist/index.js.map +1 -1
  22. package/dist/mcp.cjs +28 -20
  23. package/dist/mcp.cjs.map +1 -1
  24. package/dist/mcp.d.cts +4 -3
  25. package/dist/mcp.d.ts +4 -3
  26. package/dist/mcp.js +9 -5
  27. package/dist/mcp.js.map +1 -1
  28. package/dist/{sandbox-ZXWD5IWZ.js → sandbox-IGTCMOOX.js} +4 -3
  29. package/dist/{sandbox-ZXWD5IWZ.js.map → sandbox-IGTCMOOX.js.map} +1 -1
  30. package/dist/secrets.cjs +329 -0
  31. package/dist/secrets.cjs.map +1 -0
  32. package/dist/secrets.d.cts +63 -0
  33. package/dist/secrets.d.ts +63 -0
  34. package/dist/secrets.js +20 -0
  35. package/dist/secrets.js.map +1 -0
  36. package/dist/{vault-Mar2CY0J.d.ts → skills-ufoyTJ-B.d.cts} +2 -36
  37. package/dist/{vault-Mar2CY0J.d.cts → skills-ufoyTJ-B.d.ts} +2 -36
  38. package/dist/vault-BBGybouF.d.cts +35 -0
  39. package/dist/vault-BBGybouF.d.ts +35 -0
  40. package/package.json +11 -1
  41. package/dist/chunk-Y4MIIBPB.js.map +0 -1
  42. package/dist/chunk-Y6CD3WOK.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,11 +1,14 @@
1
1
  import { LanguageModel, Experimental_DecisionModel, Tool, ToolSet, FilePart, ImageModel, SpeechModel, TranscriptionModel, SystemModelMessage, ModelMessage, generateText, streamText } from 'ai';
2
- import { M as McpSkillConsentView, a as McpElicitationSchema, b as McpElicitationReason, c as McpAppToolResult, V as VaultOptions, d as McpSkillSource, e as McpSkillConsent, f as McpSkillGrants, g as McpSkillRunConsent, h as McpSkillSnapshotMemory } from './vault-Mar2CY0J.cjs';
3
- export { I as IndexedDBVault, i as MCP_APPS_EXTENSION, j as MCP_APP_MAX_HTML_CHARS, k as MCP_APP_MAX_RESULT_CHARS, l as MCP_APP_MIME_TYPE, m as MCP_SKILLS_EXTENSION, n as MCP_SKILLS_MAX_PER_SERVER, o as MCP_SKILLS_MAX_TOTAL, p as MCP_SKILL_BODY_MAX_CHARS, q as MCP_SKILL_CONSENTS, r as MCP_SKILL_CONSENT_DEFAULT, s as MCP_SKILL_DESCRIPTION_MAX_CHARS, t as MCP_SKILL_DIRECTORY_ENTRIES_MAX, u as MCP_SKILL_FILE_MAX_CHARS, v as MCP_SKILL_MAX_RESOURCES, w as MCP_SKILL_MAX_TOTAL_BYTES, x as MCP_SKILL_SNAPSHOTS_MAX_BYTES, y as MCP_SKILL_SNAPSHOT_MAX_DEPTH, z as MCP_SKILL_SNAPSHOT_MAX_DIRECTORIES, A as MCP_SKILL_URI_MAX_CHARS, B as McpAppCsp, C as McpAppPermissions, D as McpAppResource, E as McpAppVisibility, F as McpElicitationFieldSchema, G as McpSkillsOptions, H as McpSkillsSetting, S as SkillDirectoryListing, J as mcpAppOrigin, K as mcpSkillEntryRefusal, L as mcpSkillPreamble, N as mcpSkillUriRefusal } from './vault-Mar2CY0J.cjs';
2
+ import { P as McpSkillConsentView, B as McpElicitationSchema, y as McpElicitationReason, e as McpAppToolResult, Q as McpSkillSource, R as McpSkillConsent, S as McpSkillGrants, T as McpSkillRunConsent, U as McpSkillSnapshotMemory } from './skills-ufoyTJ-B.cjs';
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 { CredentialStore } from './secrets.cjs';
7
+ export { EncryptedBlob, MemoryCredentialStore, VaultCredentialStore, decryptJSON, encryptJSON, getOrCreateVaultKey } from './secrets.cjs';
6
8
  import { A as AgentToolSet, a as AgentTool } from './types-DwSMj_Xs.cjs';
7
9
  export { p as promptHintOf } from './types-DwSMj_Xs.cjs';
8
10
  import { z, ZodType } from 'zod';
11
+ export { I as IndexedDBVault, V as VaultOptions } from './vault-BBGybouF.cjs';
9
12
  import { IDBPDatabase } from 'idb';
10
13
 
11
14
  /** Executor models by strength (`config.executorTiers`), weakest first. */
@@ -1688,40 +1691,6 @@ declare const defaultPrompts: Prompts;
1688
1691
  /** Prepend a host-supplied systemPrompt to a phase system prompt, if present. */
1689
1692
  declare const withSystem: (base: string, extra?: string) => string;
1690
1693
 
1691
- /**
1692
- * The seam the provider registry uses to fetch API keys at model-build time.
1693
- * Swap in any backend: the encrypted vault (default), an in-memory map (tests /
1694
- * SSR), or a `fetch` to your own short-lived-token endpoint.
1695
- */
1696
- interface CredentialStore {
1697
- getApiKey(ref: string): Promise<string | undefined>;
1698
- setApiKey(ref: string, key: string): Promise<void>;
1699
- deleteApiKey(ref: string): Promise<void>;
1700
- }
1701
- /**
1702
- * Default CredentialStore: encrypted, IndexedDB-backed (see IndexedDBVault). Every tab of the
1703
- * origin shares it: a key stored or removed tells the other tabs that SOMETHING changed (a
1704
- * `credentials` notice: no ref, never a key - see `onStorageChange`).
1705
- */
1706
- declare class VaultCredentialStore implements CredentialStore {
1707
- /** The database the vault lives in, and the name its change notices go out under. */
1708
- readonly dbName: string;
1709
- private readonly vault;
1710
- private readonly tab;
1711
- constructor(opts?: VaultOptions);
1712
- getApiKey(ref: string): Promise<string | undefined>;
1713
- setApiKey(ref: string, key: string): Promise<void>;
1714
- deleteApiKey(ref: string): Promise<void>;
1715
- }
1716
- /** Non-persistent CredentialStore for tests / SSR / ephemeral sessions. */
1717
- declare class MemoryCredentialStore implements CredentialStore {
1718
- private readonly map;
1719
- constructor(initial?: Record<string, string>);
1720
- getApiKey(ref: string): Promise<string | undefined>;
1721
- setApiKey(ref: string, key: string): Promise<void>;
1722
- deleteApiKey(ref: string): Promise<void>;
1723
- }
1724
-
1725
1694
  /**
1726
1695
  * A small virtual file system for the browser — the agent's (and the user's)
1727
1696
  * workspace: attachments the user drops in, reports the agent writes, images
@@ -2269,10 +2238,29 @@ interface ISearchOptions {
2269
2238
  signal?: AbortSignal;
2270
2239
  }
2271
2240
  /**
2272
- * A search engine of the host's own: any function that answers a query with results. What it
2273
- * returns is treated like a built-in adapter's answer - cleaned, capped and filtered.
2241
+ * What a search engine function may answer in place of a bare list, when the search ran through a
2242
+ * model - a provider's server-side search tool, one model call: the results, what the call spent,
2243
+ * the model's own answer and a line on what the results are. Every field is checked as the rest of
2244
+ * an engine's answer is (`searchEngineAnswer`).
2274
2245
  */
2275
- type SearchEngine = (query: string, options: ISearchOptions) => Promise<ISearchResult[]>;
2246
+ interface ISearchEngineAnswer {
2247
+ results: ISearchResult[];
2248
+ /**
2249
+ * The model tokens the search spent, as its API reported them: charged to the run like the
2250
+ * google provider's (a `usage` event of phase 'search', in every total and against the limits).
2251
+ */
2252
+ usage?: ISearchUsage;
2253
+ /** The model's answer from its sources: the model sees it, cut, when no result has a snippet. */
2254
+ summary?: string;
2255
+ /** One line on what the results are - whose search, what the snippets are - for the model. */
2256
+ note?: string;
2257
+ }
2258
+ /**
2259
+ * A search engine of the host's own: any function that answers a query with results - a bare
2260
+ * list, or an `ISearchEngineAnswer` with what the search spent. What it returns is treated like a
2261
+ * built-in adapter's answer - cleaned, capped and filtered.
2262
+ */
2263
+ type SearchEngine = (query: string, options: ISearchOptions) => Promise<ISearchResult[] | ISearchEngineAnswer>;
2276
2264
  /**
2277
2265
  * The built-in provider. One: Google Search through the Gemini API's grounding (`google_search`),
2278
2266
  * which needs a Gemini (Google AI Studio) key and nothing else. Any other search API is the
@@ -2289,6 +2277,8 @@ declare const SEARCH_API_BASE_URL: Record<SearchProvider, string>;
2289
2277
  declare const SEARCH_GOOGLE_DEFAULT_MODEL = "gemini-2.5-flash-lite";
2290
2278
  /** The most of the grounding model's answer a model sees as `summary`. */
2291
2279
  declare const SEARCH_MAX_SUMMARY_CHARS = 1000;
2280
+ /** The most of a result list's `note` (what the results are) a model sees. */
2281
+ declare const SEARCH_MAX_NOTE_CHARS = 300;
2292
2282
  /** Said in every result of the google provider: what its URLs and its text are. */
2293
2283
  declare const SEARCH_GOOGLE_NOTE: string;
2294
2284
  /** One HTTP call to a search API. The key, if any, is in `headers` only - never in the URL. */
@@ -2324,6 +2314,8 @@ interface ISearchAnswer {
2324
2314
  summary?: unknown;
2325
2315
  /** Absent when the API reported none. */
2326
2316
  usage?: ISearchUsage;
2317
+ /** What the results are (the google provider's `SEARCH_GOOGLE_NOTE`, an engine's own line). */
2318
+ note?: string;
2327
2319
  }
2328
2320
  /**
2329
2321
  * The request for one query, per the Gemini API's public documentation:
@@ -2341,6 +2333,18 @@ declare const buildSearchRequest: (input: ISearchRequestInput) => ISearchRequest
2341
2333
  * what makes them safe to show.
2342
2334
  */
2343
2335
  declare const parseSearchResponse: (provider: SearchProvider, json: unknown) => ISearchAnswer;
2336
+ /**
2337
+ * What a search spent, as an engine reported it: whole non-negative token counts (anything else
2338
+ * is 0), the total their sum, reasoning never more than the output. Undefined when it spent none.
2339
+ */
2340
+ declare const searchUsageOf: (raw: unknown) => ISearchUsage | undefined;
2341
+ /**
2342
+ * An engine's answer as the tool reads it. A bare list is the results and nothing else (no usage,
2343
+ * no summary, no note); an `ISearchEngineAnswer` gives its `results` and - checked - its usage
2344
+ * (`searchUsageOf`), its summary (a string; cleaned and cut when it is shown) and its note (cleaned
2345
+ * and cut here). Anything else is no results. Still raw until `sanitizeSearchResults`.
2346
+ */
2347
+ declare const searchEngineAnswer: (raw: unknown) => ISearchAnswer;
2344
2348
  /**
2345
2349
  * What a failed call says to the model: the provider, the model, the status, the API's own error
2346
2350
  * code word and what it usually means. Never the error's text: that is third-party text, and may
@@ -2368,18 +2372,19 @@ declare const sanitizeSearchResults: (raw: unknown, options?: {
2368
2372
  interface ISearchToolResult {
2369
2373
  query: string;
2370
2374
  results: ISearchResult[];
2371
- /** The google provider, when no source came with a snippet: the grounding model's answer, cut. */
2375
+ /** When no source came with a snippet: the grounding (or engine's) model's answer, cut. */
2372
2376
  summary?: string;
2373
- /** The google provider: what its URLs and its text are. */
2377
+ /** What the URLs and the text are: the google provider's note, or an engine's own line. */
2374
2378
  note?: string;
2375
2379
  filtered?: number;
2376
2380
  truncated?: true;
2377
2381
  untrusted: true;
2378
2382
  }
2379
2383
  /**
2380
- * The tool's result, from the cleaned list and - for the google provider - the parsed answer.
2381
- * The model's `summary` is attached only when there are sources, none of them carries a snippet
2382
- * and none was filtered out: a summary cannot be cut to the sources that remain.
2384
+ * The tool's result, from the cleaned list and the parsed answer (the google provider's, or an
2385
+ * engine's `searchEngineAnswer`). The model's `summary` is attached only when there are sources,
2386
+ * none of them carries a snippet and none was filtered out: a summary cannot be cut to the sources
2387
+ * that remain. The answer's `note` goes with every result list, cleaned and cut.
2383
2388
  */
2384
2389
  declare const searchToolResult: (query: string, clean: ISanitizedSearch, answer?: ISearchAnswer) => ISearchToolResult;
2385
2390
 
@@ -2396,7 +2401,9 @@ interface ISearchConfig {
2396
2401
  /**
2397
2402
  * A search engine of your own: `(query, { maxResults, freshness, signal }) => results`. Its
2398
2403
  * requests are yours (like a tool you pass); its results are cleaned, capped and filtered like
2399
- * the provider's. Exactly one of `engine` / `provider`.
2404
+ * the provider's. It may answer `{ results, usage?, summary?, note? }` instead of a bare list:
2405
+ * `usage` (the tokens a search through a model spent) is charged to the run as phase 'search'.
2406
+ * Exactly one of `engine` / `provider`.
2400
2407
  */
2401
2408
  engine?: SearchEngine;
2402
2409
  /**
@@ -4433,29 +4440,6 @@ declare const supportsImages: (model: unknown) => boolean | undefined;
4433
4440
  */
4434
4441
  declare const supportsPdf: (model: unknown) => boolean | undefined;
4435
4442
 
4436
- /**
4437
- * Fetch (or lazily create) the vault's AES-GCM key. The key is generated
4438
- * NON-EXTRACTABLE and stored as a live `CryptoKey` in IndexedDB — a CryptoKey
4439
- * is structured-cloneable, so it persists across reloads WITHOUT its raw bytes
4440
- * ever being exposed to JavaScript. Not even in-page script can read it out; it
4441
- * can only be used to encrypt / decrypt. That is what makes at-rest storage of
4442
- * the secrets meaningful (see IndexedDBVault's threat model).
4443
- *
4444
- * Concurrent callers share one in-flight promise per DB, and creation is
4445
- * double-checked in a single IDB transaction, so two racing writers can never
4446
- * end up encrypting under different keys.
4447
- */
4448
- declare const getOrCreateVaultKey: (dbName?: string) => Promise<CryptoKey>;
4449
- interface EncryptedBlob {
4450
- /** 96-bit random IV, fresh per write. */
4451
- iv: Uint8Array;
4452
- ciphertext: ArrayBuffer;
4453
- }
4454
- /** Encrypt a JSON-serialisable value with a fresh 96-bit IV (AES-GCM). */
4455
- declare const encryptJSON: (key: CryptoKey, value: unknown) => Promise<EncryptedBlob>;
4456
- /** Decrypt a blob produced by encryptJSON. Throws if the key or blob don't match. */
4457
- declare const decryptJSON: <T = unknown>(key: CryptoKey, blob: EncryptedBlob) => Promise<T>;
4458
-
4459
4443
  interface AgentWebDBOptions {
4460
4444
  /** Database name (default 'agent-web'). Use a distinct name to isolate apps. */
4461
4445
  dbName?: string;
@@ -4471,6 +4455,16 @@ declare const RUNS_STORE = "runs";
4471
4455
  * lives under ONE database name + version. Centralising `openDB` here prevents
4472
4456
  * the classic bug where two modules open the same DB name with different store
4473
4457
  * sets and the second call throws a VersionError.
4458
+ *
4459
+ * One connection per name, shared by every store of the page - and never in another tab's way:
4460
+ * when another connection asks to delete or upgrade the database (`versionchange`: another tab's
4461
+ * `indexedDB.deleteDatabase`, or a newer copy of this package), this one is closed at once, so
4462
+ * that request goes ahead instead of waiting (blocked) for this tab to close. The browser lets the
4463
+ * transactions already under way finish first. A connection the browser closed by itself (site
4464
+ * data cleared, storage gone) is let go too. Either way the next use opens the database again:
4465
+ * after a deletion that is a NEW, EMPTY database at this version (every store of this package
4466
+ * starts from nothing - no key, no secret, no session, no file); after an upgrade by a newer copy,
4467
+ * the open fails with a `VersionError` until the page is reloaded with that copy.
4474
4468
  */
4475
4469
  declare const openAgentWebDB: (opts?: AgentWebDBOptions) => Promise<IDBPDatabase>;
4476
4470
 
@@ -4974,8 +4968,10 @@ declare class IndexedDBRunStore implements RunPersistence {
4974
4968
  * - `skills` - `VfsSkillStore` (the agent's lessons): `key` = the lesson's name, `namespace` =
4975
4969
  * the store's folder.
4976
4970
  * - `chats` - the React package's `ChatHistoryStore`: `key` = the chat id.
4971
+ * - `host` - a store of the host's own that is none of the above (`postStorageChange`): `key` =
4972
+ * which record, `namespace` = which of the host's stores - names the host chose, never a value.
4977
4973
  */
4978
- type StorageChangeKind = 'credentials' | 'oauth' | 'files' | 'session' | 'runs' | 'skills' | 'chats';
4974
+ type StorageChangeKind = 'credentials' | 'oauth' | 'files' | 'session' | 'runs' | 'skills' | 'chats' | 'host';
4979
4975
  /** `put` = written (created or replaced), `delete` = one removed, `clear` = all of them removed. */
4980
4976
  type StorageChangeOp = 'put' | 'delete' | 'clear';
4981
4977
  interface StorageChange {
@@ -4983,15 +4979,16 @@ interface StorageChange {
4983
4979
  op: StorageChangeOp;
4984
4980
  /** Which one (see `StorageChangeKind`); absent for `clear` and for the kinds that carry none. */
4985
4981
  key?: string;
4986
- /** `files`: the file system's namespace; `skills`: the store's folder. */
4982
+ /** `files`: the file system's namespace; `skills`: the store's folder; `host`: which store. */
4987
4983
  namespace?: string;
4988
4984
  }
4989
4985
  declare const STORAGE_CHANGE_KINDS: readonly StorageChangeKind[];
4990
4986
  /**
4991
4987
  * Tell the other tabs that a store in database `dbName` changed - for a store of your own on
4992
- * IndexedDB (the built-in ones post their own). Call it AFTER the write committed. Never put a
4993
- * value in it: a notice says which, not what. A no-op without `dbName` or BroadcastChannel; a
4994
- * notice of the wrong shape is dropped.
4988
+ * IndexedDB (the built-in ones post their own): one of the built-in kinds when it keeps that kind
4989
+ * of thing, `host` for anything else (`namespace` names which of your stores, `key` which record).
4990
+ * Call it AFTER the write committed. Never put a value in it: a notice says which, not what. A
4991
+ * no-op without `dbName` or BroadcastChannel; a notice of the wrong shape is dropped.
4995
4992
  */
4996
4993
  declare const postStorageChange: (dbName: string | undefined, change: StorageChange) => void;
4997
4994
  /**
@@ -5002,5 +4999,5 @@ declare const postStorageChange: (dbName: string | undefined, change: StorageCha
5002
4999
  */
5003
5000
  declare const onStorageChange: (dbName: string | undefined, listener: (change: StorageChange) => void) => (() => void);
5004
5001
 
5005
- 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, 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, MemoryCredentialStore, 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_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, VaultCredentialStore, VaultOptions, 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, decryptJSON, defaultPrompts, defineSkill, defineTool, directBrowserOk, dispatch, encryptJSON, escalationReasonOf, messageTokens as estimateMessagesTokens, estimateTokens, executeStep, fileToolBindingOf, findSecret, fitCompactionToWindow, generate, generateStructured, getOrCreateVaultKey, 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, searchStatusMessage, searchToolResult, searchTools, 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 };
5006
- 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, CredentialStore, DecisionFallbackReason, DecisionPoint, EffectiveToolStrategy, EgressErrorCode, EncryptedBlob, 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, 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  import { LanguageModel, Experimental_DecisionModel, Tool, ToolSet, FilePart, ImageModel, SpeechModel, TranscriptionModel, SystemModelMessage, ModelMessage, generateText, streamText } from 'ai';
2
- import { M as McpSkillConsentView, a as McpElicitationSchema, b as McpElicitationReason, c as McpAppToolResult, V as VaultOptions, d as McpSkillSource, e as McpSkillConsent, f as McpSkillGrants, g as McpSkillRunConsent, h as McpSkillSnapshotMemory } from './vault-Mar2CY0J.js';
3
- export { I as IndexedDBVault, i as MCP_APPS_EXTENSION, j as MCP_APP_MAX_HTML_CHARS, k as MCP_APP_MAX_RESULT_CHARS, l as MCP_APP_MIME_TYPE, m as MCP_SKILLS_EXTENSION, n as MCP_SKILLS_MAX_PER_SERVER, o as MCP_SKILLS_MAX_TOTAL, p as MCP_SKILL_BODY_MAX_CHARS, q as MCP_SKILL_CONSENTS, r as MCP_SKILL_CONSENT_DEFAULT, s as MCP_SKILL_DESCRIPTION_MAX_CHARS, t as MCP_SKILL_DIRECTORY_ENTRIES_MAX, u as MCP_SKILL_FILE_MAX_CHARS, v as MCP_SKILL_MAX_RESOURCES, w as MCP_SKILL_MAX_TOTAL_BYTES, x as MCP_SKILL_SNAPSHOTS_MAX_BYTES, y as MCP_SKILL_SNAPSHOT_MAX_DEPTH, z as MCP_SKILL_SNAPSHOT_MAX_DIRECTORIES, A as MCP_SKILL_URI_MAX_CHARS, B as McpAppCsp, C as McpAppPermissions, D as McpAppResource, E as McpAppVisibility, F as McpElicitationFieldSchema, G as McpSkillsOptions, H as McpSkillsSetting, S as SkillDirectoryListing, J as mcpAppOrigin, K as mcpSkillEntryRefusal, L as mcpSkillPreamble, N as mcpSkillUriRefusal } from './vault-Mar2CY0J.js';
2
+ import { P as McpSkillConsentView, B as McpElicitationSchema, y as McpElicitationReason, e as McpAppToolResult, Q as McpSkillSource, R as McpSkillConsent, S as McpSkillGrants, T as McpSkillRunConsent, U as McpSkillSnapshotMemory } from './skills-ufoyTJ-B.js';
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 { CredentialStore } from './secrets.js';
7
+ export { EncryptedBlob, MemoryCredentialStore, VaultCredentialStore, decryptJSON, encryptJSON, getOrCreateVaultKey } from './secrets.js';
6
8
  import { A as AgentToolSet, a as AgentTool } from './types-DwSMj_Xs.js';
7
9
  export { p as promptHintOf } from './types-DwSMj_Xs.js';
8
10
  import { z, ZodType } from 'zod';
11
+ export { I as IndexedDBVault, V as VaultOptions } from './vault-BBGybouF.js';
9
12
  import { IDBPDatabase } from 'idb';
10
13
 
11
14
  /** Executor models by strength (`config.executorTiers`), weakest first. */
@@ -1688,40 +1691,6 @@ declare const defaultPrompts: Prompts;
1688
1691
  /** Prepend a host-supplied systemPrompt to a phase system prompt, if present. */
1689
1692
  declare const withSystem: (base: string, extra?: string) => string;
1690
1693
 
1691
- /**
1692
- * The seam the provider registry uses to fetch API keys at model-build time.
1693
- * Swap in any backend: the encrypted vault (default), an in-memory map (tests /
1694
- * SSR), or a `fetch` to your own short-lived-token endpoint.
1695
- */
1696
- interface CredentialStore {
1697
- getApiKey(ref: string): Promise<string | undefined>;
1698
- setApiKey(ref: string, key: string): Promise<void>;
1699
- deleteApiKey(ref: string): Promise<void>;
1700
- }
1701
- /**
1702
- * Default CredentialStore: encrypted, IndexedDB-backed (see IndexedDBVault). Every tab of the
1703
- * origin shares it: a key stored or removed tells the other tabs that SOMETHING changed (a
1704
- * `credentials` notice: no ref, never a key - see `onStorageChange`).
1705
- */
1706
- declare class VaultCredentialStore implements CredentialStore {
1707
- /** The database the vault lives in, and the name its change notices go out under. */
1708
- readonly dbName: string;
1709
- private readonly vault;
1710
- private readonly tab;
1711
- constructor(opts?: VaultOptions);
1712
- getApiKey(ref: string): Promise<string | undefined>;
1713
- setApiKey(ref: string, key: string): Promise<void>;
1714
- deleteApiKey(ref: string): Promise<void>;
1715
- }
1716
- /** Non-persistent CredentialStore for tests / SSR / ephemeral sessions. */
1717
- declare class MemoryCredentialStore implements CredentialStore {
1718
- private readonly map;
1719
- constructor(initial?: Record<string, string>);
1720
- getApiKey(ref: string): Promise<string | undefined>;
1721
- setApiKey(ref: string, key: string): Promise<void>;
1722
- deleteApiKey(ref: string): Promise<void>;
1723
- }
1724
-
1725
1694
  /**
1726
1695
  * A small virtual file system for the browser — the agent's (and the user's)
1727
1696
  * workspace: attachments the user drops in, reports the agent writes, images
@@ -2269,10 +2238,29 @@ interface ISearchOptions {
2269
2238
  signal?: AbortSignal;
2270
2239
  }
2271
2240
  /**
2272
- * A search engine of the host's own: any function that answers a query with results. What it
2273
- * returns is treated like a built-in adapter's answer - cleaned, capped and filtered.
2241
+ * What a search engine function may answer in place of a bare list, when the search ran through a
2242
+ * model - a provider's server-side search tool, one model call: the results, what the call spent,
2243
+ * the model's own answer and a line on what the results are. Every field is checked as the rest of
2244
+ * an engine's answer is (`searchEngineAnswer`).
2274
2245
  */
2275
- type SearchEngine = (query: string, options: ISearchOptions) => Promise<ISearchResult[]>;
2246
+ interface ISearchEngineAnswer {
2247
+ results: ISearchResult[];
2248
+ /**
2249
+ * The model tokens the search spent, as its API reported them: charged to the run like the
2250
+ * google provider's (a `usage` event of phase 'search', in every total and against the limits).
2251
+ */
2252
+ usage?: ISearchUsage;
2253
+ /** The model's answer from its sources: the model sees it, cut, when no result has a snippet. */
2254
+ summary?: string;
2255
+ /** One line on what the results are - whose search, what the snippets are - for the model. */
2256
+ note?: string;
2257
+ }
2258
+ /**
2259
+ * A search engine of the host's own: any function that answers a query with results - a bare
2260
+ * list, or an `ISearchEngineAnswer` with what the search spent. What it returns is treated like a
2261
+ * built-in adapter's answer - cleaned, capped and filtered.
2262
+ */
2263
+ type SearchEngine = (query: string, options: ISearchOptions) => Promise<ISearchResult[] | ISearchEngineAnswer>;
2276
2264
  /**
2277
2265
  * The built-in provider. One: Google Search through the Gemini API's grounding (`google_search`),
2278
2266
  * which needs a Gemini (Google AI Studio) key and nothing else. Any other search API is the
@@ -2289,6 +2277,8 @@ declare const SEARCH_API_BASE_URL: Record<SearchProvider, string>;
2289
2277
  declare const SEARCH_GOOGLE_DEFAULT_MODEL = "gemini-2.5-flash-lite";
2290
2278
  /** The most of the grounding model's answer a model sees as `summary`. */
2291
2279
  declare const SEARCH_MAX_SUMMARY_CHARS = 1000;
2280
+ /** The most of a result list's `note` (what the results are) a model sees. */
2281
+ declare const SEARCH_MAX_NOTE_CHARS = 300;
2292
2282
  /** Said in every result of the google provider: what its URLs and its text are. */
2293
2283
  declare const SEARCH_GOOGLE_NOTE: string;
2294
2284
  /** One HTTP call to a search API. The key, if any, is in `headers` only - never in the URL. */
@@ -2324,6 +2314,8 @@ interface ISearchAnswer {
2324
2314
  summary?: unknown;
2325
2315
  /** Absent when the API reported none. */
2326
2316
  usage?: ISearchUsage;
2317
+ /** What the results are (the google provider's `SEARCH_GOOGLE_NOTE`, an engine's own line). */
2318
+ note?: string;
2327
2319
  }
2328
2320
  /**
2329
2321
  * The request for one query, per the Gemini API's public documentation:
@@ -2341,6 +2333,18 @@ declare const buildSearchRequest: (input: ISearchRequestInput) => ISearchRequest
2341
2333
  * what makes them safe to show.
2342
2334
  */
2343
2335
  declare const parseSearchResponse: (provider: SearchProvider, json: unknown) => ISearchAnswer;
2336
+ /**
2337
+ * What a search spent, as an engine reported it: whole non-negative token counts (anything else
2338
+ * is 0), the total their sum, reasoning never more than the output. Undefined when it spent none.
2339
+ */
2340
+ declare const searchUsageOf: (raw: unknown) => ISearchUsage | undefined;
2341
+ /**
2342
+ * An engine's answer as the tool reads it. A bare list is the results and nothing else (no usage,
2343
+ * no summary, no note); an `ISearchEngineAnswer` gives its `results` and - checked - its usage
2344
+ * (`searchUsageOf`), its summary (a string; cleaned and cut when it is shown) and its note (cleaned
2345
+ * and cut here). Anything else is no results. Still raw until `sanitizeSearchResults`.
2346
+ */
2347
+ declare const searchEngineAnswer: (raw: unknown) => ISearchAnswer;
2344
2348
  /**
2345
2349
  * What a failed call says to the model: the provider, the model, the status, the API's own error
2346
2350
  * code word and what it usually means. Never the error's text: that is third-party text, and may
@@ -2368,18 +2372,19 @@ declare const sanitizeSearchResults: (raw: unknown, options?: {
2368
2372
  interface ISearchToolResult {
2369
2373
  query: string;
2370
2374
  results: ISearchResult[];
2371
- /** The google provider, when no source came with a snippet: the grounding model's answer, cut. */
2375
+ /** When no source came with a snippet: the grounding (or engine's) model's answer, cut. */
2372
2376
  summary?: string;
2373
- /** The google provider: what its URLs and its text are. */
2377
+ /** What the URLs and the text are: the google provider's note, or an engine's own line. */
2374
2378
  note?: string;
2375
2379
  filtered?: number;
2376
2380
  truncated?: true;
2377
2381
  untrusted: true;
2378
2382
  }
2379
2383
  /**
2380
- * The tool's result, from the cleaned list and - for the google provider - the parsed answer.
2381
- * The model's `summary` is attached only when there are sources, none of them carries a snippet
2382
- * and none was filtered out: a summary cannot be cut to the sources that remain.
2384
+ * The tool's result, from the cleaned list and the parsed answer (the google provider's, or an
2385
+ * engine's `searchEngineAnswer`). The model's `summary` is attached only when there are sources,
2386
+ * none of them carries a snippet and none was filtered out: a summary cannot be cut to the sources
2387
+ * that remain. The answer's `note` goes with every result list, cleaned and cut.
2383
2388
  */
2384
2389
  declare const searchToolResult: (query: string, clean: ISanitizedSearch, answer?: ISearchAnswer) => ISearchToolResult;
2385
2390
 
@@ -2396,7 +2401,9 @@ interface ISearchConfig {
2396
2401
  /**
2397
2402
  * A search engine of your own: `(query, { maxResults, freshness, signal }) => results`. Its
2398
2403
  * requests are yours (like a tool you pass); its results are cleaned, capped and filtered like
2399
- * the provider's. Exactly one of `engine` / `provider`.
2404
+ * the provider's. It may answer `{ results, usage?, summary?, note? }` instead of a bare list:
2405
+ * `usage` (the tokens a search through a model spent) is charged to the run as phase 'search'.
2406
+ * Exactly one of `engine` / `provider`.
2400
2407
  */
2401
2408
  engine?: SearchEngine;
2402
2409
  /**
@@ -4433,29 +4440,6 @@ declare const supportsImages: (model: unknown) => boolean | undefined;
4433
4440
  */
4434
4441
  declare const supportsPdf: (model: unknown) => boolean | undefined;
4435
4442
 
4436
- /**
4437
- * Fetch (or lazily create) the vault's AES-GCM key. The key is generated
4438
- * NON-EXTRACTABLE and stored as a live `CryptoKey` in IndexedDB — a CryptoKey
4439
- * is structured-cloneable, so it persists across reloads WITHOUT its raw bytes
4440
- * ever being exposed to JavaScript. Not even in-page script can read it out; it
4441
- * can only be used to encrypt / decrypt. That is what makes at-rest storage of
4442
- * the secrets meaningful (see IndexedDBVault's threat model).
4443
- *
4444
- * Concurrent callers share one in-flight promise per DB, and creation is
4445
- * double-checked in a single IDB transaction, so two racing writers can never
4446
- * end up encrypting under different keys.
4447
- */
4448
- declare const getOrCreateVaultKey: (dbName?: string) => Promise<CryptoKey>;
4449
- interface EncryptedBlob {
4450
- /** 96-bit random IV, fresh per write. */
4451
- iv: Uint8Array;
4452
- ciphertext: ArrayBuffer;
4453
- }
4454
- /** Encrypt a JSON-serialisable value with a fresh 96-bit IV (AES-GCM). */
4455
- declare const encryptJSON: (key: CryptoKey, value: unknown) => Promise<EncryptedBlob>;
4456
- /** Decrypt a blob produced by encryptJSON. Throws if the key or blob don't match. */
4457
- declare const decryptJSON: <T = unknown>(key: CryptoKey, blob: EncryptedBlob) => Promise<T>;
4458
-
4459
4443
  interface AgentWebDBOptions {
4460
4444
  /** Database name (default 'agent-web'). Use a distinct name to isolate apps. */
4461
4445
  dbName?: string;
@@ -4471,6 +4455,16 @@ declare const RUNS_STORE = "runs";
4471
4455
  * lives under ONE database name + version. Centralising `openDB` here prevents
4472
4456
  * the classic bug where two modules open the same DB name with different store
4473
4457
  * sets and the second call throws a VersionError.
4458
+ *
4459
+ * One connection per name, shared by every store of the page - and never in another tab's way:
4460
+ * when another connection asks to delete or upgrade the database (`versionchange`: another tab's
4461
+ * `indexedDB.deleteDatabase`, or a newer copy of this package), this one is closed at once, so
4462
+ * that request goes ahead instead of waiting (blocked) for this tab to close. The browser lets the
4463
+ * transactions already under way finish first. A connection the browser closed by itself (site
4464
+ * data cleared, storage gone) is let go too. Either way the next use opens the database again:
4465
+ * after a deletion that is a NEW, EMPTY database at this version (every store of this package
4466
+ * starts from nothing - no key, no secret, no session, no file); after an upgrade by a newer copy,
4467
+ * the open fails with a `VersionError` until the page is reloaded with that copy.
4474
4468
  */
4475
4469
  declare const openAgentWebDB: (opts?: AgentWebDBOptions) => Promise<IDBPDatabase>;
4476
4470
 
@@ -4974,8 +4968,10 @@ declare class IndexedDBRunStore implements RunPersistence {
4974
4968
  * - `skills` - `VfsSkillStore` (the agent's lessons): `key` = the lesson's name, `namespace` =
4975
4969
  * the store's folder.
4976
4970
  * - `chats` - the React package's `ChatHistoryStore`: `key` = the chat id.
4971
+ * - `host` - a store of the host's own that is none of the above (`postStorageChange`): `key` =
4972
+ * which record, `namespace` = which of the host's stores - names the host chose, never a value.
4977
4973
  */
4978
- type StorageChangeKind = 'credentials' | 'oauth' | 'files' | 'session' | 'runs' | 'skills' | 'chats';
4974
+ type StorageChangeKind = 'credentials' | 'oauth' | 'files' | 'session' | 'runs' | 'skills' | 'chats' | 'host';
4979
4975
  /** `put` = written (created or replaced), `delete` = one removed, `clear` = all of them removed. */
4980
4976
  type StorageChangeOp = 'put' | 'delete' | 'clear';
4981
4977
  interface StorageChange {
@@ -4983,15 +4979,16 @@ interface StorageChange {
4983
4979
  op: StorageChangeOp;
4984
4980
  /** Which one (see `StorageChangeKind`); absent for `clear` and for the kinds that carry none. */
4985
4981
  key?: string;
4986
- /** `files`: the file system's namespace; `skills`: the store's folder. */
4982
+ /** `files`: the file system's namespace; `skills`: the store's folder; `host`: which store. */
4987
4983
  namespace?: string;
4988
4984
  }
4989
4985
  declare const STORAGE_CHANGE_KINDS: readonly StorageChangeKind[];
4990
4986
  /**
4991
4987
  * Tell the other tabs that a store in database `dbName` changed - for a store of your own on
4992
- * IndexedDB (the built-in ones post their own). Call it AFTER the write committed. Never put a
4993
- * value in it: a notice says which, not what. A no-op without `dbName` or BroadcastChannel; a
4994
- * notice of the wrong shape is dropped.
4988
+ * IndexedDB (the built-in ones post their own): one of the built-in kinds when it keeps that kind
4989
+ * of thing, `host` for anything else (`namespace` names which of your stores, `key` which record).
4990
+ * Call it AFTER the write committed. Never put a value in it: a notice says which, not what. A
4991
+ * no-op without `dbName` or BroadcastChannel; a notice of the wrong shape is dropped.
4995
4992
  */
4996
4993
  declare const postStorageChange: (dbName: string | undefined, change: StorageChange) => void;
4997
4994
  /**
@@ -5002,5 +4999,5 @@ declare const postStorageChange: (dbName: string | undefined, change: StorageCha
5002
4999
  */
5003
5000
  declare const onStorageChange: (dbName: string | undefined, listener: (change: StorageChange) => void) => (() => void);
5004
5001
 
5005
- 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, 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, MemoryCredentialStore, 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_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, VaultCredentialStore, VaultOptions, 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, decryptJSON, defaultPrompts, defineSkill, defineTool, directBrowserOk, dispatch, encryptJSON, escalationReasonOf, messageTokens as estimateMessagesTokens, estimateTokens, executeStep, fileToolBindingOf, findSecret, fitCompactionToWindow, generate, generateStructured, getOrCreateVaultKey, 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, searchStatusMessage, searchToolResult, searchTools, 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 };
5006
- 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, CredentialStore, DecisionFallbackReason, DecisionPoint, EffectiveToolStrategy, EgressErrorCode, EncryptedBlob, 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, 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 };
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 };