feat: implement MACP phase 1 core protocol

This commit is contained in:
Jarvis
2026-03-27 18:39:57 -05:00
parent 24496cea01
commit 7ef49a33d8
19 changed files with 1546 additions and 48 deletions

View File

@@ -13,6 +13,7 @@ mechanical quality gates.
## Components
- `protocol/` - JSON schemas for task/event payloads
- `dispatcher/` - MACP dispatch helpers for worktrees, command generation, results, and cleanup
- `controller/mosaic_orchestrator.py` - deterministic controller loop
- `adapters/` - runtime adapter guidance
@@ -83,3 +84,27 @@ Task injection message format (room text):
```text
!mosaic-task {"id":"TASK-123","title":"Fix bug","command":"echo run","quality_gates":["pnpm lint"]}
```
## MACP Notes
MACP-aware tasks add dispatch metadata on top of the existing queue model:
- `dispatch`: `exec`, `yolo`, or `acp`
- `type`: task category used for orchestration intent
- `worktree` / `branch`: task-specific git execution context
- `brief_path`: markdown brief consumed by runtime-backed dispatchers
- `result_path`: structured result JSON written under `.mosaic/orchestrator/`
Controller behavior remains backward compatible:
- Tasks without `dispatch` continue through the legacy shell execution path.
- Tasks with `dispatch` use the MACP dispatcher and can emit `task.gated` and `task.escalated`.
Manual queue operations are exposed through:
```bash
mosaic macp submit ...
mosaic macp status
mosaic macp drain
mosaic macp history --task-id TASK-001
```