{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xn--82czbx2bczd4fl8a.online/agent-registry/schema.json",
  "title": "Signed Agent Manifest",
  "type": "object",
  "required": [
    "agentId",
    "did",
    "protocol",
    "capabilities",
    "endpoints",
    "signature"
  ],
  "properties": {
    "agentId": {
      "type": "string",
      "format": "uri"
    },
    "did": {
      "type": "string",
      "pattern": "^did:(web|key|plc):"
    },
    "protocol": {
      "enum": [
        "ap2/0.2",
        "a2a/0.3",
        "mcp/2026-03-26"
      ]
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "endpoints": {
      "type": "object",
      "required": [
        "invoke"
      ],
      "properties": {
        "invoke": {
          "type": "string",
          "format": "uri"
        },
        "discovery": {
          "type": "string",
          "format": "uri"
        },
        "events": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "auth": {
      "enum": [
        "oauth2.1+pkce",
        "private_key_jwt",
        "mtls",
        "did-auth"
      ]
    },
    "pricing": {
      "type": "string",
      "format": "uri"
    },
    "sla": {
      "type": "string",
      "format": "uri"
    },
    "trustLevel": {
      "enum": [
        "verified",
        "community",
        "experimental"
      ]
    },
    "signature": {
      "type": "object",
      "required": [
        "alg",
        "kid",
        "jws"
      ],
      "properties": {
        "alg": {
          "enum": [
            "EdDSA",
            "ES256",
            "ES384"
          ]
        },
        "kid": {
          "type": "string"
        },
        "jws": {
          "type": "string"
        },
        "coseDetached": {
          "type": "string"
        },
        "canonicalization": {
          "const": "RFC8785-JCS"
        }
      }
    },
    "provenance": {
      "type": "object",
      "description": "SLSA v1.0 provenance attestation"
    }
  }
}