dsh-molbio-tools 0.25.0 → 0.25.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/CHANGELOG.md CHANGED
@@ -10,6 +10,58 @@
10
10
  改为按**包名**引用后模块缓存问题随之消失——没有拷贝,也就没有需要保持同步的版本目录。
11
11
  下文历史条目里出现的 `vN` 目录保持原样,作为当时的记录。
12
12
 
13
+ ## [0.25.1] — 2026-11-12(DSH 0.2.2-rc.2 适配:preset 吸收三处上游变更;契约守卫兼容压缩产物)
14
+
15
+ **工具数不变(64),benchmark 不变(65 题)。** 0.25.0 的验收基线是 **0.2.2-rc.1**;这一版把
16
+ 基线推到 **0.2.2-rc.2**,并在实际安装的桌面运行时上重跑了整套守卫。
17
+
18
+ ### 1. 为什么"rc.2 在 `engines.dsh` 范围内"仍然不是适配
19
+
20
+ `engines.dsh` 的 `>=0.2.1-rc.2 <0.3.0-0` 覆盖 rc.2,但 rc.2 的上游 `standard` 预设变了三处。
21
+ 本仓库的 preset 是上游行清单的逐字副本,所以三处都必须照抄(否则 `preset-health` 报 drift,
22
+ molbio-lab 还会静默缺少这些能力):
23
+
24
+ - 新增 `tool-office` 行(`@deepseek-ai/dsh-tool-office`)——预设此前**没有 Office 工具**;
25
+ - `skill-filesystem` 增加 `config.customSkillDirs`,指向 `@deepseek-ai/dsh-agent-preset/skills`;
26
+ - `tool-subagent-control` 增加 `config.interrupt: false`。
27
+
28
+ 上游 `standard.patch.yml` 从 6858 B(sha256 `3006cc…`)变为 7286 B(sha256 `e40bb192…`);
29
+ 桌面 `app.asar` 与 npm tarball 两份**逐字节一致**。preset 行数因此 29 → 30。
30
+
31
+ ### 2. `preset-health` 要学会校验未求值的 `!!js`
32
+
33
+ `customSkillDirs` 的值是 `!!js` 表达式,按 Loader 的方言解析后是 `{ __jsExpr }`,而不是字符串;
34
+ `skill-filesystem` 的 `Config` 会拒绝它。真实 Loader 在挂载前求值,守卫手里只有节点本身
35
+ (`baseUrl` / `ctx` / `dshHomePath` 只在挂载时存在)。`test/preset-health.mjs` 现在分别用
36
+ 字符串 / 数字 / 布尔占位符各校验一次,只有**都**不通过才判 `config-invalid`——形状错误仍然会失败,
37
+ 而 `preset-health` 在 rc.2 上 30 行全绿。
38
+
39
+ ### 3. `contract`:桌面版压缩产物造成的假红
40
+
41
+ 桌面运行时把客户端 bundle 压成 `x=>y`、模板串、无空格的形式,npm 包不是。0.25.0 的 `contract`
42
+ 在桌面 0.2.2-rc.2 上有 5 条以字符串不匹配失败,逐条核对后**契约全部在位**——
43
+ `useSessions(sessions=>sessions.byId[sessionId]?.cwd)`、`workspaceFiles.list(sessionId,path,signal)`、
44
+ `installScope("session",…)`、`slots.inject("tool.call.toolview")`、`key: "present"`、
45
+ `inject(key,callback)`、`this._core.specDynamic(key)`。断言改为匹配**调用**而不是某一种拼写;
46
+ npm 与桌面两份现在都是 17/17。
47
+
48
+ ### 4. 在真实安装上跑过的证据
49
+
50
+ 桌面 0.2.2-rc.2(内嵌 Node 24.21.0):临时 profile → HTTP 200(41 393 B,boot 图含
51
+ `dsh-molbio-tools/client.js`)→ `agentPresets/list` 列出 molbio-lab、无 `broken` →
52
+ `pluginInventory/list` 的 `tool-molbio` 为 `fiberPhase: "active"`。
53
+ `contract` 17 / `preset-health` 30 行 / `drift-probe` 16 项(15 个突变)/ `smoke` 64 工具 /
54
+ `bench:offline` 65 题全绿。
55
+
56
+ ### 5. 声明与版本
57
+
58
+ - 两个包 `dshReleases` 增加 `0.2.2-rc.2: compatible`;`engines.dsh` 不变。
59
+ - CI(`test.yml` / `release.yml`)钉 `@deepseek-ai/dsh@0.2.2-rc.2`。
60
+ - 根包 `0.25.0 → 0.25.1`;面板包 `0.1.11 → 0.1.12`(只改清单声明,`lib/client.js` 未变)。
61
+ - **兼容性后果**:`tool-office` 是 rc.2 才有的包,preset 写入该行后 molbio-lab 在 **0.2.2-rc.1 上不再可挂载**
62
+ (实测 `tool-office [unresolvable]: specifier does not resolve: MODULE_NOT_FOUND`);rc.1 用户应留在 0.25.0。
63
+ - 基线文档(store-evidence / maintainer / roadmap / history / workflow)同步到 rc.2。
64
+
13
65
  ## [0.25.0] — 2026-11-10(浏览器内 3D 结构预览:真实原子模型)
