{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/africanmarketos-com/json-schema/africanmarketos-com-authority-conformance-response-schema.json",
  "title": "AuthorityConformanceResponse",
  "description": "Issue returns 201 and one-time credentials; call returns the selected authority/review/delivery result plus lab boundaries; close returns closed. Delegated result fields follow the target operation schema.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/africanmarketos-com-openapi.yml#/components/schemas/AuthorityConformanceResponse",
  "type": "object",
  "properties": {
    "status": {
      "type": "string"
    },
    "http_status": {
      "type": "integer"
    },
    "contract_version": {
      "type": "string"
    },
    "lab_fixture": {
      "type": "boolean"
    },
    "evaluation_only": {
      "type": "boolean"
    },
    "production_authority": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "execution_authorized": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "session_id": {
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "tenant_id": {
      "type": "string"
    },
    "workspace_id": {
      "type": "string"
    },
    "max_calls": {
      "type": "integer"
    },
    "calls_remaining": {
      "type": "integer"
    },
    "credentials": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "session_token": {
            "type": "string",
            "description": "Returned once. Store only in host credentials."
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "principal_sha256": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "receipt_registry": {
      "$ref": "#/$defs/AuthorityConformanceKeysResponse"
    },
    "receipt": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "sequence": {
              "type": "integer",
              "minimum": 1
            },
            "prev_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "recorded_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
            },
            "sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "signature": {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "const": "unsigned"
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "pattern": "\\S"
                    },
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "key_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 128
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "status",
                    "reason"
                  ]
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "status": {
                      "const": "signed"
                    },
                    "algorithm": {
                      "const": "Ed25519"
                    },
                    "key_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "\\S"
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "signature_b64": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9+/]{86}==$"
                    }
                  },
                  "required": [
                    "standard",
                    "status",
                    "algorithm",
                    "key_id",
                    "signature_b64"
                  ]
                }
              ]
            },
            "lab_fixture": {
              "type": "boolean"
            },
            "production_authority": {
              "const": false
            },
            "kind": {
              "const": "capability_verification"
            },
            "verification_id": {
              "type": "string",
              "pattern": "^VR-[a-f0-9]{48}$"
            },
            "capability_id": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{2,119}$"
            },
            "case_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "decision": {
              "type": "string",
              "enum": [
                "allow",
                "deny"
              ]
            },
            "deny_reasons": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "\\S"
              },
              "minItems": 0,
              "maxItems": 100
            },
            "effect_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "pattern": "\\S"
            },
            "requested_effect_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "executor_principal_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "reliance": {
              "type": [
                "string",
                "null"
              ]
            },
            "valid_until": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "sequence",
            "prev_sha256",
            "recorded_at",
            "sha256",
            "signature",
            "kind",
            "verification_id",
            "capability_id",
            "case_id",
            "decision",
            "deny_reasons",
            "effect_id",
            "requested_effect_sha256",
            "executor_principal_sha256",
            "reliance",
            "valid_until"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "sequence": {
              "type": "integer",
              "minimum": 1
            },
            "prev_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "recorded_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
            },
            "sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "signature": {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "const": "unsigned"
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "pattern": "\\S"
                    },
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "key_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 128
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "status",
                    "reason"
                  ]
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "status": {
                      "const": "signed"
                    },
                    "algorithm": {
                      "const": "Ed25519"
                    },
                    "key_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "\\S"
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "signature_b64": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9+/]{86}==$"
                    }
                  },
                  "required": [
                    "standard",
                    "status",
                    "algorithm",
                    "key_id",
                    "signature_b64"
                  ]
                }
              ]
            },
            "lab_fixture": {
              "type": "boolean"
            },
            "production_authority": {
              "const": false
            },
            "kind": {
              "const": "effect_report"
            },
            "verification_id": {
              "type": "string",
              "pattern": "^VR-[a-f0-9]{48}$"
            },
            "capability_id": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{2,119}$"
            },
            "effect_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "pattern": "\\S"
            },
            "outcome": {
              "type": "string",
              "enum": [
                "succeeded",
                "failed",
                "not_attempted"
              ]
            },
            "external_ref_sha256": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reported_after_valid_until": {
              "type": "boolean"
            },
            "commit_id": {
              "type": "string",
              "pattern": "^CM-[a-f0-9]{48}$"
            }
          },
          "required": [
            "sequence",
            "prev_sha256",
            "recorded_at",
            "sha256",
            "signature",
            "kind",
            "verification_id",
            "capability_id",
            "effect_id",
            "outcome",
            "external_ref_sha256",
            "reported_after_valid_until"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "sequence": {
              "type": "integer",
              "minimum": 1
            },
            "prev_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "recorded_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
            },
            "sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "signature": {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "const": "unsigned"
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "pattern": "\\S"
                    },
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "key_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 128
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "status",
                    "reason"
                  ]
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "status": {
                      "const": "signed"
                    },
                    "algorithm": {
                      "const": "Ed25519"
                    },
                    "key_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "\\S"
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "signature_b64": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9+/]{86}==$"
                    }
                  },
                  "required": [
                    "standard",
                    "status",
                    "algorithm",
                    "key_id",
                    "signature_b64"
                  ]
                }
              ]
            },
            "lab_fixture": {
              "type": "boolean"
            },
            "production_authority": {
              "const": false
            },
            "kind": {
              "const": "revocation"
            },
            "target_kind": {
              "type": "string",
              "enum": [
                "anchor",
                "credential",
                "source_record",
                "closure",
                "capability"
              ]
            },
            "target_id": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{2,119}$"
            },
            "revoked_by_principal_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "operation_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "pattern": "\\S"
            }
          },
          "required": [
            "sequence",
            "prev_sha256",
            "recorded_at",
            "sha256",
            "signature",
            "kind",
            "target_kind",
            "target_id",
            "revoked_by_principal_sha256",
            "operation_id"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "sequence": {
              "type": "integer",
              "minimum": 1
            },
            "prev_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "recorded_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
            },
            "sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "signature": {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "const": "unsigned"
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "pattern": "\\S"
                    },
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "key_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 128
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "status",
                    "reason"
                  ]
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "status": {
                      "const": "signed"
                    },
                    "algorithm": {
                      "const": "Ed25519"
                    },
                    "key_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "\\S"
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "signature_b64": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9+/]{86}==$"
                    }
                  },
                  "required": [
                    "standard",
                    "status",
                    "algorithm",
                    "key_id",
                    "signature_b64"
                  ]
                }
              ]
            },
            "lab_fixture": {
              "type": "boolean"
            },
            "production_authority": {
              "const": false
            },
            "kind": {
              "const": "effect_commit"
            },
            "commit_id": {
              "type": [
                "string",
                "null"
              ],
              "pattern": "^CM-[a-f0-9]{48}$"
            },
            "verification_id": {
              "type": "string",
              "pattern": "^VR-[a-f0-9]{48}$"
            },
            "capability_id": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{2,119}$"
            },
            "effect_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "pattern": "\\S"
            },
            "requested_effect_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "decision": {
              "type": "string",
              "enum": [
                "commit",
                "deny"
              ]
            },
            "deny_reasons": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "pattern": "\\S"
              },
              "minItems": 0,
              "maxItems": 100
            },
            "commit_valid_until": {
              "type": [
                "string",
                "null"
              ]
            },
            "executor_principal_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "permission_basis": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "effect_state": {
                  "type": "string",
                  "enum": [
                    "positive",
                    "conditional",
                    "pending",
                    "adverse",
                    "revoked",
                    "not_modelled"
                  ]
                },
                "conditions": {
                  "type": "array",
                  "maxItems": 4,
                  "items": {
                    "type": "object"
                  }
                },
                "basis_reviews": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "minItems": 0,
                  "maxItems": 64
                },
                "decision_state_sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "decision_journal_head_sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "capability_document_sha256": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "effect_state",
                "conditions",
                "basis_reviews",
                "decision_state_sha256",
                "decision_journal_head_sha256",
                "capability_document_sha256"
              ]
            }
          },
          "required": [
            "sequence",
            "prev_sha256",
            "recorded_at",
            "sha256",
            "signature",
            "kind",
            "commit_id",
            "verification_id",
            "capability_id",
            "effect_id",
            "requested_effect_sha256",
            "decision",
            "deny_reasons",
            "commit_valid_until",
            "executor_principal_sha256"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "sequence": {
              "type": "integer",
              "minimum": 1
            },
            "prev_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "recorded_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
            },
            "sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "signature": {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "status": {
                      "const": "unsigned"
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "pattern": "\\S"
                    },
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "key_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 128
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "status",
                    "reason"
                  ]
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "standard": {
                      "const": "MVR-RECEIPT-SIG-V1"
                    },
                    "status": {
                      "const": "signed"
                    },
                    "algorithm": {
                      "const": "Ed25519"
                    },
                    "key_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "\\S"
                    },
                    "registry_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "signature_b64": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9+/]{86}==$"
                    }
                  },
                  "required": [
                    "standard",
                    "status",
                    "algorithm",
                    "key_id",
                    "signature_b64"
                  ]
                }
              ]
            },
            "lab_fixture": {
              "type": "boolean"
            },
            "production_authority": {
              "const": false
            },
            "kind": {
              "const": "permission_statement"
            },
            "statement_id": {
              "type": "string",
              "pattern": "^PS-[a-f0-9]{48}$"
            },
            "case_id": {
              "type": "string",
              "pattern": "^RC-[a-f0-9]{64}$"
            },
            "capability_id": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{2,119}$"
            },
            "coverage": {
              "type": "string",
              "enum": [
                "covered",
                "not_covered"
              ]
            },
            "valid_until": {
              "type": "string",
              "format": "date-time",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
            },
            "statement": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "const": "mvr.permission-statement/1"
                },
                "statement_id": {
                  "type": "string",
                  "pattern": "^PS-[a-f0-9]{48}$"
                },
                "issued_at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
                },
                "valid_until": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
                },
                "case_id": {
                  "type": "string",
                  "pattern": "^RC-[a-f0-9]{64}$"
                },
                "capability_id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{2,119}$"
                },
                "capability_document_sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "institution_anchor_id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{2,119}$"
                },
                "reliance": {
                  "type": "string",
                  "enum": [
                    "lab_fixture_only",
                    "institution_signed"
                  ]
                },
                "executor_principal_sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "requested_effect": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "effect_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120,
                      "pattern": "\\S"
                    },
                    "effect_type": {
                      "type": "string",
                      "enum": [
                        "amos.document.draft.create@1",
                        "amos.communication.evidence.request@1",
                        "amos.calendar.meeting.create@1",
                        "amos.communication.counterparty.contact@1",
                        "amos.document.publish@1",
                        "amos.finance.spend.commit@1",
                        "amos.owner_lab.artifact.create@1",
                        "amos.procurement.order.issue@1",
                        "amos.finance.payment.initiate@1",
                        "amos.credit.application.approve@1",
                        "amos.distribution.product.release@1",
                        "amos.programme.participant.enrol@1",
                        "amos.data.record.disclose@1",
                        "amos.licence.permission.grant@1",
                        "amos.licence.permission.revoke@1",
                        "create_draft_record",
                        "send_evidence_request",
                        "schedule_meeting",
                        "contact_counterparty",
                        "publish_document",
                        "commit_spend"
                      ]
                    },
                    "resource": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "system": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "pattern": "\\S"
                        },
                        "resource_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "pattern": "\\S"
                        },
                        "resource_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120,
                          "pattern": "\\S"
                        }
                      },
                      "required": [
                        "system",
                        "resource_type"
                      ]
                    },
                    "amount_minor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "external_contact": {
                      "type": "boolean"
                    },
                    "counterparty_ref": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "pattern": "\\S"
                    }
                  },
                  "required": [
                    "effect_id",
                    "effect_type",
                    "resource"
                  ]
                },
                "requested_effect_sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "coverage": {
                  "type": "string",
                  "enum": [
                    "covered",
                    "not_covered"
                  ]
                },
                "deny_reasons": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "pattern": "\\S"
                  },
                  "minItems": 0,
                  "maxItems": 100
                },
                "effect_state": {
                  "anyOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "target": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "effect_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120,
                          "pattern": "\\S"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "positive",
                            "conditional",
                            "pending",
                            "adverse",
                            "revoked",
                            "not_modelled"
                          ]
                        },
                        "conditions": {
                          "type": "array",
                          "maxItems": 4,
                          "items": {
                            "type": "object"
                          }
                        },
                        "basis_reviews": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          "minItems": 0,
                          "maxItems": 64
                        },
                        "basis_credential_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{2,119}$"
                          },
                          "minItems": 0,
                          "maxItems": 64
                        },
                        "valid_until": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "decision_state_sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "decision_journal_head_sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "target",
                        "effect_type",
                        "state",
                        "conditions",
                        "basis_reviews",
                        "basis_credential_ids",
                        "valid_until",
                        "decision_state_sha256",
                        "decision_journal_head_sha256"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dependencies": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "capability",
                          "institution_anchor",
                          "review_case",
                          "residual_closure",
                          "reviewer_designation",
                          "decision_journal"
                        ]
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "pattern": "\\S"
                      },
                      "sha256": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "valid_until": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "revision": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "residual_code": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "sha256",
                      "valid_until"
                    ]
                  },
                  "minItems": 1,
                  "maxItems": 80
                },
                "standing_assertions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "credential_id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{2,119}$"
                      },
                      "asserted_by_anchor_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "asserted_by_organization_ref": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "verification": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "pattern": "\\S"
                      },
                      "trust_tier": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "usable": {
                        "type": "boolean"
                      },
                      "not_after": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "credential_sha256": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "supports_effect": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "\\S"
                      }
                    },
                    "required": [
                      "credential_id",
                      "asserted_by_anchor_id",
                      "asserted_by_organization_ref",
                      "verification",
                      "trust_tier",
                      "usable",
                      "not_after",
                      "credential_sha256",
                      "supports_effect"
                    ]
                  },
                  "minItems": 0,
                  "maxItems": 64
                },
                "revocation": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "checked_at": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"
                    },
                    "method": {
                      "const": "atomic_reread_of_every_dependency"
                    },
                    "commit_required": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 400,
                      "pattern": "\\S"
                    }
                  },
                  "required": [
                    "checked_at",
                    "method",
                    "commit_required"
                  ]
                },
                "requested_by_principal_sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "execution_authorized": {
                  "const": false
                },
                "amos_issued_authority": {
                  "const": false
                }
              },
              "required": [
                "type",
                "statement_id",
                "issued_at",
                "valid_until",
                "case_id",
                "capability_id",
                "capability_document_sha256",
                "institution_anchor_id",
                "reliance",
                "executor_principal_sha256",
                "requested_effect",
                "requested_effect_sha256",
                "coverage",
                "deny_reasons",
                "effect_state",
                "dependencies",
                "standing_assertions",
                "revocation",
                "requested_by_principal_sha256",
                "execution_authorized",
                "amos_issued_authority"
              ]
            }
          },
          "required": [
            "sequence",
            "prev_sha256",
            "recorded_at",
            "sha256",
            "signature",
            "kind",
            "statement_id",
            "case_id",
            "capability_id",
            "coverage",
            "valid_until",
            "statement"
          ]
        }
      ]
    },
    "decision": {
      "type": "string",
      "enum": [
        "allow",
        "deny"
      ]
    },
    "deny_reasons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "verification_id": {
      "type": "string"
    },
    "capability_id": {
      "type": "string"
    },
    "valid_until": {
      "type": [
        "string",
        "null"
      ]
    },
    "outcome": {
      "type": "string",
      "enum": [
        "succeeded",
        "failed",
        "not_attempted"
      ]
    }
  },
  "additionalProperties": true,
  "required": [
    "status",
    "contract_version",
    "lab_fixture",
    "production_authority",
    "execution_authorized"
  ],
  "$defs": {
    "AuthorityConformanceKeysResponse": {
      "type": "object",
      "properties": {
        "lab_fixture": {
          "type": "boolean"
        },
        "production_authority": {
          "type": "boolean",
          "enum": [
            false
          ]
        },
        "keys": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key_id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "retired",
                  "revoked"
                ]
              },
              "lab_fixture": {
                "type": "boolean"
              },
              "public_key_spki_b64": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        },
        "boundary": {
          "type": "string"
        }
      },
      "additionalProperties": true,
      "required": [
        "lab_fixture",
        "production_authority",
        "keys"
      ]
    }
  }
}