dsh-molbio-tools 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +163 -0
- package/README.md +20 -9
- package/benchmark/README.md +1 -1
- package/benchmark/profile.mjs +2 -1
- package/benchmark/tasks/08-records.json +5 -1
- package/benchmark/verifications.mjs +5 -0
- package/build/preset-patch.mjs +101 -41
- package/build/release-preflight.mjs +1 -1
- package/cordis.patch.yml +187 -25
- package/docs/history.md +49 -0
- package/docs/maintainer.md +6 -5
- package/docs/roadmap.md +11 -2
- package/docs/store-evidence.md +152 -0
- package/docs/store-preset-exemption-issue.md +46 -0
- package/docs/store-preset-exemption.md +235 -0
- package/docs/workflow.md +4 -4
- package/index.mjs +64 -10
- package/package.json +11 -7
- package/papers.mjs +151 -0
- package/preset/install.mjs +4 -4
- package/preset/molbio-lab/agent.cordis.yml +12 -11
- package/test/contract.mjs +18 -4
- package/test/drift-probe.mjs +1 -1
- package/test/preset-health.mjs +1 -1
- package/test/preset-rows.mjs +4 -3
- package/test/smoke.mjs +109 -2
- package/packages/molbio-panel/README.md +0 -63
- package/packages/molbio-panel/cordis.patch.yml +0 -7
- package/packages/molbio-panel/index.mjs +0 -33
- package/packages/molbio-panel/lib/client.js +0 -9113
- package/packages/molbio-panel/package.json +0 -57
- package/preset/molbio-lab/preset.patch.yml +0 -170
package/cordis.patch.yml
CHANGED
|
@@ -1,34 +1,196 @@
|
|
|
1
|
-
# dsh-molbio-tools bundle
|
|
1
|
+
# dsh-molbio-tools bundle patch — the one file `dsh.bundle.patch` names.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
3
|
+
# GENERATED by build/preset-patch.mjs. Edit the row list in
|
|
4
|
+
# preset/molbio-lab/agent.cordis.yml (and the picker strings in preset.yml), then
|
|
5
|
+
# re-run `node build/preset-patch.mjs`; hand edits here are reverted by the next
|
|
6
|
+
# run, and `node build/preset-patch.mjs --check` fails while the two disagree.
|
|
4
7
|
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
8
|
+
# Two top-level inserts, applied in this order:
|
|
9
|
+
# 1. molbio-client — inert host anchor for the browser half (see below)
|
|
10
|
+
# 2. preset-molbio-lab — the "Molecular Biology Lab" agent preset
|
|
11
|
+
|
|
12
|
+
# ── 1. the CLIENT-BUNDLE ANCHOR ────────────────────────────────────────────
|
|
7
13
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
14
|
+
# `host.mjs` registers no tool and publishes no service. Its only job is to be a
|
|
15
|
+
# loader row DSH's client-module scan can see: that scan walks the HOST Loader
|
|
16
|
+
# tree, reads the row's package manifest, and takes `dsh.client` +
|
|
17
|
+
# `exports["./client"]` from it to compose `window.__DSH_BOOT__`. A preset's rows
|
|
18
|
+
# live in an isolated subtree the scan never visits, so a `dsh.client` package
|
|
19
|
+
# referenced only from inside a preset loses its only discoverable row and its
|
|
20
|
+
# right-sidebar tabs silently disappear.
|
|
11
21
|
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
# never visits.
|
|
17
|
-
#
|
|
18
|
-
# So when the tools moved into the preset, this package lost its only host-plane
|
|
19
|
-
# row, its bundle stopped reaching the page, and the two right-sidebar tabs
|
|
20
|
-
# (Molbio / Papers) silently disappeared: the panel code was still in the
|
|
21
|
-
# artifact, nothing ever loaded it. `host.mjs` restores exactly one inert row so
|
|
22
|
-
# the browser half is discoverable again — without putting any tool into a
|
|
23
|
-
# session that did not choose the molbio-lab mode.
|
|
24
|
-
#
|
|
25
|
-
# An earlier version of this file inserted a host row for the tool itself
|
|
26
|
-
# (`name: dsh-molbio-tools`), which both registered all 57 tools globally and
|
|
27
|
-
# collided with the preset's own copy of that row:
|
|
22
|
+
# Keep the tool in the PRESET and only the anchor here. An earlier version of
|
|
23
|
+
# this file inserted a host row for the tool itself (`name: dsh-molbio-tools`),
|
|
24
|
+
# which both registered all 60 tools globally and collided with the preset's own
|
|
25
|
+
# copy of that row:
|
|
28
26
|
#
|
|
29
27
|
# broken: "tool-molbio (...): never started"
|
|
30
|
-
#
|
|
31
|
-
# Keep the tool in the PRESET and only the anchor here.
|
|
32
28
|
- insert:
|
|
33
29
|
- id: molbio-client
|
|
34
30
|
name: './host.mjs'
|
|
31
|
+
|
|
32
|
+
# ── 2. the MOLECULAR BIOLOGY LAB PRESET ───────────────────────────────────
|
|
33
|
+
#
|
|
34
|
+
# DSH 0.1.7-alpha.1 removed the `<dshHome>/.agent-presets` directory scan: a
|
|
35
|
+
# preset is now a `@deepseek-ai/dsh-agent-preset` ROW in a bundle patch, which
|
|
36
|
+
# is what this insert declares. Because the BUNDLE registers it,
|
|
37
|
+
# `dsh plugin --profile <p> add dsh-molbio-tools` puts the mode in the picker
|
|
38
|
+
# with no copy step and no preset-root patch — see README「安装」.
|
|
39
|
+
#
|
|
40
|
+
# `order: 5` is deliberate: the shipped presets occupy 1..4 (standard, ptc,
|
|
41
|
+
# minimal, cordis) and the registry sorts by `order` with an id tie-break, so a
|
|
42
|
+
# shared number would let the picker order depend on alphabetical accident.
|
|
43
|
+
- insert:
|
|
44
|
+
- id: preset-molbio-lab
|
|
45
|
+
name: '@deepseek-ai/dsh-agent-preset'
|
|
46
|
+
config:
|
|
47
|
+
id: molbio-lab
|
|
48
|
+
order: 5
|
|
49
|
+
name: Molecular Biology Lab
|
|
50
|
+
description: "分子生物学专属模式:标准编码能力 + 60 个 molbio_* 工具(序列分析、引物设计(含跨内含子 qPCR、盐/浓度旋钮与目标位置偏好)、TaqMan 水解探针(含 MGB 与订购 CSV)与多重 PCR 互扰/退火温度/浓度建议、克隆模拟与选酶(含 Golden Gate)、酶目录查询、甲基化敏感位点与双酶切 buffer 兼容检查、多序列比对(每个输入残基都会进比对结果)、保守性分析与比对后处理(共识/缺口修剪/同一性矩阵/逐列覆盖度,含 sequence logo 图)、CRISPR gRNA 设计(SpCas9/SaCas9/Cas12a/Cas13,家族特定 PAM/PFS/种子)与脱靶搜索、SnapGene/GenBank 解析与质粒图谱、Sanger 测序验证、蛋白性质/密码子优化/螺旋轮投影与疏水性图、qPCR 与绘图、虚拟凝胶、实验台分析(FASTQ 质控、密码子使用、系统发生树(长叶名自动折行)、in-silico PCR、CpG/GC 组成、批量文件分析/CSV)、静默酶切位点突变设计——生成的 SVG 图片自动用系统默认应用打开,文献/协议/实验记录)。"
|
|
51
|
+
plugins:
|
|
52
|
+
- id: persona
|
|
53
|
+
name: '@deepseek-ai/dsh-persona'
|
|
54
|
+
config:
|
|
55
|
+
prefix: You are a coding agent powered by the {{model}} model.
|
|
56
|
+
- id: agent-instructions
|
|
57
|
+
name: '@deepseek-ai/dsh-agent-instructions'
|
|
58
|
+
config:
|
|
59
|
+
maxBytes: 65536
|
|
60
|
+
- id: time-context
|
|
61
|
+
name: '@deepseek-ai/dsh-time-context'
|
|
62
|
+
- id: tool-bash
|
|
63
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
64
|
+
disabled: !!js process.platform === 'win32'
|
|
65
|
+
- id: tool-pwsh
|
|
66
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
67
|
+
disabled: !!js process.platform !== 'win32'
|
|
68
|
+
- id: tool-fs
|
|
69
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
70
|
+
- id: tool-fs-search
|
|
71
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
72
|
+
config:
|
|
73
|
+
sampleOverCapGlobResults: false
|
|
74
|
+
- id: tool-jobs
|
|
75
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
76
|
+
- id: tool-schedule
|
|
77
|
+
name: '@deepseek-ai/dsh-tool-schedule'
|
|
78
|
+
- id: skill-filesystem
|
|
79
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
80
|
+
- id: tool-skill
|
|
81
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
82
|
+
- id: command-goal
|
|
83
|
+
name: '@deepseek-ai/dsh-command-goal'
|
|
84
|
+
- id: tool-goal
|
|
85
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
86
|
+
- id: planning
|
|
87
|
+
name: cordis:group
|
|
88
|
+
group: true
|
|
89
|
+
isolate:
|
|
90
|
+
planMode: true
|
|
91
|
+
config:
|
|
92
|
+
- id: plan-mode
|
|
93
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
94
|
+
config:
|
|
95
|
+
section: |
|
|
96
|
+
You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
97
|
+
|
|
98
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
99
|
+
|
|
100
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
101
|
+
|
|
102
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
103
|
+
|
|
104
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
105
|
+
|
|
106
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
107
|
+
- id: compaction
|
|
108
|
+
name: cordis:group
|
|
109
|
+
group: true
|
|
110
|
+
isolate:
|
|
111
|
+
compaction: true
|
|
112
|
+
toolResultPruner: true
|
|
113
|
+
config:
|
|
114
|
+
- id: compaction-basic
|
|
115
|
+
name: '@deepseek-ai/dsh-compaction-basic'
|
|
116
|
+
- id: command-compact
|
|
117
|
+
name: '@deepseek-ai/dsh-command-compact'
|
|
118
|
+
- id: tool-result-pruner
|
|
119
|
+
name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
|
|
120
|
+
config:
|
|
121
|
+
thresholdChars: 8192
|
|
122
|
+
headChars: 4096
|
|
123
|
+
tailChars: 1024
|
|
124
|
+
- id: delegation
|
|
125
|
+
name: cordis:group
|
|
126
|
+
group: true
|
|
127
|
+
isolate:
|
|
128
|
+
workflowEngine: true
|
|
129
|
+
config:
|
|
130
|
+
- id: tool-subagent-control
|
|
131
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
132
|
+
- id: tool-subagent-list-agents
|
|
133
|
+
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
134
|
+
- id: tool-subagent
|
|
135
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
136
|
+
config:
|
|
137
|
+
provider: spawn
|
|
138
|
+
toolName: subagent
|
|
139
|
+
modelSelectionSettings: true
|
|
140
|
+
- id: tool-subagent-fork
|
|
141
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
142
|
+
config:
|
|
143
|
+
provider: fork
|
|
144
|
+
toolName: subagent_fork
|
|
145
|
+
- id: workflow-ptc
|
|
146
|
+
name: '@deepseek-ai/dsh-workflow-ptc'
|
|
147
|
+
config:
|
|
148
|
+
provider: spawn
|
|
149
|
+
- id: tool-workflow
|
|
150
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
151
|
+
- id: tool-ask-user
|
|
152
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
153
|
+
- id: tool-todo
|
|
154
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
155
|
+
config:
|
|
156
|
+
allowParallelInProgress: true
|
|
157
|
+
- id: tool-web
|
|
158
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
159
|
+
config:
|
|
160
|
+
fetch: true
|
|
161
|
+
searchTimeoutMs: 60000
|
|
162
|
+
- id: present
|
|
163
|
+
name: '@deepseek-ai/dsh-tool-present'
|
|
164
|
+
- id: tool-plugin-manager
|
|
165
|
+
name: '@deepseek-ai/dsh-plugin-manager/tools'
|
|
166
|
+
disabled: true
|
|
167
|
+
- id: tool-plugin-market
|
|
168
|
+
name: '@deepseek-ai/dsh-plugin-market/tools'
|
|
169
|
+
disabled: true
|
|
170
|
+
|
|
171
|
+
# dsh-molbio-tools: molecular-biology toolset (60 tools across sequence
|
|
172
|
+
# analysis, primers (incl. TaqMan probes and multiplex compatibility),
|
|
173
|
+
# in-silico PCR, cloning (incl. Golden Gate), enzyme catalog, methylation-aware
|
|
174
|
+
# and double digests, plasmids, Sanger verification, proteins (incl. helical
|
|
175
|
+
# wheel/hydropathy plots), qPCR, virtual gels, multiple sequence
|
|
176
|
+
# alignment/conservation (every supplied residue is conserved), sequence logos,
|
|
177
|
+
# codon-usage analysis, phylogenetic trees (bootstrap + Newick, long labels
|
|
178
|
+
# wrapped), CpG-island/GC-skew composition, read-level FASTQ QC, CRISPR gRNA
|
|
179
|
+
# design, and literature/protocol/experiment records).
|
|
180
|
+
# Registers into the host `tools` registry and publishes no service, so it
|
|
181
|
+
# needs no isolate realm.
|
|
182
|
+
#
|
|
183
|
+
# The specifier is the PACKAGE NAME, resolved by Node from the profile's
|
|
184
|
+
# node_modules — not a `./plugins/…` path. A relative specifier here does NOT
|
|
185
|
+
# work on DSH 0.1.7-alpha.1: the preset mounts, but the entry is created without
|
|
186
|
+
# ever being imported, so the roster reports the mode as broken and it loads
|
|
187
|
+
# zero tools:
|
|
188
|
+
#
|
|
189
|
+
# tool-molbio (./plugins/dsh-molbio-tools-v20/index.mjs): never started
|
|
190
|
+
#
|
|
191
|
+
# A bare name is also what makes upgrades automatic: `dsh plugin update` moves
|
|
192
|
+
# the package and this row follows it. The per-release `plugins/dsh-molbio-
|
|
193
|
+
# tools-vN/` copies existed only to work around ESM module-cache reuse of a
|
|
194
|
+
# relative file URL, which a resolved package name does not have.
|
|
195
|
+
- id: tool-molbio
|
|
196
|
+
name: 'dsh-molbio-tools'
|
package/docs/history.md
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
| 包版本 | preset 版本 | 内容 | 工具数 |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
+
| 0.22.0 | — | **DSH 0.2.1-rc.3 适配 + PubMed 官方 API**:`molbio_pubmed_search`/`_abstract` 支持 NCBI API key(E-utilities),无 key 行为不变 | 60 |
|
|
20
|
+
| 0.21.1 | — | **DSH STORE 提交前置**:单文件 bundle patch、逐版本兼容声明;根 tarball 只带一个插件清单(工具行为零变化) | 60 |
|
|
19
21
|
| 0.21.0 | — | **DSH 0.2.1-rc.2 适配**:preset 行清单逐行重抄;contract 两条断言重锚到行为;两条 suspended 记录用真实模型重录 | 60 |
|
|
20
22
|
| 0.20.1 | — | 插件专属图标(透明底双螺旋 SVG),运行时零改动 | 60 |
|
|
21
23
|
| 0.20.0 | — | **Cas 家族几何**(SpCas9/SaCas9/Cas12a/Cas13a/b/d)+ 反向链脱靶定位修复;TaqMan MGB/订购 CSV;multiplex 退火温度/浓度;批量分析 CSV;静默位点突变;并入 0.19.1 硬化 | 60 |
|
|
@@ -43,6 +45,53 @@
|
|
|
43
45
|
|
|
44
46
|
---
|
|
45
47
|
|
|
48
|
+
## v0.22.0(2026-10-25,包 0.22.0)
|
|
49
|
+
|
|
50
|
+
一半是适配(rc.3),一半是新能力(PubMed 官方 API + key)。三条教训。
|
|
51
|
+
|
|
52
|
+
**(1) 「上游没变」不是可以跳过流程的理由,而是一个需要被证明的结论。**
|
|
53
|
+
rc.3 的 `standard.patch.yml` 与 rc.2 逐字节相同,所以 preset 行、生成物、`preset-health` 的期望
|
|
54
|
+
一行都没动——但这是先 diff 过、再把 `preset-health` / `drift-probe` / `contract` /
|
|
55
|
+
`benchmark-profile` 全套在 rc.3 上跑绿之后才敢下的结论。上一次(0.21.0)同一个文件在补丁级版本里
|
|
56
|
+
改了 12 处结构;把「这次应该没事」当选版本的理由,就是在赌下一次。
|
|
57
|
+
|
|
58
|
+
**(2) 官方 API 不是「另一条网络通路」,它仍然是一次 `ctx.web.fetch`。**
|
|
59
|
+
PubMed E-utilities 的加入没有引入 `fetch` 依赖,也没有绕开沙箱/同意机制:工具只是把 URL 构造成
|
|
60
|
+
esearch/esummary/efetch,再交给同一个 `ctx.web` 缝。两个细节必须做对:**空结果与鉴权失败是两件
|
|
61
|
+
事**(`{"error":"API key invalid"}` 不能渲染成「没有搜到」);**key 的优先级要可预测**
|
|
62
|
+
(参数 > `NCBI_API_KEY` > `MOLBIO_NCBI_API_KEY`,空白值视为缺席)。另外,内联传 key 会让它出现在
|
|
63
|
+
对话记录与工具卡片里——这是参数通路的固有代价,所以文档把「长期使用请设环境变量」写在工具描述里,
|
|
64
|
+
而不是只写在 README。
|
|
65
|
+
|
|
66
|
+
**(3) 需要真实凭证/实时数据的路径,归 smoke,不归 benchmark。**
|
|
67
|
+
benchmark 的 `literature-search` 一直是 `NETWORK_TASKS`:它只断言最终回答的结构,因为工具返回的
|
|
68
|
+
是当天的 PubMed 数据,没有可冻结的值。带 key 的新通路同样不能被 benchmark 钉住(既不能要求一个
|
|
69
|
+
真 key,也不该把 live 记录写进 fixture),于是用 mock 的 esearch/esummary/efetch 在 `test/smoke.mjs`
|
|
70
|
+
里断言「key 真的进了两个请求」「字段解析正确」「环境变量能回退」「坏 key 会报错」,并保留一条
|
|
71
|
+
「无 key 时不碰 E-utilities」的对照——benchmark 负责模型会不会用,smoke 负责这条分支本身对不对。
|
|
72
|
+
## v0.21.1(2026-10-25,包 0.21.1)
|
|
73
|
+
|
|
74
|
+
上架前置版:一个工具都没改,只改「提交的形状」。三条教训都关于**契约不止一份**。
|
|
75
|
+
|
|
76
|
+
**(1) 当两个官方契约互相矛盾时,先让包同时满足两边,而不是等其中一个放宽。**
|
|
77
|
+
`dsh.bundle.patch` 在 DSH 运行时是有序数组(官方 `dsh-web-app` 自己就列了 5 个文件),但 DSH STORE
|
|
78
|
+
的提交预检只接受字符串。我们选了不依赖对方先改的解法:合并成一个 `cordis.patch.yml`,两个 insert
|
|
79
|
+
(锚点 + preset)放在同一个文件里,生成器直接产出它。代价是四个读者要跟着换路径——真正危险的不是
|
|
80
|
+
改路径,而是**锚点行可能在合并时被当成重复内容删掉**:0.15.2 的两个侧栏 tab 就是这么消失的。所以
|
|
81
|
+
`client-mount` 的「每个被选中的包必须有一个可解析的宿主行」没有随合并松动。
|
|
82
|
+
|
|
83
|
+
**(2) 兼容性声明是两件事:安装范围与逐版本验收。**
|
|
84
|
+
`engines.dsh` 的 `>=0.2.1-rc.2 <0.3.0-0` 是粗筛(`-0` 是必要的:带 prerelease 的比较里
|
|
85
|
+
`<0.3.0` 会放行 `0.3.0-alpha.1`);`dsh.compatibility.dshReleases` 才是逐版本的结论。没有跑过的
|
|
86
|
+
版本只能写 `unknown`,不能因为「补丁号在范围内」就写成 `compatible`——这正是把「范围」误读成
|
|
87
|
+
「验收」时会发生的事。
|
|
88
|
+
|
|
89
|
+
**(3) 一个 tarball 只能有一个插件清单。**
|
|
90
|
+
根包曾把 `packages/molbio-panel` 一起打包,于是同一个 tarball 里有两个 `dsh` 清单、两份相同的
|
|
91
|
+
427 KB `lib/client.js`。删掉 `packages` 不改变任何用户可见行为(面板照样由根包的 `lib/client.js`
|
|
92
|
+
提供),但「不改变行为」必须能被观察到:一次性 profile 的启动回读里,`window.__DSH_BOOT__` 仍然
|
|
93
|
+
包含 `dsh-molbio-tools/client.js`,这才是证据;tarball 此时是 115 个文件、约 999 kB。
|
|
94
|
+
|
|
46
95
|
## v0.21.0(2026-10-23,包 0.21.0)
|
|
47
96
|
|
|
48
97
|
纯适配版:DSH 0.2.0-rc.2 → 0.2.1-rc.2。工具行为零变化,但上游动了三样本仓库**以为不会动**的东西,
|
package/docs/maintainer.md
CHANGED
|
@@ -32,11 +32,12 @@
|
|
|
32
32
|
|
|
33
33
|
- **包**:`dsh-molbio-tools`,零依赖 DSH 插件包,**60 个 `molbio_*` 工具**(其中
|
|
34
34
|
`molbio_plot` 一个工具承载 8 种图表)。
|
|
35
|
-
- **基线**:DSH **0.2.1-rc.
|
|
35
|
+
- **基线**:DSH **0.2.1-rc.3**;`package.json` 版本 0.22.0。
|
|
36
36
|
- **两条分发渠道**:根包(工具 + 面板)与 `packages/molbio-panel`(只面板),
|
|
37
37
|
**两个独立的 npm 条目、两条独立的版本线**,必须分别发布。
|
|
38
|
-
- **工具只在专属模式里出现**(设计如此):bundle 的 `cordis.patch.yml`
|
|
39
|
-
60
|
|
38
|
+
- **工具只在专属模式里出现**(设计如此):bundle 的 `cordis.patch.yml` 只插一行**惰性宿主锚点**
|
|
39
|
+
(`molbio-client` → `./host.mjs`),60 个工具由同文件里的 preset insert 承载,
|
|
40
|
+
只会挂进 "Molecular Biology Lab" 模式。
|
|
40
41
|
- **测试**:`npm test` = 插件(`smoke`)+ 画面(`svgpng`/`svgio`/`charts`)+ 客户端四套件 +
|
|
41
42
|
DSH 契约(`contract`)+ 组合(`preset-health`)+ 漂移守卫(`drift-probe`)+
|
|
42
43
|
发布守卫(`release`)+ benchmark 的 profile 守卫与**离线期望值校验**。
|
|
@@ -86,12 +87,12 @@ dsh-molbio-tools/
|
|
|
86
87
|
├── lib/client.js # 客户端产物(exports["./client"],由 npm run build:client 生成)
|
|
87
88
|
├── packages/molbio-panel/ # 面板专用包(只面板、不带工具)
|
|
88
89
|
├── preset/molbio-lab/ # 专属模式 preset:agent.cordis.yml 是行清单(手改这里)
|
|
89
|
-
│ # preset.
|
|
90
|
+
│ # preset.yml 是选择器文案;两者由生成器写进根目录的 cordis.patch.yml
|
|
90
91
|
├── benchmark/ # 可用性评估:tasks/*.json + 判分器 + headless profile 推导
|
|
91
92
|
│ # (README.md 是入口;reports/ 与 scratch 工作区不进 git)
|
|
92
93
|
├── test/ # 冒烟 + 光栅化器 + 客户端/组合检查 + preset 漂移守卫 + 发布守卫 + benchmark profile 守卫
|
|
93
94
|
├── docs/ # 维护者与实现文档(rules / workflow / roadmap / history 是本目录的骨架)
|
|
94
|
-
└── cordis.patch.yml # bundle
|
|
95
|
+
└── cordis.patch.yml # 唯一 bundle patch(生成物):client 锚点 insert + preset insert
|
|
95
96
|
```
|
|
96
97
|
|
|
97
98
|
---
|
package/docs/roadmap.md
CHANGED
|
@@ -10,12 +10,12 @@ L = 需要新机制或外部资源)。
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## 1. 当前状态(0.
|
|
13
|
+
## 1. 当前状态(0.22.0)
|
|
14
14
|
|
|
15
15
|
- 60 个 `molbio_*` 工具,零依赖,随 preset 分发(见 [README](../README.md))。
|
|
16
16
|
- 离线测试金字塔 + 组合漂移守卫全绿;`benchmark/` 提供**模型使用**维度的评估
|
|
17
17
|
(见 [benchmark/README.md](../benchmark/README.md))。
|
|
18
|
-
- 基线:DSH **0.2.1-rc.
|
|
18
|
+
- 基线:DSH **0.2.1-rc.3**。
|
|
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 已修,套件不再依赖宿主分隔符。
|
|
@@ -32,6 +32,15 @@ L = 需要新机制或外部资源)。
|
|
|
32
32
|
`tool-ralph`;去掉 persona `suffix` 与两处 `backgroundMode`),`contract` 两条断言从上游
|
|
33
33
|
minified 字面量改挂到**行为**,两条 suspended 的 benchmark 记录用真实模型重录。
|
|
34
34
|
工具数与插件行为零变化。
|
|
35
|
+
- **0.21.1 是上架前置版(工具行为零变化)**:两层 patch 合并成单个 `cordis.patch.yml`
|
|
36
|
+
(DSH STORE 的提交预检只接受字符串)、两个 manifest 声明 `engines.dsh` 与逐版本
|
|
37
|
+
`dshReleases`、根 tarball 去掉 `packages/`(一个包只带一个插件清单)。剩下的两条预检规则
|
|
38
|
+
不是改包能解决的,证据与请求见 [store-preset-exemption.md](store-preset-exemption.md)。
|
|
39
|
+
下一版若要动工具,按本文件第 2 节挑候选;若只等商城结论,则不必发版。
|
|
40
|
+
- **0.22.0 是 rc.3 适配 + 文献检索升级**:DSH 基线 0.2.1-rc.2 → 0.2.1-rc.3(上游
|
|
41
|
+
`standard` 行清单**逐字节未变**,`preset-health` / `drift-probe` / `contract` 在 rc.3 上
|
|
42
|
+
全绿,因此这一半只改声明与证据);`molbio_pubmed_search` / `molbio_pubmed_abstract` 增加
|
|
43
|
+
NCBI API key 通路,走官方 E-utilities(esearch + esummary),无 key 时保持原有 web 检索。
|
|
35
44
|
|
|
36
45
|
---
|
|
37
46
|
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# DSH STORE 上架证据(一次性 Profile:安装 / 启动 / 卸载)
|
|
2
|
+
|
|
3
|
+
本文件记录提交给 DSH STORE 的**兼容声明**及其证据。证据固定在提交本次声明的 commit 上,
|
|
4
|
+
下面的命令可以原样重跑;所有状态都写进临时 `DSH_HOME`,不触碰真实的 `~/.dsh`。
|
|
5
|
+
|
|
6
|
+
## 1. 声明了什么
|
|
7
|
+
|
|
8
|
+
根包 [`package.json`](../package.json) 与面板包
|
|
9
|
+
[`packages/molbio-panel/package.json`](../packages/molbio-panel/package.json) 各声明一份:
|
|
10
|
+
|
|
11
|
+
```jsonc
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=26",
|
|
14
|
+
"dsh": ">=0.2.1-rc.2 <0.3.0-0"
|
|
15
|
+
},
|
|
16
|
+
"dsh": {
|
|
17
|
+
"compatibility": {
|
|
18
|
+
"dshReleases": {
|
|
19
|
+
"0.2.1-rc.1": "unknown",
|
|
20
|
+
"0.2.1-rc.2": "compatible",
|
|
21
|
+
"0.2.1-rc.3": "compatible"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`dsh` 引擎范围的上界写成 `<0.3.0-0` 而不是 `<0.3.0`,是因为 DSH 用
|
|
28
|
+
`semver.satisfies(..., { includePrerelease: true })` 判断(见
|
|
29
|
+
`@deepseek-ai/dsh-app-boot` 的 `unmetRequirements`):带 prerelease 选项时 `<0.3.0`
|
|
30
|
+
会放行 `0.3.0-alpha.1`,而 `-0` 不会。
|
|
31
|
+
|
|
32
|
+
### 为什么 rc.2 / rc.3 是 compatible、rc.1 是 unknown
|
|
33
|
+
|
|
34
|
+
| 版本 | 记录 | 依据 |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| 0.2.1-rc.1 | unknown | 早于本包基线(0.20.1 钉 `0.2.0-rc.2`),未在此版本上运行过;同时也不在 `engines.dsh` 范围内 |
|
|
37
|
+
| 0.2.1-rc.2 | compatible | 0.21.0 / 0.21.1 的发布基线;本文件第 3 节的一次性 Profile 流程在 rc.2 上跑过;`contract` / `preset-health` / `smoke` 均通过 |
|
|
38
|
+
| 0.2.1-rc.3 | compatible | 0.22.0 的发布基线(CI 钉该版本);同一套一次性 Profile 流程在 rc.3 上重跑通过(安装 → 启动 HTTP 200 → 卸载无残留);`contract` / `preset-health` / `drift-probe` / `benchmark-profile` / `smoke` 在 rc.3 上全绿。上游 `standard` 行清单与 rc.2 **逐字节一致** |
|
|
39
|
+
|
|
40
|
+
## 2. 环境
|
|
41
|
+
|
|
42
|
+
| 项 | 值 |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| DSH | `0.2.1-rc.3` |
|
|
45
|
+
| Node.js | `v26.12.1` |
|
|
46
|
+
| pnpm | `11.22.0` |
|
|
47
|
+
| 平台 | Windows(win32 x64) |
|
|
48
|
+
|
|
49
|
+
## 3. 一次性 Profile 的完整流程
|
|
50
|
+
|
|
51
|
+
`DSH_HOME` 指向一个临时目录,profile 从官方 `web` 模板新建:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
export DSH_HOME=<workspace>/.tmp/dsh-store-check
|
|
55
|
+
npm pack --pack-destination "$DSH_HOME" # 得到 dsh-molbio-tools-0.22.0.tgz
|
|
56
|
+
dsh --profile molbio-tgz-check --from-default-profile web --dump-config
|
|
57
|
+
dsh plugin --profile molbio-tgz-check add "$DSH_HOME/dsh-molbio-tools-0.22.0.tgz"
|
|
58
|
+
dsh --profile molbio-tgz-check --dump-config # 安装后的组合树
|
|
59
|
+
dsh --profile molbio-tgz-check --no-open --port 0 # 启动,打印 URL
|
|
60
|
+
curl "http://127.0.0.1:<port>/?token=<token>" # 读回页面
|
|
61
|
+
dsh plugin --profile molbio-tgz-check remove dsh-molbio-tools
|
|
62
|
+
dsh --profile molbio-tgz-check --dump-config # 卸载后的组合树
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
安装用 **tarball** 而不是目录,因为 tarball 就是发布物本身:它能同时证明 `files`
|
|
66
|
+
白名单带全了运行文件(`host.mjs`、`lib/client.js`、单个 `cordis.patch.yml` 的两个 insert、preset)。
|
|
67
|
+
|
|
68
|
+
tarball 是 **115 个文件 / 约 1.0 MB**(`npm pack` 实测 1,004,017 B,解包约 3.2 MB;再改文档会让字节数
|
|
69
|
+
小幅浮动,文件数不变),且 `package/packages/**` 为 **0**:根包不再内嵌
|
|
70
|
+
`packages/molbio-panel`,一个 tarball 里只有一个插件清单(面板包按自己的地址单独发布)。
|
|
71
|
+
面板本身没有因此消失——根包的 `lib/client.js` 就带着它,第 3.2 节的回读可以作证。
|
|
72
|
+
|
|
73
|
+
下面这次是在 **0.22.0 的 tarball** 上、用 **dsh 0.2.1-rc.3** 的 CLI 重跑的(2026-10-25),
|
|
74
|
+
文件数与发布物一致;更早的记录只差版本号与文件数,流程未变。
|
|
75
|
+
|
|
76
|
+
### 3.1 安装
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
+ dsh-molbio-tools file:D:/.../dsh-molbio-tools-0.22.0.tgz
|
|
80
|
+
Packages: +1
|
|
81
|
+
Done in 571ms
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
安装后的 `--dump-config` 出现 bundle 层,且 `host.mjs` 解析到**已安装包内**:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
# == dsh-molbio-tools
|
|
88
|
+
- id: molbio-client
|
|
89
|
+
name: file:///.../profiles/molbio-tgz-check/node_modules/dsh-molbio-tools/host.mjs
|
|
90
|
+
- id: preset-molbio-lab
|
|
91
|
+
config:
|
|
92
|
+
id: molbio-lab
|
|
93
|
+
...
|
|
94
|
+
- id: tool-molbio
|
|
95
|
+
name: dsh-molbio-tools
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 3.2 启动
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
dsh web: http://127.0.0.1:50071/?token=...
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
读回结果:`HTTP 200`、38180 字节;页面里的 `window.__DSH_BOOT__` 图包含
|
|
105
|
+
`dsh-molbio-tools/client.js&rev=a25c3919676b`,即浏览器半被宿主 Loader 发现并进了客户端图——
|
|
106
|
+
这是"启动成功"的可观察证据,而不只是进程没退出。(先用 token 换 cookie,再带 cookie 读 `/`,
|
|
107
|
+
否则第一跳是 303。)
|
|
108
|
+
|
|
109
|
+
### 3.3 卸载
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
- dsh-molbio-tools file:D:/.../dsh-molbio-tools-0.22.0.tgz
|
|
113
|
+
Done in 421ms
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
卸载后四项同时回到初始状态:
|
|
117
|
+
|
|
118
|
+
| 检查 | 结果 |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| `package.json` 的 `dependencies` | 无 `dsh-molbio-tools` |
|
|
121
|
+
| `package.json` 的 `dsh.profile.bundles` | 只剩 `@deepseek-ai/dsh-base`、`@deepseek-ai/dsh-web-app` |
|
|
122
|
+
| `--dump-config` 中的 `molbio` 引用 | **0** |
|
|
123
|
+
| `node_modules` 与 lockfile | 无残留;lockfile importer 为空 |
|
|
124
|
+
|
|
125
|
+
## 4. 补充:从本地目录安装
|
|
126
|
+
|
|
127
|
+
`dsh plugin --profile <p> add <仓库路径>` 同样走通安装 / 启动 / 卸载。唯一差异:卸载后
|
|
128
|
+
pnpm 的 hoisted linker 会在 `node_modules/` 留下一个指向仓库目录的孤儿 junction
|
|
129
|
+
(已不在 lockfile、dependencies、bundles 中,`--dump-config` 也不引用它)。这是 pnpm 对
|
|
130
|
+
目录 link 的清理行为,不是插件状态残留;用 tarball 安装时该残留不出现。
|
|
131
|
+
|
|
132
|
+
## 5. 仓库内验证(同一基线)
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
node test/contract.mjs → 16 checks passed(host 契约、client 产物、tarball 覆盖)
|
|
136
|
+
node test/preset-health.mjs → all 30 rows load on dsh 0.2.1-rc.3
|
|
137
|
+
node test/smoke.mjs → registered 60 tools, all smoke tests passed
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`test/release.mjs` 的 manifest 一致性断言通过;该文件末尾的 npm 版本探测在受限沙箱里
|
|
141
|
+
会拿到 `EPERM`(Node 以管道捕获子进程输出被拒绝),属环境限制,不是插件问题。
|
|
142
|
+
|
|
143
|
+
## 6. 上架路径
|
|
144
|
+
|
|
145
|
+
这是包含两个 DSH 插件的 monorepo,两个包分别提交明确的 tree 地址:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
https://github.com/lovy2004/dsh-molbio-tools/tree/main
|
|
149
|
+
https://github.com/lovy2004/dsh-molbio-tools/tree/main/packages/molbio-panel
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
两者各自带有本文件第 1 节的 `engines` 与 `dsh.compatibility.dshReleases` 声明。
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# 短版(可直接贴到 DSH STORE 的 issue)
|
|
2
|
+
|
|
3
|
+
> 完整说明:[docs/store-preset-exemption.md](store-preset-exemption.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### 技术说明:本 bundle 声明的是官方 Agent preset,不是冒用 `@deepseek-ai/*`
|
|
8
|
+
|
|
9
|
+
本次提交已把 bundle patch 合并为单个 `cordis.patch.yml`,`SUBMISSION_BUNDLE_PATCH_INVALID`
|
|
10
|
+
(`patch` 只接受字符串)已自行解决。剩下两处需要判定:
|
|
11
|
+
|
|
12
|
+
**1. 保护命名空间正则命中的是 preset 容器行,不是替换**
|
|
13
|
+
|
|
14
|
+
预检 `patchEntryIds` 用 `/\bname:\s*['"]?@deepseek-ai\//i` 扫 patch 的**原始文本**。本包 patch 有
|
|
15
|
+
30 行命中:
|
|
16
|
+
|
|
17
|
+
- 1 行是 preset 容器:`- id: preset-molbio-lab` / `name: '@deepseek-ai/dsh-agent-preset'`;
|
|
18
|
+
- 29 行在它的 `config.plugins` 里,是官方 `standard` preset 的原样复制——那是**配置值**,不是插入的入口。
|
|
19
|
+
|
|
20
|
+
DSH 里 preset 只有这一种写法:官方 `@deepseek-ai/dsh-web-app@0.2.1-rc.2` 的
|
|
21
|
+
`presets/standard.patch.yml` 第 6 行也是 `name: '@deepseek-ai/dsh-agent-preset'`(ptc/minimal/cordis
|
|
22
|
+
同);其 `cordis.patch.yml` 注释写明 shipped preset 是 `presets/` 下的独立 patch 文件。本包只是用同一
|
|
23
|
+
机制承载自有 preset(id `molbio-lab`),新增 entry 只有 `molbio-client`、`preset-molbio-lab`,没有
|
|
24
|
+
disabled、没有覆盖官方行。
|
|
25
|
+
|
|
26
|
+
请求:按**解析后的 `insertedEntries`** 判定保护命名空间,并对
|
|
27
|
+
`name === '@deepseek-ai/dsh-agent-preset'` 且 `config.id` 为插件自有 id 的容器行放行;
|
|
28
|
+
`config.plugins` 按配置处理,不按入口;仍然禁止 `disabled`、禁止覆盖官方 entry id、禁止把官方包名
|
|
29
|
+
作为被插入的实现。
|
|
30
|
+
|
|
31
|
+
**2. 身份规则拒绝了惰性锚点行,而改成子路径会让面板消失**
|
|
32
|
+
|
|
33
|
+
`- id: molbio-client` / `name: './host.mjs'` 是浏览器半的宿主锚点(不注册任何工具,只为让 DSH 的
|
|
34
|
+
客户端模块扫描能发现本包的 `dsh.client`)。身份规则要求插入行解析到本包,看起来可以改成
|
|
35
|
+
`dsh-molbio-tools/host`——**不行**:
|
|
36
|
+
|
|
37
|
+
`@deepseek-ai/dsh-client-modules` 的 `exactPackageSpecifier` 只接受 `@scope/name` 或裸包名,任何含
|
|
38
|
+
`/` 的非 scoped 说明符返回 `undefined`,`locatePkgJson` 随即返回 `undefined`,该行永远不会被客户端
|
|
39
|
+
扫描发现,右栏 Molbio/Papers 两个 tab 会静默消失。改成包根 `dsh-molbio-tools` 也不可行:根模块是
|
|
40
|
+
工具入口,会把 60 个工具注册进该 profile 的每个会话——这正是本包要避免的。
|
|
41
|
+
|
|
42
|
+
请求:允许「`name` 以 `./` 开头、解析基准为 manifest 所在包目录、解析结果留在包内且文件已分发」的
|
|
43
|
+
自引用 insert 行;或把本固定 commit 送入人工专项审阅,按实际内容判定。
|
|
44
|
+
|
|
45
|
+
完整说明(官方文件路径、代码位置、可复现方式):
|
|
46
|
+
https://github.com/lovy2004/dsh-molbio-tools/blob/main/docs/store-preset-exemption.md
|