14
66
 
15
67
  **工具数不变(64),benchmark 不变(65 题 / 64 覆盖)。** 这一版把结构文件接进已有的
package/cordis.patch.yml CHANGED
@@ -82,6 +82,9 @@
82
82
  name: '@deepseek-ai/dsh-tool-schedule'
83
83
  - id: skill-filesystem
84
84
  name: '@deepseek-ai/dsh-skill-filesystem'
85
+ config:
86
+ customSkillDirs:
87
+ - !!js process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@deepseek-ai/dsh-agent-preset/package.json')), 'skills')
85
88
  - id: tool-skill
86
89
  name: '@deepseek-ai/dsh-tool-skill'
87
90
  - id: command-goal
@@ -134,6 +137,8 @@
134
137
  config:
135
138
  - id: tool-subagent-control
136
139
  name: '@deepseek-ai/dsh-tool-subagent-control'
140
+ config:
141
+ interrupt: false
137
142
  - id: tool-subagent
138
143
  name: '@deepseek-ai/dsh-tool-subagent'
139
144
  config:
@@ -165,6 +170,8 @@
165
170
  searchTimeoutMs: 60000
166
171
  - id: present
167
172
  name: '@deepseek-ai/dsh-tool-present'
173
+ - id: tool-office
174
+ name: '@deepseek-ai/dsh-tool-office'
168
175
  - id: tool-plugin-manager
169
176
  name: '@deepseek-ai/dsh-plugin-manager/tools'
170
177
  disabled: true
package/docs/history.md CHANGED
@@ -16,6 +16,7 @@
16
16
 
17
17
  | 包版本 | preset 版本 | 内容 | 工具数 |
18
18
  | --- | --- | --- | --- |
19
+ | 0.25.1 | — | **DSH 0.2.2-rc.2 适配**:preset 逐字吸收上游 3 处变更(`tool-office` 行、`skill-filesystem` 的 `customSkillDirs`、`tool-subagent-control` 的 `interrupt: false`,29 → 30 行);`preset-health` 支持未求值的 `!!js`;`contract` 兼容桌面版压缩产物;工具数不变 | 64 |
19
20
  | 0.25.0 | — | **浏览器内真实 3D 结构预览**:Molbio 面板读 PDB/mmCIF/SDF-MOL V2000,软件光栅化 ball-and-stick / space-filling,拖拽旋转、滚轮缩放;工具数不变 | 64 |
20
21
  | 0.24.1 | — | **输入边界与数据安全加固**:BibTeX 不再覆盖文献库、相对读取按会话工作区、批量/glob/并发声明修复、20 万行输入不再 `RangeError`;工具数不变 | 64 |
21
22
  | 0.24.0 | — | **数据卫生版**:新增 `molbio_contamination_screen`(内置载体/接头短签名,双链、0–2 错配)与 `molbio_fastq_trim`(质量/接头/引物/poly/N/长度,写 FASTQ/FASTA);修 FASTQ QC 接头表 Small RNA 5' 的 RNA→DNA 静默错 | 62 → 64 |
@@ -32,7 +32,7 @@
32
32
 
33
33
  - **包**:`dsh-molbio-tools`,零依赖 DSH 插件包,**64 个 `molbio_*` 工具**(其中
34
34
  `molbio_plot` 一个工具承载 8 种图表)。
35
- - **基线**:DSH **0.2.2-rc.1**;`package.json` 版本 0.25.0(DSH 桌面版内嵌 Node 24.21.0)。
35
+ - **基线**:DSH **0.2.2-rc.2**;`package.json` 版本 0.25.1(DSH 桌面版内嵌 Node 24.21.0)。
36
36
  - **两条分发渠道**:根包(工具 + 面板)与 `packages/molbio-panel`(只面板),
