bookmark-research 0.5.0-beta.1 → 0.5.0-beta.4

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.
Files changed (44) hide show
  1. package/.agents/plugins/marketplace.json +4 -2
  2. package/.codex-plugin/plugin.json +4 -2
  3. package/README.md +44 -35
  4. package/README.zh.md +44 -35
  5. package/docs/cli-launcher-plan.md +1 -1
  6. package/docs/details.en.md +6 -3
  7. package/docs/details.md +6 -4
  8. package/docs/distribution.md +35 -0
  9. package/docs/installation.en.md +36 -15
  10. package/docs/installation.md +41 -26
  11. package/docs/knowledge-storage-plan.md +43 -0
  12. package/docs/release-notes-0.5.0-beta.2.md +23 -0
  13. package/docs/release-notes-0.5.0-beta.3.md +28 -0
  14. package/docs/release-notes-0.5.0-beta.4.md +39 -0
  15. package/install.sh +59 -298
  16. package/package.json +2 -2
  17. package/scripts/export_bundle.py +4 -0
  18. package/scripts/host_install.py +10 -1
  19. package/scripts/install.py +171 -21
  20. package/scripts/launcher.py +23 -1
  21. package/scripts/npm_source.py +74 -0
  22. package/skills/bookmark-research/SKILL.md +32 -51
  23. package/skills/bookmark-research/references/cli.md +3 -1
  24. package/skills/bookmark-research/references/deep-research.md +3 -2
  25. package/skills/bookmark-research/references/package-semantics.md +16 -0
  26. package/skills/bookmark-research/references/settings-and-archive.md +12 -5
  27. package/skills/bookmark-research/references/wiki-and-evaluation.md +4 -0
  28. package/skills/bookmark-research/references/zh/cli.md +3 -1
  29. package/skills/bookmark-research/references/zh/deep-research.md +3 -2
  30. package/skills/bookmark-research/references/zh/package-semantics.md +16 -0
  31. package/skills/bookmark-research/references/zh/settings-and-archive.md +12 -5
  32. package/skills/bookmark-research/references/zh/skill-guide.md +33 -52
  33. package/skills/bookmark-research/references/zh/wiki-and-evaluation.md +4 -0
  34. package/src/archive.py +86 -10
  35. package/src/cli.py +9 -1
  36. package/src/jina.py +1 -1
  37. package/src/mcp_server.py +25 -4
  38. package/src/onboarding.py +33 -1
  39. package/src/raw_library.py +388 -0
  40. package/src/remote_mcp.py +2 -2
  41. package/src/research.py +239 -19
  42. package/src/research_locations.py +38 -0
  43. package/src/settings.py +12 -2
  44. package/src/wiki.py +61 -1
@@ -7,8 +7,10 @@
7
7
  {
8
8
  "name": "bookmark-research",
9
9
  "source": {
10
- "source": "local",
11
- "path": "./"
10
+ "source": "npm",
11
+ "package": "bookmark-research",
12
+ "version": "0.5.0-beta.3",
13
+ "registry": "https://registry.npmjs.org"
12
14
  },
13
15
  "policy": {
14
16
  "installation": "AVAILABLE",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bookmark-research",
3
- "version": "0.5.0-beta.1",
3
+ "version": "0.5.0-beta.4",
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"
@@ -39,7 +39,9 @@
39
39
  "PARALLEL_API_KEY",
40
40
  "TAVILY_API_KEY",
41
41
  "JINA_API_KEY",
42
- "OPENAI_API_KEY"
42
+ "OPENAI_API_KEY",
43
+ "SystemRoot",
44
+ "windir"
43
45
  ]
44
46
  }
45
47
  }
package/README.md CHANGED
@@ -6,7 +6,7 @@ Research your bookmarks with verified web sources. Give it a list of bookmark UR
6
6
 
7
7
  Works in **Codex, Claude Code, Pi and DSH (DeepSeek Harness)**.
8
8
 
