bookmark-research 0.5.0-beta.14 → 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 +57 -55
- package/README.zh.md +53 -52
- package/docs/bench-preflight-2026-10-21.md +85 -0
- package/docs/bookmark-research-architecture.md +3 -3
- package/docs/details.en.md +14 -17
- 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 +11 -38
- package/docs/installation.md +13 -46
- 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/hosts/dsh/workflow-call.py +21 -5
- package/hosts/shared/discovery-flow.js +211 -0
- package/hosts/shared/discovery.json +14 -0
- package/hosts/shared/research-call.py +4 -2
- 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 +29 -31
- 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 -4
- package/skills/bookmark-research/references/cli.md +3 -2
- package/skills/bookmark-research/references/deep-research.md +7 -1
- package/skills/bookmark-research/references/host-workflows.md +10 -23
- package/skills/bookmark-research/references/package-semantics.md +7 -3
- package/skills/bookmark-research/references/research-services.md +2 -2
- package/skills/bookmark-research/references/settings-and-archive.md +10 -5
- package/skills/bookmark-research/references/wiki-and-evaluation.md +1 -1
- package/skills/bookmark-research/references/zh/cli.md +3 -2
- package/skills/bookmark-research/references/zh/deep-research.md +7 -1
- package/skills/bookmark-research/references/zh/host-workflows.md +10 -23
- package/skills/bookmark-research/references/zh/package-semantics.md +7 -3
- package/skills/bookmark-research/references/zh/research-services.md +2 -2
- package/skills/bookmark-research/references/zh/settings-and-archive.md +10 -5
- package/skills/bookmark-research/references/zh/skill-guide.md +5 -1
- package/skills/bookmark-research/references/zh/wiki-and-evaluation.md +1 -1
- package/src/archive.py +223 -14
- package/src/bookmark_index.py +416 -4
- package/src/cli.py +15 -8
- package/src/context_output.py +31 -4
- package/src/discovery.py +118 -0
- package/src/mcp_server.py +156 -22
- package/src/onboarding.py +9 -9
- package/src/raw_library.py +54 -0
- package/src/readiness.py +2 -3
- package/src/research.py +137 -6
- package/src/research_plan.py +337 -0
- package/src/research_services.py +11 -4
- package/src/routing.py +2 -9
- package/src/search_results.py +4 -1
- package/src/settings.py +36 -4
- package/src/web_search.py +75 -12
- package/src/wiki.py +86 -5
- 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.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 -72
- 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,95 +5,99 @@
|
|
|
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.
|
|
9
|
-
|
|
10
|
-
Works in **Codex, Claude Code, Pi and DSH (DeepSeek Harness)**.
|
|
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)**.
|
|
11
9
|
|
|
12
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)
|
|
13
11
|
|
|
14
12
|
> [!NOTE]
|
|
15
|
-
> **0.5.0 is a beta
|
|
13
|
+
> **0.5.0 is a prerelease**, published on npm's `beta` tag; the `latest` tag still points at an older build. Report problems on [GitHub Issues](https://github.com/Browser-bookmark-hub/Bookmark-Research/issues).
|
|
14
|
+
|
|
15
|
+
## How it works
|
|
16
16
|
|
|
17
|
-
**
|
|
17
|
+
- **Local understanding.** A Bookmark Canvas package is read as structure, not a flat URL list: card and group layout, edges with their direction and labels, and the same bookmark appearing across cards (spatial context); dated fields, protocol-defined date segments in IDs, and Git commits that changed content (temporal context). These queries run offline.
|
|
18
|
+
- **External research takes one of three routes.** Reading a known URL needs no reasoning; agentic search has the host model plan, search, read and follow the gaps; deep research adds a persistent inventory, independent verification, a coverage check and a report. Enabled OpenAI Deep Research or Parallel Task API runs are a separate, optional route; headless-browser and scraping projects are not bundled.
|
|
19
|
+
- **Reviewed knowledge store.** Finished research can be compiled into a Wiki of reviewed pages with revisions and links, reused by later questions instead of searching the web again.
|
|
18
20
|
|
|
19
21
|
## Requirements
|
|
20
22
|
|
|
21
|
-
- Python 3.9+ with SQLite FTS5 (
|
|
22
|
-
- The CLI of at least one client: Codex, Claude Code
|
|
23
|
-
- Node 18+ and npm
|
|
24
|
-
- No API key is needed to install or to query bookmarks locally
|
|
23
|
+
- Python 3.9+ with SQLite FTS5 (checked by `bookmark-research doctor`)
|
|
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
|
+
- Node 18+ and npm to install a release
|
|
26
|
+
- No API key is needed to install, or to query bookmarks locally
|
|
25
27
|
|
|
26
28
|
## Install
|
|
27
29
|
|
|
28
|
-
**Current beta (`0.5.0-beta.14`)**, interactive on macOS, Linux and Windows:
|
|
29
|
-
|
|
30
30
|
```sh
|
|
31
|
-
npx bookmark-research@
|
|
31
|
+
npx bookmark-research@beta install
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
**Default-channel interactive installation:**
|
|
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):
|
|
37
35
|
|
|
38
36
|
```sh
|
|
39
|
-
|
|
37
|
+
curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash
|
|
40
38
|
```
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
### What the installer asks
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
1. **Clients** — arrow keys and Space to toggle; detected CLIs are preselected. The install plan is shown for confirmation.
|
|
43
|
+
2. **Research depth (optional)** — leave `auto` and the depth is picked from each request; set `quick`, `agentic` or `deep` only to pin one default.
|
|
44
|
+
3. **Answer and report language** — follow the question, Chinese or English.
|
|
45
|
+
4. **Search and page-reading services** — one ordered multiselect. Unselected providers become the fallback search tier.
|
|
46
|
+
5. **Storage** — the default data folder, one custom folder for archives and reports, or reports beside the bookmark file or folder.
|
|
47
|
+
6. **Optional professional APIs** — off by default: OpenAI Deep Research or the Parallel Task API.
|
|
48
|
+
7. **API keys** — one hidden prompt per selected key, checked immediately; every key is optional.
|
|
49
|
+
8. **Service check** — runs on its own and reports each provider; a sample search/read test is opt-in.
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
Enter keeps the highlighted value, so a full run can be just a few keystrokes. Then start a new client session so the Skill and MCP tools load. Wiki follow-up (suggest and ask first) and the pre-research availability check (15-minute cache) are on by default and need no answer.
|
|
52
|
+
|
|
53
|
+
### Non-interactive install
|
|
47
54
|
|
|
48
55
|
| Client | Command | Registers with |
|
|
49
56
|
| --- | --- | --- |
|
|
50
|
-
| Codex | `npx bookmark-research@
|
|
51
|
-
| Claude Code | `npx bookmark-research@
|
|
52
|
-
|
|
|
53
|
-
| DSH | `npx bookmark-research@latest install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
54
|
-
|
|
55
|
-
**One release source for all four hosts:** npm contains the shared runtime, Skill and host adapters. The installer downloads the release, prepares the selected host format, then invokes the host’s native commands. Updates retain an npm selector rather than an npx cache path. GitHub hosts source and installation catalogs; unpublished source uses the Python installer. See [distribution policy and official references](docs/distribution.md).
|
|
56
|
-
|
|
57
|
-
**DSH installs the release directly:** the published package declares `dsh.bundle.patch`, so `dsh plugin --profile <name> add bookmark-research@<version>` — or the DSH plugin manager — installs it with no export first, resolving Python and MCP paths from the installed package. DeepSeek Harness Desktop reserves the `desktop` profile for its own carrier, so install that one with the app's CLI; the installer and the wizard locate that bundled CLI themselves on macOS, Windows and Linux, and fall back to it when the `dsh` on PATH has no pnpm. See the [installation guide](docs/installation.en.md).
|
|
57
|
+
| Codex | `npx bookmark-research@beta install codex --non-interactive` | `codex plugin add` |
|
|
58
|
+
| Claude Code | `npx bookmark-research@beta install claude --scope user --non-interactive` | `claude plugin install` |
|
|
59
|
+
| DSH | `npx bookmark-research@beta install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
58
60
|
|
|
59
|
-
|
|
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).
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
**Ask your agent to install it.** Paste this into Codex, Claude Code, Pi or DSH:
|
|
63
|
+
**Ask your agent to install it.** Paste this into Codex, Claude Code or DSH:
|
|
64
64
|
|
|
65
65
|
```text
|
|
66
66
|
Install the Bookmark Research plugin into the client you are running in.
|
|
67
67
|
|
|
68
|
-
1. Identify your own client: codex, claude
|
|
69
|
-
2. Run: npx bookmark-research@
|
|
70
|
-
- Claude Code
|
|
68
|
+
1. Identify your own client: codex, claude or dsh.
|
|
69
|
+
2. Run: npx bookmark-research@beta install <client> --non-interactive
|
|
70
|
+
- Claude Code: add --scope user (or --scope project --project <dir>).
|
|
71
71
|
- DSH: add --profile <profile>; ask me for the profile name.
|
|
72
72
|
3. The command prints JSON. Confirm "verified": true and report any "error".
|
|
73
73
|
4. Do not ask me for API keys in chat. Tell me to run `bookmark-research setup`
|
|
74
|
-
|
|
74
|
+
in my terminal to enter them.
|
|
75
75
|
5. Tell me to start a new session so the Skill and MCP tools load.
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
Install notes:
|
|
79
|
+
|
|
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).
|
|
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.
|
|
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.
|
|
79
83
|
|
|
80
|
-
|
|
84
|
+
## Configure and update
|
|
85
|
+
|
|
86
|
+
**Open the configuration page.** Run `bookmark-research` with no arguments in a terminal: the menu covers preferences and API keys, service checks, installing into another client, updates and status. The alias `bookmark` (or `bookmark research`) does the same, and `bookmark-research setup` goes straight to the wizard.
|
|
81
87
|
|
|
82
88
|
| Task | Command |
|
|
83
89
|
| --- | --- |
|
|
84
|
-
| Menu: configure, check, install, update | `bookmark-research` (alias `bookmark`, or `bookmark research`) |
|
|
85
90
|
| Preferences and API keys | `bookmark-research setup` |
|
|
86
|
-
|
|
|
87
|
-
|
|
|
91
|
+
| Menu | `bookmark-research` · `bookmark` · `bookmark research` |
|
|
92
|
+
| Clients, preferences, storage, recent research, key status | `bookmark-research status` |
|
|
93
|
+
| Scripted preferences | `bookmark-research config show` · `bookmark-research config set --input prefs.json` |
|
|
88
94
|
| Update or verify all clients | `bookmark-research update` · `bookmark-research verify` |
|
|
89
95
|
|
|
90
|
-
Use `npx bookmark-research@
|
|
91
|
-
|
|
92
|
-
**Open the configuration page.** In a terminal, `bookmark-research` (or its alias `bookmark`) with no arguments opens the menu: change preferences and API keys, check services, install into another client, update, or print status. `bookmark-research setup` goes straight to the guided wizard, and adding `--lang zh` shows the wizard and menu in Chinese. Preferences and keys are user-wide, so one change applies to every installed client; start a new client session afterwards.
|
|
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.
|
|
93
97
|
|
|
94
|
-
**Update.** `bookmark-research update` refreshes every installed client from its registered source and keeps preferences, keys and data. Re-running `npx bookmark-research@
|
|
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.
|
|
95
99
|
|
|
96
|
-
**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.
|
|
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.
|
|
97
101
|
|
|
98
102
|
| Variable | Service | Without it |
|
|
99
103
|
| --- | --- | --- |
|
|
@@ -103,9 +107,7 @@ Use `npx bookmark-research@latest …` if the command is not installed globally.
|
|
|
103
107
|
| `JINA_API_KEY` | Jina search | Jina Reader still reads pages anonymously |
|
|
104
108
|
| `OPENAI_API_KEY` | Optional OpenAI Deep Research runs | Feature off; host-led research still works |
|
|
105
109
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Preferences (research depth, answer language, providers, archiving, output location, Wiki follow-up) can also be changed by asking the agent in a client session; it uses the `update_settings` tool.
|
|
110
|
+
Keys are never accepted in chat, command arguments or JSON files. Preferences can also be changed by asking the agent in a client session ("Show Bookmark Research settings", "Use only Exa for future searches"); it uses the `update_settings` tool.
|
|
109
111
|
|
|
110
112
|
## Where data is stored
|
|
111
113
|
|
|
@@ -121,11 +123,13 @@ Nothing is written into your bookmark files or the plugin. The data directory is
|
|
|
121
123
|
| `raw-library.sqlite3` | Rebuildable full-text index for `search_archive` |
|
|
122
124
|
| `${XDG_CONFIG_HOME:-~/.config}/bookmark-research/` | `settings.json` and `credentials.json` (private, owner-only) |
|
|
123
125
|
|
|
124
|
-
|
|
126
|
+
Changing the location affects new research only; existing tasks stay where they are.
|
|
127
|
+
|
|
128
|
+
## Research loops and delegation
|
|
125
129
|
|
|
126
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.
|
|
127
131
|
|
|
128
|
-
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.
|
|
129
133
|
|
|
130
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.
|
|
131
135
|
|
|
@@ -136,20 +140,18 @@ A bundle of one Skill, one local MCP server, and the remote MCPs and services th
|
|
|
136
140
|
| Layer | Component | Runs as | Setup |
|
|
137
141
|
| --- | --- | --- | --- |
|
|
138
142
|
| Skill | [`bookmark-research`](skills/bookmark-research/SKILL.md) and 11 method references, each with a [Chinese copy](skills/bookmark-research/references/zh/skill-guide.md) | Loaded by the client | None |
|
|
139
|
-
| Local MCP | `bookmark-research`,
|
|
143
|
+
| Local MCP | `bookmark-research`, 44 tools (below) | Python process started by the client | Installed for you |
|
|
140
144
|
| Remote MCPs, called by the local MCP | [Exa](https://exa.ai) (search, page reading), [Parallel](https://parallel.ai) (search, fallback reading), [Tavily](https://tavily.com) (search fallback) | HTTPS, no local process | Optional API keys |
|
|
141
145
|
| HTTP service, called by the local MCP | [Jina Reader](https://jina.ai/reader) (fallback reading; search with a key) | HTTPS | Optional `JINA_API_KEY` |
|
|
142
146
|
| Optional client MCPs | Exa Agent, Parallel Task MCP, Tavily Research | Added to your client by you | `bookmark-research setup` shows the steps |
|
|
143
147
|
|
|
144
148
|
Local MCP tools:
|
|
145
149
|
|
|
146
|
-
This list describes the current source tree; `wiki_refresh` and `wiki_work` have shipped in every release since `0.5.0-beta.10`. Implementation status and remaining work: [upgrade checklist](docs/upgrade-status-2026-10-11.md).
|
|
147
|
-
|
|
148
150
|
| Group | Tools |
|
|
149
151
|
| --- | --- |
|
|
150
|
-
| Bookmarks | `sync_package`, `index_status`, `source_history`, `source_remove`, `source_merge`, `search_bookmarks`, `get_context` |
|
|
152
|
+
| Bookmarks | `sync_package`, `index_status`, `source_history`, `source_remove`, `source_merge`, `search_bookmarks`, `get_context`, `plan_research` |
|
|
151
153
|
| Web | `search_web`, `fetch_web`, `search_archive`, `search_providers` |
|
|
152
|
-
| Research | `research_readiness`, `research_start`, `research_status`, `research_search`, `research_fetch`, `research_source`, `research_record`, `research_inventory`, `research_coverage`, `research_import_evidence`, `research_finish`, `research_route` |
|
|
154
|
+
| Research | `research_readiness`, `research_start`, `research_status`, `research_search`, `research_fetch`, `research_source`, `research_record`, `research_inventory`, `research_coverage`, `research_import_evidence`, `research_finish`, `research_route`, `discovery_bundle` |
|
|
153
155
|
| Research services (optional) | `research_services`, `research_service_prepare`, `_start`, `_status`, `_result`, `_cancel`, `_attach`, `_import` |
|
|
154
156
|
| Settings | `get_settings`, `update_settings` |
|
|
155
157
|
| Wiki and evaluation | `wiki_write`, `wiki_get`, `wiki_list`, `wiki_search`, `wiki_refresh`, `wiki_work`, `wiki_lint`, `wiki_acknowledge`, `evaluate_research` |
|
package/README.zh.md
CHANGED
|
@@ -5,95 +5,98 @@
|
|
|
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)
|
|
9
|
-
|
|
10
|
-
支持 **Codex、Claude Code、Pi、DSH(DeepSeek Harness)**。
|
|
8
|
+
用联网查证来研究你的书签。给它一份书签 URL 列表或 [Bookmark Canvas](https://github.com/Browser-bookmark-hub/Bookmark-Canvas) 数据包,它会逐条核对链接、搜索和阅读网页,写出带引用、可以接着做的研究报告。支持 **Codex、Claude Code、DSH(DeepSeek Harness)**。
|
|
11
9
|
|
|
12
10
|
[安装说明](docs/installation.md) · [使用指南](docs/user-guide.md) · [详细说明](docs/details.md) · [npm](https://www.npmjs.com/package/bookmark-research)
|
|
13
11
|
|
|
14
12
|
> [!NOTE]
|
|
15
|
-
> **0.5.0
|
|
13
|
+
> **0.5.0 是测试版**,发布在 npm 的 `beta` 标签上;`latest` 标签仍指向更早的构建。遇到问题请到 [GitHub Issues](https://github.com/Browser-bookmark-hub/Bookmark-Research/issues) 反馈。
|
|
14
|
+
|
|
15
|
+
## 它是怎么工作的
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
- **本地理解层。** 数据包按结构读,而不是一张平铺的 URL 清单:卡片与分组的位置、连线的方向与标签、同一书签在不同卡片的出现位置(空间上下文);日期字段、ID 中协议定义的日期段,以及真正改过内容的 Git 提交(时间上下文)。这些都是离线查询。
|
|
18
|
+
- **外部调研走三条路线。** 读取已知 URL 不需要推理;Agentic 搜索由宿主模型自己规划、搜索、阅读并追查缺口;深度研究在此基础上加入持续清单、独立核验、覆盖检查与报告。启用后的 OpenAI Deep Research/Parallel Task API 是另一条可选路线;无头浏览器与爬虫类项目不在集成范围内。
|
|
19
|
+
- **可复核的知识存储。** 完成的研究可以沉淀成 Wiki:带历史版本和相互链接的已审核页面,之后提问直接复用,不必重新搜索网页。
|
|
18
20
|
|
|
19
21
|
## 环境要求
|
|
20
22
|
|
|
21
|
-
- Python 3.9+,含 SQLite FTS5
|
|
22
|
-
- 至少一个宿主的 CLI:Codex、Claude Code
|
|
23
|
-
-
|
|
23
|
+
- Python 3.9+,含 SQLite FTS5(用 `bookmark-research doctor` 检查)
|
|
24
|
+
- 至少一个宿主的 CLI:Codex、Claude Code 或 DSH。DSH 另需 `pnpm`;若用 DeepSeek Harness 桌面版自带 CLI,则它自带 pnpm,无需另装
|
|
25
|
+
- 安装发布版需要 Node 18+ 和 npm
|
|
24
26
|
- 安装和本地查书签都不需要 API Key
|
|
25
27
|
|
|
26
28
|
## 安装
|
|
27
29
|
|
|
28
|
-
**当前测试版(`0.5.0-beta.14`)**,支持 macOS、Linux、Windows 交互安装:
|
|
29
|
-
|
|
30
30
|
```sh
|
|
31
|
-
npx bookmark-research@
|
|
31
|
+
npx bookmark-research@beta install
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
**默认渠道的交互安装:**
|
|
34
|
+
`@beta` 跟随最新测试版;要固定某个构建可写 `@0.5.0-beta.16`。加 `--lang zh` 可让向导显示中文。想一直能用 `bookmark-research` 命令,运行 `npm install -g bookmark-research`;GitHub 便捷脚本使用同一 npm 发布版(macOS/Linux/WSL):
|
|
37
35
|
|
|
38
36
|
```sh
|
|
39
|
-
|
|
37
|
+
curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash
|
|
40
38
|
```
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
### 安装向导会问你什么
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
1. **装到哪些宿主** —— 方向键移动、空格勾选;检测到的 CLI 默认已勾选,随后显示安装计划让你确认。
|
|
43
|
+
2. **默认研究深度(可选)** —— 保持 `auto` 就会按每次请求自动定档;只有想钉死一个默认时才改成 `quick`、`agentic` 或 `deep`。
|
|
44
|
+
3. **答复和报告语言** —— 跟随提问语言、中文或英文。
|
|
45
|
+
4. **搜索与正文读取服务** —— 一个有序多选列表;未选中的服务自动作为备用搜索层。
|
|
46
|
+
5. **存放位置** —— 默认数据目录、自定义统一目录(归档与研究报告),或研究报告放在书签文件/文件夹旁边。
|
|
47
|
+
6. **可选专业研究 API** —— 默认关闭:OpenAI Deep Research 或 Parallel Task API。
|
|
48
|
+
7. **API Key** —— 逐个隐藏输入,当场检查;全部可选,可整段跳过。
|
|
49
|
+
8. **服务检查** —— 自动运行并逐个报告;样例搜索/阅读自检需另行选择。
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
回车即保留当前选项,所以整轮可能只需按几次回车。装好后新建一个宿主会话,让 Skill 和 MCP 工具生效。Wiki 整理(默认「给出建议并先问你」)和联网前的可用性检查(默认 15 分钟缓存)都已自动开启,不需要回答。
|
|
52
|
+
|
|
53
|
+
### 指定宿主、不弹提示
|
|
47
54
|
|
|
48
55
|
| 宿主 | 命令 | 实际登记方式 |
|
|
49
56
|
| --- | --- | --- |
|
|
50
|
-
| Codex | `npx bookmark-research@
|
|
51
|
-
| Claude Code | `npx bookmark-research@
|
|
52
|
-
|
|
|
53
|
-
| DSH | `npx bookmark-research@latest install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
54
|
-
|
|
55
|
-
**四个宿主统一发布来源:** npm 包包含共享运行时、Skill 和宿主适配。安装器下载发布包,生成所选宿主格式,再调用宿主原生命令;更新记录 npm 来源,不依赖 npx 临时缓存。GitHub 提供源码和安装清单,未发布源码用 Python 安装器。见[发布约定与官方依据](docs/distribution.md)。
|
|
56
|
-
|
|
57
|
-
**DSH 可直接安装发布包:** 发布包声明 `dsh.bundle.patch`,`dsh plugin --profile <名称> add bookmark-research@<版本>`(或 DSH 插件管理界面)无需先导出即可安装,Python 与 MCP 路径按安装位置解析。DeepSeek Harness 桌面版把 `desktop` profile 保留给自身载体,该 profile 请用桌面版自带 CLI 安装;安装器与向导会在 macOS、Windows、Linux 上自行定位该 CLI,并在 PATH 中的 `dsh` 缺少 pnpm 时改用它。详见[安装说明](docs/installation.md)。
|
|
57
|
+
| Codex | `npx bookmark-research@beta install codex --non-interactive` | `codex plugin add` |
|
|
58
|
+
| Claude Code | `npx bookmark-research@beta install claude --scope user --non-interactive` | `claude plugin install` |
|
|
59
|
+
| DSH | `npx bookmark-research@beta install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
一次装多个:`npx bookmark-research@beta install claude dsh --profile web --non-interactive`。装到指定项目:`--scope project --project /path/to/project`(Claude Code)。全部参数见[安装说明](docs/installation.md)。
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
**让 agent 帮你装。** 把下面这段粘贴给 Codex、Claude Code、Pi 或 DSH:
|
|
63
|
+
**让 agent 帮你装。** 把下面这段粘贴给 Codex、Claude Code 或 DSH:
|
|
64
64
|
|
|
65
65
|
```text
|
|
66
66
|
请把 Bookmark Research 插件安装到你当前运行的这个宿主里。
|
|
67
67
|
|
|
68
|
-
1. 先确认你自己是哪个宿主:codex、claude
|
|
69
|
-
2. 运行:npx bookmark-research@
|
|
70
|
-
- Claude Code
|
|
68
|
+
1. 先确认你自己是哪个宿主:codex、claude 或 dsh。
|
|
69
|
+
2. 运行:npx bookmark-research@beta install <宿主> --non-interactive
|
|
70
|
+
- Claude Code:加 --scope user(或 --scope project --project <目录>)。
|
|
71
71
|
- DSH:加 --profile <名称>;profile 名称请先问我。
|
|
72
72
|
3. 命令会输出 JSON。确认 "verified": true,有 "error" 就告诉我。
|
|
73
|
-
4. 不要在对话里向我要 API Key。请让我在终端运行 `bookmark-research setup`
|
|
74
|
-
(或 `npx bookmark-research@latest setup`)自己输入。
|
|
73
|
+
4. 不要在对话里向我要 API Key。请让我在终端运行 `bookmark-research setup` 自己输入。
|
|
75
74
|
5. 提醒我新建一个会话,让 Skill 和 MCP 工具生效。
|
|
76
75
|
```
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
安装补充说明:
|
|
78
|
+
|
|
79
|
+
- **npm 是四个宿主唯一的发布来源**,包内含共享运行时、Skill 和宿主适配文件。安装器下载发布包、生成该宿主需要的格式,再调用宿主原生命令登记。GitHub 提供源码、版本说明和安装清单;未发布源码用 Python 安装器。见[发布约定](docs/distribution.md)。
|
|
80
|
+
- **DSH 可直接安装发布包。** 包内声明 `dsh.bundle.patch`,`dsh plugin --profile <名称> add bookmark-research@<版本>` 无需先导出即可安装。`desktop` profile 保留给 DeepSeek Harness 桌面版,请用桌面版自带 CLI 安装;安装器与向导会自行定位该 CLI。
|
|
81
|
+
- **Windows** 上常常没有能用的 `python3`,所以安装器会把检测到的 Python 路径写进各宿主的 MCP 配置。Codex 请用 `bookmark-research install codex` 安装,不要直接把仓库加进 Codex;`bookmark-research status` 可以查看实际使用的 Python。
|
|
79
82
|
|
|
80
|
-
|
|
83
|
+
## 配置页与更新
|
|
84
|
+
|
|
85
|
+
**进入配置页。** 在终端里不带参数运行 `bookmark-research` 就会打开菜单:修改配置与 API Key、检查服务、安装到其他宿主、更新、查看状态。别名 `bookmark`(或 `bookmark research`)等价,`bookmark-research setup` 直接进入向导。
|
|
81
86
|
|
|
82
87
|
| 要做什么 | 命令 |
|
|
83
88
|
| --- | --- |
|
|
84
|
-
| 主菜单:配置、检查、安装、更新 | `bookmark-research`(别名 `bookmark`,或 `bookmark research`) |
|
|
85
89
|
| 修改偏好和 API Key | `bookmark-research setup` |
|
|
90
|
+
| 打开菜单 | `bookmark-research` · `bookmark` · `bookmark research` |
|
|
86
91
|
| 查看已装宿主、偏好、保存位置、最近研究、Key 状态 | `bookmark-research status` |
|
|
87
92
|
| 用脚本改偏好 | `bookmark-research config show` · `bookmark-research config set --input prefs.json` |
|
|
88
93
|
| 更新或验证所有宿主 | `bookmark-research update` · `bookmark-research verify` |
|
|
89
94
|
|
|
90
|
-
没有全局安装时,在前面加 `npx
|
|
91
|
-
|
|
92
|
-
**进入配置页。** 在终端里不带参数运行 `bookmark-research`(或别名 `bookmark`)即可打开菜单:修改配置与 API Key、检查服务、安装到其他宿主、更新、查看状态。`bookmark-research setup` 直接进入引导向导,加上 `--lang zh` 可让向导和菜单显示中文。偏好和 Key 是用户级的,改一次就对所有已安装宿主生效;改完新建宿主会话即可。
|
|
95
|
+
没有全局安装时,在前面加 `npx bookmark-research@beta`。偏好和 Key 是用户级的,改一次就对所有已安装宿主生效;改完新建宿主会话即可。加 `--lang zh` 可让向导和菜单显示中文。
|
|
93
96
|
|
|
94
|
-
**更新。** `bookmark-research update` 会按各自登记的来源刷新所有已安装宿主,并保留偏好、Key 和数据。重跑 `npx bookmark-research@
|
|
97
|
+
**更新。** `bookmark-research update` 会按各自登记的来源刷新所有已安装宿主,并保留偏好、Key 和数据。重跑 `npx bookmark-research@beta install` 也会就地升级已装的 Claude Code 或 DSH。Codex 安装会保留登记时的来源与版本,要换版本需先移除该登记(`codex plugin marketplace remove bookmark-research`)再重新安装。
|
|
95
98
|
|
|
96
|
-
**API Key 都是可选的。** 在 `bookmark-research setup` 里输入(隐藏显示,输完当场检查,保存在仅当前用户可读的本地文件),或者设置环境变量(优先于已保存的 Key)。
|
|
99
|
+
**API Key 都是可选的。** 在 `bookmark-research setup` 里输入(隐藏显示,输完当场检查,保存在仅当前用户可读的本地文件),或者设置环境变量(优先于已保存的 Key)。
|
|
97
100
|
|
|
98
101
|
| 环境变量 | 服务 | 不配置时 |
|
|
99
102
|
| --- | --- | --- |
|
|
@@ -103,9 +106,7 @@ npx bookmark-research@latest install
|
|
|
103
106
|
| `JINA_API_KEY` | Jina 搜索 | Jina Reader 仍可匿名读取网页 |
|
|
104
107
|
| `OPENAI_API_KEY` | 可选的 OpenAI Deep Research 任务 | 功能关闭;宿主自己的研究不受影响 |
|
|
105
108
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
研究深度、答复语言、服务选择、归档、结果位置、Wiki 整理这些偏好,也可以直接在宿主会话里让 agent 改,它会调用 `update_settings` 工具。
|
|
109
|
+
Key 不接受对话、命令参数或 JSON 文件。偏好也可以直接在宿主会话里让 agent 改(「显示 Bookmark Research 的配置」「以后只用 Exa 搜索」),它会调用 `update_settings` 工具。
|
|
109
110
|
|
|
110
111
|
## 数据保存在哪里
|
|
111
112
|
|
|
@@ -121,11 +122,13 @@ setup 还会问研究报告和证据放在哪里:统一目录(默认 `<数
|
|
|
121
122
|
| `raw-library.sqlite3` | `search_archive` 使用的全文索引,可重建 |
|
|
122
123
|
| `${XDG_CONFIG_HOME:-~/.config}/bookmark-research/` | `settings.json` 和 `credentials.json`(仅当前用户可读) |
|
|
123
124
|
|
|
125
|
+
位置设置只影响新的研究任务,已有任务留在原处。
|
|
126
|
+
|
|
124
127
|
## Agent 循环与子代理
|
|
125
128
|
|
|
126
129
|
宿主模型负责规划、搜索/阅读、评估证据,再追查未解决的问题。Skill 指导这个循环,MCP 保存输入范围、证据、预算和进度;保存研究任务不会启动后台代理。
|
|
127
130
|
|
|
128
|
-
对于分组报告,插件提供“阅读代理 → 新的验证代理 → 覆盖检查 → 补查 → 报告”的流程。Codex 使用原生子代理和附带的委派指南;Claude Code、DSH
|
|
131
|
+
对于分组报告,插件提供“阅读代理 → 新的验证代理 → 覆盖检查 → 补查 → 报告”的流程。Codex 使用原生子代理和附带的委派指南;Claude Code、DSH 使用已加载的宿主工作流接口。并发、取消和代理生命周期由宿主管理。每个子代理都需要拿到相关指令,并访问同一个研究存储。
|
|
129
132
|
|
|
130
133
|
工作流适配已有模拟接口测试,但安装成功不代表所有宿主都已跑通完整的多代理任务。所需条件见[宿主工作流](skills/bookmark-research/references/zh/host-workflows.md),实际验证范围见[验证记录](docs/validation-0.4.0.md#host-and-provider-boundaries)。
|
|
131
134
|
|
|
@@ -136,20 +139,18 @@ setup 还会问研究报告和证据放在哪里:统一目录(默认 `<数
|
|
|
136
139
|
| 层 | 组成 | 运行方式 | 需要配置 |
|
|
137
140
|
| --- | --- | --- | --- |
|
|
138
141
|
| Skill | [`bookmark-research`](skills/bookmark-research/SKILL.md) 及 11 份方法参考,每份都有[中文版](skills/bookmark-research/references/zh/skill-guide.md) | 由宿主加载 | 不需要 |
|
|
139
|
-
| 本地 MCP | `bookmark-research`,
|
|
142
|
+
| 本地 MCP | `bookmark-research`,44 个工具(见下表) | 宿主启动的 Python 进程 | 安装器自动完成 |
|
|
140
143
|
| 本地 MCP 调用的远程 MCP | [Exa](https://exa.ai)(搜索、网页读取)、[Parallel](https://parallel.ai)(搜索、备用读取)、[Tavily](https://tavily.com)(备用搜索) | HTTPS,不启动本地进程 | 可选 API Key |
|
|
141
144
|
| 本地 MCP 调用的 HTTP 服务 | [Jina Reader](https://jina.ai/reader)(备用读取;有 Key 时可搜索) | HTTPS | 可选 `JINA_API_KEY` |
|
|
142
145
|
| 可选的宿主 MCP | Exa Agent、Parallel Task MCP、Tavily Research | 需自行加到宿主里 | `bookmark-research setup` 会给出步骤 |
|
|
143
146
|
|
|
144
147
|
本地 MCP 的工具:
|
|
145
148
|
|
|
146
|
-
下表对应当前源码;`wiki_refresh` 和 `wiki_work` 自 `0.5.0-beta.10` 起已包含在每个发布包中。已实现与剩余事项见[升级核对记录](docs/upgrade-status-2026-10-11.md)。
|
|
147
|
-
|
|
148
149
|
| 分类 | 工具 |
|
|
149
150
|
| --- | --- |
|
|
150
|
-
| 书签 | `sync_package`、`index_status`、`source_history`、`source_remove`、`source_merge`、`search_bookmarks`、`get_context` |
|
|
151
|
+
| 书签 | `sync_package`、`index_status`、`source_history`、`source_remove`、`source_merge`、`search_bookmarks`、`get_context`、`plan_research` |
|
|
151
152
|
| 网页 | `search_web`、`fetch_web`、`search_archive`、`search_providers` |
|
|
152
|
-
| 研究 | `research_readiness`、`research_start`、`research_status`、`research_search`、`research_fetch`、`research_source`、`research_record`、`research_inventory`、`research_coverage`、`research_import_evidence`、`research_finish`、`research_route` |
|
|
153
|
+
| 研究 | `research_readiness`、`research_start`、`research_status`、`research_search`、`research_fetch`、`research_source`、`research_record`、`research_inventory`、`research_coverage`、`research_import_evidence`、`research_finish`、`research_route`、`discovery_bundle` |
|
|
153
154
|
| 专业研究服务(可选) | `research_services`、`research_service_prepare`、`_start`、`_status`、`_result`、`_cancel`、`_attach`、`_import` |
|
|
154
155
|
| 设置 | `get_settings`、`update_settings` |
|
|
155
156
|
| Wiki 与评测 | `wiki_write`、`wiki_get`、`wiki_list`、`wiki_search`、`wiki_refresh`、`wiki_work`、`wiki_lint`、`wiki_acknowledge`、`evaluate_research` |
|
|
@@ -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
|
|