dr-claw 1.1.2 → 1.1.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 (113) hide show
  1. package/README.md +286 -177
  2. package/README.zh-CN.md +286 -174
  3. package/dist/assets/{_basePickBy-C0n1uo4u.js → _basePickBy-7CEpiVqc.js} +1 -1
  4. package/dist/assets/{_baseUniq-BRNmhFkc.js → _baseUniq-yh8GoKah.js} +1 -1
  5. package/dist/assets/{arc-DOMBmC_A.js → arc-xxYot-So.js} +1 -1
  6. package/dist/assets/{architectureDiagram-VXUJARFQ-CtMWglbD.js → architectureDiagram-VXUJARFQ-Bb1NqOFB.js} +1 -1
  7. package/dist/assets/{blockDiagram-VD42YOAC-DK_gTkJy.js → blockDiagram-VD42YOAC-D8xMHk8C.js} +1 -1
  8. package/dist/assets/{c4Diagram-YG6GDRKO-DrDAvsn7.js → c4Diagram-YG6GDRKO-69UiBMVa.js} +1 -1
  9. package/dist/assets/channel-BJdHHkhR.js +1 -0
  10. package/dist/assets/{chunk-4BX2VUAB-CGbhdZcN.js → chunk-4BX2VUAB-DXrPhE6K.js} +1 -1
  11. package/dist/assets/{chunk-55IACEB6-sGeFSxen.js → chunk-55IACEB6-B3sw4AGX.js} +1 -1
  12. package/dist/assets/{chunk-B4BG7PRW-RxgHAU_P.js → chunk-B4BG7PRW-Dd4n17kR.js} +1 -1
  13. package/dist/assets/{chunk-DI55MBZ5-CvHUXZrx.js → chunk-DI55MBZ5-DuTb9gb8.js} +1 -1
  14. package/dist/assets/{chunk-FMBD7UC4-Sn7cXVNU.js → chunk-FMBD7UC4-CGErQ-ud.js} +1 -1
  15. package/dist/assets/{chunk-QN33PNHL-bDKOHppN.js → chunk-QN33PNHL-Bk5fuYbR.js} +1 -1
  16. package/dist/assets/{chunk-QZHKN3VN-B9kN5LGm.js → chunk-QZHKN3VN-2UdZTbge.js} +1 -1
  17. package/dist/assets/{chunk-TZMSLE5B-CCBe6len.js → chunk-TZMSLE5B-Bl-UYKEK.js} +1 -1
  18. package/dist/assets/{classDiagram-2ON5EDUG-DQoMNYlY.js → classDiagram-2ON5EDUG-EaoBDWqJ.js} +1 -1
  19. package/dist/assets/{classDiagram-v2-WZHVMYZB-DQoMNYlY.js → classDiagram-v2-WZHVMYZB-EaoBDWqJ.js} +1 -1
  20. package/dist/assets/clone-CwXTbwxl.js +1 -0
  21. package/dist/assets/{cose-bilkent-S5V4N54A-r6sLiHBW.js → cose-bilkent-S5V4N54A-qXNKLX2R.js} +1 -1
  22. package/dist/assets/{dagre-6UL2VRFP-AbsaR1Oa.js → dagre-6UL2VRFP-DmHvDWep.js} +1 -1
  23. package/dist/assets/{diagram-PSM6KHXK-DjCvdUyy.js → diagram-PSM6KHXK-C_Rj4DX3.js} +1 -1
  24. package/dist/assets/{diagram-QEK2KX5R-CqiocXkH.js → diagram-QEK2KX5R-BVr3mPXW.js} +1 -1
  25. package/dist/assets/{diagram-S2PKOQOG-D5ALeoII.js → diagram-S2PKOQOG-DVx6i0Qe.js} +1 -1
  26. package/dist/assets/{erDiagram-Q2GNP2WA-C1AeOsiz.js → erDiagram-Q2GNP2WA-BJQyv9_t.js} +1 -1
  27. package/dist/assets/{flowDiagram-NV44I4VS-C98ve_DO.js → flowDiagram-NV44I4VS-DCR8sPAE.js} +1 -1
  28. package/dist/assets/{ganttDiagram-JELNMOA3-3zdLvcxD.js → ganttDiagram-JELNMOA3-BcXFAthK.js} +1 -1
  29. package/dist/assets/{gitGraphDiagram-V2S2FVAM-nDuDMsHh.js → gitGraphDiagram-V2S2FVAM-CnS56w1x.js} +1 -1
  30. package/dist/assets/{graph-Blm-emkR.js → graph-DGtZXuDY.js} +1 -1
  31. package/dist/assets/index-C-sL-ag0.css +1 -0
  32. package/dist/assets/index-VdqxIFPL.js +670 -0
  33. package/dist/assets/{infoDiagram-HS3SLOUP-CmzE3q0R.js → infoDiagram-HS3SLOUP-DtI272ZD.js} +1 -1
  34. package/dist/assets/{journeyDiagram-XKPGCS4Q-CYaW7LrP.js → journeyDiagram-XKPGCS4Q-DHp_Kica.js} +1 -1
  35. package/dist/assets/{kanban-definition-3W4ZIXB7-mkmW7p0j.js → kanban-definition-3W4ZIXB7-CjgHMNku.js} +1 -1
  36. package/dist/assets/{layout-Ct2kFIId.js → layout-Cnc-DCSb.js} +1 -1
  37. package/dist/assets/{linear-CKG9EwIJ.js → linear-BtRgmV19.js} +1 -1
  38. package/dist/assets/{mermaid.core-CaKcUnnd.js → mermaid.core-B20uzv6N.js} +5 -5
  39. package/dist/assets/{mindmap-definition-VGOIOE7T-Bct-pYin.js → mindmap-definition-VGOIOE7T-bbcLXkWp.js} +1 -1
  40. package/dist/assets/{pieDiagram-ADFJNKIX-C8wFD4Jr.js → pieDiagram-ADFJNKIX-B4fEzWKO.js} +1 -1
  41. package/dist/assets/{quadrantDiagram-AYHSOK5B-CuiE_f46.js → quadrantDiagram-AYHSOK5B-B5G0SMbK.js} +1 -1
  42. package/dist/assets/{requirementDiagram-UZGBJVZJ-C4v1CqU8.js → requirementDiagram-UZGBJVZJ-DsqtOFgj.js} +1 -1
  43. package/dist/assets/{sankeyDiagram-TZEHDZUN-keAqqs-Y.js → sankeyDiagram-TZEHDZUN-CiGemFRE.js} +1 -1
  44. package/dist/assets/{sequenceDiagram-WL72ISMW-ClNbvKTB.js → sequenceDiagram-WL72ISMW-hEMvYbe9.js} +1 -1
  45. package/dist/assets/{stateDiagram-FKZM4ZOC-D8We-2vq.js → stateDiagram-FKZM4ZOC-Cn8VB7b1.js} +1 -1
  46. package/dist/assets/stateDiagram-v2-4FDKWEC3-DaH0PZOq.js +1 -0
  47. package/dist/assets/{timeline-definition-IT6M3QCI-DsvEMT5T.js → timeline-definition-IT6M3QCI-DChT1GUr.js} +1 -1
  48. package/dist/assets/{treemap-GDKQZRPO-TJrzN7Bj.js → treemap-GDKQZRPO-Dflv6a8z.js} +1 -1
  49. package/dist/assets/{xychartDiagram-PRI3JC2R-BdATmY5F.js → xychartDiagram-PRI3JC2R-Dr4urXR8.js} +1 -1
  50. package/dist/icons/nanoclaude.png +0 -0
  51. package/dist/index.html +2 -2
  52. package/dist/screenshots/screenshot_v1_2.png +0 -0
  53. package/package.json +61 -4
  54. package/public/icons/nanoclaude.png +0 -0
  55. package/public/screenshots/screenshot_v1_2.png +0 -0
  56. package/scripts/build-electron-icons.mjs +40 -0
  57. package/scripts/check-deps.js +28 -0
  58. package/scripts/native-runtime.mjs +128 -0
  59. package/server/__tests__/gemini-api.test.mjs +699 -0
  60. package/server/__tests__/gemini-session-index.test.mjs +95 -0
  61. package/server/__tests__/project-sync-dedup.test.mjs +173 -0
  62. package/server/__tests__/session-delete.test.mjs +152 -0
  63. package/server/claude-sdk.js +175 -14
  64. package/server/cli-chat.js +28 -17
  65. package/server/cli.js +48 -11
  66. package/server/data/news-log-arxiv.json +1 -0
  67. package/server/data/news-log-huggingface.json +1 -0
  68. package/server/data/news-results-arxiv.json +460 -0
  69. package/server/data/news-results-huggingface.json +817 -0
  70. package/server/data/research_interests_arxiv.json +50 -0
  71. package/server/data/research_interests_huggingface.json +4 -0
  72. package/server/database/db.js +101 -5
  73. package/server/database/init.sql +17 -1
  74. package/server/gemini-api.js +1838 -0
  75. package/server/gemini-cli.js +13 -2
  76. package/server/index.js +94 -16
  77. package/server/load-env.js +13 -1
  78. package/server/local-gpu.js +166 -24
  79. package/server/mcp-compute.js +223 -0
  80. package/server/middleware/auth.js +25 -6
  81. package/server/nano-claude-code.js +340 -0
  82. package/server/nanoSessionPaths.js +41 -0
  83. package/server/openai-codex.js +6 -2
  84. package/server/openrouter.js +37 -22
  85. package/server/projects.js +516 -110
  86. package/server/routes/agent.js +32 -7
  87. package/server/routes/auto-research.js +1 -1
  88. package/server/routes/claude-btw.js +55 -0
  89. package/server/routes/cli-auth.js +422 -58
  90. package/server/routes/commands.js +25 -1
  91. package/server/routes/community-tools.js +398 -0
  92. package/server/routes/compute.js +155 -0
  93. package/server/routes/git.js +9 -11
  94. package/server/routes/memory.js +143 -0
  95. package/server/routes/news.js +3 -0
  96. package/server/routes/skills.js +35 -0
  97. package/server/routes/user.js +3 -5
  98. package/server/utils/__tests__/safePath.test.js +93 -0
  99. package/server/utils/cliResolution.js +13 -1
  100. package/server/utils/codexSessionMessages.js +285 -0
  101. package/server/utils/geminiOAuth.js +333 -0
  102. package/server/utils/memoryPrompt.js +78 -0
  103. package/server/utils/safePath.js +51 -0
  104. package/server/utils/sessionIndex.js +2 -0
  105. package/server/utils/skillExpander.js +142 -0
  106. package/server/utils/spawnAsync.js +78 -0
  107. package/shared/modelConstants.js +19 -1
  108. package/dist/assets/channel-BFOE7OyC.js +0 -1
  109. package/dist/assets/clone-BulQSblH.js +0 -1
  110. package/dist/assets/index-B8Yutsnm.css +0 -1
  111. package/dist/assets/index-Cf6gyhc3.js +0 -654
  112. package/dist/assets/stateDiagram-v2-4FDKWEC3-BUURfjrE.js +0 -1
  113. package/scripts/install-python-tools.js +0 -64
