feat(teams): add multi-agent team support with TL, bidding arena, and blackboard - #96
feat(teams): add multi-agent team support with TL, bidding arena, and blackboard#96moyunqinghe wants to merge 4 commits into
Conversation
b05eb40 to
cbe4a34
Compare
|
[P1] 只读任务会话实际上可以被任意租户成员写入 |
|
感谢 review,三条意见全部采纳,已在 1. [P1] 非 TL 团队会话可被任意租户成员写入 在 2. [P1] 共享 TL 时跨团队串写
3. [P2] 统一线程列表串团队
回归测试(
另外把 后端全量测试 1525 个全部通过;ruff 无新增违规(剩余的 B008 等均为仓库既有模式)。 |
Summary
Adds multi-agent team support: teams of digital employees with a Team Lead (TL), task assignment/claiming, a 3-round HP-based bidding arena, a per-team blackboard, and full HITL (human-in-the-loop) controls. Design decisions are documented in
design-multi-agent-team-decisions.md.Backend
app/teams/module: teams/members CRUD, task lifecycle (pending → bidding → in_progress → review/rework → done/cancelled/escalated), bidding with per-round TL scoring and HP elimination, blackboard ingest pipeline (parse → normalize → structured write → citations), wake events, and audit trail (team_task_events)db/database.py), optimistic locking on task claim/awardChatSession.team_id, team-context injection (roster / open tasks / blackboard top-K) and task-dispatch post-processing in/api/chat/turnand/api/chat/streamservice_intake.py(merged with the new inbound attachment support)blackboardquery tool available inside member execution sessionsFrontend
TeamsPage,TeamDetailPage(task board, bidding records, reports, award override),TeamChatPage;BiddingArenaandTeamCardcomponents; sidebar navigation entryisTeamScope/readEmployeeScope); chat header/empty-state updated for team sessionsKnowledgeGraphCanvas) with a graph/cards toggle — this intentionally coexists with the new overview-panelKnowledgeGraphVisualizationExplicitly out of scope (v1): pure-agent resident TL loop, unbounded debate, automatic cross-team information flow.
Risk
ChatSession.team_id,ChatTurnRequest.interaction_mode)main; conflicts resolved inservice_intake.py(attachments + team context both preserved),KnowledgePage.tsx(both graph views kept), anden.json(both translation sets kept)Tests
pytest backend/tests: 1478 passed (incl. 7 new team test modules)npm --prefix frontend-enterprise test: 145 passednpm --prefix frontend-enterprise run build: passesruff check: no new violations beyond patterns already present in the codebase (e.g. FastAPIDependsB008);i18n:checkfailure count is lower than onmain(pre-existing failures unrelated to this PR)UI validation
Routes verified locally with an admin user:
/teams,/teams/:id(board, bidding arena, award override), team TL chat via/workspace/chat/:sessionId, and the knowledge detail graph view.