{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commentary-dev/json-schema/commentary-dev-project-agentget-source-tree-output-schema.json",
  "title": "ProjectAgentgetSourceTreeOutput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commentary-dev-source-snapshots-api-openapi.yml#/components/schemas/ProjectAgentgetSourceTreeOutput",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProjectAgentSourceFile"
          },
          "maxItems": 100,
          "minItems": 0
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "pattern": "^[^\\s]+$"
            },
            {
              "type": "null"
            }
          ]
        },
        "completeness": {
          "type": "string",
          "enum": [
            "pending",
            "selected_only",
            "complete",
            "incomplete"
          ]
        },
        "availability": {
          "type": "string",
          "enum": [
            "available",
            "unavailable"
          ]
        }
      },
      "required": [
        "items",
        "nextCursor",
        "completeness",
        "availability"
      ]
    },
    "idempotencyReplayed": {
      "type": "boolean"
    }
  },
  "required": [
    "data"
  ],
  "$defs": {
    "ProjectAgentSourceFile": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
        },
        "blobHash": {
          "type": "string",
          "maxLength": 128
        },
        "kind": {
          "type": "string",
          "enum": [
            "file",
            "directory",
            "submodule"
          ]
        },
        "capture": {
          "type": "string",
          "enum": [
            "retained",
            "uncaptured",
            "unavailable"
          ]
        },
        "content": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2097152
            },
            {
              "type": "null"
            }
          ]
        },
        "contentTruncated": {
          "type": "boolean"
        },
        "base64": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 25165824
            },
            {
              "type": "null"
            }
          ]
        },
        "bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "sha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "binary": {
          "type": "boolean"
        },
        "nextLine": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "nextCursor": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "pattern": "^[^\\s]+$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "path",
        "blobHash",
        "capture",
        "content",
        "nextCursor"
      ]
    }
  }
}