dsh-research-desk 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  DeepSeek Harness 插件:给 agent 和研究者一个**就在侧栏里的科研工作台**——检索文献、维护阅读库、抓全文做带锚点的问答、推可证伪选题、写多视角综述、在受限目录里跑验证脚本、整库导出。
4
4
  **每一条引文都回到原文逐字核对,对不上就剔除。**
5
5
 
6
- - 包名 `dsh-research-desk`,版本 0.2.0,MIT,零运行时依赖,零构建步骤
6
+ - 包名 `dsh-research-desk`,版本 0.3.1,MIT,零运行时依赖,零构建步骤
7
7
  - 宿主要求:DSH `>=0.2.1-rc.5 <0.3.0`,Node `>=22`
8
8
  - 交付渠道:GitHub + npm + dshmarket(索引条目见 `index.json`)
9
9
 
@@ -34,7 +34,7 @@ DeepSeek Harness 插件:给 agent 和研究者一个**就在侧栏里的科研
34
34
 
35
35
  - **输入**:检索式,加三个数据源勾选(arXiv / Europe PMC / OpenAlex);面板固定按单源 12 条请求。
36
36
  - **输出**:结果卡片列表,每张卡带来源 / 年份 / venue / 引用数 chip、摘要、「加入文献库」按钮与原文链接。
37
- - **限制**:三个源都免密钥;单源条数上限由设置 `maxResults` 决定(默认 15,宿主端夹在 1–40);某个源失败不阻断整体,失败原因出现在返回的 `errors` 里;只覆盖这三个开放源,不接付费库。
37
+ - **限制**:三个源都免密钥;单源条数上限由设置 `maxResults` 决定(默认 15,宿主端夹在 1–40);某个源失败不阻断整体,失败原因出现在返回的 `errors` 里;只覆盖这三个开放源,不接付费库。 把 `sources` 设为空数组就真的一个源都不检索(早期版本会把空数组当成没给、退回默认三源,已修)。
38
38
 
39
39
  ### 2.2 文献库(library)
40
40
 
@@ -92,7 +92,7 @@ DeepSeek Harness 插件:给 agent 和研究者一个**就在侧栏里的科研
92
92
 
93
93
  ### 3.1 dshmarket 市场安装(推荐)
94
94
 
95
- 在 dshmarket 的插件市场里找到「科研工作台 / Research Desk」,一键安装。dshmarket 读取的正是精选列表 awesome-dsh-plugin 里的索引条目,版本与 npm 上的 `dsh-research-desk` 对应(当前 0.2.0)。
95
+ 在 dshmarket 的插件市场里找到「科研工作台 / Research Desk」,一键安装。dshmarket 读取的正是精选列表 awesome-dsh-plugin 里的索引条目,版本与 npm 上的 `dsh-research-desk` 对应(当前 0.3.1)。
96
96
 
97
97
  ### 3.2 npm 规格名安装
98
98
 
@@ -118,7 +118,7 @@ https://cdn.jsdelivr.net/gh/stallenlu/dsh-research-desk@main/index.json
118
118
  "format": 1,
119
119
  "title": { "en": "Research Desk", "zh": "科研工作台" },
120
120
  "description": { "en": "...", "zh": "..." },
