TEAM_MCP_VERIFICATION_CHECKLIST.md
基于 TEAM_MCP_PRD.md
前端: Team Create Modal 弹出
ipcBridge.team.create后端: Team 创建成功
/api/teams 返回 200 + TTeam 对象teams 表插入新记录agents JSON 列序列化正确id, leader_agent_id, agents[], created_atIPC 事件: WebSocket 事件广播
team.list-changed 收到创建事件(action='created')useTeamList() 自动刷新列表前端: Team 列表页加载
ipcBridge.team.list({ user_id })teams/{user_id}后端: 返回列表
/api/teams?user_id=... 返回 TTeam[]前端: Team 详情页加载
ipcBridge.team.get({ id })前端: 删除按钮触发
ipcBridge.team.remove({ id })team-active-slot-{id}后端: 删除成功
/api/teams/{id} 返回 200teams 表删除对应记录IPC 事件: 刷新前端
team.list-changed 事件后端: TeamSession 创建
TeamSession.constructor() 初始化 Mailbox, TaskManager, TeammateManagerTeamMcpServer 实例创建后端: MCP Server 启动
ipcBridge.team.ensureSession({ team_id })startMcpServer()IPC 事件: TCP 就绪通知
team.mcp.status 事件 (phase='tcp_ready', port)后端: 生成 stdio 配置
getStdioConfig(agentSlotId) 返回:
{
"name": "aionui-team-{team_id}",
"command": "node",
"args": ["path/to/team-mcp-stdio.js"],
"env": [
{ "name": "TEAM_MCP_PORT", "value": "{port}" },
{ "name": "TEAM_MCP_TOKEN", "value": "{token}" },
{ "name": "TEAM_AGENT_SLOT_ID", "value": "{slot_id}" }
]
}
后端: 注入到 ACP session
Agent: stdio 脚本启动
TCP Server: 接收连接
Agent: 发送 mcp_ready 通知
{ type: 'mcp_ready', from_slot_id: ... }notifyMcpReady(slot_id)后端: 等待 MCP 就绪
waitForMcpReady(slot_id) 注册等待MCP 状态流转:
tcp_ready → TCP server 启动mcp_tools_waiting → 等待 stdio 连接mcp_tools_ready → stdio 发送 mcp_ready前端: 用户发送消息
ipcBridge.team.sendMessage({ team_id, content })HTTP: 消息上传
/api/teams/{team_id}/messages{ content: string; files?: string[] }后端: 消息处理
TeamSession.sendMessage() 执行:
{ from_agent_id: 'user', to_agent_id: leader }message.stream (type='user_content')wake(leader_slot_id) 唤醒 leader前端: 消息展示
conversation.responseStream 事件更新Agent: 调用 MCP 工具
team_send_message{ to: 'agent_name', message: '...' }TCP Server: 处理工具调用
handleToolCall('team_send_message', args, fromSlotId)resolveSlotId(to) 模糊匹配目标 agent后端: 消息路由
mailbox.write() 写入消息safeWake(target_slot_id) 唤醒目标对端 Agent: 收到消息
mailbox.readUnread() 读取消息Agent: 广播消息
team_send_message 参数: { to: '*', message: '...' }TCP Server: 广播处理
前端: 多个 agent 更新
Agent: 请求 shutdown
team_shutdown_agent({ slot_id })TCP Server: 处理 shutdown 请求
Leader: 响应 shutdown
team_send_message 返回 "shutdown_approved" 或 "shutdown_rejected:reason"TCP Server: 处理 response
removeAgent(slot_id)team.agent.removed前端: 添加按钮
ipcBridge.team.addAgent({ team_id, agent })HTTP: 添加请求
/api/teams/{team_id}/agents{ agent: Omit<TeamAgent, 'slot_id'> }后端: Agent 添加
TeammateManager.addAgent(agent)team.agent.spawned前端: UI 更新
team.agent.spawned前端: 重命名按钮
ipcBridge.team.renameAgent({ team_id, slot_id, new_name })HTTP: 重命名请求
/api/teams/{team_id}/agents/{slot_id}/name{ name: string }后端: 重命名处理
TeammateManager.renameAgent(slot_id, new_name)team.agent.renamed前端: UI 更新
team.agent.renamed前端: 移除按钮
ipcBridge.team.removeAgent({ team_id, slot_id })HTTP: 删除请求
/api/teams/{team_id}/agents/{slot_id}后端: Agent 移除
TeammateManager.removeAgent(slot_id)team.agent.removed前端: UI 更新
team.agent.removed后端: 状态流转
IPC 事件: 状态通知
team.agent.status 事件status 和可选的 last_message前端: Status Badge 显示
前端: Status Map 维护
useTeamSession() 维护 statusMapteam.agent.status 更新初始加载
useTeamList() 加载数据创建按钮
Team 卡片
顶部信息栏
左侧 Agent Tabs
中央聊天区
team.sendMessage平台兼容性
用户气泡
Agent 气泡
系统消息
ACP Agent
conversation.update()Aionrs Agent
conversation.update()前端连接
team.* 事件事件监听
team.agent.status 实时收到状态更新team.agent.spawned 收到新 agent 通知team.agent.removed 收到移除通知team.agent.renamed 收到重命名通知team.list-changed 收到列表变更team.mcp.status 收到 MCP 状态更新useTeamSession
mutateTeam() 刷新 server 数据useTeamList
team.list-changedmutate() 刷新列表teams 表
mailbox 表
tasks 表
主键唯一性
外键引用
并发写入
team_send_message
{ to: string, message: string, summary?: string }team_spawn_agent
{ agent_type, agent_name, ... }team_task_create
{ subject, description?, metadata? }team_task_update
{ id, status?, owner?, blocked_by?, blocks?, metadata? }team_task_list
team_members
team_rename_agent
{ slot_id, new_name }team_shutdown_agent
{ slot_id }team_describe_assistant
{ assistant_id }team_list_models
{ backend }HTTP 超时
WebSocket 断连
Agent 不存在
权限不足
Mailbox 满
多个 agent 同时发送消息
Agent 加入同时发送消息
Team 删除中接收消息
| 类别 | 检查项数 | 完成数 | 备注 |
|---|---|---|---|
| Team 生命周期 | 12 | __ / 12 | |
| MCP 注入链路 | 11 | __ / 11 | |
| 成员通信 | 13 | __ / 13 | |
| Agent 生命周期 | 13 | __ / 13 | |
| 前端 UI | 15 | __ / 15 | |
| WebSocket 事件 | 8 | __ / 8 | |
| 数据持久化 | 10 | __ / 10 | |
| MCP 工具 | 10 | __ / 10 | |
| 错误处理 | 9 | __ / 9 | |
| 性能 & 可观测性 | 8 | __ / 8 | |
| 总计 | 109 | __ / 109 | 达成率: _% |
MCP Readiness 30 秒超时 — 如果 agent 启动慢,可能超时退化。监控超时情况。
Mailbox 表无索引 — 大量消息时查询性能下降,建议在 team_id + to_agent_id 建立索引。
并发唤醒 — activeWakes Set 用于防重,但在极端场景下可能漏唤醒。
Workspace 隔离 — 当前 isolated 模式为未来预留,实际实现可能需要反序列化或 chroot。
Agent 过多 — 目前无分页,UI 可能变慢。200+ agent 时考虑虚拟滚动。
清单创建日期: 2026-04-28 预计完成: 2 周 所有权: Team Lead + QA