dsh-sansheng-liubu/README.md

48 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 「上朝」DSH 多 Agent 模式
面向 DeepSeek Harness Web GUI 的 Agent Preset,mode id 保持 `sansheng-liubu`。
新建“上朝”会话时,尚未加入 Agent Team 的默认主 Agent 会自动担任丞相(Lead)。用户进入模式后可直接与丞相对话,无需在 Agent 列表中手动切换;其余部门仍由丞相按流程创建。
## 部门职责
- `lead`(丞相):统筹、决策、组队与管理型工具;调用须留痕。
- `zhongshu`(中书省):调查与规划,只读。
- `menxia`(门下省):准奏、封驳、验收与查账,只读。
- `shangshu`(尚书省):任务依赖和分工调度,只读。
- `gongbu`(工部/图像司):识图、OCR、截图与视觉分析;通过 `dsh-image-gen` 执行生图、批量生图和图片编辑。
- `libu`(礼部):写作、润色、翻译、报告与文档。
- `bingbu`(兵部):代码、测试、修复,以及工具装配、发放、回收、登记、销账;只发不批。
执行部门常备 `read`、`write`、`edit`、`bash`、`grep`、`glob` 等工具;规划/审议部门保持只读。
## Image-gen 接管
上朝插件不再自行注册图片工具或读取图片 Provider 凭据,而是复用已安装的 `dsh-image-gen`:
- `generate_image`:单张生图;
- `generate_images`:批量生图;
- `edit_image`:参考图与连续编辑。
三项工具只允许工部在已准奏且处于执行中的任务里调用。Provider、模型、API Key、Base URL、订阅登录、计费和结果保存均由 Image-gen 配置管理。`image_generate` 与 `codex_image_generate` 继续被上朝策略拒绝。
请在“插件 → 已安装 → dsh-image-gen”中配置并测试 Provider。修改插件配置或本模式后需彻底重启 DSH。
## 工具审核则例
1. 部门申请工具须写明用途、范围、期限;门下准奏后由兵部发放,限期使用,到期回收销账。
2. 只读工具由门下专决;写入须注明 writeScopes;涉费、删除、全局配置须人工签字。
3. `task_board_*`、`automation_*` 归丞相执掌并留痕;部门调用管理型工具须持门下准奏记录。
4. 门下验收查账;越界者下次从严;工具不得转借。
## 验证
```powershell
node --check index.js
node --test --test-isolation=none test/policy.test.js
```
## 回滚
若要恢复上朝内置百炼实现,将 `backup/pre-image-gen-delegation-20261021-1546/` 中的文件复制回插件根对应位置,并重启 DSH。mode id 和 preset id 不变。