{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/autopilot-off.schema.json",
  "title": "Autopilot off",
  "description": "What POST /v1/autopilot/off returns (`autopilot-control.mjs off`): the mode is off, whether an in-flight session was stopped, and the worktrees of the items it ended, which are kept as they are. The repo selection, queue and attempt history are kept.",
  "type": "object",
  "additionalProperties": false,
  "required": ["contractVersion", "enabled", "stoppedInFlight", "keptWorktrees"],
  "properties": {
    "contractVersion": {
      "type": "string",
      "pattern": "^1\\.[0-9]+\\.[0-9]+$",
      "x-sensitivity": "none"
    },
    "enabled": {
      "const": false,
      "x-sensitivity": "none"
    },
    "stoppedInFlight": {
      "type": "boolean",
      "x-sensitivity": "none"
    },
    "keptWorktrees": {
      "type": "array",
      "description": "The worktree of each in-flight item `now: true` ended. No git runs inside an unattended run's worktree, so whether it holds uncommitted work is not asked; it is kept for a person to look at. Empty without `now`.",
      "items": { "type": "string" },
      "x-sensitivity": "local"
    }
  }
}
