feat: @mosaic/coord — migrate from v0, gateway integration (P2-005)

Migrate the orchestration coordination package from v0 with full
file-based mission/task lifecycle management. Adds gateway REST API
at /api/coord/* and agent tools for coord queries.

Package modules:
- types: Mission, task, session, milestone type definitions
- mission: Create, load, save missions with atomic file writes
- tasks-file: TASKS.md markdown table parsing/generation with file locking
- runner: Task execution subprocess spawning with session locks
- status: Mission and task status queries

Gateway integration:
- CoordModule with CoordService wrapping coord functions
- CoordController exposing status/tasks/task-detail endpoints
- Agent tools: coord_mission_status, coord_list_tasks, coord_task_detail

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:31:19 -05:00
parent 7f6815feaf
commit 372472c5fc
19 changed files with 1873 additions and 7 deletions

View File

@@ -21,12 +21,12 @@
| P1-006 | done | Phase 1 | Gateway routes — tasks, projects, missions CRUD | #72 | #15 |
| P1-007 | done | Phase 1 | WebSocket server — chat streaming | #61 | #16 |
| P1-008 | done | Phase 1 | Basic agent dispatch — single provider | #61 | #17 |
| P1-009 | not-started | Phase 1 | Verify Phase 1 — gateway functional, API tested | | #18 |
| P1-009 | done | Phase 1 | Verify Phase 1 — gateway functional, API tested | #73 | #18 |
| P2-001 | done | Phase 2 | @mosaic/agent — Pi SDK integration + agent pool | #61 | #19 |
| P2-002 | not-started | Phase 2 | Multi-provider support — Anthropic + Ollama | | #20 |
| P2-003 | not-started | Phase 2 | Agent routing engine — cost/capability matrix | | #21 |
| P2-004 | not-started | Phase 2 | Tool registration — brain, queue, memory tools | | #22 |
| P2-005 | not-started | Phase 2 | @mosaic/coord — migrate from v0, gateway integration | — | #23 |
| P2-002 | done | Phase 2 | Multi-provider support — Anthropic + Ollama | #74 | #20 |
| P2-003 | done | Phase 2 | Agent routing engine — cost/capability matrix | #75 | #21 |
| P2-004 | done | Phase 2 | Tool registration — brain, queue, memory tools | #76 | #22 |
| P2-005 | in-progress | Phase 2 | @mosaic/coord — migrate from v0, gateway integration | — | #23 |
| P2-006 | not-started | Phase 2 | Agent session management — tmux + monitoring | — | #24 |
| P2-007 | not-started | Phase 2 | Verify Phase 2 — multi-provider routing works | — | #25 |
| P3-001 | not-started | Phase 3 | apps/web scaffold — Next.js 16 + BetterAuth + Tailwind | — | #26 |