Repository navigation
Releases: Yeqij/dsh-disk-doctor
Release list
v0.1.1 — 兼容 DSH 0.2.1-rc.2
修复与 DSH 0.2.1-rc.2 的兼容性。0.1.0 在该版本上会被判定为不兼容并拒绝加载,右侧栏的「磁盘空间」面板因此消失。
原因
DSH 的插件准入规则是:清单声明了 engines.dsh 时按该范围判定;没有声明时,逐一比对 peerDependencies 里每个 @deepseek-ai/dsh-* 的范围。
0.1.0 没有声明 engines.dsh,而它的 @deepseek-ai/dsh-tools peer 白名单止于 0.2.0-rc.2,于是 DSH 0.2.1-rc.2 不在其中,被判为不兼容。
插件代码本身没有问题:宿主半边在 0.2.1 的真实依赖(dsh-tools 0.2.1-rc.2 / schemastery 3.18.5 / cordis 4.0.5)下能正常注册 disk_report 工具。
修复
- 声明
engines.dsh: ">=0.1.0-rc.2 <0.3.0",由它决定准入,不再依赖逐个版本枚举——DSH 后续的小版本更新不会再被卡住 @deepseek-ai/dsh-tools的 peer 列表补上0.2.1-rc.2,让 pnpm 解析时不再报警告dsh.compatibility.dshReleases记录0.2.1-rc.2为 compatible- 新增断言:
engines.dsh必须存在,且列出的每个 DSH release 都必须是 compatible——原测试断言的是数组字面量,这正是这个缺口没被测试发现的原因
升级
dsh plugin --profile <profile> add dsh-disk-doctor或在插件页里更新后重启 DSH。
验证
- 177 项测试全部通过
- 宿主半边在真实的
dsh-tools 0.2.1-rc.2下成功注册工具 - 按 DSH 文档描述的准入规则模拟:
0.2.1-rc.2→ ACCEPTED
English
Fixes compatibility with DSH 0.2.1-rc.2, where 0.1.0 was refused as incompatible and the sidebar panel disappeared.
DSH reads engines.dsh when the manifest declares it, and otherwise compares every @deepseek-ai/dsh-* peer range against the runtime. 0.1.0 declared no engine range and its dsh-tools peer list ended at 0.2.0-rc.2, so 0.2.1-rc.2 matched nothing. The plugin code itself was fine — it registers disk_report against the real 0.2.1 dependencies.
engines.dsh: ">=0.1.0-rc.2 <0.3.0"now decides admission.0.2.1-rc.2joins the enumerateddsh-toolspeer list.dsh.compatibility.dshReleasesrecords 0.2.1-rc.2.- A test now asserts the engine range exists and that every listed release is claimed compatible.
177 tests pass; a simulation of DSH's documented admission rule accepts 0.2.1-rc.2.
v0.1.0 — DSH 空间体检(首个版本)
DSH 空间体检的第一个版本:把 DeepSeek Harness 的磁盘占用摊开,并给出一个永不删除的整理方式。
当前功能
- 三个区并排统计,永不相加 —— DSH 数据 / DSH 程序 / 系统缓存,各自给数并写明为什么不能相加:pnpm 内容仓库里放的就是插件
node_modules硬链接过去的同一批物理文件,相加会把同一批字节算两遍。 - 路径全自动探测 —— 数据目录跟随
$DSH_HOME(回落~/.dsh);程序安装目录从运行中的可执行文件探测,且必须真的存在resources/app.asar才认(无头node部署会老实报"没找到");两个系统缓存按%APPDATA%/%LOCALAPPDATA%探测,另有.config与Library/Application Support回落;npm 全局安装的那份 DSH 单独认出来。探不到就说探不到,不猜。 - 右侧栏常驻面板 —— 分类构成、每类 Top N 明细、按插件 / 按聊天记录两个视图、每行一个「在文件管理器里打开」;中文 / English 双语。
- 可撤销的清理:预演 → 移动 → 撤销 —— 只处理 🟢「可以安全清理」的四类;开关默认关闭,还要二次确认;落点是插件自己的隔离目录
<dshHome>/disk-doctor/quarantine/<时间戳>/;每移动一项就重写一次清单,中途断电也留下与现实一致的记录;一键按清单撤回。 - 从不删除 —— 全包没有任何
unlink/rm/rmdir调用,唯一会改动你文件系统的是lib/cleanup.js里的一次renameSync。清空隔离目录是你自己的事。 - 不联网 —— 清单里声明
network: [],并有测试钉住"两半代码都不得出现出站调用"。 - 脱敏 —— 会离开这台机器的输出(工具结果、Markdown / JSON 报告)一律把主目录替换成
~;只有本机面板显示真实路径,因为那是你要复制和打开的地方。 disk_report工具 —— 让模型直接做一次体检:Markdown 摘要进对话,同时写出一份.md与一份.json报告。
安装
要求 DSH >=0.1.0-rc.2(实测 0.2.0-rc.2)、Node.js ^22.19.0 || >=24.0.0。零运行时依赖、零构建步骤。
dsh plugin --profile <profile> add dsh-disk-doctor装完重启 DSH(bundle 在启动时组装)。
其他方式(npm 不可用时):
- 直接从本仓库装:
dsh plugin --profile <profile> add https://github.com/Yeqij/dsh-disk-doctor - 用本页附件里那个与 npm 完全相同的 tgz:
dsh plugin --profile <profile> add https://github.com/Yeqij/dsh-disk-doctor/releases/download/v0.1.0/dsh-disk-doctor-0.1.0.tgz - 下载本仓库,在 插件 / Plugins → 添加插件 里粘贴文件夹的完整路径
已知限制
- 只在 Windows 上实测过;macOS / Linux 的路径探测回落写了,但没有在那些平台上验证过。
- 三个区的数字不能相加,这是刻意的(见上)。
- 分类依赖 DSH
0.2.0-rc.2的目录布局;DSH 换大版本时某一类可能为空 —— 会给出提示,不会崩。 - 隔离目录里的内容需要你自己清空。
测试
177 项全部通过(locate 18 / scan 55 / plugin 41 / client 63),不需要 DSH 宿主或已安装的 peer 包:
git clone https://github.com/Yeqij/dsh-disk-doctor.git
cd dsh-disk-doctor
npm testEnglish
First release of dsh-disk-doctor — read-only disk accounting for DeepSeek Harness, with a cleanup that never deletes.
Three areas are reported side by side and never summed, because the pnpm content store holds the very files the plugin node_modules trees hard-link to. Every path is detected rather than guessed, and a path that cannot be found is reported as not found. A resident bilingual sidebar panel shows the breakdown, Top-N detail per category, and by-plugin / by-conversation views. Cleanup is opt-in, previews before it acts, moves by rename into the plugin's own quarantine folder, rewrites its manifest after every single item, and undoes with one click — the package contains no delete call at all and makes no network request. Outgoing reports replace your home directory with ~.
Install:
dsh plugin --profile <profile> add dsh-disk-doctorAlso installable straight from this repository (dsh plugin --profile <profile> add https://github.com/Yeqij/dsh-disk-doctor), from the identical tarball attached to this release, or by pasting the folder path into Plugins → Add plugin. Requires DSH >=0.1.0-rc.2 (verified against 0.2.0-rc.2) and Node ^22.19.0 || >=24.0.0.
Tests: 177 passing (locate 18 / scan 55 / plugin 41 / client 63).
Known limitations: verified on Windows only; the three area figures must not be summed; category paths follow DSH 0.2.0-rc.2's layout; emptying the quarantine folder is left to you.