{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/stack.schema.json",
  "title": "Stack status",
  "description": "What GET /v1/stack?repo= returns (`stack-toggle.mjs status --json`): the stacks a repository enables in .claude/settings.json and every marketplace plugin with its skills. manifestVerified is false when the marketplace manifest could not be read and the plugin list is the convention.",
  "type": "object",
  "additionalProperties": false,
  "required": ["contractVersion", "stacks", "knownStacks", "plugins", "manifestVerified"],
  "properties": {
    "contractVersion": {
      "type": "string",
      "pattern": "^1\\.[0-9]+\\.[0-9]+$",
      "x-sensitivity": "none"
    },
    "stacks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "knownStacks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "plugins": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "enabled", "alwaysOn", "stack", "skills"],
        "properties": {
          "name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "alwaysOn": {
            "type": "boolean"
          },
          "stack": {
            "type": ["string", "null"]
          },
          "skills": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "manifestVerified": {
      "type": "boolean"
    }
  }
}