package/README.md CHANGED
@@ -5,15 +5,19 @@
5
5
  </div>
6
6
 
7
7
  <p align="center">
8
+ <a href="https://github.com/OpenLAIR/dr-claw">
9
+ <img src="https://img.shields.io/badge/%F0%9F%A6%9E-Dr.%20Claw-7C3AED?style=for-the-badge" alt="Dr. Claw" />
10
+ </a>
8
11
  <a href="https://openlair.github.io/dr-claw">
9
- <img src="https://img.shields.io/badge/%F0%9F%8C%90-Homepage-CB2B3E?style=for-the-badge" alt="Homepage" />
12
+ <img src="https://img.shields.io/badge/%F0%9F%8C%90-Homepage-2563EB?style=for-the-badge" alt="Homepage" />
10
13
  </a>
11
- <a href="https://github.com/OpenLAIR/dr-claw">
12
- <img src="https://img.shields.io/badge/%F0%9F%A6%9E-Dr.%20Claw-CB2B3E?style=for-the-badge" alt="Dr. Claw" />
14
+ <a href="https://www.npmjs.com/package/dr-claw">
15
+ <img src="https://img.shields.io/npm/v/dr-claw?style=for-the-badge&logo=npm&color=CB3837" alt="npm version" />
13
16
  </a>
