dsh-shield
Manifest validDSH Hands-Off Mode Safety Net: directory deletions go to the Recycle Bin first, link deletions are never followed, zero approvals required.
dsh-shield
DSH 脱手模式安全网:删除目录先进回收站、删除链接绝不跟随。零审批、零弹窗,agent 体验不变。
能力
- 目录删除先进回收站:bash 的
rm -r/-rf、cmd 的rmdir/rd/del /s、fs 工具的目录删除,执行前把目标 rename 进回收站(同卷瞬时),命令照常执行 - glob 抢救:
rm -rf dir/*、dir/*.log逐个抢救子项;父目录是链接时顺链接解析,抢救真实目标内容 - 链接绝不跟随:
rm -rf link/自动改写为删链接本身 - 回收站管理:设置页「回收站」分区 —— 查看 / 恢复 / 删除 / 清空;超 14 天或 5GB 自动清理
- 可选系统回收站:配置
trashMode: system走系统回收站(失败自动回落)
配置(profile 补丁层,均可省略)
- id: dsh-shield
config:
trashRoot: D:\\path\\to\\trash # 默认 $DSH_HOME/trash
retentionDays: 14
maxTrashBytes: 5368709120
trashMode: dir # dir | system
安全边界
- 只抢救不拦截:命令仍会执行,agent 无感
- 单目标 + 常见 glob 场景已覆盖;极端 shell 花样以回收站兜底
- 管理 API 仅本机回环可用
测试
node test.mjs # 27 项
License
MIT
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 1.0.0 | — | — |
Comments
Loading…
Similar plugins
by Xylocarpro
强制 DSH 删除走回收站、禁用 del/rm/Remove-Item,回收站或硬盘满时停手询问用户。
★ 0
MIT
JavaScript
Aug 29, 2026
dsh plugin --profile web add dsh-plugin-recycle-binby heiheiha798
Ownership-checked tools and HTTP routes to list, release and permanently delete subagent sessions, with automatic web UI refresh after deletion.
★ 4
MIT
JavaScript
Oct 22, 2026
dsh plugin --profile web add dsh-plugin-subagent-deleteby liceses
把 DSH Web 左侧栏的「工作区」重做为文件系统树双模式。核心原则: 工作区 = 目录强绑定——会话的 cwd 就是它所在的目录,环境真正隔离。
★ 6
MIT
JavaScript
Oct 7, 2026
dsh plugin --profile web add dsh-workspace-treeby SUJIElearning
DSH 回收站(删除冷静区):归档的对话进入回收站,支持恢复、立即移除、7 天自动清理
★ 0
↓ 36/wk
MIT
JavaScript
Aug 23, 2026
dsh plugin --profile web add @huangzhaoyu/dsh-trashbinby Anna-la
Clean-mode for the Web GUI: hover any element and right-click to remove it; removals survive reloads and are restorable from the settings page.
★ 0
↓ 144/wk
MIT
JavaScript
Aug 28, 2026
dsh plugin --profile web add dsh-simplifyby Aclguh
DSH Web 界面的半透明红色关闭按钮:SVG 图标、可拖动、记忆位置,二次确认后优雅关闭当前 DSH 进程并关闭本页
★ 0
MIT
JavaScript
Sep 14, 2026
dsh plugin --profile web add dsh-web-close