{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://zeroclaw.dev/schemas/approval.json", "title": "ApprovalRequest", "description": "A request that pauses a task at a human gate. Every high-risk action (spend, publish, send, revoke, delete, deploy, file-with-authorities) produces one of these. Lives in the AOS approval inbox + notifications.", "type": "object", "required": ["approval_id", "task_id", "agent", "action", "risk", "rationale", "diff_summary"], "additionalProperties": false, "properties": { "approval_id": { "type": "string", "description": "AOS-generated cuid for this approval." }, "task_id": { "type": "string", "pattern": "^AOS-\\d+$" }, "agent": { "type": "string", "description": "Agent requesting approval." }, "action": { "enum": [ "spend", "publish_public", "send_invoice", "send_client_communication", "send_outreach", "revoke_license", "delete_data", "delete_instance", "delete_dns", "production_deploy", "db_migration_live", "file_with_authorities", "contract_change", "budget_change", "campaign_activation" ], "description": "The category of irreversible/external action. Each maps to a hard rule in the policy crate." }, "risk": { "enum": ["medium", "high", "critical"] }, "rationale": { "type": "string", "description": "Why the agent believes this action is needed, in 1-3 sentences." }, "diff_summary": { "type": "string", "description": "Human-readable summary of what will change if approved (e.g. 'Spend 50 EUR on Google Ads campaign X', 'Delete instance abc.dfmpanel.eu', 'Send invoice RE-2026-0042 to client@bauer.de')." }, "payload": { "type": "object", "description": "Structured details for the approver to inspect. Shape varies by action; validated by the policy crate.", "additionalProperties": true }, "expires_at": { "type": "string", "format": "date-time", "description": "Optional: if not approved by this time, the task auto-fails." }, "estimated_cost_eur": { "type": "number", "minimum": 0 } } }