{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://github.com/xiao-cold/pi-packages/blob/main/packages/pi-delivery/schemas/config.schema.json",
  "title": "@xicode/pi-delivery configuration",
  "description": "Delivery plugin configuration. Missing fields fall back to the defaults (enabled=true, mode=prepare, debug=false, deliver.level=commit).",
  "type": "object",
  "properties": {
    "enabled": {
      "description": "Enable post-run assessment and repository delivery. When false, no model or Git/GitHub action is invoked.",
      "type": "boolean",
      "default": true
    },
    "mode": {
      "description": "prepare: only suggestions and evidence, never writes to Git. deliver: auto delivery per deliver.level.",
      "type": "string",
      "enum": ["prepare", "deliver"]
    },
    "debug": {
      "description": "Show post-run assessment diagnostics and structured model responses in context-free TUI entries.",
      "type": "boolean",
      "default": false
    },
    "deliver": {
      "type": "object",
      "properties": {
        "level": {
          "description": "commit: path-limited commit. push: commit and push. pr: commit, push and create/update a Ready PR.",
          "type": "string",
          "enum": ["commit", "push", "pr"]
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
