page-agent-sdk 3.12.0 → 3.13.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 +4 -4
- package/README.zh-CN.md +4 -4
- package/dist/page-agent-sdk.headless.js +1288 -1106
- package/dist/page-agent-sdk.iife.js +129 -129
- package/dist/page-agent-sdk.js +1706 -1518
- package/dist/page-agent-sdk.umd.cjs +62 -62
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/headless.d.ts +2 -0
- package/types/index.d.ts +2 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/page-agent-sdk)
|
|
10
10
|
[](https://github.com/whyymj/page-agent-sdk/blob/master/LICENSE)
|
|
11
|
-
[](#self-tests)
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -230,7 +230,7 @@ ChatDialog, MessageContent, CodePreview, SkillPanel, DebugDrawer, useChat
|
|
|
230
230
|
| **Persistence** | `storage` | `'indexed' \| 'session' \| 'local' \| 'memory' \| config \| false` · default off | Assign to enable; multi-agent isolated by `id` |
|
|
231
231
|
| | `session` | `{id?,autoResume?,title?}` | Session control |
|
|
232
232
|
| | `shareContext` | `boolean` · default `false` | Same `id` instances share one agent |
|
|
233
|
-
| **Robustness/other** | `maxRetries` / `maxParallelTools` / `maxToolRounds` | `number` · 2 / 1 / 10 | Model retries / per-round tool concurrency / max rounds |
|
|
233
|
+
| **Robustness/other** | `maxRetries` / `maxParallelTools` / `maxToolRounds` | `number` · 2 / 1 / 10 | Model retries / per-round tool concurrency (>1 enables same-round parallel delegation with failure isolation + per-component mutex locks) / max rounds |
|
|
234
234
|
| | `roundTokenBudget` | `number` · default `0` (off) | Per-invocation cumulative token cap (3.11+; exceed → friendly wrap-up, partial work preserved; orthogonal to automation's `tokenBudget`, no automation capability needed) |
|
|
235
235
|
| | `mcp` | `McpServerConfig[]` | Remote MCP servers (http/sse/websocket) |
|
|
236
236
|
| | `middleware` | `Middleware[]` | Custom middleware (appended to built-in stack) |
|
|
@@ -529,8 +529,8 @@ function switchTo(i: number) {
|
|
|
529
529
|
## Self-tests
|
|
530
530
|
|
|
531
531
|
```bash
|
|
532
|
-
npm test #
|
|
533
|
-
npm run test:e2e #
|
|
532
|
+
npm test # 2092 assertions (tsx, source-level; no LLM dependency)
|
|
533
|
+
npm run test:e2e # 655 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)
|
|
534
534
|
```
|
|
535
535
|
|
|
536
536
|
## Local npm package test
|
package/README.zh-CN.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/page-agent-sdk)
|
|
10
10
|
[](https://github.com/whyymj/page-agent-sdk/blob/master/LICENSE)
|
|
11
|
-
[](#自测)
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -226,7 +226,7 @@ ChatDialog, MessageContent, CodePreview, SkillPanel, DebugDrawer, useChat
|
|
|
226
226
|
| **持久化** | `storage` | `'indexed' \| 'session' \| 'local' \| 'memory' \| 配置 \| false` · 默认关 | 赋值开启;多 agent 靠 `id` 隔离 |
|
|
227
227
|
| | `session` | `{id?,autoResume?,title?}` | 会话控制 |
|
|
228
228
|
| | `shareContext` | `boolean` · 默认 `false` | 同 `id` 多实例共享同一 agent |
|
|
229
|
-
| **鲁棒/其他** | `maxRetries` / `maxParallelTools` / `maxToolRounds` | `number` · 2 / 1 / 10 | 模型重试 / 同轮工具并发 / 最大轮次 |
|
|
229
|
+
| **鲁棒/其他** | `maxRetries` / `maxParallelTools` / `maxToolRounds` | `number` · 2 / 1 / 10 | 模型重试 / 同轮工具并发(>1 启用同轮并行委派,失败隔离 + 同组件锁互斥)/ 最大轮次 |
|
|
230
230
|
| | `roundTokenBudget` | `number` · 默认 `0`(关) | 单次调用累计 token 上限(3.11+;超限友好收口,已完成部分保留;与 automation 的 `tokenBudget` 正交,无需开 automation) |
|
|
231
231
|
| | `mcp` | `McpServerConfig[]` | 远程 MCP server(http/sse/websocket) |
|
|
232
232
|
| | `middleware` | `Middleware[]` | 自定义中间件(拼到内置栈末尾) |
|
|
@@ -474,8 +474,8 @@ function switchTo(i: number) {
|
|
|
474
474
|
## 自测
|
|
475
475
|
|
|
476
476
|
```bash
|
|
477
|
-
npm test #
|
|
478
|
-
npm run test:e2e #
|
|
477
|
+
npm test # 2092 项断言(tsx 源码级,不依赖 LLM)
|
|
478
|
+
npm run test:e2e # 655 项集成断言(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 配置 / 错误场景)
|
|
479
479
|
```
|
|
480
480
|
|
|
481
481
|
## 本地 npm 包测试
|