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. 适合需要防止智能体或脚本误删文件、保障数据安全的用户。

Package
dsh-delete-guard
Compatibility
Unverified
Version
2.2.3
License
MIT
Last updated
Oct 23, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:deepestevan/dsh-delete-guard

配置

在 profile 的 cordis.patch.yml 里覆盖(config 是整块替换,要保留的键必须重述):

键默认含义
enabledtrue总开关
blockDestructiveCommandstrue拦截 shell 删除并重定向到 file_trash
forbidEmptyRecycleBintrue禁止清空或改动回收站
forbidWipetrue禁止 shred / sdelete / srm / cipher /w / format
blockScriptDeletestrue禁止脚本文件与内联字符串里的删除