9
- [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) · [Releases](https://github.com/Browser-bookmark-hub/Bookmark-Research/releases)
9
+ [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
10
 
11
11
  > [!NOTE]
12
12
  > **0.5.0 is a beta.** Report problems on [GitHub Issues](https://github.com/Browser-bookmark-hub/Bookmark-Research/issues).
@@ -15,7 +15,7 @@ Works in **Codex, Claude Code, Pi and DSH (DeepSeek Harness)**.
15
15
 
16
16
  - Python 3.9+ with SQLite FTS5 (check with `bookmark-research doctor`)
17
17
  - The CLI of at least one client: Codex, Claude Code, Pi or DSH (DSH also needs `pnpm`)
18
- - Node 18+ for the `bookmark-research` command; optional on macOS/Linux
18
+ - Node 18+ and npm for release installation (including the GitHub convenience script)
19
19
  - No API key is needed to install or to query bookmarks locally
20
20
 
21
21
  ## Install
@@ -23,23 +23,27 @@ Works in **Codex, Claude Code, Pi and DSH (DeepSeek Harness)**.
23
23
  **Interactive** (macOS, Linux, Windows):
24
24
 
25
25
  ```sh
26
- npx bookmark-research install
26
+ npx bookmark-research@latest install
27
27
  ```
28
28
 
29
29
  Pick clients with the arrow keys and Space, confirm the summary, then choose search services and enter API keys. Start a new client session afterwards.
30
30
 
31
- For a permanent `bookmark-research` command: `npm install -g bookmark-research`. Without Node (macOS/Linux/WSL): `curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash`.
31
+ For a permanent `bookmark-research` command: `npm install -g bookmark-research`. The GitHub convenience script uses the same npm release (macOS/Linux/WSL): `curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash`.
32
32
 
33
33
  **One client, no prompts:**
34
34
 
35
35
  | Client | Command | Registers with |
36
36
  | --- | --- | --- |
37
- | Codex | `npx bookmark-research install codex --non-interactive` | `codex plugin add` |
38
- | Claude Code | `npx bookmark-research install claude --scope user --non-interactive` | `claude plugin install` |
39
- | Pi | `npx bookmark-research install pi --non-interactive` | `pi install` |
40
- | DSH | `npx bookmark-research install dsh --profile web --non-interactive` | `dsh plugin add` |
37
+ | Codex | `npx bookmark-research@latest install codex --non-interactive` | `codex plugin add` |
38
+ | Claude Code | `npx bookmark-research@latest install claude --scope user --non-interactive` | `claude plugin install` |
39
+ | Pi | `npx bookmark-research@latest install pi --non-interactive` | `pi install` |
40
+ | DSH | `npx bookmark-research@latest install dsh --profile web --non-interactive` | `dsh plugin add` |
41
41
 
42
- Several at once: `npx bookmark-research install claude dsh --profile web --non-interactive`. Project scope: `--scope project --project /path/to/project` (Claude Code, Pi). All options: [installation guide](docs/installation.en.md).
42
+ **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).
43
+
44
+ **Windows:** the installer writes the detected Python path into each client's MCP config, because Windows often has no working `python3`. Install Codex with `bookmark-research install codex` rather than adding the repository to Codex directly. `bookmark-research status` shows the interpreter in use.
45
+
46
+ Several at once: `npx bookmark-research@latest install claude dsh --profile web --non-interactive`. Project scope: `--scope project --project /path/to/project` (Claude Code, Pi). All options: [installation guide](docs/installation.en.md).
43
47
 
44
48
  **Ask your agent to install it.** Paste this into Codex, Claude Code, Pi or DSH:
45
49
 
@@ -47,12 +51,12 @@ Several at once: `npx bookmark-research install claude dsh --profile web --non-i
47
51
  Install the Bookmark Research plugin into the client you are running in.
48
52
 
49
53
  1. Identify your own client: codex, claude, pi or dsh.
50
- 2. Run: npx bookmark-research install <client> --non-interactive
54
+ 2. Run: npx bookmark-research@latest install <client> --non-interactive
51
55
  - Claude Code or Pi: add --scope user (or --scope project --project <dir>).
52
56
  - DSH: add --profile <profile>; ask me for the profile name.
53
57
  3. The command prints JSON. Confirm "verified": true and report any "error".
54
58
  4. Do not ask me for API keys in chat. Tell me to run `bookmark-research setup`
55
- (or `npx bookmark-research setup`) in my terminal to enter them.
59
+ (or `npx bookmark-research@latest setup`) in my terminal to enter them.
56
60
  5. Tell me to start a new session so the Skill and MCP tools load.
57
61
  ```
58
62
 
@@ -64,11 +68,11 @@ No reinstall is needed. Settings and keys apply to every installed client; start
64
68
  | --- | --- |
65
69
  | Menu: configure, check, install, update | `bookmark-research` |
66
70
  | Preferences and API keys | `bookmark-research setup` |
67
- | Installed clients, preferences, key status | `bookmark-research status` |
71
+ | Installed clients, preferences, storage locations, recent research, key status | `bookmark-research status` |
68
72
  | Script preferences | `bookmark-research config show` · `bookmark-research config set --input prefs.json` |
69
73
  | Update or verify all clients | `bookmark-research update` · `bookmark-research verify` |
70
74
 
71
- Use `npx bookmark-research …` if the command is not installed globally.
75
+ Use `npx bookmark-research@latest …` if the command is not installed globally.
72
76
 
73
77
  **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. Keys are never accepted in chat, command arguments or JSON files.
74
78
 
@@ -80,24 +84,42 @@ Use `npx bookmark-research …` if the command is not installed globally.
80
84
  | `JINA_API_KEY` | Jina search | Jina Reader still reads pages anonymously |
81
85
  | `OPENAI_API_KEY` | Optional OpenAI Deep Research runs | Feature off; host-led research still works |
82
86
 
83
- Preferences (research depth, answer language, providers, archiving) can also be changed by asking the agent in a client session; it uses the `update_settings` tool.
87
+ Setup also asks where research reports and evidence go: a central folder (default `<data dir>/research`, path changeable) or beside the bookmark file or folder (falls back to the central folder when that is not possible). This affects new research only; existing tasks stay where they are. It then asks whether finished research should update the Wiki: suggest pages and ask first (default), automatic, or off.
84
88
 
85
- ## What's inside
89
+ 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.
86
90
 
87
- ### Skill
91
+ ## Where data is stored
88
92
 
89
- | Skill | Use it for |
93
+ Nothing is written into your bookmark files or the plugin. The data directory is `$BOOKMARK_RESEARCH_DATA_DIR`, or `${XDG_DATA_HOME:-~/.local/share}/bookmark-research`.
94
+
95
+ | Location | Contents |
90
96
  | --- | --- |
91
- | [`bookmark-research`](skills/bookmark-research/SKILL.md) | Query bookmarks, check links, run a full research pass over every bookmark and write a cited report. English, with a [Chinese reading copy](skills/bookmark-research/references/zh/skill-guide.md). |
97
+ | `research/` (or `<input>.bookmark-research/` beside the input) | One folder per research task: report, sources, evidence, and `work/` for the agent's intermediate files |
98
+ | `research-locations.json` | Where every task folder is, so tasks stay listed after the location setting changes |
99
+ | `knowledge/` | Saved page reads: `sources/` per fetch, `pages/` with each distinct text stored once |
100
+ | `wiki/` | Reviewed knowledge pages and revisions; `index.md` catalog and `log.md` timeline |
101
+ | `index.sqlite3`, `index.sqlite3.sources/` | Bookmark search index and managed snapshots of imported packages |
102
+ | `raw-library.sqlite3` | Rebuildable full-text index for `search_archive` |
103
+ | `${XDG_CONFIG_HOME:-~/.config}/bookmark-research/` | `settings.json` and `credentials.json` (private, owner-only) |
104
+
105
+ ## What's inside
92
106
 
93
- ### MCP server
107
+ A bundle of one Skill, one local MCP server, and the remote MCPs and services that server connects to. The client registers only the local MCP.
94
108
 
95
- One local stdio server, `bookmark-research` (`python3 src/cli.py serve`), with 36 tools:
109
+ | Layer | Component | Runs as | Setup |
110
+ | --- | --- | --- | --- |
111
+ | 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 |
112
+ | Local MCP | `bookmark-research`, 37 tools (below) | Python process started by the client | Installed for you |
113
+ | 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 |
114
+ | HTTP service, called by the local MCP | [Jina Reader](https://jina.ai/reader) (fallback reading; search with a key) | HTTPS | Optional `JINA_API_KEY` |
115
+ | Optional client MCPs | Exa Agent, Parallel Task MCP, Tavily Research | Added to your client by you | `bookmark-research setup` shows the steps |
116
+
117
+ Local MCP tools:
96
118
 
97
119
  | Group | Tools |
98
120
  | --- | --- |
99
121
  | Bookmarks | `sync_package`, `index_status`, `source_history`, `search_bookmarks`, `get_context` |
100
- | Web | `search_web`, `fetch_web`, `search_providers` |
122
+ | Web | `search_web`, `fetch_web`, `search_archive`, `search_providers` |
101
123
  | 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` |
102
124
  | Research services (optional) | `research_services`, `research_service_prepare`, `_start`, `_status`, `_result`, `_cancel`, `_attach`, `_import` |
103
125
  | Settings | `get_settings`, `update_settings` |
@@ -105,22 +127,9 @@ One local stdio server, `bookmark-research` (`python3 src/cli.py serve`), with 3
105
127
 
106
128
  Tool descriptions: [details](docs/details.en.md#mcp-tools).
107
129
 
108
- ### Web services
109
-
110
- Called by the plugin's own MCP server; you do not add their MCPs separately.
111
-
112
- | Service | Role |
113
- | --- | --- |
114
- | [Exa](https://exa.ai) | Primary search; first page reader |
115
- | [Parallel](https://parallel.ai) | Primary search; fallback page reader |
116
- | [Tavily](https://tavily.com) | Search fallback |
117
- | [Jina Reader](https://jina.ai/reader) | Fallback page reader; search with a key |
118
-
119
- Optional research MCPs you may add to your client yourself: Exa Agent, Parallel Task and Tavily Research. `bookmark-research setup` shows the steps for each client.
120
-
121
130
  ## More
122
131
 
123
- - [Installation guide](docs/installation.en.md): all install options, updates, ZIP downloads
132
+ - [Installation guide](docs/installation.en.md): all install options, npm updates and source development
124
133
  - [User guide](docs/user-guide.en.md): first use, the three research modes, languages
125
134
  - [Details](docs/details.en.md): data model, research modes, settings, export formats, development checks
126
135
  - [Architecture](docs/bookmark-research-architecture.md) (Chinese)
package/README.zh.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  支持 **Codex、Claude Code、Pi、DSH(DeepSeek Harness)**。
8
8
 
9
- [安装说明](docs/installation.md) · [使用指南](docs/user-guide.md) · [详细说明](docs/details.md) · [npm](https://www.npmjs.com/package/bookmark-research) · [Releases](https://github.com/Browser-bookmark-hub/Bookmark-Research/releases)
9
+ [安装说明](docs/installation.md) · [使用指南](docs/user-guide.md) · [详细说明](docs/details.md) · [npm](https://www.npmjs.com/package/bookmark-research)
10
10
 
11
11
  > [!NOTE]
12
12
  > **0.5.0 是测试版。** 遇到问题请到 [GitHub Issues](https://github.com/Browser-bookmark-hub/Bookmark-Research/issues) 反馈。
@@ -15,7 +15,7 @@
15
15
 
16
16
  - Python 3.9+,含 SQLite FTS5(可用 `bookmark-research doctor` 检查)
17
17
  - 至少一个宿主的 CLI:Codex、Claude Code、Pi 或 DSH(DSH 另需 `pnpm`)
18
- - `bookmark-research` 命令需要 Node 18+;macOS/Linux 上可不用
18
+ - 发布版安装需要 Node 18+ 和 npm(GitHub 便捷脚本也需要)
19
19
  - 安装和本地查书签都不需要 API Key
20
20
 
21
21
  ## 安装
@@ -23,23 +23,27 @@
23
23
  **交互安装**(macOS、Linux、Windows):
24
24
 
25
25
  ```sh
26
- npx bookmark-research install
26
+ npx bookmark-research@latest install
27
27
  ```
28
28
 
29
29
  用方向键和空格选择宿主,确认汇总后安装,再选择搜索服务、输入 API Key。装好后新建一个宿主会话。
30
30
 
31
- 想一直能用 `bookmark-research` 命令:`npm install -g bookmark-research`。不用 Node(macOS/Linux/WSL):`curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash`。
31
+ 想一直能用 `bookmark-research` 命令:`npm install -g bookmark-research`。GitHub 便捷脚本也使用同一 npm 发布版(macOS/Linux/WSL):`curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash`。
32
32
 
33
33
  **指定宿主、不弹提示:**
34
34
 
35
35
  | 宿主 | 命令 | 实际登记方式 |
36
36
  | --- | --- | --- |
37
- | Codex | `npx bookmark-research install codex --non-interactive` | `codex plugin add` |
38
- | Claude Code | `npx bookmark-research install claude --scope user --non-interactive` | `claude plugin install` |
39
- | Pi | `npx bookmark-research install pi --non-interactive` | `pi install` |
40
- | DSH | `npx bookmark-research install dsh --profile web --non-interactive` | `dsh plugin add` |
37
+ | Codex | `npx bookmark-research@latest install codex --non-interactive` | `codex plugin add` |
38
+ | Claude Code | `npx bookmark-research@latest install claude --scope user --non-interactive` | `claude plugin install` |
39
+ | Pi | `npx bookmark-research@latest install pi --non-interactive` | `pi install` |
40
+ | DSH | `npx bookmark-research@latest install dsh --profile web --non-interactive` | `dsh plugin add` |
41
41
 
42
- 一次装多个:`npx bookmark-research install claude dsh --profile web --non-interactive`。装到指定项目:`--scope project --project /path/to/project`(Claude Code、Pi)。全部参数见[安装说明](docs/installation.md)。
42
+ **四个宿主统一发布来源:** npm 包包含共享运行时、Skill 和宿主适配。安装器下载发布包,生成所选宿主格式,再调用宿主原生命令;更新记录 npm 来源,不依赖 npx 临时缓存。GitHub 提供源码和安装清单,未发布源码用 Python 安装器。见[发布约定与官方依据](docs/distribution.md)。
43
+
44
+ **Windows:** Windows 上常常没有能用的 `python3`,所以安装器会把检测到的 Python 路径写进各宿主的 MCP 配置。Codex 请用 `bookmark-research install codex` 安装,不要直接把仓库加进 Codex。`bookmark-research status` 可以查看实际使用的 Python。
45
+
46
+ 一次装多个:`npx bookmark-research@latest install claude dsh --profile web --non-interactive`。装到指定项目:`--scope project --project /path/to/project`(Claude Code、Pi)。全部参数见[安装说明](docs/installation.md)。
43
47
 
44
48
  **让 agent 帮你装。** 把下面这段粘贴给 Codex、Claude Code、Pi 或 DSH:
45
49
 
@@ -47,12 +51,12 @@ npx bookmark-research install
47
51
  请把 Bookmark Research 插件安装到你当前运行的这个宿主里。
48
52
 
49
53
  1. 先确认你自己是哪个宿主:codex、claude、pi 或 dsh。
50
- 2. 运行:npx bookmark-research install <宿主> --non-interactive
54
+ 2. 运行:npx bookmark-research@latest install <宿主> --non-interactive
51
55
  - Claude Code 或 Pi:加 --scope user(或 --scope project --project <目录>)。
52
56
  - DSH:加 --profile <名称>;profile 名称请先问我。
53
57
  3. 命令会输出 JSON。确认 "verified": true,有 "error" 就告诉我。
54
58
  4. 不要在对话里向我要 API Key。请让我在终端运行 `bookmark-research setup`
55
- (或 `npx bookmark-research setup`)自己输入。
59
+ (或 `npx bookmark-research@latest setup`)自己输入。
56
60
  5. 提醒我新建一个会话,让 Skill 和 MCP 工具生效。
57
61
  ```
58
62
 
@@ -64,11 +68,11 @@ npx bookmark-research install
64
68
  | --- | --- |
65
69
  | 主菜单:配置、检查、安装、更新 | `bookmark-research` |
66
70
  | 修改偏好和 API Key | `bookmark-research setup` |
67
- | 查看已装宿主、偏好、Key 状态 | `bookmark-research status` |
71
+ | 查看已装宿主、偏好、保存位置、最近研究、Key 状态 | `bookmark-research status` |
68
72
  | 用脚本改偏好 | `bookmark-research config show` · `bookmark-research config set --input prefs.json` |
69
73
  | 更新或验证所有宿主 | `bookmark-research update` · `bookmark-research verify` |
70
74
 
71
- 没有全局安装时,在前面加 `npx`,例如 `npx bookmark-research setup`。
75
+ 没有全局安装时,在前面加 `npx`,例如 `npx bookmark-research@latest setup`。
72
76
 
73
77
  **API Key 都是可选的。** 在 `bookmark-research setup` 里输入(隐藏显示,输完当场检查,保存在仅当前用户可读的本地文件),或者设置环境变量(优先于已保存的 Key)。Key 不接受对话、命令参数或 JSON 文件。
74
78
 
@@ -80,45 +84,50 @@ npx bookmark-research install
80
84
  | `JINA_API_KEY` | Jina 搜索 | Jina Reader 仍可匿名读取网页 |
81
85
  | `OPENAI_API_KEY` | 可选的 OpenAI Deep Research 任务 | 功能关闭;宿主自己的研究不受影响 |
82
86
 
83
- 研究深度、答复语言、服务选择、归档这些偏好,也可以直接在宿主会话里让 agent 改,它会调用 `update_settings` 工具。
87
+ setup 还会问研究报告和证据放在哪里:统一目录(默认 `<数据目录>/research`,路径可改),或放在书签文件/文件夹旁边(放不了时退回统一目录)。只影响新的研究,已有任务留在原处。接着问研究结束后是否整理进 Wiki:给出建议并先问你(默认)、自动、关闭。
84
88
 
85
- ## 插件包含什么
89
+ 研究深度、答复语言、服务选择、归档、结果位置、Wiki 整理这些偏好,也可以直接在宿主会话里让 agent 改,它会调用 `update_settings` 工具。
86
90
 
87
- ### Skill
91
+ ## 数据保存在哪里
88
92
 
89
- | Skill | 用途 |
93
+ 不会写入你的书签文件或插件目录。数据目录为 `$BOOKMARK_RESEARCH_DATA_DIR`,未设置时为 `${XDG_DATA_HOME:-~/.local/share}/bookmark-research`。
94
+
95
+ | 位置 | 内容 |
90
96
  | --- | --- |
91
- | [`bookmark-research`](skills/bookmark-research/SKILL.md) | 查书签、核对链接、对每条书签做完整研究并写出带引用的报告。英文执行版,另有[中文阅读版](skills/bookmark-research/references/zh/skill-guide.md)。 |
97
+ | `research/`(或输入旁边的 `<输入名>.bookmark-research/`) | 每个研究任务一个文件夹:报告、来源、证据,以及存放 agent 中间文件的 `work/` |
98
+ | `research-locations.json` | 所有任务文件夹的位置,改了位置设置后旧任务仍能列出 |
99
+ | `knowledge/` | 保存的网页读取:`sources/` 按每次读取保存,`pages/` 中相同正文只存一份 |
100
+ | `wiki/` | 审核后的知识页面与历史版本;`index.md` 目录、`log.md` 时间线 |
101
+ | `index.sqlite3`、`index.sqlite3.sources/` | 书签检索索引,以及导入数据包的托管快照 |
102
+ | `raw-library.sqlite3` | `search_archive` 使用的全文索引,可重建 |
103
+ | `${XDG_CONFIG_HOME:-~/.config}/bookmark-research/` | `settings.json` 和 `credentials.json`(仅当前用户可读) |
104
+
105
+ ## 插件包含什么
92
106
 
93
- ### MCP 服务
107
+ 由 1 个 Skill、1 个本地 MCP 服务,以及这个服务内部连接的远程 MCP 和网页服务组成。宿主里只需要登记这 1 个本地 MCP。
94
108
 
95
- 一个本地 stdio 服务 `bookmark-research`(`python3 src/cli.py serve`),共 36 个工具:
109
+ | 层 | 组成 | 运行方式 | 需要配置 |
110
+ | --- | --- | --- | --- |
111
+ | Skill | [`bookmark-research`](skills/bookmark-research/SKILL.md) 及 11 份方法参考,每份都有[中文版](skills/bookmark-research/references/zh/skill-guide.md) | 由宿主加载 | 不需要 |
112
+ | 本地 MCP | `bookmark-research`,37 个工具(见下表) | 宿主启动的 Python 进程 | 安装器自动完成 |
113
+ | 本地 MCP 调用的远程 MCP | [Exa](https://exa.ai)(搜索、网页读取)、[Parallel](https://parallel.ai)(搜索、备用读取)、[Tavily](https://tavily.com)(备用搜索) | HTTPS,不启动本地进程 | 可选 API Key |
114
+ | 本地 MCP 调用的 HTTP 服务 | [Jina Reader](https://jina.ai/reader)(备用读取;有 Key 时可搜索) | HTTPS | 可选 `JINA_API_KEY` |
115
+ | 可选的宿主 MCP | Exa Agent、Parallel Task MCP、Tavily Research | 需自行加到宿主里 | `bookmark-research setup` 会给出步骤 |
116
+
117
+ 本地 MCP 的工具:
96
118
 
97
119
  | 分类 | 工具 |
98
120
  | --- | --- |
99
121
  | 书签 | `sync_package`、`index_status`、`source_history`、`search_bookmarks`、`get_context` |
100
- | 网页 | `search_web`、`fetch_web`、`search_providers` |
122
+ | 网页 | `search_web`、`fetch_web`、`search_archive`、`search_providers` |
101
123
  | 研究 | `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` |
102
124
  | 专业研究服务(可选) | `research_services`、`research_service_prepare`、`_start`、`_status`、`_result`、`_cancel`、`_attach`、`_import` |
103
125
  | 设置 | `get_settings`、`update_settings` |
104
126
  | Wiki 与评测 | `wiki_write`、`wiki_get`、`wiki_list`、`wiki_search`、`wiki_lint`、`evaluate_research` |
105
127
 
106
- ### 网页服务
107
-
108
- 由插件自带的 MCP 服务直接调用,不需要另外添加它们的 MCP。
109
-
110
- | 服务 | 作用 |
111
- | --- | --- |
112
- | [Exa](https://exa.ai) | 主要搜索;首选网页读取 |
113
- | [Parallel](https://parallel.ai) | 主要搜索;备用网页读取 |
114
- | [Tavily](https://tavily.com) | 备用搜索 |
115
- | [Jina Reader](https://jina.ai/reader) | 备用网页读取;有 Key 时可搜索 |
116
-
117
- 另有可选的研究 MCP 可以自己加到宿主里:Exa Agent、Parallel Task、Tavily Research。`bookmark-research setup` 会给出各宿主的接入步骤。
118
-
119
128
  ## 更多
120
129
 
121
- - [安装说明](docs/installation.md):全部安装方式、更新、ZIP 下载
130
+ - [安装说明](docs/installation.md):全部安装方式、npm 更新与源码开发
122
131
  - [使用指南](docs/user-guide.md):首次使用、三种研究方式、语言
123
132
  - [详细说明](docs/details.md):使用方式、数据包与保存位置、宿主与验证范围、开发
124
133
  - [结构与触发流程](docs/bookmark-research-architecture.md)
@@ -55,4 +55,4 @@ bookmark-research doctor 检查 Python 与 SQLite FTS5
55
55
 
56
56
  - 已实现:`bin/bookmark-research.js`、根目录 `package.json`(含 `bin` 与 `pi.skills`)、`scripts/launcher.py` 主菜单与子命令、Windows 按键/控制台/安装锁/Python 路径适配、`.github/workflows/test.yml` 三系统矩阵、README 与安装文档。
57
57
  - 已验证(macOS):全量 450 个测试通过;`npm pack` 后全局安装的 `bookmark-research` 真实完成 Claude Code 安装、`status`、`verify`(36 个 MCP 工具);主菜单在伪终端中可用。
58
- - 待验证:Windows 原生只由 CI 配置与模拟单元测试覆盖,需推送后看 CI;npm 包尚未发布;Codex 在 Windows 上仍使用仓库 manifest 中的 `python3` 启动 MCP,若系统没有 `python3` 命令需另行处理。
58
+ - 已处理(0.5.0-beta.2):Windows 上 Codex 改为登记固定了检测到的 Python 路径的副本,清单转发 `SystemRoot`/`windir`。仍待真机验证:Windows 上的四宿主实际安装、Pi。
@@ -159,7 +159,9 @@ Run `python3 src/cli.py setup` to revisit the terminal wizard. Before each new w
159
159
 
160
160
  The default configuration file is `~/.config/bookmark-research/settings.json`, created on the first update. Page archives default to `~/.local/share/bookmark-research/knowledge/`; XDG and plugin data-directory environment variables are respected. You can choose your own absolute paths. These files live outside the plugin and canvas package, so plugin updates do not replace them.
161
161
 
162
- With archiving enabled, received fetch responses create a snapshot directory: `response.json` stores the actual MCP response; `manifest.json` records URLs, provider, fetch time, response and text hashes, and status; `pages/<URL-hash>.md` stores successfully recognized text. Transport failures without a response return a classified error and no `result` or invented archive. Publication dates and authors are recorded separately. Conflicting responses for the same URL are retained and marked. Excerpts and unknown completeness are identified, and archive errors are returned with the fetch result. Later reads add snapshots without overwriting earlier ones.
162
+ Research task folders go to `~/.local/share/bookmark-research/research/` by default (`output.mode: central`, path changeable) or, with `beside_input`, next to a single bookmark file or folder as `<name>.bookmark-research/`; URL lists, several sources, Git repositories, canvas packages and unwritable locations fall back to the central folder with a stated reason. Changes apply to new tasks only; `research-locations.json` keeps every task listed. `wiki.after_research` (`suggest` by default, `auto`, `off`) decides whether finished research proposes or writes Wiki updates. Each Wiki write also refreshes `wiki/index.md` and appends `wiki/log.md`.
163
+
164
+ With archiving enabled, received fetch responses create a snapshot directory: `response.json` stores the actual MCP response; `manifest.json` records URLs, provider, fetch time, response and text hashes, and status; successfully recognized text is stored once per distinct body in the archive's `pages/<SHA-256>.md`. `search_archive` searches that text and all research evidence without network access. Transport failures without a response return a classified error and no `result` or invented archive. Publication dates and authors are recorded separately. Conflicting responses for the same URL are retained and marked. Excerpts and unknown completeness are identified, and archive errors are returned with the fetch result. Later reads add snapshots without overwriting earlier ones.
163
165
 
164
166
  ```sh
165
167
  python3 src/cli.py config show
@@ -185,6 +187,7 @@ The [shared Skill](../skills/bookmark-research/SKILL.md) guides the agent's work
185
187
  | `search_providers` | List configured web providers |
186
188
  | `search_web` | Search through Exa / Parallel / Tavily / keyed Jina and merge results per target |
187
189
  | `fetch_web` | Read known URLs and optionally archive responses and page text |
190
+ | `search_archive` | Literal full-text search over saved page text in the knowledge archive and all research evidence, merged by content hash |
188
191
  | `get_settings` | Read current settings and storage paths |
189
192
  | `update_settings` | Update persistent settings |
190
193
  | `research_readiness` | Check credentials, selected services and observed host tools; return setup/login guidance |
@@ -261,8 +264,8 @@ From this plugin directory **in a full repository checkout**, developers can run
261
264
  python3 -m unittest discover -s tests -v
262
265
  python3 scripts/verify_fixture.py --output /tmp/bookmark-research-verification
263
266
  python3 scripts/verify_quality.py
264
- python3 scripts/build_zip.py --output dist/bookmark-research-0.5.0-beta.1.zip
265
- python3 scripts/build_zip.py --include-tests --output dist/bookmark-research-test-pack-0.5.0-beta.1.zip
267
+ python3 scripts/build_zip.py --output dist/bookmark-research-0.5.0-beta.3.zip
268
+ python3 scripts/build_zip.py --include-tests --output dist/bookmark-research-test-pack-0.5.0-beta.3.zip
266
269
  ```
267
270
 
268
271
  The fixture verifier checks independent bookmark counts, copy-card semantics, scoped queries, unchanged source hashes, incremental sync, and a two-round research lifecycle with a failed page and resumed operation. To additionally validate your own package, append `--package /absolute/path/to/package`; this stays offline and writes derived files only to the new output directory.
package/docs/details.md CHANGED
@@ -51,11 +51,13 @@ JSON/`.canvas` 是源数据,SQLite 是可重建的本地查询索引,无
51
51
 
52
52
  - `index.sqlite3`:来源登记、书签和画布关系索引。
53
53
  - `index.sqlite3.sources/`:原始协议文件和关系清单的版本快照。
54
- - `knowledge/`:普通网页响应、正文和来源记录。
55
- - `research/`:完整输入清单、任务、证据、覆盖与报告。
56
- - `wiki/`:主题/实体页和不可变修订。
54
+ - `knowledge/`:普通网页响应、正文(`pages/` 中相同正文只存一份)和来源记录。
55
+ - `research/`:完整输入清单、任务、证据、覆盖与报告;每个任务的 `work/` 存放 agent 中间文件。设置 `output.mode: beside_input` 时,新任务放在单个书签文件/文件夹旁边的 `<名称>.bookmark-research/`,URL 列表、多个来源、Git 仓库、画布包或没有写权限时退回统一目录并说明原因。改设置只影响新任务。
56
+ - `research-locations.json`:所有任务文件夹的位置登记。
57
+ - `wiki/`:主题/实体页和不可变修订;每次写入更新 `index.md`(目录)并追加 `log.md`(时间线)。
58
+ - `raw-library.sqlite3`:`search_archive` 的全文索引,覆盖 `knowledge/` 与所有研究证据,可重建。
57
59
 
58
- 配置默认为 `~/.config/bookmark-research/settings.json`。支持 XDG 和显式路径覆盖,多宿主可共享数据。索引更新不会自动抓网页、运行 LLM 或改写 Wiki;来源变化时提示复核,旧研究与证据保留。
60
+ 配置默认为 `~/.config/bookmark-research/settings.json`。`wiki.after_research` 决定研究结束后的 Wiki 整理:`suggest`(默认,先建议再问)、`auto`、`off`。支持 XDG 和显式路径覆盖,多宿主可共享数据。索引更新不会自动抓网页、运行 LLM 或改写 Wiki;来源变化时提示复核,旧研究与证据保留。
59
61
 
60
62
  `research_record` 支持单条 `entry` 或每批至多 50 条的 `entries`,按顺序校验后一次保存,返回精简编号;稳定的 `batch_id` 可避免重试产生重复记录。依赖新 claim ID 的记录在读取返回值后另批提交。`resume` 和 `external_run` 仍需单条调用,详见 [证据记录](../skills/bookmark-research/references/zh/deep-research.md)。
61
63
 
@@ -0,0 +1,35 @@
1
+ # 发布与安装约定
2
+
3
+ 正式发布只使用 npm 的 `bookmark-research` 包。它包含共享 Python 运行时、Skill 和各宿主适配文件;不维护四份独立源码或四个发布版本。GitHub 用于源码、问题跟踪、版本说明及安装清单。
4
+
5
+ | 入口 | 插件内容来源 | 登记和缓存 |
6
+ | --- | --- | --- |
7
+ | `npx bookmark-research@latest install codex` | npm 发布包 → Codex 格式 | Codex 原生命令 |
8
+ | `npx bookmark-research@latest install claude` | 同一个 npm 包 → Claude 格式 | Claude Code 原生命令 |
9
+ | `npx bookmark-research@latest install pi` | 同一个 npm 包 → Pi 格式 | `pi install` |
10
+ | `npx bookmark-research@latest install dsh --profile web` | 同一个 npm 包 → DSH bundle | `dsh plugin --profile web add` |
11
+ | GitHub `install.sh` | 转交上述 npm 入口 | 所选宿主原生命令 |
12
+ | Codex GitHub marketplace | 清单中固定的 npm 版本 | Codex 直接下载和登记 |
13
+
14
+ 统一的是发布内容和来源。不同宿主需要不同清单,安装器只生成所需格式,用户配置、宿主登记及缓存仍交给宿主命令。Pi 的基础路径提供 Skill 和 CLI;其他宿主按各自适配提供 MCP。
15
+
16
+ 默认安装器记录 `npm:bookmark-research`(`latest`),更新时重新下载,不依赖已清理的 npx 缓存。显式 `--source npm:bookmark-research@VERSION` 会保留版本;要测试同一个固定发布版,在四个宿主使用相同参数。Codex 原生 marketplace 使用清单固定版本,跟随清单更新。需要新版安装器时运行 `npx bookmark-research@latest update`,或先更新全局 npm 安装。
17
+
18
+ 源码开发使用 `python3 scripts/install.py install --source PATH`,也可显式选择 Git 仓库和 `--ref`。旧 Git/本地安装保留来源,不静默转成 npm;切换时先用宿主命令处理旧登记。源码导出、ZIP 和测试包脚本保留为开发工具,CI 的发布候选只输出 npm `.tgz` 与 SHA-256 校验文件。历史 GitHub 附件不删除。
19
+
20
+ 发布顺序:修改源码版本并完成 CI,发布已经验证的 npm 包,确认 registry 可取得该版本,再更新 GitHub marketplace 的固定版本。未发布源码不能通过 npm 入口安装;需要先用源码入口测试。
21
+
22
+ 测试版使用 npm 的 `beta` 标签,并在 GitHub 标记为预发布;不会自动移动 npm 的 `latest` 标签。安装测试版时同时固定安装器与内容来源,例如 `npx bookmark-research@0.5.0-beta.4 install --source npm:bookmark-research@0.5.0-beta.4`。仅将 npx 改为 `@beta` 不会改变默认内容来源 `latest`;已固定的旧版安装也不会自动换成测试版。
23
+
24
+ ## 官方资料与项目实例
25
+
26
+ 2026-10-08 通过网页搜索并读取以下页面。它们支持多种发行方式,**没有“所有插件都只用 npm”的行业要求**;这里选择 npm 是为了减少本项目的发行分支。
27
+
28
+ - [OpenAI:Package your plugin](https://developers.openai.com/plugins/build/plugins):marketplace 可指向本地、Git 或 npm;npm 内容下载不执行生命周期脚本。
29
+ - [Claude Code:Plugin marketplaces](https://code.claude.com/docs/en/plugin-marketplaces#npm-packages):支持 npm、GitHub、Git URL 和本地目录等来源。
30
+ - [Pi:Packages](https://pi.dev/docs/latest/packages):支持 npm、Git 和本地路径;版本化 npm 来源保持固定。
31
+ - [DSH:Package and install a plugin](https://deepseek-harness.github.io/deepseek-harness/en/develop/basic/publish):支持 Git 安装,也建议发布已构建的 npm 包或 tarball,免去用户安装时构建。
32
+ - [Superpowers](https://github.com/obra/superpowers):按宿主提供不同安装方式,Pi 使用 Git 仓库,Claude Code 使用 marketplace,并非 npm 唯一来源。
33
+ - [pi-skills](https://github.com/badlogic/pi-skills):跨宿主 Skill 集合,文档仍提供 Git 克隆安装。
34
+
35
+ 这些资料说明“宿主安装方式不同”是正常的;本项目统一发布包后仍保留必要的宿主适配。
@@ -6,23 +6,23 @@ Install the same plugin for English or Chinese use. See the [user guide](user-gu
6
6
 
7
7
  ## The `bookmark-research` command (recommended)
8
8
 
9
- After `npm install -g bookmark-research`, type `bookmark-research` to open a menu for preferences and API keys, service checks, installing into another client, updates and status. Subcommands work directly: `install [HOST...]`, `update`, `verify`, `setup`, `status`, `config show|set`, `doctor`. The npm package is only an entry point that runs the bundled Python installer and runtime, so Python 3.9+ is still required; it works on native Windows, macOS and Linux. Run the latest `main` with `npx github:Browser-bookmark-hub/Bookmark-Research`. Without arguments and without a terminal (agents/CI) it prints status JSON instead of opening the menu.
9
+ After `npm install -g bookmark-research`, type `bookmark-research` to open a menu for preferences and API keys, service checks, installing into another client, updates and status. Subcommands work directly: `install [HOST...]`, `update`, `verify`, `setup`, `status`, `config show|set`, `doctor`. npm is the single release package for all four hosts and includes the Python installer, runtime, Skill and adapters, so Python 3.9+ is still required; it works on native Windows, macOS and Linux. Use `npx bookmark-research@latest install HOST` for a release, and the Python source installer for unpublished development changes. Without arguments and without a terminal (agents/CI) it prints status JSON instead of opening the menu.
10
10
 
11
11
  <a id="one-command-codex-installation"></a>
12
12
 
13
13
  ## One-command installation
14
14
 
15
- Requirements: Bash, Git, Python 3.9+ with SQLite FTS5, and the selected host CLI (Codex, Claude Code, Pi or DSH). Other hosts do not need Codex installed.
15
+ Requirements: Bash, Node.js/npm, Python 3.9+ with SQLite FTS5, and the selected host CLI (Codex, Claude Code, Pi or DSH). Other hosts do not need Codex installed.
16
16
 
17
17
  ```sh
18
18
  curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash
19
19
  ```
20
20
 
21
- The terminal wizard detects available CLIs and lets you choose one or more hosts: arrow keys move, Space toggles, Enter confirms, and detected hosts are preselected. It then asks each host's scope/project/profile and shows a summary to confirm before installing. It works with piped installation by reading `/dev/tty`; without a capable terminal, or with `BOOKMARK_RESEARCH_PLAIN=1`, it uses plain numbered prompts. If no supported CLI is found, the bootstrap stops before downloading. `--interactive` requires a terminal; `--non-interactive` never prompts. Without a terminal or an explicit host, the legacy default is Codex. Agents should pass `--host`.
21
+ The terminal wizard detects available CLIs and lets you choose one or more hosts: arrow keys move, Space toggles, Enter confirms, and detected hosts are preselected. It then asks each host's scope/project/profile and shows a summary to confirm before installing. It works with piped installation by reading `/dev/tty`; without a capable terminal, or with `BOOKMARK_RESEARCH_PLAIN=1`, it uses plain numbered prompts. The npm installer checks the selected host before native registration. `--interactive` requires a terminal; `--non-interactive` never prompts. Without a terminal or an explicit host, the legacy default is Codex. Agents should pass `--host`.
22
22
 
23
- The first installation follows `main` and uses the selected host's native registration commands. It does not use GitHub Release assets. Codex retains its own Git source/cache; other hosts receive complete persistent exports and installation receipts under `${XDG_DATA_HOME:-~/.local/share}/bookmark-research/installations/` (override with `--install-dir`). Temporary downloads can then be removed. Start a new host session to load the Skill and tools.
23
+ The first installation selects `npm:bookmark-research` (`latest`). All four hosts receive a clean export from that release through their native registration commands. The recorded source is the npm package and selector, not the temporary download or npx cache. `update` downloads that selector again; it does not need the original cache. GitHub serves this convenience script and source catalogs, not a separate release ZIP. Persistent host exports live under `${XDG_DATA_HOME:-~/.local/share}/bookmark-research/installations/` (override with `BOOKMARK_RESEARCH_INSTALL_DIR`; other hosts also accept `--install-dir`). Temporary downloads can then be removed. Start a new host session to load the Skill and tools.
24
24
 
25
- From a checkout, choose a host directly:
25
+ Choose a release host directly, even when running the bootstrap from a checkout:
26
26
 
27
27
  ```sh
28
28
  bash install.sh install --host codex
@@ -42,17 +42,17 @@ curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Resea
42
42
  curl -fsSL https://raw.githubusercontent.com/Browser-bookmark-hub/Bookmark-Research/main/install.sh | bash -s -- verify --host codex --lang en
43
43
  ```
44
44
 
45
- `--lang en` selects English help/onboarding; `--lang zh` selects Chinese. The default `auto` checks `LC_ALL`, then `LC_MESSAGES`, then `LANG`. Chinese locales select Chinese; other or missing locales select English. The bootstrap forwards its selection through `BOOKMARK_RESEARCH_INSTALL_LANG`; an explicit Python `--lang` overrides that hint. Technical errors returned by Git, Codex and the runtime retain their original text. Installation language does not persist a research-language preference.
45
+ `--lang en` selects English help/onboarding; `--lang zh` selects Chinese. The default `auto` checks `LC_ALL`, then `LC_MESSAGES`, then `LANG`. Chinese locales select Chinese; other or missing locales select English. The bootstrap forwards `--lang` unchanged to the npm installer; `BOOKMARK_RESEARCH_INSTALL_LANG` remains an optional locale override. Technical errors returned by Git, Codex and the runtime retain their original text. Installation language does not persist a research-language preference.
46
46
 
47
47
  `--dry-run` reads registration and downloads/prepares a temporary export but does not install, save preferences or modify host registration. `--help` performs no download. `--timeout 60` limits each native command to 1–300 seconds; human input has no timeout. A service readiness timeout is configured separately.
48
48
 
49
- To select a previously published snapshot on a **first installation**, use `install --ref v0.2.0`. Repeat installations and updates retain the registered ref; an update does not advance a fixed tag. A historical tag uses its own installer and features, so older versions may retain their original onboarding language. The current bootstrap does not send unsupported language flags to historical installers.
49
+ For a pinned release on first installation, use `npx bookmark-research@latest install HOST --source npm:bookmark-research@0.5.0-beta.3`. The same selector is retained on reinstall/update. Without a pin, `latest` advances with npm publication. `--ref` belongs to explicit Git development sources only; it no longer chooses a release through the bootstrap. Existing Git/local installations retain their original source; they are not silently migrated to npm. To adopt npm, resolve the old registration using the host’s own commands first.
50
50
 
51
51
  The Codex branch manages `bookmark-research@bookmark-research`. If already installed through `personal` or another marketplace, keep using that source's update flow. Other hosts also reject conflicting sources and preserve existing settings. Claude receives a content-derived native version so changed local/main code refreshes its cache even when the release version is unchanged. Pi retains the persistent local package. DSH installs a relocatable native bundle in the selected profile.
52
52
 
53
53
  ## Guided setup and readiness
54
54
 
55
- After installation, the wizard offers research depth, answer language, primary/fallback search providers, page readers, archive location, check frequency and optional professional APIs. Enter keeps displayed preferences. API-key input is masked; each key is checked immediately and can be re-entered if the check fails. Keys are saved separately in `credentials.json` next to settings, with mode `0600`; this local file is not encrypted. `BOOKMARK_RESEARCH_CREDENTIALS` overrides its path, and environment variables override saved keys. No keys enter preferences, packages, receipts or readiness output. A ChatGPT/Codex login is separate from an OpenAI API key.
55
+ After installation, the wizard offers research depth, answer language, primary/fallback search providers, page readers, archive location, where research reports and evidence go (central folder, a custom central path, or beside the bookmark file/folder with fallback to the central folder; new tasks only), whether finished research updates the Wiki (suggest and ask first, automatic, off), check frequency and optional professional APIs. Enter keeps displayed preferences. API-key input is masked; each key is checked immediately and can be re-entered if the check fails. Keys are saved separately in `credentials.json` next to settings, with mode `0600`; this local file is not encrypted. `BOOKMARK_RESEARCH_CREDENTIALS` overrides its path, and environment variables override saved keys. No keys enter preferences, packages, receipts or readiness output. A ChatGPT/Codex login is separate from an OpenAI API key.
56
56
 
57
57
  Rerun setup at any time with `python3 <installed path>/src/cli.py setup`; the exact command (`getting_started.setup_command` in the JSON result) is printed after installation. From a checkout:
58
58
 
@@ -77,9 +77,9 @@ Search/read adapters are included. Optional Exa Agent, Parallel Task and Tavily
77
77
 
78
78
  Optional service failures appear under `setup.needs_attention` and do not block local work or other providers. Native install or setup failures return nonzero, with installation and setup status reported separately. Historical versions without setup can still install without requesting that newer feature.
79
79
 
80
- ## Local checkout or ZIP
80
+ ## Source development and historical ZIPs
81
81
 
82
- Published ZIPs and test packs appear on [Releases](https://github.com/Browser-bookmark-hub/Bookmark-Research/releases). Local 0.4.0 validation is recorded separately in [validation](validation-0.4.0.md). Preserve hidden `.codex-plugin/` and `.agents/` directories when extracting.
82
+ GitHub [Releases](https://github.com/Browser-bookmark-hub/Bookmark-Research/releases) retain historical artifacts. New release candidates are npm `.tgz` packages. ZIP/export helpers remain available for local development and tests; they are not a second release channel. Preserve required plugin manifests when extracting a historical package.
83
83
 
84
84
  From a checkout or ZIP containing the installer:
85
85
 
@@ -90,21 +90,42 @@ python3 scripts/install.py verify --host codex --lang en
90
90
 
91
91
  Commands also work from another directory using an absolute script path. Quote paths containing spaces. The installer locates its source from its own file location.
92
92
 
93
+ Local checkouts, npm packages, extracted ZIPs and new Git sources are exported before Codex registration. Personal `.claude/`, `.codex/`, `.pi/`, `.agent/`, `.git/` and old build artifacts are excluded; plugin declarations and runtime content remain. The original source is recorded beside the persistent export, and `update` exports it again. Installation compares the native cache file list with the clean export. Keep local sources and the persistent export for future updates. Git origins record the repository and selected ref: branches advance on update; tags and commits remain selected. Reinstalling without `--ref` retains the saved ref; an explicit different ref is rejected.
94
+
95
+ An older installation registered directly from a local source migrates through native `marketplace remove/add` and `plugin add` commands only when its catalog contains this plugin alone. The original source stays the same; user configuration is never edited by the installer. `--dry-run` previews the migration. Conflicting sources and catalogs containing other plugins are preserved for resolution in Codex.
96
+
97
+ For an older Git marketplace, Codex retains its registration and ref. The installer runs native `marketplace upgrade`, exports that fetched checkout, and passes the clean path through per-command `-c` overrides to native `plugin add`. Those overrides do not rewrite the Git registration. This also preserves pins whose ref is absent from native listing JSON. This fallback applies to historical catalogs that point at their repository root. The current release catalog selects an npm package; native updates retain that package source. A Git checkout or GitHub source archive can contain development files; it is not the plugin cache.
98
+
93
99
  | Command | Behavior |
94
100
  | --- | --- |
95
101
  | `install` | Installs or reinstalls the script's local source. |
96
102
  | `install --source PATH` | Selects another valid local marketplace root. |
97
- | `install --source owner/repo --ref TAG` | Registers the chosen Git ref on the first installation. |
103
+ | `install --source owner/repo --ref TAG` | Exports the chosen Git ref and registers the clean bundle. |
98
104
  | `install --dry-run` | Prints the planned commands after checking registration. |
99
- | `update` | Refreshes the registered Git source/ref, or reinstalls current local files. |
105
+ | `install --source npm:bookmark-research[@VERSION]` | Installs the shared npm release for the selected host. |
106
+ | `update` | Re-fetches the recorded npm selector, refreshes the Git source/ref, or reinstalls local files. |
100
107
  | `verify` | Checks enabled registration, cache version, FTS5 and MCP initialization/tool discovery. |
101
108
 
102
109
  The Python installer accepts the same host/setup flags. `verify --installed-path PATH` is Codex-only. Verification uses an isolated store, does not import bookmarks, and does not test provider authentication. Stdout stays JSON; prompts use the terminal and diagnostics use stderr. The setup stage persists only selected preferences; unreadable settings are reported and preserved.
103
110
 
104
- The native commands for this repository's explicit marketplace are:
111
+ ### Native Codex installation of the published release
112
+
113
+ The repository marketplace points to the explicitly pinned `bookmark-research@0.5.0-beta.3` npm package. Codex downloads that package without lifecycle scripts, then owns registration and caching. Adding the repository installs the published release, including its released Skill; it does not install unpublished source changes from `main`.
114
+
115
+ ```sh
116
+ codex plugin marketplace add Browser-bookmark-hub/Bookmark-Research --ref main
117
+ codex plugin add bookmark-research@bookmark-research
118
+ ```
119
+
120
+ For subsequent native updates, run `codex plugin marketplace upgrade bookmark-research`, then `codex plugin add bookmark-research@bookmark-research`. The pinned package changes only when the catalog is updated after that version is published; a frozen Git catalog retains its selected npm version. `bookmark-research update codex` also preserves a native release source. npm and a working `python3` with SQLite FTS5 must be on the host's PATH. On Windows without a working `python3`, use the installer described above to pin the detected interpreter.
121
+
122
+ To install the current checkout, use `python3 scripts/install.py install --source /absolute/path/to/checkout`. To install current source from Git, use `install --source owner/repo --ref BRANCH_OR_TAG`. Both prepare clean exports of the selected source. If this marketplace is already registered, keep its existing source or explicitly choose the intended source in Codex first.
123
+
124
+ To install current source manually with native commands, first export to a new persistent directory. Exported bundles have a local marketplace pointing at their own clean root, so this path does not fetch the published npm release:
105
125
 
106
126
  ```sh
107
- codex plugin marketplace add .
127
+ python3 scripts/export_bundle.py --format codex --output /absolute/path/to/clean/bookmark-research
128
+ codex plugin marketplace add /absolute/path/to/clean/bookmark-research
108
129
  codex plugin add bookmark-research@bookmark-research
109
130
  codex plugin list --json
110
131
  ```
@@ -160,7 +181,7 @@ python3 scripts/install.py install --host dsh --profile web
160
181
  python3 scripts/install.py verify --host dsh --profile web
161
182
  ```
162
183
 
163
- The installer exports a relocatable `dsh.bundle` and calls `dsh plugin --profile web add PATH`. `dsh plugin` delegates to pnpm, so install it first (`npm install -g pnpm` or `corepack enable pnpm`); without it the installer stops before creating a profile and the wizard shows DSH as unavailable. The bundle registers the shared Skill and resolves Python/MCP paths from the installed module. The selected profile must provide the Skill registry and official MCP client. For manual distribution, export with `--format dsh` and install the stable export using that native command. The legacy `cordis.patch.yml` still contains absolute paths and requires separate Skill discovery. Workflow execution separately requires the host service/engine; `hosts/dsh/workflow-call.py --research-id RID --run-key KEY` prepares a call without launching it.
184
+ The installer exports a relocatable `dsh.bundle` and calls `dsh plugin --profile web add PATH`. `dsh plugin` delegates to pnpm, so install it first (`npm install -g pnpm` or `corepack enable pnpm`); without it the installer stops before creating a profile and the wizard shows DSH as unavailable. The bundle registers the shared Skill and resolves Python/MCP paths from the installed module. The selected profile must provide the Skill registry and official MCP client. For local development, export with `--format dsh` and install the stable export using that native command. The legacy `cordis.patch.yml` still contains absolute paths and requires separate Skill discovery. Workflow execution separately requires the host service/engine; `hosts/dsh/workflow-call.py --research-id RID --run-key KEY` prepares a call without launching it.
164
185
 
165
186
  ### Agent Plugins 1.0.0
166
187