{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hogarmas.net/mcp-observatory/schema.json",
  "title": "H/M MCP Handshake Observatory Snapshot",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "generatedAt",
    "canonicalUrl",
    "window",
    "totals",
    "funnel",
    "adoption",
    "endpoints",
    "timeline",
    "clientClasses",
    "protocolObservations",
    "privacy",
    "truthBoundary",
    "limitations",
    "snapshot",
    "links"
  ],
  "properties": {
    "schema": {
      "const": "hm.mcp-handshake-observatory.v2"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "canonicalUrl": {
      "type": "string",
      "format": "uri"
    },
    "window": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "startsAt",
        "endsAt"
      ],
      "properties": {
        "days": {
          "enum": [
            1,
            7,
            30
          ]
        },
        "startsAt": {
          "type": "string",
          "format": "date"
        },
        "endsAt": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "totals": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "handshakes",
        "observedClientKeys",
        "selfDeclaredClientKeys",
        "identifiedClientKeys",
        "providerVerifiedClients",
        "namedToolRequests",
        "identifiedNamedToolRequests",
        "unverifiedNamedToolRequests",
        "providerVerifiedNamedToolRequests",
        "probeToolRequests"
      ],
      "properties": {
        "handshakes": {
          "$ref": "#/$defs/count"
        },
        "observedClientKeys": {
          "$ref": "#/$defs/count"
        },
        "selfDeclaredClientKeys": {
          "$ref": "#/$defs/count"
        },
        "identifiedClientKeys": {
          "$ref": "#/$defs/count"
        },
        "providerVerifiedClients": {
          "$ref": "#/$defs/count"
        },
        "namedToolRequests": {
          "$ref": "#/$defs/count"
        },
        "identifiedNamedToolRequests": {
          "$ref": "#/$defs/count"
        },
        "unverifiedNamedToolRequests": {
          "$ref": "#/$defs/count"
        },
        "providerVerifiedNamedToolRequests": {
          "$ref": "#/$defs/count"
        },
        "probeToolRequests": {
          "$ref": "#/$defs/count"
        }
      }
    },
    "funnel": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "adoption": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpoint",
        "handshakes",
        "namedToolRequests",
        "identifiedNamedToolRequests",
        "unverifiedNamedToolRequests",
        "providerVerifiedNamedToolRequests",
        "actions",
        "requestOutcomeVerified",
        "lastSeen"
      ],
      "properties": {
        "endpoint": {
          "const": "/mcp/agent-surface"
        },
        "handshakes": {
          "$ref": "#/$defs/count"
        },
        "namedToolRequests": {
          "$ref": "#/$defs/count"
        },
        "identifiedNamedToolRequests": {
          "$ref": "#/$defs/count"
        },
        "unverifiedNamedToolRequests": {
          "$ref": "#/$defs/count"
        },
        "providerVerifiedNamedToolRequests": {
          "$ref": "#/$defs/count"
        },
        "actions": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "connectionReceiptRequests",
            "auditRequests",
            "observatoryRequests",
            "paidEvidencePackAttempts"
          ],
          "properties": {
            "connectionReceiptRequests": {
              "$ref": "#/$defs/count"
            },
            "auditRequests": {
              "$ref": "#/$defs/count"
            },
            "observatoryRequests": {
              "$ref": "#/$defs/count"
            },
            "paidEvidencePackAttempts": {
              "$ref": "#/$defs/count"
            }
          }
        },
        "requestOutcomeVerified": {
          "const": false
        },
        "lastSeen": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "endpoints": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "timeline": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "clientClasses": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "protocolObservations": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "privacy": {
      "type": "object",
      "required": [
        "rawIpStoredByObservatory",
        "rawPayloadStored",
        "clientInfoNameStoredByObservatory",
        "aggregateOnly"
      ],
      "properties": {
        "rawIpStoredByObservatory": {
          "const": false
        },
        "rawPayloadStored": {
          "const": false
        },
        "clientInfoNameStoredByObservatory": {
          "const": false
        },
        "aggregateOnly": {
          "const": true
        }
      }
    },
    "truthBoundary": {
      "type": "object",
      "required": [
        "initializeIsAiUser",
        "clientInfoVerified",
        "toolRequestProvesSuccess",
        "toolRequestIdentityCorrelatedAcrossSession",
        "qaExcluded",
        "fabricatedActivity"
      ],
      "properties": {
        "initializeIsAiUser": {
          "const": false
        },
        "clientInfoVerified": {
          "const": false
        },
        "toolRequestProvesSuccess": {
          "const": false
        },
        "toolRequestIdentityCorrelatedAcrossSession": {
          "const": false
        },
        "qaExcluded": {
          "const": true
        },
        "fabricatedActivity": {
          "const": false
        }
      }
    },
    "limitations": {
      "type": "array",
      "minItems": 5,
      "items": {
        "type": "string"
      }
    },
    "snapshot": {
      "type": "object",
      "required": [
        "algorithm",
        "hash",
        "asOf"
      ],
      "properties": {
        "algorithm": {
          "const": "SHA-256"
        },
        "hash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "asOf": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "links": {
      "type": "object"
    }
  },
  "$defs": {
    "count": {
      "type": "integer",
      "minimum": 0
    }
  }
}
