{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tiitrust.com/schemas/federated-agent-profile.v1.json",
  "title": "Federated Agent Profile",
  "type": "object",
  "required": ["identity_source", "issuer", "subject", "protocol"],
  "properties": {
    "identity_source": {"enum": ["TII_REGISTRY", "EXTERNAL"]},
    "issuer": {"type": "string", "minLength": 3},
    "subject": {"type": "string", "minLength": 1},
    "protocol": {"enum": ["TII_NAME", "OIDC", "A2A_AGENT_CARD", "SPIFFE_SVID", "W3C_VC", "PUBLIC_KEY", "DNS_WELL_KNOWN"]},
    "display_name": {"type": ["string", "null"], "maxLength": 120},
    "endpoint": {"type": ["string", "null"], "format": "uri"},
    "key_reference": {"type": ["string", "null"]},
    "organization_id": {"type": ["string", "null"]},
    "status": {"enum": ["IDENTITY_CLAIMED", "EXTERNAL_IDENTITY_VERIFIED", "ORGANIZATION_LINKED", "TECHNICALLY_BOUND", "ASSURANCE_PILOT_READY", "SUSPENDED", "REVOKED"]},
    "evidence_refs": {"type": "array", "items": {"type": "string"}},
    "valid_from": {"type": ["string", "null"], "format": "date-time"},
    "valid_until": {"type": ["string", "null"], "format": "date-time"}
  },
  "additionalProperties": false
}
