Перейти к основному содержимому
C

dsh-workspace-clean

chenfongchong7-pixel/dsh-workspace-clean

Workspace cleanup protocol and a delete gate for DeepSeek Harness: the agent scans and classifies leftover files, shows a deletion plan, and delete commands need user confirmation before they run, except in full-access mode.

Установка

dsh plugin --profile web add github:chenfongchong7-pixel/dsh-workspace-clean

README

dsh-workspace-clean — DeepSeek Harness

作用

智能体结束编码/探索任务后,按统一流程清理工作区垃圾;所有删除命令必须经你确认才执行(完全权限除外)。

最小用法示例:

你对智能体说:「把工作区清理一下。」

智能体:扫描工作区 → 列出清单(垃圾 / 其他,各带一句证据)→ 展示删除计划 → 弹卡【是(执行删除)】。

你点「是」→ 垃圾进回收站(可还原);你拒绝 → 不删。 智能体若想跳过确认直接删 → delete-gate 弹 DSH 原生确认卡拦住。

前置要求

  • DeepSeek Harness 0.2.x(已在 0.2.2 验证;依赖 cordis 插件体系与 dsh.profile.bundles)
  • Windows:技能里的回收站实现基于 PowerShell + .NET(SendToRecycleBin);其他平台需自行替换回收站命令
  • git(仅方式一安装需要)
  • 无运行时外部依赖:插件不 import 任何 @deepseek-ai/* 包;跑测试只需 Node.js

按照步骤

安装插件

方式一:npm(推荐)

{
  "dependencies": { "dsh-workspace-clean": "^0.1.0" },
  "dsh": { "profile": { "bundles": ["dsh-workspace-clean"] } }
}

安装依赖并重启 DSH。

方式二:GitHub(源码安装)

  1. git clone https://github.com/chenfongchong7-pixel/dsh-workspace-clean.git
  2. 在 profile 的 package.json(如 .dsh\profiles\desktop\package.json)加入:
{
  "dependencies": { "dsh-workspace-clean": "file:../dsh-workspace-clean" },
  "dsh": { "profile": { "bundles": ["dsh-workspace-clean"] } }
}
  1. 安装依赖并重启 DSH。

安装技能

复制 skill/workspace-clean.md 到 DSH 的 skills 目录(默认 .dsh\skills\),无需重启。

验证

对智能体说「把工作区清理一下」:应看到它先列清单、展示删除计划、再弹确认卡,删除结果进回收站。

License

MIT

各文件夹的用处

dsh-workspace-clean/
├── README.md            本文件
├── LICENSE              MIT 许可证
├── package.json         包元数据 + DSH 插件注册入口
├── cordis.patch.yml     插件注册补丁(插件实例 id: delete-gate → lib/index.js)
├── lib/
│   └── index.js         插件实现:delete-gate 删除闸门(零依赖)
├── skill/
│   └── workspace-clean.md   技能文案:清理协议(复制到 .dsh\skills 生效)
└── test/
    ├── unit.test.mjs        单元测试 27 例(node test\unit.test.mjs)
    └── integration.test.mjs 集成测试 13 例(node test\integration.test.mjs)

Похожие плагины