@dudko.dev/agent-web 0.0.32 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,8 +23,11 @@ budgets), **token limits** (input / output / thinking / total per run),
23
23
  **tool search** for catalogues of hundreds of MCP tools, **subagents** in
24
24
  Web Workers, **image / PDF / file / URL input** (with a clear error for models
25
25
  that can't take them),
26
- and a **virtual file system** in IndexedDB with `fs_*` tools — see
27
- [docs/capabilities.md](docs/capabilities.md).
26
+ a **virtual file system** in IndexedDB with `fs_*` tools, **usage** counted live
27
+ across a session (`agent.usage`), **steering** a run while it goes (`RunControl`),
28
+ **resuming** an interrupted run, **egress** you switch on and bound (the model's
29
+ `web_fetch`), and **learning** — the agent writes its own lessons down as skills
30
+ — see [docs/capabilities.md](docs/capabilities.md).
28
31
 
29
32
  [![npm](https://img.shields.io/npm/v/@dudko.dev/agent-web.svg)](https://www.npmjs.com/package/@dudko.dev/agent-web)
30
33
  [![npm](https://img.shields.io/npm/dy/@dudko.dev/agent-web.svg)](https://www.npmjs.com/package/@dudko.dev/agent-web)
@@ -373,17 +376,25 @@ against it), `stopSubagent(id)` stops one subagent. `egress` (off by default) gi
373
376
  | `toolSelectionStrategy` | `'auto'` | `all` \| `plan-narrowed` \| `search` \| `auto` (search above `toolSearchThreshold`, 40, or once the definitions take ¼ of the window) |
374
377
  | `toolApproval` | autopilot | consent policy: `{ mode, rules, onRequest, timeoutMs }`; `agent.setToolApprovalMode()` |
375
378
  | `skills` | — | SKILL.md bundles (`defineSkill` / `parseSkillMarkdown` / `loadSkillFromUrl`) |
379
+ | `egress` | off | what the **model** may fetch (`web_fetch`): `true` = any public host over https, or `{ allow, deny, protocols, allowPrivateNetwork, fetch, ... }`; a browser can't pin DNS, so prefer an `allow` list — see [Egress](docs/capabilities.md#egress-what-the-model-may-fetch) |
380
+ | `learning` | off | the agent writes down lessons as skills (`save_skill` / `forget_skill`): `true` = this session, `{ store: new VfsSkillStore(vfs) }` = across sessions — see [Learning](docs/capabilities.md#learning-lessons-that-outlive-the-task) |
376
381
  | `thinking` / `stageThinking` | provider default | `true`, a level (`'low'`…`'xhigh'`, `'none'`), or `{ level, budgetTokens, includeThoughts }` |
377
382
  | `limits` | — | run caps `maxInputTokens` / `maxOutputTokens` / `maxReasoningTokens` / `maxTotalTokens` + `perCall` output caps |
378
383
  | `maxToolCalls` / `maxPlanSteps` | ∞ / 8 | tool calls per run / steps per plan |
379
384
  | `compaction` | auto, at 85% of a 128k window (a local model: its own) | `{ auto, contextWindowTokens, thresholdRatio, thresholdTokens, keepRecentTurns, keepRecentSteps, maxToolOutputChars }` — judged on the whole context (fixed prompt + transcript + step log), never more than the model's window |
380
385
  | `promptCaching` | `true` | stable system prefixes, Anthropic breakpoints, OpenAI cache key |
381
386
  | `vision` / `inputs` | inferred | what the model takes as attachments (`run(goal, { images, files })`); see `agent.capabilities` |
382
- | `systemPrompt` | — | prepended to every phase |
387
+ | `systemPrompt` / `prompts` | — | prepended to every phase / override any phase's prompt builder |
383
388
  | `describeState` | — | serialize world state into prompt context |
384
389
  | `memory` | — | `ContextStore` (`IndexedDBStore` / `MemoryStore`); recent turns are read back into the planner prompt |
390
+ | `sessionId` | — | names the stored conversation in `memory`, and the bucket `agent.sessionUsage()` counts into |
391
+ | `persistence` | — | checkpoint runs (`IndexedDBRunStore` / `MemoryRunStore`) so `run(goal, { resumeFromRunId })` continues after a reload — see [Resuming](docs/capabilities.md#resuming-an-interrupted-run) |
385
392
  | `maxIterations` / `maxStepsPerTask` / `maxRevisions` | 8 / 4 / 2 | loop caps |
386
393
  | `chatTimeoutMs` | 120000 | per-call watchdog |
394
+ | `temperature` | provider default | sampling temperature for every stage |
395
+ | `budgets` | — | legacy per-phase output caps; `limits.perCall` wins, and the defaults are shares of the model's window |
396
+ | `clientName` | — | sent as the openai-compatible provider name and the MCP client name |
397
+ | `logLevel` / `logger` | `'warn'` / `console` | verbosity (`'silent' \| 'error' \| 'warn' \| 'info' \| 'debug'`) and the console-like sink the logs go to |
387
398
  | `replan` / `synthesize` | `true` | toggle phases |
388
399
  | `replanAfter` | `'failure'` | replan trigger: `'failure'` \| `'always'` \| `(stepResult) => boolean \| Promise<boolean>` |
389
400
  | `compressAfterChars` | 12000 | legacy: summarize old history past this size (when `compaction` is unset) |
@@ -393,9 +404,9 @@ against it), `stopSubagent(id)` stops one subagent. `egress` (off by default) gi
393
404
  - [docs/design.md](docs/design.md) — architecture & rationale.
394
405
  - [docs/capabilities.md](docs/capabilities.md) — thinking, limits, compaction,
395
406
  caching, skills, tool consent / autopilot, large MCP catalogues, subagents,
396
- autonomy, event reference.
407
+ steering a running agent, learning, egress, usage, resuming, autonomy, event reference.
397
408
  - [docs/providers.md](docs/providers.md) — every provider, CORS & direct-vs-proxy.
398
- - [docs/security.md](docs/security.md) — the token vault & its threat model.
409
+ - [docs/security.md](docs/security.md) — the token vault, egress and learning: threat models.
399
410
  - [docs/tasks.md](docs/tasks.md) — status & roadmap.
400
411
  - [`@dudko.dev/agent-web-react`](https://www.npmjs.com/package/@dudko.dev/agent-web-react) —
401
412
  React bindings (`useAgent`, `<AgentProvider>`, pre-styled components) ·
package/dist/index.d.cts CHANGED
@@ -1305,7 +1305,6 @@ type AgentEvent =
1305
1305
  error: string;
1306
1306
  stopped?: boolean;
1307
1307
  }
1308
- /** A message sent with `RunControl.send` is waiting for the next boundary. */
1309
1308
  /**
1310
1309
  * A request of the `web_fetch` tool, allowed or refused by the egress policy. `url` is origin and
1311
1310
  * path only (a query string can carry a secret).
@@ -1316,7 +1315,9 @@ type AgentEvent =
1316
1315
  allowed: boolean;
1317
1316
  status?: number;
1318
1317
  reason?: string;
1319
- } | {
1318
+ }
1319
+ /** A message sent with `RunControl.send` is waiting for the next boundary. */
1320
+ | {
1320
1321
  type: 'message.queued';
1321
1322
  id: string;
1322
1323
  text: string;
package/dist/index.d.ts CHANGED
@@ -1305,7 +1305,6 @@ type AgentEvent =
1305
1305
  error: string;
1306
1306
  stopped?: boolean;
1307
1307
  }
1308
- /** A message sent with `RunControl.send` is waiting for the next boundary. */
1309
1308
  /**
1310
1309
  * A request of the `web_fetch` tool, allowed or refused by the egress policy. `url` is origin and
1311
1310
  * path only (a query string can carry a secret).
@@ -1316,7 +1315,9 @@ type AgentEvent =
1316
1315
  allowed: boolean;
1317
1316
  status?: number;
1318
1317
  reason?: string;
1319
- } | {
1318
+ }
1319
+ /** A message sent with `RunControl.send` is waiting for the next boundary. */
1320
+ | {
1320
1321
  type: 'message.queued';
1321
1322
  id: string;
1322
1323
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dudko.dev/agent-web",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "description": "Headless, configurable in-browser LLM agent on the Vercel AI SDK: multi-provider bring-your-own-key (OpenAI, Anthropic, Google, xAI, DeepSeek, gateway, openai-compatible) AND local WebGPU/WebLLM, native + prompted tool-calling, structured output, an encrypted IndexedDB token vault, and a plan → execute → replan → synthesize loop. UI-agnostic.",
5
5
  "type": "module",
6
6
  "sideEffects": false,