dsh-auto-mode
DSH 自动模式插件,在批准、阻止或确认受权限限制的工具调用前,先通过大语言模型进行审查路由。
AI 分析
核心用途是为敏感或高风险的工具调用提供AI自动审查与安全拦截。适合需要自动化执行工具但又希望引入智能安全防护的开发者或高级用户。
安装
$
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.