
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-yolo-mode
Advanced tools
dsh-yolo-mode —— DeepSeek Harness 双面包插件:当会话处于可写沙箱模式且审批策略为 ask 时,用大模型自动裁决沙箱升权申请,支持内置预设与自定义权限层级,并提供宿主 settings + 自发布设置桥(/yolo-mode)与 Web 客户端 UI。
维护状态:官方已在 DSH 中提供实验性 Auto review 能力(
@deepseek-ai/dsh-experimental-auto-review,LLM 逐工具授权审查,在ask审批策略下替代人工审批),与本插件的「LLM 裁判自动审批」功能重叠。因此本插件可能在未来停止维护;如需官方原生的自动审批,可评估该实验性功能。当前版本仍会跟进 DSH 兼容(最近实测 0.2.1-rc.2)。
当会话处于可写沙箱模式、审批策略为 ask 时,dsh-yolo-mode 拦截 escalate sandbox to ... 升权申请,按你选择的预设或自定义权限层级由大模型裁决「放行 / 拒绝 / 转人工」。任何不确定或失败路径都不会放行(fail-closed)。
workspace-write 会话中,对 danger-full-access / workspace-write 升权申请调用大模型分级(allow / deny / unsure),确定时免去人工弹窗。off / strict / balanced(默认)/ permissive / yolo / custom,覆盖从「全部转人工」到「确定性全放行」的完整光谱。levels 支持逐目标模式、逐工具(tools.<toolName>)的 allow / judge / delegate / deny 策略,及 error / unsure 回退。judge.systemPrompt 留空时按预设自动选用对应裁判提示词(strict 最保守、permissive 宽松、custom 按层级表)。# 从 npm
dsh plugin --profile web add dsh-yolo-mode
# 或从本地路径
dsh plugin --profile web add <项目绝对路径>
dsh plugin add 会通过插件包自带的 cordis.patch.yml 自动挂载 yolo-mode 与
yolo-mode-bridge 两个入口,不需要再手动 insert。需要调整配置时,在
$DSH_HOME/profiles/web/cordis.patch.yml 里按 id 覆盖主条目即可:
- id: yolo-mode
name: dsh-yolo-mode
config:
preset: balanced
judge:
provider: <provider>
model: <model>
注意:不要再用
- insert:添加yolo-mode/yolo-mode-bridge,否则启动会报duplicate loader entry id: yolo-mode。
重启 DSH 并刷新浏览器后生效。
dsh plugin --profile web add dsh-yolo-mode(npm 发布版已包含构建产物,
peer 依赖由 DSH 的 $DSH_HOME/profiles/node_modules fallback 提供,开箱即用)。link: 开发时,checkout 需位于 $DSH_HOME/profiles/ 下(或仓库自带
node_modules),否则 @deepseek-ai/* peer 依赖会因 Node 按真实路径解析而报
ERR_MODULE_NOT_FOUND。插件行 config 全字段可选,未填按默认值:
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
preset | off|strict|balanced|permissive|yolo|custom | balanced | 使用的预设;custom 时以 levels 为准 |
modes | string[] | ['workspace-write'] | 会话有效沙箱模式 ∈ 此列表时才介入(read-only / workspace-write / danger-full-access) |
levels | object | {} | 权限层级表;levels.tools.<toolName> 对任意预设逐工具覆盖 |
judge.provider | string | '' | 裁判模型 provider;空 = 未配置(judge 决策按错误回退) |
judge.model | string | '' | 裁判模型;与 provider 同非空才启用裁判 |
judge.systemPrompt | string | '' | 裁判 system prompt;空 = 按预设取默认 |
judge.timeoutMs | number | 20000 | 单次裁判超时(毫秒) |
judge.maxTokens | number | 4096 | 裁判输出最大 token 数(推理型模型需调大,见下方说明) |
judge.concurrency | number | 2 | 并发裁判上限,溢出按错误回退 |
includeSubagents | boolean | true | 子代理会话是否同样裁决 |
auditFile | string | '' | 审计日志路径;空 = %TEMP%/dsh-yolo/judge.log |
⚠️ 推理型模型必须调大
judge.maxTokens:若裁判模型会先输出一段内部推理(reasoning / chain-of-thought)再给出结论 JSON,则 token 预算会被推理内容消耗;预算过小时content为空、finish_reason=length,裁判以BAD_OUTPUT失败并回退为「转人工」(默认预设balanced下表现为每次都弹人工审批)。默认值已从256提升至4096;若仍遇到回退,请继续调大(如8192)。审计日志中此类失败会带error: "BAD_OUTPUT"。
levels)levels:
workspace-write: judge # 目标模式 → 策略
danger-full-access: judge
error: delegate # 裁判错误回退
unsure: delegate # 裁判不确定回退
tools:
pwsh: delegate # 逐工具覆盖,优先级最高
write: allow
策略取值 allow | judge | delegate | deny;优先级:levels.tools[toolName] → 基础行(custom 时为 levels[targetMode],其余预设为内置表)。
| 预设 | workspace-write | danger-full-access | 失败回退 | 不确定回退 | 说明 |
|---|---|---|---|---|---|
off | delegate | delegate | delegate | delegate | 不介入,全部转人工 |
strict 严格 | judge | delegate | rejected | delegate | 仅裁决 workspace-write;danger-full-access 恒转人工 |
balanced 均衡(默认) | judge | judge | delegate | delegate | 裁决全部升级目标;失败 / 不确定转人工 |
permissive 宽松 | judge | judge | delegate | allowed-once | 裁决全部目标;不确定视为允许(慎用) |
yolo | allow | allow | — | — | 确定性全放行,零 LLM 调用 |
custom | 依 levels | 依 levels | 依 levels.error | 依 levels.unsure | 全字段开放 |
每预设默认裁判提示词(judge.systemPrompt 留空时自动选用):
| 预设 | 默认裁判立场 |
|---|---|
off / yolo | 不调用裁判 |
strict | 最保守:danger-full-access 一律拒绝;仅最小范围 workspace-write 且理由极充分才允许 |
balanced | 通用审计:只依据事实、防回环、存疑即 deny/unsure |
permissive | 宽松:理由合理且范围可接受即倾向允许,仅明显破坏性 / 供应链风险拒绝 |
custom | 按 levels 层级表裁决,存疑按 levels.error / levels.unsure 回退 |
YOLO <preset>,点击弹出统计面板(总审批 / 放行 / 拒绝 / 转人工 + 最近决策表,每页 5 条,带上一页 / 下一页翻页)。auditFile 配置或默认 %TEMP%/dsh-yolo/judge.log);文件尚不存在时提示暂无记录。allow 才返回一次性 allowed-once;其余一切路径拒绝或转人工。danger-full-access。ask 策略下作为应答者,不改变 DSH 的沙箱 / 审批词汇。balanced(不确定转人工),不默认启用 permissive / yolo。{time, sessionId, origin, toolName, callId?, targetMode, currentMode, justification, decision, outcome, reason?, error?}。error 仅在裁判失败时出现(值为 JudgeError 错误码,如 BAD_OUTPUT / TIMEOUT / STREAM_ERROR / NO_ADAPTER);outcome:"delegate" 且有 error=裁判失败转人工,无 error=裁判主动转人工,二者可区分。judgeErrors: { count, lastError?, lastErrorTime? }(累计裁判失败次数与最近一次错误码),裁判异常不再只停留在 logger.warn。DSH 0.2.1 起兼容门禁优先读取 engines.dsh。本插件声明 engines.dsh: ">=0.1.7-rc.1"(无上限),dsh peer 保持 >=0.1.7-rc.1,并已核对:
| DSH 版本 | 状态 |
|---|---|
| 0.1.5-rc.1 | ✅ 实测通过 |
| 0.1.5-rc.2 | ✅ 实测通过 |
| 0.1.6-alpha.2 | ✅ 实测通过 |
| 0.1.7-rc.1 | ✅ 实测通过 |
| 0.1.7-rc.2 | ✅ 实测通过 |
| 0.2.0-rc.1 | ✅ 实测通过 |
| 0.2.1-rc.1 | ✅ 兼容门禁 + 141 项测试 + 构建 |
| 0.2.1-rc.2 | ✅ 兼容门禁通过 |
只列出实际跑过的版本;未实测的不列。
v0.6.5 支持 DSH 0.1.5-rc.1+(@deepseek-ai/dsh-* peer 放宽为 >=0.1.7-rc.1),上述版本均经真实-Cordis 探针通过:设置子系统已迁移至 0.1.7 的 SettingsForms(插件 Config schema + volatile 热更 + 自建设置页);0.1.7-rc.2 上 provider/model 目录改由 client remote.llm + remote.session 读取;0.2.0-rc.1 上通过新的兼容性门禁并正常加载;0.2.1-rc.1 上通过兼容门禁、141 项测试与 client 构建,0.2.1-rc.2 门禁通过。0.2.1 的 remote.llm / remote.session 目录接口仍然存在。旧版 DSH(0.1.0-rc.6 / rc.8)请使用最后兼容的 npm 版本 0.4.1。
npm test # node --test 全量测试
npm run build # 构建客户端 bundle(rolldown)
FAQs
dsh-yolo-mode —— DeepSeek Harness 双面包插件:当会话处于可写沙箱模式且审批策略为 ask 时,用大模型自动裁决沙箱升权申请,支持内置预设与自定义权限层级,并提供宿主 settings + 自发布设置桥(/yolo-mode)与 Web 客户端 UI。
The npm package dsh-yolo-mode receives a total of 248 weekly downloads. As such, dsh-yolo-mode popularity was classified as not popular.
We found that dsh-yolo-mode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.