{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/gc-request.schema.json",
  "title": "Garbage-collect request",
  "description": "The body of POST /v1/gc. Step 1 names the scope (default all four); step 2 sends only the confirmToken step 1 returned.",
  "type": "object",
  "additionalProperties": false,
  "required": ["contractVersion"],
  "properties": {
    "contractVersion": {
      "type": "string",
      "pattern": "^1\\.[0-9]+\\.[0-9]+$",
      "x-sensitivity": "none"
    },
    "scope": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "x-sensitivity": "none",
      "items": {
        "enum": ["tmp", "worktrees", "refs", "abandoned"]
      }
    },
    "confirmToken": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{16,128}$",
      "x-sensitivity": "none",
      "description": "The confirmToken the preview returned. Single use, valid for 120 seconds, bound to the route and the run."
    }
  }
}
