bookmark-research 0.5.0-beta.9 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +1 -1
- package/.codex-plugin/plugin.json +6 -1
- package/README.md +78 -56
- package/README.zh.md +74 -52
- package/bin/bookmark-research.js +9 -1
- package/config/providers.json +41 -0
- package/config/settings.example.json +36 -0
- package/docs/bookmark-research-architecture.md +8 -119
- package/docs/canvas-tree-reading-acceptance.md +98 -0
- package/docs/configuration.en.md +70 -0
- package/docs/configuration.md +70 -0
- package/docs/details.en.md +35 -32
- package/docs/details.md +12 -13
- package/docs/distribution.md +4 -7
- package/docs/harness-compatibility.md +10 -299
- package/docs/installation.en.md +21 -47
- package/docs/installation.md +24 -56
- package/docs/instructions.en.md +3 -3
- package/docs/instructions.md +3 -3
- package/docs/prompt-reference.en.md +3 -3
- package/docs/prompt-reference.md +3 -3
- package/docs/user-guide.en.md +5 -4
- package/docs/user-guide.md +7 -6
- package/hosts/claude/commands/research.md +7 -0
- package/hosts/codex/delegate.md +3 -1
- package/hosts/dsh/plugin.js +5 -0
- package/hosts/dsh/workflow-call.py +8 -4
- package/hosts/shared/research-call.py +15 -3
- package/hosts/shared/research-flow.js +3 -1
- package/install.sh +8 -8
- package/package.json +3 -8
- package/scripts/bench_preflight.py +189 -0
- package/scripts/bench_sync.py +191 -0
- package/scripts/bench_tools_list.py +129 -0
- package/scripts/build_zip.py +1 -10
- package/scripts/evaluate_ladder.py +149 -0
- package/scripts/export_bundle.py +6 -68
- package/scripts/host_assets.py +31 -31
- package/scripts/host_clients.py +32 -61
- package/scripts/host_install.py +24 -12
- package/scripts/install.py +233 -77
- package/scripts/launcher.py +28 -5
- package/scripts/npm_source.py +41 -0
- package/scripts/verify_fixture.py +1 -1
- package/scripts/verify_live.py +2 -2
- package/scripts/verify_wiki_retrieval.py +158 -0
- package/skills/bookmark-research/SKILL.md +31 -31
- package/skills/bookmark-research/references/cli.md +20 -8
- package/skills/bookmark-research/references/deep-research.md +12 -4
- package/skills/bookmark-research/references/host-workflows.md +4 -23
- package/skills/bookmark-research/references/package-semantics.md +67 -10
- 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 +8 -4
- package/skills/bookmark-research/references/settings-and-archive.md +29 -11
- package/skills/bookmark-research/references/wiki.md +92 -0
- package/skills/bookmark-research/references/zh/cli.md +20 -8
- package/skills/bookmark-research/references/zh/deep-research.md +12 -4
- package/skills/bookmark-research/references/zh/host-workflows.md +4 -23
- package/skills/bookmark-research/references/zh/package-semantics.md +67 -10
- 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 +8 -4
- package/skills/bookmark-research/references/zh/settings-and-archive.md +28 -10
- package/skills/bookmark-research/references/zh/skill-guide.md +26 -33
- package/skills/bookmark-research/references/zh/wiki.md +94 -0
- package/src/archive.py +560 -25
- package/src/bookmark_dependencies.py +56 -0
- package/src/bookmark_index.py +1237 -58
- package/src/browser_client.py +342 -0
- package/src/cli.py +399 -33
- package/src/context_output.py +53 -0
- package/src/credentials.py +2 -1
- package/src/deepseek.py +137 -0
- package/src/discovery.py +118 -0
- package/src/dsh_client.py +206 -0
- package/src/fetch_cache.py +60 -0
- package/src/grok_search.py +272 -0
- package/src/jina.py +1 -1
- package/src/jobs.py +349 -0
- package/src/junk.py +33 -0
- package/src/locate.py +862 -0
- package/src/mcp_dispatch.py +99 -0
- package/src/mcp_server.py +899 -93
- package/src/netscape.py +124 -0
- package/src/onboarding.py +339 -114
- package/src/package_paths.py +137 -0
- package/src/perplexity.py +78 -0
- package/src/raw_library.py +255 -48
- package/src/readiness.py +43 -9
- package/src/ref_codec.py +70 -0
- package/src/release.py +1 -1
- package/src/research.py +449 -41
- package/src/research_plan.py +171 -0
- package/src/research_services.py +48 -21
- package/src/routing.py +50 -16
- package/src/search_results.py +84 -3
- package/src/settings.py +135 -18
- package/src/source_inputs.py +156 -23
- package/src/source_manager.py +79 -15
- package/src/source_versions.py +115 -0
- package/src/source_watcher.py +4 -2
- package/src/storage.py +60 -0
- package/src/tui.py +5 -2
- package/src/url_classify.py +45 -0
- package/src/web_search.py +662 -70
- package/src/wiki.py +788 -47
- package/src/wiki_search.py +251 -0
- package/src/wiki_work.py +229 -0
- package/docs/cli-launcher-plan.md +0 -58
- package/docs/diff-review-2026-10-09.md +0 -36
- 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 -43
- package/docs/mcp-aggregation-0.2.0.md +0 -92
- package/docs/multi-host-installation-plan.md +0 -163
- 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.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/validation-0.2.0.md +0 -126
- package/docs/validation-0.4.0.md +0 -154
- package/docs/wiki-quality.md +0 -107
- package/docs/wiki-quality.zh.md +0 -107
- package/hosts/pi/register-workflow.py +0 -72
- package/hosts/pi/runtime.js +0 -18
- package/scripts/verify_quality.py +0 -87
- package/skills/bookmark-research/references/wiki-and-evaluation.md +0 -69
- package/skills/bookmark-research/references/zh/wiki-and-evaluation.md +0 -69
- package/src/evaluation.py +0 -337
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bookmark-research",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
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,17 @@
|
|
|
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",
|
|
44
|
+
"PERPLEXITY_API_KEY",
|
|
45
|
+
"XAI_API_KEY",
|
|
46
|
+
"CUSTOM_AGENTIC_API_KEY",
|
|
42
47
|
"OPENAI_API_KEY",
|
|
43
48
|
"SystemRoot",
|
|
44
49
|
"windir"
|
package/README.md
CHANGED
|
@@ -2,91 +2,105 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://github.com/Browser-bookmark-hub/Bookmark-Canvas)
|
|
6
|
+
[](https://www.npmjs.com/package/bookmark-research)
|
|
6
7
|
|
|
7
|
-
Works in **Codex, Claude Code
|
|
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)**.
|
|
8
9
|
|
|
9
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)
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
> **0.5.0 is a beta.** Report problems on [GitHub Issues](https://github.com/Browser-bookmark-hub/Bookmark-Research/issues).
|
|
12
|
+
## Version 0.6.0
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
The stable release includes bilingual Canvas package support, safer Exa batch reading that isolates ambiguous pages, and concise installation/update summaries. Installation prints the version, actual paths, checks and any required action. Use `--json` for complete structured diagnostics; `--non-interactive` only disables prompts. Existing settings, credentials and research data are retained during upgrades.
|
|
15
|
+
|
|
16
|
+
## How it works
|
|
17
|
+
|
|
18
|
+
- **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.
|
|
19
|
+
- **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. `search_web` aggregates configured URL providers such as Perplexity Search; `agentic_search` can return a separate Grok or user-configured OpenAI-compatible model answer and citations. Custom model search depends on the selected upstream's web capability and is not URL-fused. Persistent inventories and coverage checks are available when you explicitly need a complete collection audit. Host browsers and crawlers can supply source text.
|
|
20
|
+
- **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.
|
|
15
21
|
|
|
16
22
|
## Requirements
|
|
17
23
|
|
|
18
|
-
- Python 3.9+ with SQLite FTS5 (
|
|
19
|
-
- The CLI of at least one client: Codex, Claude Code
|
|
20
|
-
- Node 18+ and npm
|
|
21
|
-
- No API key is needed to install or to query bookmarks locally
|
|
24
|
+
- Python 3.9+ with SQLite FTS5 (checked by `bookmark-research doctor`)
|
|
25
|
+
- 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
|
|
26
|
+
- Node 18+ and npm to install a release
|
|
27
|
+
- No API key is needed to install, or to query bookmarks locally
|
|
22
28
|
|
|
23
29
|
## Install
|
|
24
30
|
|
|
25
|
-
**Current beta (`0.5.0-beta.9`)**, interactive on macOS, Linux and Windows:
|
|
26
|
-
|
|
27
31
|
```sh
|
|
28
|
-
npx bookmark-research@
|
|
32
|
+
npx bookmark-research@latest install
|
|
29
33
|
```
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**Default-channel interactive installation:**
|
|
35
|
+
Installs the latest stable release directly. To pin this release, use `npx bookmark-research@0.6.0 install`. Add `--lang zh` for the Chinese wizard. For a permanent command, run `npm install -g bookmark-research@latest`; the GitHub convenience script uses the same npm release (macOS/Linux/WSL):
|
|
34
36
|
|
|
35
37
|
```sh
|
|
36
|
-
|
|
38
|
+
curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash
|
|
37
39
|
```
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
### What the installer asks
|
|
42
|
+
|
|
43
|
+
1. **Clients** — arrow keys and Space to toggle; detected CLIs are preselected. The install plan is shown for confirmation.
|
|
44
|
+
2. **Research depth (optional)** — leave `auto` and the depth is picked from each request; set `quick`, `agentic` or `deep` only to pin one default.
|
|
45
|
+
3. **Answer and report language** — follow the question, Chinese or English.
|
|
46
|
+
4. **Search sources** — one ordered multiselect. Unselected providers become the fallback search tier. Perplexity is search-only; page reading uses a separate provider.
|
|
47
|
+
5. **Storage** — the default data folder, one custom folder for archives and reports, or reports beside the bookmark file or folder.
|
|
48
|
+
6. **Optional professional APIs** — off by default: OpenAI Deep Research or the Parallel Task API.
|
|
49
|
+
7. **Custom model endpoint (optional)** — enter a compatible Base URL, model and protocol; web-search support depends on the upstream.
|
|
50
|
+
8. **API keys** — select the variables for services you enabled (Space to toggle, Enter to continue), then enter each value in a hidden prompt; optional and skippable. Values are saved separately from preferences.
|
|
51
|
+
9. **Service check** — reports configured providers; a sample search/read test is opt-in.
|
|
40
52
|
|
|
41
|
-
|
|
53
|
+
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.
|
|
42
54
|
|
|
43
|
-
|
|
55
|
+
### Non-interactive install
|
|
44
56
|
|
|
45
57
|
| Client | Command | Registers with |
|
|
46
58
|
| --- | --- | --- |
|
|
47
59
|
| Codex | `npx bookmark-research@latest install codex --non-interactive` | `codex plugin add` |
|
|
48
60
|
| Claude Code | `npx bookmark-research@latest install claude --scope user --non-interactive` | `claude plugin install` |
|
|
49
|
-
|
|
|
50
|
-
| DSH | `npx bookmark-research@latest install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
51
|
-
|
|
52
|
-
**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).
|
|
53
|
-
|
|
54
|
-
**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. See the [installation guide](docs/installation.en.md).
|
|
61
|
+
| DeepSeek Harness (dsh) | `npx bookmark-research@latest install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
Several at once: `npx bookmark-research@latest 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).
|
|
57
64
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
**Ask your agent to install it.** Paste this into Codex, Claude Code, Pi or DSH:
|
|
65
|
+
**Ask your agent to install it.** Paste this into Codex, Claude Code or DeepSeek Harness (dsh):
|
|
61
66
|
|
|
62
67
|
```text
|
|
63
68
|
Install the Bookmark Research plugin into the client you are running in.
|
|
64
69
|
|
|
65
|
-
1. Identify your own client: codex, claude
|
|
66
|
-
2. Run: npx bookmark-research@latest install <client> --non-interactive
|
|
67
|
-
- Claude Code
|
|
68
|
-
-
|
|
70
|
+
1. Identify your own client: codex, claude or dsh.
|
|
71
|
+
2. Run: npx bookmark-research@latest install <client> --non-interactive --json
|
|
72
|
+
- Claude Code: add --scope user (or --scope project --project <dir>).
|
|
73
|
+
- DeepSeek Harness (dsh): add --profile <profile>; ask me for the profile name.
|
|
69
74
|
3. The command prints JSON. Confirm "verified": true and report any "error".
|
|
70
75
|
4. Do not ask me for API keys in chat. Tell me to run `bookmark-research setup`
|
|
71
|
-
|
|
76
|
+
in my terminal to enter them.
|
|
72
77
|
5. Tell me to start a new session so the Skill and MCP tools load.
|
|
73
78
|
```
|
|
74
79
|
|
|
75
|
-
|
|
80
|
+
Install notes:
|
|
81
|
+
|
|
82
|
+
- **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).
|
|
83
|
+
- **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.
|
|
84
|
+
- **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.
|
|
76
85
|
|
|
77
|
-
|
|
86
|
+
## Configure and update
|
|
87
|
+
|
|
88
|
+
**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.
|
|
78
89
|
|
|
79
90
|
| Task | Command |
|
|
80
91
|
| --- | --- |
|
|
81
|
-
| Menu: configure, check, install, update | `bookmark-research` |
|
|
82
92
|
| Preferences and API keys | `bookmark-research setup` |
|
|
83
|
-
|
|
|
84
|
-
|
|
|
93
|
+
| Menu | `bookmark-research` · `bookmark` · `bookmark research` |
|
|
94
|
+
| Clients, preferences, storage, recent research, key status | `bookmark-research status` |
|
|
95
|
+
| Scripted preferences | `bookmark-research config show` · `bookmark-research config set --input prefs.json` |
|
|
96
|
+
| Configuration JSON guide and example | [Guide](docs/configuration.en.md) · [Partial JSON](config/settings.example.json) |
|
|
85
97
|
| Update or verify all clients | `bookmark-research update` · `bookmark-research verify` |
|
|
86
98
|
|
|
87
|
-
Use `npx bookmark-research@latest …` if the command is not installed globally.
|
|
99
|
+
Use `npx bookmark-research@latest …` 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 22 everyday tools. Use `bookmark-research config set --tool-scope-preset deep` for the full 44-tool catalog when a persistent collection audit is needed. An explicit `tool_scope` list still overrides the preset.
|
|
100
|
+
|
|
101
|
+
**Update.** Run `npx bookmark-research@latest install` and confirm the upgrade/overwrite plan to adopt the latest release for your installed clients. For Codex without prompts, use `npx bookmark-research@latest install codex --non-interactive --replace-source`. `bookmark-research update` refreshes the recorded source: Git/npm selectors follow their selected ref, while a bundled build or pinned release stays on that build. Both paths preserve preferences, keys and data. Start a new host session afterwards.
|
|
88
102
|
|
|
89
|
-
**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.
|
|
103
|
+
**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.
|
|
90
104
|
|
|
91
105
|
| Variable | Service | Without it |
|
|
92
106
|
| --- | --- | --- |
|
|
@@ -94,11 +108,13 @@ Use `npx bookmark-research@latest …` if the command is not installed globally.
|
|
|
94
108
|
| `PARALLEL_API_KEY` | Parallel search and page reading | Free anonymous use with lower limits |
|
|
95
109
|
| `TAVILY_API_KEY` | Tavily search fallback and extraction | Keyless mode |
|
|
96
110
|
| `JINA_API_KEY` | Jina search | Jina Reader still reads pages anonymously |
|
|
111
|
+
| `DEEPSEEK_API_KEY` | Optional DeepSeek Search / Fetch | Not selected; other providers still work |
|
|
112
|
+
| `PERPLEXITY_API_KEY` | Optional Perplexity structured Search | Search results only; no page extraction |
|
|
113
|
+
| `XAI_API_KEY` | Optional Grok Agentic search | Separate `agentic_search` answer channel; not URL-fused |
|
|
114
|
+
| `CUSTOM_AGENTIC_API_KEY` | Optional user-configured OpenAI-compatible endpoint | Separate `agentic_search` channel; set Base URL/model/protocol in setup |
|
|
97
115
|
| `OPENAI_API_KEY` | Optional OpenAI Deep Research runs | Feature off; host-led research still works |
|
|
98
116
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
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.
|
|
117
|
+
At the setup key step, select the keys for enabled services with Space, then enter each key at the hidden prompt; leave the selection empty to skip. Keys go to the separate private `credentials.json` or can come from environment variables, which take precedence. They are not part of `prefs.json` or `settings.json`; the settings JSON import rejects credential fields. 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. See the [configuration guide](docs/configuration.en.md) for every key and service.
|
|
102
118
|
|
|
103
119
|
## Where data is stored
|
|
104
120
|
|
|
@@ -114,13 +130,15 @@ Nothing is written into your bookmark files or the plugin. The data directory is
|
|
|
114
130
|
| `raw-library.sqlite3` | Rebuildable full-text index for `search_archive` |
|
|
115
131
|
| `${XDG_CONFIG_HOME:-~/.config}/bookmark-research/` | `settings.json` and `credentials.json` (private, owner-only) |
|
|
116
132
|
|
|
117
|
-
|
|
133
|
+
Changing the location affects new research only; existing tasks stay where they are.
|
|
134
|
+
|
|
135
|
+
## Research loops and delegation
|
|
118
136
|
|
|
119
137
|
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.
|
|
120
138
|
|
|
121
|
-
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
|
|
139
|
+
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.
|
|
122
140
|
|
|
123
|
-
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
|
|
141
|
+
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.
|
|
124
142
|
|
|
125
143
|
## What's inside
|
|
126
144
|
|
|
@@ -128,22 +146,26 @@ A bundle of one Skill, one local MCP server, and the remote MCPs and services th
|
|
|
128
146
|
|
|
129
147
|
| Layer | Component | Runs as | Setup |
|
|
130
148
|
| --- | --- | --- | --- |
|
|
131
|
-
| Skill | [`bookmark-research`](skills/bookmark-research/SKILL.md) and
|
|
132
|
-
| Local MCP | `bookmark-research`,
|
|
149
|
+
| 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 |
|
|
150
|
+
| Local MCP | `bookmark-research`, 22 default tools (below) | Python process started by the client | Installed for you |
|
|
133
151
|
| 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 |
|
|
134
|
-
| HTTP
|
|
152
|
+
| 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/); [Perplexity Search](https://docs.perplexity.ai/api-reference/search-post) (structured results only) | HTTPS | Optional provider keys |
|
|
153
|
+
| Model search API | [xAI Grok Responses](https://docs.x.ai/developers/tools/web-search) with optional Web Search and X Search | HTTPS | Optional `XAI_API_KEY`; invoked separately via `agentic_search` |
|
|
135
154
|
| Optional client MCPs | Exa Agent, Parallel Task MCP, Tavily Research | Added to your client by you | `bookmark-research setup` shows the steps |
|
|
136
155
|
|
|
137
|
-
|
|
156
|
+
Default MCP tools:
|
|
138
157
|
|
|
139
158
|
| Group | Tools |
|
|
140
159
|
| --- | --- |
|
|
141
|
-
|
|
|
142
|
-
| Web | `search_web`, `
|
|
143
|
-
|
|
|
144
|
-
| Research
|
|
160
|
+
| Canvas context | `sync_package`, `index_status`, `search_bookmarks`, `get_context`, `plan_research` |
|
|
161
|
+
| Web and archives | `search_web`, `agentic_search`, `fetch_web`, `search_archive` |
|
|
162
|
+
| Wiki | `wiki_write`, `wiki_get`, `wiki_list`, `wiki_search` |
|
|
163
|
+
| Research API | `research_services`, `research_service_prepare`, `_start`, `_status`, `_result`, `_cancel`, `_attach` |
|
|
145
164
|
| Settings | `get_settings`, `update_settings` |
|
|
146
|
-
|
|
165
|
+
|
|
166
|
+
`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.
|
|
167
|
+
|
|
168
|
+
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.
|
|
147
169
|
|
|
148
170
|
Tool descriptions: [details](docs/details.en.md#mcp-tools).
|
|
149
171
|
|
package/README.zh.md
CHANGED
|
@@ -2,91 +2,104 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) · **中文**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://github.com/Browser-bookmark-hub/Bookmark-Canvas)
|
|
6
|
+
[](https://www.npmjs.com/package/bookmark-research)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
带着书签上下文调研,把结论留成可复用知识。读取 [Bookmark Canvas](https://github.com/Browser-bookmark-hub/Bookmark-Canvas) 数据包,使用宿主模型或研究 API 调查,再保存带来源的 Wiki 页面。支持 **Codex、Claude Code、DeepSeek Harness (dsh)**。
|
|
8
9
|
|
|
9
10
|
[安装说明](docs/installation.md) · [使用指南](docs/user-guide.md) · [详细说明](docs/details.md) · [npm](https://www.npmjs.com/package/bookmark-research)
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
> **0.5.0 是测试版。** 遇到问题请到 [GitHub Issues](https://github.com/Browser-bookmark-hub/Bookmark-Research/issues) 反馈。
|
|
12
|
+
## 0.6.0 正式版
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
本版包含双语画布数据包支持、隔离歧义页面的 Exa 批量正文解析,以及精简后的安装/更新摘要。默认只显示版本、实际路径、检查结果和需处理事项;添加 `--json` 获取完整结构化诊断,`--non-interactive` 仅控制是否询问。升级保留已有配置、密钥和研究数据。
|
|
15
|
+
|
|
16
|
+
## 它是怎么工作的
|
|
17
|
+
|
|
18
|
+
- **本地理解层。** 数据包按结构读,而不是一张平铺的 URL 清单:卡片与分组的位置、连线的方向与标签、同一书签在不同卡片的出现位置(空间上下文);日期字段、ID 中协议定义的日期段,以及真正改过内容的 Git 提交(时间上下文)。这些都是离线查询。
|
|
19
|
+
- **外部调研走三条路线。** 读取已知 URL 不需要推理;Agentic 搜索由宿主模型自己规划、搜索、阅读并追查缺口;Deep Research 可直接调用 OpenAI/Parallel 研究 API;完整清单与覆盖审计在明确需要时启用。`search_web` 聚合已配置的 URL 搜索来源(可选 Perplexity Search);`agentic_search` 可按需返回 Grok 或用户自定义 OpenAI 兼容模型的回答与引用。自定义模型是否真正联网取决于上游能力,且不参加 URL 排名。
|
|
20
|
+
- **可复核的知识存储。** 完成的研究可以沉淀成 Wiki:带历史版本和相互链接的已审核页面,之后提问直接复用,不必重新搜索网页。
|
|
15
21
|
|
|
16
22
|
## 环境要求
|
|
17
23
|
|
|
18
|
-
- Python 3.9+,含 SQLite FTS5
|
|
19
|
-
- 至少一个宿主的 CLI:Codex、Claude Code
|
|
20
|
-
-
|
|
24
|
+
- Python 3.9+,含 SQLite FTS5(用 `bookmark-research doctor` 检查)
|
|
25
|
+
- 至少一个宿主的 CLI:Codex、Claude Code 或 DeepSeek Harness (dsh)。DeepSeek Harness (dsh) 另需 `pnpm`;若用 DeepSeek Harness 桌面版自带 CLI,则它自带 pnpm,无需另装
|
|
26
|
+
- 安装发布版需要 Node 18+ 和 npm
|
|
21
27
|
- 安装和本地查书签都不需要 API Key
|
|
22
28
|
|
|
23
29
|
## 安装
|
|
24
30
|
|
|
25
|
-
**当前测试版(`0.5.0-beta.9`)**,支持 macOS、Linux、Windows 交互安装:
|
|
26
|
-
|
|
27
31
|
```sh
|
|
28
|
-
npx bookmark-research@
|
|
32
|
+
npx bookmark-research@latest install
|
|
29
33
|
```
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**默认渠道的交互安装:**
|
|
35
|
+
默认安装最新正式版。固定安装本版可用 `npx bookmark-research@0.6.0 install`。加 `--lang zh` 可让向导显示中文。想一直能用 `bookmark-research` 命令,运行 `npm install -g bookmark-research@latest`;GitHub 便捷脚本使用同一 npm 发布版(macOS/Linux/WSL):
|
|
34
36
|
|
|
35
37
|
```sh
|
|
36
|
-
|
|
38
|
+
curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash
|
|
37
39
|
```
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
### 安装向导会问你什么
|
|
42
|
+
|
|
43
|
+
1. **装到哪些宿主** —— 方向键移动、空格勾选;检测到的 CLI 默认已勾选,随后显示安装计划让你确认。
|
|
44
|
+
2. **默认研究深度(可选)** —— 保持 `auto` 就会按每次请求自动定档;只有想钉死一个默认时才改成 `quick`、`agentic` 或 `deep`。
|
|
45
|
+
3. **答复和报告语言** —— 跟随提问语言、中文或英文。
|
|
46
|
+
4. **搜索来源** —— 一个有序多选列表;未选中的服务自动作为备用搜索层。Perplexity 只提供搜索结果,网页读取由其他服务完成。
|
|
47
|
+
5. **存放位置** —— 默认数据目录、自定义统一目录(归档与研究报告),或研究报告放在书签文件/文件夹旁边。
|
|
48
|
+
6. **可选专业研究 API** —— 默认关闭:OpenAI Deep Research 或 Parallel Task API。
|
|
49
|
+
7. **自定义模型端点(可选)** —— 输入兼容 Base URL、模型和协议;联网能力取决于上游。
|
|
50
|
+
8. **API Key** —— 空格勾选上面所选服务需要的 Key,回车继续,再逐个隐藏输入;全部可选,可跳过。Key 与偏好分开保存。
|
|
51
|
+
9. **服务检查** —— 报告已配置服务;样例搜索/阅读自检需另行选择。
|
|
40
52
|
|
|
41
|
-
|
|
53
|
+
回车即保留当前选项,所以整轮可能只需按几次回车。装好后新建一个宿主会话,让 Skill 和 MCP 工具生效。Wiki 默认建议整理;已有保存授权时直接执行。服务诊断保留 15 分钟缓存,按需调用。
|
|
42
54
|
|
|
43
|
-
|
|
55
|
+
### 指定宿主、不弹提示
|
|
44
56
|
|
|
45
57
|
| 宿主 | 命令 | 实际登记方式 |
|
|
46
58
|
| --- | --- | --- |
|
|
47
59
|
| Codex | `npx bookmark-research@latest install codex --non-interactive` | `codex plugin add` |
|
|
48
60
|
| Claude Code | `npx bookmark-research@latest install claude --scope user --non-interactive` | `claude plugin install` |
|
|
49
|
-
|
|
|
50
|
-
| DSH | `npx bookmark-research@latest install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
51
|
-
|
|
52
|
-
**四个宿主统一发布来源:** npm 包包含共享运行时、Skill 和宿主适配。安装器下载发布包,生成所选宿主格式,再调用宿主原生命令;更新记录 npm 来源,不依赖 npx 临时缓存。GitHub 提供源码和安装清单,未发布源码用 Python 安装器。见[发布约定与官方依据](docs/distribution.md)。
|
|
53
|
-
|
|
54
|
-
**DSH 可直接安装发布包:** 发布包声明 `dsh.bundle.patch`,`dsh plugin --profile <名称> add bookmark-research@<版本>`(或 DSH 插件管理界面)无需先导出即可安装,Python 与 MCP 路径按安装位置解析。DeepSeek Harness 桌面版把 `desktop` profile 保留给自身载体,该 profile 请用桌面版自带 CLI 安装。详见[安装说明](docs/installation.md)。
|
|
61
|
+
| DeepSeek Harness (dsh) | `npx bookmark-research@latest install dsh --profile web --non-interactive` | `dsh plugin add` |
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
一次装多个:`npx bookmark-research@latest install claude dsh --profile web --non-interactive`。装到指定项目:`--scope project --project /path/to/project`(Claude Code)。全部参数见[安装说明](docs/installation.md)。
|
|
57
64
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
**让 agent 帮你装。** 把下面这段粘贴给 Codex、Claude Code、Pi 或 DSH:
|
|
65
|
+
**让 agent 帮你装。** 把下面这段粘贴给 Codex、Claude Code 或 DeepSeek Harness (dsh):
|
|
61
66
|
|
|
62
67
|
```text
|
|
63
68
|
请把 Bookmark Research 插件安装到你当前运行的这个宿主里。
|
|
64
69
|
|
|
65
|
-
1. 先确认你自己是哪个宿主:codex、claude
|
|
66
|
-
2. 运行:npx bookmark-research@latest install <宿主> --non-interactive
|
|
67
|
-
- Claude Code
|
|
68
|
-
-
|
|
70
|
+
1. 先确认你自己是哪个宿主:codex、claude 或 dsh。
|
|
71
|
+
2. 运行:npx bookmark-research@latest install <宿主> --non-interactive --json
|
|
72
|
+
- Claude Code:加 --scope user(或 --scope project --project <目录>)。
|
|
73
|
+
- DeepSeek Harness (dsh):加 --profile <名称>;profile 名称请先问我。
|
|
69
74
|
3. 命令会输出 JSON。确认 "verified": true,有 "error" 就告诉我。
|
|
70
|
-
4. 不要在对话里向我要 API Key。请让我在终端运行 `bookmark-research setup`
|
|
71
|
-
(或 `npx bookmark-research@latest setup`)自己输入。
|
|
75
|
+
4. 不要在对话里向我要 API Key。请让我在终端运行 `bookmark-research setup` 自己输入。
|
|
72
76
|
5. 提醒我新建一个会话,让 Skill 和 MCP 工具生效。
|
|
73
77
|
```
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
安装补充说明:
|
|
80
|
+
|
|
81
|
+
- **npm 是三个宿主唯一的发布来源**,包内含共享运行时、Skill 和宿主适配文件。安装器下载发布包、生成该宿主需要的格式,再调用宿主原生命令登记。GitHub 提供源码、版本说明和安装清单;未发布源码用 Python 安装器。见[发布约定](docs/distribution.md)。
|
|
82
|
+
- **DeepSeek Harness (dsh) 可直接安装发布包。** 包内声明 `dsh.bundle.patch`,`dsh plugin --profile <名称> add bookmark-research@<版本>` 无需先导出即可安装。`desktop` profile 保留给 DeepSeek Harness 桌面版,请用桌面版自带 CLI 安装;安装器与向导会自行定位该 CLI。
|
|
83
|
+
- **Windows** 上常常没有能用的 `python3`,所以安装器会把检测到的 Python 路径写进各宿主的 MCP 配置。Codex 请用 `bookmark-research install codex` 安装,不要直接把仓库加进 Codex;`bookmark-research status` 可以查看实际使用的 Python。
|
|
76
84
|
|
|
77
|
-
|
|
85
|
+
## 配置页与更新
|
|
86
|
+
|
|
87
|
+
**进入配置页。** 在终端里不带参数运行 `bookmark-research` 就会打开菜单:修改配置与 API Key、检查服务、安装到其他宿主、更新、查看状态。别名 `bookmark`(或 `bookmark research`)等价,`bookmark-research setup` 直接进入向导。
|
|
78
88
|
|
|
79
89
|
| 要做什么 | 命令 |
|
|
80
90
|
| --- | --- |
|
|
81
|
-
| 主菜单:配置、检查、安装、更新 | `bookmark-research` |
|
|
82
91
|
| 修改偏好和 API Key | `bookmark-research setup` |
|
|
92
|
+
| 打开菜单 | `bookmark-research` · `bookmark` · `bookmark research` |
|
|
83
93
|
| 查看已装宿主、偏好、保存位置、最近研究、Key 状态 | `bookmark-research status` |
|
|
84
94
|
| 用脚本改偏好 | `bookmark-research config show` · `bookmark-research config set --input prefs.json` |
|
|
95
|
+
| JSON 配置说明与示例 | [配置指南](docs/configuration.md) · [部分配置 JSON](config/settings.example.json) |
|
|
85
96
|
| 更新或验证所有宿主 | `bookmark-research update` · `bookmark-research verify` |
|
|
86
97
|
|
|
87
|
-
没有全局安装时,在前面加 `npx
|
|
98
|
+
没有全局安装时,在前面加 `npx bookmark-research@latest`。偏好和 Key 是用户级的,改一次就对所有已安装宿主生效;改完新建宿主会话即可。加 `--lang zh` 可让向导和菜单显示中文。工具面可用 `bookmark-research config set --tool-scope-preset quick` 使用默认 22 个日常工具;`deep`(或 `all`)启用完整 44 个工具,供明确需要的完整资料审计使用。显式 `tool_scope` 仍优先于预设。
|
|
99
|
+
|
|
100
|
+
**更新。** 运行 `npx bookmark-research@latest install`,在向导中确认升级覆盖,即可为已安装宿主采用最新发布版。Codex 无交互升级可用 `npx bookmark-research@latest install codex --non-interactive --replace-source`。`bookmark-research update` 刷新的是已登记来源:Git/npm 选择器沿用所选 ref,随包保留的构建或固定版本仍留在该构建。两种方式均保留偏好、Key 和数据;完成后新建宿主会话。
|
|
88
101
|
|
|
89
|
-
**API Key 都是可选的。** 在 `bookmark-research setup` 里输入(隐藏显示,输完当场检查,保存在仅当前用户可读的本地文件),或者设置环境变量(优先于已保存的 Key)。
|
|
102
|
+
**API Key 都是可选的。** 在 `bookmark-research setup` 里输入(隐藏显示,输完当场检查,保存在仅当前用户可读的本地文件),或者设置环境变量(优先于已保存的 Key)。
|
|
90
103
|
|
|
91
104
|
| 环境变量 | 服务 | 不配置时 |
|
|
92
105
|
| --- | --- | --- |
|
|
@@ -94,11 +107,13 @@ npx bookmark-research@latest install
|
|
|
94
107
|
| `PARALLEL_API_KEY` | Parallel 搜索与网页读取 | 免费匿名使用,额度较低 |
|
|
95
108
|
| `TAVILY_API_KEY` | Tavily 备用搜索与提取 | 使用免 Key 模式 |
|
|
96
109
|
| `JINA_API_KEY` | Jina 搜索 | Jina Reader 仍可匿名读取网页 |
|
|
110
|
+
| `DEEPSEEK_API_KEY` | 可选的 DeepSeek Search / Fetch | 不选择即可;其他 provider 仍可用 |
|
|
111
|
+
| `PERPLEXITY_API_KEY` | 可选的 Perplexity 结构化 Search | 只提供搜索来源,不提供网页抓取 |
|
|
112
|
+
| `XAI_API_KEY` | 可选的 Grok Agentic 搜索 | 独立 `agentic_search` 工具,不参与 URL 聚合 |
|
|
113
|
+
| `CUSTOM_AGENTIC_API_KEY` | 可选的用户自定义 OpenAI 兼容端点 | 单独的 `agentic_search` 通道;在 setup 中配置 Base URL/模型/协议 |
|
|
97
114
|
| `OPENAI_API_KEY` | 可选的 OpenAI Deep Research 任务 | 功能关闭;宿主自己的研究不受影响 |
|
|
98
115
|
|
|
99
|
-
setup
|
|
100
|
-
|
|
101
|
-
研究深度、答复语言、服务选择、归档、结果位置、Wiki 整理这些偏好,也可以直接在宿主会话里让 agent 改,它会调用 `update_settings` 工具。
|
|
116
|
+
在 setup 的密钥步骤,用空格勾选已启用服务所需的 Key,再在隐藏输入框逐个输入;不选即可跳过。Key 保存在独立的私有 `credentials.json`,也可由环境变量提供,且环境变量优先。Key 不放进 `prefs.json` 或 `settings.json`;设置 JSON 导入会拒绝凭据字段。每个 Key 对应的服务见[配置指南](docs/configuration.md)。偏好也可以直接在宿主会话里让 agent 改(「显示 Bookmark Research 的配置」「以后只用 Exa 搜索」),它会调用 `update_settings` 工具。
|
|
102
117
|
|
|
103
118
|
## 数据保存在哪里
|
|
104
119
|
|
|
@@ -114,13 +129,15 @@ setup 还会问研究报告和证据放在哪里:统一目录(默认 `<数
|
|
|
114
129
|
| `raw-library.sqlite3` | `search_archive` 使用的全文索引,可重建 |
|
|
115
130
|
| `${XDG_CONFIG_HOME:-~/.config}/bookmark-research/` | `settings.json` 和 `credentials.json`(仅当前用户可读) |
|
|
116
131
|
|
|
132
|
+
位置设置只影响新的研究任务,已有任务留在原处。
|
|
133
|
+
|
|
117
134
|
## Agent 循环与子代理
|
|
118
135
|
|
|
119
136
|
宿主模型负责规划、搜索/阅读、评估证据,再追查未解决的问题。Skill 指导这个循环,MCP 保存输入范围、证据、预算和进度;保存研究任务不会启动后台代理。
|
|
120
137
|
|
|
121
|
-
对于分组报告,插件提供“阅读代理 → 新的验证代理 → 覆盖检查 → 补查 → 报告”的流程。Codex 使用原生子代理和附带的委派指南;Claude Code、
|
|
138
|
+
对于分组报告,插件提供“阅读代理 → 新的验证代理 → 覆盖检查 → 补查 → 报告”的流程。Codex 使用原生子代理和附带的委派指南;Claude Code、DeepSeek Harness (dsh) 使用已加载的宿主工作流接口。并发、取消和代理生命周期由宿主管理。每个子代理都需要拿到相关指令,并访问同一个研究存储。
|
|
122
139
|
|
|
123
|
-
工作流适配已有模拟接口测试,但安装成功不代表所有宿主都已跑通完整的多代理任务。所需条件见[宿主工作流](skills/bookmark-research/references/zh/host-workflows.md)
|
|
140
|
+
工作流适配已有模拟接口测试,但安装成功不代表所有宿主都已跑通完整的多代理任务。所需条件见[宿主工作流](skills/bookmark-research/references/zh/host-workflows.md);历史验证记录可从 Git 历史查阅。
|
|
124
141
|
|
|
125
142
|
## 插件包含什么
|
|
126
143
|
|
|
@@ -129,21 +146,26 @@ setup 还会问研究报告和证据放在哪里:统一目录(默认 `<数
|
|
|
129
146
|
| 层 | 组成 | 运行方式 | 需要配置 |
|
|
130
147
|
| --- | --- | --- | --- |
|
|
131
148
|
| Skill | [`bookmark-research`](skills/bookmark-research/SKILL.md) 及 11 份方法参考,每份都有[中文版](skills/bookmark-research/references/zh/skill-guide.md) | 由宿主加载 | 不需要 |
|
|
132
|
-
| 本地 MCP | `bookmark-research
|
|
149
|
+
| 本地 MCP | `bookmark-research`,默认 22 个工具(见下表) | 宿主启动的 Python 进程 | 安装器自动完成 |
|
|
133
150
|
| 本地 MCP 调用的远程 MCP | [Exa](https://exa.ai)(搜索、网页读取)、[Parallel](https://parallel.ai)(搜索、备用读取)、[Tavily](https://tavily.com)(备用搜索) | HTTPS,不启动本地进程 | 可选 API Key |
|
|
134
|
-
| 本地 MCP 调用的 HTTP 服务 | [Jina Reader](https://jina.ai/reader)(备用读取;有 Key
|
|
151
|
+
| 本地 MCP 调用的 HTTP 服务 | [Jina Reader](https://jina.ai/reader)(备用读取;有 Key 时可搜索);[DeepSeek Search / Fetch](https://api-docs.deepseek.com/guides/search/);[Perplexity Search](https://docs.perplexity.ai/api-reference/search-post)(结构化结果) | HTTPS | 可选 provider Key |
|
|
152
|
+
| 模型搜索 API | [xAI Grok Responses](https://docs.x.ai/developers/tools/web-search),可选网页与 X 搜索 | HTTPS | 可选 `XAI_API_KEY`;通过独立 `agentic_search` 调用 |
|
|
153
|
+
| 自定义模型 API | 用户配置的 OpenAI 兼容 Chat Completions/Responses 端点 | 用户配置的 HTTP(S) Base URL | `CUSTOM_AGENTIC_API_KEY`;须配置模型与协议,联网由上游决定 |
|
|
135
154
|
| 可选的宿主 MCP | Exa Agent、Parallel Task MCP、Tavily Research | 需自行加到宿主里 | `bookmark-research setup` 会给出步骤 |
|
|
136
155
|
|
|
137
156
|
本地 MCP 的工具:
|
|
138
157
|
|
|
139
158
|
| 分类 | 工具 |
|
|
140
159
|
| --- | --- |
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
160
|
+
| 画布上下文 | `sync_package`、`index_status`、`search_bookmarks`、`get_context`、`plan_research` |
|
|
161
|
+
| 联网与归档 | `search_web`、`agentic_search`、`fetch_web`、`search_archive` |
|
|
162
|
+
| Wiki | `wiki_write`、`wiki_get`、`wiki_list`、`wiki_search` |
|
|
163
|
+
| 研究 API | `research_services`、`research_service_prepare`、`_start`、`_status`、`_result`、`_cancel`、`_attach` |
|
|
164
|
+
| 配置 | `get_settings`、`update_settings` |
|
|
165
|
+
|
|
166
|
+
`plan_research` 返回本地候选,并独立检索 Wiki/归档;相关性和后续调查由宿主判断。没有画布来源也能使用。`wiki_write` 一次接收编写好的章节、精确引文与来源正文或 capture ID;研究 API 可直接接收问题,无需先创建本地研究会话。
|
|
167
|
+
|
|
168
|
+
`deep` 预设额外提供来源维护、完整研究记录、选路诊断与 Wiki 维护,用于明确要求的完整审计和断点续做。Git 时间上下文由宿主 shell 查询。
|
|
147
169
|
|
|
148
170
|
## 更多
|
|
149
171
|
|
package/bin/bookmark-research.js
CHANGED
|
@@ -22,8 +22,16 @@ if (!python) {
|
|
|
22
22
|
process.exit(1);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// The same file is installed as `bookmark-research` and as the short alias
|
|
26
|
+
// `bookmark`. A leading literal `research` is accepted in both spellings, so
|
|
27
|
+
// `bookmark status`, `bookmark research status` and `bookmark-research status`
|
|
28
|
+
// all run the same command, while `bookmark` or `bookmark research` alone
|
|
29
|
+
// opens the menu.
|
|
30
|
+
const args = process.argv.slice(2);
|
|
31
|
+
if (args[0] === "research") args.shift();
|
|
32
|
+
|
|
25
33
|
const [command, ...prefix] = python;
|
|
26
|
-
const child = spawn(command, [...prefix, launcher, ...
|
|
34
|
+
const child = spawn(command, [...prefix, launcher, ...args], { stdio: "inherit", windowsHide: true });
|
|
27
35
|
// The terminal delivers Ctrl+C to the whole process group; let Python handle it.
|
|
28
36
|
process.on("SIGINT", () => {});
|
|
29
37
|
child.on("exit", (code, signal) => process.exit(signal ? 130 : code ?? 1));
|
package/config/providers.json
CHANGED
|
@@ -89,6 +89,47 @@
|
|
|
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/"
|
|
107
|
+
},
|
|
108
|
+
"perplexity": {
|
|
109
|
+
"label": "Perplexity Search",
|
|
110
|
+
"url": "https://api.perplexity.ai/search",
|
|
111
|
+
"transport": "http",
|
|
112
|
+
"client": "perplexity",
|
|
113
|
+
"search_url": "https://api.perplexity.ai/search",
|
|
114
|
+
"search_tools": ["perplexity_search"],
|
|
115
|
+
"fetch_tools": [],
|
|
116
|
+
"direct_client": true,
|
|
117
|
+
"optional_bearer_env": "PERPLEXITY_API_KEY",
|
|
118
|
+
"required_env": {"search": "PERPLEXITY_API_KEY"},
|
|
119
|
+
"authentication": "Bearer PERPLEXITY_API_KEY. Structured Search API results; does not generate an answer or fetch arbitrary URLs.",
|
|
120
|
+
"docs": "https://docs.perplexity.ai/api-reference/search-post"
|
|
121
|
+
},
|
|
122
|
+
"browser": {
|
|
123
|
+
"label": "Local Browser Renderer",
|
|
124
|
+
"url": "http://127.0.0.1:9222",
|
|
125
|
+
"transport": "http",
|
|
126
|
+
"client": "browser",
|
|
127
|
+
"search_tools": [],
|
|
128
|
+
"fetch_tools": ["browser_render"],
|
|
129
|
+
"direct_client": true,
|
|
130
|
+
"optional_bearer_env": null,
|
|
131
|
+
"authentication": "Optional local browser execution via CDP or Playwright. Disabled by default; explicit setting required. No cloud credentials needed.",
|
|
132
|
+
"docs": "https://chromedevtools.github.io/devtools-protocol/"
|
|
92
133
|
}
|
|
93
134
|
},
|
|
94
135
|
"default_providers": [
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"research": {
|
|
3
|
+
"depth": "auto",
|
|
4
|
+
"prefer_host_workflows": true,
|
|
5
|
+
"response_language": "auto",
|
|
6
|
+
"methods": ["comparative_analysis", "fact_check", "benchmark_review"]
|
|
7
|
+
},
|
|
8
|
+
"search": {
|
|
9
|
+
"providers": ["exa", "parallel", "perplexity"],
|
|
10
|
+
"fallback_providers": ["tavily", "jina"],
|
|
11
|
+
"limit_per_target": 5,
|
|
12
|
+
"strategy": "hedged"
|
|
13
|
+
},
|
|
14
|
+
"fetch": {
|
|
15
|
+
"provider": "exa",
|
|
16
|
+
"providers": ["exa", "parallel", "jina"],
|
|
17
|
+
"strategy": "staggered",
|
|
18
|
+
"max_characters": 12000
|
|
19
|
+
},
|
|
20
|
+
"custom_agentic": {
|
|
21
|
+
"enabled": false,
|
|
22
|
+
"base_url": "https://gateway.example/v1",
|
|
23
|
+
"model": "provider/model-name",
|
|
24
|
+
"api_mode": "chat_completions",
|
|
25
|
+
"search_mode": "prompt"
|
|
26
|
+
},
|
|
27
|
+
"archive": {
|
|
28
|
+
"enabled": true
|
|
29
|
+
},
|
|
30
|
+
"wiki": {
|
|
31
|
+
"after_research": "suggest"
|
|
32
|
+
},
|
|
33
|
+
"output": {
|
|
34
|
+
"mode": "central"
|
|
35
|
+
}
|
|
36
|
+
}
|