{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commentary-dev/json-schema/commentary-dev-project-agentfinalize-package-upload-output-schema.json",
  "title": "ProjectAgentfinalizePackageUploadOutput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commentary-dev-package-uploads-api-openapi.yml#/components/schemas/ProjectAgentfinalizePackageUploadOutput",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "$ref": "#/$defs/ProjectAgentUploadBundle"
    },
    "idempotencyReplayed": {
      "type": "boolean"
    }
  },
  "required": [
    "data"
  ],
  "$defs": {
    "ProjectAgentUploadBundle": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "workspaceId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "manifestSha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 262144000
        },
        "files": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "etag": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "sizeBytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 26214400
              },
              "contentType": {
                "const": "application/octet-stream"
              },
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
              },
              "detectedMime": {
                "type": "string",
                "maxLength": 200
              }
            },
            "required": [
              "key",
              "sha256",
              "etag",
              "sizeBytes",
              "contentType",
              "path",
              "detectedMime"
            ]
          },
          "maxItems": 10000,
          "minItems": 1
        }
      },
      "required": [
        "id",
        "workspaceId",
        "manifestSha256",
        "sha256",
        "bytes",
        "files"
      ]
    }
  }
}