1.6 KiB
1.6 KiB
MACP Phase 1
MACP Phase 1 extends tools/orchestrator-matrix/ without replacing the existing deterministic controller model.
What Changed
- Task and event schemas now describe MACP dispatch metadata, new lifecycle statuses, and dispatcher-originated events.
tools/orchestrator-matrix/dispatcher/macp_dispatcher.pymanages task worktrees, dispatch command generation, result files, and cleanup.mosaic_orchestrator.pyroutes MACP-aware tasks through the dispatcher while leaving legacy non-dispatchtasks on the original shell path.bin/mosaic-macpadds manual submit, status, drain, and history operations for.mosaic/orchestrator/.
Dispatch Modes
exec: runs the task'scommanddirectly inside the task worktree.yolo: launchesmosaic yolo <runtime>via a PTY wrapper and stages the brief in a temporary file so the brief body is not exposed in process arguments.acp: escalates immediately withACP dispatch requires OpenClaw integration (Phase 2)until real ACP/OpenClaw spawning exists.
Result Contract
MACP writes task result JSON under .mosaic/orchestrator/results/ by default. Result files capture:
- Task status and timing
- Attempt counters
- Runtime and dispatch metadata
- Changed files seen in the task worktree
- Quality-gate command results
- Error or escalation details
Compatibility
Legacy tasks that omit dispatch still behave like the original matrix controller. tasks_md_sync.py only injects MACP fields when the corresponding markdown headers exist, which keeps existing tasks.json workflows functional while allowing orchestrators to opt into MACP incrementally.