{
  "$id": "https://public-agents.com/schemas/well-known.schema.json",
  "title": "well-known",
  "description": "The ownership file at https://<domain>/.well-known/public-agents.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "const": "https://public-agents.com/schemas/well-known.schema.json"
    },
    "version": {
      "type": "number",
      "const": 1
    },
    "agents": {
      "default": [],
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{1,31}$"
      }
    },
    "tools": {
      "default": [],
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"
      }
    },
    "maintainers": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$"
      }
    },
    "pins": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string",
        "pattern": "^sha256:[a-f0-9]{64}$"
      }
    }
  },
  "required": [
    "version",
    "agents",
    "tools",
    "maintainers"
  ],
  "additionalProperties": false
}
