{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commentary-dev/json-schema/commentary-dev-interaction-agent-decision-receipt-schema.json",
  "title": "InteractionAgentDecisionReceipt",
  "description": "Privacy-safe immutable receipt for the authorized creating agent. Human identity, Resource data, consequence content, and action snapshots are omitted.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commentary-dev-interactions-api-openapi.yml#/components/schemas/InteractionAgentDecisionReceipt",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "interactionId",
    "revisionId",
    "actionId",
    "proposalFingerprint",
    "semanticAction",
    "outcome",
    "decidedAt",
    "terminalState",
    "purged"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "interactionId": {
      "type": "string"
    },
    "revisionId": {
      "type": "string"
    },
    "actionId": {
      "type": "string"
    },
    "proposalFingerprint": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "semanticAction": {
      "type": "string"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "approve",
        "reject",
        "abstain",
        "conflict",
        "acknowledge",
        "choose",
        "answer",
        "comment",
        "request_revision",
        "snooze"
      ]
    },
    "decidedAt": {
      "type": "string",
      "format": "date-time"
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "aggregate": {
      "oneOf": [
        {
          "$ref": "#/$defs/AgentApprovalSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "terminalState": {
      "type": "string"
    },
    "purged": {
      "type": "boolean"
    },
    "contentPurgedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "$defs": {
    "AgentApprovalSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "state",
        "approvals",
        "required",
        "completedSteps",
        "totalSteps"
      ],
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "pending",
            "approved",
            "rejected",
            "expired",
            "unsatisfiable"
          ]
        },
        "approvals": {
          "type": "integer",
          "minimum": 0
        },
        "required": {
          "type": "integer",
          "minimum": 0
        },
        "completedSteps": {
          "type": "integer",
          "minimum": 0
        },
        "totalSteps": {
          "type": "integer",
          "minimum": 0
        }
      }
    }
  }
}