feat: 蜂群模式(网状)——复刻 Codex Multi-Agent V2 - #98
Merged
Merged
Conversation
…(网状) - 现有蜂群模式改名为蜂群模式(星型),行为不变 - 新增会话级 off/star/mesh 三态、六个 agent_* 协作工具、邮箱投递、驻留换出 - 四份能力规格:swarm-mode-selection / mesh-agent-collaboration / mesh-agent-residency / mesh-agent-observability - openspec/ 在 .gitignore 中,本目录以 git add -f 纳入跟踪
…ilbox - domain/session: AgentPath (Codex agent_path.rs rules), SwarmMode with the mutually exclusive tool families, inter-agent envelope rendering, swarm_mode and mesh_agent.path session metadata - engine/agent: session-scoped AgentMailbox drained at model boundaries, deduplicated mailbox-wake turns, agent_wait activity, envelope transcript rows - swarm mode moves from a per-turn message flag to the captured request source; ToolCapabilityPolicy hides the other tool family with mode-specific refusals - engine/prompt: mesh role/mode instructions ported from Codex Multi-Agent V2
- MeshAgentService(host/session_host/mesh):按根会话建树,路径寻址、LRU 驻留 (默认 4 含根)、换出后按需恢复、完成回报(FINAL_ANSWER 不唤醒空闲父, interrupted 不回报)、重启后按 mesh_agents.json 重建 - 六个 agent_* 工具(spawn/list/send_message/followup_task/wait/interrupt), 参数与输出对齐 Codex;与 spawn_subagent / thread 工具按会话模式互斥 - 会话级 swarm_mode(off/star/mesh):消息体、/swarm(TUI + daemon)、headless --swarm;退出网状时有运行中 agent 则拒绝;网状子 agent 不接受直接输入 - TUI:SubagentHost 以主会话为外部根接入网状服务,侧栏以路径显示; agent 间信封在实时与回放中显示为系统行 - Web:两个互斥菜单项与芯片,芯片跟随服务端模式、只有改选才提交; 信封转系统提示行;后台任务面板显示 agent 路径 - 测试:网状服务集成测试(真实 SessionRegistry + 脚本化 provider)、 AgentLoop 邮箱投递、配置 / 命令 / headless / 前端纯逻辑 - 文档:docs/subagents.md §9、daemon-api、帮助页、CLAUDE.md、openspec 实现记录
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
新增「蜂群模式(网状)」,复刻 Codex Multi-Agent V2 的 agent 协作树(openspec
add-mesh-swarm-mode)。原「蜂群模式」改名为「蜂群模式(星型)」,行为不变。off | star | mesh:Web 输入框两个互斥菜单项、/swarm star|mesh|off(TUI + daemon 内置命令)、headless--swarm。两套协作工具按模式互斥。agent_*工具(spawn / list / send_message / followup_task / wait / interrupt),参数、错误文案与输出对齐 Codex。/root/a/b),每树最多 4 个 agent(含根)+ LRU 换出与按需恢复,完成回报不唤醒空闲父 agent,重启后按mesh_agents.json重建。agent_followup_task唤醒空闲目标。与 Codex 的有意偏离:信封用 user 角色(Anthropic / DeepSeek 不接受连续 assistant),工具名加
agent_前缀。完整说明见docs/subagents.md§9。验证
acecode_unit_testsfast profile:4920 个通过,0 失败;新增网状集成测试(真实 SessionRegistry + 脚本化 provider:派生、回报、send / followup、LRU 换出与恢复、上限、interrupt、errored、嵌套、退出守卫、重启重建、工具输出契约)pnpm test(2951 个)、pnpm build、pnpm i18n:audit通过check_layers/check_ownership/check_file_size、openspec validate --strict通过已知未做
<subagents>名册、interrupt 后的<turn_aborted>标记