stushansusu/dsh-delete-guard ↗★ 0
dsh-delete-guard
监控并限制会话中的AI文件删除行为 适合需要防止AI误删大量本地文件、保障数据安全的用户。
同名套件的其他儲存庫
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:stushansusu/dsh-delete-guard說明文件
閱讀完整 README ↗配置
在 profile 的 cordis.patch.yml 里按行 id 覆盖(覆盖会替换整份 config,没写的字段回落默认值):
- id: delete-guard
name: 'dsh-delete-guard'
config:
enabled: true
limitBytes: 314572800 # 300 MiB;想按十进制 300 MB 写 300000000
limitFiles: 0 # >0 时同时按文件数封顶
tools: [pwsh, bash] # 需要覆盖哪些 shell 工具
askTimeoutSeconds: 180 # 弹窗等待上限,超时按停止处理
reportTopFiles: 30 # 弹窗/报告里列多少个文件
continueLabel: '继续删除(重置计数)'
stopLabel: '停止并保持阻止(推荐)'
| 字段 | 默认 | 含义 |
|---|---|---|
enabled | true | 总开关,false 时插件完全不介入 |
limitBytes | 314572800 | 每会话累计删除字节阈值 |
limitFiles | 0 | 每会话累计删除文件数阈值,0 = 不启用 |
tools | [pwsh, bash] | 参与检查的 shell 工具名 |
askTimeoutSeconds | 180 | 对话框等待上限(秒),超时按停止 |
reportTopFiles | 30 | 对话框与报告列出的文件条数 |
continueLabel / stopLabel | 见上 | 选项文案,含「继续」即视为放行 |