dsh-auto-mode
DSH plugin: auto mode that routes permission-gated tool calls through an LLM review before approving, blocking, or asking for confirmation.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Nuo-cl/dsh-auto-mode说明文档
阅读完整 README ↗Configuration
All options have defaults; a bare {} config is valid.
| Path | Type | Default | Meaning |
|---|---|---|---|
classifier.provider / classifier.model | string | '' | Route for classifier calls; empty follows the session's current model. |
classifier.maxTranscriptMessages | number | 40 | Trailing transcript messages fed to the classifier. |
classifier.maxTokens | number | 512 | Classifier output budget. |
classifier.temperature | number | 0 | Classifier sampling temperature. |
classifier.askFallback | boolean | true | Classifier decision "ask" (uncertain risky call) falls back to the human approval chain; false treats it as a rejection. |
rules.allow | string[] | [] | Always-allow rules (see rule syntax below). |
rules.deny | string[] | [] | Always-reject rules; evaluated before everything else. |
rules.environment | string[] | [] | Free-form environment facts injected into the classifier prompt. |
allowlist | string[] | read, glob, grep, todo_write, web_search, job_list, list_agents | Tools approved without a classifier call. |
failClosed | boolean | false | true: classifier failure rejects; false: falls back to the normal approval chain. |
The auto-mode preset's label, description, and sandbox mode live in cordis.patch.yml, because the permission-preset table must be available when @deepseek-ai/dsh-permission-presets constructs its settings schema.
Rule syntax
tool match a tool by name (case-insensitive), e.g. `read`
tool:pattern match a tool whose request reason contains the pattern, e.g. `read:/etc/`, `pwsh:rm -rf`
* any tool
*:pattern any tool whose reason contains the pattern
A pattern containing * or ? is a wildcard match against the whole reason (read:/etc/*); any other pattern is a case-insensitive substring match.