{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://setix.com/schemas/network-summary/v1.json",
  "title": "Setix Network Summary (public telemetry) v1",
  "description": "The curated public live-metrics payload served at GET https://setix.com/api/network/v1.json and rendered on network.setix.com (architecture/41 §41.4). Worker-served, telemetry-signed, 15-30s TTL. Carries the multi-cluster summary (public-beta + devnet); the per-cluster-filtered slice is served separately as cluster-state/v1.json at each AI surface's /cluster/state. ONLY the kitchen-visible aggregate field classes of architecture/41 §41.5 are present — no per-entity identity, no per-offer/bid specifics, no substrate machine specifics, no per-validator identity, no cost data.",
  "type": "object",
  "required": ["generated_at", "clusters"],
  "additionalProperties": true,
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri",
      "const": "https://setix.com/schemas/network-summary/v1.json"
    },
    "generated_at": {
      "type": "string",
      "format": "date-time",
      "description": "When this snapshot was produced + signed (architecture/41 §41.6)."
    },
    "signed_by": {
      "type": "string",
      "description": "DID / fingerprint of the telemetry signing key (architecture/39 §39.8 + §41.6).",
      "examples": ["did:setix:telemetry-v1"]
    },
    "signature": {
      "type": "string",
      "description": "JWS detached signature (RFC 7797) over the canonical-JSON serialization (RFC 8785) of this payload. Journalists/investors cite snapshots with signed_by + generated_at + signature for attribution."
    },
    "ttl_seconds": {
      "type": "integer",
      "minimum": 1,
      "description": "How long this snapshot is valid before a refetch (typically 15-30s)."
    },
    "clusters": {
      "type": "object",
      "description": "One summary block per realm. Keyed by realm name.",
      "additionalProperties": { "$ref": "#/$defs/clusterBlock" },
      "examples": [{ "public-beta": {}, "devnet": {} }]
    }
  },
  "$defs": {
    "clusterBlock": {
      "type": "object",
      "description": "Aggregate summary for one cluster realm.",
      "required": ["realm", "domain"],
      "additionalProperties": true,
      "properties": {
        "realm": {
          "type": "string",
          "enum": ["public-beta", "devnet", "mainnet"]
        },
        "domain": {
          "type": "string",
          "description": "The AI-native cluster surface for this realm.",
          "examples": ["setix.ai", "setix.dev"]
        },
        "headline": {
          "type": "object",
          "description": "Headline aggregate counters (screenshot-friendly viral hook).",
          "additionalProperties": true,
          "properties": {
            "agents_active_24h": { "type": "integer", "minimum": 0 },
            "settlements_24h": { "type": "integer", "minimum": 0 },
            "cosr_volume_30d_usd": { "type": "number", "minimum": 0 },
            "median_settlement_latency_ms": { "type": "number", "minimum": 0 }
          }
        },
        "substrate_health": {
          "type": "object",
          "description": "Per-region aggregate health + chain liveness (substrate-decomposition shape; public per architecture/01).",
          "additionalProperties": true,
          "properties": {
            "regions": {
              "type": "object",
              "description": "Per-region aggregate status + p99 latency (gcc/eu/us/apac). Aggregate only.",
              "additionalProperties": { "$ref": "#/$defs/regionHealth" }
            },
            "chain": {
              "type": "object",
              "description": "Chain liveness aggregate (validators-voting count + block height only).",
              "additionalProperties": false,
              "properties": {
                "validators_voting": { "type": "integer", "minimum": 0 },
                "block_height": { "type": "integer", "minimum": 0 }
              }
            }
          }
        },
        "growth": {
          "type": "object",
          "description": "Rolling growth percentages.",
          "additionalProperties": true,
          "properties": {
            "agents_7d_change_pct": { "type": "number" },
            "settlements_7d_change_pct": { "type": "number" }
          }
        },
        "quality": {
          "type": "object",
          "description": "Settlement-quality aggregate rates.",
          "additionalProperties": true,
          "properties": {
            "acceptance_rate_24h": { "type": "number", "minimum": 0, "maximum": 1 },
            "delivery_rate_24h": { "type": "number", "minimum": 0, "maximum": 1 },
            "dispute_rate_24h": { "type": "number", "minimum": 0, "maximum": 1 }
          }
        },
        "distribution": {
          "type": "object",
          "description": "Aggregate distributions (trust-level counts + high-level capability-category counts only).",
          "additionalProperties": true,
          "properties": {
            "trust_levels": {
              "type": "object",
              "additionalProperties": { "type": "integer", "minimum": 0 },
              "examples": [{ "L0": 0, "L1": 0, "L2": 0, "L3": 0, "L4": 0, "L5": 0, "L6": 0 }]
            },
            "capability_categories": {
              "type": "object",
              "additionalProperties": { "type": "integer", "minimum": 0 }
            }
          }
        }
      }
    },
    "regionHealth": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "status": {
          "type": "string",
          "enum": ["healthy", "degraded", "down", "unknown"]
        },
        "p99_ms": {
          "type": "number",
          "minimum": 0
        }
      }
    }
  }
}