37
37
  **两个独立的 npm 条目、两条独立的版本线**,必须分别发布。
38
38
  - **工具只在专属模式里出现**(设计如此):bundle 的 `cordis.patch.yml` 只插一行**惰性宿主锚点**
package/docs/roadmap.md CHANGED
@@ -10,12 +10,12 @@ L = 需要新机制或外部资源)。
10
10
 
11
11
  ---
12
12
 
13
- ## 1. 当前状态(0.25.0)
13
+ ## 1. 当前状态(0.25.1)
14
14
 
15
15
  - 64 个 `molbio_*` 工具,零依赖,随 preset 分发(见 [README](../README.md))。
16
16
  - 离线测试金字塔 + 组合漂移守卫全绿;`benchmark/` 提供**模型使用**维度的评估
17
17
  (见 [benchmark/README.md](../benchmark/README.md))。
18
- - 基线:DSH **0.2.2-rc.1**;DSH 桌面版内嵌 Node 24.21.0,`engines.node` 与 CI 矩阵都按这个下限。
18
+ - 基线:DSH **0.2.2-rc.2**;DSH 桌面版内嵌 Node 24.21.0,`engines.node` 与 CI 矩阵都按这个下限。
19
19
  - **CI 已在位**(`.github/workflows/test.yml`,0.18.2 起):push / PR / 手动都跑全套;harness 装
20
20
  **钉死版本**,并用 `npm prefix -g` 显式导出 `DSH_HARNESS_ROOT`。0.18.4 起**同时跑
21
21
  `ubuntu-latest` 与 `windows-latest`**——3.6 已修,套件不再依赖宿主分隔符。
@@ -50,6 +50,12 @@ L = 需要新机制或外部资源)。
50
50
  深度雾化、CPK 配色),支持拖拽旋转、滚轮缩放与表示切换;12,000 重原子封顶,
51
51
  明确拒绝 V3000,并标注"preview, not for measurements"。根包 `0.24.1 → 0.25.0`、
52
52
  面板包 `0.1.10 → 0.1.11`。同版修掉客户端 bundler 丢掉 re-export imported name 的缺陷。
53
+ - **0.25.1 完成 0.2.2-rc.2 适配(工具行为零变化)**:上游 `standard` 改了 3 处——新增
54
+ `tool-office` 行、`skill-filesystem` 的 `customSkillDirs`、`tool-subagent-control` 的
55
+ `interrupt: false`——preset 逐字吸收(29 → 30 行)。`preset-health` 学会校验未求值的
56
+ `!!js` 配置;`contract` 的字符串断言改为匹配调用,桌面版压缩产物不再假红。两份
57
+ `dshReleases` 增加 `0.2.2-rc.2: compatible`,CI 随基线钉到该版本;面板包 `0.1.11 → 0.1.12`
58
+ (只改声明,产物未变)。
53
59
  - **0.24.1 是输入边界与数据安全加固版(工具数不变)**:修掉 BibTeX 导出覆盖文献库、
54
60
  相对路径按 provider cwd 解析、四个默认写 SVG 的工具被误标并发安全、批量 glob /
55
61
  `max_files` / 坏路径、文献与协议库坏条目,以及 20 万行表格 / 13 万条 reads 触发的
@@ -21,7 +21,8 @@
21
21
  "0.2.1-rc.3": "compatible",
22
22
  "0.2.1-rc.4": "unknown",
23
23
  "0.2.1-rc.5": "compatible",
24
- "0.2.2-rc.1": "compatible"
24
+ "0.2.2-rc.1": "compatible",
25
+ "0.2.2-rc.2": "compatible"
25
26
  }
26
27
  }
27
28
  }
@@ -32,7 +33,7 @@
32
33
  `@deepseek-ai/dsh-app-boot` 的 `unmetRequirements`):带 prerelease 选项时 `<0.3.0`
33
34
  会放行 `0.3.0-alpha.1`,而 `-0` 不会。
34
35
 
35
- ### 为什么 rc.2 / rc.3 / rc.5 / 0.2.2-rc.1 是 compatible、rc.1 / rc.4 是 unknown
36
+ ### 为什么 0.2.1-rc.2 / rc.3 / rc.5 与 0.2.2-rc.1 / rc.2 是 compatible、0.2.1-rc.1 / rc.4 是 unknown
36
37
 
37
38
  | 版本 | 记录 | 依据 |
38
39
  | --- | --- | --- |
