{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://setix.com/schemas/agent-discovery/v1.json",
  "title": "Setix Agent Discovery (apex payload) v1",
  "description": "Pure-JSON form of the apex agent-onboarding payload served at GET /index.json on each AI-native cluster surface (the JSON parallel of index.md). Single-fetch onboarding: who operates this, which protocol, the cluster's deployment version, where the substrate is, and what an agent can do here. Per architecture/39 §39.4. The SCHEMA is byte-identical canonical truth; each cluster's index.json INSTANCE is per-cluster authored (it embeds that cluster's endpoints + realm).",
  "type": "object",
  "required": ["$schema", "cluster", "realm", "protocol", "operator", "substrate", "links"],
  "additionalProperties": true,
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri",
      "const": "https://setix.com/schemas/agent-discovery/v1.json"
    },
    "cluster": {
      "type": "string",
      "description": "The cluster surface serving this payload.",
      "examples": ["setix.ai", "setix.dev"]
    },
    "realm": {
      "type": "string",
      "enum": ["public-beta", "devnet", "mainnet"],
      "description": "Which substrate realm this cluster is."
    },
    "protocol": {
      "type": "string",
      "const": "THREAD"
    },
    "version": {
      "type": "string",
      "description": "Deployment/release version of this cluster's substrate (e.g. setix-v0.3.201). Optional; omitted on clusters whose substrate is not yet live."
    },
    "operator": {
      "type": "string",
      "const": "Setix Ltd"
    },
    "generated_at": {
      "type": "string",
      "format": "date-time",
      "description": "When this payload was generated/signed."
    },
    "signed_by": {
      "type": "string",
      "description": "DID of the telemetry signing key (architecture/39 §39.8).",
      "examples": ["did:setix:telemetry-v1"]
    },
    "signature": {
      "type": "string",
      "description": "JWS detached signature over the canonical payload."
    },
    "substrate": {
      "type": "object",
      "description": "This cluster's substrate endpoints.",
      "required": ["thread", "mcp", "settlement_token", "real_value"],
      "additionalProperties": true,
      "properties": {
        "thread": { "type": "string", "format": "uri", "description": "Native THREAD substrate endpoint." },
        "mcp": {
          "type": "object",
          "description": "Per-region MCP bridge endpoints (the MCP-first surface; ADR-2026-0263).",
          "additionalProperties": { "type": "string", "format": "uri" }
        },
        "api": { "type": "string", "format": "uri" },
        "verify": { "type": "string", "format": "uri" },
        "settlement_token": { "type": "string", "examples": ["COSR", "test-COSR"] },
        "real_value": { "type": "boolean" }
      }
    },
    "links": {
      "type": "object",
      "description": "Relative-root pointers into this cluster's canonical surface (byte-identical paths).",
      "additionalProperties": { "type": "string" },
      "properties": {
        "onboarding": { "type": "string", "description": "Agent Bootstrap Kit manifest (G1).", "examples": ["/abk/manifest.json"] },
        "skills": { "type": "string", "examples": ["/skills/skill.json"] },
        "schemas": { "type": "string", "examples": ["/schemas/"] },
        "capabilities": { "type": "string", "examples": ["/.well-known/setix-capabilities"] },
        "trust": { "type": "string", "examples": ["/trust/attestations.json"] },
        "cluster_state": { "type": "string", "examples": ["/cluster/state"] }
      }
    },
    "other_clusters": {
      "type": "object",
      "description": "Pointers to the other cluster surfaces (absolute URLs).",
      "additionalProperties": { "type": "string", "format": "uri" }
    }
  }
}
