{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agentreceipts.app/schemas/mandate.schema.json",
  "title": "Agent Mandate",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "mandate_id",
    "principal_label",
    "agent_label",
    "allowed_action",
    "allowed_surface",
    "constraints",
    "expires_at",
    "human_owner_label",
    "dry_run"
  ],
  "properties": {
    "mandate_id": {
      "type": "string",
      "minLength": 1
    },
    "principal_label": {
      "type": "string",
      "minLength": 1
    },
    "agent_label": {
      "type": "string",
      "minLength": 1
    },
    "allowed_action": {
      "type": "string",
      "minLength": 1
    },
    "allowed_surface": {
      "type": "string",
      "minLength": 1
    },
    "constraints": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "human_owner_label": {
      "type": "string",
      "minLength": 1
    },
    "dry_run": {
      "type": "boolean",
      "default": true
    }
  },
  "$comment": "This public alpha schema is a bounded projection. It must not be treated as the complete private canonical AgentReceipts authorization model.",
  "x-agentreceipts-profile": "public-alpha-projection",
  "x-agentreceipts-canonical-status": "non-canonical-public-projection",
  "x-agentreceipts-stability": "alpha"
}