@@ -41,13 +42,14 @@
41
42
  | 0.2.1-rc.3 | compatible | 0.22.0 的发布基线;同一套一次性 Profile 流程在 rc.3 上重跑通过(安装 → 启动 HTTP 200 → 卸载无残留);`contract` / `preset-health` / `drift-probe` / `benchmark-profile` / `smoke` 在 rc.3 上全绿。上游 `standard` 行清单与 rc.2 **逐字节一致** |
42
43
  | 0.2.1-rc.4 | unknown | 没有在真实安装上跑过;不能因为"补丁号在 `engines.dsh` 范围内"就写成 compatible |
43
44
  | 0.2.1-rc.5 | compatible | 0.22.2 的发布基线(CI 曾钉该版本)。在本机 DSH 桌面版 0.2.1-rc.5 上重跑:安装 → 启动 HTTP 200 → `agentPresets/list` 的 `broken` 为空且 molbio-lab 的 `tool-molbio` 为 `fiberPhase: "active"` → 卸载无残留;`contract` 17 / `preset-health` 30 行 / `drift-probe` 16 / `smoke` 60 工具 / `bench:offline` 61 题全绿。上游 `standard` 与 rc.3 **逐字节一致**(6799 B,同一 sha256) |
44
- | 0.2.2-rc.1 | compatible | 0.23.0 的发布基线(CI 钉该版本)。这一版上游删除了 `@deepseek-ai/dsh-tool-subagent-control/list-agents` 导出(`list_agents` 并入主入口),preset 因此删掉该行(30 → 29),`tool-subagent` 改用 `modelSelection`/`modelDiscovery`、`tool-fs` 补 `applyPatch: false`。在**桌面版 `app.asar` 与 npm 全局安装**两份 0.2.2-rc.1 上核对(两者 `standard.patch.yml` **逐字节一致**,6858 B,sha256 `3006CC3780CDDAA7FB0089E5854E6BBEF4409CF1D425930FD835226B95660AFD`);一次性 tarball Profile:安装 → 启动 HTTP 200(40 311 B,boot 图含 `dsh-molbio-tools/client.js`)→ `agentPresets/list` 的 `broken` 为空、`tool-molbio` 为 `fiberPhase: "active"` → 卸载无残留;`contract` 17 / `preset-health` 29 行 / `drift-probe` 16 项(15 个突变)/ `smoke` 62 工具 / `bench:offline` 63 题全绿;定向真实模型跑分 `intron-qpcr` / `protein-charge` / `dotplot` 3 题 3/3(2026-11-05,541,946 tokens) |
45
+ | 0.2.2-rc.1 | compatible | 0.23.0 的发布基线(CI 钉该版本)。这一版上游删除了 `@deepseek-ai/dsh-tool-subagent-control/list-agents` 导出(`list_agents` 并入主入口),preset 因此删掉该行(30 → 29),`tool-subagent` 改用 `modelSelection`/`modelDiscovery`、`tool-fs` 补 `applyPatch: false`。在**桌面版 `app.asar` 与 npm 全局安装**两份 0.2.2-rc.1 上核对(两者 `standard.patch.yml` **逐字节一致**,6858 B,sha256 `3006CC3780CDDAA7FB0089E5854E6BBEF4409CF1D425930FD835226B95660AFD`);一次性 tarball Profile:安装 → 启动 HTTP 200(40 311 B,boot 图含 `dsh-molbio-tools/client.js`)→ `agentPresets/list` 的 `broken` 为空、`tool-molbio` 为 `fiberPhase: "active"` → 卸载无残留;`contract` 17 / `preset-health` 29 行 / `drift-probe` 16 项(15 个突变)/ `smoke` 62 工具 / `bench:offline` 63 题全绿;定向真实模型跑分 `intron-qpcr` / `protein-charge` / `dotplot` 3 题 3/3(2026-11-05,541,946 tokens)。**0.25.1 起**:preset 采用 rc.2 新增的 `tool-office` 行,该包在 rc.1 不存在,molbio-lab 会以 `MODULE_NOT_FOUND` 无法挂载(0.25.1 的 `preset-health --dsh <rc.1>` 实测);rc.1 上的用户应留在 0.25.0 |
46
+ | 0.2.2-rc.2 | compatible | 0.25.1 的验收基线(CI 钉该版本)。上游 `standard` 相对 rc.1 只变 3 处:新增 `tool-office` 行、`skill-filesystem` 的 `customSkillDirs`(一个 `!!js` 路径)、`tool-subagent-control` 的 `interrupt: false`;preset 逐字吸收(29 → 30 行),`preset-health` 同时学会校验**未求值**的 `!!js` 配置。桌面版 `app.asar` 与 npm tarball 的 `standard.patch.yml` **逐字节一致**(7286 B,sha256 `E40BB192ED3B835312C2ACD2CCD64D3BC4B85F80A7BC95B132CB18FBEE190B5D`)。运行时流程在 **桌面版 0.2.2-rc.2** 上跑:临时 profile → 启动 HTTP 200(41 393 B,boot 图含 `dsh-molbio-tools/client.js`)→ `agentPresets/list` 列出 molbio-lab、无 `broken` → `pluginInventory/list` 的 `tool-molbio` 为 `fiberPhase: "active"`;`contract` 17(在桌面 rc.2 的压缩产物上通过,同一套断言在 npm rc.1 未压缩产物上同样通过)/ `preset-health` 30 行 / `drift-probe` 16 项(15 个突变)/ `smoke` 64 工具 / `bench:offline` 65 题全绿 |
45
47
 
