{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/resolvemesh-com/json-schema/resolvemesh-com-gap-cluster-schema.json",
  "title": "GapCluster",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/resolvemesh-com-openapi.json#/components/schemas/GapCluster",
  "type": "object",
  "properties": {
    "category": {
      "type": "string",
      "enum": [
        "PUBLIC_RECORD_RETRIEVAL",
        "CURRENT_WEB_RESEARCH",
        "DOCUMENT_FACT_EXTRACTION",
        "CODEBASE_ANALYSIS",
        "MEDIA_UNDERSTANDING",
        "STRUCTURED_DATA_LOOKUP",
        "OTHER_READ_ONLY"
      ]
    },
    "capabilityType": {
      "type": "string",
      "enum": [
        "DATA_RETRIEVAL",
        "WEB_SEARCH",
        "DOCUMENT_ANALYSIS",
        "CODE_ANALYSIS",
        "MEDIA_ANALYSIS",
        "OTHER"
      ]
    },
    "allowedProtocols": {
      "minItems": 1,
      "maxItems": 3,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "MCP",
          "A2A",
          "REST"
        ]
      }
    },
    "requiresCitations": {
      "type": "boolean"
    },
    "latencyBucket": {
      "type": "string",
      "enum": [
        "UNSPECIFIED",
        "FAST",
        "STANDARD",
        "RELAXED"
      ]
    },
    "gapClusterId": {
      "type": "string",
      "pattern": "^gap_[0-9a-f]{32}$"
    },
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "eventCount": {
      "type": "integer",
      "minimum": 20,
      "maximum": 9007199254740991
    },
    "distinctTenantCount": {
      "type": "integer",
      "minimum": 5,
      "maximum": 9007199254740991
    },
    "firstSeenAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "lastSeenAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "trend": {
      "type": "string",
      "enum": [
        "RISING",
        "STEADY",
        "FALLING"
      ]
    },
    "windowDays": {
      "type": "number",
      "const": 30
    }
  },
  "required": [
    "category",
    "capabilityType",
    "allowedProtocols",
    "requiresCitations",
    "latencyBucket",
    "gapClusterId",
    "label",
    "eventCount",
    "distinctTenantCount",
    "firstSeenAt",
    "lastSeenAt",
    "trend",
    "windowDays"
  ],
  "additionalProperties": false
}