feat: MACP Phase 1 — Core Protocol Implementation #9

Merged
jason.woltje merged 4 commits from feat/macp-phase1 into main 2026-03-28 01:39:27 +00:00
Owner

MACP Phase 1 — Mosaic Agent Coordination Protocol

Extends the existing orchestrator-matrix into MACP — a standardized protocol for delegating work to any agent runtime, tracking progress via quality gates, and collecting structured results.

What's New

Schemas:

  • task.schema.json — Extended with type, dispatch, worktree, branch, brief_path, result_path, gated/escalated statuses
  • event.schema.json — Added task.gated, task.escalated, task.retry.scheduled event types + dispatcher source
  • result.schema.json — New standardized worker completion report schema

Dispatcher (macp_dispatcher.py):

  • Worktree lifecycle: auto-create → dispatch → cleanup
  • Command generation for yolo/exec backends (ACP escalates to Phase 2)
  • Brief staging via temp files (no secrets in process args)
  • Path-validated worktree cleanup (refuses paths outside configured base)

Controller Wiring:

  • mosaic_orchestrator.py routes MACP tasks through dispatcher, legacy tasks through run_shell()
  • Backward compatible: tasks without dispatch field use old path
  • Result collection deferred to post-gate (no premature writes)

CLI (mosaic macp):

  • submit / status / drain / history subcommands

Sync (tasks_md_sync.py):

  • Only sets MACP fields when columns exist in markdown table headers
  • Legacy tables stay on legacy path

Review Findings (all addressed)

  • Backward compatibility for legacy tasks
  • ACP dispatch fail-safe (escalates instead of falsely completing)
  • No premature result writes before gates
  • Brief contents not exposed in process args
  • Worktree cleanup path validation
## MACP Phase 1 — Mosaic Agent Coordination Protocol Extends the existing orchestrator-matrix into MACP — a standardized protocol for delegating work to any agent runtime, tracking progress via quality gates, and collecting structured results. ### What's New **Schemas:** - task.schema.json — Extended with type, dispatch, worktree, branch, brief_path, result_path, gated/escalated statuses - event.schema.json — Added task.gated, task.escalated, task.retry.scheduled event types + dispatcher source - result.schema.json — New standardized worker completion report schema **Dispatcher (macp_dispatcher.py):** - Worktree lifecycle: auto-create → dispatch → cleanup - Command generation for yolo/exec backends (ACP escalates to Phase 2) - Brief staging via temp files (no secrets in process args) - Path-validated worktree cleanup (refuses paths outside configured base) **Controller Wiring:** - mosaic_orchestrator.py routes MACP tasks through dispatcher, legacy tasks through run_shell() - Backward compatible: tasks without dispatch field use old path - Result collection deferred to post-gate (no premature writes) **CLI (mosaic macp):** - submit / status / drain / history subcommands **Sync (tasks_md_sync.py):** - Only sets MACP fields when columns exist in markdown table headers - Legacy tables stay on legacy path ### Review Findings (all addressed) - Backward compatibility for legacy tasks - ACP dispatch fail-safe (escalates instead of falsely completing) - No premature result writes before gates - Brief contents not exposed in process args - Worktree cleanup path validation
jason.woltje added 4 commits 2026-03-28 00:54:35 +00:00
- Fix 1: tasks_md_sync only sets MACP fields when columns exist in table headers
- Fix 2: ACP dispatch now escalates instead of falsely completing
- Fix 3: Removed premature collect_result() from dispatch_task()
- Fix 4: Yolo brief staged via temp file (0600) instead of process args
- Fix 5: cleanup_worktree validates path against configured worktree base
jason.woltje merged commit 28392914a7 into main 2026-03-28 01:39:27 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/bootstrap#9