{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Loki Magic Component Registry",
  "type": "object",
  "required": ["version", "components"],
  "properties": {
    "version": {"type": "string", "const": "1"},
    "updated_at": {"type": "string", "format": "date-time"},
    "components": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name", "version", "spec_path", "created_at"],
        "properties": {
          "name": {"type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$"},
          "version": {"type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$"},
          "spec_path": {"type": "string"},
          "react_path": {"type": "string"},
          "webcomponent_path": {"type": "string"},
          "test_path": {"type": "string"},
          "spec_hash": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
          "created_at": {"type": "string", "format": "date-time"},
          "updated_at": {"type": "string", "format": "date-time"},
          "tags": {"type": "array", "items": {"type": "string"}},
          "description": {"type": "string"},
          "targets": {
            "type": "array",
            "items": {"enum": ["react", "webcomponent", "both"]}
          },
          "debate_passed": {"type": "boolean"},
          "debate_result": {"type": "object"},
          "deprecated": {"type": "boolean"},
          "replaces": {"type": "string"}
        }
      }
    }
  }
}
