AI Agent 协同调度助手 · Collaboration Scheduler
用一个 VS Code 面板,让 Codex 和 Claude Code 两个 AI 编码 Agent 在同一工作区里分工协作。
Coordinate Codex and Claude Code as a two-agent coding team in one workspace, driven from a single VS Code dashboard.
本插件不替换、也不修改 Codex / Claude Code 本身。它在工作区建立一套轻量协议(.agents/),并提供面板来做会话绑定、任务分工、消息交接、资源冲突提示和协议校验。
This extension does not replace Codex or Claude Code. It sets up a lightweight workspace protocol (.agents/) and gives you a dashboard for session binding, task division, message handoffs, conflict hints, and protocol validation.
⚠️ 前置条件 / Prerequisites
- 必须已安装并在终端可用
codex 和 claude 两个命令行工具。本插件只负责协调,不含这两个 Agent。
- You must already have the
codex and claude CLIs installed and callable. This extension coordinates them — it does not include them.
没有这两个 CLI,装上本插件也不会有任何可用功能。/ Without those CLIs, installing this extension does nothing on its own.
核心能力 / Features
| 中文 |
English |
| Bridge 模式:一次输入目标 + 双方分工,自动生成给两个 Agent 的协作提示词 |
Bridge Mode: enter the goal + role split once, get ready-to-paste prompts for both agents |
| 任务与阻塞:任务级阻塞,两个 Agent 可并行;支持依赖链 |
Tasks & blocking: task-level blocking for parallel work, with dependency chains |
| 消息交接:REQUEST / DONE / QUESTION / NOTE,精简 JSONL 协议 |
Handoffs: concise REQUEST / DONE / QUESTION / NOTE over a JSONL log |
| 收件箱 + 对话流:每个 Agent 有自己的收件箱,另有全局对话历史 |
Inboxes + conversation: per-agent inbox plus a global conversation flow |
调度器代写协议:沙箱里的 Agent 不能写 .agents/,由插件代为落地它们的「协议动作」 |
Scheduler-mediated writes: sandboxed agents emit intent; the extension writes the protocol |
| 连续调度 + 目标裁判:无人值守跑到目标达成,由专职裁判验收后自动停 |
Continuous dispatch + goal judge: runs unattended until a dedicated judge confirms the goal |
| 资源冲突 + 协议校验 |
Resource conflict alerts + protocol validation |
状态 / Status
实验性早期版本。核心协作闭环已端到端验证,面向熟悉 Codex/Claude CLI 的用户。
Experimental early build. The core collaboration loop is validated end-to-end; aimed at users comfortable with the Codex/Claude CLIs.
快速开始 / Quick Start
- 构建 VSIX / Build the VSIX:
npm install
npm run package
- VS Code 命令面板 → Extensions: Install from VSIX... → 选择生成的
.vsix。
Command Palette → Extensions: Install from VSIX... → pick the .vsix.
- 打开一个工作区,点侧边栏的 AI Agents 图标 → 启动桥梁 / Start Bridge。
Open a workspace, click the AI Agents icon → Start Bridge.
📖 完整流程 / Full walkthrough: docs/USAGE.md
🧪 最小走通脚本 / Minimal test script: BRIDGE_MODE_TEST_SCRIPT.md
✅ 内测清单 / Internal checklist: INTERNAL_TEST_CHECKLIST.md
📦 发布指南 / Publishing guide: PUBLISHING.md
协议文件 / Protocol Files
.agents/context.md 项目目标 / project goal
.agents/roles.json 双方角色 / agent roles
.agents/state.json 运行状态、会话、任务 / run state, sessions, tasks
.agents/messages.jsonl 消息日志 / message log
.agents/PROTOCOL.md 协议参考 / protocol reference
一个协作参与者不只是 agent 类型,而是绑定到当前 run 的会话:
workspace → run_id → agent_type → session_id → tasks/messages
这能防止旧的、无关的 AI 会话误加入当前协作。
A participant is a bound session in the active run, not just an agent type — this keeps old or unrelated AI chats from joining.
开发 / Development
npm run check # 语法检查 / syntax check
npm test # 单元测试 / unit tests
npm run smoke # Extension Host 冒烟测试 / smoke tests
npm run package # 构建 VSIX / build VSIX
设计说明 / Design Notes
本插件刻意不与官方 AI 扩展做私有集成。第一层稳定基础是工作区协议:共享上下文、绑定会话、任务 ID、短消息、冲突提示。只有当某个 AI 扩展暴露可靠公开接口(命令/CLI/MCP/API)后,才会增加更强的自动化。
This prototype deliberately avoids private integration with official AI extensions. The first stable layer is the workspace protocol: shared context, bound sessions, task IDs, short messages, and conflict hints. Stronger automation can be added only when a target AI extension exposes a reliable public command, CLI, MCP, or API surface.
License: MIT