{
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "uploads_prepare",
        "uploads_status",
        "uploads_chunk",
        "uploads_finalize",
        "uploads_cancel",
        "publish",
        "get",
        "revisions_list",
        "revisions_publish",
        "manifest_get",
        "files_download",
        "indexing_retry",
        "comments",
        "comments_mutate",
        "renderers_list",
        "renderers_manage",
        "impact_compare",
        "activity",
        "feedback"
      ],
      "description": "Implemented domain action."
    },
    "input": {
      "type": "object",
      "description": "Exact action input including path identities."
    },
    "etag": {
      "type": "string",
      "maxLength": 1024,
      "description": "Exact resource ETag for conditional writes."
    },
    "idempotencyKey": {
      "type": "string",
      "maxLength": 200,
      "description": "Reuse only for the identical operation intent."
    }
  },
  "required": [
    "action",
    "input"
  ],
  "additionalProperties": false,
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "uploads_prepare"
        },
        "input": {
          "$ref": "#/$defs/preparePackageUploadInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input",
        "idempotencyKey"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "uploads_status"
        },
        "input": {
          "$ref": "#/$defs/getPackageUploadInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "uploads_chunk"
        },
        "input": {
          "$ref": "#/$defs/transferPackageChunkInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input",
        "idempotencyKey"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "uploads_finalize"
        },
        "input": {
          "$ref": "#/$defs/finalizePackageUploadInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input",
        "idempotencyKey"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "uploads_cancel"
        },
        "input": {
          "$ref": "#/$defs/cancelPackageUploadInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input",
        "idempotencyKey"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "publish"
        },
        "input": {
          "$ref": "#/$defs/publishReviewPackageInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input",
        "idempotencyKey"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "get"
        },
        "input": {
          "$ref": "#/$defs/getReviewPackageInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "revisions_list"
        },
        "input": {
          "$ref": "#/$defs/listPackageRevisionsInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "revisions_publish"
        },
        "input": {
          "$ref": "#/$defs/publishPackageRevisionInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input",
        "etag",
        "idempotencyKey"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "manifest_get"
        },
        "input": {
          "$ref": "#/$defs/getPackageManifestInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "files_download"
        },
        "input": {
          "$ref": "#/$defs/downloadPackageFileInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "indexing_retry"
        },
        "input": {
          "$ref": "#/$defs/retryPackageIndexingInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input",
        "idempotencyKey"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "comments"
        },
        "input": {
          "$ref": "#/$defs/listPackageCommentsInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "comments_mutate"
        },
        "input": {
          "$ref": "#/$defs/mutatePackageReviewCommentInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "renderers_list"
        },
        "input": {
          "$ref": "#/$defs/listPackageRenderersInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "renderers_manage"
        },
        "input": {
          "$ref": "#/$defs/managePackageRendererPublicationInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "impact_compare"
        },
        "input": {
          "$ref": "#/$defs/comparePackageRevisionsInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "activity"
        },
        "input": {
          "$ref": "#/$defs/listPackageActivityInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "feedback"
        },
        "input": {
          "$ref": "#/$defs/listPackageFeedbackInput"
        },
        "etag": {
          "type": "string",
          "maxLength": 1024
        },
        "idempotencyKey": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "required": [
        "action",
        "input"
      ]
    }
  ],
  "$defs": {
    "preparePackageUploadInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "workspaceId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "bytes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 262144000
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "manifest": {
          "$ref": "#/$defs/UploadManifest"
        }
      },
      "required": [
        "workspaceId",
        "bytes",
        "sha256",
        "manifest"
      ]
    },
    "UploadManifest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UploadFile"
          },
          "maxItems": 10000,
          "minItems": 1
        }
      },
      "required": [
        "files"
      ]
    },
    "UploadFile": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
        },
        "bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 26214400
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "mime": {
          "type": "string",
          "maxLength": 200
        }
      },
      "required": [
        "path",
        "bytes",
        "sha256",
        "mime"
      ]
    },
    "preparePackageUploadOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/Upload"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "Upload": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "workspaceId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 262144000
        },
        "receivedBytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 262144000
        },
        "maxChunkBytes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4194304
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "state": {
          "type": "string",
          "enum": [
            "uploading",
            "validating",
            "complete",
            "expired",
            "failed",
            "canceled"
          ]
        },
        "expiresAt": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$"
        },
        "manifestSha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "receivedChunks": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "offset": {
                "type": "integer",
                "minimum": 0,
                "maximum": 262144000
              },
              "bytes": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4194304
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "required": [
              "offset",
              "bytes",
              "sha256"
            ]
          },
          "maxItems": 63,
          "minItems": 0
        },
        "bundle": {
          "anyOf": [
            {
              "$ref": "#/$defs/UploadBundle"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "workspaceId",
        "bytes",
        "receivedBytes",
        "maxChunkBytes",
        "sha256",
        "state",
        "expiresAt",
        "manifestSha256",
        "receivedChunks",
        "bundle"
      ]
    },
    "UploadBundle": {
      "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"
      ]
    },
    "getPackageUploadInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "uploadId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "uploadId"
      ]
    },
    "getPackageUploadOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/Upload"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "transferPackageChunkInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "uploadId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "offset": {
          "type": "integer",
          "minimum": 0,
          "maximum": 262144000
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "contentBase64": {
          "type": "string",
          "maxLength": 5592408,
          "pattern": "^[A-Za-z0-9+/]*={0,2}$"
        }
      },
      "required": [
        "uploadId",
        "offset",
        "sha256",
        "contentBase64"
      ]
    },
    "transferPackageChunkOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/Upload"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "finalizePackageUploadInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "uploadId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "uploadId"
      ]
    },
    "finalizePackageUploadOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/UploadBundle"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "cancelPackageUploadInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "uploadId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "uploadId"
      ]
    },
    "cancelPackageUploadOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/Upload"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "publishReviewPackageInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "workspaceId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "uploadId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "manifest": {
          "$ref": "#/$defs/PublicationManifest"
        },
        "collaboration": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "polls": {
              "type": "boolean",
              "default": false
            },
            "consensus": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "default": false
                },
                "rule": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "mode": {
                      "enum": [
                        "owner_decides",
                        "no_open_blockers",
                        "n_of_m",
                        "required_reviewers"
                      ]
                    },
                    "agreementThreshold": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "minResponseCount": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "requiredReviewerIds": {
                      "type": "array",
                      "maxItems": 1000,
                      "uniqueItems": true,
                      "items": {
                        "type": "string"
                      }
                    },
                    "delegatedOwnerAgentParticipantId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requiredReviewerCondition": {
                      "enum": [
                        "all_required_agree",
                        "no_required_objects",
                        "owner_plus_one_required_agrees",
                        "threshold_no_blockers"
                      ]
                    },
                    "objectionPolicy": {
                      "enum": [
                        "block",
                        "owner_decision",
                        "ignore"
                      ]
                    },
                    "countOwnerAgreement": {
                      "type": "boolean"
                    },
                    "countAgentSignals": {
                      "type": "boolean",
                      "default": false
                    },
                    "decisionPollCompletion": {
                      "enum": [
                        "closed",
                        "threshold"
                      ],
                      "default": "closed"
                    }
                  }
                },
                "gate": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "minimumHumanApprovals": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000
                    },
                    "requiredReviewerIds": {
                      "type": "array",
                      "uniqueItems": true,
                      "maxItems": 1000,
                      "items": {
                        "type": "string"
                      }
                    },
                    "quorum": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "group": {
                              "enum": [
                                "owner",
                                "invited_reviewers",
                                "all_human_reviewers"
                              ]
                            },
                            "minimum": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 1000
                            }
                          },
                          "required": [
                            "group",
                            "minimum"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "fileRequirement": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "enum": [
                                "none",
                                "all"
                              ]
                            }
                          },
                          "required": [
                            "mode"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "const": "selected"
                            },
                            "filePaths": {
                              "type": "array",
                              "maxItems": 10000,
                              "uniqueItems": true,
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "mode",
                            "filePaths"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "agentMode": {
                      "enum": [
                        "prepare_only",
                        "wait_before_implementation"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "required": [
        "workspaceId"
      ],
      "anyOf": [
        {
          "required": [
            "uploadId"
          ]
        },
        {
          "required": [
            "manifest"
          ]
        }
      ]
    },
    "PublicationManifest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "sourceMappings": {
          "$ref": "#/$defs/PackageSourceMappings"
        },
        "kind": {
          "type": "string",
          "enum": [
            "commentary_review_package"
          ]
        },
        "manifestVersion": {
          "const": 1
        },
        "title": {
          "type": "string",
          "maxLength": 200
        },
        "entryPage": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
        },
        "entryPageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "pages": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^[^\\s]+$"
              },
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
              },
              "title": {
                "type": "string",
                "maxLength": 200
              },
              "uploadId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^[^\\s]+$"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "mime": {
                "type": "string",
                "maxLength": 200
              },
              "bytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2097152
              }
            },
            "required": [
              "id",
              "path"
            ]
          },
          "maxItems": 10000,
          "minItems": 1
        },
        "assets": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
              },
              "uploadId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^[^\\s]+$"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "mime": {
                "type": "string",
                "maxLength": 200
              },
              "bytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 26214400
              }
            },
            "required": [
              "path"
            ]
          },
          "maxItems": 10000,
          "minItems": 0
        },
        "trustTier": {
          "type": "string",
          "enum": [
            "static",
            "executable_bundle"
          ]
        },
        "purpose": {
          "type": "string",
          "maxLength": 2000
        },
        "navigation": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageNavigation"
          },
          "maxItems": 10000,
          "minItems": 0
        },
        "relatedResources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageReference"
          },
          "maxItems": 1000,
          "minItems": 0
        },
        "sourceReferences": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageSourceReference"
          },
          "maxItems": 1000,
          "minItems": 0
        },
        "evidenceReferences": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageReference"
          },
          "maxItems": 1000,
          "minItems": 0
        },
        "deletePaths": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
          },
          "maxItems": 10000,
          "minItems": 0,
          "uniqueItems": true
        }
      },
      "required": [
        "kind",
        "manifestVersion"
      ]
    },
    "PackageSourceMappings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PackageSourceMapping"
      },
      "maxItems": 100,
      "minItems": 0
    },
    "PackageSourceMapping": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "component",
            "api_operation",
            "api_schema"
          ]
        },
        "id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$"
        },
        "occurrenceId": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$"
        },
        "pageId": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$"
        },
        "anchorId": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$"
        },
        "pageSha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "title": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        },
        "explanation": {
          "type": "string",
          "maxLength": 2000
        },
        "provenance": {
          "type": "string",
          "enum": [
            "human_authored",
            "agent_suggestion"
          ]
        },
        "visualBinding": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "mermaid_node",
                "markup_marker"
              ]
            },
            "key": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$"
            }
          },
          "required": [
            "kind",
            "key"
          ]
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "target": {
                "$ref": "#/$defs/ExactTarget"
              },
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
              },
              "blobHash": {
                "type": "string",
                "pattern": "^[a-f0-9]{40,64}$"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "lineStart": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              },
              "lineEnd": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              }
            },
            "required": [
              "target",
              "path",
              "blobHash",
              "sha256",
              "lineStart",
              "lineEnd"
            ]
          },
          "maxItems": 10,
          "minItems": 0
        },
        "relations": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "requirement",
                      "claim",
                      "evidence"
                    ]
                  },
                  "revisionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "pattern": "^[^\\s]+$"
                  }
                },
                "required": [
                  "kind",
                  "revisionId"
                ]
              },
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "resource"
                    ]
                  },
                  "target": {
                    "$ref": "#/$defs/ExactTarget"
                  }
                },
                "required": [
                  "kind",
                  "target"
                ]
              }
            ]
          },
          "maxItems": 10,
          "minItems": 0
        }
      },
      "required": [
        "kind",
        "id",
        "occurrenceId",
        "pageId",
        "anchorId",
        "pageSha256",
        "title",
        "explanation",
        "provenance",
        "sources",
        "relations"
      ]
    },
    "ExactTarget": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "resource": {
          "$ref": "#/$defs/Resource"
        },
        "revisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "purpose": {
          "type": "string",
          "maxLength": 200
        }
      },
      "required": [
        "resource",
        "revisionId",
        "sha256"
      ]
    },
    "Resource": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "repository",
            "pull_request",
            "document",
            "draft_review",
            "form",
            "research_study",
            "knowledge_brain",
            "web_app_review",
            "project",
            "tracker",
            "review_package",
            "project_review_session",
            "source_snapshot"
          ]
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "PackageNavigation": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "pageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "label": {
          "type": "string",
          "maxLength": 200
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageNavigation"
          },
          "maxItems": 10000,
          "minItems": 0
        }
      },
      "required": [
        "pageId",
        "label"
      ]
    },
    "PackageReference": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "repository",
            "pull_request",
            "document",
            "draft_review",
            "form",
            "research_study",
            "knowledge_brain",
            "web_app_review",
            "project",
            "tracker",
            "review_package",
            "project_review_session",
            "source_snapshot"
          ]
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "revisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "purpose": {
          "type": "string",
          "maxLength": 2000
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "PackageSourceReference": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "github",
            "azure_devops"
          ]
        },
        "resource": {
          "$ref": "#/$defs/Resource"
        },
        "commitSha": {
          "type": "string",
          "pattern": "^[a-f0-9]{40,64}$"
        },
        "path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
        },
        "blobHash": {
          "type": "string",
          "pattern": "^[a-f0-9]{40,64}$"
        }
      },
      "required": [
        "provider",
        "resource",
        "commitSha"
      ]
    },
    "publishReviewPackageOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/Package"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "Package": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "initialWorkspaceId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "title": {
          "type": "string",
          "maxLength": 200
        },
        "revisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "version": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "manifestSha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "readiness": {
          "type": "string",
          "enum": [
            "uploading",
            "validating",
            "indexing",
            "ready",
            "failed"
          ]
        },
        "collaboration": {
          "type": "object",
          "required": [
            "review",
            "settings",
            "permissions",
            "providerSync",
            "revisionKey"
          ],
          "properties": {
            "review": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "const": "draft"
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    }
                  },
                  "required": [
                    "kind",
                    "id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "const": "package"
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    }
                  },
                  "required": [
                    "kind",
                    "id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "const": "guide"
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    }
                  },
                  "required": [
                    "kind",
                    "id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "const": "snapshot"
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    }
                  },
                  "required": [
                    "kind",
                    "id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "const": "preview"
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    }
                  },
                  "required": [
                    "kind",
                    "id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "const": "pr"
                    },
                    "provider": {
                      "enum": [
                        "github",
                        "azure_devops"
                      ]
                    },
                    "owner": {
                      "type": "string"
                    },
                    "repo": {
                      "type": "string"
                    },
                    "projectName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "prNumber": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "kind",
                    "provider",
                    "owner",
                    "repo",
                    "prNumber"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "const": "branch"
                    },
                    "provider": {
                      "enum": [
                        "github",
                        "azure_devops"
                      ]
                    },
                    "owner": {
                      "type": "string"
                    },
                    "repo": {
                      "type": "string"
                    },
                    "projectName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "branchRef": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "provider",
                    "owner",
                    "repo",
                    "branchRef"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "settings": {
              "type": "object",
              "required": [
                "version",
                "polls",
                "consensus"
              ],
              "properties": {
                "version": {
                  "type": "integer",
                  "minimum": 0
                },
                "polls": {
                  "type": "boolean"
                },
                "consensus": {
                  "type": "object"
                }
              },
              "additionalProperties": false
            },
            "permissions": {
              "type": "object",
              "properties": {
                "comment": {
                  "type": "boolean"
                },
                "configure": {
                  "type": "boolean"
                },
                "humanSignOff": {
                  "type": "boolean"
                }
              }
            },
            "providerSync": {
              "type": "object",
              "properties": {
                "comments": {
                  "type": "boolean"
                },
                "pollSnapshots": {
                  "type": "boolean"
                },
                "liveVotes": {
                  "const": false
                },
                "decisions": {
                  "const": false
                }
              }
            },
            "revisionKey": {
              "type": [
                "string",
                "null"
              ]
            },
            "filePaths": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "participants": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "initialWorkspaceId",
        "title",
        "revisionId",
        "version",
        "manifestSha256",
        "readiness"
      ]
    },
    "getReviewPackageInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "packageId"
      ]
    },
    "getReviewPackageOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/Package"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "listPackageRevisionsInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "cursor": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "required": [
        "packageId"
      ]
    },
    "listPackageRevisionsOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Package"
              },
              "maxItems": 100,
              "minItems": 0
            },
            "nextCursor": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512,
                  "pattern": "^[^\\s]+$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "items",
            "nextCursor"
          ]
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "publishPackageRevisionInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "uploadId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "manifest": {
          "$ref": "#/$defs/PublicationManifest"
        },
        "deletePaths": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
          },
          "maxItems": 10000,
          "minItems": 0,
          "uniqueItems": true
        }
      },
      "required": [
        "packageId"
      ]
    },
    "publishPackageRevisionOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/Package"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "getPackageManifestInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "revisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "packageId",
        "revisionId"
      ]
    },
    "getPackageManifestOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/PackageManifest"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "PackageManifest": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "commentary_review_package"
          ]
        },
        "manifestVersion": {
          "const": 1
        },
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "backingDraftRevisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "entryPageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "pages": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^[^\\s]+$"
              },
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
              },
              "documentVersionId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^[^\\s]+$"
              },
              "title": {
                "type": "string",
                "maxLength": 200
              },
              "bytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2097152
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "mime": {
                "type": "string",
                "maxLength": 200
              },
              "uploadId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^[^\\s]+$"
              }
            },
            "required": [
              "id",
              "path",
              "documentVersionId"
            ]
          },
          "maxItems": 10000,
          "minItems": 1
        },
        "assets": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024,
                "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
              },
              "mime": {
                "type": "string",
                "maxLength": 200
              },
              "bytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 26214400
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "artifactId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^[^\\s]+$"
              },
              "uploadId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^[^\\s]+$"
              }
            },
            "required": [
              "path",
              "mime",
              "bytes",
              "sha256",
              "artifactId"
            ]
          },
          "maxItems": 10000,
          "minItems": 0
        },
        "files": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UploadFile"
          },
          "maxItems": 10000,
          "minItems": 1
        },
        "title": {
          "type": "string",
          "maxLength": 200
        },
        "purpose": {
          "type": "string",
          "maxLength": 2000
        },
        "navigation": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageNavigation"
          },
          "maxItems": 10000,
          "minItems": 0
        },
        "trustTier": {
          "type": "string",
          "enum": [
            "static",
            "executable_bundle"
          ]
        },
        "relatedResources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageReference"
          },
          "maxItems": 1000,
          "minItems": 0
        },
        "sourceReferences": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageSourceReference"
          },
          "maxItems": 1000,
          "minItems": 0
        },
        "evidenceReferences": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PackageReference"
          },
          "maxItems": 1000,
          "minItems": 0
        },
        "sourceMappings": {
          "$ref": "#/$defs/PackageSourceMappings"
        },
        "deletePaths": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
          },
          "maxItems": 10000,
          "minItems": 0,
          "uniqueItems": true
        }
      },
      "required": [
        "kind",
        "manifestVersion",
        "packageId",
        "backingDraftRevisionId",
        "entryPageId",
        "pages",
        "assets"
      ]
    },
    "downloadPackageFileInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "revisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
        }
      },
      "required": [
        "packageId",
        "revisionId",
        "path"
      ]
    },
    "downloadPackageFileOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/PackageFile"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "PackageFile": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
        },
        "mime": {
          "type": "string",
          "maxLength": 200
        },
        "bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 26214400
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "path",
        "mime",
        "bytes",
        "sha256"
      ]
    },
    "retryPackageIndexingInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "revisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "packageId",
        "revisionId"
      ]
    },
    "retryPackageIndexingOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/Package"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "listPackageCommentsInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
        },
        "revisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "cursor": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "packageId",
        "path"
      ]
    },
    "listPackageCommentsOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "threadId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "pattern": "^[^\\s]+$"
                  },
                  "blockId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "pattern": "^[^\\s]+$"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "resolved"
                    ]
                  },
                  "revisionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512,
                    "pattern": "^[^\\s]+$"
                  },
                  "filePath": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
                  },
                  "comments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "pattern": "^[^\\s]+$"
                        },
                        "bodyMarkdown": {
                          "type": "string",
                          "maxLength": 20000
                        },
                        "authorType": {
                          "type": "string",
                          "enum": [
                            "human",
                            "agent"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "bodyMarkdown",
                        "authorType",
                        "createdAt"
                      ]
                    },
                    "maxItems": 100,
                    "minItems": 0
                  },
                  "hasOlderComments": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "threadId",
                  "blockId",
                  "status",
                  "revisionId",
                  "filePath",
                  "comments",
                  "hasOlderComments"
                ]
              },
              "maxItems": 100,
              "minItems": 0
            },
            "nextCursor": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 4096,
                  "pattern": "^[^\\s]+$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "items",
            "nextCursor"
          ]
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "mutatePackageReviewCommentInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "revisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "action": {
          "type": "string",
          "enum": [
            "create",
            "reply",
            "edit",
            "resolve",
            "reopen",
            "reattach"
          ]
        },
        "path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
        },
        "threadId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "commentId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "blockId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "documentVersionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "nodeType": {
          "type": "string",
          "maxLength": 100
        },
        "sourceLineStart": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000000
        },
        "sourceLineEnd": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000000
        },
        "bodyMarkdown": {
          "type": "string",
          "maxLength": 20000,
          "minLength": 1
        },
        "selectedText": {
          "type": "string",
          "maxLength": 4096
        },
        "prefixText": {
          "type": "string",
          "maxLength": 4096
        },
        "suffixText": {
          "type": "string",
          "maxLength": 4096
        },
        "requestDecision": {
          "type": "boolean"
        },
        "poll": {
          "type": "object"
        }
      },
      "required": [
        "packageId",
        "revisionId",
        "action"
      ],
      "allOf": [
        {
          "if": {
            "properties": {
              "action": {
                "const": "create"
              }
            }
          },
          "then": {
            "required": [
              "path",
              "blockId",
              "bodyMarkdown"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "action": {
                "const": "reply"
              }
            }
          },
          "then": {
            "required": [
              "threadId",
              "bodyMarkdown"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "action": {
                "const": "edit"
              }
            }
          },
          "then": {
            "required": [
              "threadId",
              "commentId",
              "bodyMarkdown"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "action": {
                "const": "resolve"
              }
            }
          },
          "then": {
            "required": [
              "threadId"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "action": {
                "const": "reopen"
              }
            }
          },
          "then": {
            "required": [
              "threadId"
            ]
          }
        },
        {
          "if": {
            "properties": {
              "action": {
                "const": "reattach"
              }
            }
          },
          "then": {
            "required": [
              "threadId",
              "documentVersionId",
              "blockId"
            ]
          }
        }
      ],
      "x-commentary-max-body-bytes": 262144,
      "x-commentary-action-scopes": {
        "resolve": [
          "commentary.comments.status"
        ],
        "reopen": [
          "commentary.comments.status"
        ],
        "reattach": [
          "commentary.comments.status"
        ]
      }
    },
    "mutatePackageReviewCommentOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "ok": {
              "const": true
            },
            "packageId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512,
              "pattern": "^[^\\s]+$"
            },
            "revisionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512,
              "pattern": "^[^\\s]+$"
            },
            "threadId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512,
              "pattern": "^[^\\s]+$"
            },
            "commentId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512,
              "pattern": "^[^\\s]+$"
            },
            "status": {
              "type": "string",
              "enum": [
                "open",
                "resolved"
              ]
            }
          },
          "required": [
            "ok",
            "packageId",
            "revisionId",
            "threadId"
          ]
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "listPackageRenderersInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "revisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "packageId"
      ]
    },
    "listPackageRenderersOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/RendererPublication"
              },
              "maxItems": 100,
              "minItems": 0
            },
            "limit": {
              "const": 100
            }
          },
          "required": [
            "items",
            "limit"
          ]
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "RendererPublication": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "key": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,100}$"
        },
        "name": {
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        },
        "protocol": {
          "const": "commentary-tracker-v1"
        },
        "operations": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "getSchema",
              "getPermissions",
              "queryRecords",
              "getRecord",
              "createRecord",
              "patchRecord",
              "archiveRecord",
              "bulk",
              "reorder",
              "listViews",
              "getView",
              "changes",
              "openResource",
              "openReview"
            ]
          },
          "maxItems": 14,
          "minItems": 0,
          "uniqueItems": true
        },
        "trackerId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,100}$"
        },
        "packageId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,100}$"
        },
        "packageRevisionId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,100}$"
        },
        "anchors": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,100}$"
              },
              "pageId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,100}$"
              },
              "blockId": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{1,100}$"
              }
            },
            "required": [
              "id",
              "pageId"
            ]
          },
          "maxItems": 100,
          "minItems": 0
        },
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{1,100}$"
        },
        "version": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "kind": {
          "type": "string",
          "enum": [
            "hosted",
            "external"
          ]
        },
        "entry": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
        },
        "externalUrl": {
          "type": "string",
          "maxLength": 2048
        },
        "externalOrigin": {
          "type": "string",
          "maxLength": 2048
        }
      },
      "required": [
        "key",
        "name",
        "protocol",
        "operations",
        "id",
        "version",
        "digest",
        "kind",
        "anchors"
      ]
    },
    "managePackageRendererPublicationInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "action": {
          "type": "string",
          "enum": [
            "publish",
            "revokePublication"
          ]
        },
        "definition": {
          "$ref": "#/$defs/RendererDefinition"
        },
        "publicationId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "packageId",
        "action"
      ],
      "anyOf": [
        {
          "properties": {
            "action": {
              "const": "publish"
            }
          },
          "required": [
            "definition"
          ],
          "not": {
            "required": [
              "publicationId"
            ]
          }
        },
        {
          "properties": {
            "action": {
              "const": "revokePublication"
            }
          },
          "required": [
            "publicationId"
          ],
          "not": {
            "required": [
              "definition"
            ]
          }
        }
      ]
    },
    "RendererDefinition": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "key": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,100}$"
            },
            "name": {
              "type": "string",
              "maxLength": 200,
              "minLength": 1
            },
            "protocol": {
              "const": "commentary-tracker-v1"
            },
            "operations": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "getSchema",
                  "getPermissions",
                  "queryRecords",
                  "getRecord",
                  "createRecord",
                  "patchRecord",
                  "archiveRecord",
                  "bulk",
                  "reorder",
                  "listViews",
                  "getView",
                  "changes",
                  "openResource",
                  "openReview"
                ]
              },
              "maxItems": 14,
              "minItems": 0,
              "uniqueItems": true
            },
            "trackerId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,100}$"
            },
            "packageId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,100}$"
            },
            "packageRevisionId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,100}$"
            },
            "anchors": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,100}$"
                  },
                  "pageId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,100}$"
                  },
                  "blockId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,100}$"
                  }
                },
                "required": [
                  "id",
                  "pageId"
                ]
              },
              "maxItems": 100,
              "minItems": 0
            },
            "kind": {
              "const": "hosted"
            },
            "uploadId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,100}$"
            },
            "entry": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024,
              "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\\\\\u0000]+$"
            }
          },
          "required": [
            "key",
            "name",
            "protocol",
            "operations",
            "kind",
            "uploadId",
            "entry"
          ],
          "allOf": [
            {
              "anyOf": [
                {
                  "required": [
                    "trackerId"
                  ]
                },
                {
                  "required": [
                    "packageId",
                    "packageRevisionId"
                  ]
                }
              ]
            },
            {
              "dependentRequired": {
                "packageId": [
                  "packageRevisionId"
                ],
                "packageRevisionId": [
                  "packageId"
                ]
              }
            },
            {
              "if": {
                "not": {
                  "required": [
                    "trackerId"
                  ]
                }
              },
              "then": {
                "properties": {
                  "operations": {
                    "maxItems": 0
                  }
                }
              }
            }
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "key": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,100}$"
            },
            "name": {
              "type": "string",
              "maxLength": 200,
              "minLength": 1
            },
            "protocol": {
              "const": "commentary-tracker-v1"
            },
            "operations": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "getSchema",
                  "getPermissions",
                  "queryRecords",
                  "getRecord",
                  "createRecord",
                  "patchRecord",
                  "archiveRecord",
                  "bulk",
                  "reorder",
                  "listViews",
                  "getView",
                  "changes",
                  "openResource",
                  "openReview"
                ]
              },
              "maxItems": 14,
              "minItems": 0,
              "uniqueItems": true
            },
            "trackerId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,100}$"
            },
            "packageId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,100}$"
            },
            "packageRevisionId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,100}$"
            },
            "anchors": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,100}$"
                  },
                  "pageId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,100}$"
                  },
                  "blockId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{1,100}$"
                  }
                },
                "required": [
                  "id",
                  "pageId"
                ]
              },
              "maxItems": 100,
              "minItems": 0
            },
            "kind": {
              "const": "external"
            },
            "externalUrl": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            }
          },
          "required": [
            "key",
            "name",
            "protocol",
            "operations",
            "kind",
            "externalUrl"
          ],
          "allOf": [
            {
              "anyOf": [
                {
                  "required": [
                    "trackerId"
                  ]
                },
                {
                  "required": [
                    "packageId",
                    "packageRevisionId"
                  ]
                }
              ]
            },
            {
              "dependentRequired": {
                "packageId": [
                  "packageRevisionId"
                ],
                "packageRevisionId": [
                  "packageId"
                ]
              }
            },
            {
              "if": {
                "not": {
                  "required": [
                    "trackerId"
                  ]
                }
              },
              "then": {
                "properties": {
                  "operations": {
                    "maxItems": 0
                  }
                }
              }
            }
          ]
        }
      ]
    },
    "managePackageRendererPublicationOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "oneOf": [
            {
              "$ref": "#/$defs/RendererPublication"
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "revoked": {
                  "const": true
                }
              },
              "required": [
                "revoked"
              ]
            }
          ]
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "comparePackageRevisionsInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "fromRevisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "toRevisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "offset": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        }
      },
      "required": [
        "packageId",
        "fromRevisionId",
        "toRevisionId"
      ]
    },
    "comparePackageRevisionsOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "$ref": "#/$defs/RevisionImpact"
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "RevisionImpact": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "available",
            "unavailable"
          ]
        },
        "reason": {
          "type": "string",
          "maxLength": 2000
        },
        "fromRevisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "toRevisionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "identity": {
                "type": "string",
                "maxLength": 2048
              },
              "path": {
                "type": "string",
                "maxLength": 2048
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "kind": {
                "type": "string",
                "maxLength": 2048
              },
              "href": {
                "type": "string",
                "maxLength": 8192
              },
              "uncertainty": {
                "type": "string",
                "maxLength": 2000
              },
              "status": {
                "type": "string",
                "enum": [
                  "added",
                  "removed",
                  "changed",
                  "moved"
                ]
              },
              "previousPath": {
                "type": "string",
                "maxLength": 2048
              },
              "previousHref": {
                "type": "string",
                "maxLength": 8192
              },
              "comparisonHref": {
                "type": "string",
                "maxLength": 8192
              },
              "provenance": {
                "const": "deterministic"
              }
            },
            "required": [
              "identity",
              "path",
              "sha256",
              "kind",
              "status",
              "provenance"
            ]
          },
          "maxItems": 100,
          "minItems": 0
        },
        "counts": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "added": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "removed": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "changed": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "moved": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "added",
            "removed",
            "changed",
            "moved"
          ]
        },
        "total": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "nextOffset": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "status",
        "fromRevisionId",
        "toRevisionId",
        "items",
        "counts",
        "total"
      ]
    },
    "listPackageActivityInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "cursor": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "pattern": "^[^\\s]+$"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "waitMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        }
      },
      "required": [
        "packageId"
      ]
    },
    "listPackageActivityOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Activity"
              },
              "maxItems": 100,
              "minItems": 0
            },
            "nextCursor": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "pattern": "^[^\\s]+$"
            },
            "hasMore": {
              "type": "boolean"
            },
            "outcome": {
              "type": "string",
              "enum": [
                "events",
                "idle",
                "timeout",
                "canceled"
              ]
            }
          },
          "required": [
            "items",
            "nextCursor",
            "hasMore",
            "outcome"
          ]
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    },
    "Activity": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "eventType": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "occurredAt": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$"
        },
        "resource": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "type": {
              "type": "string",
              "maxLength": 80
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512,
              "pattern": "^[^\\s]+$"
            }
          },
          "required": [
            "type",
            "id"
          ]
        },
        "aggregateVersion": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "retrievalUrl": {
          "type": "string",
          "maxLength": 2048
        },
        "change": {
          "type": "string",
          "maxLength": 200
        }
      },
      "required": [
        "id",
        "eventType",
        "occurredAt",
        "resource",
        "aggregateVersion",
        "retrievalUrl",
        "change"
      ]
    },
    "listPackageFeedbackInput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        "cursor": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "pattern": "^[^\\s]+$"
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "waitMs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        }
      },
      "required": [
        "packageId"
      ]
    },
    "listPackageFeedbackOutput": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "data": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Activity"
              },
              "maxItems": 100,
              "minItems": 0
            },
            "nextCursor": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096,
              "pattern": "^[^\\s]+$"
            },
            "hasMore": {
              "type": "boolean"
            },
            "outcome": {
              "type": "string",
              "enum": [
                "events",
                "idle",
                "timeout",
                "canceled"
              ]
            }
          },
          "required": [
            "items",
            "nextCursor",
            "hasMore",
            "outcome"
          ]
        },
        "idempotencyReplayed": {
          "type": "boolean"
        }
      },
      "required": [
        "data"
      ]
    }
  }
}