{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://intertie.dev/registry/implementation.schema.json",
  "title": "Intertie registry entry",
  "type": "object",
  "required": ["name", "vendor", "url", "org", "roles", "levels", "date", "report"],
  "additionalProperties": false,
  "properties": {
    "name": { "type": "string", "minLength": 1, "maxLength": 80, "description": "Implementation name, e.g. \"Acme Chat\"" },
    "vendor": { "type": "string", "minLength": 1, "maxLength": 80 },
    "url": { "type": "string", "pattern": "^https://", "maxLength": 300, "description": "Product or source page" },
    "org": { "type": "string", "minLength": 3, "maxLength": 253, "description": "The Intertie org that signed the report" },
    "kind": { "enum": ["native", "adapter", "library"], "description": "A chat tool, a bridge to a closed product (e.g. Slack), or a library" },
    "roles": { "type": "array", "minItems": 1, "items": { "enum": ["home", "peer-push", "peer-pull"] }, "uniqueItems": true },
    "levels": { "type": "array", "minItems": 1, "items": { "enum": ["core", "security", "threads", "reactions", "files", "mentions", "members"] }, "uniqueItems": true, "contains": { "const": "core" } },
    "protocol": { "const": "0.1" },
    "date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
    "report": { "type": "string", "pattern": "^reports/[a-z0-9-]+\\.json$" },
    "license": { "type": "string", "maxLength": 64 }
  }
}
