page-agent-sdk 3.40.2 → 3.41.0

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
@@ -252,7 +252,8 @@ ChatDialog, MessageContent, CodePreview, SkillPanel, DebugDrawer, useChat
252
252
  | | `contextOptions` | `Partial<ContextManagerOptions> \| false` | Fine params (`false` disables compression). Includes `promptSoftCapTokens` (3.11+ compression cost cap — 160K default when window ≥320K, explicit `0` disables) and `preserveLastToolResults` (default `['describe_data','describe_data']` — keep field descriptions in compressed summary) |
253
253
  | | `summaryLlm` | `BaseChatModel \| LLMConfig` | Summary-dedicated LLM (defaults to main `llm`) |
254
254
  | | `maxMemoryRounds` | `number` · default `30` | Dialog history memory round cap (`0` disables trim) |
255
- | | `vfs` | `{initialFiles?,maxBytes?}` · default 4MB | In-memory workspace cap (LRU evict on overflow) |
255
+ | | `vfs` | `{initialFiles?,maxBytes?,poolBytes?,mainTools?}` · default 4MB, `mainTools:true` | In-memory workspace cap (LRU evict on overflow). `mainTools:false` (3.41+) hides the 9 vfs tools from the main agent's view (usageHints sync-skips the vfs section) while subagent stacks keep supply via the internal tool pool — for orchestrator-only main agents |
256
+ | | `data.tools` | `'high' \| string[]` | 3.41+ assembly-time dataOps tool whitelist. `'high'` drops the legacy quartet (`get/set/edit/delete_data` — superseded by `read`/`write`); an explicit name array filters exactly; opt-in families (draft/resource) always preserved when assembled
256
257
  | **Persistence** | `storage` | `'indexed' \| 'session' \| 'local' \| 'memory' \| config \| false` · default off | Assign to enable; multi-agent isolated by `id` |
257
258
  | | `session` | `{id?,autoResume?,title?}` | Session control |
258
259
  | | `shareContext` | `boolean` · default `false` | Same `id` instances share one agent |
