Skip to content

feat(agent-manager): 新增智能体管理与多智能体并行调度插件 - #176

Open
sworddemon85-create wants to merge 3 commits into
zai-org:mainfrom
sworddemon85-create:feat/agent-manager
Open

sworddemon85-create wants to merge 3 commits into
zai-org:mainfrom
sworddemon85-create:feat/agent-manager

Conversation

@sworddemon85-create

@sworddemon85-create sworddemon85-create commented Nov 5, 2026 •

Copy link
Copy Markdown

Plugin type (required) / 插件类型(必填)

  • UI Plugin / 是 UI 插件 — provides MCP Apps interactive pages / 提供 MCP Apps 交互页面
  • Standard plugin / 普通插件(非 UI) — does not provide MCP Apps interactive pages / 不提供 MCP Apps 交互页面
  • Not applicable / 不适用 — repository-only changes; no plugin content changed / 仅仓库级改动,不涉及插件内容

Affected plugin name(s) / 涉及的插件名称:agent-manager

What / 改动内容

新增社区插件 agent-manager(智能体管家),解决两个用户问题:

  1. 子智能体定义难管理:定义文件散落在用户级/工作区级目录,写错格式没有反馈。提供盘点、查看、创建、修改、校验、下架的完整流程(skill agent-registry + 命令 /agent-list /agent-show /agent-new /agent-check),校验只报告问题、绝不擅自改文件。
  2. 大任务无法并行分派:调度技能 agent-team 把任务拆解为独立子任务、按各智能体 description 选人、同一条消息内并行派发、汇总合并报告;另附三个开箱即用的模板智能体 doc-writer / test-runner / issue-triage,以及 SessionStart 钩子在新会话自动注入本地智能体清单。

用户可见行为与测试方式 / User-visible behavior & how to test:

  • 安装后输入 /agent-list:输出本地智能体清单表格(用户级 + 工作区级),并与运行时可用 agent types 对账;
  • 「新建一个叫 doc-writer 的智能体,负责整理项目文档」:在 ~/.zcode/agents/doc-writer.md 生成符合规范的定义;
  • /agent-check:逐文件输出 通过/警告/失败 + 文件:行号 证据,只报告不修改;
  • /agent-team 审查某目录代码并总结问题:并行派发只读审查智能体并返回合并报告;
  • 新会话开始时自动出现「本地智能体定义」盘点清单(SessionStart 钩子,只读、始终以 0 退出,不阻塞启动)。

版本与注册 / Version & registration:plugin.json 与根 marketplace.json 条目均为 0.1.3;新目录 external_plugins/agent-manager/;category: developer-tools。

依赖 / 副作用 / Dependencies & side effects:

  • 文件写入:仅新建/修改流程写 ~/.zcode/agents/ 与 <workspace>/.zcode/agents/ 下的 Markdown 定义文件;盘点与校验均为只读;
  • 命令执行:SessionStart 钩子运行内置只读 bash 脚本 scripts/inventory.sh(Windows 需 PATH 中有 bash,Git Bash 即可);调度通过 ZCode 的 Agent 工具派发子智能体;
  • 网络:插件本身无任何网络请求;内置 issue-triage 智能体仅在用户要求核实外部资料时可能使用 WebFetch;
  • 无 MCP server、无凭据、无遥测;Hook 仅 SessionStart 一项。

第三方材料 / Third-party materials:无;插件以 MIT 许可发布(目录内附 LICENSE)。

Self-check / 自查清单

  • Plugin name is unique kebab-case; new external plugin directory is external_plugins/agent-manager/ / 插件名唯一且 kebab-case,位于 external_plugins/agent-manager/
  • Usage category is set (developer-tools) / 分类已填写
  • Plugin type and affected names are declared above / 已声明插件类型与插件名称
  • version bumped in BOTH plugin.json and marketplace.json (均为 0.1.3) / 两处版本号一致
  • README.md (EN) and README_CN.md (中文) both updated and equivalent / 双语 README 齐备且语义一致
  • description_i18n has both en and zh-CN / 双语描述齐备
  • No secrets, machine-specific paths, or private dependencies / 无密钥、机器专属路径或私有依赖(已 grep 复核)
  • Model/API/network dependencies documented / 依赖与副作用已写明
  • python3 scripts/validate.py and python3 scripts/build_dist.py pass locally / 本地校验与构建均通过

⚠️ 关于最后一项的如实说明:贡献者本机 Python 运行时损坏(encodings 模块缺失),未能本地运行 validate.py 与 build_dist.py。已做人工结构校验:两份 JSON 可解析、两处版本一致(0.1.3)、双语 README 齐备、机器专属路径 grep 复核为零。请以 CI 校验结果为准;如有需调整之处我会及时跟进。

更新记录 / Update log

  • 2026-11-06 提交后用本插件的 issue-triage / doc-writer 智能体做了评审前自查,据此修复并升版 0.1.3:plugin.json 补 description_i18n(validate.py 门禁项);钩子命令变量改为官方约定的 ${ZCODE_PLUGIN_ROOT};副作用披露补充「内置智能体会写项目文档/执行测试命令」;安装指引改为官方市场优先;遵循制品不可变原则以新版本号 0.1.3 发布,不复用 0.1.2。

- skills: agent-registry(定义盘点/创建/校验)、agent-team(并行派发与汇总)
- commands: /agent-list /agent-show /agent-new /agent-check /agent-team
- agents: doc-writer、test-runner、issue-triage 三个内置模板
- hooks: SessionStart 自动盘点本地智能体(只读、始终以 0 退出)
- 中英双语 README,MIT 许可,无网络依赖、无 MCP、无遥测

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant