{
  "$defs": {
    "DiffSource": {
      "enum": [
        "github",
        "local-git"
      ],
      "type": "string"
    },
    "TextFileRefOut": {
      "additionalProperties": false,
      "description": "One materialized text section: its absolute ``path`` plus the sizes a reviewer pages\nagainst \u2014 ``max_line_bytes`` is the longest line's UTF-8 length (compared against Pi's\nper-line ``read`` bound to pick the byte-slice fallback).",
      "properties": {
        "path": {
          "title": "Path",
          "type": "string"
        },
        "bytes": {
          "title": "Bytes",
          "type": "integer"
        },
        "lines": {
          "title": "Lines",
          "type": "integer"
        },
        "max_line_bytes": {
          "title": "Max Line Bytes",
          "type": "integer"
        }
      },
      "required": [
        "path",
        "bytes",
        "lines",
        "max_line_bytes"
      ],
      "title": "TextFileRefOut",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "The ``--json`` serialization boundary of :class:`PrReviewContextResult` \u2014 a pointer\nenvelope (field order load-bearing). ``pr`` maps from the domain ``pr_number``; ``body``,\n``diff`` and ``plan_body`` are file references into ``context_dir`` (in stack mode they\nalias the LAST ``stack[]`` member's files \u2014 the top PR's text is written once).",
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Type"
    },
    "message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Message"
    },
    "branch": {
      "title": "Branch",
      "type": "string"
    },
    "pr": {
      "title": "Pr",
      "type": "integer"
    },
    "base_ref": {
      "title": "Base Ref",
      "type": "string"
    },
    "head_ref": {
      "title": "Head Ref",
      "type": "string"
    },
    "title": {
      "title": "Title",
      "type": "string"
    },
    "context_dir": {
      "title": "Context Dir",
      "type": "string"
    },
    "body": {
      "$ref": "#/$defs/TextFileRefOut"
    },
    "diff": {
      "$ref": "#/$defs/TextFileRefOut"
    },
    "plan_body": {
      "anyOf": [
        {
          "$ref": "#/$defs/TextFileRefOut"
        },
        {
          "type": "null"
        }
      ]
    },
    "diff_source": {
      "$ref": "#/$defs/DiffSource"
    }
  },
  "required": [
    "success",
    "error_type",
    "message",
    "branch",
    "pr",
    "base_ref",
    "head_ref",
    "title",
    "context_dir",
    "body",
    "diff",
    "plan_body",
    "diff_source"
  ],
  "title": "PrReviewContextOut",
  "type": "object"
}
