为 DSH 补上按工具粒度的权限规则:在 tools/pre-execute 强制执行 deny/ask 清单,规则语法与 Claude Code 相同,不迁移也能单独用。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-movein-permissions
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:sjh9714/dsh-movein#path:/plugin
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
Fine grained, per tool permission rules for DeepSeek Harness (DSH).
DSH ships three coarse permission presets (read-only, workspace-write, danger-full-access) and its README names the missing piece itself, there is no per tool allowlist. This plugin adds one at the tools/pre-execute gate, using Claude Code's battle tested rule syntax. You do not need to be migrating from Claude Code to use it.
为 DSH 补上按工具粒度的权限规则。DSH 自带的三档权限预设没有细粒度控制,这个插件在 tools/pre-execute 强制执行 deny/ask 规则,规则语法与 Claude Code 相同。不迁移也能单独用。
Install
dsh plugin --profile web add dsh-movein-permissions
Then add a row to ~/.dsh/cordis.patch.yml (or your profile's patch):
- insert:
- id: cc-permissions
name: 'dsh-movein-permissions'
config:
deny:
- 'Bash(rm -rf:*)'
- 'Read(*secrets*)'
- 'mcp__github__delete_repo'
ask:
- 'Write'
- 'Bash(git push:*)'
Restart dsh web. Denied calls return a typed refusal to the model, ask rules force a confirmation.
Rule syntax
Claude Code permission rule shape, Tool or Tool(specifier).
| Rule | Meaning |
|---|---|
Bash(npm run test:*) |
any shell command starting with npm run test (matched on terminal_* tools) |
Read(*secrets*) |
any read whose path contains secrets |
Write |
every write |
mcp__server__tool |
one exact MCP tool, names are identical in DSH and Claude Code |
Mapped tools. Bash (terminal_open/terminal_send and friends), Read, Write, Edit, and every mcp__* tool. * patterns match as a superset, over-denying is the safe direction for a gate.
Deny wins over ask. Rules that reference tools with no DSH equivalent never match anything, harmless but pointless, the dsh-movein migration report lists them for you.
Coming from Claude Code?
npx dsh-movein --apply generates this row from your existing settings.json automatically, along with the rest of your setup.
License
MIT
链接
同类插件
strukto-ai/mirage#dsh★ 3425
把文件系统与 bash 提供者换成 mirage 虚拟工作区:文件工具与 shell 命令作用于挂载的资源(RAM、S3、Redis、Slack、Gmail、Notion、Postgres)而非宿主磁盘,支持按挂载点设置读/写/执行模式、按命令选择沙箱(进程内 monty、pyodide、quickjs;远程 docker、e2b、daytona),并可在虚拟终端中安装 CLI(git、gh、slack、linear、ntn、gws,或自行注册的程序树)作为命令头词。
hust-open-atom-club/oh-dsh★ 175
社区发行版:TUI、桌面端与 Web UI 统一体验,分层安装、一步到位。
Jayden-X-L/forkprobe★ 65
同一任务并行试跑多个技能,对比结果选出最优。
vlln/plugin-registry★ 39
插件生态基建:浏览器面板管理官方 repository 插件(0 patch)+ make-dsh-plugin 插件开发引导技能。
forrestchang/dsh-multica-runtime★ 33
让 dsh 运行时跑在 Multica 上。
DietCokewithSugar/dsh-user-experience★ 18
帮你发现项目中可能存在的用户体验问题:自动走查 React/TypeScript 源码,定位问题并给出具体优化建议。