dsh-access-mode
Standalone DeepSeek Harness access-mode plugin with Default, No Edit, and Auto modes
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ddll8023/dsh-access-mode说明文档
阅读完整 README ↗dsh-access-mode
给 DeepSeek Harness(DSH)会话提供 Default / No Edit / Auto 三种访问模式,控制 AI 能自动执行什么、什么需要审批、使用哪种 Sandbox。
- 兼容版本:DSH
>= 0.1.0-rc.6 - License:MIT
功能特性
- 在 Web composer 左侧提供 Default / No Edit / Auto 三个访问模式下拉选择器。
- 替换原生 Permission Presets 选择器,不修改 Harness 核心代码、Agent loop、工具实现或模型调用流程。
- 模式按 Agent session 持久化,切换后 Sandbox 与 Approval 策略同步生效。
- 复用 Harness 原生 Approval、Sandbox、Tool Execution、Session 和 Remote Command 服务。
安装与启用
方式 A(推荐):dsh plugin
# 直接从 GitHub 安装(推荐)
dsh plugin --profile web add github:ddll8023/dsh-access-mode
# 或先 clone 到本地,再安装本地路径
git clone https://github.com/ddll8023/dsh-access-mode.git
dsh plugin --profile web add /绝对路径/dsh-access-mode
# 已发布到 npm registry 后也可使用包名:
dsh plugin --profile web add dsh-access-mode
dsh plugin 需要 pnpm,可以通过 corepack enable pnpm 启用。安装后重启 dsh web,插件会随 web profile 启动。
方式 B:手动加入 profile
- 将插件包放入
$DSH_HOME/profiles/web/node_modules/dsh-access-mode,或执行npm install /绝对路径/dsh-access-mode。 - 在
$DSH_HOME/profiles/web/package.json的dsh.profile.bundles中追加"dsh-access-mode"。 - 重启
dsh web。
验证是否启用
dsh --profile web --dump-config | grep -A2 access-mode
预期能看到类似:
- id: access-mode
name: dsh-access-mode
重启并刷新 Web GUI 后,composer 左侧会出现 Default、No Edit、Auto 三个访问模式,新会话默认选中 No Edit。host 端代码的变更需要重启 dsh web;只有 client bundle 的变更可以在 client-watch 开启时通过 HMR 更新。
使用
访问模式
插件同时设置会话的工具访问门、原生 Approval 策略和原生 Sandbox 模式:
| 模式 | DSH Sandbox | Approval | 插件访问策略 |
|---|---|---|---|
| Default | workspace-write | ask | 只自动放行只读工具和保守的只读 Bash;编辑、写入、变更或未知操作需要审批 |
| No Edit | danger-full-access | ask | 只有 和 需要审批;其它工具直接放行,Bash 参数不做检查 |