deepestevan/dsh-delete-guard ↗★ 0
dsh-delete-guard
Force every DSH file deletion through the OS Recycle Bin. Intercepts shell tool calls at tools/pre-execute (pwsh, bash, cmd, the persistent terminal), rewrites destructive delete commands into a recoverable recycle-bin move (Win32 SHFileOperation / SHQueryRecycleBin), and blocks permanent-erase escapes. 适合需要防止智能体或脚本误删文件、保障数据安全的用户。
Other repositories with this package name
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:deepestevan/dsh-delete-guardREADME
Read the full README ↗配置
在 profile 的 cordis.patch.yml 里覆盖(config 是整块替换,要保留的键必须重述):
| 键 | 默认 | 含义 |
|---|---|---|
enabled | true | 总开关 |
blockDestructiveCommands | true | 拦截 shell 删除并重定向到 file_trash |
forbidEmptyRecycleBin | true | 禁止清空或改动回收站 |
forbidWipe | true | 禁止 shred / sdelete / srm / cipher /w / format |
blockScriptDeletes | true | 禁止脚本文件与内联字符串里的删除 |