stushansusu/dsh-delete-guard ↗★ 0

dsh-delete-guard

DSH plugin: measure AI deletions per session, terminate the call once the cumulative size passes a threshold, then ask the user with the list of files already removed. 适合需要防止AI误删大量本地文件、保障数据安全的用户。

Package
dsh-delete-guard
Compatibility
Unverified
Version
1.0.0
License
MIT
Last updated
Oct 22, 2026

Other repositories with this package name

Install

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

配置

在 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: '停止并保持阻止(推荐)'
字段默认含义
enabledtrue总开关,false 时插件完全不介入
limitBytes314572800每会话累计删除字节阈值
limitFiles0每会话累计删除文件数阈值,0 = 不启用
tools[pwsh, bash]参与检查的 shell 工具名
askTimeoutSeconds180对话框等待上限(秒),超时按停止
reportTopFiles30对话框与报告列出的文件条数
continueLabel / stopLabel见上选项文案,含「继续」即视为放行