bookmark-research 0.5.0-beta.15 → 0.5.0-beta.16
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/.agents/plugins/marketplace.json +1 -1
- package/.codex-plugin/plugin.json +2 -1
- package/README.md +10 -11
- package/README.zh.md +9 -10
- package/docs/bench-preflight-2026-10-21.md +85 -0
- package/docs/bookmark-research-architecture.md +3 -3
- package/docs/details.en.md +13 -18
- package/docs/details.md +3 -4
- package/docs/diff-audit-2026-10-21.md +159 -0
- package/docs/distribution.md +3 -6
- package/docs/harness-compatibility.md +14 -135
- package/docs/installation.en.md +10 -37
- package/docs/installation.md +12 -45
- package/docs/instructions.en.md +1 -1
- package/docs/instructions.md +1 -1
- package/docs/mcp-aggregation-0.2.0.md +1 -1
- package/docs/network-test-2026-10-21.md +177 -0
- package/docs/plugin-maturity-2026-10-21.md +131 -0
- package/docs/plugin-search-routing-plan-2026-10-19.md +506 -0
- package/docs/prompt-reference.en.md +1 -1
- package/docs/prompt-reference.md +1 -1
- package/docs/release-notes-0.5.0-beta.16.md +35 -0
- package/docs/research-0.2.0.md +1 -1
- package/docs/search-latency-provider-research-2026-10-21.md +111 -0
- package/docs/three-host-plan-2026-10-21.md +101 -0
- package/docs/three-pillar-cleanup-2026-10-21.md +112 -0
- package/hosts/dsh/plugin.js +7 -0
- package/install.sh +4 -4
- package/package.json +2 -7
- package/scripts/bench_preflight.py +189 -0
- package/scripts/build_zip.py +0 -3
- package/scripts/export_bundle.py +2 -65
- package/scripts/host_assets.py +8 -20
- package/scripts/host_clients.py +4 -27
- package/scripts/host_install.py +1 -1
- package/scripts/install.py +14 -16
- package/scripts/launcher.py +1 -1
- package/scripts/verify_live.py +2 -2
- package/skills/bookmark-research/SKILL.md +8 -6
- package/skills/bookmark-research/references/cli.md +1 -1
- package/skills/bookmark-research/references/host-workflows.md +0 -24
- package/skills/bookmark-research/references/package-semantics.md +3 -2
- package/skills/bookmark-research/references/research-services.md +2 -2
- package/skills/bookmark-research/references/settings-and-archive.md +8 -3
- package/skills/bookmark-research/references/zh/cli.md +1 -1
- package/skills/bookmark-research/references/zh/host-workflows.md +0 -24
- package/skills/bookmark-research/references/zh/package-semantics.md +3 -2
- package/skills/bookmark-research/references/zh/research-services.md +2 -2
- package/skills/bookmark-research/references/zh/settings-and-archive.md +8 -3
- package/skills/bookmark-research/references/zh/skill-guide.md +3 -1
- package/src/archive.py +49 -12
- package/src/bookmark_index.py +152 -14
- package/src/cli.py +12 -8
- package/src/context_output.py +21 -0
- package/src/discovery.py +9 -1
- package/src/mcp_server.py +119 -16
- package/src/onboarding.py +6 -7
- package/src/raw_library.py +54 -0
- package/src/readiness.py +2 -3
- package/src/research_plan.py +271 -21
- package/src/research_services.py +11 -4
- package/src/routing.py +2 -9
- package/src/settings.py +36 -4
- package/src/wiki.py +59 -0
- package/docs/beta15-improvement-plan-2026-10-17.md +0 -469
- package/docs/cli-launcher-plan.md +0 -60
- package/docs/diff-review-2026-10-09.md +0 -38
- package/docs/fixes-validation-0.5.0-beta.9.md +0 -99
- package/docs/install-design-0.2.0.md +0 -57
- package/docs/knowledge-storage-plan.md +0 -45
- package/docs/multi-host-installation-plan.md +0 -165
- package/docs/performance-audit-0.5.0-beta.9.md +0 -129
- package/docs/plugin-improvement-plan-2026-10-15.md +0 -65
- package/docs/provider-smoke-0.2.0.json +0 -235
- package/docs/release-notes-0.5.0-beta.1.md +0 -33
- package/docs/release-notes-0.5.0-beta.10.md +0 -31
- package/docs/release-notes-0.5.0-beta.11.md +0 -31
- package/docs/release-notes-0.5.0-beta.12.md +0 -31
- package/docs/release-notes-0.5.0-beta.13.md +0 -38
- package/docs/release-notes-0.5.0-beta.14.md +0 -38
- package/docs/release-notes-0.5.0-beta.15.md +0 -44
- package/docs/release-notes-0.5.0-beta.2.md +0 -23
- package/docs/release-notes-0.5.0-beta.3.md +0 -28
- package/docs/release-notes-0.5.0-beta.4.md +0 -39
- package/docs/release-notes-0.5.0-beta.5.md +0 -31
- package/docs/release-notes-0.5.0-beta.6.md +0 -30
- package/docs/release-notes-0.5.0-beta.7.md +0 -57
- package/docs/release-notes-0.5.0-beta.8.md +0 -34
- package/docs/release-notes-0.5.0-beta.9.md +0 -35
- package/docs/research-sources-0.2.0.json +0 -9360
- package/docs/search-design-research-2026-10-10.md +0 -146
- package/docs/search-hedge-plan-2026-10-14.md +0 -158
- package/docs/tool-surface-audit.md +0 -162
- package/docs/upgrade-status-2026-10-11.md +0 -77
- package/docs/validation-0.2.0.md +0 -126
- package/docs/wiki-lifecycle-audit-0.5.0-beta.9.md +0 -88
- package/hosts/pi/register-workflow.py +0 -80
- package/hosts/pi/runtime.js +0 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bookmark-research",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.16",
|
|
4
4
|
"description": "Check bookmark URLs or Canvas packages, compare sources with host-led research, and retain verifiable reports.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kwenxu"
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"BOOKMARK_RESEARCH_DATA_DIR",
|
|
34
34
|
"BOOKMARK_RESEARCH_CONFIG",
|
|
35
35
|
"BOOKMARK_RESEARCH_CREDENTIALS",
|
|
36
|
+
"BOOKMARK_RESEARCH_TOOL_SCOPE",
|
|
36
37
|
"XDG_DATA_HOME",
|
|
37
38
|
"XDG_CONFIG_HOME",
|
|
38
39
|
"EXA_API_KEY",
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/Browser-bookmark-hub/Bookmark-Canvas)
|
|
6
6
|
[](https://www.npmjs.com/package/bookmark-research)
|
|
7
7
|
|
|
8
|
-
Research your bookmarks with verified web sources. Give it a list of bookmark URLs or a [Bookmark Canvas](https://github.com/Browser-bookmark-hub/Bookmark-Canvas) package; it checks every link, searches and reads the web, and writes a cited report you can resume. Works in **Codex, Claude Code
|
|
8
|
+
Research your bookmarks with verified web sources. Give it a list of bookmark URLs or a [Bookmark Canvas](https://github.com/Browser-bookmark-hub/Bookmark-Canvas) package; it checks every link, searches and reads the web, and writes a cited report you can resume. Works in **Codex, Claude Code and DSH (DeepSeek Harness)**.
|
|
9
9
|
|
|
10
10
|
[Installation guide](docs/installation.en.md) · [User guide](docs/user-guide.en.md) · [Details](docs/details.en.md) · [npm](https://www.npmjs.com/package/bookmark-research)
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ Research your bookmarks with verified web sources. Give it a list of bookmark UR
|
|
|
21
21
|
## Requirements
|
|
22
22
|
|
|
23
23
|
- Python 3.9+ with SQLite FTS5 (checked by `bookmark-research doctor`)
|
|
24
|
-
- The CLI of at least one client: Codex, Claude Code
|
|
24
|
+
- The CLI of at least one client: Codex, Claude Code or DSH. DSH also needs `pnpm`, unless it is the DeepSeek Harness Desktop CLI, which carries its own
|
|
25
25
|
- Node 18+ and npm to install a release
|
|
26
26
|
- No API key is needed to install, or to query bookmarks locally
|
|
27
27
|
|
|
@@ -31,7 +31,7 @@ Research your bookmarks with verified web sources. Give it a list of bookmark UR
|
|
|
31
31
|
npx bookmark-research@beta install
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
`@beta` follows the newest prerelease; pin one build with `@0.5.0-beta.
|
|
34
|
+
`@beta` follows the newest prerelease; pin one build with `@0.5.0-beta.16`. Add `--lang zh` for the Chinese wizard. For a permanent command, run `npm install -g bookmark-research`; the GitHub convenience script uses the same npm release (macOS/Linux/WSL):
|
|
35
35
|
|
|
36
36
|
```sh
|
|
37
37
|
curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash
|
|
@@ -56,19 +56,18 @@ Enter keeps the highlighted value, so a full run can be just a few keystrokes. T
|
|
|
56
56
|
| --- | --- | --- |
|
|
57
57
|
| Codex | `npx bookmark-research@beta install codex --non-interactive` | `codex plugin add` |
|
|
58
58
|
| Claude Code | `npx bookmark-research@beta install claude --scope user --non-interactive` | `claude plugin install` |
|
|
59
|
-
| Pi | `npx bookmark-research@beta install pi --non-interactive` | `pi install` |
|
|
60
59
|
| DSH | `npx bookmark-research@beta install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
61
60
|
|
|
62
|
-
Several at once: `npx bookmark-research@beta install claude dsh --profile web --non-interactive`. Project scope: `--scope project --project /path/to/project` (Claude Code
|
|
61
|
+
Several at once: `npx bookmark-research@beta install claude dsh --profile web --non-interactive`. Project scope: `--scope project --project /path/to/project` (Claude Code). All options: [installation guide](docs/installation.en.md).
|
|
63
62
|
|
|
64
|
-
**Ask your agent to install it.** Paste this into Codex, Claude Code
|
|
63
|
+
**Ask your agent to install it.** Paste this into Codex, Claude Code or DSH:
|
|
65
64
|
|
|
66
65
|
```text
|
|
67
66
|
Install the Bookmark Research plugin into the client you are running in.
|
|
68
67
|
|
|
69
|
-
1. Identify your own client: codex, claude
|
|
68
|
+
1. Identify your own client: codex, claude or dsh.
|
|
70
69
|
2. Run: npx bookmark-research@beta install <client> --non-interactive
|
|
71
|
-
- Claude Code
|
|
70
|
+
- Claude Code: add --scope user (or --scope project --project <dir>).
|
|
72
71
|
- DSH: add --profile <profile>; ask me for the profile name.
|
|
73
72
|
3. The command prints JSON. Confirm "verified": true and report any "error".
|
|
74
73
|
4. Do not ask me for API keys in chat. Tell me to run `bookmark-research setup`
|
|
@@ -78,7 +77,7 @@ Install the Bookmark Research plugin into the client you are running in.
|
|
|
78
77
|
|
|
79
78
|
Install notes:
|
|
80
79
|
|
|
81
|
-
- **npm is the single release source** for all
|
|
80
|
+
- **npm is the single release source** for all three hosts; it contains the shared runtime, Skill and host adapters. The installer downloads the release, prepares the host's format, then calls the host's native commands. GitHub hosts source, versions and the installation catalog; unpublished source uses the Python installer. See [distribution policy](docs/distribution.md).
|
|
82
81
|
- **DSH installs the release directly.** The package declares `dsh.bundle.patch`, so `dsh plugin --profile <name> add bookmark-research@<version>` installs it with no export first. The reserved `desktop` profile belongs to DeepSeek Harness Desktop; use that app's CLI, which the installer and wizard locate themselves.
|
|
83
82
|
- **Windows** often has no working `python3`, so the installer writes the detected Python path into each client's MCP config. Install Codex with `bookmark-research install codex` rather than adding the repository to Codex directly; `bookmark-research status` shows the interpreter in use.
|
|
84
83
|
|
|
@@ -96,7 +95,7 @@ Install notes:
|
|
|
96
95
|
|
|
97
96
|
Use `npx bookmark-research@beta …` if the command is not installed globally. Preferences and keys are user-wide, so one change applies to every installed client; start a new client session afterwards. `--lang zh` shows the wizard and menu in Chinese.
|
|
98
97
|
|
|
99
|
-
**Update.** `bookmark-research update` refreshes every installed client from its registered source and keeps preferences, keys and data. Re-running `npx bookmark-research@beta install` also upgrades an existing Claude Code
|
|
98
|
+
**Update.** `bookmark-research update` refreshes every installed client from its registered source and keeps preferences, keys and data. Re-running `npx bookmark-research@beta install` also upgrades an existing Claude Code or DSH installation in place. A Codex installation keeps the source and version it was registered with; to move it to another version, remove that registration first (`codex plugin marketplace remove bookmark-research`) and install again.
|
|
100
99
|
|
|
101
100
|
**API keys are optional.** Enter them in `bookmark-research setup` (hidden input, checked immediately, saved in a private local file) or set environment variables, which take precedence.
|
|
102
101
|
|
|
@@ -130,7 +129,7 @@ Changing the location affects new research only; existing tasks stay where they
|
|
|
130
129
|
|
|
131
130
|
The host model plans the research, searches or reads pages, evaluates the evidence and follows unresolved questions. The Skill guides this loop; MCP stores inputs, evidence, budgets and progress. Saving a research task does not start a background agent.
|
|
132
131
|
|
|
133
|
-
For a grouped report, the plugin supplies a reader → fresh verifier → coverage check → follow-up → report workflow. Codex uses its native subagent tools and the bundled delegation guide; Claude Code and DSH use available host workflow hooks
|
|
132
|
+
For a grouped report, the plugin supplies a reader → fresh verifier → coverage check → follow-up → report workflow. Codex uses its native subagent tools and the bundled delegation guide; Claude Code and DSH use available host workflow hooks. The host owns concurrency, cancellation and agent lifetime. All children must receive the relevant instructions and access the same research store.
|
|
134
133
|
|
|
135
134
|
The workflow adapters have simulated contract tests, but a successful install does not prove that every host can execute the complete multi-agent workflow. See [host workflows](skills/bookmark-research/references/host-workflows.md) for requirements and [the validation matrix](docs/validation-0.4.0.md#host-and-provider-boundaries) for observed limits.
|
|
136
135
|
|
package/README.zh.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/Browser-bookmark-hub/Bookmark-Canvas)
|
|
6
6
|
[](https://www.npmjs.com/package/bookmark-research)
|
|
7
7
|
|
|
8
|
-
用联网查证来研究你的书签。给它一份书签 URL 列表或 [Bookmark Canvas](https://github.com/Browser-bookmark-hub/Bookmark-Canvas) 数据包,它会逐条核对链接、搜索和阅读网页,写出带引用、可以接着做的研究报告。支持 **Codex、Claude Code、
|
|
8
|
+
用联网查证来研究你的书签。给它一份书签 URL 列表或 [Bookmark Canvas](https://github.com/Browser-bookmark-hub/Bookmark-Canvas) 数据包,它会逐条核对链接、搜索和阅读网页,写出带引用、可以接着做的研究报告。支持 **Codex、Claude Code、DSH(DeepSeek Harness)**。
|
|
9
9
|
|
|
10
10
|
[安装说明](docs/installation.md) · [使用指南](docs/user-guide.md) · [详细说明](docs/details.md) · [npm](https://www.npmjs.com/package/bookmark-research)
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
## 环境要求
|
|
22
22
|
|
|
23
23
|
- Python 3.9+,含 SQLite FTS5(用 `bookmark-research doctor` 检查)
|
|
24
|
-
- 至少一个宿主的 CLI:Codex、Claude Code
|
|
24
|
+
- 至少一个宿主的 CLI:Codex、Claude Code 或 DSH。DSH 另需 `pnpm`;若用 DeepSeek Harness 桌面版自带 CLI,则它自带 pnpm,无需另装
|
|
25
25
|
- 安装发布版需要 Node 18+ 和 npm
|
|
26
26
|
- 安装和本地查书签都不需要 API Key
|
|
27
27
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
npx bookmark-research@beta install
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
`@beta` 跟随最新测试版;要固定某个构建可写 `@0.5.0-beta.
|
|
34
|
+
`@beta` 跟随最新测试版;要固定某个构建可写 `@0.5.0-beta.16`。加 `--lang zh` 可让向导显示中文。想一直能用 `bookmark-research` 命令,运行 `npm install -g bookmark-research`;GitHub 便捷脚本使用同一 npm 发布版(macOS/Linux/WSL):
|
|
35
35
|
|
|
36
36
|
```sh
|
|
37
37
|
curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash
|
|
@@ -56,19 +56,18 @@ curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Resea
|
|
|
56
56
|
| --- | --- | --- |
|
|
57
57
|
| Codex | `npx bookmark-research@beta install codex --non-interactive` | `codex plugin add` |
|
|
58
58
|
| Claude Code | `npx bookmark-research@beta install claude --scope user --non-interactive` | `claude plugin install` |
|
|
59
|
-
| Pi | `npx bookmark-research@beta install pi --non-interactive` | `pi install` |
|
|
60
59
|
| DSH | `npx bookmark-research@beta install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
61
60
|
|
|
62
|
-
一次装多个:`npx bookmark-research@beta install claude dsh --profile web --non-interactive`。装到指定项目:`--scope project --project /path/to/project`(Claude Code
|
|
61
|
+
一次装多个:`npx bookmark-research@beta install claude dsh --profile web --non-interactive`。装到指定项目:`--scope project --project /path/to/project`(Claude Code)。全部参数见[安装说明](docs/installation.md)。
|
|
63
62
|
|
|
64
|
-
**让 agent 帮你装。** 把下面这段粘贴给 Codex、Claude Code
|
|
63
|
+
**让 agent 帮你装。** 把下面这段粘贴给 Codex、Claude Code 或 DSH:
|
|
65
64
|
|
|
66
65
|
```text
|
|
67
66
|
请把 Bookmark Research 插件安装到你当前运行的这个宿主里。
|
|
68
67
|
|
|
69
|
-
1. 先确认你自己是哪个宿主:codex、claude
|
|
68
|
+
1. 先确认你自己是哪个宿主:codex、claude 或 dsh。
|
|
70
69
|
2. 运行:npx bookmark-research@beta install <宿主> --non-interactive
|
|
71
|
-
- Claude Code
|
|
70
|
+
- Claude Code:加 --scope user(或 --scope project --project <目录>)。
|
|
72
71
|
- DSH:加 --profile <名称>;profile 名称请先问我。
|
|
73
72
|
3. 命令会输出 JSON。确认 "verified": true,有 "error" 就告诉我。
|
|
74
73
|
4. 不要在对话里向我要 API Key。请让我在终端运行 `bookmark-research setup` 自己输入。
|
|
@@ -95,7 +94,7 @@ curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Resea
|
|
|
95
94
|
|
|
96
95
|
没有全局安装时,在前面加 `npx bookmark-research@beta`。偏好和 Key 是用户级的,改一次就对所有已安装宿主生效;改完新建宿主会话即可。加 `--lang zh` 可让向导和菜单显示中文。
|
|
97
96
|
|
|
98
|
-
**更新。** `bookmark-research update` 会按各自登记的来源刷新所有已安装宿主,并保留偏好、Key 和数据。重跑 `npx bookmark-research@beta install` 也会就地升级已装的 Claude Code
|
|
97
|
+
**更新。** `bookmark-research update` 会按各自登记的来源刷新所有已安装宿主,并保留偏好、Key 和数据。重跑 `npx bookmark-research@beta install` 也会就地升级已装的 Claude Code 或 DSH。Codex 安装会保留登记时的来源与版本,要换版本需先移除该登记(`codex plugin marketplace remove bookmark-research`)再重新安装。
|
|
99
98
|
|
|
100
99
|
**API Key 都是可选的。** 在 `bookmark-research setup` 里输入(隐藏显示,输完当场检查,保存在仅当前用户可读的本地文件),或者设置环境变量(优先于已保存的 Key)。
|
|
101
100
|
|
|
@@ -129,7 +128,7 @@ Key 不接受对话、命令参数或 JSON 文件。偏好也可以直接在宿
|
|
|
129
128
|
|
|
130
129
|
宿主模型负责规划、搜索/阅读、评估证据,再追查未解决的问题。Skill 指导这个循环,MCP 保存输入范围、证据、预算和进度;保存研究任务不会启动后台代理。
|
|
131
130
|
|
|
132
|
-
对于分组报告,插件提供“阅读代理 → 新的验证代理 → 覆盖检查 → 补查 → 报告”的流程。Codex 使用原生子代理和附带的委派指南;Claude Code、DSH
|
|
131
|
+
对于分组报告,插件提供“阅读代理 → 新的验证代理 → 覆盖检查 → 补查 → 报告”的流程。Codex 使用原生子代理和附带的委派指南;Claude Code、DSH 使用已加载的宿主工作流接口。并发、取消和代理生命周期由宿主管理。每个子代理都需要拿到相关指令,并访问同一个研究存储。
|
|
133
132
|
|
|
134
133
|
工作流适配已有模拟接口测试,但安装成功不代表所有宿主都已跑通完整的多代理任务。所需条件见[宿主工作流](skills/bookmark-research/references/zh/host-workflows.md),实际验证范围见[验证记录](docs/validation-0.4.0.md#host-and-provider-boundaries)。
|
|
135
134
|
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Preflight 规模压测(2026-10-21)
|
|
2
|
+
|
|
3
|
+
> 对象:`plan_research` 预检、`RawLibrary.search_terms`、`WikiSearchIndex`。
|
|
4
|
+
>
|
|
5
|
+
> 方式:源码内进程内调用,不发网络请求;不写用户数据目录。脚本:[scripts/bench_preflight.py](../scripts/bench_preflight.py)。
|
|
6
|
+
>
|
|
7
|
+
> 环境:macOS 15.7.2、Python 3.9.6、源码基线 `e7706e1` + 当前工作树改动。
|
|
8
|
+
|
|
9
|
+
## 测什么
|
|
10
|
+
|
|
11
|
+
| 层 | 数据 | 说明 |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| 书签预检 | 1k / 5k / 10k / 50k / 100k 书签,38 个栏目 | `ResearchPlan.build(include_wiki=False, include_archive=False)`,测 `plan_scope` 主体 |
|
|
14
|
+
| 归档检索 | 100 / 500 个 capture 页面 | `SourceArchive.save` + `RawLibrary.search_terms` |
|
|
15
|
+
| Wiki 索引 | 100 / 1,000 个合成文档 | `WikiSearchIndex.candidates` + `match`;不含 revision 校验 |
|
|
16
|
+
|
|
17
|
+
查询:
|
|
18
|
+
|
|
19
|
+
- `alpha`:泛词,几乎所有卡片命中;
|
|
20
|
+
- `alpha beta`:两个泛词,最重的排序路径;
|
|
21
|
+
- `unique500` / `unique2500` / …:只命中一条书签的长字面词。
|
|
22
|
+
|
|
23
|
+
每个场景先 warm-up 一次,再取 3 次;表中为 p50 / p95 毫秒。
|
|
24
|
+
|
|
25
|
+
## 结果
|
|
26
|
+
|
|
27
|
+
### 书签预检
|
|
28
|
+
|
|
29
|
+
| 书签数 | `alpha` p50 / p95 | `alpha beta` p50 / p95 | 唯一长词 p50 / p95 | 输出字符 |
|
|
30
|
+
|---:|---:|---:|---:|---:|
|
|
31
|
+
| 1,000 | 10.3 / 10.6 | 11.8 / 11.8 | 8.0 / 8.4 | 1.8–4.1k |
|
|
32
|
+
| 5,000 | 23.8 / 24.3 | 27.4 / 28.6 | 13.1 / 13.5 | 1.8–4.1k |
|
|
33
|
+
| 10,000 | 41.4 / 44.4 | 51.3 / 52.2 | 17.6 / 18.0 | 1.9–4.1k |
|
|
34
|
+
| 50,000 | 197.7 / 200.6 | 255.5 / 257.6 | 65.8 / 67.2 | 1.9–4.1k |
|
|
35
|
+
| 100,000 | 388.5 / 391.5 | 507.5 / 509.1 | 123.1 / 123.5 | 1.9–4.1k |
|
|
36
|
+
|
|
37
|
+
结论:近似线性,约 **0.4 秒/10 万书签(单泛词)**、**0.5 秒/10 万(双泛词)**;唯一长词约 **0.12 秒/10 万**。输出稳定在 4.1k 字符左右,远低于 8k 上限。
|
|
38
|
+
|
|
39
|
+
100k 进程峰值 RSS 约 **330 MB**(含 Python、SQLite、临时包和索引生成)。
|
|
40
|
+
|
|
41
|
+
### 归档检索
|
|
42
|
+
|
|
43
|
+
| 页面数 | `alpha` p50 / p95 | `alpha beta` p50 / p95 |
|
|
44
|
+
|---:|---:|---:|
|
|
45
|
+
| 100 | 2.8 / 3.2 | 4.5 / 5.3 |
|
|
46
|
+
| 500 | 5.3 / 9.5 | 9.5 / 10.0 |
|
|
47
|
+
|
|
48
|
+
结论:500 页归档仍在 10ms 量级;当前按词逐个 `search`,每次刷新 archive 索引是主要成本,但规模不大时不是瓶颈。
|
|
49
|
+
|
|
50
|
+
### Wiki 索引
|
|
51
|
+
|
|
52
|
+
| 文档数 | `alpha beta` p50 / p95 |
|
|
53
|
+
|---:|---:|
|
|
54
|
+
| 100 | 2.0 / 2.2 |
|
|
55
|
+
| 1,000 | 19.6 / 19.7 |
|
|
56
|
+
|
|
57
|
+
结论:索引层 1,000 页约 20ms;真实 Wiki 还包含 revision/证据校验,未在此表内。
|
|
58
|
+
|
|
59
|
+
## 判断
|
|
60
|
+
|
|
61
|
+
- **当前最慢的是书签预检的全表 OR 查询**,不是 Wiki/归档。10 万书签仍低于 1 秒,可以接受;如果目标是 100 万书签,按线性外推约 4–5 秒,才需要做倒排/分批。
|
|
62
|
+
- **输出预算没有随数据增长**:卡片/URL 上限固定,100k 时输出仍约 4.1k 字符,`preflight_budget` 没有触发截断。
|
|
63
|
+
- **唯一长词**依赖新增的 token-aware 标题命中;这条路径比泛词快,但 100k 仍需约 0.12 秒,因为要扫标题。
|
|
64
|
+
- 归档 500 页、Wiki 索引 1,000 页都不是当前瓶颈。
|
|
65
|
+
|
|
66
|
+
## 复现
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
# 默认矩阵(1k/5k/10k/50k,100/500 归档,100/1000 Wiki)
|
|
70
|
+
python3 scripts/bench_preflight.py
|
|
71
|
+
|
|
72
|
+
# 更大书签量、只看书签
|
|
73
|
+
python3 scripts/bench_preflight.py \
|
|
74
|
+
--sizes 100000 --sections 38 --archive-pages 0 --wiki-documents 0 --repeats 3
|
|
75
|
+
|
|
76
|
+
# JSON 输出
|
|
77
|
+
python3 scripts/bench_preflight.py --json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 边界
|
|
81
|
+
|
|
82
|
+
- 合成数据是“每张卡都有大量 alpha/beta”的偏重场景,不代表真实主题分布;真实包的时间应更低。
|
|
83
|
+
- 没有经过 MCP stdio 传输、宿主调度或 `plan_research` 的 Wiki/归档完整校验;这些是单独的集成层。
|
|
84
|
+
- 归档 benchmark 用同一模板但唯一页面正文,避免被 SHA-256 合并;真实归档的正文大小差异会影响 I/O。
|
|
85
|
+
- 没有测 100 万书签;需要时用同一脚本加 `--sizes 1000000`,但要预留内存和时间。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Bookmark Research 0.4.0 结构图
|
|
2
2
|
|
|
3
|
-
用户可以直接用自然语言说明“查什么、查多大范围、要什么结果”,不用背固定提示词。安装并加载 Skill 后,由 Codex、Claude Code
|
|
3
|
+
用户可以直接用自然语言说明“查什么、查多大范围、要什么结果”,不用背固定提示词。安装并加载 Skill 后,由 Codex、Claude Code 或 DSH 理解请求,再调用插件工具执行。下面先看使用过程,再看内部结构。
|
|
4
4
|
|
|
5
5
|
| 研究方式 | 用户可以这样说 | 对书签/画布包怎样处理 | 交付 |
|
|
6
6
|
| --- | --- | --- | --- |
|
|
@@ -40,7 +40,7 @@ flowchart TB
|
|
|
40
40
|
|
|
41
41
|
```mermaid
|
|
42
42
|
flowchart TB
|
|
43
|
-
User["用户<br/>自然语言问题与数据包路径"] --> Host["AI 宿主<br/>Codex / Claude Code /
|
|
43
|
+
User["用户<br/>自然语言问题与数据包路径"] --> Host["AI 宿主<br/>Codex / Claude Code / DSH<br/>模型推理、任务组织与审阅"]
|
|
44
44
|
|
|
45
45
|
subgraph Plugin["Bookmark Research Plugin"]
|
|
46
46
|
Skill["Skill:Markdown 指令<br/>查询方法、研究规则与宿主路由"]
|
|
@@ -81,7 +81,7 @@ flowchart TB
|
|
|
81
81
|
Knowledge --> Wiki
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
各宿主的接入方式有所不同:Codex、Claude Code 使用 Skill + MCP;
|
|
84
|
+
各宿主的接入方式有所不同:Codex、Claude Code 使用 Skill + MCP;DSH 使用 MCP 适配,并配置 Skill 发现和工作流服务。图中的宿主能力取决于实际安装与配置,适配实现及验证范围见[宿主支持说明](details.en.md#client-support)。
|
|
85
85
|
|
|
86
86
|
SQLite 是随 Python 工具读写的本地数据库文件,用来查询书签、栏目、文件夹和画布关系,并记录来源与同步状态。它可以从来源快照重建,不需要单独启动数据库服务器。
|
|
87
87
|
|
package/docs/details.en.md
CHANGED
|
@@ -10,13 +10,13 @@ Reference material moved from the README: components, data model, research modes
|
|
|
10
10
|
| --- | --- | --- |
|
|
11
11
|
| **Skill** | [`skills/bookmark-research/SKILL.md`](../skills/bookmark-research/SKILL.md) | Guides package reading, local queries, source verification, and research reports |
|
|
12
12
|
| **MCP server** | [`src/mcp_server.py`](../src/mcp_server.py), started with `python3 src/cli.py serve` | One local `bookmark-research` server with the [shared tool catalog](#mcp-tools) |
|
|
13
|
-
| **Python CLI** | [`src/cli.py`](../src/cli.py) | Runs the same queries and research workflows directly, including from
|
|
13
|
+
| **Python CLI** | [`src/cli.py`](../src/cli.py) | Runs the same queries and research workflows directly, including from a host without MCP |
|
|
14
14
|
| **Web providers** | [`config/providers.json`](../config/providers.json), [`src/provider_adapters.py`](../src/provider_adapters.py), [`src/jina.py`](../src/jina.py) | Exa, Parallel, Jina HTTP and Tavily behind one MCP; schema checks, session reuse and visible partial failures |
|
|
15
15
|
| **Research and coverage** | [`src/research.py`](../src/research.py), [`src/research_coverage.py`](../src/research_coverage.py) | Complete source inventory, all bookmark instances, budgets, evidence, substantive review and reports |
|
|
16
|
-
| **Host workflows** | [`hosts/`](../hosts/) and [`src/routing.py`](../src/routing.py) | Native Codex delegation, Claude workflow
|
|
16
|
+
| **Host workflows** | [`hosts/`](../hosts/) and [`src/routing.py`](../src/routing.py) | Native Codex delegation, Claude workflow and DSH workflow adapter |
|
|
17
17
|
| **Professional research** | [`src/research_services.py`](../src/research_services.py) | Optional provider-owned background tasks, saved run IDs and secondary-report import |
|
|
18
18
|
| **Wiki and evaluation** | [`src/wiki.py`](../src/wiki.py), [`src/evaluation.py`](../src/evaluation.py) | Reviewed knowledge, immutable revisions, source/link lint and metrics from explicit labels |
|
|
19
|
-
| **Client integrations** | Native manifests, [`bin/bookmark-research.js`](../bin/bookmark-research.js), [`scripts/launcher.py`](../scripts/launcher.py), [`install.sh`](../install.sh), [`scripts/install.py`](../scripts/install.py) and [`scripts/export_bundle.py`](../scripts/export_bundle.py) | The `bookmark-research` command (alias `bookmark`, or `bookmark research`), guided installation and native install/update/verify for all
|
|
19
|
+
| **Client integrations** | Native manifests, [`bin/bookmark-research.js`](../bin/bookmark-research.js), [`scripts/launcher.py`](../scripts/launcher.py), [`install.sh`](../install.sh), [`scripts/install.py`](../scripts/install.py) and [`scripts/export_bundle.py`](../scripts/export_bundle.py) | The `bookmark-research` command (alias `bookmark`, or `bookmark research`), guided installation and native install/update/verify for all three hosts |
|
|
20
20
|
|
|
21
21
|
The runtime requires Python 3.9+ and SQLite with FTS5; `doctor` checks these requirements. It uses the Python standard library and does not require a separate database service.
|
|
22
22
|
|
|
@@ -26,12 +26,9 @@ The runtime requires Python 3.9+ and SQLite with FTS5; `doctor` checks these req
|
|
|
26
26
|
| --- | --- | --- | --- | --- |
|
|
27
27
|
| **Codex** | Included | MCP | Native plugin and marketplace | Native install/update and stdio checks in isolated profiles |
|
|
28
28
|
| **Claude Code** | Included | MCP | Persistent marketplace/plugin plus Dynamic Workflow | Native install/update/cache checks in isolated profiles; model execution is separate |
|
|
29
|
-
| **Pi** | Included through `pi.skills` | CLI / stdio bridge | Persistent package plus project workflow registrar | Installer/adapter scenarios; subagent workflows require optional extensions |
|
|
30
29
|
| **DSH / DeepSeek Harness** | Included through Skill provider | MCP through the official client | Relocatable `dsh.bundle` plus optional workflow adapter | Installer/adapter scenarios; workflows require a configured service, engine and tool |
|
|
31
30
|
|
|
32
|
-
Install verification does not mean all
|
|
33
|
-
|
|
34
|
-
**Agent Plugins 1.0.0** is also available as a separate standard export: root `plugin.json` + `mcp.json`. It is a package format, not another client or the Codex native manifest. See [export formats](#export-formats) for commands and the [compatibility notes (Chinese)](harness-compatibility.md) for first-party references and verification boundaries.
|
|
31
|
+
Install verification does not mean all three live clients completed a research task. DSH's bundle registers the Skill and resolves the bundled Python path after installation; its legacy `cordis.patch.yml` export remains specific to its original location. See [host workflows](../skills/bookmark-research/references/host-workflows.md) for optional collaboration and actual resume limits.
|
|
35
32
|
|
|
36
33
|
## Data and query model
|
|
37
34
|
|
|
@@ -123,7 +120,7 @@ These modes follow [OpenAI's web search guide](https://developers.openai.com/api
|
|
|
123
120
|
|
|
124
121
|
One MCP entry point aggregates several backend services, and one Skill executes all three workflows. Reading starts with Exa under `fetch.strategy` (staggered by default: the next provider joins once the current one stalls past `fetch.grace_seconds`; hedged and sequential are the alternatives; abandoned providers are listed in `abandoned_providers`), then concurrent Parallel + Jina Reader fallback for unresolved URLs; Tavily extraction can be added to `fetch.providers`. `fetch.reuse_seconds` can return text saved within that window as `reused_sources` without a new request, and `search.cache_seconds` serves a repeated identical search from a short-lived cache. Search starts with Exa + Parallel under `search.strategy` (hedged by default, with staggered, sequential and wait_all alternatives) and the `search.grace_seconds` / `search.deadline_seconds` bounds; dropped or uncalled providers are listed in `routing`. Then `search.fallback_providers` (Tavily + keyed Jina) run concurrently only for queries with no usable URL. Missing fallback credentials are skipped; successful results stay intact. Set the search fallback list to `[]` to disable it. An existing saved search provider list without a fallback field retains its original service scope.
|
|
125
122
|
|
|
126
|
-
The host model leads both research modes. Codex native subagents, Claude ordinary subagents or enabled teams,
|
|
123
|
+
The host model leads both research modes. Codex native subagents, Claude ordinary subagents or enabled teams, and configured DSH subagents/workflows supply collaboration; see [host capabilities](harness-compatibility.md). The grouped package scripts are optional for batch research. Exa `agent_run`, complete Parallel Task MCP tools and enabled OpenAI/Parallel APIs can handle scoped external work after host assessment. A saved API preference orders these optional services; an explicit provider selects it exclusively. On confirmed failure, use cumulative `failed_routes` to continue the same investigation, preserving running/unknown/cancelled jobs. API execution follows prepare → start → status → result → import and requires separate credentials. Scrapling, Firecrawl and MarkItDown remain researched projects. A public GitHub README fetch does not inspect the whole repository.
|
|
127
124
|
|
|
128
125
|
Read the [deep research guide](../skills/bookmark-research/references/deep-research.md) for inputs and CLI examples. `research_start` freezes the complete indexed packages selected by `source_ids`; a subset requires explicit `scope_mode:"subset"`. Paginate `research_inventory` to the end. `bookmark_refs` identify focus items without silently narrowing whole-package scope.
|
|
129
126
|
|
|
@@ -184,11 +181,11 @@ The [shared Skill](../skills/bookmark-research/SKILL.md) guides the agent's work
|
|
|
184
181
|
| `source_history` | List reusable source snapshots and recovery paths |
|
|
185
182
|
| `source_remove` / `source_merge` | Preview or confirm removal and merging of registered sources |
|
|
186
183
|
| `search_bookmarks` | Query bookmarks for multiple targets while retaining item context |
|
|
187
|
-
| `get_context` | Read section, card, group, connection, and item-ancestor context |
|
|
188
|
-
| `plan_research` |
|
|
184
|
+
| `get_context` | Read section, card, group, connection, and item-ancestor context; `compact:true` drops raw JSON, descriptions and revisions |
|
|
185
|
+
| `plan_research` | Local preflight for one question: ranked cards and bookmarks, Wiki and archive pointers, relevance, freshness, fetch ownership, and a route; missing-file cards are flagged and their URLs are kept |
|
|
189
186
|
| `search_providers` | List configured web providers |
|
|
190
187
|
| `search_web` | Search through Exa / Parallel / Tavily / keyed Jina and merge results per target |
|
|
191
|
-
| `fetch_web` | Read known URLs and optionally archive
|
|
188
|
+
| `fetch_web` | Read known URLs under a per-page and batch budget, optionally archive text, and continue a saved extract with `capture_id`/`offset` |
|
|
192
189
|
| `search_archive` | Literal full-text search over saved page text in the knowledge archive and all research evidence, merged by content hash |
|
|
193
190
|
| `get_settings` | Read current settings and storage paths |
|
|
194
191
|
| `update_settings` | Update persistent settings |
|
|
@@ -230,13 +227,15 @@ Analysis rules are included in the Skill. The [package reading protocol](../skil
|
|
|
230
227
|
|
|
231
228
|
Routine analysis of supported formats does not require rereading the entire package `AGENTS.md`, and the runtime does not depend on it. Consult relevant original instructions for new formats, field conflicts, or package-specific conventions. Applicable directory instructions already loaded by the client still apply.
|
|
232
229
|
|
|
230
|
+
An exported guide may name this plugin as an optional read-only companion. That mention does not grant write access; the guide's hard constraints still govern any edit to the package.
|
|
231
|
+
|
|
233
232
|
GitHub references and Git sync rules in a package's `AGENTS.md` do not automatically connect a GitHub service. See [GitHub and sync boundaries](../skills/bookmark-research/references/github-and-sync.md).
|
|
234
233
|
|
|
235
|
-
The Skill currently produces answers and research reports. It does not generate importable bookmark packages or write changes back to source data. A future generation Skill could reuse the reading protocol with additional writing rules and validation.
|
|
234
|
+
The Skill currently produces answers and research reports. It does not generate importable bookmark packages or write changes back to source data. A future generation Skill could reuse the reading protocol with additional writing rules and validation, but the package's exported guide remains the write protocol.
|
|
236
235
|
|
|
237
236
|
## Export formats
|
|
238
237
|
|
|
239
|
-
This directory is the **Codex native plugin**, with its manifest at `.codex-plugin/plugin.json`. In Codex 0.153.4, the MCP configuration explicitly uses `cwd: "."` and runs `python3 src/cli.py serve` from the installed plugin directory. That native entry does not expand `${PLUGIN_ROOT}`; the
|
|
238
|
+
This directory is the **Codex native plugin**, with its manifest at `.codex-plugin/plugin.json`. In Codex 0.153.4, the MCP configuration explicitly uses `cwd: "."` and runs `python3 src/cli.py serve` from the installed plugin directory. That native entry does not expand `${PLUGIN_ROOT}`; the Claude export uses its own path convention.
|
|
240
239
|
|
|
241
240
|
The Codex manifest forwards these environment variable names through `env_vars`: `BOOKMARK_RESEARCH_DATA_DIR`, `BOOKMARK_RESEARCH_CONFIG`, `XDG_DATA_HOME`, `XDG_CONFIG_HOME`, `EXA_API_KEY`, `PARALLEL_API_KEY`, `TAVILY_API_KEY`, and `OPENAI_API_KEY`. Actual paths and credentials come from the user's runtime environment.
|
|
242
241
|
|
|
@@ -245,17 +244,13 @@ Run the relevant command **from this directory** to generate another format:
|
|
|
245
244
|
```sh
|
|
246
245
|
python3 scripts/export_bundle.py --format codex --output exports/codex/bookmark-research
|
|
247
246
|
python3 scripts/export_bundle.py --format claude --output exports/claude/bookmark-research
|
|
248
|
-
python3 scripts/export_bundle.py --format pi --output exports/pi/bookmark-research
|
|
249
247
|
python3 scripts/export_bundle.py --format dsh --output exports/dsh/bookmark-research
|
|
250
|
-
python3 scripts/export_bundle.py --format agent-plugin --output exports/agent-plugin/bookmark-research
|
|
251
248
|
```
|
|
252
249
|
|
|
253
250
|
The destination must be new or empty. Exports include their own English setup README with links to bundled Chinese and English user guides, and exclude indexes, caches, tests, and credentials. The exporter writes files; follow the generated README or [installation guide](installation.en.md) to load them in your client.
|
|
254
251
|
|
|
255
252
|
- **Claude Code:** plugin + marketplace manifests, `.mcp.json` and a Dynamic Workflow; supports persistent native installation or session loading with `--plugin-dir`.
|
|
256
|
-
- **Pi:** `package.json` declares `pi.skills`; the Skill calls the CLI. Register the project workflow for the separately installed subagent extensions when available.
|
|
257
253
|
- **DSH:** a relocatable `dsh.bundle` that connects the Skill and MCP, plus the legacy absolute-path patch and workflow call generator. Workflow components remain optional and host-managed.
|
|
258
|
-
- **Agent Plugins 1.0.0:** root `plugin.json` + `mcp.json`, for clients implementing that specification; generated separately from Codex's native manifest.
|
|
259
254
|
|
|
260
255
|
See the [client support table](#client-support) for verification status and [compatibility notes (Chinese)](harness-compatibility.md) for format differences and official sources.
|
|
261
256
|
|
|
@@ -275,6 +270,6 @@ python3 scripts/build_zip.py --include-tests --output dist/bookmark-research-tes
|
|
|
275
270
|
|
|
276
271
|
The fixture verifier checks independent bookmark counts, copy-card semantics, scoped queries, unchanged source hashes, incremental sync, and a two-round research lifecycle with a failed page and resumed operation. To additionally validate your own package, append `--package /absolute/path/to/package`; this stays offline and writes derived files only to the new output directory.
|
|
277
272
|
|
|
278
|
-
Network verification is explicit: `python3 tests/live_provider_smoke.py --run-live --output /tmp/provider-smoke.json` makes at most three searches and three fetches. The [0.4.0 validation record](validation-0.4.0.md) combines source lifecycle, whole-package research, bilingual instructions and host/service boundaries;
|
|
273
|
+
Network verification is explicit: `python3 tests/live_provider_smoke.py --run-live --output /tmp/provider-smoke.json` makes at most three searches and three fetches. The [0.4.0 validation record](validation-0.4.0.md) combines source lifecycle, whole-package research, bilingual instructions and host/service boundaries; 0.2.0 (`docs/archive/validation-0.2.0.md`) retains the earlier provider evidence.
|
|
279
274
|
|
|
280
275
|
The local stdio server exposes fixed tools. Its remote client implements the selected providers' Streamable HTTP lifecycle, bounded paginated tool discovery and limited session recovery; it is not a general OAuth client or a complete MCP SDK.
|
package/docs/details.md
CHANGED
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
| Agentic Web Search | 当前宿主模型先规划 → 搜索/读文 → 判断证据 → 针对缺口补查 | Exa + Parallel 按 `search.strategy` 提供搜索结果(默认并发对冲);无有效网址的查询再交给 Tavily + 有 key 的 Jina。普通问题无需完整研究会话。 |
|
|
30
30
|
| Deep Research | 在宿主研究循环上增加持续调查、按需协作、独立核验、覆盖检查与报告 | 优先利用宿主现有子代理/工作流;外部 Research MCP/API 可承担宿主判断后的子问题或用户明确指定的任务。 |
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
三个基座共用这套方法:Codex 原生子代理、Claude 普通子代理或已启用团队、已配置的 DSH 子代理/工作流;具体差异与官方依据见 [宿主兼容说明](harness-compatibility.md)。整包脚本用于分组研究。保存的 API 偏好只排列外部服务,显式 provider 才直接指定服务;明确路线失败可继续换路,运行中、结果未知或已取消任务不自动重建。
|
|
33
33
|
|
|
34
34
|
“备用”表示已加入回退列表;“需要配置”表示条件未满足时跳过;“仅调研”表示没有接入,失败也不会自动安装。OpenAI/Parallel 研究 API 默认关闭,需启用并提供凭据。宿主已加载的 Exa `agent_run`、完整 Parallel Task MCP 会被路由识别,实际认证仍以调用结果为准。Scrapling、Firecrawl、MarkItDown 等调研项目没有集成成自动后端。
|
|
35
35
|
|
|
36
36
|
## 数据包与保存位置
|
|
37
37
|
|
|
38
|
-
JSON/`.canvas` 是源数据,SQLite
|
|
38
|
+
JSON/`.canvas` 是源数据,SQLite 是可重建的本地查询索引,无需单独数据库服务器。插件不会回写原始画布包。导出的 `AGENTS.md`/`CLAUDE.md` 可能把本插件列为可选的只读辅助;这个提及不授予写入权限,包内修改仍以该指南为准。
|
|
39
39
|
|
|
40
40
|
| 来源 | 默认行为 |
|
|
41
41
|
| --- | --- |
|
|
@@ -79,10 +79,9 @@ Skill 在每个联网研究新问题前调用 `research_readiness`,默认首
|
|
|
79
79
|
| --- | --- | --- |
|
|
80
80
|
| Codex | 原生 Plugin + Skill + MCP | 隔离配置中的原生安装/更新与 stdio 检查。 |
|
|
81
81
|
| Claude Code | 持久 marketplace/插件和 Dynamic Workflow | 隔离配置中的原生安装/更新/缓存检查;模型调用另行验证。 |
|
|
82
|
-
| Pi | Skill + CLI/stdio 桥 | 适配器隔离验证;子代理工作流依赖已有扩展。 |
|
|
83
82
|
| DSH | 可搬移 bundle,包含 Skill 与 MCP | 安装器/适配器验证;工作流仍需宿主服务与引擎。 |
|
|
84
83
|
|
|
85
|
-
|
|
84
|
+
适配器存在不代表每个宿主都已完成真实研究。Wiki 保存引用、审阅和修订;评测根据实际运行数据及显式评审标签计算,示例分数不能证明研究质量。
|
|
86
85
|
|
|
87
86
|
## 开发与来源
|
|
88
87
|
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# 全量 diff 审计(2026-10-21)
|
|
2
|
+
|
|
3
|
+
> 范围:当前工作树相对 `HEAD` 的全部 tracked 修改、删除和新增文件。
|
|
4
|
+
>
|
|
5
|
+
> 规模:**66 个 tracked 文件,+1301 / −736;10 个新增文件**。
|
|
6
|
+
>
|
|
7
|
+
> 验证:**768 个 Python 测试通过,3 个跳过**;真实样本包网络/压测记录见文末。
|
|
8
|
+
|
|
9
|
+
## 1. 一句话结论
|
|
10
|
+
|
|
11
|
+
这次 diff 做完了四件事:
|
|
12
|
+
|
|
13
|
+
1. **预检与证据链**:`plan_research` 从“排卡片”升级为带 Wiki/归档/相关性/时效/URL 类型/预算的本地预检;`fetch_web` 修了多页预算饿死和证据回链。
|
|
14
|
+
2. **真实网络与规模验证**:真实包 URL 跑了 `search_web`/`fetch_web`/宿主 fetch,100k 书签跑了合成压测。
|
|
15
|
+
3. **宿主收敛**:删除 Pi,只保留 Codex / Claude Code / DSH。
|
|
16
|
+
4. **模型与工具面**:OpenAI 默认改为 `gpt-5.6-sol`,允许自填 model ID;DSH/Codex 默认不再藏第三阶段工具。
|
|
17
|
+
|
|
18
|
+
尚未完成的是**发布和真实宿主/真实 API 验收**,不是代码主体。
|
|
19
|
+
|
|
20
|
+
## 2. 按模块拆分
|
|
21
|
+
|
|
22
|
+
### A. 预检与索引(核心改动)
|
|
23
|
+
|
|
24
|
+
| 文件 | 变化 | 状态 |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `src/research_plan.py` | 新增 relevance、freshness、priority terms、Wiki/archive 预检、URL 类型、fetch ownership、bounded output | 已实现,测试覆盖 |
|
|
27
|
+
| `src/bookmark_index.py` | `url_kind`、`title_has_term`、stale 缺文件、`newest_high`、`term_hits`/`term_title_hits`、homepage limit、URL 排序 | 已实现,测试覆盖 |
|
|
28
|
+
| `src/wiki.py` | `search_terms` 按词合并,worst-of 状态,needs_review 不被降级 | 已实现 |
|
|
29
|
+
| `src/raw_library.py` | `search_terms` 按词合并,只返回可复用 capture | 已实现 |
|
|
30
|
+
| `src/archive.py` | fair-share 预算、0 字页 unavailable、`pages_with_text`/`without` | 已实现 |
|
|
31
|
+
| `src/context_output.py` | `compact_context` 去 raw/description/revision | 已实现 |
|
|
32
|
+
| `src/mcp_server.py` | schema 扩展、`tool_scope`、capture hydration/SHA、fetch 默认预算、compact | 已实现 |
|
|
33
|
+
| `src/settings.py` | 新预检/fetch/plan/tool_scope 默认值与校验 | 已实现 |
|
|
34
|
+
| `src/cli.py` | `fetch-web` 使用设置预算,capture 支持 | 已实现 |
|
|
35
|
+
|
|
36
|
+
真实包验证暴露并修掉:
|
|
37
|
+
|
|
38
|
+
- `A-10-2` 缺文件仍占据 top 卡 → stale 标记,URL 保留但卡不占 top。
|
|
39
|
+
- 单字/双字 CJK 误命中,`quantum` 命中 `QuantumNous` → 相关性门禁。
|
|
40
|
+
- 长唯一词(`unique5000`)被分数门槛误杀 → token-aware 标题命中。
|
|
41
|
+
- `file://` 被排第一 → `local_file`,排最后,`fetch_web` 拒绝。
|
|
42
|
+
- 24k 预算被前几页吃光 → fair share,8/8 页都有正文。
|
|
43
|
+
- `AI` 这种两字母大写缩写被丢弃 → 计为 meaningful。
|
|
44
|
+
|
|
45
|
+
### B. 网络与性能验证
|
|
46
|
+
|
|
47
|
+
新增:
|
|
48
|
+
|
|
49
|
+
- `scripts/bench_preflight.py`
|
|
50
|
+
- `docs/bench-preflight-2026-10-21.md`
|
|
51
|
+
- `docs/network-test-2026-10-21.md`
|
|
52
|
+
- `docs/search-latency-provider-research-2026-10-21.md`
|
|
53
|
+
|
|
54
|
+
结论:
|
|
55
|
+
|
|
56
|
+
- 100k 书签预检 p50:`alpha` 388ms、`alpha beta` 507ms、唯一长词 123ms;输出约 1.9–4.1k 字符。
|
|
57
|
+
- 真实包 `search_web`:暖会话 20 URL 约 1.86s;冷启动约 5s(MCP 握手)。
|
|
58
|
+
- 真实 `fetch_web`:6–8 页单 provider 7–17s;Exa+Parallel 分片暖会话约 1.68s/6 页。
|
|
59
|
+
- 豆包官方文档标称 700ms/50 条且带正文;这是“搜索即带正文”的架构,不是本插件当前的单 provider 逐页 fetch。
|
|
60
|
+
- OpenAI Deep Research 官方标称 5–30 分钟;不能和 2–3 秒搜索混为一谈。
|
|
61
|
+
|
|
62
|
+
### C. 宿主收敛(Pi 删除)
|
|
63
|
+
|
|
64
|
+
- 删除 `hosts/pi/runtime.js`、`hosts/pi/register-workflow.py`。
|
|
65
|
+
- `package.json` 删除 `pi` / `pi-package`。
|
|
66
|
+
- 安装器、onboarding、readiness、routing、host installer、host assets、export bundle、CLI 全部只接受 Codex / Claude / DSH。
|
|
67
|
+
- `--host pi`、`--format pi` 被拒绝。
|
|
68
|
+
- 测试删除 Pi 用例,改为三宿主;全量 768 通过。
|
|
69
|
+
- 现行 README/installation/details/distribution/instructions/prompt/architecture/host-workflows 已改三宿主。
|
|
70
|
+
- 历史 release notes、旧 plan、`harness-sources.json`、`host-validation.json` 保留 Pi 记录;`harness-compatibility.md` 顶部标注历史。
|
|
71
|
+
|
|
72
|
+
### D. 模型与 Deep Research 适配器
|
|
73
|
+
|
|
74
|
+
- `src/settings.py`:默认 `gpt-5.6-sol`;`allow_untested_model`。
|
|
75
|
+
- `src/research_services.py`:`gpt-5.6-sol` 用 `web_search`;旧 o3/o4 用 `web_search_preview`;`background`/`max_tool_calls` 保留。
|
|
76
|
+
- `src/mcp_server.py`:设置 schema 允许 model 模式串和 `allow_untested_model`。
|
|
77
|
+
- 测试:默认模型、未知模型拒绝/显式放行、`web_search` payload。
|
|
78
|
+
- **未验证**:真实 `OPENAI_API_KEY` 的 Deep Research 任务。
|
|
79
|
+
|
|
80
|
+
### E. 工具面
|
|
81
|
+
|
|
82
|
+
- DSH `hosts/dsh/plugin.js`:默认不再设 8 项 scope,改为全量目录;环境变量仍可收窄。
|
|
83
|
+
- Codex `.codex/config.toml`:移除 8 项 `enabled_tools`,默认全量。
|
|
84
|
+
- `BOOKMARK_RESEARCH_TOOL_SCOPE` 空值 = 全量;逗号列表 = 收窄。
|
|
85
|
+
|
|
86
|
+
## 3. 哪些是“做了但没验证”
|
|
87
|
+
|
|
88
|
+
| 项目 | 代码 | 验证 |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| 预检/索引/预算/证据链 | 完成 | 768 测试 + 真实包 |
|
|
91
|
+
| Pi 删除/三宿主导出 | 完成 | 单测/导出测试;**未重装真实宿主** |
|
|
92
|
+
| `gpt-5.6-sol` Deep Research | 完成请求体 | **无真实 API key** |
|
|
93
|
+
| DSH/Codex 全量工具面 | 完成配置 | **当前安装仍是旧版** |
|
|
94
|
+
| Claude 项目 scope 路径 | 改动 | **未做真实 Claude 项目安装** |
|
|
95
|
+
| `fetch_web` 分片并发 | 未实现 | 仅手工并行实验 1.68s |
|
|
96
|
+
|
|
97
|
+
## 4. 当前实际安装状态
|
|
98
|
+
|
|
99
|
+
| 宿主 | 已安装 | 说明 |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| DSH | `0.5.0-beta.15` | 旧代码,需更新/重装 |
|
|
102
|
+
| Claude Code | `0.5.0-beta.13+source...` | 更旧,需更新 |
|
|
103
|
+
| Codex | 插件旧版;项目配置已改 | 新线程 + 插件更新 |
|
|
104
|
+
| 仓库 | `0.5.0-beta.15`(未 bump) | 发布前需升到 beta.16 |
|
|
105
|
+
|
|
106
|
+
**注意**:DSH 已安装版本与源码版本相同(beta.15),直接 `add` 可能不刷新;需要移除后重加,或先 bump 版本。Claude 是内容派生版本,更新会刷新。
|
|
107
|
+
|
|
108
|
+
## 5. 还没做的(按优先级)
|
|
109
|
+
|
|
110
|
+
### P0:发布前
|
|
111
|
+
|
|
112
|
+
1. **版本号**:`package.json`、`.codex-plugin/plugin.json`、release notes 统一到 beta.16。
|
|
113
|
+
2. **发布**:npm publish / git tag(用户负责)。
|
|
114
|
+
3. **重装三宿主**:
|
|
115
|
+
- DSH 移除/重加 profile bundle;
|
|
116
|
+
- Claude 更新插件;
|
|
117
|
+
- Codex 更新插件 + 新线程。
|
|
118
|
+
|
|
119
|
+
### P1:真实验收
|
|
120
|
+
|
|
121
|
+
4. **OpenAI Deep Research**:用真实 key 跑 1 个小任务,验证 `gpt-5.6-sol` + `web_search` + background + citations;不要压测。
|
|
122
|
+
5. **DSH 自带搜索**:与插件 `search_web` 对比真实延迟/质量;决定是否需要 DeepSeek provider。
|
|
123
|
+
6. **Claude 项目 scope**:验证 `.claude/settings.local.json` 路径和注册行为。
|
|
124
|
+
|
|
125
|
+
### P2:后续增强
|
|
126
|
+
|
|
127
|
+
7. **`fetch_web` 分片并发**:把 6–8 页从 7–17s 降到约 2–4s;需改 archive/证据合并契约。
|
|
128
|
+
8. **可选 DeepSeek Search provider**:搜索即带正文;当前未接入,非必需。
|
|
129
|
+
9. **历史 Pi 文档**:release notes / 旧 plan / validation 保留;如要全清需单独决定。
|
|
130
|
+
10. **文档旧计数**:个别历史文档仍写四宿主/旧测试数,属历史记录,不阻断发布。
|
|
131
|
+
|
|
132
|
+
## 6. 风险 / 需要复核
|
|
133
|
+
|
|
134
|
+
| 风险 | 说明 |
|
|
135
|
+
|---|---|
|
|
136
|
+
| DSH 同版本不刷新 | beta.15 → beta.15 可能 no-op;需移除重加或 bump |
|
|
137
|
+
| `gpt-5.6-sol` 不是专用 deep research 模型 | 官方指南称其为替代;真实工具/参数仍需 key 验收 |
|
|
138
|
+
| 44 工具全量 | 第三阶段可见,但模型工具面变大;需要时可用 scope 收窄 |
|
|
139
|
+
| Claude 项目路径改动 | 未真实跑过 project/local scope |
|
|
140
|
+
| 历史文档仍提 Pi | 已标注历史;不影响当前代码 |
|
|
141
|
+
| `docs/details.en.md` 等有非本次写入规则改动 | 属于工作树中既有/并行改动,未混入核心逻辑;发布前应确认是否要一起提交 |
|
|
142
|
+
|
|
143
|
+
## 7. 复核命令
|
|
144
|
+
|
|
145
|
+
```sh
|
|
146
|
+
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src:tests \
|
|
147
|
+
python3 -B -m unittest discover -s tests -p 'test_*.py'
|
|
148
|
+
# 768 passed, 3 skipped
|
|
149
|
+
|
|
150
|
+
git diff --check
|
|
151
|
+
python3 scripts/bench_preflight.py --repeats 3
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
相关报告:
|
|
155
|
+
|
|
156
|
+
- [预检压测](bench-preflight-2026-10-21.md)
|
|
157
|
+
- [真实网络测试](network-test-2026-10-21.md)
|
|
158
|
+
- [搜索时延官方核对](search-latency-provider-research-2026-10-21.md)
|
|
159
|
+
- [三宿主计划](three-host-plan-2026-10-21.md)
|