{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "apply_plan",
  "type": "object",
  "properties": {
    "commands": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "script": {
      "type": "string"
    },
    "confirm": {
      "default": false,
      "description": "false = apply, show diff, roll back (dry-run). true = commit if still reachable.",
      "type": "boolean"
    },
    "use_safe_mode": {
      "default": true,
      "description": "false = write directly without Safe Mode (snapshot first, read-back diff after, no automatic rollback). Use only when the user explicitly asks for it.",
      "type": "boolean"
    }
  },
  "required": ["confirm", "use_safe_mode"],
  "additionalProperties": false
}
