{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "vaultfire://v3-operations/release-status.schema.json",
  "title": "Vaultfire V3 release status",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "asOfUtc",
    "canonicalAuthority",
    "sourceComplete",
    "evidenceComplete",
    "deploymentAuthorized",
    "deployed",
    "activated",
    "humanAuthorization",
    "deploymentAuthorization",
    "activationAuthorization",
    "evidenceRecords",
    "observedInputClasses",
    "externalBlockers",
    "blockers"
  ],
  "properties": {
    "schemaVersion": {"const": "1.0.0"},
    "asOfUtc": {"type": "string", "format": "date-time"},
    "canonicalAuthority": {"const": true},
    "sourceComplete": {"type": "boolean"},
    "evidenceComplete": {"type": "boolean"},
    "deploymentAuthorized": {"type": "boolean"},
    "deployed": {"type": "boolean"},
    "activated": {"type": "boolean"},
    "humanAuthorization": {
      "type": "object",
      "additionalProperties": false,
      "required": ["required", "recorded", "evidenceRefs"],
      "properties": {
        "required": {"const": true},
        "recorded": {"type": "boolean"},
        "evidenceRefs": {
          "type": "array",
          "items": {"type": "string", "minLength": 1},
          "uniqueItems": true
        }
      }
    },
    "deploymentAuthorization": {"$ref":"#/$defs/authorization"},
    "activationAuthorization": {"$ref":"#/$defs/authorization"},
    "evidenceRecords": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "observedAtUtc", "maximumAgeHours", "evidenceRefs"],
        "properties": {
          "id": {"type": "string", "minLength": 1},
          "observedAtUtc": {"type": "string", "format": "date-time"},
          "maximumAgeHours": {"type": "integer", "minimum": 1},
          "evidenceRefs": {
            "type": "array",
            "items": {"type": "string", "minLength": 1},
            "minItems": 1,
            "uniqueItems": true
          }
        }
      }
    },
    "observedInputClasses": {
      "type": "array",
      "items": {"type": "string"},
      "uniqueItems": true
    },
    "externalBlockers": {
      "type": "array",
      "items": {"$ref": "#/$defs/blocker"},
      "minItems": 4
    },
    "blockers": {
      "type": "array",
      "items": {"$ref": "#/$defs/blocker"},
      "uniqueItems": true
    }
  },
  "$defs": {
    "authorization": {
      "type":"object",
      "additionalProperties":false,
      "required":["required","recorded","evidenceRefs"],
      "properties":{
        "required":{"const":true},
        "recorded":{"type":"boolean"},
        "evidenceRefs":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true}
      }
    },
    "blocker": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "category", "status", "evidenceRefs"],
      "properties": {
        "id": {"type": "string", "pattern": "^[A-Z0-9-]+$"},
        "category": {
          "enum": [
            "source",
            "evidence",
            "authorization",
            "deployment",
            "activation",
            "partner-acceptance",
            "privacy",
            "counsel",
            "independent-audit",
            "operations",
            "x402",
            "solana",
            "legacy-compatibility"
          ]
        },
        "status": {"enum": ["open", "satisfied"]},
        "evidenceRefs": {
          "type": "array",
          "items": {"type": "string", "minLength": 1},
          "uniqueItems": true
        }
      }
    }
  }
}
