SeverusZh/dsh-plugin-subagent-director ↗★ 18

dsh-plugin-subagent-director

Subagent Director: choose an LLM provider/model for each subagent (call args > role binding > plugin default > inherit parent) and plan main-agent/subagent responsibilities with role templates, plus a settings UI. 适合需要精细化控制多Agent协同、自定义子代理模型的用户

패키지
dsh-plugin-subagent-director
호환성
미검증
Harness peer 범위
>=0.1.7-rc.1
Cordis peer 범위
^4.0.4
버전
0.5.5
라이선스
MIT
최근 업데이트
2026. 9. 29.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SeverusZh/dsh-plugin-subagent-director

配置(cordis.patch.yml,可选)

dsh plugin add 会通过插件包自带的 cordis.patch.yml 自动挂载主条目与桥接条目 (subagent-director / subagent-director-bridge,桥接条目用于把设置命名空间 暴露给 Web UI),不需要手动 insert。需要覆盖默认配置时按 id 覆盖主条目:

- id: subagent-director
  name: dsh-plugin-subagent-director
  config:
    subagentProvider: spawn      # 传输:spawn(无父上下文)/ fork(继承父历史)
    toolName: subagent_role      # 本插件注册的模型可见工具名(不是内置 subagent)
    enableRunInBackground: true
    backgroundMode: one-shot     # one-shot 或 continuable
    maxDepth: 3

注意:不要再用 - insert: 添加这两个条目,否则启动会报 duplicate loader entry id。

使用

对话中委派(主代理会看到角色清单指引,自动选择工具与角色):

subagent_role({ role: "translator", prompt: "把 README.md 翻译成英文" })
subagent_role({ role: "code-reviewer", model: "deepseek-chat", prompt: "..." })  # 临时覆盖模型

role 参数支持用角色 id 或显示名引用:未命中 id 时会按 displayName 精确匹配 (多个同名角色取定义顺序第一个并提示);建议始终用 id,见系统提示中的 Delegate 行。

subagent_role 与内置 subagent 是两个不同的工具。 本插件注册的是 subagent_role(工具名由 toolName 配置,默认 subagent_role);DSH 基础 bundle 另有内置的 subagent / subagent_fork,两者在同一次请求的工具清单里 并存。只有走 subagent_role 才会应用角色 persona 与 toolFilter;模型改用 内置 subagent 时这两项不生效(模型选择由官方 dsh-tool-subagent 的 modelSelectionSettings 负责)。 因此需要角色语义时,请在提示里明确要求调用 subagent_role。