{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/autopilot-on-request.schema.json",
  "title": "Autopilot on request",
  "description": "The body of POST /v1/autopilot/on. The first request names the selection (repos, by nameWithOwner, each already in the autopilot config) and gets a preview and a confirm token; the second sends only the token and turns the mode on for exactly what was previewed. An empty selection is refused: the mode is never turned on without a repository.",
  "type": "object",
  "additionalProperties": false,
  "required": ["contractVersion"],
  "properties": {
    "contractVersion": {
      "type": "string",
      "pattern": "^1\\.[0-9]+\\.[0-9]+$",
      "x-sensitivity": "none"
    },
    "repos": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9._-]{1,100}(/[A-Za-z0-9._-]{1,100})?$"
      }
    },
    "configureOnly": {
      "type": "boolean",
      "description": "Save the selection without scheduling anything."
    },
    "confirmToken": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{16,128}$"
    }
  }
}