46
48
  ## 2. 环境
47
49
 
48
50
  | 项 | 值 |
49
51
  | --- | --- |
50
- | DSH | `0.2.2-rc.1`(桌面版 `app.asar` 与 npm 全局安装各一份,`standard.patch.yml` 逐字节一致) |
52
+ | DSH | `0.2.2-rc.2`(桌面版 `app.asar` 上跑运行时流程;npm tarball 的 `standard.patch.yml` 与桌面版逐字节一致) |
51
53
  | Node.js | `v26.12.1`(命令行验证;桌面运行时内嵌 `24.21.0`,Electron 44.7.0) |
52
54
  | pnpm | `12.15.0`(`dsh plugin` 安装用) |
53
55
  | 平台 | Windows(win32 x64) |
@@ -148,8 +150,8 @@ pnpm 的 hoisted linker 会在 `node_modules/` 留下一个指向仓库目录的
148
150
  ## 5. 仓库内验证(同一基线)
149
151
 
150
152
  ```
151
- node test/contract.mjs → 17 checks passed(host 契约、client 产物、tarball 覆盖、声明回退的突变自检)
152
- node test/preset-health.mjs → all 29 rows load on dsh 0.2.2-rc.1
153
+ node test/contract.mjs → 17 checks passed(host 契约、client 产物、tarball 覆盖、声明回退的突变自检;npm rc.1 与桌面 rc.2 压缩产物各一份)
154
+ node test/preset-health.mjs → all 30 rows load on dsh 0.2.2-rc.2
153
155
  node test/smoke.mjs → registered 64 tools, all smoke tests passed
154
156
  node test/drift-probe.mjs → 16/16(15 个突变全部被抓到)
155
157
  node benchmark/run.mjs --offline → 65 tasks checked against the shipped tools
package/docs/workflow.md CHANGED
@@ -456,7 +456,7 @@ git status --short # lib/client.js 与 packages/molbio-panel/lib/clien
456
456
  ### DSH 升级后:preset 组合的维护(必做)
457
457
 
458
458
  `preset/molbio-lab/agent.cordis.yml` 是官方 `standard` 预设的**行清单**副本 + 末尾一行
459
- `tool-molbio`(当前基线:**dsh 0.2.2-rc.1**)。它不会自动跟随 DSH 升级,因此每次升级
459
+ `tool-molbio`(当前基线:**dsh 0.2.2-rc.2**)。它不会自动跟随 DSH 升级,因此每次升级
460
460
  DSH 后:
461
461
 
462
462
  1. 取新版的 shipped `standard`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-molbio-tools",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Zero-dependency molecular-biology plugin bundle for the DeepSeek Harness: sequence analysis, primer design (incl. cross-intron qPCR primers, TaqMan hydrolysis/MGB probes with ordering CSV and multiplex compatibility), in-silico PCR, cloning simulation, SnapGene .dna parsing and plasmid maps, Sanger verification, protein tools (incl. helical wheel, hydropathy and charge-pH plots), methylation-aware restriction analysis with double-digest buffer checks, qPCR analysis and plotting, multiple sequence alignment that conserves every input residue, conservation analysis, sequence logos, codon-usage analysis, phylogenetic trees with bootstrap support, Newick I/O and long-name label wrapping, CpG-island/GC-skew composition analysis, k-mer dotplots, read-level FASTQ QC, vector/adapter contamination screening, FASTQ trimming/filtering, batch file analysis with CSV export, silent restriction-site mutagenesis, family-aware CRISPR gRNA design (SpCas9/SaCas9/Cas12a/Cas13) with off-target search, an opt-in hand-off that shows a generated plot to the model as an attached image, plus a browser-side right-sidebar panel (plasmid maps, sequence logos, and a rotatable realistic 3D ball-and-stick/space-filling preview of PDB/mmCIF/SDF structures drawn in the Web GUI) and a literature/protocol/experiment record system.",
5
5
  "type": "module",
6
6
  "main": "index.mjs",
@@ -105,7 +105,8 @@
105
105
  "0.2.1-rc.3": "compatible",
106
106
  "0.2.1-rc.4": "unknown",
107
107
  "0.2.1-rc.5": "compatible",
108
- "0.2.2-rc.1": "compatible"
108
+ "0.2.2-rc.1": "compatible",
109
+ "0.2.2-rc.2": "compatible"
109
110
  }
110
111
  },
111
112
  "bundle": {
@@ -48,13 +48,18 @@
48
48
  # list carries no comments of its own, so none appear below; provenance and the
49
49
  # upgrade rules live in this header.
50
50
  #
51
- # Baseline: the `standard` preset of dsh 0.2.2-rc.1 (harness root
52
- # `%APPDATA%\npm\node_modules\@deepseek-ai\dsh`, file
53
- # `node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml`, whose
54
- # rows live under the `preset-standard` row's `config.plugins:`).
55
- #
56
- # 0.2.2-rc.1 is the FIRST row change since 0.2.1-rc.2 dropped the optional
57
- # subagent providers and `tool-ralph`. It folded `list_agents` into
51
+ # Baseline: the `standard` preset of dsh 0.2.2-rc.2 (the installed desktop
52
+ # runtime, `resources/app.asar` →
53
+ # `dsh/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml`,
54
+ # 7286 B, sha256 e40bb192…; rows live under the `preset-standard` row's
55
+ # `config.plugins:`). 0.2.2-rc.2 changed the preset in exactly three places,
56
+ # all absorbed verbatim below: a new `tool-office` row
57
+ # (`@deepseek-ai/dsh-tool-office`), `customSkillDirs` on `skill-filesystem`
58
+ # (the shipped `@deepseek-ai/dsh-agent-preset/skills` directory), and
59
+ # `interrupt: false` on `tool-subagent-control`.
60
+ #
61
+ # History: 0.2.2-rc.1 was the first row change since 0.2.1-rc.2 dropped the
62
+ # optional subagent providers and `tool-ralph`. It folded `list_agents` into
58
63
  # `@deepseek-ai/dsh-tool-subagent-control` (the `./list-agents` subpath export is
59
64
  # gone, so the `tool-subagent-list-agents` row was dropped here), renamed the
60
65
  # `tool-subagent` model-selection settings to `modelSelection` +
@@ -117,6 +122,9 @@
117
122
  name: '@deepseek-ai/dsh-tool-schedule'
118
123
  - id: skill-filesystem
119
124
  name: '@deepseek-ai/dsh-skill-filesystem'
125
+ config:
126
+ customSkillDirs:
127
+ - !!js process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@deepseek-ai/dsh-agent-preset/package.json')), 'skills')
120
128
  - id: tool-skill
121
129
  name: '@deepseek-ai/dsh-tool-skill'
122
130
  - id: command-goal
@@ -169,6 +177,8 @@
169
177
  config:
170
178
  - id: tool-subagent-control
171
179
  name: '@deepseek-ai/dsh-tool-subagent-control'
180
+ config:
181
+ interrupt: false
172
182
  - id: tool-subagent
173
183
  name: '@deepseek-ai/dsh-tool-subagent'
174
184
  config:
@@ -200,6 +210,8 @@
200
210
  searchTimeoutMs: 60000
201
211
  - id: present
202
212
  name: '@deepseek-ai/dsh-tool-present'
213
+ - id: tool-office
214
+ name: '@deepseek-ai/dsh-tool-office'
203
215
  - id: tool-plugin-manager
204
216
  name: '@deepseek-ai/dsh-plugin-manager/tools'
205
217
  disabled: true
package/test/contract.mjs CHANGED
@@ -236,8 +236,16 @@ check('a session-scope tab body receives sessionId + useSessions (official prece
236
236
  /function [A-Za-z_$][\w$]*\(\{(?=[^}]*\buseTabInfo\b)(?=[^}]*\bsessionId\b)(?=[^}]*\buseSessions\b)/,
237
237
  'the official tab body receives useTabInfo + sessionId + useSessions from its props',
238
238
  );
239
- assert.ok(files.text.includes('useSessions((sessions) => sessions.byId[sessionId]?.cwd)'), 'and reads the workspace root exactly as the panel does');
240
- assert.ok(files.text.includes('"slots"') && files.text.includes('"sidebarRightTabs"'), 'and injects the same registries');
239
+ // The desktop distribution ships this bundle MINIFIED: `useSessions(sessions=>…)`
240
+ // (no parameter parentheses, no spaces) and template-literal registry names.
241
+ // Pin the CALL, not the npm build's spelling.
242
+ assert.match(
243
+ files.text,
244
+ /useSessions\(\s*\(?\s*sessions\s*\)?\s*=>\s*sessions\.byId\[sessionId\]\?\.cwd\s*\)/,
245
+ 'and reads the workspace root exactly as the panel does',
246
+ );
247
+ assert.match(files.text, /["'\x60]slots["'\x60]/, 'and injects the slot registry');
248
+ assert.match(files.text, /["'\x60]sidebarRightTabs["'\x60]/, 'and the right-sidebar tab registry');
241
249
  });
242
250
 
243
251
  check('the sessions root hook is provided by the session client package', () => {
@@ -250,7 +258,7 @@ check('the sessions root hook is provided by the session client package', () =>
250
258
  assert.ok(PROVIDE_ROOT_HOOKS.test(session.text), 'it contributes root hooks');
251
259
  assert.ok(PROVIDE_ROOT_SESSIONS.test(session.text), 'the root hook source is named `sessions`');
252
260
  // `sessions` -> `useSessions` under the rule asserted above.
253
- assert.ok(session.text.includes('installScope("session"'), 'and installs the session scope those props belong to');
261
+ assert.match(session.text, /installScope\(\s*["'\x60]session["'\x60]/, 'and installs the session scope those props belong to');
254
262
  });
255
263
 
256
264
  // The two assertions above read a MINIFIED bundle, so they must survive the
@@ -306,7 +314,7 @@ check('workspaceFiles exposes list / read / readBytes on the host Remote', () =>
306
314
 
307
315
  check('official client packages call the same workspaceFiles methods', () => {
308
316
  const files = clientBundle('@deepseek-ai/dsh-client-ui-sidebar-files');
309
- assert.ok(files.text.includes('remote.workspaceFiles.list(sessionId, path, signal)'), 'ui-sidebar-files calls list(sessionId, path, signal)');
317
+ assert.match(files.text, /workspaceFiles\.list\(\s*sessionId\s*,\s*path\s*,\s*signal\s*\)/, 'ui-sidebar-files calls list(sessionId, path, signal)');
310
318
  const docPreview = clientBundle('@deepseek-ai/dsh-client-ui-sidebar-documentpreview');
311
319
  if (docPreview !== undefined) {
312
320
  const usesRead = /workspaceFiles\.read(All|Bytes)?\(/.exec(docPreview.text);
@@ -499,7 +507,7 @@ check('the toolview card contract still holds (meta path + keyed seat)', () => {
499
507
  assert.ok(toolUi.text.includes('tool.call.toolview'), 'the toolview seat is still declared');
500
508
  const card = clientBundle('@deepseek-ai/dsh-client-ui-deliverables');
501
509
  assert.ok(card !== undefined && card.text.includes('tool.call.toolview'), 'a shipped package still registers a toolview');
502
- assert.ok(/key:\s*"present"/.test(card.text), 'keyed by the tool name');
510
+ assert.match(card.text, /key:\s*["'\x60]present["'\x60]/, 'keyed by the tool name');
503
511
 
504
512
  // This package's own side: the projection exists on exactly the tools the
505
513
  // bundle claims cards for (through the loop over MAP_TOOL_KEYS, so assert the
@@ -553,15 +561,15 @@ check('every seat claim waits for the declaration (slots.inject, not a bare regi
553
561
 
554
562
  const renderer = clientBundle('@deepseek-ai/dsh-client-ui-renderer');
555
563
  assert.ok(renderer !== undefined, 'ui-renderer is installed (it owns the client slots service)');
556
- assert.ok(renderer.text.includes('inject(key, callback)'), 'the slots service still exposes inject(key, callback)');
557
- assert.ok(renderer.text.includes('this._core.specDynamic(key)'), 'and runs the callback only once the seat is declared');
564
+ assert.match(renderer.text, /inject\(\s*key\s*,\s*callback\s*\)/, 'the slots service still exposes inject(key, callback)');
565
+ assert.match(renderer.text, /this\._core\.specDynamic\(\s*key\s*\)/, 'and runs the callback only once the seat is declared');
558
566
 
559
567
  // The shipped packages claim our very seats this way.
560
568
  const toolUi = clientBundle('@deepseek-ai/dsh-client-ui-tool');
561
- assert.ok(/slots\.inject\(\s*"tool\.call\.toolview"/.test(toolUi.text), 'ui-tool waits for tool.call.toolview');
569
+ assert.match(toolUi.text, /slots\.inject\(\s*["'\x60]tool\.call\.toolview["'\x60]/, 'ui-tool waits for tool.call.toolview');
562
570
  const preview = clientBundle('@deepseek-ai/dsh-client-ui-sidebar-documentpreview');
563
571
  if (preview !== undefined) {
564
- assert.ok(/slots\.inject\(\s*"sidebar\.right\.pane\.tab"/.test(preview.text), 'the document preview waits for the tab seat');
572
+ assert.match(preview.text, /slots\.inject\(\s*["'\x60]sidebar\.right\.pane\.tab["'\x60]/, 'the document preview waits for the tab seat');
565
573
  }
566
574
 
567
575
  // Our artifact: every `register` must sit inside a wait for that same seat.
@@ -185,12 +185,56 @@ async function checkRow(row, packages, harnessRoot, presetBase) {
185
185
  if (typeof Config !== 'function') {
186
186
  return { ...result, status: 'ok', detail: 'package exports no Config schema (config passed through unvalidated)' };
187
187
  }
188
- try {
189
- Config(row.config);
190
- return { ...result, status: 'ok' };
191
- } catch (error) {
192
- return { ...result, status: 'config-invalid', detail: String(error.message ?? error).split('\n')[0] };
188
+ // A '!!js' scalar parses to { __jsExpr: <source> } (the Loader's own tag).
189
+ // The Loader EVALUATES those before a package's Config sees a value; this
190
+ // guard holds the unevaluated node, and the expression's runtime type is not
191
+ // knowable here (baseUrl, ctx and dshHomePath exist only at mount). So it
192
+ // validates with each scalar placeholder in turn and reports invalid only
193
+ // when NO placeholder satisfies the schema - a shape error, the thing this
194
+ // guard exists for, still fails all three. 0.2.2-rc.2's customSkillDirs is
195
+ // the first upstream row that needs this: its value is a '!!js' path string.
196
+ const configs = hasJsExpr(row.config) ? jsExprPlaceholderVariants(row.config) : [row.config];
197
+ let lastError;
198
+ for (const config of configs) {
199
+ try {
200
+ Config(config);
201
+ return { ...result, status: 'ok', ...(configs.length > 1 ? { detail: 'config validated with !!js placeholders' } : {}) };
202
+ } catch (error) {
203
+ lastError = error;
204
+ }
193
205
  }
206
+ return { ...result, status: 'config-invalid', detail: String(lastError?.message ?? lastError).split('\n')[0] };
207
+ }
208
+
209
+ /** Is this node a Loader '!!js' expression ({ __jsExpr: <source> })? */
210
+ function isJsExpr(value) {
211
+ return value !== null && typeof value === 'object' && !Array.isArray(value)
212
+ && typeof value.__jsExpr === 'string' && Object.keys(value).length === 1;
213
+ }
214
+
215
+ /** Does any value in this config tree carry an unevaluated '!!js' node? */
216
+ function hasJsExpr(value) {
217
+ if (isJsExpr(value)) return true;
218
+ if (Array.isArray(value)) return value.some(hasJsExpr);
219
+ if (value !== null && typeof value === 'object') return Object.values(value).some(hasJsExpr);
220
+ return false;
221
+ }
222
+
223
+ /** Replace every '!!js' node with one scalar placeholder, recursively. */
224
+ function withJsExprPlaceholder(value, placeholder) {
225
+ if (isJsExpr(value)) return placeholder;
226
+ if (Array.isArray(value)) return value.map((entry) => withJsExprPlaceholder(entry, placeholder));
227
+ if (value !== null && typeof value === 'object') {
228
+ const out = {};
229
+ for (const [key, entry] of Object.entries(value)) out[key] = withJsExprPlaceholder(entry, placeholder);
230
+ return out;
231
+ }
232
+ return value;
233
+ }
234
+
235
+ /** The three placeholder types a schema could require for an evaluated '!!js'. */
236
+ function jsExprPlaceholderVariants(config) {
237
+ return ['', 0, false].map((placeholder) => withJsExprPlaceholder(config, placeholder));
194
238
  }
195
239
 
196
240
  /** Rows, in composition order, with nested group children flattened inline. */