{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "tools"],
  "properties": {
    "schemaVersion": { "enum": [1, 2] },
    "tools": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": true,
        "required": ["kind", "source", "commit", "testedVersion"],
        "properties": {
          "kind": { "enum": ["cli", "mcp", "plugin"] },
          "provider": { "type": "string" },
          "source": { "type": "string", "pattern": "^https://" },
          "commit": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
          "testedVersion": { "type": "string", "minLength": 1 },
          "executable": { "type": "string" },
          "fallbackExecutable": { "type": "string" },
          "executables": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
          "requires": { "type": "object", "additionalProperties": { "type": "string" } }
        }
      }
    }
  }
}
