{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agentreceipts.app/schemas/receipt.schema.json",
  "title": "Agent Action Receipt",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "receipt_id",
    "mandate_id",
    "agent_label",
    "action_summary",
    "action_status",
    "evidence_hash",
    "created_at",
    "verification_status",
    "dry_run"
  ],
  "properties": {
    "receipt_id": {
      "type": "string",
      "minLength": 1
    },
    "mandate_id": {
      "type": "string",
      "minLength": 1
    },
    "agent_label": {
      "type": "string",
      "minLength": 1
    },
    "action_summary": {
      "type": "string",
      "minLength": 1
    },
    "action_status": {
      "type": "string",
      "enum": [
        "planned",
        "completed",
        "failed",
        "declined"
      ]
    },
    "evidence_hash": {
      "type": "string",
      "pattern": "^sha256:[a-f0-9]{64}$"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "verification_status": {
      "type": "string",
      "enum": [
        "unverified",
        "verified",
        "failed"
      ]
    },
    "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 receipt model.",
  "x-agentreceipts-profile": "public-alpha-projection",
  "x-agentreceipts-canonical-status": "non-canonical-public-projection",
  "x-agentreceipts-stability": "alpha"
}