14
17
  <a href="https://github.com/OpenLAIR/dr-claw/blob/main/LICENSE">
15
18
  <img src="https://img.shields.io/badge/License-GPL--3.0%20%2B%20AGPL--3.0-blue?style=for-the-badge" alt="License: GPL-3.0 + AGPL-3.0" />
16
19
  </a>
20
+ <br/>
17
21
  <a href="https://join.slack.com/t/vibe-lab-group/shared_invite/zt-3r4bkcx5t-iGyRMI~r09zt7p_ND2eP9A">
18
22
  <img src="https://img.shields.io/badge/Join-Slack-4A154B?style=for-the-badge&logo=slack" alt="Join Slack" />
19
23
  </a>
@@ -23,6 +27,9 @@
23
27
  <a href="./public/wechat-group-qr.jpg">
24
28
  <img src="https://img.shields.io/badge/Join-WeChat-07C160?style=for-the-badge&logo=wechat&logoColor=white" alt="Join WeChat" />
25
29
  </a>
30
+ <a href="https://github.com/OpenLAIR/dr-claw-plugin-cc">
31
+ <img src="https://img.shields.io/badge/Claude%20Code-Plugin-7C3AED?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJ3aGl0ZSI+PHBhdGggZD0iTTEyIDJMMiAyMmgyMEwxMiAyeiIvPjwvc3ZnPg==" alt="Claude Code Plugin" />
32
+ </a>
26
33
  </p>
27
34
 
28
35
  <p align="center">
@@ -32,13 +39,14 @@
32
39
  ## Table of Contents
33
40
 
