Skip to content

v2.0.1 — 适配 dsh 0.2.1(子 agent 改独立预设)

Choose a tag to compare

@hack-umbrella hack-umbrella released this 28 Oct 02:40
· 2 commits to llm since this release

适配 dsh 0.2.1-rc.2(破坏性变更)。

症状

在 dsh 0.2.1 上,渗透预设整份建不了会话:

tool-subagent (@deepseek-ai/dsh-tool-subagent):
tool-subagent: persona is no longer supported;
configure persona and tool plugins in an Agent Preset and select it with agentPreset (spawn only)

根因

dsh 0.2.1 把 tool-subagent 的 Config 白名单收窄为
provider / toolName / modelSelectionSettings / agentOptions / agentPreset / allowedAgentPresets / maxDepth,
移除了 persona / toolFilter / n —— 只要配置里出现就抛错(不是"忽略")。
渗透预设的执行子 agent 正是用 persona + toolFilter.deny 定义的。

修复:执行子 agent 抽成独立 Agent Preset

  • 新增 pentest-executor 预设(preset/pentest/executor.cordis*.yml):
    • 人设(原 persona 文本)→ dsh-agent-instructions
    • 工具面 = bash / fs / fs-search + 本包 pentest-tools(31 个执行工具)+ 上下文压缩
    • 不含记录层 pentest(goal/intent/fact/finding/asset 的写入口)与 subagent —— 结果只能经父会话的 pentest_submit 写回,防越权写库与递归委派
  • 父预设的 tool-subagent 改为 agentPreset: pentest-executor

两条变体分工(关键)

变体 workflow provider 子 agent 配置
agent.cordis.yml worker-thread(≤0.1.5) 保留 persona/toolFilter 供 0.1.x
agent.cordis.next.yml ptc(≥0.1.6 / 0.2.x) 只用 agentPreset,不含 persona/toolFilter

因为 dsh 0.2.1 见到 persona 就拒绝整份预设,两代无法共用同一份配置 —— 这正是变体机制存在的意义。

验证

  • dsh 0.2.1-rc.2 沙箱:pentest / pentest-executor / code-audit 三个预设均可建会话 ✓
  • dsh 0.2.1-rc.2 生产机:启动零失败、pentest + code-audit 均可建会话 ✓
  • test/preset-variants.test.mjs 重写为内容级断言(旧变体有 persona/worker-thread、新变体有 agentPreset/ptc 且无 persona)
  • release-check 第 5 项同步升级 → 31/31 通过

附:0.2.1 升级踩到的其它坑(供参考)

  1. ~/.dsh 下 0.1.x 残留目录(code-audit / .agent-presets / skills)会阻止启动,需移走
  2. dsh-vision-router 在 0.2.1 上加载失败并劫持 connection 的依赖,报错却指向 webRuntime(0.2.1 已无此服务),需禁用该插件
  3. dsh-better-sidebar 需 ≥ 0.28.0(peer 覆盖 ^0.2.1-rc.1)