121
- "metadata": { "categories": ["research", "literature", "productivity"] },
121
+ "metadata": { "categories": ["tools", "docs"] },
122
122
  "plugins": [
123
123
  {
124
124
  "name": "dsh-research-desk",
@@ -127,11 +127,11 @@ https://cdn.jsdelivr.net/gh/stallenlu/dsh-research-desk@main/index.json
127
127
  "author": "stallenlu",
128
128
  "homepage": "https://github.com/stallenlu/dsh-research-desk",
129
129
  "repository": { "url": "https://github.com/stallenlu/dsh-research-desk" },
130
- "metadata": { "category": "research", "keywords": ["research", "literature", "arxiv", "pubmed", "openalex", "科研", "文献"] },
130
+ "metadata": { "category": "tools", "keywords": ["research", "literature", "arxiv", "pubmed", "openalex", "科研", "文献"] },
131
131
  "versions": [
132
132
  {
133
- "version": "0.2.0",
134
- "publishTimestamp": "2026-11-18T01:00:00.000Z",
133
+ "version": "0.3.1",
134
+ "publishTimestamp": "2026-11-18T01:40:00.000Z",
135
135
  "source": { "type": "npm" },
136
136
  "engines": { "dsh": ">=0.2.1-rc.5 <0.3.0" }
137
137
  }
@@ -248,6 +248,8 @@ Agent 侧只有一个工具:`research_desk`(超时 300 秒,标记为并发
248
248
 
249
249
  参数取值:`sources` 是 `arxiv` / `europepmc` / `openalex`;`perspectives` 是 `methodology` / `evidence` / `contradictions` / `gaps` / `applications`;`runtime` 是 `python` / `node`;`kind` 是 `one-sample` / `two-sample-welch` / `paired`;`formats` 是 `md` / `bib` / `json`;`maxResults` 1–40(默认 12)。
250
250
 
251
+ 已知修复:`library` 动作在文献库非空时曾因消息拼接出错而崩溃,现已修好;`sources` 设为空数组现在真的会一个源都不检索。
252
+
251
253
  调用示例:
252
254
 
253
255
  ```json
@@ -268,7 +270,7 @@ Agent 侧只有一个工具:`research_desk`(超时 300 秒,标记为并发
268
270
 
269
271
  `lib/mcp.mjs` 同时提供一个 stdio 传输的 MCP server,让别的 agent 也能用同一份文献库。
270
272
 
271
- - 协议版本 `2024-11-05`,服务名 `dsh-research-desk`,版本 `0.2.0`,能力声明为 `tools`。
273
+ - 协议版本 `2024-11-05`,服务名 `dsh-research-desk`,版本 `0.3.1`,能力声明为 `tools`。
272
274
  - stdout 只走 JSON-RPC,诊断日志走 stderr;`notifications/initialized` 不回包。
273
275
  - 与桌面面板共用同一个 `state.json` 与同一套 `applyOps` 写路径,**MCP 写入的内容在面板里立刻可见**。
274
276
 
@@ -280,20 +282,27 @@ Agent 侧只有一个工具:`research_desk`(超时 300 秒,标记为并发
280
282
  | `research_library_remove` | `paperId`(必填,取自 `research_library_list`) |
281
283
  | `research_export` | `format`(`markdown`/`json`/`bibtex`,缺省 `markdown`)、`paperIds`(缺省导出全部) |
282
284
 
283
- 启动命令(在插件目录里执行,已实测可用):
285
+ 启动命令(包已全局安装时用 bin 名,否则直接跑入口脚本):
284
286
 
285
287
  ```bash
286
- node -e "import('./lib/mcp.mjs').then(m => m.runMcpStdio())"
288
+ dsh-research-desk-mcp
289
+ node bin/dsh-research-desk-mcp.mjs
290
+ ```
291
+
292
+ 包也导出了 MCP 子路径,可以直接 `import`:
293
+
294
+ ```js
295
+ import { runMcpStdio } from 'dsh-research-desk/mcp'
287
296
  ```
288
297
 
289
- 挂到别的 MCP 客户端上,用文件绝对路径最省事(`package.json` 的 `exports` 只暴露 `.` 与 `./client`,没有导出 `lib/mcp.mjs` 子路径):
298
+ 挂到别的 MCP 客户端上:
290
299
 
291
300
  ```json
292
301
  {
293
302
  "mcpServers": {
294
303
  "dsh-research-desk": {
295
304
  "command": "node",
296
- "args": ["-e", "import('file:///ABS/PATH/dsh-research-desk/lib/mcp.mjs').then(m => m.runMcpStdio())"]
305
+ "args": ["/ABS/PATH/dsh-research-desk/bin/dsh-research-desk-mcp.mjs"]
297
306
  }
298
307
  }
299
308
  }
@@ -344,15 +353,15 @@ node -e "import('./lib/mcp.mjs').then(m => m.runMcpStdio())"
344
353
 
345
354
  ## 10. 开发与测试
346
355
 
347
- 目录布局一行说明:`lib/` 是全部实现(host / search / qa / review / runner / export / desk / store / settings / stats / llm / mcp / client),`test/` 是 `node:test` 单测与两个联网探针脚本,`docs/` 是本文档目录,`index.json` 是 dshmarket 索引条目。
356
+ 目录布局一行说明:`lib/` 是全部实现(host / search / qa / review / runner / export / desk / store / settings / stats / llm / mcp / client),`bin/` 是 MCP stdio 入口脚本,`test/` 是 `node:test` 单测与两个联网探针脚本,`docs/` 是本文档目录,`index.json` 是 dshmarket 索引条目。
348
357
 
349
358
  Windows 上 `node --test` 必须显式给出文件路径(不能只写目录),一次跑完全部单测:
350
359
 
351
360
  ```bash
352
- node --test test/desk.test.mjs test/export.test.mjs test/mcp.test.mjs test/review.test.mjs test/runner.test.mjs test/search.test.mjs test/settings.test.mjs test/stats.test.mjs
361
+ node --test test/desk.test.mjs test/export.test.mjs test/host.test.mjs test/mcp.test.mjs test/bin.test.mjs test/review.test.mjs test/runner.test.mjs test/search.test.mjs test/settings.test.mjs test/stats.test.mjs
353
362
  ```
354
363
 
355
- 共 88 个用例,当前全绿。两个探针脚本会真实联网,用来验证上游连通性:
364
+ 共 115 个用例,当前全绿。
356
365
 
357
366
  ```bash
358
367
  node test/live-probe.mjs
package/index.json CHANGED
@@ -52,8 +52,8 @@
52
52
  },
53
53
  "versions": [
54
54
  {
55
- "version": "0.3.0",
56
- "publishTimestamp": "2026-11-18T01:30:00.000Z",
55
+ "version": "0.3.1",
56
+ "publishTimestamp": "2026-11-18T01:40:00.000Z",
57
57
  "source": {
58
58
  "type": "npm"
59
59
  },
package/lib/mcp.mjs CHANGED
@@ -17,7 +17,7 @@ import { cleanText, isObject } from './util.mjs'
17
17
 
18
18
  const PROTOCOL_VERSION = '2024-11-05'
19
19
  const SERVER_NAME = 'dsh-research-desk'
20
- const SERVER_VERSION = '0.3.0'
20
+ const SERVER_VERSION = '0.3.1'
21
21
  const DATA_DIR_NAME = 'research-desk'
22
22
 
23
23
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-research-desk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "DeepSeek Harness plugin: a research desk for literature discovery, anchored reading, multi-perspective review, hypothesis tracking, sandboxed verification runs and export.",
6
6
  "homepage": "https://github.com/stallenlu/dsh-research-desk#readme",