PerryLink/dsh-permission-rules ↗★ 0
dsh-permission-rules
Declarative Claude Code-style permission rules for DeepSeek Harness: ordered allow/deny/ask rules with tool-name, argument (glob/regex), and workspace-path matching on the tools/pre-execute waterfall, full session-log audit, and HMR rule reload.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-permission-rules说明文档
阅读完整 README ↗🛡️ dsh-permission-rules
DeepSeek Harness 的 Claude Code 式声明式权限规则。
规则裁决已知,reviewer 模型裁决未知。
English · 简体中文 · Español · Português · हिन्दी
它能做什么
dsh-permission-rules 在 tools/pre-execute waterfall 上为每一次工具调用放置一个有序的 allow / deny / ask 规则列表——确定性、零延迟、可审计,规则用你写的普通 YAML 声明:
deny阻止调用。规则的reason成为模型可见的错误,让 agent 知道为什么而不是盲目重试。ask走官方审批 seam。同时挂载dsh-auto-review时由第二模型裁决;否则人类审批;两者都没有时 harness fail-closed。allow(以及无命中)严格通过next()委托——绝不短路下游监听器。
每次命中和每次透传都会以 permissionRules/decision 会话事件审计落盘(log-only,不向模型上下文注入任何额外内容)。
tools/pre-execute waterfall approval/request waterfall(answerer 链)
│ │
dsh-permission-rules dsh-auto-review answerer
· 按文件顺序首条命中 ┌───────────────┴──────────────┐
· deny/ask 认领调用 │ 第二模型裁决 │ 否 ── next() ──▶ 人类 UI
· allow/透传 → next() └───────────────┬──────────────┘
│ deny ──▶ 被拒工具结果 │ allowed-once / rejected
│ ask ──▶ ctx.approval ────────────────────────┘
│
审计:permissionRules/decision → approval/asked → autoReview/verdict → approval/decided