{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://wendelmaques.com/.well-known/agent-access.schema.json",
  "title": "Agent Access Discovery 0.1",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri"
    },
    "profile": {
      "const": "https://wendelmaques.com/en/artigos/especificacao-acesso-agentes/"
    },
    "version": {
      "const": "0.1"
    },
    "status": {
      "const": "draft"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "service": {
      "type": "string",
      "format": "uri"
    },
    "interfaces": {
      "type": "array",
      "minItems": 1,
      "maxItems": 3,
      "uniqueItems": true,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "transport": {
            "enum": [
              "website",
              "openapi",
              "mcp"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "transport",
          "url"
        ]
      }
    },
    "authorization": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "discovery_grants_access": {
          "const": false
        },
        "delegated_oauth": {
          "const": false
        },
        "enforcement": {
          "const": "per-operation"
        },
        "documentation": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "discovery_grants_access",
        "delegated_oauth",
        "enforcement",
        "documentation"
      ]
    },
    "protocols": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "pap": {
          "const": "not-implemented"
        },
        "pact": {
          "const": "not-implemented"
        }
      },
      "required": [
        "pap",
        "pact"
      ]
    },
    "commerce": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "pricing": {
              "type": "string",
              "format": "uri"
            },
            "billing": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": [
            "pricing",
            "billing"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "pricing": {
              "const": "by-proposal"
            },
            "contact": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": [
            "pricing",
            "contact"
          ]
        }
      ]
    }
  },
  "required": [
    "$schema",
    "profile",
    "version",
    "status",
    "name",
    "service",
    "interfaces",
    "authorization",
    "protocols",
    "commerce"
  ]
}