dsh-molbio-tools 0.20.0 → 0.20.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,47 @@
10
10
  改为按**包名**引用后模块缓存问题随之消失——没有拷贝,也就没有需要保持同步的版本目录。
11
11
  下文历史条目里出现的 `vN` 目录保持原样,作为当时的记录。
12
12
 
13
+ ## [0.20.1] — 2026-10-18(插件专属图标)
14
+
15
+ **工具数不变(60),运行时零改动;包内只多一个 746 B 的 SVG。**
16
+
17
+ ### 1. 插件管理器为什么一直显示默认插画
18
+
19
+ DSH 的插件管理器从包根的清单 `icon` 或导出的 `./icon` 读取展示图,读到的字节会转成
20
+ base64 data URL 交给 `PackageArtwork`;两者都没有时保留面板默认插画。本包此前既没有
21
+ `icon` 字段也没有 `./icon` 导出,因此卡片和插件行一直是默认图——不是缓存,也不是
22
+ 安装坏了,而是**展示元信息根本没声明**。
23
+
24
+ ### 2. 图标:透明底双螺旋,按 30/36 px 的展示尺寸设计
25
+
26
+ `icon.svg`(64×64 viewBox,746 B)是原创的双螺旋:青绿 `#0D9488` 与蓝 `#2563EB`
27
+ 两条主链、四条琥珀 `#F59E0B` 碱基对,圆头描边、无渐变/字体/外部引用。透明底是刻意的:
28
+ 插件管理器把它放进 40×40(行)和 48×48(卡片)的圆角框里,图本身再加一层背景会变成
29
+ “框中框”;不留背景也让同一张图在浅色和深色主题下都成立。主链可视范围约 28×58(64 单位
30
+ 画布),在 36 px 卡片和 30 px 行图标上仍能读出双螺旋,20 px 时退化为可辨的轮廓。
31
+
32
+ ### 3. 接入:导出、白名单,以及一个 gitignore 例外
33
+
34
+ - `package.json` 的 `exports` 增加 `"./icon": "./icon.svg"`,`files` 白名单加入
35
+ `icon.svg`;本包 `files` 是白名单而不是默认全带,漏了它 `npm pack` 就会静默丢掉图标。
36
+ - 根目录的 `/*.svg` 规则原本用来挡住工具生成的图(`logo.svg`、质粒图等),新增
37
+ `!/icon.svg` 例外,图标才能作为源文件提交;git 忽略与 npm `files` 是两套规则,不能只改
38
+ 一处。
39
+ - 不新增依赖、不改 `dsh.client`、不改 preset 行清单;已安装的 profile 是指向本目录的
40
+ junction,重新读取 manifest 即可看到,不需要重装。
41
+
42
+ ### 4. 验证
43
+
44
+ - `createRequire(...).resolve('dsh-molbio-tools/icon')` 解析到包内 `icon.svg`;
45
+ `npm pack --dry-run --json` 的 118 个文件中包含它。
46
+ - 用本包自己的 `svgpng.mjs` 光栅化:64×64,`unsupported: []`;另按 36/30/20 px
47
+ 下采样检查过轮廓。
48
+ - `test/contract.mjs` 16/16;`test/release.mjs` 13/13(本机沙箱下按该测试自带的
49
+ `npm_config_user_agent` 兜底跑通)。
50
+ - 根包 `0.20.0 → 0.20.1`;面板 `0.1.3` 不动(`lib/client.js` 未变,发布前置检查不会
51
+ 要求面板 bump)。标题/描述仍回退到 `package.json` 的包名与长描述;本次没有新增
52
+ `locale/*.json`,如果要本地化展示文案,应作为独立改动。
53
+
13
54
  ## [0.20.0] — 2026-10-17(Cas 家族几何、qPCR 订购/配平、批量分析与静默位点突变;并入 0.19.1 硬化)
14
55
 
15
56
  **工具数 58 → 60,benchmark 56 → 61 题(60/60 覆盖)。** 这一版把 0.19.1 计划的四项硬化直接并入,
package/README.md CHANGED
@@ -44,21 +44,35 @@
44
44
 
45
45
  需要一台已装好 [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harness/) 的机器。
46
46
 
47
- ### 推荐:专属模式 preset(2 步)
47
+ ### 推荐:在 DSH 插件页安装(3 步)
48
48
 
49
49
  装完后,预设选择器里会出现 **Molecular Biology Lab** 模式;**60 个工具只在这个模式里出现**,
50
- 不会污染你其它会话(这点很重要:工具多了会占提示预算)。
50
+ 不会污染你其它会话(这点很重要:工具多了会占提示预算)。**右栏的 Molbio / Papers 两个面板也随这个包
51
+ 一起装好**,不需要再装 `dsh-molbio-panel`。
51
52
 