@@ -494,8 +495,8 @@ function switchTo(i: number) {
494
495
  ## Self-tests
495
496
 
496
497
  ```bash
497
- npm test # 2687 assertions (tsx, source-level; no LLM dependency)
498
- npm run test:e2e # 864 integration assertions (node, built dist; covers APIs/options/modules/simple&complex scenes: default systemPrompt(capability overview) / dynamic register + inspect sync / inspect(tools/middleware/subagent/verify/mcp/todos/lastCompression/checkpoints reflect config) / custom tools/middleware/skills/memory injection / runtime dynamic reconfiguration(setTools/addTool/removeTool/setLlm/setMemory/setSubagents reflect) / switchSession(on/off) / shareContext on/off sharing/independent / storage backends + object config / presets(3) / checkpoint / exports complete(39+ fns/components) / util fns usable(isQuotaError/estimateTokens/jpEval/searchJson) / source=builtin / mount boundary / hook multi-listener / llm config / hide/show / error scenes)
498
+ npm test # 2762 assertions (tsx, source-level; no LLM dependency)
499
+ npm run test:e2e # 906 integration assertions (node, built dist; covers APIs/options/modules/simple&complex scenes: default systemPrompt(capability overview) / dynamic register + inspect sync / inspect(tools/middleware/subagent/verify/mcp/todos/lastCompression/checkpoints reflect config) / custom tools/middleware/skills/memory injection / runtime dynamic reconfiguration(setTools/addTool/removeTool/setLlm/setMemory/setSubagents reflect) / switchSession(on/off) / shareContext on/off sharing/independent / storage backends + object config / presets(3) / checkpoint / exports complete(39+ fns/components) / util fns usable(isQuotaError/estimateTokens/jpEval/searchJson) / source=builtin / mount boundary / hook multi-listener / llm config / hide/show / error scenes)
499
500
  ```
500
501
 
501
502
  ## Local npm package test
package/README.zh-CN.md CHANGED
@@ -248,7 +248,8 @@ ChatDialog, MessageContent, CodePreview, SkillPanel, DebugDrawer, useChat
248
248
  | | `contextOptions` | `Partial<ContextManagerOptions> \| false` | 细参覆盖(`false` 关压缩)。含 `promptSoftCapTokens`(3.11+ 压缩触发成本上限,窗口 ≥320K 默认 160K、显式 0 关)与 `preserveLastToolResults`(默认 `['describe_data','describe_data']`——压缩摘要里保留字段说明) |
249
249
  | | `summaryLlm` | `BaseChatModel \| LLMConfig` | 摘要专用 LLM(不配用主 `llm`) |
250
250
  | | `maxMemoryRounds` | `number` · 默认 `30` | 对话历史内存上限轮次(`0` 关裁剪) |
251
- | | `vfs` | `{initialFiles?,maxBytes?}` · 默认 4MB | 内存工作区上限(超限 LRU 淘汰) |
251
+ | | `vfs` | `{initialFiles?,maxBytes?,poolBytes?,mainTools?}` · 默认 4MB, `mainTools:true` | 内存工作区上限(超限 LRU 淘汰)。`mainTools:false`(3.41+)把 9 个 vfs 工具从主 agent 视野隐藏(usageHints 同步不注入 vfs 段),子 agent 栈经内部工具池照常供给 —— 适合主 agent 只编排不落盘的场景 |
252
+ | | `data.tools` | `'high' \| string[]` | 3.41+ dataOps 装配期工具白名单。`'high'` 裁掉旧四件(`get/set/edit/delete_data`,与高层 `read`/`write` 同职能二选一);具体名单按名精确过滤;opt-in 家族(draft/resource)装配了就保留 |
252
253
  | **持久化** | `storage` | `'indexed' \| 'session' \| 'local' \| 'memory' \| 配置 \| false` · 默认关 | 赋值开启;多 agent 靠 `id` 隔离 |
253
254
  | | `session` | `{id?,autoResume?,title?}` | 会话控制 |
254
255
  | | `shareContext` | `boolean` · 默认 `false` | 同 `id` 多实例共享同一 agent |
@@ -497,8 +498,8 @@ function switchTo(i: number) {
497
498
  ## 自测
498
499
 
499
500
  ```bash
500
- npm test # 2687 项断言(tsx 源码级,不依赖 LLM)
501
- npm run test:e2e # 864 项集成断言(node 跑构建产物 dist;覆盖各 API/配置项/功能模块/简单与复杂场景:默认 systemPrompt(含能力概述) / 动态注册与 inspect 同步 / inspect(tools/middleware/subagent/verify/mcp/todos/lastCompression/checkpoints 反映配置) / 自定义 tools/middleware/skills/memory 注入 / 运行时动态重配置(setTools/addTool/removeTool/setLlm/setMemory/setSubagents 反映) / switchSession(开/未开) / shareContext 开/关共享独立 / storage 后端+对象配置 / presets 三预设 / checkpoint / 导出项完整(39+ 函数/组件) / 工具函数可用(isQuotaError/estimateTokens/jpEval/searchJson) / source=builtin / mount 边界 / hook 多监听器 / llm 配置 / 错误场景)
501
+ npm test # 2762 项断言(tsx 源码级,不依赖 LLM)
502
+ npm run test:e2e # 906 项集成断言(node 跑构建产物 dist;覆盖各 API/配置项/功能模块/简单与复杂场景:默认 systemPrompt(含能力概述) / 动态注册与 inspect 同步 / inspect(tools/middleware/subagent/verify/mcp/todos/lastCompression/checkpoints 反映配置) / 自定义 tools/middleware/skills/memory 注入 / 运行时动态重配置(setTools/addTool/removeTool/setLlm/setMemory/setSubagents 反映) / switchSession(开/未开) / shareContext 开/关共享独立 / storage 后端+对象配置 / presets 三预设 / checkpoint / 导出项完整(39+ 函数/组件) / 工具函数可用(isQuotaError/estimateTokens/jpEval/searchJson) / source=builtin / mount 边界 / hook 多监听器 / llm 配置 / 错误场景)
502
503
  ```
503
504
 
504
505
  ## 本地 npm 包测试