前言¶
在 DeepSeek Harness(DSH)里同时跑多个 agent 时,开发者往往要自己在终端里切会话、靠外部工具猜谁在执行什么、谁又卡在审批上。这种方式和 Harness 进程内的实时注册表、事件日志是割裂的,排查「哪条任务挂了」成本高。
haroon0x/dsh-orchestrator 是社区维护的工作流类插件,在同一 DSH 进程内提供 Orchestrator 预设与四组 fleet 工具,直接读取 ctx.agents 与各 session 已提交的事件日志,用于查看、深查、单向发信和协作式中断其他 live agent,不依赖终端复用器、外部 CLI 或抓屏。
这是什么¶
插件包名为 @haroon0x/dsh-orchestrator(当前资料中版本为 0.1.0),维护者为 haroon0x,许可证 MIT。它面向「在同一 Harness 进程里管理多条并行 agent」的场景:一次安装会注入 Orchestrator agent 预设,并为运行该预设的 agent 开放四枚专用工具;其他预设的工具目录与提示词不会被改动,注册在 step 时通过 when 校验当前预设。
目录页:https://www.skillhub.cn/plugins/haroon0x/dsh-orchestrator
源码与说明:https://github.com/haroon0x/dsh-orchestrator
核心功能¶
Orchestrator 预设¶
预设出现在 Settings → Agent presets 与新会话选择器中。在标准管理向工具集(shell、文件、搜索、jobs、schedule、skills、goals、compaction、delegation、web、todo 等)之上,额外挂载四枚 fleet 工具。插件还贡献一段 role 说明,描述管理循环该怎么用。
Orchestrator 可通过 subagent 拉起 worker;默认 worker 使用 standard 预设(可在 cordis.patch.yml 里改 agentPreset),避免嵌套出更多 orchestrator。
四枚 fleet 工具¶
仅对运行 Orchestrator 预设的 agent 开放:
| 工具 | 作用 |
|---|---|
fleet_roster |
列出当前 live agent(运行中的靠前),含状态、当前 tool call、最后一条 assistant 消息、预设、模型、turn/step、最近活动间隔、父子关系、排队输入、todo 进度等 |
fleet_inspect |
单 agent 深度视图:近期消息、未完成 tool call、待审批、排队输入、todos、goal、子 agent |
fleet_message |
向任意 live agent 投递单向消息;运行中目标下一步收到,空闲目标会开新 turn |
fleet_interrupt |
请求取消目标 agent 当前 turn,可选保留或清空其排队输入 |
可见性从何来¶
每次调用都从进程级注册表 ctx.agents 实时读取,无缓存、无轮询。活动状态由各 session 已提交事件日志(最近 240 条)推导:未配对的 tool/call、未回应的 approval/asked、开放的 ask_user_question、最后一条 assistant/message 等。标题、todos、goal、收件箱等衍生状态来自 ctx.sessionProjections,roster 侧按显式 key 列表读取,避免无关投影开销。
安装与启用¶
资料中的手动安装示例如下。将 link: 后的路径换成本地插件目录的实际路径。
dsh plugin --profile web add link:/path/to/dsh-orchestrator
随后在 profile 的 dsh.profile.bundles 中加入该 bundle,并与既有基础包一并声明:
{
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-web-app",
"@haroon0x/dsh-orchestrator"
]
}
}
}
刷新 Web 应用。通过 Plugin Manager 与 HMR 时,链接包可在重组合时替换;若在 Plugin Manager 外手动安装,有时需要重启进程。
运行环境要求(来自 package.json):Node >=22.19.0。
启用步骤:
- 安装 bundle(插件管理器或上述
install_bundle/ 手动 link 方式,以你当前 DSH 文档为准)。 - 用 Orchestrator 预设开新会话,或在 Settings → Agent presets 中将其设为新建任务的默认预设。
- 向 Orchestrator 描述管理意图,由它调用 fleet 工具 observability 与干预。
也可通过 DSH 插件管理器安装该 bundle,具体入口以你使用的 DSH 版本界面为准。
典型用法¶
README 中的可复现意图示例(交给 Orchestrator 会话即可):
- 「看我刚启动的三个 agent,哪个卡住了」
- 「停掉 docs agent,并告诉它等 API 变更」
Orchestrator 用 fleet_roster 看舰队概况,用 fleet_inspect 定位卡点,再用 fleet_message / fleet_interrupt 下发指令或取消 turn。目标不会把回复直接写回 Orchestrator 对话;结果需通过 roster 观察,或仅当 Orchestrator 自己拉起该 agent 时才有约定内的自动回传路径。
适用场景与注意¶
适合谁: 在同一台机器、同一个 dsh 进程里并行多条 coding / 调研类 agent,并希望有一个「班长」会话统一读状态、发消息、中断 runaway turn 的开发者。
设计边界(资料原文):
- 单向消息:
fleet_message不建立对话回路。 - 仅同进程:其他
dsh进程里的 agent 不可见,这是 live registry,不是跨主机总线。 - 输出有界:roster 默认 20 行(最多 50);
fleet_inspect默认最近 8 条消息(最多 30)。 - 自保护:
fleet_message/fleet_interrupt拒绝对调用者自身 id;roster 对应当前行标记为self。 - 中断为协作式:
fleet_interrupt发出取消请求后即返回,目标可能短暂仍为running。 - 预设耦联:
orchestrator预设复制了发布时的 standard 插件列表;DSH 升级若改动 standard 组成,需自行改cordis.patch.yml。
安全与权限: 插件以当前 DSH 进程权限运行,Orchestrator 能调用的 shell、文件与 fleet 工具与 harness 配置一致。安装前请查阅源码与 MIT 许可证,确认 bundle 来源可信。社区目录 skillhub.cn 为独立生态站点,与 DeepSeek / 幻方无官方从属关系。
插件自带测试(假 Cordis 上下文,无需完整 DSH 安装):
npm test
结尾¶
dsh-orchestrator 把「看舰队、查单个、发信、打断」收进 DSH 原生插件与 Orchestrator 预设,避免为 multi-agent 另搭一套外部监控。若你已在同一进程里用 subagent 拆任务,可以把它当作编排面的默认入口。