page-agent-sdk 2.12.0 → 2.12.2
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 +12 -12
- package/README.zh-CN.md +12 -12
- package/dist/page-agent-sdk.iife.js +29 -29
- package/dist/page-agent-sdk.js +615 -601
- package/dist/page-agent-sdk.umd.cjs +5 -5
- package/package.json +24 -8
- package/types/index.d.ts +7 -1
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# page-agent-sdk
|
|
2
2
|
|
|
3
|
-
> **[English](https://github.com/whyymj/
|
|
3
|
+
> **[English](https://github.com/whyymj/page-agent-sdk/blob/master/README.md)** · **[中文](https://github.com/whyymj/page-agent-sdk/blob/master/README.zh-CN.md)**
|
|
4
4
|
|
|
5
5
|
> Give your web page an **AI assistant that edits the page itself**. Mount a chat dialog in one line; the AI reads/writes page data safely via schema-validated tools — "conversational" building/editing/ops.
|
|
6
6
|
|
|
7
|
-
> **AI agent integration**: see [Agent Integration Cheat Sheet](#agent-integration-cheat-sheet-for-ai-agents) below (exports / options / extension points / built-in tools / file structure). Architecture & gotchas in [`CLAUDE.md`](https://github.com/whyymj/
|
|
7
|
+
> **AI agent integration**: see [Agent Integration Cheat Sheet](#agent-integration-cheat-sheet-for-ai-agents) below (exports / options / extension points / built-in tools / file structure). Architecture & gotchas in [`CLAUDE.md`](https://github.com/whyymj/page-agent-sdk/blob/master/CLAUDE.md).
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/page-agent-sdk)
|
|
10
|
-
[](https://github.com/whyymj/
|
|
10
|
+
[](https://github.com/whyymj/page-agent-sdk/blob/master/LICENSE)
|
|
11
11
|
[](#self-tests)
|
|
12
12
|
|
|
13
13
|
---
|
|
@@ -324,7 +324,7 @@ npm i page-agent-sdk
|
|
|
324
324
|
cp -R node_modules/page-agent-sdk/skills/page-agent-sdk-integrate ~/.claude/skills/
|
|
325
325
|
|
|
326
326
|
# Option B — download from the repo (no install needed)
|
|
327
|
-
curl -L https://github.com/whyymj/
|
|
327
|
+
curl -L https://github.com/whyymj/page-agent-sdk/tarball/master | tar xz --strip-components=1 --wildcards '*/skills/page-agent-sdk-integrate'
|
|
328
328
|
mv skills/page-agent-sdk-integrate ~/.claude/skills/
|
|
329
329
|
```
|
|
330
330
|
|
|
@@ -459,12 +459,12 @@ function switchTo(i: number) {
|
|
|
459
459
|
|
|
460
460
|
| Doc | Contents |
|
|
461
461
|
|---|---|
|
|
462
|
-
| [Doc Index](https://github.com/whyymj/
|
|
463
|
-
| [Usage Guide](https://github.com/whyymj/
|
|
464
|
-
| [Architecture](https://github.com/whyymj/
|
|
465
|
-
| [Context & Compression](https://github.com/whyymj/
|
|
466
|
-
| [File Overview](https://github.com/whyymj/
|
|
467
|
-
| [CLAUDE.md](https://github.com/whyymj/
|
|
462
|
+
| [Doc Index](https://github.com/whyymj/page-agent-sdk/blob/master/doc/README.en.md) | Navigation + other info sources (specs/changes/tests) |
|
|
463
|
+
| [Usage Guide](https://github.com/whyymj/page-agent-sdk/blob/master/doc/usage-guide.en.md) | Install / options / capability deep-dive / custom middleware / FAQ |
|
|
464
|
+
| [Architecture](https://github.com/whyymj/page-agent-sdk/blob/master/doc/architecture.md) *(Chinese)* | Layering / control flow / window-op safety flow |
|
|
465
|
+
| [Context & Compression](https://github.com/whyymj/page-agent-sdk/blob/master/doc/context-management.md) *(Chinese)* | Context composition / 4-layer compression / flow diagrams |
|
|
466
|
+
| [File Overview](https://github.com/whyymj/page-agent-sdk/blob/master/doc/architecture-files.md) *(Chinese)* | Per-file responsibilities / deps / data flow |
|
|
467
|
+
| [CLAUDE.md](https://github.com/whyymj/page-agent-sdk/blob/master/CLAUDE.md) | **agent must-read** · architecture / gotchas / coding conventions |
|
|
468
468
|
|
|
469
469
|
## Self-tests
|
|
470
470
|
|
|
@@ -545,8 +545,8 @@ npm test
|
|
|
545
545
|
|
|
546
546
|
## Relationship to Deep Agents
|
|
547
547
|
|
|
548
|
-
Borrows the harness idea from [Deep Agents](https://github.com/langchain-ai/deepagents) (ReAct + middleware + planning + skills + memory + context management), but implemented in-house: no LangGraph/langchain full bundle; browser-oriented (persistence via IndexedDB, not server-side DB); context via input compression + memory trim + large-result offload, rather than per-step checkpointer archival. See [Context & Compression - Differences from Deep Agents](https://github.com/whyymj/
|
|
548
|
+
Borrows the harness idea from [Deep Agents](https://github.com/langchain-ai/deepagents) (ReAct + middleware + planning + skills + memory + context management), but implemented in-house: no LangGraph/langchain full bundle; browser-oriented (persistence via IndexedDB, not server-side DB); context via input compression + memory trim + large-result offload, rather than per-step checkpointer archival. See [Context & Compression - Differences from Deep Agents](https://github.com/whyymj/page-agent-sdk/blob/master/doc/context-management.md#七与-deep-agents-的差异).
|
|
549
549
|
|
|
550
550
|
## License
|
|
551
551
|
|
|
552
|
-
[ISC](https://github.com/whyymj/
|
|
552
|
+
[ISC](https://github.com/whyymj/page-agent-sdk/blob/master/LICENSE)
|
package/README.zh-CN.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# page-agent-sdk
|
|
2
2
|
|
|
3
|
-
> **[English](https://github.com/whyymj/
|
|
3
|
+
> **[English](https://github.com/whyymj/page-agent-sdk/blob/master/README.md)** · **[中文](https://github.com/whyymj/page-agent-sdk/blob/master/README.zh-CN.md)**
|
|
4
4
|
|
|
5
5
|
> 给网页一个**会改页面的 AI 助手**。一行代码挂载对话框,AI 通过工具按 schema 安全读写页面数据,实现「对话式」搭建/编辑/运维。
|
|
6
6
|
|
|
7
|
-
> **AI agent 接入**:直接看下方「[Agent 接入速查](#agent-接入速查给-ai-agent-读)」(导出 / 选项表 / 扩展点 / 内置工具 / 文件结构),架构与约定坑见 [`CLAUDE.md`](https://github.com/whyymj/
|
|
7
|
+
> **AI agent 接入**:直接看下方「[Agent 接入速查](#agent-接入速查给-ai-agent-读)」(导出 / 选项表 / 扩展点 / 内置工具 / 文件结构),架构与约定坑见 [`CLAUDE.md`](https://github.com/whyymj/page-agent-sdk/blob/master/CLAUDE.md)。
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/page-agent-sdk)
|
|
10
|
-
[](https://github.com/whyymj/
|
|
10
|
+
[](https://github.com/whyymj/page-agent-sdk/blob/master/LICENSE)
|
|
11
11
|
[](#自测)
|
|
12
12
|
|
|
13
13
|
---
|
|
@@ -269,7 +269,7 @@ npm i page-agent-sdk
|
|
|
269
269
|
cp -R node_modules/page-agent-sdk/skills/page-agent-sdk-integrate ~/.claude/skills/
|
|
270
270
|
|
|
271
271
|
# 方式 B —— 从仓库下载(无需安装)
|
|
272
|
-
curl -L https://github.com/whyymj/
|
|
272
|
+
curl -L https://github.com/whyymj/page-agent-sdk/tarball/master | tar xz --strip-components=1 --wildcards '*/skills/page-agent-sdk-integrate'
|
|
273
273
|
mv skills/page-agent-sdk-integrate ~/.claude/skills/
|
|
274
274
|
```
|
|
275
275
|
|
|
@@ -404,12 +404,12 @@ function switchTo(i: number) {
|
|
|
404
404
|
|
|
405
405
|
| 文档 | 内容 |
|
|
406
406
|
|---|---|
|
|
407
|
-
| [文档索引](https://github.com/whyymj/
|
|
408
|
-
| [使用手册](https://github.com/whyymj/
|
|
409
|
-
| [功能架构](https://github.com/whyymj/
|
|
410
|
-
| [上下文与压缩](https://github.com/whyymj/
|
|
411
|
-
| [文件全览](https://github.com/whyymj/
|
|
412
|
-
| [CLAUDE.md](https://github.com/whyymj/
|
|
407
|
+
| [文档索引](https://github.com/whyymj/page-agent-sdk/blob/master/doc/README.md) | 各文档导航 + 其他信息源(规范/变更/自测) |
|
|
408
|
+
| [使用手册](https://github.com/whyymj/page-agent-sdk/blob/master/doc/usage-guide.md) | 安装 / 配置项 / 能力详解 / 自定义中间件 / FAQ |
|
|
409
|
+
| [功能架构](https://github.com/whyymj/page-agent-sdk/blob/master/doc/architecture.md) | 分层 / 控制流 / 数据操作安全流 |
|
|
410
|
+
| [上下文与压缩](https://github.com/whyymj/page-agent-sdk/blob/master/doc/context-management.md) | 上下文组成 / 4 层压缩 / 流程图 |
|
|
411
|
+
| [文件全览](https://github.com/whyymj/page-agent-sdk/blob/master/doc/architecture-files.md) | 逐文件职责 / 依赖 / 数据流 |
|
|
412
|
+
| [CLAUDE.md](https://github.com/whyymj/page-agent-sdk/blob/master/CLAUDE.md) | **agent 必读** · 架构要点 / 约定坑 / 编码规范 |
|
|
413
413
|
|
|
414
414
|
## 自测
|
|
415
415
|
|
|
@@ -490,8 +490,8 @@ npm test
|
|
|
490
490
|
|
|
491
491
|
## 与 Deep Agents 的关系
|
|
492
492
|
|
|
493
|
-
借鉴 [Deep Agents](https://github.com/langchain-ai/deepagents) 的 harness 思路(ReAct + 中间件 + planning + skills + memory + context 管理),但自研实现:不引 LangGraph/langchain 整包;面向浏览器端(持久化用 IndexedDB 而非服务端 DB);上下文用输入压缩 + 内存裁剪 + 大结果 offload,而非每步 checkpointer 存档。详见 [上下文与压缩 - 与 Deep Agents 的差异](https://github.com/whyymj/
|
|
493
|
+
借鉴 [Deep Agents](https://github.com/langchain-ai/deepagents) 的 harness 思路(ReAct + 中间件 + planning + skills + memory + context 管理),但自研实现:不引 LangGraph/langchain 整包;面向浏览器端(持久化用 IndexedDB 而非服务端 DB);上下文用输入压缩 + 内存裁剪 + 大结果 offload,而非每步 checkpointer 存档。详见 [上下文与压缩 - 与 Deep Agents 的差异](https://github.com/whyymj/page-agent-sdk/blob/master/doc/context-management.md#七与-deep-agents-的差异)。
|
|
494
494
|
|
|
495
495
|
## License
|
|
496
496
|
|
|
497
|
-
[ISC](https://github.com/whyymj/
|
|
497
|
+
[ISC](https://github.com/whyymj/page-agent-sdk/blob/master/LICENSE)
|