{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://meet-still.app/schemas/plugin-manifest-v1.schema.json",
  "title": "Still declarative plugin manifest v1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "protocolVersion", "id", "version", "name", "publisher", "license", "kind", "capabilities", "widgets", "template"],
  "properties": {
    "schemaVersion": { "const": 1 },
    "protocolVersion": { "const": 1 },
    "id": { "type": "string", "maxLength": 96, "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9-]*){2,}$" },
    "version": { "type": "string", "maxLength": 32, "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
    "name": { "type": "string", "minLength": 1, "maxLength": 48 },
    "publisher": { "type": "string", "minLength": 1, "maxLength": 80 },
    "license": { "enum": ["MIT", "Apache-2.0", "BSD-3-Clause", "CC0-1.0"] },
    "kind": { "enum": ["template", "metadata"] },
    "capabilities": { "type": "array", "uniqueItems": true, "minItems": 1, "maxItems": 2, "items": { "enum": ["quota", "agentActivity"] } },
    "widgets": { "type": "array", "minItems": 1, "maxItems": 4, "items": {
      "type": "object", "additionalProperties": false, "required": ["id", "kind", "provider"],
      "properties": {
        "id": { "type": "string", "maxLength": 48, "pattern": "^[a-z][a-z0-9-]*$" },
        "kind": { "enum": ["quota", "agentActivity"] },
        "provider": { "enum": ["codex", "claude", "local"] }
      }
    } },
    "template": {
      "type": "object", "additionalProperties": false, "required": ["theme", "layout"],
      "properties": { "theme": { "const": "porcelain" }, "layout": { "enum": ["corner", "rail"] } }
    }
  }
}
