{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:orbiplex:schema:responsibility-common:v1",
  "title": "Responsibility local test profile definitions",
  "$defs": {
    "Binding": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "revision": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "digest": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      },
      "required": [
        "id",
        "revision",
        "digest"
      ]
    },
    "ObjectBinding": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "kind": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "digest": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      },
      "required": [
        "id",
        "kind",
        "digest"
      ]
    },
    "EffectSpec": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "operations": {
          "type": "array",
          "items": {
            "enum": [
              "procurement/request",
              "procurement/offer",
              "procurement/contract-accept",
              "response/deliver",
              "response/accept",
              "response/reject"
            ]
          },
          "maxItems": 32,
          "uniqueItems": true,
          "minItems": 1
        },
        "hard": {
          "type": "boolean"
        },
        "priority_factor": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1
        },
        "rate_limit_factor": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1
        },
        "valid_from": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "valid_until": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "id",
        "operations",
        "hard",
        "priority_factor",
        "rate_limit_factor",
        "valid_from",
        "valid_until"
      ]
    },
    "LocalPolicy": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema": {
          "const": "responsibility-policy.v1"
        },
        "policy/id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4096
        },
        "host/id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "operations": {
          "type": "array",
          "items": {
            "enum": [
              "procurement/request",
              "procurement/offer",
              "procurement/contract-accept",
              "response/deliver",
              "response/accept",
              "response/reject"
            ]
          },
          "maxItems": 32,
          "uniqueItems": true,
          "minItems": 1
        },
        "test_subjects": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "maxItems": 256,
          "uniqueItems": true
        },
        "controllers": {
          "type": "object",
          "maxProperties": 32,
          "additionalProperties": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "appeal_actors": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "maxItems": 32,
          "uniqueItems": true
        },
        "review_seconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 31622400
        },
        "appeal_seconds": {
          "type": "integer",
          "minimum": 1209600,
          "maximum": 31622400
        },
        "max_effect_seconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 31622400
        },
        "object_kinds": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "maxItems": 32,
          "uniqueItems": true
        },
        "escalation_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "effect_stay": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "suspend"
            },
            "suspend_seconds": {
              "type": "integer",
              "minimum": 1,
              "maximum": 31622400
            }
          },
          "required": [
            "kind",
            "suspend_seconds"
          ]
        }
      },
      "required": [
        "schema",
        "policy/id",
        "revision",
        "host/id",
        "operations",
        "test_subjects",
        "controllers",
        "appeal_actors",
        "review_seconds",
        "appeal_seconds",
        "max_effect_seconds",
        "object_kinds",
        "escalation_ref"
      ]
    },
    "Mandate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema": {
          "const": "responsibility-mandate.v1"
        },
        "mandate/id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4096
        },
        "actor/id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "policy": {
          "$ref": "#/$defs/Binding"
        },
        "permissions": {
          "type": "array",
          "items": {
            "enum": [
              "open",
              "review",
              "decide",
              "handoff",
              "correct",
              "inspect",
              "evidence"
            ]
          },
          "maxItems": 32,
          "uniqueItems": true
        },
        "valid_from": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "valid_until": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "revoked": {
          "type": "boolean"
        }
      },
      "required": [
        "schema",
        "mandate/id",
        "revision",
        "actor/id",
        "policy",
        "permissions",
        "valid_from",
        "valid_until",
        "revoked"
      ]
    },
    "Action": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "open"
            },
            "owner": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "object": {
              "$ref": "#/$defs/ObjectBinding"
            }
          },
          "required": [
            "kind",
            "owner",
            "object"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "record-review"
            },
            "reason": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          },
          "required": [
            "kind",
            "reason"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "decide"
            },
            "decision_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "reasons": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            },
            "effects": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/EffectSpec"
              },
              "maxItems": 32,
              "uniqueItems": true
            }
          },
          "required": [
            "kind",
            "decision_id",
            "reasons",
            "effects"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "propose-handoff"
            },
            "successor": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "required": [
            "kind",
            "successor"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "accept-handoff"
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "acknowledge-reasons"
            },
            "decision_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "reasons_digest": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "required": [
            "kind",
            "decision_id",
            "reasons_digest"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "appeal"
            },
            "decision_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "reasons_digest": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "reason": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          },
          "required": [
            "kind",
            "decision_id",
            "reasons_digest",
            "reason"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "correct"
            },
            "decision_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "effects": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "maxItems": 32,
              "uniqueItems": true
            },
            "reason": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            }
          },
          "required": [
            "kind",
            "decision_id",
            "effects",
            "reason"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "inspect"
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "list"
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "attach-evidence"
            },
            "evidence": {
              "$ref": "#/$defs/EvidenceReference"
            }
          },
          "required": [
            "kind",
            "evidence"
          ]
        }
      ]
    },
    "Command": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema": {
          "const": "responsibility-command.v1"
        },
        "command/id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "host/id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "actor/id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "subject/id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "case/id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "case/revision": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "policy": {
          "$ref": "#/$defs/Binding"
        },
        "mandate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Binding"
            },
            {
              "type": "null"
            }
          ]
        },
        "issued_at": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "action": {
          "$ref": "#/$defs/Action"
        },
        "object": {
          "anyOf": [
            {
              "$ref": "#/$defs/ObjectBinding"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "schema",
        "command/id",
        "host/id",
        "actor/id",
        "subject/id",
        "case/id",
        "case/revision",
        "policy",
        "mandate",
        "issued_at",
        "action",
        "object"
      ]
    },
    "SignedCommand": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "command": {
          "$ref": "#/$defs/Command"
        },
        "signature": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "algorithm": {
          "enum": [
            "ed25519+domain-v1"
          ]
        }
      },
      "required": [
        "command",
        "signature",
        "algorithm"
      ]
    },
    "Decision": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "actor": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "mandate": {
          "$ref": "#/$defs/Binding"
        },
        "reasons": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096
        },
        "reasons_digest": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "decided_at": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "acknowledged_at": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "appeal_until": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "effects": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EffectSpec"
          },
          "maxItems": 32,
          "uniqueItems": true
        },
        "retracted_effects": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "maxItems": 32,
          "uniqueItems": true
        }
      },
      "required": [
        "id",
        "actor",
        "mandate",
        "reasons",
        "reasons_digest",
        "decided_at",
        "acknowledged_at",
        "appeal_until",
        "effects",
        "retracted_effects"
      ]
    },
    "AppealState": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "status": {
              "const": "none"
            }
          },
          "required": [
            "status"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "status": {
              "const": "filed"
            },
            "recipient": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "filed_at": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "status",
            "recipient",
            "filed_at"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "status": {
              "const": "appeal-blocked"
            },
            "required_proceeding": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "recorded_at": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "status",
            "required_proceeding",
            "recorded_at"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "status": {
              "const": "corrected"
            },
            "actor": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "corrected_at": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "status",
            "actor",
            "corrected_at"
          ]
        }
      ]
    },
    "Case": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema": {
          "const": "responsibility-case.v1"
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4096
        },
        "subject": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "object": {
          "$ref": "#/$defs/ObjectBinding"
        },
        "policy": {
          "$ref": "#/$defs/Binding"
        },
        "owner": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "proposed_successor": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            {
              "type": "null"
            }
          ]
        },
        "opened_at": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "review_until": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "procedure": {
          "enum": [
            "open",
            "reviewed",
            "decided",
            "escalation-required"
          ]
        },
        "appeal": {
          "$ref": "#/$defs/AppealState"
        },
        "decisions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Decision"
          },
          "maxItems": 32,
          "uniqueItems": true
        },
        "effect_states": {
          "type": "object",
          "maxProperties": 32,
          "additionalProperties": {
            "enum": [
              "pending",
              "applied",
              "refused",
              "retracted"
            ]
          }
        },
        "evidence_refs": {
          "type": "array",
          "maxItems": 32,
          "items": {
            "$ref": "#/$defs/EvidenceReference"
          }
        },
        "effect_stay": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "status": {
                  "const": "unavailable"
                },
                "decision_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "reason": {
                  "enum": [
                    "lifecycle-not-integrated"
                  ]
                },
                "escalation_ref": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                "recorded_at": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "status",
                "decision_id",
                "reason",
                "escalation_ref",
                "recorded_at"
              ]
            }
          ]
        }
      },
      "required": [
        "schema",
        "id",
        "revision",
        "subject",
        "object",
        "policy",
        "owner",
        "proposed_successor",
        "opened_at",
        "review_until",
        "procedure",
        "appeal",
        "decisions",
        "effect_states",
        "evidence_refs"
      ]
    },
    "RestrictionSource": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema": {
          "const": "participant-restriction-source.v1"
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4096
        },
        "subject": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "kind": {
          "enum": [
            "case-effect",
            "operator-source",
            "legacy-operator-source"
          ]
        },
        "case_id": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            {
              "type": "null"
            }
          ]
        },
        "decision_id": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "type": "null"
            }
          ]
        },
        "effect_id": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "type": "null"
            }
          ]
        },
        "policy": {
          "anyOf": [
            {
              "$ref": "#/$defs/Binding"
            },
            {
              "type": "null"
            }
          ]
        },
        "actor": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            {
              "type": "null"
            }
          ]
        },
        "mandate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Binding"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "operations": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "maxItems": 32,
          "uniqueItems": true,
          "minItems": 0
        },
        "hard": {
          "type": "boolean"
        },
        "priority_factor": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1
        },
        "rate_limit_factor": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1
        },
        "valid_from": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "valid_until": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "retracted": {
          "type": "boolean"
        },
        "recorded_at": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "diagnostic": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            {
              "type": "null"
            }
          ]
        },
        "legacy/timing": {
          "$ref": "#/$defs/LegacySourceTiming"
        }
      },
      "required": [
        "schema",
        "id",
        "revision",
        "subject",
        "kind",
        "case_id",
        "decision_id",
        "effect_id",
        "policy",
        "actor",
        "mandate",
        "reason_ref",
        "operations",
        "hard",
        "priority_factor",
        "rate_limit_factor",
        "valid_from",
        "valid_until",
        "retracted",
        "recorded_at",
        "diagnostic"
      ],
      "allOf": [
        {
          "if": {
            "properties": {
              "kind": {
                "const": "case-effect"
              }
            }
          },
          "then": {
            "properties": {
              "operations": {
                "type": "array",
                "items": {
                  "enum": [
                    "procurement/request",
                    "procurement/offer",
                    "procurement/contract-accept",
                    "response/deliver",
                    "response/accept",
                    "response/reject"
                  ]
                },
                "maxItems": 32,
                "uniqueItems": true,
                "minItems": 1
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "operations": {
                "maxItems": 0
              }
            }
          },
          "then": {
            "properties": {
              "diagnostic": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "kind": {
                "const": "legacy-operator-source"
              }
            }
          },
          "else": {
            "properties": {
              "legacy/timing": false
            }
          }
        },
        {
          "if": {
            "properties": {
              "diagnostic": {
                "type": "null"
              }
            },
            "required": [
              "diagnostic",
              "legacy/timing"
            ]
          },
          "then": {
            "properties": {
              "legacy/timing": {
                "properties": {
                  "recorded-at": {
                    "format": "date-time"
                  },
                  "expires-at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      ]
    },
    "SourceSet": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema": {
          "const": "participant-restriction-sources.v1"
        },
        "revision": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "sources": {
          "type": "object",
          "maxProperties": 8192,
          "additionalProperties": {
            "$ref": "#/$defs/RestrictionSource"
          }
        }
      },
      "required": [
        "schema",
        "revision",
        "sources"
      ]
    },
    "EffectIntent": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema": {
          "const": "responsibility-effect-request.v1"
        },
        "command": {
          "$ref": "#/$defs/SignedCommand"
        },
        "source": {
          "$ref": "#/$defs/RestrictionSource"
        },
        "origin": {
          "$ref": "#/$defs/SignedCommand"
        }
      },
      "required": [
        "schema",
        "command",
        "source",
        "origin"
      ]
    },
    "EffectReceipt": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "schema": {
          "const": "responsibility-effect-receipt.v1"
        },
        "source_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "source_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4096
        },
        "source_digest": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "source_set": {
          "$ref": "#/$defs/Binding"
        },
        "outcome": {
          "enum": [
            "pending",
            "applied",
            "refused",
            "retracted"
          ]
        },
        "refusal": {
          "anyOf": [
            {
              "enum": [
                "invalid-data",
                "limit-exceeded",
                "actor-mismatch",
                "binding-mismatch",
                "no-authority",
                "stale-revision",
                "unsupported-operation",
                "invalid-transition",
                "deadline-elapsed",
                "not-independent",
                "source-set-conflict",
                "source-conflict",
                "retraction-fence",
                "profile-disabled"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "schema",
        "source_id",
        "source_revision",
        "source_digest",
        "source_set",
        "outcome",
        "refusal"
      ]
    },
    "EvidenceReference": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "digest": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "storage_ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        }
      },
      "required": [
        "id",
        "digest",
        "storage_ref"
      ]
    },
    "LegacySourceTiming": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "recorded-at": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "expires-at": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "recorded-at"
      ],
      "description": "Exact original RFC3339 timing for legacy operator sources. Invalid recovered text requires a diagnostic and fails closed."
    }
  }
}