34
41
  - [Overview](#overview)
42
+ - [What's New](#whats-new)
35
43
  - [Highlights](#highlights)
36
44
  - [Quick Start](#quick-start)
37
45
  - [Configuration](#configuration)
38
- - [OpenRouter](#openrouter)
39
46
  - [OpenClaw Integration](#openclaw-integration)
40
47
  - [Research Lab - Quick Example](#research-lab-quick-example)
41
48
  - [Usage Guide](#usage-guide)
49
+ - [Claude Code Plugin](#claude-code-plugin)
42
50
  - [Additional Details](#additional-details)
43
51
  - [Contributing](#contributing)
44
52
  - [FAQ](./docs/faq.md)
@@ -54,7 +62,7 @@ Dr. Claw is a general-purpose AI research assistant designed to help researchers
54
62
  ## Product Screenshot
55
63
 
56
64
  <p align="center">
57
- <img src="public/screenshots/new_claw.png" alt="Dr. Claw chat interface" width="1000">
65
+ <img src="public/screenshots/screenshot_v1_2.png" alt="Dr. Claw chat interface" width="1000">
58
66
  </p>
59
67
 
60
68
  <details>
@@ -68,6 +76,34 @@ Dr. Claw is a general-purpose AI research assistant designed to help researchers
68
76
 
69
77
  </details>
70
78
 
79
+ ## What's New
80
+
81
+ - 🧪 **Auto Research Hub** `2026-04-08` — One click to launch fully autonomous research! Pick a tool pack (ARIS, Autoresearch, DeepScientist), hit configure, choose a workflow in Chat — and watch the agent run your entire research pipeline from idea to paper while you sleep.
82
+ - 🖥️ **Desktop App & npx** `2026-04-06` — Dr. Claw now runs as a native desktop app! Grab the `.dmg` / `.exe` from [GitHub Releases](https://github.com/OpenLAIR/dr-claw/releases), or run `npx dr-claw` for zero-setup instant start.
83
+ - 🗂️ **Multi-Tab Sidebar** `2026-04-06` — Research Lab and Files now live side-by-side as switchable tabs in the right sidebar — everything you need, one glance away.
84
+ - 📂 **File Preview Overlay** `2026-04-06` — Preview any project file inline with a sleek pill toggle and sidebar browser — no more context-switching!
85
+ - 💬 **Terminal Chat** `2026-04-06` — Love the terminal? Run `dr-claw chat` for a fully agentic session with any OpenRouter model — zero browser required.
86
+ - 🎛️ **Reasoning Controls** `2026-03-30` — Fine-tune your AI's thinking! Codex reasoning effort and Gemini thinking strength selectors are now right in Chat.
87
+ - 🖥️ **Local GPU Detection** `2026-03-30` — Dr. Claw automatically detects your local GPU resources — ready to put that hardware to work.
88
+ - 🌐 **OpenRouter Provider** `2026-03-28` — Unlock hundreds of models (GPT-5, Claude, Gemini, DeepSeek, Llama, Kimi, and more) with a single API key. The world's models at your fingertips!
89
+ - 🔄 **Session Recovery** `2026-03-26` — Crashed mid-session? No sweat — hit the retry button and pick up right where you left off.
90
+
91
+ <details>
92
+ <summary><strong>Earlier updates</strong></summary>
93
+
94
+ - 📡 **Auto Port Fallback** `2026-03-26` — Port already taken? Dr. Claw finds a free one automatically. One less thing to worry about.
95
+ - 🏷️ **Smart Prompt Loading** `2026-03-26` — Tasks auto-load into Chat with a handy badge dropdown — just click and go!
96
+ - 🏷️ **Session Stage Tags** `2026-03-26` — Sessions are now auto-tagged by research stage — instantly see where each conversation stands.
97
+ - ✍️ **Rebuttal Skill** `2026-03-24` — New skill for crafting review rebuttals — turn reviewer feedback into publication-ready responses.
98
+ - 🧑‍💻 **Multi-Session Support** `2026-03-21` — Run multiple sessions in parallel with smart naming — juggle projects like a pro!
99
+ - 🗑️ **Trash Bin** `2026-03-21` — Accidentally deleted a project? Relax — it's in the trash, ready to be restored.
100
+ - 🤖 **Dr. Claw CLI & OpenClaw** `2026-03-21` — Full CLI control plus an OpenClaw integration for mobile-friendly, voice-ready research management.
101
+ - 📚 **Reference Library** `2026-03-20` — Manage your papers with a streamlined picker and local Zotero support — your literature, organized.
102
+ - 🔀 **Git Source Control** `2026-03-20` — Stage, commit, diff, and switch branches without ever leaving the app. Version control, built in.
103
+ - 📰 **News Dashboard** `2026-03-14` — Stay on top of research-relevant updates right inside your workspace — never miss a trending paper!
104
+
105
+ </details>
106
+
71
107
  ## Highlights
72
108
 
73
109
  - **🔬 Research Lab** — Structured dashboard for end-to-end research: define your brief, generate a pipeline of tasks, track progress across Survey → Ideation → Experiment → Publication → Promotion, and inspect source papers, ideas (rendered with LaTeX math), and cache artifacts — all at a glance
@@ -124,6 +160,8 @@ Dr. Claw is a general-purpose AI research assistant designed to help researchers
124
160
 
125
161
  ## Quick Start
126
162
 
163
+ > **Desktop App (Beta):** Want to skip the setup below? Download the latest `.dmg` (macOS) or `.exe` (Windows) installer from [GitHub Releases](https://github.com/OpenLAIR/dr-claw/releases) and run it directly. The desktop app is currently in beta — for a more stable experience, follow the full installation steps below.
164
+
127
165
  ### Prerequisites
128
166
 
129
167
  - [Node.js](https://nodejs.org/) v20 or higher (**v22 LTS recommended**, see `.nvmrc`)
@@ -135,7 +173,24 @@ Dr. Claw is a general-purpose AI research assistant designed to help researchers
135
173
 
136
174
  Cursor agent support is in progress and coming soon.
137
175
 
138
- ### Installation
176
+ ### Option 1: Run with npx (Recommended)
177
+
178
+ No cloning or manual setup required — just run:
179
+
180
+ ```bash
181
+ npx dr-claw
182
+ ```
183
+
184
+ Or install globally for repeated use:
185
+
186
+ ```bash
187
+ npm install -g dr-claw
188
+ dr-claw
189
+ ```
190
+
191
+ Then open your browser at `http://localhost:3001` to create your account and start using Dr. Claw.
192
+
193
+ ### Option 2: Install from Source (For Development)
139
194
 
140
195
  1. **Clone the repository:**
141
196
  ```bash
@@ -163,7 +218,7 @@ Need custom ports, auth, or workspace settings? See [docs/configuration.md](docs
163
218
  npm run dev
164
219
  ```
165
220
 
166
- Then create your account via the bowser `http://localhost:5173`.
221
+ Then create your account via the browser `http://localhost:5173`.
167
222
 
168
223
  5. **Use the application**
169
224
 
@@ -171,12 +226,18 @@ There are two ways to interact with Dr. Claw: the **frontend UI** workflow or th
171
226
 
172
227
  #### Option A: Frontend UI
173
228
 
174
- Open your browser at `http://localhost:5173` (or the port you configured in `.env`).
229
+ <details>
230
+ <summary><strong>Open the web UI in your browser</strong></summary>
175
231
 
232
+ Open your browser at `http://localhost:5173` (or the port you configured in `.env`).
176
233
 
234
+ </details>
177
235
 
178
236
  #### Option B: Terminal Only
179
237
 
238
+ <details>
239
+ <summary><strong>Use the CLI harness with your preferred agent</strong></summary>
240
+
180
241
  <p align="center">
181
242
  <img src="public/screenshots/terminal_example1.png" alt="Terminal workflow example" width="800">
182
243
  </p>
@@ -217,10 +278,13 @@ Skills from `dr-claw/skills/` are automatically symlinked into each project's `.
217
278
  > Read .claude/skills/inno-experiment-analysis/SKILL.md and follow it to analyze my results.
218
279
  ```
219
280
 
220
-
281
+ </details>
221
282
 
222
283
  #### Option C: OpenRouter Terminal Chat
223
284
 
285
+ <details>
286
+ <summary><strong>Lightweight terminal chat with any OpenRouter model</strong></summary>
287
+
224
288
  For a lightweight terminal-only experience using any [OpenRouter](https://openrouter.ai/) model, use the built-in `dr-claw chat` command. No browser or UI required — just an interactive agentic session with full tool-calling capabilities (file I/O, shell, grep, glob, web search/fetch).
225
289
 
226
290
  ```bash
@@ -240,261 +304,246 @@ node server/cli.js chat --model anthropic/claude-sonnet-4 --key sk-or-your-key
240
304
  | Flag | Description |
241
305
  |------|-------------|
242
306
  | `--model <slug>` | OpenRouter model slug (e.g., `moonshotai/kimi-k2.5`, `anthropic/claude-sonnet-4`, `deepseek/deepseek-r1`) |
243
- | `--key <key>` | OpenRouter API key (defaults to `OPENROUTER_API_KEY` env var) |
307
+ | `--key <key>` | OpenRouter API key (defaults to `OPENROUTER_API_KEY` env var). Prefer the env var over `--key` to avoid exposing secrets in shell history. |
244
308
 
245
309
  Browse all available models at [openrouter.ai/models](https://openrouter.ai/models).
246
310
 
311
+ </details>
247
312
 
313
+ #### Option D: Desktop App
248
314
 
249
- If agent web search does not work later, see [Troubleshooting Web Search](#troubleshooting-web-search) below.
250
-
251
- ## OpenClaw Integration
252
-
253
- This section is written for **new users integrating OpenClaw with Dr. Claw for the first time**. The goal is not to expose every detail. The goal is to get a reliable first integration running quickly:
315
+ <details>
316
+ <summary><strong>Run as a standalone desktop application (macOS & Windows)</strong></summary>
254
317
 
255
- - OpenClaw can see which Dr. Claw projects exist
256
- - OpenClaw can find sessions waiting for user input
257
- - OpenClaw can reply into a chosen session so Dr. Claw keeps going
258
- - OpenClaw can summarize project / portfolio progress and recommend what to focus on next
318
+ ```bash
319
+ # Development mode (launches Electron with hot reload)
320
+ npm run desktop:dev
259
321
 
260
- The clean mental model is:
261
- - **Dr. Claw**: owns the real projects, sessions, pipelines, artifacts, and execution
262
- - **`drclaw` CLI**: exposes that state through a stable local control surface exposed primarily as `drclaw`
263
- - **OpenClaw**: acts as the user-facing secretary on mobile, chat, or voice
322
+ # Build distributable installer (.dmg / .exe)
323
+ npm run desktop:dist
324
+ ```
264
325
 
265
- ### Fastest path for new users
326
+ For details on the desktop architecture, IPC bridge, and CI/CD release process, see [electron/README.md](electron/README.md).
266
327
 
267
- If you only want the shortest successful path, do these 5 things:
328
+ </details>
268
329
 
269
- 1. Start Dr. Claw
270
- 2. Install the `drclaw` CLI
271
- 3. Give OpenClaw local shell / `exec` access
272
- 4. Install the provided OpenClaw skill
273
- 5. Make `chat waiting` and `digest portfolio` work end-to-end
330
+ If agent web search does not work later, see [Troubleshooting Web Search](#troubleshooting-web-search) below.
274
331
 
275
- Once those two commands work, OpenClaw already behaves like a usable research secretary.
332
+ ## OpenClaw Integration
333
+ <details>
334
+ <summary><span style="font-size: 1.17em; font-weight: 600;">Turn Dr. Claw into a mobile-ready, voice-friendly research secretary</span></summary>
276
335
 
277
- ### Step 0: confirm the prerequisites
336
+ > OpenClaw connects to Dr. Claw through the `drclaw` CLI, giving you project control, smart digests, and proactive notifications — all from your phone or chat app.
278
337
 
279
- Before integrating, make sure:
280
- - you can already run Dr. Claw locally
281
- - you already have at least one project, or can create one under `~/vibelab/...`
282
- - you have configured at least one execution backend such as Claude Code, Gemini CLI, or Codex
283
- - your OpenClaw instance is allowed to run local tools
338
+ ### Architecture
284
339
 
285
- If those are not true yet, get Dr. Claw itself working first.
340
+ ```
341
+ ┌─────────────────────────────────────────────────────────────┐
342
+ │ User (mobile / chat / voice) │
343
+ │ ↕ │
344
+ │ OpenClaw ── secretary layer ──────────────────────────┐ │
345
+ │ │ runs local `drclaw ...` receives push msgs │ │
346
+ │ ↓ ↑ │ │
347
+ │ drclaw CLI ── stable control plane ──────────────┐ │ │
348
+ │ │ JSON + openclaw.* schema WebSocket │ │ │
349
+ │ ↓ │ │ │ │
350
+ │ Dr. Claw Server Watcher ────┘ │ │
351
+ │ (projects, sessions, pipelines, artifacts) │ │
352
+ └─────────────────────────────────────────────────────────────┘
353
+ ```
286
354
 
287
- ### Step 1: start and verify the Dr. Claw server
355
+ The integration has three layers:
288
356
 
289
- From the repo root:
357
+ | Layer | What it does |
358
+ |-------|-------------|
359
+ | **Control plane** | OpenClaw executes `drclaw --json ...` commands locally |
360
+ | **Structured contract** | JSON responses carry a versioned `openclaw.*` schema payload |
361
+ | **Proactive delivery** | An event-driven watcher pushes important changes to Feishu / Lark |
290
362
 
291
- ```bash
292
- npm install
293
- npm run dev
294
- ```
363
+ ---
295
364
 
296
- In another terminal:
365
+ ### Quick Start (6 steps)
297
366
 
298
- ```bash
299
- drclaw --json auth status
300
- drclaw server status
301
- ```
367
+ <details>
368
+ <summary><strong>Prerequisites</strong></summary>
302
369
 
303
- Use `auth status` as the primary reachability check. If it returns JSON, the server is reachable.
370
+ - Dr. Claw server running locally (`npm run dev` or `drclaw server on`)
371
+ - At least one project and one execution backend (Claude Code, Gemini CLI, or Codex)
372
+ - OpenClaw with local shell / `exec` capability
373
+ - *(Optional)* Feishu / Lark channel access for push notifications
304
374
 
305
- `drclaw server status` only reports the daemon launched by `drclaw server on`. If you started the app manually with `npm run dev`, it may still show `STOPPED` even though `http://localhost:3001` is working.
375
+ </details>
306
376
 
307
- If you want Dr. Claw to manage the background process for you:
377
+ **1. Start the server**
308
378
 
309
379
  ```bash
310
- drclaw server on
380
+ npm install && npm run dev # or: drclaw server on
381
+ drclaw --json auth status # verify reachability
311
382
  ```
312
383
 
313
- ### Step 2: install and verify the `drclaw` CLI
384
+ > `drclaw server status` only reports the daemon from `drclaw server on`. If you started Dr. Claw with `npm run dev`, it may show `STOPPED` even though `http://localhost:3001` is working — use `auth status` as the real check.
314
385
 
315
- From the repo root:
386
+ **2. Install the CLI**
316
387
 
317
388
  ```bash
318
389
  pip install -e ./agent-harness
390
+ drclaw --help
319
391
  ```
320
392
 
321
- Then verify:
393
+ If `drclaw` is not on your PATH:
322
394
 
323
395
  ```bash
324
- drclaw --help
325
- drclaw --json auth status
326
- drclaw --json projects list
396
+ PYTHONPATH=agent-harness python3 -m cli_anything.drclaw.drclaw_cli --help
327
397
  ```
328
398
 
329
- A good sequence is:
330
- - `drclaw --json auth status` should return JSON if the server is reachable
331
- - `drclaw --json projects list` will work only after login or if you already have a saved token
332
-
333
- If `projects list` returns `Not logged in`, authenticate first:
399
+ **3. Authenticate**
334
400
 
335
401
  ```bash
336
- drclaw auth login --username <username> --password <password>
402
+ drclaw auth login --username <user> --password <pass>
403
+ drclaw --json projects list # should return your projects
337
404
  ```
338
405
 
339
- ### Step 3: give OpenClaw local CLI execution capability
340
-
341
- The key integration is not a deep API bridge. The key is that **OpenClaw can directly execute `drclaw ...` locally**.
342
-
343
- At minimum, OpenClaw should be able to run commands such as:
406
+ **4. Link OpenClaw**
344
407
 
345
408
  ```bash
346
- drclaw --json chat waiting
347
- drclaw --json digest portfolio
348
- drclaw --json chat reply --project <project> --session <session-id> -m "<message>"
349
- drclaw --json workflow continue --project <project> --session <session-id> -m "<instruction>"
409
+ drclaw install --server-url http://localhost:3001
410
+ # with push channel:
411
+ drclaw install --server-url http://localhost:3001 --push-channel feishu:<chat_id>
350
412
  ```
351
413
 
352
- Recommended approach:
353
- - enable local `exec` / shell for OpenClaw
354
- - prefer direct local CLI calls
355
- - avoid building an extra proxy layer at the beginning
414
+ This copies the Dr. Claw skill, installs wrapper scripts, and saves the server URL and CLI path.
356
415
 
357
- The thinner this layer is, the easier it is to debug and keep reliable.
416
+ **5. Verify the core loop**
358
417
 
359
- ### Step 4: link OpenClaw in one command
360
-
361
- Run:
418
+ Run these four commands from OpenClaw — if they all return valid JSON, the integration is live:
362
419
 
363
420
  ```bash
364
- drclaw install --server-url http://localhost:3001
421
+ drclaw --json projects list # resolve projects
422
+ drclaw --json chat waiting # find sessions needing input
423
+ drclaw --json digest portfolio # cross-project summary
424
+ drclaw --json workflow status --project <project> # single-project status
365
425
  ```
366
426
 
367
- This will automatically:
368
- - copy the Dr. Claw skill into `~/.openclaw/workspace/skills/drclaw`
369
- - install the helper scripts OpenClaw uses for serialized local turns
370
- - save the Dr. Claw server URL for future CLI / OpenClaw use
371
- - remember the local `drclaw` executable path
372
-
373
- If you also want to save the default push channel during setup:
427
+ **6. Reply into a session**
374
428
 
375
429
  ```bash
376
- drclaw install --server-url http://localhost:3001 --push-channel feishu:<chat_id>
430
+ drclaw --json chat waiting # pick a session
431
+ drclaw --json chat reply --project <proj> --session <sid> -m “Continue with option B.”
432
+ drclaw --json chat waiting --project <proj> # confirm it cleared
377
433
  ```
378
434
 
379
- The compatibility form is still available:
435
+ For multi-turn discussion within the same project:
380
436
 
381
437
  ```bash
382
- drclaw openclaw install --server-url http://localhost:3001
438
+ drclaw --json chat project --project <proj> --session <sid> -m “Summarize blockers.”
383
439
  ```
384
440
 
385
- ### Step 5: make two core commands work first
441
+ ---
386
442
 
387
- For a new user, do not start with everything. Start with these two:
443
+ ### Structured Schema
388
444
 
389
- 1. **Find which sessions are waiting for user input**
390
- ```bash
391
- drclaw --json chat waiting
392
- ```
445
+ Machine-facing commands return a versioned `openclaw` field. Current families:
393
446
 
394
- 2. **Get portfolio-wide progress and recommendations**
395
- ```bash
396
- drclaw --json digest portfolio
397
- ```
447
+ | Schema | Purpose |
448
+ |--------|---------|
449
+ | `openclaw.turn.v1` | Single chat turn summary |
450
+ | `openclaw.project.v1` | Project digest with status, counts, and next actions |
451
+ | `openclaw.portfolio.v1` | Cross-project overview with recommendations |
452
+ | `openclaw.daily.v1` | Daily digest |
453
+ | `openclaw.report.v1` | Mobile-ready report payload |
454
+ | `openclaw.event.v1` | Watcher event with derived signals |
398
455
 
399
- If OpenClaw can call both commands and summarize the result back to the user, your minimum viable integration is already working.
456
+ **Client rendering tips:**
400
457
 
401
- ### Step 6: add the reply loop
458
+ | When you need to... | Read this field |
459
+ |----------------------|-----------------|
460
+ | Decide whether to interrupt the user | `openclaw.decision.needed` |
461
+ | Show quick actions or voice suggestions | `openclaw.next_actions` |
462
+ | Render a compact summary | `openclaw.turn.summary` or `openclaw.focus` |
463
+ | Handle watcher notifications | `openclaw.event.v1.event.signals` |
402
464
 
403
- The next common user action is: see a waiting session, then ask OpenClaw to answer it.
465
+ > Always prefer the `openclaw` payload over raw `reply` text when both are present.
404
466
 
405
- The fixed pattern is:
467
+ Full contract: [`agent-harness/cli_anything/drclaw/SCHEMA.md`](agent-harness/cli_anything/drclaw/SCHEMA.md)
406
468
 
407
- 1. Find waiting sessions:
408
- ```bash
409
- drclaw --json chat waiting
410
- ```
469
+ ---
411
470
 
412
- 2. Let the user choose a project and session
471
+ ### Proactive Watcher
413
472
 
414
- 3. Send the reply:
415
- ```bash
416
- drclaw --json chat reply --project <project> --session <session-id> -m "<message>"
417
- ```
473
+ The watcher is event-driven — it subscribes to Dr. Claw WebSocket events and only notifies on attention-worthy changes.
418
474
 
419
- 4. Immediately re-check whether it is still waiting:
420
475
  ```bash
421
- drclaw --json chat waiting --project <project>
422
- ```
423
-
424
- If the user wants to keep discussing the same project/session, switch to:
476
+ # Configure push channel
477
+ drclaw openclaw configure --push-channel feishu:<chat_id>
425
478
 
426
- ```bash
427
- drclaw --json chat project --project <project> --session <session-id> -m "<instruction>"
479
+ # Manage the watcher
480
+ drclaw --json openclaw-watch on --to feishu:<chat_id>
481
+ drclaw --json openclaw-watch status
482
+ drclaw --json openclaw-watch off
428
483
  ```
429
484
 
430
- That is the better pattern for multi-turn project-scoped discussion.
431
-
432
- ### Step 7: recommended fixed operating patterns
485
+ **How it works:**
433
486
 
434
- Recommended OpenClaw flows:
435
-
436
- 1. **User asks: what needs my attention right now?**
437
- ```bash
438
- drclaw --json digest portfolio
439
487
  ```
440
-
441
- 2. **User asks: which sessions are waiting for me?**
442
- ```bash
443
- drclaw --json chat waiting
488
+ WebSocket event → project resolution → snapshot diff → signal derivation
489
+ ↓
490
+ dedup (6h TTL) ← stable signature + signal kinds
491
+ ↓
492
+ openclaw agent --deliver → Feishu / Lark summary
493
+ (fallback: plain bridge push)
444
494
  ```
445
495
 
446
- 3. **User asks: what is the latest state of this project?**
447
- ```bash
448
- drclaw --json projects latest <project>
449
- drclaw --json projects progress <project>
450
- ```
496
+ **Derived signals:**
451
497
 
452
- 4. **User says: reply to this session and keep it moving**
453
- ```bash
454
- drclaw --json chat reply --project <project> --session <session-id> -m "<message>"
455
- ```
498
+ | Signal | Meaning |
499
+ |--------|---------|
500
+ | `human_decision_needed` | Agent requests permission for a tool call |
501
+ | `waiting_for_human` | Session is blocked on user input |
502
+ | `blocker_detected` | A task transitioned to blocked state |
503
+ | `blocker_cleared` | A previously blocked task is now unblocked |
504
+ | `task_completed` | One or more tasks finished |
505
+ | `next_task_changed` | The recommended next task has changed |
506
+ | `attention_needed` | General attention signal |
507
+ | `session_aborted` | A session execution was aborted |
456
508
 
457
- 5. **User says: I just had a new idea, create a project and help me shape it**
458
- ```bash
459
- drclaw --json projects idea /absolute/path/to/project --name "<display-name>" --idea "<idea text>"
460
- ```
509
+ State and logs:
510
+ - `~/.drclaw/openclaw-watcher-state.json`
511
+ - `~/.drclaw/logs/openclaw-watcher.log`
461
512
 
462
- ### Step 8: prefer serialized local turns
513
+ ---
463
514
 
464
- When OpenClaw repeatedly runs `openclaw agent --local`, use the serialized wrapper to avoid session-lock collisions:
515
+ ### Serialized Local Turns
465
516
 
466
- ```bash
467
- agent-harness/skills/dr-claw/scripts/openclaw_drclaw_turn.sh
468
- ```
469
-
470
- Example:
517
+ When OpenClaw calls `openclaw agent --local` repeatedly, use the wrapper script to avoid session-lock collisions:
471
518
 
472
519
  ```bash
473
- openclaw_drclaw_turn.sh --json -m "Use your exec tool to run `drclaw --json digest portfolio`. Return only raw stdout."
520
+ agent-harness/skills/dr-claw/scripts/openclaw_drclaw_turn.sh \
521
+ --json -m “Use your exec tool to run \`drclaw --json digest portfolio\`. Return only raw stdout.”
474
522
  ```
475
523
 
476
- In practice: **when OpenClaw calls Dr. Claw locally, stable serial turns are better than risky parallel turns.**
524
+ > **Rule of thumb:** stable serial turns are always better than risky parallel turns.
525
+
526
+ ---
477
527
 
478
- ### Step 9: how to know the integration is successful
528
+ ### Integration Checklist
479
529
 
480
- A new user can consider the integration complete once all 4 are true:
481
- - OpenClaw can list Dr. Claw projects
482
- - OpenClaw can identify waiting sessions
483
- - OpenClaw can successfully send one reply into a chosen session
484
- - OpenClaw can produce one `digest portfolio` style summary with recommendations
530
+ Your OpenClaw integration is complete when all of these work:
485
531
 
486
- At that point, OpenClaw is no longer just a chat surface. It becomes Dr. Claw's mobile secretary.
532
+ - [ ] OpenClaw can list Dr. Claw projects
533
+ - [ ] OpenClaw can identify waiting sessions
534
+ - [ ] OpenClaw can reply into a chosen session
535
+ - [ ] OpenClaw can produce a `digest portfolio` summary
536
+ - [ ] OpenClaw receives at least one watcher-driven push in Feishu / Lark
487
537
 
488
- ### Step 10: what end users can say afterwards
538
+ At that point, OpenClaw becomes Dr. Claw's mobile secretary. Users can speak naturally:
489
539
 
490
- After setup, users should be able to talk to OpenClaw naturally:
491
- - “Check which Dr. Claw projects are waiting for my reply.”
492
- - “Summarize the last message and current progress of this project.”
493
- - “Reply to this session: continue with option B and report back when finished.”
494
- - “Summarize recent experiment progress across projects and recommend what I should focus on today.”
495
- - “I just had a new idea. Create a Dr. Claw project, discuss it with me, refine it, and start execution planning.”
540
+ > *”Which projects are waiting for my reply?”*
541
+ > *”Summarize this project's progress and blockers.”*
542
+ > *”Reply to that session: go with option B and report back.”*
543
+ > *”Give me a cross-project summary and what to focus on today.”*
544
+ > *”I have a new idea — create a project, discuss it with me, and start planning.”*
496
545
 
497
- The goal is not to replace Dr. Claw. The goal is to make Dr. Claw **callable, reportable, steerable, and remotely manageable** through OpenClaw.
546
+ </details>
498
547
 
499
548
  ## Configuration
500
549
 
@@ -510,11 +559,12 @@ For the full environment reference and deployment notes, see [docs/configuration
510
559
 
511
560
  Auto Research email notifications are configured inside the app at **Settings → Email**. The v1 flow supports Claude Code, Codex, Gemini, and OpenRouter engines for unattended task execution, and interrupted runs are automatically reconciled so they do not remain stuck in `running`.
512
561
 
513
- ## OpenRouter
562
+ <details>
563
+ <summary><strong>OpenRouter Setup</strong></summary>
514
564
 
515
565
  [OpenRouter](https://openrouter.ai/) is integrated as a first-class provider, giving you access to **hundreds of models** (GPT-5, Claude, Gemini, DeepSeek, Llama, Mistral, Qwen, Kimi, and more) through a single API key.
516
566
 
517
- ### Setup
567
+ #### Setup
518
568
 
519
569
  1. Get an API key at [openrouter.ai/keys](https://openrouter.ai/keys).
520
570
  2. Set the key in one of three ways:
@@ -522,7 +572,7 @@ Auto Research email notifications are configured inside the app at **Settings
522
572
  - **`.env` file:** add `OPENROUTER_API_KEY=sk-or-...` to your project `.env`
523
573
  - **UI:** go to **Settings → OpenRouter** and paste your key
524
574
 
525
- ### Using OpenRouter in the UI
575
+ #### Using OpenRouter in the UI
526
576
 
527
577
  1. Open a project and go to **Chat**.
528
578
  2. Under **Choose Your AI Assistant**, click **OpenRouter**.
@@ -531,7 +581,7 @@ Auto Research email notifications are configured inside the app at **Settings
531
581
 
532
582
  OpenRouter is also available in **Auto Research** on the Project Dashboard — select it as the provider and pick any model.
533
583
 
534
- ### Using OpenRouter in the Terminal
584
+ #### Using OpenRouter in the Terminal
535
585
 
536
586
  No browser needed. The `dr-claw chat` CLI gives you a fully agentic terminal session:
537
587
 
@@ -545,7 +595,7 @@ node server/cli.js chat --model deepseek/deepseek-r1 --key sk-or-your-key
545
595
 
546
596
  The CLI supports the same tools as the UI (file I/O, shell, grep, glob, web search, web fetch, todo). Type your message and the agent will execute multi-step research tasks autonomously.
547
597
 
548
- ### Default Model
598
+ #### Default Model
549
599
 
550
600
  Set `OPENROUTER_MODEL` in `.env` to change the default model used when none is specified:
551
601
 
@@ -555,6 +605,8 @@ OPENROUTER_MODEL=moonshotai/kimi-k2.5
555
605
 
556
606
  If unset, the default is `anthropic/claude-sonnet-4`.
557
607
 
608
+ </details>
609
+
558
610
  <a id="research-lab-quick-example"></a>
559
611
 
560
612
  ## Research Lab — Quick Example
@@ -648,6 +700,29 @@ If you want Dr. Claw to execute the generated task list end-to-end for you, use
648
700
 
649
701
  </details>
650
702
 
703
+ <details>
704
+ <summary><strong>Optional — Configure Auto Research Hub</strong></summary>
705
+
706
+ Auto Research Hub (sidebar → **Auto Research**) lets you browse and configure third-party research tool packs. Three packs are available:
707
+
708
+ | Pack | Description | Dependencies |
709
+ |------|-------------|-------------|
710
+ | **ARIS** | End-to-end autonomous pipeline with cross-model adversarial review | MCP Reviewer required |
711
+ | **Autoresearch** | Goal-directed iteration engine with 9 subcommands | Zero dependencies |
712
+ | **DeepScientist** | 13-stage research OS (ICLR 2026) with 50+ templates | Zero dependencies |
713
+
714
+ **How to use:**
715
+
716
+ 1. Open **Auto Research** from the sidebar.
717
+ 2. Pick a pack and expand **Included Workflows** to see available slash commands.
718
+ 3. If the pack requires configuration (e.g. ARIS), expand **Configuration**, select an MCP Reviewer, enter your API key, and click **Auto Configure**.
719
+ 4. Go to **Chat**, click the **Auto Research** dropdown above the input box, select the pack and workflow.
720
+ 5. Enter your research topic — the agent executes the workflow end-to-end and writes results to your project.
721
+
722
+ > Zero-dependency packs (Autoresearch, DeepScientist) work out of the box — no configuration step needed.
723
+
724
+ </details>
725
+
651
726
  <a id="troubleshooting-web-search"></a>
652
727
  <details>
653
728
  <summary><strong>Step 4 — Troubleshooting Web Search</strong></summary>
@@ -725,6 +800,37 @@ These skills are discovered by the agent and can be applied as task-level assist
725
800
 
726
801
  </details>
727
802
 
803
+ ## Claude Code Plugin
804
+
805
+ If you use **Claude Code** as your primary coding agent and want Dr. Claw's research pipeline directly in your terminal — without running the full web UI — check out the standalone Claude Code plugin:
806
+
807
+ **[`OpenLAIR/dr-claw-plugin-cc`](https://github.com/OpenLAIR/dr-claw-plugin-cc)**
808
+
809
+ The plugin provides 4 slash commands (`/drclaw:setup`, `/drclaw:status`, `/drclaw:run`, `/drclaw:reset`) that let you initialize research projects, track progress across all 5 pipeline stages, and execute tasks — all from within a Claude Code session.
810
+
811
+ ### Install
812
+
813
+ Inside any Claude Code session, run:
814
+
815
+ ```
816
+ /plugin marketplace add OpenLAIR/dr-claw-plugin-cc
817
+ /plugin install dr-claw@dr-claw
818
+ /reload-plugins
819
+ ```
820
+
821
+ The plugin is installed and will be available in future sessions. Run `/drclaw:setup` to initialize a new research project.
822
+
823
+ > **Scope options:** By default the plugin is installed to your user scope (available in all projects). Add `--scope project` to install it for a specific project only, or `--scope local` for a machine-local install.
824
+
825
+ ### What's Included
826
+
827
+ - **60+ bundled skills** — a curated subset of Dr. Claw's skill library covering literature survey, idea generation, experiment development, paper writing, and more
828
+ - **3 project templates** — Method/Model, Dataset/Benchmark, and Position Paper, each with a pre-configured task pipeline
829
+ - **Auto-detection** — the plugin detects existing pipeline projects on session start and shows your current progress
830
+ - **Same data format** — projects created with the plugin use the same `research_brief.json` and `tasks.json` schemas as the full Dr. Claw workspace, so you can switch between them
831
+
832
+ > **Note:** The plugin bundles a snapshot of skills from this repository. Skills are synchronized manually — see the plugin repo's README for details.
833
+
728
834
  ## Additional Details
729
835
  <details>
730
836
  <summary><span style="font-size: 1.17em; font-weight: 600;">Mobile, architecture, and security notes</span></summary>
@@ -860,6 +966,9 @@ If you find Dr. Claw useful in your research, please cite:
860
966
  - **[AI Researcher](https://github.com/HKUDS/AI-Researcher/)** (HKUDS) — Inspiration for research workflow and agentic research.
861
967
  - **[Vibe-Scholar](https://github.com/Mr-Tieguigui/Vibe-Scholar)** — Inspiration for the AI-native research workspace direction.
862
968
  - **[autoresearch](https://github.com/karpathy/autoresearch)** — Inspiration for autonomous research orchestration and end-to-end execution.
969
+ - **[Autoresearch (uditgoenka)](https://github.com/uditgoenka/autoresearch)** — Autonomous goal-directed iteration engine, integrated as a tool pack in Auto Research Hub.
970
+ - **[ARIS](https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep)** — End-to-end autonomous research pipeline with cross-model adversarial review, integrated as a tool pack in Auto Research Hub.
971
+ - **[DeepScientist](https://github.com/ResearAI/DeepScientist)** — 13-stage autonomous research OS from ICLR 2026, integrated as a tool pack in Auto Research Hub.
863
972
 
864
973
  ## Support & Community
865
974