Bundle
dsh-my-go
DSH plugin: Sisyphus agent orchestration — star topology, single-line blocking, 7 specialist sub-agents (Hermes/Explore/Librarian/Looker/Hephaestus/Prometheus/Oracle) with per-type model binding, go_work/continue/need_help/forward communication tools, Web UI tree panel and settings.
- Source
- daizihan233
- stars
- 3 stars
- License
- MIT
- Updated
- Updated 8 days ago
Readme
# MyGO!!!!! 编排调度 | DSH
> **My** tasks, where to **GO**?????
dsh-my-go 是构建在 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) 之上的**智能体编排系统**。
它以星型 + 单线嵌套拓扑把 DSH 主会话(Sisyphus)与 7 个专业子智能体组织起来:Sisyphus 负责调度、审查与驳回,子智能体负责执行与汇报。参考了 oh-my-openagent 的编排设计,针对 DSH 进行了优化调整。
上游作者开发手记(原项目背景,非 fork 文档):https://khbit.cn/posts/dsh-my-go/
## 特性
- **星型拓扑**:所有子智能体(叶子)不直接通信,全部经 Sisyphus 中转。
- **单线阻塞**:同一时段只有一个子智能体运行,便于审查,增强可观测性。
- **7 个专业工种**:Hermes(快速执行)、Explore(检索)、Librarian(文档)、Multimodal Looker(看图)、Hephaestus(写代码)、Prometheus(规划)、Oracle(最后手段:疑难/极端复杂问题的架构调试,仅当其他工种无法胜任时启用;验收是 Sisyphus 的质检本职)。
- **按工种绑定模型**:快活小工配便宜模型,重活配强模型——默认不绑任何模型(继承环境路由),按工种分流见下文「工种模型绑定」。
- **4 个通信工具**:`go_work`(派发)、`continue`(驳回/追问)、`need_help`(求助挂起)、`forward`(转发),加 `orchestration_status`(状态总览)和 `list_subagents`(列出已有 sub-agent 及其最后 prompt)。
- **步骤级调度**:Prometheus 把需求拆成步骤序列,Sisyphus 逐步骤选择最省 token 的工种——**按任务难度分配(不按需求难度)**:指令明确、步骤具体的执行活优先派 Hermes,需要设计/推理的才升级 Hephaestus,仅疑难/极端复杂才到 Oracle;同工种上下文连续则 `continue` 复用。
- **Sisyphus 质检**:结论不达标驳回重做,被驳回的子智能体保留上下文继续。
- **WebUI 配置**:每个工种的模型 / 思考档位 / DSV4P0813 补丁开关,均可在 DSH 设置页配置。
- **错峰路由(peak routing)**:勾选后按北京时间高峰/非高峰时段在两个渠道+模型组合间自动切换——高峰(周一至五 09:00-12:00、14:00-18:00)走「梁文峰」子配置,其余时段走「梁文谷」子配置。
- **DSH 适配**:权限请求、问题询问由主智能体执行。
- **节省主会话上下文**:Sisyphus 主会话不加载 Skill 工具(子智能体仍保留),跳过 Skill catalog 注入以压缩主会话上下文。
- **DSV4P0813 补丁开关**:内置过拟合补丁,让 DeepSeek V4 Pro 0813 发挥最大的实力。
_真正实现 “按量付费”_
## 环境要求
### 理论最低要求
- DeepSeek Harness `0.1.0-rc.6`+(基于 `agent/request` waterfall 与 continuable subagent API)
- Node.js 20+
- 一个可用的 LLM provider
- Windows / macOS / Linux(DSH 均支持)
### 开发时的环境
- DSH `0.1.0-rc.8` + Windows 11 + Node.js 22(作者实际组合)
## 快速开始
### 安装(推荐:npm 插件)
```bash
# 一条命令安装到 web profile
dsh plugin --profile web add dsh-my-go@latest --config.minimumReleaseAge=0
# 重启 dsh web 生效
dsh web
```
安装后 broker 插件(编排工具 + 模型绑定 + 树状图面板 + 设置页)自动挂载;
会话预设「MyGO!!!!! 模式」提供 Sisyphus 的完整编排。
### 最小示例
新开一个 DSH 会话,预设选择 **MyGO!!!!! 模式**
然后对 Sisyphus 说:
> 告诉我这个项目是干啥的。
### 运行
```bash
dsh web # 启动 Web GUI,新会话选择 MyGO!!!!! 模式
```
## 架构
```
用户 ──► Sisyphus(调度+质检)──► Hermes / Explore / Librarian / Looker
│ Hephaestus / Prometheus / Oracle
└── 单线阻塞队列 ◄── 所有子智能体结论回流
```
- 子智能体 = DSH **continuable subagent**(`subagents.startContinuable`),
持久化独立 Session,支持 `followup` 续接。
- 模型绑定 = 创建时 `agentOptions` + `agent/request` waterfall 覆盖
`reasoningEffort`(**跟随 DSH 模型目录**:只设置该模型实际支持的思考档位;
模型无思考选项或档位不支持时不设置,走模型默认)。
- 单线阻塞 = broker 编排状态机(当前运行 / 队列 / 求助 / 历史)。
- 详细设计见 [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)。
## 配置
host 半(lib)注册 settings 命名空间 `dsh-my-go`,client 半提供设置页
(WebUI「MyGO 编排」),broker 半只读取:
| 配置项 | 默认值 | 说明 |
|---------------------------------|----------------|-------------------------------------------------------------------------|
| `agents.<type>.provider` | 不指定(继承) | 该工种的 provider 路由;缺省时继承父会话渠道 |
| `agents.<type>.model` | 不指定(继承) | 该工种的模型;缺省时继承父会话模型 |
| `agents.<type>.reasoningEffort` | 不指定 | 期望思考档位(如 high/max);**只在模型实际支持时应用**,否则走模型默认 |
| `agents.<type>.dsv4p0813` | false | 是否对该工种启用 DSV4P0813 两阶段引导补丁 |
| `agents.<type>.peakRouting` | false | 是否启用错峰路由(按北京时间高峰/非高峰切换 provider/model) |
| `agents.<type>.peakProvider` | 不指定(继承) | 高峰时段(梁文峰)渠道;缺省继承父会话渠道 |
| `agents.<type>.peakModel` | 不指定(继承) | 高峰时段(梁文峰)模型;缺省继承父会话模型 |
| `agents.<type>.offpeakProvider` | 不指定(继承) | 非高峰时段(梁文谷)渠道;缺省继承父会话渠道 |
| `agents.<type>.offpeakModel` | 不指定(继承) | 非高峰时段(梁文谷)模型;缺省继承父会话模型 |
### 错峰路由(peak routing)
勾选「错峰路由」后,该工种在派发时按**北京时间**(UTC+8,无夏令时)判断当前时段:
- **高峰时段**(周一至周五 09:00-12:00、14:00-18:00,含 09:00/14:00、不含 12:00/18:00)→ 使用「梁文峰」子配置(`peakProvider` / `peakModel`);
- **其余时段**(周末、午休 12:00-14:00、夜间与凌晨)→ 使用「梁文谷」子配置(`offpeakProvider` / `offpeakModel`)。
未勾选时行为与旧版完全一致(只用顶层 `provider` / `model`)。未配置的
peak/offpeak 字段保持「继承父会话(Sisyphus)」语义,与顶层字段相同。
思考档位与 DSV4P0813 补丁开关不受错峰路由影响,两个时段共用。
### 工种模型绑定
自 tisitan.7 起,插件**不再内置任何模型名/渠道名**——所有工种默认空绑定,
子代理完全继承环境默认路由(与 Sisyphus 同渠道同模型)。需要按工种分流
(快活走便宜模型、重活走强模型)时,在 DSH 设置页「MyGO 编排」逐工种填写,
或直接编辑 `~/.dsh/settings.yaml`:
```yaml
dsh-my-go:
hermes:
model: your-cheap-model # 高频体力活:便宜快模型
explore:
model: your-cheap-model
librarian:
model: your-cheap-model
looker:
model: your-multimodal-model # 看图需要多模态能力
hephaestus:
provider: your-gateway # provider 缺省 = 继承父会话渠道
model: your-mid-model
reasoningEffort: high # 仅当该模型实际支持此档位时应用
prometheus:
provider: your-gateway
model: your-strong-model
reasoningEffort: max
oracle:
provider: your-gateway
model: your-strong-model
reasoningEffort: max
```
字段缺省即不覆盖。`model` 在派发前会经 `llm.listModels` 校验真实存在
才应用(不存在则跳过并回落父会话模型,日志 warn);`reasoningEffort`
跟随 DSH 模型目录,模型不支持所配档位时留空走适配器默认。
建议分工:Sisyphus / Hephaestus 用中等能力模型,Hermes / Explore /
Librarian / Looker 用便宜轻量模型,Prometheus / Oracle 用最强模型。
### 插件 config 键(broker 行为调参)
以下为插件级 config(`dsh plugin add` 的 config / bundle 层),与上面的
settings 命名空间正交;默认值即旧硬编码口径(tisitan.8 起截断阈值可配):
| config 键 | 默认值 | 说明 |
|-------------------------|--------|----------------------------------------------------------------------|
| `disposeEndGraceMs` | 500 | `agent/disposed` 后等待 `subagent/end` 的宽限期,超时兜底清槽推进队列 |
| `queueRetryBaseMs` | 1000 | 队列派发失败回补后的线性退避基数(1×/2×/3×,上限 3 次后放弃) |
| `statusHistoryLimit` | 12 | `orchestration_status` 展示的历史条数 |
| `statusConclusionMax` | 400 | `orchestration_status` 单条结论截断长度(**failed 记录不截断**) |
| `helpContentMax` | 240 | `orchestration_status` 单条求助内容截断长度 |
| `subagentPromptMax` | 200 | `list_subagents` prompt 摘要及会话 label 的 prompt 摘要截断长度 |
编排台账(history,上限 200 条)持久化在
`<DSH_HOME>/dsh-my-go/orchestration-ledger.json`(`DSH_HOME` 缺省
`~/.dsh`),进程重启后读回——跨重启 `continue` 已完工子代理经 harness
coldResume 续聊可用。
## 智能体 Prompt
每个工种的完整 persona / 职责 / 汇报格式见 [`prompts/`](prompts/):
| 文件 | 工种 |
|------------------------------------------------|-----------------|
| [prompts/sisyphus.md](prompts/sisyphus.md) | 总调度 + 质检官 |
| [prompts/hermes.md](prompts/hermes.md) | 快速执行 |
| [prompts/explore.md](prompts/explore.md) | 快速检索 |
| [prompts/librarian.md](prompts/librarian.md) | 文档查询 |
| [prompts/looker.md](prompts/looker.md) | 多模态识别 |
| [prompts/hephaestus.md](prompts/hephaestus.md) | 代码编写 |
| [prompts/prometheus.md](prompts/prometheus.md) | 需求规划 |
| [prompts/oracle.md](prompts/oracle.md) | 架构调试(疑难兜底)|
## 目录结构
```
dsh-my-go/
├── AGENTS.md # 本项目的编排规格(Sisyphus 系统)
├── README.md # 本文档
├── package.json # npm 包声明(dsh.bundle.patch → cordis.patch.yml)
├── cordis.patch.yml # bundle patch(dsh plugin add 后自动挂载 host 插件)
├── lib/index.js # npm 包 host 半(编排工具 + 状态机 + 模型绑定)
├── src/client.js # client 半源码(树状图面板 / 设置页 / 自动跳转)
├── scripts/build-client.mjs # esbuild 打包 client → dist/client.js
├── dist/ # 构建产物(发布时生成)
├── preset/ # agent preset「MyGO!!!!! 模式」(复制到 ~/.dsh/.agent-presets/)
│ ├── preset.yml
│ ├── agent.cordis.yml
│ └── tools/broker.mjs # 自包含 host 插件(工具 + 模型绑定 + 状态机)
├── broker/ # broker 插件 TS 源码(参考实现)
├── prompts/ # 8 个智能体 prompt
└── docs/ARCHITECTURE.md # 架构设计
```
## 贡献
```bash
git clone git@github.com:Tisitan/dsh-my-go.git
cd dsh-my-go
bun install
bun run build:client # 构建 client bundle
bunx tsc --noEmit # 类型检查
bun run test # 冒烟测试
```
## 致谢
感谢以下开发者对 dsh-my-go 生态的独立维护与贡献:
- [Tisitan/dsh-my-go](https://github.com/Tisitan/dsh-mygo):[@Tisitan](https://github.com/Tisitan) 的维护性 fork。
- 本项目 cherry-pick 了此下游的部分提交,尽管由于分支作者没有设置公开 Email 并禁用了 Issue 故未能取得联系,特此致谢!感谢您对开源项目的贡献。
开源的意义在于接力,感谢每一位在暗处推动轮子前进的人。
## 维护状态
- 仍在积极开发中,可能有少量 Bug 尚存,欢迎提交 Issue
- 已知限制:
- 子智能体模型绑定依赖 `agent/request` waterfall(DSH 未原生支持动态子代理模型,
见 [dsh-handbook 9.2](https://github.com/deepseek-ai/deepseek-harness/discussions/118));
- 结论注入依赖 `subagent/end` 事件;`reportFrom` 为子→父补充通道。
- 单线阻塞由 broker 状态机执行;Sisyphus 需遵守编排规则(由 system-prompt section 约束)。
- 感谢以下三位开发者:(排名不分先后)
- DeepSeek V4 Flash 0731
- DeepSeek V4 Pro 0813
- MiMo V2.5
## 许可证
[MIT](LICENSE) © dsh-my-go contributors
Install
dsh plugin --profile web add github:daizihan233/dsh-my-go
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-my-go from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.