StyxNether/dsh-auto-approval-plugin ↗★ 3
dsh-auto-approval-plugin
A middle permission tier for DeepSeek Harness between workspace-write and danger-full-access: auto-approves harmless commands and operations targeting configured trusted areas, beyond the current workspace. 适合希望在工作区外自动执行安全指令以简化审批流程的用户。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:StyxNether/dsh-auto-approval-pluginEvery configuration option, and what changing it does
| Option | Default | What it does | Effect of changing it |
|---|---|---|---|
mode | gated | Master switch + scope | off: disables auto-approval entirely (the Auto Approval tier then behaves exactly like Workspace Write); global: auto-approve under any session tier; gated: auto-approve only while the session tier is auto-approval |
trustedAreas | [] | Trusted areas (absolute paths) | Empty: the plugin is left with only the harmless-introspection capability. Adding directories grants in-area git read commands, in-area simple commands, and in-area fs writes (see "Trusted area vs outside" below) |
harmlessPatterns | read-only introspection set (see lib/decide.js) | Regexes that classify a command as "harmless"; a match (without shell metacharacters) auto-approves | Adding entries auto-approves more commands; removing restores human confirmation. Add only read-only, side-effect-free commands (the read surface should not exceed the DSH read tool) |
dangerousPatterns | high-impact set (system wipes, privilege escalation, ACL, firewall, registry, persistence…) | A match defers to the human — never auto-approved, never denied | More entries send more high-impact operations to the human; fewer entries widen the auto window (not recommended). The principle is "rather wider than miss": a false positive costs one extra confirmation, a false negative could auto-approve a destructive command |
maxCommandChars | 4000 | Length cap for commands/targets; longer inputs defer | Smaller: longer commands always ask; larger: longer commands may participate in auto-decision (mind the widening) |
logDecisions | true | Whether each auto-approval is written to the process log (auto-approval: granted … (rule)) | false quiets the log but drops rule-level audit lines (the approval/decided audit pair in the session log is still written) |
trustedHosts | [] | Non-loopback hosts allowed to reach the plugin's config HTTP API | Unset: loopback only. Adding entries allows remote management from those hosts (cross-site requests are still rejected) |
All of the above apply immediately:
settings.yamlis hot-reloaded and the web card saves take effect without a restart.