{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xn--82czbx2bczd4fl8a.online/agent-federation/handshake-spec.json",
  "title": "Federation Handshake Request",
  "type": "object",
  "required": [
    "peerId",
    "capabilities",
    "auth"
  ],
  "properties": {
    "peerId": {
      "type": "string",
      "format": "uri"
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "auth": {
      "type": "object",
      "properties": {
        "method": {
          "enum": [
            "oauth2.1+pkce",
            "mtls",
            "private_key_jwt"
          ]
        },
        "clientAssertion": {
          "type": "string"
        }
      }
    },
    "nonce": {
      "type": "string",
      "minLength": 16
    },
    "requestedScopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}