{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://torneo.ai/schemas/attestor_registry.v1",
  "title": "attestor_registry.v1",
  "description": "The attestor trust registry read by torneo_platform/attestations.py (data/attestor_registry.json, TORNEO_ATTESTOR_REGISTRY): a JSON object keyed by key id, one entry per registered Ed25519 PUBLIC key. It never holds a private key or a seed: an entry is closed, so any field not declared here (a seed, a private key under any name) is refused. An empty object is valid and trusts nothing: every attestation then verifies INVALID. Rules the shape cannot state (window order, one public key per key id) are checked by attestations.registry_problems.",
  "type": "object",
  "propertyNames": {
    "pattern": "^[a-z0-9][a-z0-9._-]{1,63}$"
  },
  "additionalProperties": {
    "type": "object",
    "required": [
      "public_key",
      "person",
      "human",
      "roles",
      "valid_from",
      "valid_until"
    ],
    "properties": {
      "public_key": {
        "type": "string",
        "pattern": "^[0-9a-f]{64}$"
      },
      "person": {
        "type": "string",
        "maxLength": 120
      },
      "org": {
        "type": "string",
        "maxLength": 120
      },
      "human": {
        "type": "boolean"
      },
      "roles": {
        "type": "array",
        "minItems": 1,
        "uniqueItems": true,
        "items": {
          "type": "string",
          "pattern": "^[a-z][a-z_]{1,39}$"
        }
      },
      "valid_from": {
        "type": "string",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
      },
      "valid_until": {
        "type": "string",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
      },
      "independent": {
        "type": "boolean"
      },
      "validator": {
        "type": "boolean"
      },
      "compromise": {
        "type": "object",
        "required": ["suspected_from", "detected_at"],
        "properties": {
          "suspected_from": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"},
          "detected_at": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"}
        },
        "additionalProperties": false
      },
      "issued": {
        "type": "string",
        "maxLength": 300
      },
      "custody": {
        "type": "string",
        "maxLength": 300
      }
    },
    "additionalProperties": false
  }
}
