bookmark-research 0.5.0-beta.15 → 0.5.0-beta.17
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 +3 -1
- package/README.md +30 -27
- package/README.zh.md +29 -26
- package/config/providers.json +15 -0
- package/docs/bookmark-research-architecture.md +8 -119
- package/docs/details.en.md +21 -27
- package/docs/details.md +9 -10
- package/docs/distribution.md +4 -7
- package/docs/harness-compatibility.md +10 -299
- package/docs/installation.en.md +11 -38
- package/docs/installation.md +15 -48
- package/docs/instructions.en.md +2 -3
- package/docs/instructions.md +2 -3
- package/docs/prompt-reference.en.md +1 -1
- package/docs/prompt-reference.md +1 -1
- package/docs/user-guide.en.md +4 -3
- package/docs/user-guide.md +6 -5
- package/hosts/claude/commands/research.md +7 -0
- package/hosts/codex/delegate.md +2 -0
- package/hosts/dsh/plugin.js +2 -0
- package/hosts/dsh/workflow-call.py +4 -16
- package/hosts/shared/research-call.py +11 -1
- package/install.sh +8 -8
- package/package.json +1 -7
- package/scripts/bench_preflight.py +189 -0
- package/scripts/build_zip.py +1 -10
- package/scripts/export_bundle.py +3 -68
- package/scripts/host_assets.py +14 -24
- package/scripts/host_clients.py +14 -37
- package/scripts/host_install.py +1 -1
- package/scripts/install.py +16 -18
- package/scripts/launcher.py +1 -1
- package/scripts/verify_live.py +2 -2
- package/skills/bookmark-research/SKILL.md +18 -42
- package/skills/bookmark-research/references/cli.md +4 -5
- package/skills/bookmark-research/references/deep-research.md +3 -1
- package/skills/bookmark-research/references/host-workflows.md +3 -33
- package/skills/bookmark-research/references/package-semantics.md +3 -2
- package/skills/bookmark-research/references/research-methods.md +1 -1
- package/skills/bookmark-research/references/research-services.md +25 -47
- package/skills/bookmark-research/references/research-workflow.md +4 -3
- package/skills/bookmark-research/references/settings-and-archive.md +13 -7
- package/skills/bookmark-research/references/{wiki-and-evaluation.md → wiki.md} +29 -27
- package/skills/bookmark-research/references/zh/cli.md +4 -5
- package/skills/bookmark-research/references/zh/deep-research.md +3 -1
- package/skills/bookmark-research/references/zh/host-workflows.md +3 -33
- package/skills/bookmark-research/references/zh/package-semantics.md +3 -2
- package/skills/bookmark-research/references/zh/research-methods.md +1 -1
- package/skills/bookmark-research/references/zh/research-services.md +27 -47
- package/skills/bookmark-research/references/zh/research-workflow.md +4 -3
- package/skills/bookmark-research/references/zh/settings-and-archive.md +13 -7
- package/skills/bookmark-research/references/zh/skill-guide.md +19 -43
- package/skills/bookmark-research/references/zh/{wiki-and-evaluation.md → wiki.md} +30 -26
- package/src/archive.py +49 -12
- package/src/bookmark_index.py +148 -14
- package/src/cli.py +18 -15
- package/src/context_output.py +21 -0
- package/src/credentials.py +1 -1
- package/src/deepseek.py +137 -0
- package/src/discovery.py +9 -1
- package/src/jina.py +1 -1
- package/src/mcp_server.py +161 -36
- package/src/onboarding.py +14 -14
- package/src/raw_library.py +54 -0
- package/src/readiness.py +3 -4
- package/src/release.py +1 -1
- package/src/research.py +33 -37
- package/src/research_plan.py +143 -69
- package/src/research_services.py +48 -21
- package/src/routing.py +47 -16
- package/src/settings.py +49 -5
- package/src/source_versions.py +7 -0
- package/src/web_search.py +10 -2
- package/src/wiki.py +204 -6
- 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/harness-sources.json +0 -342
- package/docs/host-validation.json +0 -340
- package/docs/install-design-0.2.0.md +0 -57
- package/docs/knowledge-storage-plan.md +0 -45
- package/docs/mcp-aggregation-0.2.0.md +0 -92
- 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-0.2.0.md +0 -140
- 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/validation-0.4.0.md +0 -154
- package/docs/wiki-lifecycle-audit-0.5.0-beta.9.md +0 -88
- package/docs/wiki-quality.md +0 -113
- package/docs/wiki-quality.zh.md +0 -113
- package/docs/wiki-workflow-validation-2026-10-10.md +0 -97
- package/hosts/pi/register-workflow.py +0 -80
- package/hosts/pi/runtime.js +0 -18
- package/hosts/shared/discovery-flow.js +0 -211
- package/hosts/shared/discovery.json +0 -14
- package/scripts/verify_quality.py +0 -87
- package/src/evaluation.py +0 -337
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bookmark-research",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.17",
|
|
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,12 +33,14 @@
|
|
|
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",
|
|
39
40
|
"PARALLEL_API_KEY",
|
|
40
41
|
"TAVILY_API_KEY",
|
|
41
42
|
"JINA_API_KEY",
|
|
43
|
+
"DEEPSEEK_API_KEY",
|
|
42
44
|
"OPENAI_API_KEY",
|
|
43
45
|
"SystemRoot",
|
|
44
46
|
"windir"
|
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
|
|
8
|
+
Research with bookmark context and retain reusable knowledge. Read a [Bookmark Canvas](https://github.com/Browser-bookmark-hub/Bookmark-Canvas) package, investigate with the host model or a research API, and save sourced Wiki pages. Works in **Codex, Claude Code and DeepSeek Harness (dsh)**.
|
|
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
|
|
|
@@ -15,13 +15,13 @@ Research your bookmarks with verified web sources. Give it a list of bookmark UR
|
|
|
15
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
|
|
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 can use the OpenAI or Parallel research API directly. Persistent inventories and coverage checks are available when you explicitly need a complete collection audit. Host browsers and crawlers can supply source text.
|
|
19
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.
|
|
20
20
|
|
|
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 DeepSeek Harness (dsh). DeepSeek Harness (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.17`. 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
|
|
@@ -48,7 +48,7 @@ curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Resea
|
|
|
48
48
|
7. **API keys** — one hidden prompt per selected key, checked immediately; every key is optional.
|
|
49
49
|
8. **Service check** — runs on its own and reports each provider; a sample search/read test is opt-in.
|
|
50
50
|
|
|
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
|
|
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 suggests retention and honors existing authorization. Optional service diagnostics retain a 15-minute cache.
|
|
52
52
|
|
|
53
53
|
### Non-interactive install
|
|
54
54
|
|
|
@@ -56,20 +56,19 @@ 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
|
-
|
|
|
60
|
-
| DSH | `npx bookmark-research@beta install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
59
|
+
| DeepSeek Harness (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 DeepSeek Harness (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
|
|
72
|
-
-
|
|
70
|
+
- Claude Code: add --scope user (or --scope project --project <dir>).
|
|
71
|
+
- DeepSeek Harness (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`
|
|
75
74
|
in my terminal to enter them.
|
|
@@ -78,8 +77,8 @@ 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
|
|
82
|
-
- **
|
|
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
|
+
- **DeepSeek Harness (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
|
|
|
85
84
|
## Configure and update
|
|
@@ -94,9 +93,9 @@ Install notes:
|
|
|
94
93
|
| Scripted preferences | `bookmark-research config show` · `bookmark-research config set --input prefs.json` |
|
|
95
94
|
| Update or verify all clients | `bookmark-research update` · `bookmark-research verify` |
|
|
96
95
|
|
|
97
|
-
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.
|
|
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. The default `quick` preset exposes 21 everyday tools. Use `bookmark-research config set --tool-scope-preset deep` for the full 43-tool catalog when a persistent collection audit is needed. An explicit `tool_scope` list still overrides the preset.
|
|
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 DeepSeek Harness (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
|
|
|
@@ -106,6 +105,7 @@ Use `npx bookmark-research@beta …` if the command is not installed globally. P
|
|
|
106
105
|
| `PARALLEL_API_KEY` | Parallel search and page reading | Free anonymous use with lower limits |
|
|
107
106
|
| `TAVILY_API_KEY` | Tavily search fallback and extraction | Keyless mode |
|
|
108
107
|
| `JINA_API_KEY` | Jina search | Jina Reader still reads pages anonymously |
|
|
108
|
+
| `DEEPSEEK_API_KEY` | Optional DeepSeek Search / Fetch | Not selected; other providers still work |
|
|
109
109
|
| `OPENAI_API_KEY` | Optional OpenAI Deep Research runs | Feature off; host-led research still works |
|
|
110
110
|
|
|
111
111
|
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.
|
|
@@ -130,9 +130,9 @@ Changing the location affects new research only; existing tasks stay where they
|
|
|
130
130
|
|
|
131
131
|
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
132
|
|
|
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
|
|
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 DeepSeek Harness (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
134
|
|
|
135
|
-
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
|
|
135
|
+
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. Historical validation records are available in Git history.
|
|
136
136
|
|
|
137
137
|
## What's inside
|
|
138
138
|
|
|
@@ -140,22 +140,25 @@ A bundle of one Skill, one local MCP server, and the remote MCPs and services th
|
|
|
140
140
|
|
|
141
141
|
| Layer | Component | Runs as | Setup |
|
|
142
142
|
| --- | --- | --- | --- |
|
|
143
|
-
| Skill | [`bookmark-research`](skills/bookmark-research/SKILL.md) and
|
|
144
|
-
| Local MCP | `bookmark-research`,
|
|
143
|
+
| Skill | [`bookmark-research`](skills/bookmark-research/SKILL.md) and method references, each with a [Chinese copy](skills/bookmark-research/references/zh/skill-guide.md) | Loaded by the client | None |
|
|
144
|
+
| Local MCP | `bookmark-research`, 21 default tools (below) | Python process started by the client | Installed for you |
|
|
145
145
|
| 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 |
|
|
146
|
-
| HTTP
|
|
146
|
+
| HTTP services, called by the local MCP | [Jina Reader](https://jina.ai/reader) (fallback reading; search with a key); [DeepSeek Search / Fetch](https://api-docs.deepseek.com/guides/search/) (optional; raw JSON tools API) | HTTPS | Optional `JINA_API_KEY`, `DEEPSEEK_API_KEY` |
|
|
147
147
|
| Optional client MCPs | Exa Agent, Parallel Task MCP, Tavily Research | Added to your client by you | `bookmark-research setup` shows the steps |
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
Default MCP tools:
|
|
150
150
|
|
|
151
151
|
| Group | Tools |
|
|
152
152
|
| --- | --- |
|
|
153
|
-
|
|
|
154
|
-
| Web | `search_web`, `fetch_web`, `search_archive
|
|
155
|
-
|
|
|
156
|
-
| Research
|
|
153
|
+
| Canvas context | `sync_package`, `index_status`, `search_bookmarks`, `get_context`, `plan_research` |
|
|
154
|
+
| Web and archives | `search_web`, `fetch_web`, `search_archive` |
|
|
155
|
+
| Wiki | `wiki_write`, `wiki_get`, `wiki_list`, `wiki_search` |
|
|
156
|
+
| Research API | `research_services`, `research_service_prepare`, `_start`, `_status`, `_result`, `_cancel`, `_attach` |
|
|
157
157
|
| Settings | `get_settings`, `update_settings` |
|
|
158
|
-
|
|
158
|
+
|
|
159
|
+
`plan_research` retrieves local candidates and independently checks the Wiki/archive; the host assesses relevance and follows gaps. It also works without a Canvas source. `wiki_write` accepts authored sections, exact citations and source text or capture IDs in one call. Research APIs accept a question without a local research session.
|
|
160
|
+
|
|
161
|
+
The `deep` preset additionally exposes source maintenance, persistent research records, routing diagnostics and Wiki maintenance. These support explicit audits and resumption. Git history uses the host's shell.
|
|
159
162
|
|
|
160
163
|
Tool descriptions: [details](docs/details.en.md#mcp-tools).
|
|
161
164
|
|
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
|
-
|
|
8
|
+
带着书签上下文调研,把结论留成可复用知识。读取 [Bookmark Canvas](https://github.com/Browser-bookmark-hub/Bookmark-Canvas) 数据包,使用宿主模型或研究 API 调查,再保存带来源的 Wiki 页面。支持 **Codex、Claude Code、DeepSeek Harness (dsh)**。
|
|
9
9
|
|
|
10
10
|
[安装说明](docs/installation.md) · [使用指南](docs/user-guide.md) · [详细说明](docs/details.md) · [npm](https://www.npmjs.com/package/bookmark-research)
|
|
11
11
|
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
## 它是怎么工作的
|
|
16
16
|
|
|
17
17
|
- **本地理解层。** 数据包按结构读,而不是一张平铺的 URL 清单:卡片与分组的位置、连线的方向与标签、同一书签在不同卡片的出现位置(空间上下文);日期字段、ID 中协议定义的日期段,以及真正改过内容的 Git 提交(时间上下文)。这些都是离线查询。
|
|
18
|
-
- **外部调研走三条路线。** 读取已知 URL 不需要推理;Agentic
|
|
18
|
+
- **外部调研走三条路线。** 读取已知 URL 不需要推理;Agentic 搜索由宿主模型自己规划、搜索、阅读并追查缺口;Deep Research 可直接调用 OpenAI/Parallel 研究 API;完整清单与覆盖审计在明确需要时启用。宿主已有的浏览器与爬虫可提供来源正文。
|
|
19
19
|
- **可复核的知识存储。** 完成的研究可以沉淀成 Wiki:带历史版本和相互链接的已审核页面,之后提问直接复用,不必重新搜索网页。
|
|
20
20
|
|
|
21
21
|
## 环境要求
|
|
22
22
|
|
|
23
23
|
- Python 3.9+,含 SQLite FTS5(用 `bookmark-research doctor` 检查)
|
|
24
|
-
- 至少一个宿主的 CLI:Codex、Claude Code
|
|
24
|
+
- 至少一个宿主的 CLI:Codex、Claude Code 或 DeepSeek Harness (dsh)。DeepSeek Harness (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.17`。加 `--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
|
|
@@ -48,7 +48,7 @@ curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Resea
|
|
|
48
48
|
7. **API Key** —— 逐个隐藏输入,当场检查;全部可选,可整段跳过。
|
|
49
49
|
8. **服务检查** —— 自动运行并逐个报告;样例搜索/阅读自检需另行选择。
|
|
50
50
|
|
|
51
|
-
回车即保留当前选项,所以整轮可能只需按几次回车。装好后新建一个宿主会话,让 Skill 和 MCP 工具生效。Wiki
|
|
51
|
+
回车即保留当前选项,所以整轮可能只需按几次回车。装好后新建一个宿主会话,让 Skill 和 MCP 工具生效。Wiki 默认建议整理;已有保存授权时直接执行。服务诊断保留 15 分钟缓存,按需调用。
|
|
52
52
|
|
|
53
53
|
### 指定宿主、不弹提示
|
|
54
54
|
|
|
@@ -56,20 +56,19 @@ 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
|
-
|
|
|
60
|
-
| DSH | `npx bookmark-research@beta install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
59
|
+
| DeepSeek Harness (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 或 DeepSeek Harness (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
|
|
72
|
-
-
|
|
70
|
+
- Claude Code:加 --scope user(或 --scope project --project <目录>)。
|
|
71
|
+
- DeepSeek Harness (dsh):加 --profile <名称>;profile 名称请先问我。
|
|
73
72
|
3. 命令会输出 JSON。确认 "verified": true,有 "error" 就告诉我。
|
|
74
73
|
4. 不要在对话里向我要 API Key。请让我在终端运行 `bookmark-research setup` 自己输入。
|
|
75
74
|
5. 提醒我新建一个会话,让 Skill 和 MCP 工具生效。
|
|
@@ -77,8 +76,8 @@ curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Resea
|
|
|
77
76
|
|
|
78
77
|
安装补充说明:
|
|
79
78
|
|
|
80
|
-
- **npm
|
|
81
|
-
- **
|
|
79
|
+
- **npm 是三个宿主唯一的发布来源**,包内含共享运行时、Skill 和宿主适配文件。安装器下载发布包、生成该宿主需要的格式,再调用宿主原生命令登记。GitHub 提供源码、版本说明和安装清单;未发布源码用 Python 安装器。见[发布约定](docs/distribution.md)。
|
|
80
|
+
- **DeepSeek Harness (dsh) 可直接安装发布包。** 包内声明 `dsh.bundle.patch`,`dsh plugin --profile <名称> add bookmark-research@<版本>` 无需先导出即可安装。`desktop` profile 保留给 DeepSeek Harness 桌面版,请用桌面版自带 CLI 安装;安装器与向导会自行定位该 CLI。
|
|
82
81
|
- **Windows** 上常常没有能用的 `python3`,所以安装器会把检测到的 Python 路径写进各宿主的 MCP 配置。Codex 请用 `bookmark-research install codex` 安装,不要直接把仓库加进 Codex;`bookmark-research status` 可以查看实际使用的 Python。
|
|
83
82
|
|
|
84
83
|
## 配置页与更新
|
|
@@ -93,9 +92,9 @@ curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Resea
|
|
|
93
92
|
| 用脚本改偏好 | `bookmark-research config show` · `bookmark-research config set --input prefs.json` |
|
|
94
93
|
| 更新或验证所有宿主 | `bookmark-research update` · `bookmark-research verify` |
|
|
95
94
|
|
|
96
|
-
没有全局安装时,在前面加 `npx bookmark-research@beta`。偏好和 Key 是用户级的,改一次就对所有已安装宿主生效;改完新建宿主会话即可。加 `--lang zh`
|
|
95
|
+
没有全局安装时,在前面加 `npx bookmark-research@beta`。偏好和 Key 是用户级的,改一次就对所有已安装宿主生效;改完新建宿主会话即可。加 `--lang zh` 可让向导和菜单显示中文。工具面可用 `bookmark-research config set --tool-scope-preset quick` 使用默认 21 个日常工具;`deep`(或 `all`)启用完整 43 个工具,供明确需要的完整资料审计使用。显式 `tool_scope` 仍优先于预设。
|
|
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 或 DeepSeek Harness (dsh)。Codex 安装会保留登记时的来源与版本,要换版本需先移除该登记(`codex plugin marketplace remove bookmark-research`)再重新安装。
|
|
99
98
|
|
|
100
99
|
**API Key 都是可选的。** 在 `bookmark-research setup` 里输入(隐藏显示,输完当场检查,保存在仅当前用户可读的本地文件),或者设置环境变量(优先于已保存的 Key)。
|
|
101
100
|
|
|
@@ -105,6 +104,7 @@ curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Resea
|
|
|
105
104
|
| `PARALLEL_API_KEY` | Parallel 搜索与网页读取 | 免费匿名使用,额度较低 |
|
|
106
105
|
| `TAVILY_API_KEY` | Tavily 备用搜索与提取 | 使用免 Key 模式 |
|
|
107
106
|
| `JINA_API_KEY` | Jina 搜索 | Jina Reader 仍可匿名读取网页 |
|
|
107
|
+
| `DEEPSEEK_API_KEY` | 可选的 DeepSeek Search / Fetch | 不选择即可;其他 provider 仍可用 |
|
|
108
108
|
| `OPENAI_API_KEY` | 可选的 OpenAI Deep Research 任务 | 功能关闭;宿主自己的研究不受影响 |
|
|
109
109
|
|
|
110
110
|
Key 不接受对话、命令参数或 JSON 文件。偏好也可以直接在宿主会话里让 agent 改(「显示 Bookmark Research 的配置」「以后只用 Exa 搜索」),它会调用 `update_settings` 工具。
|
|
@@ -129,9 +129,9 @@ Key 不接受对话、命令参数或 JSON 文件。偏好也可以直接在宿
|
|
|
129
129
|
|
|
130
130
|
宿主模型负责规划、搜索/阅读、评估证据,再追查未解决的问题。Skill 指导这个循环,MCP 保存输入范围、证据、预算和进度;保存研究任务不会启动后台代理。
|
|
131
131
|
|
|
132
|
-
对于分组报告,插件提供“阅读代理 → 新的验证代理 → 覆盖检查 → 补查 → 报告”的流程。Codex 使用原生子代理和附带的委派指南;Claude Code、
|
|
132
|
+
对于分组报告,插件提供“阅读代理 → 新的验证代理 → 覆盖检查 → 补查 → 报告”的流程。Codex 使用原生子代理和附带的委派指南;Claude Code、DeepSeek Harness (dsh) 使用已加载的宿主工作流接口。并发、取消和代理生命周期由宿主管理。每个子代理都需要拿到相关指令,并访问同一个研究存储。
|
|
133
133
|
|
|
134
|
-
工作流适配已有模拟接口测试,但安装成功不代表所有宿主都已跑通完整的多代理任务。所需条件见[宿主工作流](skills/bookmark-research/references/zh/host-workflows.md)
|
|
134
|
+
工作流适配已有模拟接口测试,但安装成功不代表所有宿主都已跑通完整的多代理任务。所需条件见[宿主工作流](skills/bookmark-research/references/zh/host-workflows.md);历史验证记录可从 Git 历史查阅。
|
|
135
135
|
|
|
136
136
|
## 插件包含什么
|
|
137
137
|
|
|
@@ -140,21 +140,24 @@ Key 不接受对话、命令参数或 JSON 文件。偏好也可以直接在宿
|
|
|
140
140
|
| 层 | 组成 | 运行方式 | 需要配置 |
|
|
141
141
|
| --- | --- | --- | --- |
|
|
142
142
|
| Skill | [`bookmark-research`](skills/bookmark-research/SKILL.md) 及 11 份方法参考,每份都有[中文版](skills/bookmark-research/references/zh/skill-guide.md) | 由宿主加载 | 不需要 |
|
|
143
|
-
| 本地 MCP | `bookmark-research
|
|
143
|
+
| 本地 MCP | `bookmark-research`,默认 21 个工具(见下表) | 宿主启动的 Python 进程 | 安装器自动完成 |
|
|
144
144
|
| 本地 MCP 调用的远程 MCP | [Exa](https://exa.ai)(搜索、网页读取)、[Parallel](https://parallel.ai)(搜索、备用读取)、[Tavily](https://tavily.com)(备用搜索) | HTTPS,不启动本地进程 | 可选 API Key |
|
|
145
|
-
| 本地 MCP 调用的 HTTP 服务 | [Jina Reader](https://jina.ai/reader)(备用读取;有 Key
|
|
145
|
+
| 本地 MCP 调用的 HTTP 服务 | [Jina Reader](https://jina.ai/reader)(备用读取;有 Key 时可搜索);[DeepSeek Search / Fetch](https://api-docs.deepseek.com/guides/search/)(可选;原始 JSON tools API) | HTTPS | 可选 `JINA_API_KEY`、`DEEPSEEK_API_KEY` |
|
|
146
146
|
| 可选的宿主 MCP | Exa Agent、Parallel Task MCP、Tavily Research | 需自行加到宿主里 | `bookmark-research setup` 会给出步骤 |
|
|
147
147
|
|
|
148
148
|
本地 MCP 的工具:
|
|
149
149
|
|
|
150
150
|
| 分类 | 工具 |
|
|
151
151
|
| --- | --- |
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
152
|
+
| 画布上下文 | `sync_package`、`index_status`、`search_bookmarks`、`get_context`、`plan_research` |
|
|
153
|
+
| 联网与归档 | `search_web`、`fetch_web`、`search_archive` |
|
|
154
|
+
| Wiki | `wiki_write`、`wiki_get`、`wiki_list`、`wiki_search` |
|
|
155
|
+
| 研究 API | `research_services`、`research_service_prepare`、`_start`、`_status`、`_result`、`_cancel`、`_attach` |
|
|
156
|
+
| 配置 | `get_settings`、`update_settings` |
|
|
157
|
+
|
|
158
|
+
`plan_research` 返回本地候选,并独立检索 Wiki/归档;相关性和后续调查由宿主判断。没有画布来源也能使用。`wiki_write` 一次接收编写好的章节、精确引文与来源正文或 capture ID;研究 API 可直接接收问题,无需先创建本地研究会话。
|
|
159
|
+
|
|
160
|
+
`deep` 预设额外提供来源维护、完整研究记录、选路诊断与 Wiki 维护,用于明确要求的完整审计和断点续做。Git 时间上下文由宿主 shell 查询。
|
|
158
161
|
|
|
159
162
|
## 更多
|
|
160
163
|
|
package/config/providers.json
CHANGED
|
@@ -89,6 +89,21 @@
|
|
|
89
89
|
"note": "May be advertised to keyless clients but requires an API key to execute. The aggregator routes search and extraction only."
|
|
90
90
|
},
|
|
91
91
|
"docs": "https://docs.tavily.com/documentation/mcp"
|
|
92
|
+
},
|
|
93
|
+
"deepseek": {
|
|
94
|
+
"label": "DeepSeek Search / Fetch",
|
|
95
|
+
"url": "https://api.deepseek.com",
|
|
96
|
+
"transport": "http",
|
|
97
|
+
"client": "deepseek",
|
|
98
|
+
"search_url": "https://api.deepseek.com/v1/tools/search",
|
|
99
|
+
"fetch_url": "https://api.deepseek.com/v1/tools/fetch",
|
|
100
|
+
"search_tools": ["deepseek_search"],
|
|
101
|
+
"fetch_tools": ["deepseek_fetch"],
|
|
102
|
+
"direct_client": true,
|
|
103
|
+
"optional_bearer_env": "DEEPSEEK_API_KEY",
|
|
104
|
+
"required_env": {"search": "DEEPSEEK_API_KEY", "fetch": "DEEPSEEK_API_KEY"},
|
|
105
|
+
"authentication": "Bearer DEEPSEEK_API_KEY. Raw JSON Search/Fetch API; OpenAI-compatible error shape. Search costs $0.75 per 1,000 successful requests (official docs).",
|
|
106
|
+
"docs": "https://api-docs.deepseek.com/guides/search/"
|
|
92
107
|
}
|
|
93
108
|
},
|
|
94
109
|
"default_providers": [
|
|
@@ -1,124 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 三个宿主,共用三项基础能力
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Codex、Claude Code、DeepSeek Harness 负责推理、工具选择、并发和最终表达。插件保留三项职责:
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
| ② 主动搜索 `agentic` | “比较我收藏的搜索服务,查清检索、正文读取和研究能力的区别。” | 读取相关卡片说明、书签和分组语境;拆出问题,搜索、读文、比较,再根据证据缺口补查。 | 带证据的比较与结论。 |
|
|
9
|
-
| ③ 深度研究 `deep` | “把整个 AI 调研包全量调查,核验排行榜,与我们的插件比较,交付报告和 Wiki。” | 冻结完整来源清单,按专题组织持续调查,保存证据,逐项审阅,检查遗漏与冲突后交付。 | 研究档案、覆盖明细、报告;按要求整理 Wiki。 |
|
|
5
|
+
1. **上下文**:读取 JSON Canvas 节点、连接线、卡片与空间关系。时间信息保留来源与可信度;Git 历史直接交给宿主 shell。
|
|
6
|
+
2. **外部调研**:已知 URL 直接读取;Agentic Search 由宿主判断缺口并迭代搜索/阅读,插件提供补充搜索、并发抓取与归档。Deep Research 可直接提交 OpenAI/Parallel API,无需本地研究会话。宿主已有的浏览器、爬虫或研究工具也可供稿。
|
|
7
|
+
3. **LLM Wiki**:检索已有知识,一次提交正文与精确引用,保留来源、修订和页面关系,供后续调研复用。
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
日常流程是:**取上下文 → 独立检索 Wiki/归档 → 阅读与搜索 → 宿主形成结论 → 按授权保存 Wiki**。`plan_research` 只提供候选,既不设相关性硬门槛,也不决定研究路线;没有书签命中仍会查询其他存储。默认工具面为 21 个。
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
只有明确要求整包覆盖、持久化任务或中断后续做时,启用 `deep` 预设的完整 43 个工具及分组工作流。高级功能复用现有证据与存储;普通提问不要求经过 readiness、route、inventory 或 coverage 等阶段。
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
flowchart TB
|
|
17
|
-
Request["你说明范围、问题和交付要求"] --> Host["宿主读取 Skill<br/>判断采用哪种研究方式"]
|
|
18
|
-
Host --> Context["按任务范围定位书签<br/>读取卡片说明、文件夹、组与连线语境"]
|
|
19
|
-
Context -->|快速查证| Quick["读取目标网页<br/>必要时搜索发现来源"]
|
|
20
|
-
Context -->|主动搜索| Agentic["拆问题 → 搜索 → 读文 → 比较"]
|
|
21
|
-
Context -->|深度研究| Deep["冻结完整范围<br/>分组调查、记录证据、审阅与核验"]
|
|
22
|
-
Quick --> Answer["简短答复与来源"]
|
|
23
|
-
Agentic --> Check{"证据足够回答问题?"}
|
|
24
|
-
Check -->|还不够,补查| Agentic
|
|
25
|
-
Check -->|足够| Comparison["比较结论与证据"]
|
|
26
|
-
Deep --> Coverage{"原始来源与研究问题有缺口?"}
|
|
27
|
-
Coverage -->|有,继续调查| Deep
|
|
28
|
-
Coverage -->|完成条件满足| Report["报告与覆盖明细<br/>按要求编写 Wiki"]
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
深度研究有两条执行路线:宿主自身持续搜索、阅读、推理,必要时使用可用子代理/工作流;或者调用已启用并配置凭据的 OpenAI Deep Research API/Parallel Task API。插件实现了专业服务接口,但安装插件或在提示词里写“Deep Research”不会自动启用账户访问。实际是否可用,以当前配置和服务调用结果为准。特定宿主的专用命令,例如已加载的 Claude `/deep-research`,还要按该命令的调用方式启动。
|
|
32
|
-
|
|
33
|
-
交给专业服务时,插件把明确的研究问题与选定原 URL 整理成请求;画布语境由宿主用于构造问题,本机目录不会自动变成云端可读资料。服务返回的报告进入证据档案,所引原页仍需核验,不能用一份外部报告代替整包覆盖检查。
|
|
34
|
-
|
|
35
|
-
**研究深度与研究范围分别决定。** 只查一个书签就处理该书签;研究指定卡片就保留该卡片的范围;要求“研究整个包”时,默认保留整包全部原始 URL 和每个重复书签的语境。分批、子代理数量和搜索结果页数都不能缩小这个范围。深度研究中也会反复使用直接读取和主动搜索。
|
|
36
|
-
|
|
37
|
-
目录、ZIP 和单卡经过同一套接入程序。书签提供要读的 URL,卡片说明、文件夹、分组和连线提供研究语境;它们保存在本地索引中。仅问“某个书签在哪张卡片”时,查本地数据即可。接入包本身不会自动开始联网研究。
|
|
38
|
-
|
|
39
|
-
下面两张图对应当前 0.4.0 实现。宿主负责理解问题、模型推理、子代理或已有工作流;Plugin 提供安装封装,Skill 提供方法指令,Python 提供实际工具。CLI 和 MCP 共用同一套实现,也可以配置为共用本地数据。实线表示调用或数据流,虚线表示指令或配置影响。
|
|
40
|
-
|
|
41
|
-
```mermaid
|
|
42
|
-
flowchart TB
|
|
43
|
-
User["用户<br/>自然语言问题与数据包路径"] --> Host["AI 宿主<br/>Codex / Claude Code / Pi / DSH<br/>模型推理、任务组织与审阅"]
|
|
44
|
-
|
|
45
|
-
subgraph Plugin["Bookmark Research Plugin"]
|
|
46
|
-
Skill["Skill:Markdown 指令<br/>查询方法、研究规则与宿主路由"]
|
|
47
|
-
MCP["本地 MCP 入口<br/>src/mcp_server.py · 工具随能力增长(本版 40 个)"]
|
|
48
|
-
CLI["Python CLI 入口<br/>src/cli.py"]
|
|
49
|
-
Core["共用 Python 运行时<br/>Python 3.9+ 标准库"]
|
|
50
|
-
Sources["来源接入、增量同步与本地查询"]
|
|
51
|
-
Research["搜索、正文读取与研究记录"]
|
|
52
|
-
Knowledge["Wiki 保存、引用核验与质量评测"]
|
|
53
|
-
MCP --> Core
|
|
54
|
-
CLI --> Core
|
|
55
|
-
Core --> Sources
|
|
56
|
-
Core --> Research
|
|
57
|
-
Core --> Knowledge
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
Skill -.->|提供方法指令| Host
|
|
61
|
-
Host -->|工具调用| MCP
|
|
62
|
-
Host -->|命令调用| CLI
|
|
63
|
-
Settings["用户配置<br/>settings.json"] -.->|服务选择与存储位置| Core
|
|
64
|
-
Input["用户的画布数据<br/>目录 / ZIP / 单卡 JSON"] --> Sources
|
|
65
|
-
Research --> Remote["外部服务<br/>搜索、正文读取与可选研究 API"]
|
|
66
|
-
|
|
67
|
-
subgraph Local["本地持久化数据:位于原包和插件缓存之外"]
|
|
68
|
-
DB[("SQLite 查询索引<br/>index.sqlite3")]
|
|
69
|
-
Snapshots["来源版本快照<br/>index.sqlite3.sources/"]
|
|
70
|
-
Pages["网页响应与正文<br/>knowledge/"]
|
|
71
|
-
Runs["研究清单、证据、覆盖与报告<br/>research/"]
|
|
72
|
-
Wiki["Wiki 页面与不可变修订<br/>wiki/"]
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
Sources --> DB
|
|
76
|
-
Sources --> Snapshots
|
|
77
|
-
Research -->|读取书签与关系| DB
|
|
78
|
-
Research --> Pages
|
|
79
|
-
Research --> Runs
|
|
80
|
-
Knowledge -->|读取已审阅证据| Runs
|
|
81
|
-
Knowledge --> Wiki
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
各宿主的接入方式有所不同:Codex、Claude Code 使用 Skill + MCP;Pi 使用 Skill + CLI/stdio 桥,子代理工作流依赖已有扩展;DSH 使用 MCP 适配,并配置 Skill 发现和工作流服务。图中的宿主能力取决于实际安装与配置,适配实现及验证范围见[宿主支持说明](details.en.md#client-support)。
|
|
85
|
-
|
|
86
|
-
SQLite 是随 Python 工具读写的本地数据库文件,用来查询书签、栏目、文件夹和画布关系,并记录来源与同步状态。它可以从来源快照重建,不需要单独启动数据库服务器。
|
|
87
|
-
|
|
88
|
-
默认数据目录为 `~/.local/share/bookmark-research/`,默认配置文件为 `~/.config/bookmark-research/settings.json`。安装插件提供工具与默认设置;首次接入用户数据后才建立来源记录。本地查询无需 API 密钥,网络服务按各自的认证要求配置。
|
|
89
|
-
|
|
90
|
-
数据接入与同步的关键是把**输入载体**和**来源寿命**分开。单卡中的“永久/临时”是内容类型;`snapshot`/`live` 决定后续怎样更新。
|
|
91
|
-
|
|
92
|
-
```mermaid
|
|
93
|
-
flowchart TB
|
|
94
|
-
Export["手动导出目录<br/>JSON + .canvas"] --> Read
|
|
95
|
-
Zip["ZIP 数据包<br/>含完整包或单卡"] --> Read
|
|
96
|
-
Card["单个卡片 JSON<br/>永久卡片 / 临时卡片"] --> Read
|
|
97
|
-
Git["GitHub 等现有同步工具"] -->|将变化同步到磁盘| Directory["长期保留的本地目录"]
|
|
98
|
-
Directory --> Read
|
|
99
|
-
|
|
100
|
-
Read["统一读取与校验<br/>source_inputs.py"] --> Register["来源登记<br/>source_manager.py<br/>source_id、路径别名、mode、completeness"]
|
|
101
|
-
Register --> Mode{"来源寿命"}
|
|
102
|
-
Mode -->|snapshot| Fixed["固定快照<br/>新导出需主动重新接入"]
|
|
103
|
-
Mode -->|live:仅目录| Live["持续目录<br/>首次接入及后续变化检查"]
|
|
104
|
-
Trigger["更新触发<br/>MCP 进程内轮询 / CLI watch<br/>查询前补检查"] --> Live
|
|
105
|
-
|
|
106
|
-
Fixed --> Sync["增量索引<br/>bookmark_index.py<br/>文件哈希比较与事务写入"]
|
|
107
|
-
Live --> Sync
|
|
108
|
-
Sync --> DB[("SQLite<br/>当前有效索引与来源状态")]
|
|
109
|
-
Sync --> Versions["来源版本快照<br/>package/:必要原始协议文件<br/>manifest.json:哈希、路径与关系"]
|
|
110
|
-
Versions -->|选择历史版本重新导入| Read
|
|
111
|
-
DB --> Query["本地书签查询与画布关系查询"]
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
新的普通导出默认使用 `snapshot`,Git 仓库内目录默认使用 `live`;已登记来源沿用原模式。同一画布换路径导出时显式沿用 `source_id`,以后记住路径别名;不同画布不会因标题或 URL 相同而合并。
|
|
115
|
-
|
|
116
|
-
两种模式都会保存版本快照。局部导入保留下来的旧栏目也进入快照,因此删除原下载包后仍可使用已接入的 snapshot,并能从保存的版本恢复。默认 `completeness=partial` 保留此次未提供的文件;明确指定 `complete` 才按完整镜像删除缺失文件。已提供栏目内删除的书签仍会同步,单卡固定使用 `partial`。
|
|
117
|
-
|
|
118
|
-
`live` 的后台检查跟随 MCP 进程:默认每 1 秒检查,普通变化稳定 2 秒后同步,整文件删除等待 5 秒。关闭进程后停止,重连和查询时补查。一次性 CLI 命令执行完即退出,持续监控需要运行前台 `watch`。Git 拉取、推送和登录由原有同步工具或宿主承担。
|
|
119
|
-
|
|
120
|
-
无效 JSON、目录暂时消失等情况会保留上次有效索引,并返回待更新或错误状态。这部分借鉴 CodeGraph 的增量更新和恢复机制,CodeGraph 本身不是运行依赖。详细参数与恢复命令见[来源生命周期说明](../skills/bookmark-research/references/source-lifecycle.md)。
|
|
121
|
-
|
|
122
|
-
普通书签查询和单个 URL 读取可以直接调用工具,无需先建立正式研究任务。正式全包研究中的搜索摘要、外部研究报告不能自动算作原始页面已读;覆盖不足时继续补查,或保存明确标记为未完成的报告。质量评测依据显式标注和运行数据,方法见[Wiki 与评测说明](wiki-quality.md)。
|
|
123
|
-
|
|
124
|
-
**自动更新的边界:`live` 目录在检查时同步本地索引,不会自动抓网页、调用 LLM 或改写 Wiki。** 研究状态检查会比较冻结输入与当前索引;发生变化时提示 `source_freshness.requires_review`,Wiki 读取/核验会标记 `needs_review`。宿主据此发起补充调查和修订,旧正文、研究清单与 Wiki 修订继续保留。
|
|
13
|
+
Wiki 一次写入采用 `page.sections[].citations` 与顶层 `sources`,也兼容旧的 research claim 引用格式。程序校验引文与来源完整性,语义支持由宿主或人工审阅。API 报告是二手来源,关键结论仍应核查原文。
|