{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://mosaicstack.dev/schemas/orchestrator/result.schema.json", "title": "MACP Task Result", "type": "object", "required": [ "task_id", "status", "completed_at" ], "properties": { "task_id": { "type": "string" }, "status": { "type": "string", "enum": [ "completed", "failed", "escalated" ] }, "completed_at": { "type": "string", "format": "date-time" }, "failed_at": { "type": [ "string", "null" ], "format": "date-time" }, "exit_code": { "type": [ "integer", "null" ] }, "attempt": { "type": "integer" }, "max_attempts": { "type": "integer" }, "runtime": { "type": "string" }, "dispatch": { "type": "string" }, "worktree": { "type": [ "string", "null" ] }, "branch": { "type": [ "string", "null" ] }, "pr": { "type": [ "string", "null" ] }, "summary": { "type": "string", "description": "Human-readable summary of what the worker did" }, "files_changed": { "type": "array", "items": { "type": "string" } }, "gate_results": { "type": "array", "items": { "type": "object", "properties": { "command": { "type": "string" }, "exit_code": { "type": "integer" }, "type": { "type": "string", "enum": [ "mechanical", "ai-review", "ci-pipeline" ] } } } }, "error": { "type": [ "string", "null" ] }, "escalation_reason": { "type": [ "string", "null" ] }, "metadata": { "type": "object" } }, "additionalProperties": true }