52
- ```powershell
53
- # 1. 把包装进你的 profile(web 是默认 profile 名,按需替换)
54
- dsh plugin --profile web add D:\path\to\dsh-molbio-tools
53
+ 1. 打开 DSH Web GUI,点侧栏的 **插件**(Plugins)。
54
+ 2. 点 **添加插件**(Add plugin),在「包名或地址」里输入 `dsh-molbio-tools`,点 **安装**(Install);
55
+ 装完点 **立即启用**(Enable now)——关掉对话框只会装好、不会启用,之后也可以在插件页打开它的开关。
56
+ 3. 重启该 profile,然后在预设选择器里选 "Molecular Biology Lab" 新建会话。
57
+
58
+ ### 次选:命令行安装
55
59
 
56
- # 2. 重启该 profile,然后在预设选择器里选 "Molecular Biology Lab" 新建会话
60
+ 没有图形界面时(例如服务器上只用 CLI),用这条命令;它和插件页安装等价,都从 npm registry 取包:
61
+
62
+ ```bash
63
+ # web 是默认 profile 名,按需替换;装完同样要重启该 profile
64
+ dsh plugin --profile web add dsh-molbio-tools
57
65
  ```
58
66
 
59
- **升级**同样只有一条命令,不用重新复制、也不用改配置:
67
+ > 只有在改本仓库源码、还没发布到 npm 时,才需要从本地目录安装
68
+ > (路径按实际情况替换,Windows 示例):
69
+ > ```powershell
70
+ > dsh plugin --profile web add D:\path\to\dsh-molbio-tools
71
+ > ```
60
72
 
61
- ```powershell
73
+ **升级**(图形界面装的也适用)同样只有一条命令,不用重新复制、也不用改配置:
74
+
75
+ ```bash
62
76
  dsh plugin --profile web update dsh-molbio-tools
63
77
  ```
64
78
 
@@ -102,15 +116,20 @@ dsh plugin --profile web update dsh-molbio-tools
102
116
  > 如果你确实想要"工具对所有会话全局可见",那需要把工具行加到宿主层——但那不是本包的设计,
103
117
  > 且会让专属模式里的同一行变成死行(0.1.7 上表现为选择器显示"加载失败")。
104
118
 
105
- ### 只要浏览器面板(可选)
119
+ ### 只要浏览器面板
106
120
 
107
121
  如果只想要图形面板、不想让该 profile 装 60 个工具(连模式都不装),装面板专用包即可
108
- (见[浏览器面板](#浏览器面板)):
122
+ (见[浏览器面板](#浏览器面板可选))。**它和 `dsh-molbio-tools` 二选一**:两者注册同一组右栏 tab
123
+ (`dsh-molbio-tools` / `dsh-molbio-tools/papers`),同时装会重复注册并报
124
+ `tab type id ... is already registered`。同样在 **插件 → 添加插件** 里输入 `dsh-molbio-panel`,
125
+ **安装** → **立即启用**。命令行等价于:
109
126
 
110
- ```powershell
111
- dsh plugin --profile <profile> add D:\path\to\dsh-molbio-tools\packages\molbio-panel
127
+ ```bash
128
+ dsh plugin --profile <profile> add dsh-molbio-panel
112
129
  ```
113
130
 
131
+ > 从本地源码目录安装时,把包名换成 `<包目录>/packages/molbio-panel`。
132
+
114
133
  ---
115
134
 
116
135
  ## 它会做什么
@@ -32,7 +32,7 @@
32
32
 
33
33
  - **包**:`dsh-molbio-tools`,零依赖 DSH 插件包,**60 个 `molbio_*` 工具**(其中
34
34
  `molbio_plot` 一个工具承载 8 种图表)。
35
- - **基线**:DSH **0.2.0-rc.2**;`package.json` 版本 0.20.0。
35
+ - **基线**:DSH **0.2.0-rc.2**;`package.json` 版本 0.20.1。
36
36
  - **两条分发渠道**:根包(工具 + 面板)与 `packages/molbio-panel`(只面板),
37
37
  **两个独立的 npm 条目、两条独立的版本线**,必须分别发布。
38
38
  - **工具只在专属模式里出现**(设计如此):bundle 的 `cordis.patch.yml` 是**空列表**,
package/icon.svg ADDED
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <line x1="24.26" y1="15" x2="39.74" y2="15" stroke="#F59E0B" stroke-width="2.6" stroke-linecap="round"/>
3
+ <line x1="24.81" y1="24" x2="39.19" y2="24" stroke="#F59E0B" stroke-width="2.6" stroke-linecap="round"/>
4
+ <line x1="24.81" y1="40" x2="39.19" y2="40" stroke="#F59E0B" stroke-width="2.6" stroke-linecap="round"/>
5
+ <line x1="24.26" y1="49" x2="39.74" y2="49" stroke="#F59E0B" stroke-width="2.6" stroke-linecap="round"/>
6
+ <path d="M32 6C16 13 16 25 32 32C48 39 48 51 32 58" fill="none" stroke="#2563EB" stroke-width="6" stroke-linecap="round"/>
7
+ <path d="M32 6C48 13 48 25 32 32C16 39 16 51 32 58" fill="none" stroke="#0D9488" stroke-width="6" stroke-linecap="round"/>
8
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-molbio-tools",
3
- "version": "0.20.0",
3
+ "version": "0.20.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 and hydropathy 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, read-level FASTQ QC, 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 and sequence logos drawn in the Web GUI) and a literature/protocol/experiment record system.",
5
5
  "type": "module",
6
6
  "main": "index.mjs",
@@ -11,7 +11,8 @@
11
11
  ".": "./index.mjs",
12
12
  "./client": {
13
13
  "default": "./lib/client.js"
14
- }
14
+ },
15
+ "./icon": "./icon.svg"
15
16
  },
16
17
  "scripts": {
17
18
  "build:client": "node build/client-bundle.mjs",
@@ -76,6 +77,7 @@
76
77
  "batch.mjs",
77
78
  "silent-site.mjs",
78
79
  "host.mjs",
80
+ "icon.svg",
79
81
  "build",
80
82
  "lib",
81
83
  "packages",