nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:zhangyuantong/dsh-session-scrub
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness (DSH) 加一个彻底清理会话的入口:不只是删掉侧边栏那一行,而是把这个会话在本机留下的所有痕迹一起收走。
官方只有「归档」(把会话藏起来,日志永远留在磁盘上),以及 workspace 的删除(保留会话)。本插件补的是真正的删除。
| 能力 | dsh-session-scrub | dsh-session-purge | dsh-session-cleaner |
|---|---|---|---|
| 删除会话日志 | ✅ | ✅(移入回收站) | ✅ |
| 工作区登记摘除 | ✅ | ✅ | ✅ |
| 子代理(subagent)级联删除 | ✅ | — | — |
| 定时任务联动删除 | ✅ | — | — |
| 投影缓存清理 | ✅ | 部分 | — |
| 临时溢出文件(spill)清理 | ✅ | — | — |
| 附件引用感知回收(只删无人引用的 blob) | ✅ | — | — |
| 图片变体缓存清理 | ✅ | — | — |
| 浏览器本地(草稿/右栏/排序)清理 | ✅ | — | — |
| 孤儿会话自愈 | ✅ | — | — |
| 可撤销(回收站) | ❌ | ✅ | ❌ |
一句话:它们管“删掉那一条”,本插件管“删干净”。
桌面版(DeepSeek Harness 应用):桌面版只能用自带 CLI 管理 desktop profile,普通 dsh 命令管不了它。
"%LOCALAPPDATA%\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add dsh-session-scrub
装在别处就把前半段换成 <安装目录>\resources\runtime\cli\bin\dsh.cmd。也可以在 DSH 的插件市场里按包名 dsh-session-scrub 安装(市场和 profile 用同一个 npm 源即可)。
Web / TUI 版:
dsh plugin --profile <你的 profile> add dsh-session-scrub
也可以从本地目录或 tgz 安装:
dsh plugin --profile <你的 profile> add file:/path/to/dsh-session-scrub
装完重启 DSH(Host 半边只在启动时装载),然后刷新页面。
会话行右键 → 彻底清理此会话 → 确认。
删除分两段,弹窗里都能看到:
装好后可在 profile 的 cordis.patch.yml 里覆盖,全部有默认值:
- id: dsh-session-scrub
config:
attachmentSweep: true # 是否回收无人引用的附件
orphanSweep: true # 删完是否顺带清理孤儿会话
orphanMinimumAgeHours: 24 # 多久没主人的会话才算孤儿
draftGraceMinutes: 60 # 新附件保护窗口
sweepBudgetSeconds: 90 # 后台回收的时间上限
diagnostics: false # 是否挂载只读诊断路由(开发用)
dsh-session-purge。detachSession。若某个 DSH 版本没有它,插件会提示“该行可能残留”而不是静默失败。0.2.2-rc.1 · Windows 11 · Node 24。没有在 macOS/Linux 上实机验证。0.2.2-rc.2(同一 patch 线,会话层接口未变)。connection.fetch、webServer、sessionPersistence、sessionQuery、workspaceRegistry、schedule、agents)与上面那一个内部方法。node --test test/*.test.js
lib/logic.js 是纯函数(配置归一化、孤儿判定、附件引用解析、路径守卫、告警折叠),测试只覆盖它;lib/index.js 只有副作用。
Adds deep scrubbing of one DSH session: not just removing the sidebar row, but reclaiming everything the session left on this machine — its log, subagent children, scheduled tasks that reference it, workspace accounting, projection cache, spill files, and every attachment no other session still cites.
Official DSH only offers archive (hide the row, keep the log forever). This plugin performs the actual removal.
dsh-session-purge (recycle bin): purge is undoable but moves only the
session directory; this plugin additionally cascades subagents, removes schedules,
clears projection cache/spill, and reclaims unreferenced attachments.dsh-session-cleaner: cleaner deletes the row; this plugin also cleans the
derived state around it.Refuses running sessions and the session currently open in the conversation view; keeps attachments still cited by any surviving session; skips running subagents; keeps attachment objects younger than the draft grace window; never touches forks.
Desktop app: only the CLI bundled with the app can manage the reserved desktop profile.
"%LOCALAPPDATA%\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add dsh-session-scrub
For a custom install location, replace the leading path with <install dir>\resources\runtime\cli\bin\dsh.cmd. You can also install it from the DSH plugin marketplace by package name.
Web / TUI:
dsh plugin --profile <profile> add dsh-session-scrub
Restart DSH afterwards, then refresh the page. Right-click a session → Scrub this session.
attachmentSweep, orphanSweep, orphanMinimumAgeHours, draftGraceMinutes,
sweepBudgetSeconds, diagnostics — see the Chinese section for a YAML example.
Verified on DSH 0.2.2-rc.1, Windows 11, Node 24; expected compatible with 0.2.2-rc.2. Not verified on macOS/Linux.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session。