{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://setix.com/schemas/cluster-chooser/v1.json",
  "title": "Setix Cluster Chooser v1",
  "description": "Response returned by setix.com protocol subdomains (thread., mcp.<r>., api., verify., coord.<r>., artifacts.) so an agent that discovers setix.com first can pick a cluster and follow the absolute endpoint URL. Per architecture/39 §39.6 + ADR-2026-0251 D6. The Worker returns this JSON unconditionally (no negotiation); SDK-using agents bypass it (SDK hardcoded to thread.setix.ai per §28.7).",
  "type": "object",
  "required": ["$schema", "kind", "subdomain", "message", "options", "default", "operator"],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri",
      "const": "https://setix.com/schemas/cluster-chooser/v1.json"
    },
    "kind": {
      "type": "string",
      "const": "cluster-chooser"
    },
    "subdomain": {
      "type": "string",
      "description": "The setix.com protocol subdomain that returned this chooser (e.g. thread.setix.com).",
      "examples": ["thread.setix.com", "mcp.gcc.setix.com", "api.setix.com", "verify.setix.com"]
    },
    "message": {
      "type": "string",
      "description": "Human/agent-readable instruction to choose a cluster."
    },
    "options": {
      "type": "object",
      "description": "The selectable clusters. At least one of public-beta or devnet is present.",
      "minProperties": 1,
      "additionalProperties": { "$ref": "#/$defs/clusterOption" },
      "properties": {
        "public-beta": { "$ref": "#/$defs/clusterOption" },
        "devnet": { "$ref": "#/$defs/clusterOption" }
      }
    },
    "default": {
      "type": "string",
      "description": "Key into options that an agent should pick if it has no preference.",
      "examples": ["public-beta", "devnet"]
    },
    "operator": {
      "type": "string",
      "const": "Setix Ltd"
    }
  },
  "$defs": {
    "clusterOption": {
      "type": "object",
      "required": ["description", "endpoint", "real_value", "settlement_token"],
      "additionalProperties": false,
      "properties": {
        "description": {
          "type": "string",
          "description": "What this cluster is (production substrate / development substrate)."
        },
        "endpoint": {
          "type": "string",
          "format": "uri",
          "description": "Absolute URL of this cluster's substrate for the requested subdomain role.",
          "examples": ["https://thread.setix.ai", "https://thread.setix.dev"]
        },
        "real_value": {
          "type": "boolean",
          "description": "true for real-money clusters (public-beta / mainnet); false for test-money (devnet)."
        },
        "settlement_token": {
          "type": "string",
          "description": "The settlement unit symbol for this cluster.",
          "examples": ["COSR", "test-COSR"]
        }
      }
    }
  }
}
