{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tranquiltech.solutions/kindling/schemas/well_known_pool.schema.json",
  "title": "WellKnownKindlingPool",
  "description": "The discovery file published at /.well-known/kindling-pool by any domain hosting a Pool. Crawlers and registries fetch this to find Pools without a central authority.",
  "type": "object",
  "required": ["schema_version", "pools"],
  "additionalProperties": false,
  "properties": {
    "schema_version": { "type": "string", "const": "0.1" },
    "pools": {
      "type": "array",
      "description": "All Pools hosted on this domain that are discoverable.",
      "items": {
        "type": "object",
        "required": ["manifest_url", "visibility", "status"],
        "additionalProperties": false,
        "properties": {
          "manifest_url": { "type": "string", "format": "uri" },
          "name": { "type": "string" },
          "intent_tags": { "type": "array", "items": { "type": "string" } },
          "visibility": { "type": "string", "enum": ["public", "unlisted", "invite-only"] },
          "status": { "type": "string", "enum": ["active", "dormant", "archived"] },
          "geographic_scope": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "city": { "type": "string" },
              "region": { "type": "string" },
              "country": { "type": "string" },
              "online": { "type": "boolean" }
            }
          },
          "last_updated": { "type": "string", "format": "date-time" }
        }
      }
    },
    "operator": {
      "type": "object",
      "description": "Optional metadata about the entity operating this discovery file.",
      "additionalProperties": false,
      "properties": {
        "name": { "type": "string" },
        "contact": { "type": "string" },
        "url": { "type": "string", "format": "uri" }
      }
    }
  }
}
