{
  "components": {
    "schemas": {
      "ErrorResponse": {
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "FilesystemActionError": {
        "properties": {
          "code": {
            "description": "Present for append-log domain errors, including append_log_conflict, append_log_rebased, append_log_unsupported, append_log_invalid_request, and append_log_too_large. Only append_log_rebased permits re-stat and retry of the unchanged tail. Other actions and authentication errors may omit this field.",
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "backend.AppendPlan": {
        "properties": {
          "base_size": {
            "format": "int64",
            "type": "integer"
          },
          "copied_parts": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "part_size": {
            "format": "int64",
            "type": "integer"
          },
          "upload_id": {
            "type": "string"
          },
          "upload_parts": {
            "items": {
              "$ref": "#/components/schemas/backend.PatchUploadPart"
            },
            "type": "array"
          }
        },
        "required": [
          "base_size",
          "upload_id",
          "part_size",
          "upload_parts",
          "copied_parts"
        ],
        "type": "object"
      },
      "backend.ChecksumContract": {
        "properties": {
          "required": {
            "type": "boolean"
          },
          "supported": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "supported",
          "required"
        ],
        "type": "object"
      },
      "backend.CompletePart": {
        "properties": {
          "etag": {
            "type": "string"
          },
          "number": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "number",
          "etag"
        ],
        "type": "object"
      },
      "backend.PatchPlan": {
        "properties": {
          "copied_parts": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "part_size": {
            "format": "int64",
            "type": "integer"
          },
          "upload_id": {
            "type": "string"
          },
          "upload_parts": {
            "items": {
              "$ref": "#/components/schemas/backend.PatchUploadPart"
            },
            "type": "array"
          }
        },
        "required": [
          "upload_id",
          "part_size",
          "upload_parts",
          "copied_parts"
        ],
        "type": "object"
      },
      "backend.PatchUploadPart": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "number": {
            "format": "int64",
            "type": "integer"
          },
          "read_headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "read_url": {
            "type": "string"
          },
          "size": {
            "format": "int64",
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "number",
          "url",
          "size",
          "expires_at"
        ],
        "type": "object"
      },
      "backend.PresignChecksum": {
        "properties": {
          "algorithm": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "algorithm",
          "value"
        ],
        "type": "object"
      },
      "backend.PresignPartEntry": {
        "properties": {
          "checksum": {
            "$ref": "#/components/schemas/backend.PresignChecksum"
          },
          "part_number": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "part_number"
        ],
        "type": "object"
      },
      "backend.UploadPlan": {
        "properties": {
          "key": {
            "type": "string"
          },
          "part_size": {
            "format": "int64",
            "type": "integer"
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/s3client.UploadPartURL"
            },
            "type": "array"
          },
          "upload_id": {
            "type": "string"
          }
        },
        "required": [
          "upload_id",
          "key",
          "part_size",
          "parts"
        ],
        "type": "object"
      },
      "backend.UploadPlanV2": {
        "properties": {
          "checksum_contract": {
            "$ref": "#/components/schemas/backend.ChecksumContract"
          },
          "expires_at": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "part_size": {
            "format": "int64",
            "type": "integer"
          },
          "resumable": {
            "type": "boolean"
          },
          "total_parts": {
            "format": "int64",
            "type": "integer"
          },
          "upload_id": {
            "type": "string"
          }
        },
        "required": [
          "upload_id",
          "key",
          "part_size",
          "total_parts",
          "expires_at",
          "resumable",
          "checksum_contract"
        ],
        "type": "object"
      },
      "datastore.SearchResult": {
        "properties": {
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "score": {
            "format": "double",
            "type": "number"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "name",
          "size_bytes"
        ],
        "type": "object"
      },
      "journal.Actor": {
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "journal.AppendResponse": {
        "properties": {
          "append_id": {
            "type": "string"
          },
          "count": {
            "format": "int64",
            "type": "integer"
          },
          "first_seq": {
            "format": "int64",
            "type": "integer"
          },
          "head_hash": {
            "type": "string"
          },
          "idempotent": {
            "type": "boolean"
          },
          "journal_id": {
            "type": "string"
          },
          "last_seq": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "journal_id",
          "append_id",
          "first_seq",
          "last_seq",
          "count",
          "head_hash",
          "idempotent"
        ],
        "type": "object"
      },
      "journal.ArtifactRef": {
        "properties": {
          "content_type": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "hash",
          "size_bytes"
        ],
        "type": "object"
      },
      "journal.CreateRequest": {
        "properties": {
          "actor": {
            "$ref": "#/components/schemas/journal.Actor"
          },
          "journal_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/journal.Label"
            },
            "type": "array"
          },
          "meta": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "retention": {},
          "source": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "journal.Entry": {
        "properties": {
          "actor": {
            "$ref": "#/components/schemas/journal.Actor"
          },
          "artifact_refs": {
            "items": {
              "$ref": "#/components/schemas/journal.ArtifactRef"
            },
            "type": "array"
          },
          "correlation_id": {
            "type": "string"
          },
          "entry_hash": {
            "type": "string"
          },
          "entry_id": {
            "type": "string"
          },
          "journal_id": {
            "type": "string"
          },
          "observed_at": {
            "format": "date-time",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "parent_entry_id": {
            "type": "string"
          },
          "prev_hash": {
            "type": "string"
          },
          "schema_version": {
            "format": "int64",
            "type": "integer"
          },
          "seq": {
            "format": "int64",
            "type": "integer"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subjects": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "summary": {},
          "tenant_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "journal_id",
          "seq",
          "entry_id",
          "type",
          "schema_version",
          "occurred_at",
          "observed_at",
          "source",
          "prev_hash",
          "entry_hash"
        ],
        "type": "object"
      },
      "journal.EntryInput": {
        "properties": {
          "actor": {
            "$ref": "#/components/schemas/journal.Actor"
          },
          "artifact_refs": {
            "items": {
              "$ref": "#/components/schemas/journal.ArtifactRef"
            },
            "type": "array"
          },
          "artifacts": {
            "items": {
              "$ref": "#/components/schemas/journal.ArtifactRef"
            },
            "type": "array"
          },
          "correlation_id": {
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "parent_entry_id": {
            "type": "string"
          },
          "schema_version": {
            "format": "int64",
            "type": "integer"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subjects": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "summary": {},
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "journal.Journal": {
        "properties": {
          "actor": {
            "$ref": "#/components/schemas/journal.Actor"
          },
          "closed_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "genesis_hash": {
            "type": "string"
          },
          "head_hash": {
            "type": "string"
          },
          "journal_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/journal.Label"
            },
            "type": "array"
          },
          "meta": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "next_seq": {
            "format": "int64",
            "type": "integer"
          },
          "retention": {},
          "source": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "journal_id",
          "kind",
          "created_at"
        ],
        "type": "object"
      },
      "journal.Label": {
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "value"
        ],
        "type": "object"
      },
      "journal.SearchMatch": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "entry": {
            "$ref": "#/components/schemas/journal.Entry"
          },
          "journal_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "matched_labels": {
            "items": {
              "$ref": "#/components/schemas/journal.Label"
            },
            "type": "array"
          },
          "matched_subjects": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "observed_at": {
            "format": "date-time",
            "type": "string"
          },
          "seq": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "journal_id"
        ],
        "type": "object"
      },
      "journal.VerifyResult": {
        "properties": {
          "artifact_bytes_available": {
            "type": "boolean"
          },
          "entries": {
            "format": "int64",
            "type": "integer"
          },
          "hash_chain_ok": {
            "type": "boolean"
          },
          "head_hash": {
            "type": "string"
          },
          "head_sealed": {
            "type": "boolean"
          },
          "journal_id": {
            "type": "string"
          },
          "latest_seal_seq": {
            "format": "int64",
            "type": "integer"
          },
          "ok": {
            "type": "boolean"
          },
          "projection_ok": {
            "type": "boolean"
          },
          "seal_ok": {
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "journal_id",
          "entries",
          "head_hash",
          "hash_chain_ok"
        ],
        "type": "object"
      },
      "s3client.UploadPartURL": {
        "properties": {
          "checksum_crc32c": {
            "type": "string"
          },
          "checksum_sha256": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "number": {
            "format": "int64",
            "type": "integer"
          },
          "size": {
            "format": "int64",
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "number",
          "url",
          "size",
          "expires_at"
        ],
        "type": "object"
      },
      "server.MigrationCapabilities": {
        "properties": {
          "checksum_complete": {
            "type": "boolean"
          },
          "checksum_read": {
            "type": "boolean"
          },
          "conditional_create": {
            "type": "boolean"
          },
          "conditional_update": {
            "type": "boolean"
          },
          "event_ingest": {
            "type": "boolean"
          }
        },
        "required": [
          "checksum_read",
          "checksum_complete",
          "conditional_create",
          "conditional_update",
          "event_ingest"
        ],
        "type": "object"
      },
      "server.StorageCapabilities": {
        "properties": {
          "append_log_v1": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "server.TenantStatusResponse": {
        "properties": {
          "inline_threshold": {
            "format": "int64",
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "max_upload_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "migration_capabilities": {
            "$ref": "#/components/schemas/server.MigrationCapabilities"
          },
          "status": {
            "type": "string"
          },
          "storage_capabilities": {
            "$ref": "#/components/schemas/server.StorageCapabilities"
          },
          "tenant_id": {
            "type": "string"
          }
        },
        "required": [
          "tenant_id",
          "status",
          "max_upload_bytes",
          "migration_capabilities"
        ],
        "type": "object"
      },
      "server.batchReadSmallRequest": {
        "properties": {
          "max_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "paths": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "paths"
        ],
        "type": "object"
      },
      "server.batchReadSmallResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/server.batchReadSmallResult"
            },
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "type": "object"
      },
      "server.batchReadSmallResult": {
        "properties": {
          "data": {
            "format": "byte",
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "mtime": {
            "format": "int64",
            "type": "integer"
          },
          "path": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "size": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "status"
        ],
        "type": "object"
      },
      "server.batchStatRequest": {
        "properties": {
          "include_checksum": {
            "type": "boolean"
          },
          "paths": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "paths"
        ],
        "type": "object"
      },
      "server.batchStatResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/server.batchStatResult"
            },
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "type": "object"
      },
      "server.batchStatResult": {
        "properties": {
          "checksum_sha256": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "hasMode": {
            "type": "boolean"
          },
          "isDir": {
            "type": "boolean"
          },
          "mode": {
            "format": "int64",
            "type": "integer"
          },
          "mtime": {
            "format": "int64",
            "type": "integer"
          },
          "nlink": {
            "format": "int64",
            "type": "integer"
          },
          "path": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "size": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "status",
          "isDir",
          "hasMode"
        ],
        "type": "object"
      },
      "server.batchWriteItem": {
        "properties": {
          "data": {
            "format": "byte",
            "type": "string"
          },
          "expected_revision": {
            "format": "int64",
            "type": "integer"
          },
          "hasMode": {
            "type": "boolean"
          },
          "mode": {
            "format": "int64",
            "type": "integer"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "expected_revision",
          "data"
        ],
        "type": "object"
      },
      "server.batchWriteRequest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/server.batchWriteItem"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "server.batchWriteResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/server.batchWriteResult"
            },
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "type": "object"
      },
      "server.batchWriteResult": {
        "properties": {
          "error": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "status"
        ],
        "type": "object"
      },
      "server.forkRequest": {
        "properties": {
          "name": {
            "type": "string"
          },
          "private_key": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "public_key",
          "private_key"
        ],
        "type": "object"
      },
      "server.forkResponse": {
        "properties": {
          "api_key": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parent_tenant_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "storage": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          }
        },
        "required": [
          "tenant_id",
          "name",
          "api_key",
          "status",
          "parent_tenant_id",
          "storage"
        ],
        "type": "object"
      },
      "server.fsLayerCheckpointRequest": {
        "properties": {
          "checkpoint_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "server.fsLayerCheckpointResponse": {
        "properties": {
          "checkpoint_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "durable_seq": {
            "format": "int64",
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "layer_id": {
            "type": "string"
          }
        },
        "required": [
          "checkpoint_id",
          "layer_id",
          "durable_seq",
          "label",
          "created_at"
        ],
        "type": "object"
      },
      "server.fsLayerCommitConflict": {
        "properties": {
          "base_revision": {
            "format": "int64",
            "type": "integer"
          },
          "path": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "want_revision": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "reason"
        ],
        "type": "object"
      },
      "server.fsLayerCommitResponse": {
        "properties": {
          "applied": {
            "format": "int64",
            "type": "integer"
          },
          "conflicts": {
            "items": {
              "$ref": "#/components/schemas/server.fsLayerCommitConflict"
            },
            "type": "array"
          },
          "layer_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "layer_id"
        ],
        "type": "object"
      },
      "server.fsLayerCreateRequest": {
        "properties": {
          "actor_id": {
            "type": "string"
          },
          "base_root_path": {
            "type": "string"
          },
          "durability_mode": {
            "type": "string"
          },
          "layer_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tags": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "base_root_path"
        ],
        "type": "object"
      },
      "server.fsLayerEntryRequest": {
        "properties": {
          "base_inode_id": {
            "type": "string"
          },
          "base_revision": {
            "format": "int64",
            "type": "integer"
          },
          "checksum_sha256": {
            "type": "string"
          },
          "content": {
            "format": "byte",
            "type": "string"
          },
          "content_text": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "mode": {
            "format": "int64",
            "type": "integer"
          },
          "op": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "storage_encryption_key_id": {
            "type": "string"
          },
          "storage_encryption_mode": {
            "type": "string"
          },
          "storage_ref": {
            "type": "string"
          },
          "storage_ref_hash": {
            "type": "string"
          },
          "storage_type": {
            "type": "string"
          }
        },
        "required": [
          "path"
        ],
        "type": "object"
      },
      "server.fsLayerEntryResponse": {
        "properties": {
          "base_inode_id": {
            "type": "string"
          },
          "base_revision": {
            "format": "int64",
            "type": "integer"
          },
          "checksum_sha256": {
            "type": "string"
          },
          "content": {
            "format": "byte",
            "type": "string"
          },
          "content_text": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "entry_seq": {
            "format": "int64",
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "layer_id": {
            "type": "string"
          },
          "mode": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "op": {
            "type": "string"
          },
          "parent_path": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "storage_encryption_key_id": {
            "type": "string"
          },
          "storage_encryption_mode": {
            "type": "string"
          },
          "storage_ref": {
            "type": "string"
          },
          "storage_ref_hash": {
            "type": "string"
          },
          "storage_type": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "layer_id",
          "path",
          "parent_path",
          "name",
          "op",
          "kind",
          "base_inode_id",
          "base_revision",
          "storage_type",
          "storage_ref",
          "storage_ref_hash",
          "storage_encryption_mode",
          "storage_encryption_key_id",
          "checksum_sha256",
          "size_bytes",
          "mode",
          "entry_seq",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "server.fsLayerEventResponse": {
        "properties": {
          "actor_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "layer_id": {
            "type": "string"
          },
          "op": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "seq": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "event_id",
          "layer_id",
          "seq",
          "actor_id",
          "op",
          "path",
          "created_at"
        ],
        "type": "object"
      },
      "server.fsLayerForkRequest": {
        "properties": {
          "actor_id": {
            "type": "string"
          },
          "checkpoint_id": {
            "type": "string"
          },
          "layer_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "server.fsLayerResponse": {
        "properties": {
          "actor_id": {
            "type": "string"
          },
          "base_root_path": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "depth": {
            "format": "int64",
            "type": "integer"
          },
          "durability_mode": {
            "type": "string"
          },
          "durable_seq": {
            "format": "int64",
            "type": "integer"
          },
          "layer_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "origin_checkpoint_id": {
            "type": "string"
          },
          "origin_seq": {
            "format": "int64",
            "type": "integer"
          },
          "parent_layer_id": {
            "type": "string"
          },
          "root_layer_id": {
            "type": "string"
          },
          "sealed_at": {
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "tags": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "layer_id",
          "base_root_path",
          "name",
          "state",
          "durability_mode",
          "actor_id",
          "durable_seq",
          "origin_seq",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "server.fsLayerUploadCompleteRequest": {
        "properties": {
          "checksum_sha256": {
            "type": "string"
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/backend.CompletePart"
            },
            "type": "array"
          }
        },
        "required": [
          "parts"
        ],
        "type": "object"
      },
      "server.fsLayerUploadInitiateRequest": {
        "properties": {
          "base_revision": {
            "format": "int64",
            "type": "integer"
          },
          "mode": {
            "format": "int64",
            "type": "integer"
          },
          "path": {
            "type": "string"
          },
          "total_size": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "total_size"
        ],
        "type": "object"
      },
      "server.fsListResponseEntry": {
        "properties": {
          "hasMode": {
            "type": "boolean"
          },
          "isDir": {
            "type": "boolean"
          },
          "mode": {
            "format": "int64",
            "type": "integer"
          },
          "mtime": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "nlink": {
            "format": "int64",
            "type": "integer"
          },
          "resource_id": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "size": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "size",
          "isDir",
          "hasMode"
        ],
        "type": "object"
      },
      "server.fsStatMetadataResponse": {
        "properties": {
          "content_type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "isdir": {
            "type": "boolean"
          },
          "mtime": {
            "format": "int64",
            "type": "integer"
          },
          "nlink": {
            "format": "int64",
            "type": "integer"
          },
          "resource_id": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "semantic_text": {
            "type": "string"
          },
          "size": {
            "format": "int64",
            "type": "integer"
          },
          "tags": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "size",
          "isdir",
          "resource_id",
          "revision",
          "content_type",
          "semantic_text",
          "description",
          "tags"
        ],
        "type": "object"
      },
      "server.fsTokenScopeRequest": {
        "properties": {
          "ops": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "prefix": {
            "type": "string"
          }
        },
        "required": [
          "prefix",
          "ops"
        ],
        "type": "object"
      },
      "server.gitObjectPackRequest": {
        "properties": {
          "content": {
            "format": "byte",
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "type": "object"
      },
      "server.gitObjectPackResponse": {
        "properties": {
          "checksum_sha256": {
            "type": "string"
          },
          "content": {
            "format": "byte",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "pack_id": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "workspace_id": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "pack_id",
          "checksum_sha256",
          "size_bytes",
          "created_at"
        ],
        "type": "object"
      },
      "server.gitOverlayEntryRequest": {
        "properties": {
          "base_object_sha": {
            "type": "string"
          },
          "checksum_sha256": {
            "type": "string"
          },
          "content": {
            "format": "byte",
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "op": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "storage_ref": {
            "type": "string"
          },
          "storage_ref_hash": {
            "type": "string"
          },
          "storage_type": {
            "type": "string"
          }
        },
        "required": [
          "path"
        ],
        "type": "object"
      },
      "server.gitOverlayEntryResponse": {
        "properties": {
          "base_object_sha": {
            "type": "string"
          },
          "checksum_sha256": {
            "type": "string"
          },
          "content": {
            "format": "byte",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "op": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "storage_ref": {
            "type": "string"
          },
          "storage_ref_hash": {
            "type": "string"
          },
          "storage_type": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "path",
          "op",
          "kind",
          "mode",
          "storage_type",
          "storage_ref",
          "storage_ref_hash",
          "checksum_sha256",
          "size_bytes",
          "base_object_sha",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "server.gitStateRequest": {
        "properties": {
          "checkpoint_commit": {
            "type": "string"
          },
          "checksum_sha256": {
            "type": "string"
          },
          "content": {
            "format": "byte",
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "storage_ref": {
            "type": "string"
          },
          "storage_ref_hash": {
            "type": "string"
          },
          "storage_type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "server.gitStateResponse": {
        "properties": {
          "checkpoint_commit": {
            "type": "string"
          },
          "checksum_sha256": {
            "type": "string"
          },
          "content": {
            "format": "byte",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "storage_ref": {
            "type": "string"
          },
          "storage_ref_hash": {
            "type": "string"
          },
          "storage_type": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "checkpoint_commit",
          "storage_type",
          "storage_ref",
          "storage_ref_hash",
          "checksum_sha256",
          "size_bytes",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "server.gitTreeNodeResponse": {
        "properties": {
          "commit_sha": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "object_sha": {
            "type": "string"
          },
          "parent_path": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "workspace_id": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "parent_path",
          "name",
          "kind",
          "mode",
          "object_sha",
          "size_bytes"
        ],
        "type": "object"
      },
      "server.gitTreeReplaceRequest": {
        "properties": {
          "commit_sha": {
            "type": "string"
          },
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/server.gitTreeNodeResponse"
            },
            "type": "array"
          }
        },
        "required": [
          "commit_sha",
          "nodes"
        ],
        "type": "object"
      },
      "server.gitWorkspaceRequest": {
        "properties": {
          "base_commit": {
            "type": "string"
          },
          "branch_name": {
            "type": "string"
          },
          "common_workspace_id": {
            "type": "string"
          },
          "gitdir_rel": {
            "type": "string"
          },
          "head_commit": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "remote_name": {
            "type": "string"
          },
          "repo_url": {
            "type": "string"
          },
          "root_path": {
            "type": "string"
          },
          "workspace_kind": {
            "type": "string"
          },
          "worktree_name": {
            "type": "string"
          }
        },
        "required": [
          "root_path",
          "repo_url"
        ],
        "type": "object"
      },
      "server.gitWorkspaceResponse": {
        "properties": {
          "base_commit": {
            "type": "string"
          },
          "branch_name": {
            "type": "string"
          },
          "common_workspace_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "gitdir_rel": {
            "type": "string"
          },
          "head_commit": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "remote_name": {
            "type": "string"
          },
          "repo_url": {
            "type": "string"
          },
          "root_path": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "workspace_id": {
            "type": "string"
          },
          "workspace_kind": {
            "type": "string"
          },
          "worktree_name": {
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "root_path",
          "repo_url",
          "remote_name",
          "branch_name",
          "base_commit",
          "head_commit",
          "mode",
          "workspace_kind",
          "common_workspace_id",
          "worktree_name",
          "gitdir_rel",
          "status",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "server.issueScopedTokenRequest": {
        "properties": {
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/server.fsTokenScopeRequest"
            },
            "type": "array"
          },
          "subject": {
            "type": "string"
          },
          "ttl_seconds": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "ttl_seconds",
          "scopes"
        ],
        "type": "object"
      },
      "server.objectCredentialsRequest": {
        "properties": {
          "uri": {
            "type": "string"
          },
          "write": {
            "type": "boolean"
          }
        },
        "required": [
          "uri",
          "write"
        ],
        "type": "object"
      },
      "server.objectCredentialsResponse": {
        "properties": {
          "access_key_id": {
            "type": "string"
          },
          "access_token": {
            "type": "string"
          },
          "account": {
            "type": "string"
          },
          "bucket": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "expiration": {
            "type": "string"
          },
          "force_path_style": {
            "type": "boolean"
          },
          "prefix": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "sas_url": {
            "type": "string"
          },
          "scheme": {
            "type": "string"
          },
          "secret_access_key": {
            "type": "string"
          },
          "session_token": {
            "type": "string"
          }
        },
        "required": [
          "force_path_style",
          "scheme",
          "bucket",
          "prefix"
        ],
        "type": "object"
      },
      "server.quotaConfigResponse": {
        "properties": {
          "max_file_count": {
            "format": "int64",
            "type": "integer"
          },
          "max_file_size": {
            "format": "int64",
            "type": "integer"
          },
          "max_media_llm_files": {
            "format": "int64",
            "type": "integer"
          },
          "max_storage_size": {
            "format": "int64",
            "type": "integer"
          },
          "max_video_llm_files": {
            "format": "int64",
            "type": "integer"
          },
          "tidbcloud_spending_limit": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "max_storage_size",
          "max_file_size",
          "max_file_count",
          "max_media_llm_files",
          "max_video_llm_files"
        ],
        "type": "object"
      },
      "server.quotaResponse": {
        "properties": {
          "config": {
            "$ref": "#/components/schemas/server.quotaConfigResponse"
          },
          "provider": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "supports_update": {
            "type": "boolean"
          },
          "tenant_id": {
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/server.quotaUsageResponse"
          }
        },
        "required": [
          "tenant_id",
          "provider",
          "status",
          "supports_update",
          "config",
          "usage"
        ],
        "type": "object"
      },
      "server.quotaUsageResponse": {
        "properties": {
          "file_count": {
            "format": "int64",
            "type": "integer"
          },
          "media_file_count": {
            "format": "int64",
            "type": "integer"
          },
          "reserved_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "storage_bytes": {
            "format": "int64",
            "type": "integer"
          },
          "video_file_count": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "storage_bytes",
          "reserved_bytes",
          "file_count",
          "media_file_count",
          "video_file_count"
        ],
        "type": "object"
      },
      "server.refreshTokenRequest": {
        "properties": {
          "ttl_seconds": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "server.refreshTokenResponse": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "scope_kind": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "token_id": {
            "type": "string"
          }
        },
        "required": [
          "token",
          "token_id",
          "tenant_id",
          "scope_kind"
        ],
        "type": "object"
      },
      "server.revokeScopedTokenByAPIKeyRequest": {
        "properties": {
          "api_key": {
            "type": "string"
          }
        },
        "required": [
          "api_key"
        ],
        "type": "object"
      },
      "server.scopedTokenResponse": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "scope_kind": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/server.fsTokenScopeRequest"
            },
            "type": "array"
          },
          "subject": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "token_id": {
            "type": "string"
          }
        },
        "required": [
          "token",
          "scope_kind",
          "scopes"
        ],
        "type": "object"
      },
      "server.tokenListItem": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expired": {
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "issued_at": {
            "format": "date-time",
            "type": "string"
          },
          "issued_by_metadata_json": {},
          "issued_by_provider": {
            "type": "string"
          },
          "issued_by_subject_key": {
            "type": "string"
          },
          "key_name": {
            "type": "string"
          },
          "revoked_at": {
            "format": "date-time",
            "type": "string"
          },
          "scope_kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "token_id": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "token_id",
          "tenant_id",
          "key_name",
          "scope_kind",
          "status",
          "expired",
          "issued_at",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "server.tokenListResponse": {
        "properties": {
          "next_offset": {
            "format": "int64",
            "type": "integer"
          },
          "tokens": {
            "items": {
              "$ref": "#/components/schemas/server.tokenListItem"
            },
            "type": "array"
          },
          "truncated_tenants": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "tokens"
        ],
        "type": "object"
      },
      "server.tokenStatusTransitionRequest": {
        "properties": {
          "private_key": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          }
        },
        "required": [
          "tenant_id",
          "public_key",
          "private_key"
        ],
        "type": "object"
      },
      "server.tokenStatusTransitionResponse": {
        "properties": {
          "status": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "token_id": {
            "type": "string"
          }
        },
        "required": [
          "token_id",
          "tenant_id",
          "status"
        ],
        "type": "object"
      },
      "server.uploadCompleteRequest": {
        "properties": {
          "checksum_sha256": {
            "type": "string"
          },
          "tags": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "vault.AuditEvent": {
        "properties": {
          "adapter": {
            "type": "string"
          },
          "agent_id": {
            "type": "string"
          },
          "detail": {},
          "event_id": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "field_name": {
            "type": "string"
          },
          "secret_name": {
            "type": "string"
          },
          "task_id": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "token_id": {
            "type": "string"
          }
        },
        "required": [
          "event_id",
          "tenant_id",
          "event_type",
          "timestamp"
        ],
        "type": "object"
      },
      "vault.Secret": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "deleted_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "secret_id": {
            "type": "string"
          },
          "secret_type": {
            "type": "string"
          },
          "tenant_id": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "secret_id",
          "tenant_id",
          "name",
          "secret_type",
          "revision",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "Drive9Key": {
        "bearerFormat": "drive9-api-key",
        "description": "drive9 API key. Send as `Authorization: Bearer \u003ckey\u003e` (the `X-API-Key` header is accepted as an alternative).",
        "scheme": "bearer",
        "type": "http"
      },
      "VaultCapability": {
        "bearerFormat": "vault-capability-token",
        "description": "Vault capability token (`vault_...` prefix) or delegated grant token (`vt_...` prefix).",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Filesystem, upload, journal, vault, git workspace and layer APIs. Authenticated with a drive9 API key (Authorization: Bearer \u003ckey\u003e; the X-API-Key header is accepted as an alternative). The /v1/vault/read endpoints instead use a vault capability token or delegated grant token.",
    "license": {
      "name": "Apache-2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Drive9 Data Plane API",
    "version": "1.0.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/v1/events": {
      "get": {
        "description": "Server-sent events (text/event-stream). Event types: file_changed (ChangeEvent JSON), reset ({seq, reason, path?, op?, actor?}), heartbeat (every 30s).",
        "operationId": "get-v1-events",
        "parameters": [
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {}
            },
            "description": "SSE stream."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "SSE change-notification stream"
      }
    },
    "/v1/fork": {
      "delete": {
        "operationId": "delete-v1-fork",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "private_key": {
                    "type": "string"
                  },
                  "public_key": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Optional public_key/private_key.",
          "required": false
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "status: deleting or deleted"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Delete the current fork tenant"
      },
      "post": {
        "operationId": "post-v1-fork",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.forkRequest"
              }
            }
          },
          "description": "Optional fork options; may be empty.",
          "required": false
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.forkResponse"
                }
              }
            },
            "description": "Fork accepted; provisioning is asynchronous."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Create an asynchronous fork of the current tenant"
      }
    },
    "/v1/fs/{path}": {
      "delete": {
        "description": "kind is file or dir for non-recursive deletes; recursive=1 removes a directory tree.",
        "operationId": "delete-v1-fs-by-path",
        "parameters": [
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "recursive",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Delete a file or directory"
      },
      "get": {
        "description": "Without query parameters the file bytes are returned (application/octet-stream; S3-backed files redirect with 302). With one action selector: stat=1 returns enriched JSON metadata, list=1 returns directory entries, grep=\u003cquery\u003e returns grep matches, find=1 returns matching nodes (name/tag/newer/older/minsize/maxsize/limit filters).",
        "operationId": "get-v1-fs-by-path",
        "parameters": [
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "find",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "grep",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "layer",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "list",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "maxsize",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "minsize",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "newer",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "older",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "stat",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/server.fsStatMetadataResponse"
                    },
                    {
                      "items": {
                        "$ref": "#/components/schemas/server.fsListResponseEntry"
                      },
                      "type": "array"
                    },
                    {
                      "items": {
                        "additionalProperties": {},
                        "type": "object"
                      },
                      "type": "array"
                    },
                    {
                      "items": {
                        "$ref": "#/components/schemas/datastore.SearchResult"
                      },
                      "type": "array"
                    }
                  ]
                }
              },
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "File bytes (plain GET) or JSON metadata for action selectors (stat=1 enriched stat, list=1 directory entries, grep=\u003cq\u003e matches, find=1 nodes)."
          },
          "302": {
            "description": "Redirect to the presigned object URL for S3-backed files."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Read a file or query filesystem metadata"
      },
      "head": {
        "description": "Returns X-Dat9-* headers (size, isdir, revision, mtime) with no body.",
        "operationId": "head-v1-fs-by-path",
        "parameters": [
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stat headers; no body."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Stat a file (header-only)"
      },
      "patch": {
        "operationId": "patch-v1-fs-by-path",
        "parameters": [
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "dirty_parts": {
                    "items": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "expected_revision": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "new_size": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "part_size": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "new_size",
                  "dirty_parts"
                ],
                "type": "object"
              }
            }
          },
          "description": "new_size, dirty_parts (1-based), optional part_size/expected_revision.",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backend.PatchPlan"
                }
              }
            },
            "description": "Patch upload plan with presigned part URLs."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Patch a large file (dirty parts)"
      },
      "post": {
        "description": "Exactly one action selector must be present. append-log requires Content-Length, X-Dat9-Expected-Revision, and X-Dat9-Expected-Size; its raw binary body is appended at the committed size and 200 returns {revision, size_bytes}. append requires body {append_size, part_size?, expected_revision?} and returns 202 with an append plan; chmod takes body {mode}; symlink takes body {target}; setmeta takes body {tags?, description?} and updates user tags and/or the description of an existing file without rewriting content (absent fields stay unchanged, an empty tags object clears user tags, an empty description clears it). copy requires the X-Dat9-Copy-Source header, rename requires X-Dat9-Rename-Source, hardlink requires X-Dat9-Hardlink-Source; mkdir accepts query mode; create/copy/rename/mkdir/hardlink return {status: ok}.",
        "operationId": "post-v1-fs-by-path",
        "parameters": [
          {
            "description": "Optional request header.",
            "in": "header",
            "name": "X-Dat9-Copy-Source",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required when append-log is selected; non-negative committed revision.",
            "in": "header",
            "name": "X-Dat9-Expected-Revision",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Required when append-log is selected; non-negative committed byte size.",
            "in": "header",
            "name": "X-Dat9-Expected-Size",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Optional request header.",
            "in": "header",
            "name": "X-Dat9-Hardlink-Source",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional request header.",
            "in": "header",
            "name": "X-Dat9-Rename-Source",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "append",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "append-log",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "chmod",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "copy",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "create",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "hardlink",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "mkdir",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "rename",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "setmeta",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "symlink",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "properties": {
                      "append_size": {
                        "format": "int64",
                        "type": "integer"
                      },
                      "expected_revision": {
                        "format": "int64",
                        "type": "integer"
                      },
                      "part_size": {
                        "format": "int64",
                        "type": "integer"
                      }
                    },
                    "required": [
                      "append_size"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "mode": {
                        "format": "int64",
                        "type": "integer"
                      }
                    },
                    "required": [
                      "mode"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "target": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "description": {
                        "type": "string"
                      },
                      "tags": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  }
                ]
              }
            },
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "description": "Action-specific JSON body; append-log uses raw binary bytes with an explicit Content-Length (zero is valid for creation). Bodyless actions remain supported.",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "properties": {
                        "status": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "revision": {
                          "format": "int64",
                          "type": "integer"
                        },
                        "size_bytes": {
                          "format": "int64",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "revision",
                        "size_bytes"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Action completed. append-log returns {revision, size_bytes}; other actions return {status, ...}."
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backend.AppendPlan"
                }
              }
            },
            "description": "Append upload plan (append=1)."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilesystemActionError"
                }
              }
            },
            "description": "Client error. See schema for error fields."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Filesystem action (append-log/append/copy/rename/mkdir/chmod/setmeta/create/symlink/hardlink)"
      },
      "put": {
        "description": "Writes the raw request body to the path. For large files (\u003e= inline threshold) the server returns 202 with an upload plan; send X-Dat9-Part-Checksums on those. Optional headers: X-Dat9-Expected-Revision, X-Dat9-Tag, X-Dat9-Content-Length, X-Dat9-Description.",
        "operationId": "put-v1-fs-by-path",
        "parameters": [
          {
            "description": "Optional request header.",
            "in": "header",
            "name": "X-Dat9-Content-Length",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional request header.",
            "in": "header",
            "name": "X-Dat9-Description",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional request header.",
            "in": "header",
            "name": "X-Dat9-Expected-Revision",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional request header.",
            "in": "header",
            "name": "X-Dat9-Part-Checksums",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional request header.",
            "in": "header",
            "name": "X-Dat9-Tag",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "description": "Raw file bytes.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "revision": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "revision"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Write committed. Body: {status, revision}."
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backend.UploadPlan"
                }
              }
            },
            "description": "Large-file upload initiated. Body: upload plan with presigned part URLs."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Write a file (raw body)"
      }
    },
    "/v1/fs:batch-read-small": {
      "post": {
        "operationId": "post-v1-fs-batch-read-small",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.batchReadSmallRequest"
              }
            }
          },
          "description": "paths and optional max_bytes cap.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.batchReadSmallResponse"
                }
              }
            },
            "description": "Per-path contents."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Read multiple small files in one request"
      }
    },
    "/v1/fs:batch-stat": {
      "post": {
        "operationId": "post-v1-fs-batch-stat",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.batchStatRequest"
              }
            }
          },
          "description": "paths to stat, optionally include_checksum.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.batchStatResponse"
                }
              }
            },
            "description": "Per-path results."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Stat multiple paths in one request"
      }
    },
    "/v1/fs:batch-write": {
      "post": {
        "operationId": "post-v1-fs-batch-write",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.batchWriteRequest"
              }
            }
          },
          "description": "items with path, expected_revision, data (base64).",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.batchWriteResponse"
                }
              }
            },
            "description": "Per-path results."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Write multiple files in one request"
      }
    },
    "/v1/git-workspaces": {
      "get": {
        "description": "With root_path returns a single workspace; without it returns the workspace list.",
        "operationId": "get-v1-git-workspaces",
        "parameters": [
          {
            "in": "query",
            "name": "root_path",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/server.gitWorkspaceResponse"
                    },
                    {
                      "properties": {
                        "workspaces": {
                          "items": {
                            "$ref": "#/components/schemas/server.gitWorkspaceResponse"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "workspaces"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Workspace list (no root_path) or a single workspace (root_path given)."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List git workspaces (or get one by root_path)"
      },
      "post": {
        "operationId": "post-v1-git-workspaces",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.gitWorkspaceRequest"
              }
            }
          },
          "description": "Workspace root, git url, refs.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitWorkspaceResponse"
                }
              }
            },
            "description": "Workspace state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Create or update a git workspace"
      }
    },
    "/v1/git-workspaces/{workspace_id}": {
      "delete": {
        "operationId": "delete-v1-git-workspaces-by-workspace_id",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Soft-delete a git workspace"
      },
      "get": {
        "operationId": "get-v1-git-workspaces-by-workspace_id",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitWorkspaceResponse"
                }
              }
            },
            "description": "Workspace state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Get a git workspace"
      }
    },
    "/v1/git-workspaces/{workspace_id}/git-state": {
      "get": {
        "operationId": "get-v1-git-workspaces-by-workspace_id-git-state",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitStateResponse"
                }
              }
            },
            "description": "Stored state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Get git workspace state"
      },
      "post": {
        "operationId": "post-v1-git-workspaces-by-workspace_id-git-state",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.gitStateRequest"
              }
            }
          },
          "description": "State payload (inline or storage reference).",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitStateResponse"
                }
              }
            },
            "description": "Stored state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upsert git workspace state"
      },
      "put": {
        "operationId": "put-v1-git-workspaces-by-workspace_id-git-state",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.gitStateRequest"
              }
            }
          },
          "description": "State payload (inline or storage reference).",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitStateResponse"
                }
              }
            },
            "description": "Stored state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upsert git workspace state (PUT alias)"
      }
    },
    "/v1/git-workspaces/{workspace_id}/object-packs": {
      "get": {
        "operationId": "get-v1-git-workspaces-by-workspace_id-object-packs",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "packs": {
                      "items": {
                        "$ref": "#/components/schemas/server.gitObjectPackResponse"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "packs"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Pack list without content."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List git object packs"
      },
      "post": {
        "operationId": "post-v1-git-workspaces-by-workspace_id-object-packs",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.gitObjectPackRequest"
              }
            }
          },
          "description": "Pack content or storage reference.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitObjectPackResponse"
                }
              }
            },
            "description": "Stored pack."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upload a git object pack"
      },
      "put": {
        "operationId": "put-v1-git-workspaces-by-workspace_id-object-packs",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.gitObjectPackRequest"
              }
            }
          },
          "description": "Pack content or storage reference.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitObjectPackResponse"
                }
              }
            },
            "description": "Stored pack."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upload a git object pack (PUT alias)"
      }
    },
    "/v1/git-workspaces/{workspace_id}/object-packs/{pack_id}": {
      "get": {
        "operationId": "get-v1-git-workspaces-by-workspace_id-object-packs-by-pack_id",
        "parameters": [
          {
            "in": "path",
            "name": "pack_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitObjectPackResponse"
                }
              }
            },
            "description": "Pack with content."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Get a git object pack"
      }
    },
    "/v1/git-workspaces/{workspace_id}/overlay": {
      "get": {
        "operationId": "get-v1-git-workspaces-by-workspace_id-overlay",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/server.gitOverlayEntryResponse"
                    },
                    {
                      "properties": {
                        "entries": {
                          "items": {
                            "$ref": "#/components/schemas/server.gitOverlayEntryResponse"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "entries"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Overlay entry list (no path) or a single overlay entry (path given)."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Get git overlay entries (or one by path)"
      },
      "post": {
        "operationId": "post-v1-git-workspaces-by-workspace_id-overlay",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.gitOverlayEntryRequest"
              }
            }
          },
          "description": "Overlay entry.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitOverlayEntryResponse"
                }
              }
            },
            "description": "Stored overlay entry."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upsert a git overlay entry"
      },
      "put": {
        "operationId": "put-v1-git-workspaces-by-workspace_id-overlay",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.gitOverlayEntryRequest"
              }
            }
          },
          "description": "Overlay entry.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.gitOverlayEntryResponse"
                }
              }
            },
            "description": "Stored overlay entry."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upsert a git overlay entry (PUT alias)"
      }
    },
    "/v1/git-workspaces/{workspace_id}/tree": {
      "get": {
        "operationId": "get-v1-git-workspaces-by-workspace_id-tree",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "commit_sha",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "nodes": {
                      "items": {
                        "$ref": "#/components/schemas/server.gitTreeNodeResponse"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "nodes"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Tree nodes."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List a commit's tree nodes"
      },
      "post": {
        "operationId": "post-v1-git-workspaces-by-workspace_id-tree",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.gitTreeReplaceRequest"
              }
            }
          },
          "description": "Commit and tree nodes.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "count": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status and replaced count."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Replace a commit's tree"
      }
    },
    "/v1/journal-entries": {
      "get": {
        "description": "Returns an NDJSON stream of SearchMatch objects (application/x-ndjson); the last line carries the next cursor.",
        "operationId": "get-v1-journal-entries",
        "parameters": [
          {
            "in": "query",
            "name": "actor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "entries",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "meta",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/journal.SearchMatch"
                  },
                  "type": "array"
                }
              }
            },
            "description": "NDJSON stream of search matches."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Search across journals"
      }
    },
    "/v1/journals": {
      "post": {
        "operationId": "post-v1-journals",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/journal.CreateRequest"
              }
            }
          },
          "description": "Journal metadata.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/journal.Journal"
                }
              }
            },
            "description": "Created journal."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Create an append-only journal"
      }
    },
    "/v1/journals/{journal_id}/entries": {
      "get": {
        "description": "Returns an NDJSON stream (application/x-ndjson), one Entry per line.",
        "operationId": "get-v1-journals-by-journal_id-entries",
        "parameters": [
          {
            "in": "path",
            "name": "journal_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "after_seq",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/journal.Entry"
                  },
                  "type": "array"
                }
              }
            },
            "description": "NDJSON stream of entries."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List journal entries"
      },
      "post": {
        "description": "Body is a JSON array of entries, a single entry, or an NDJSON stream (Content-Type application/x-ndjson). Requires the Idempotency-Key header.",
        "operationId": "post-v1-journals-by-journal_id-entries",
        "parameters": [
          {
            "description": "Required request header.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "journal_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "items": {
                  "$ref": "#/components/schemas/journal.EntryInput"
                },
                "type": "array"
              }
            }
          },
          "description": "Entries to append.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/journal.AppendResponse"
                }
              }
            },
            "description": "Append result."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Append entries to a journal"
      }
    },
    "/v1/journals/{journal_id}/verify": {
      "get": {
        "operationId": "get-v1-journals-by-journal_id-verify",
        "parameters": [
          {
            "in": "path",
            "name": "journal_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/journal.VerifyResult"
                }
              }
            },
            "description": "Verification result."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Verify a journal's hash chain"
      }
    },
    "/v1/layer-checkpoints/{checkpoint_id}": {
      "get": {
        "operationId": "get-v1-layer-checkpoints-by-checkpoint_id",
        "parameters": [
          {
            "in": "path",
            "name": "checkpoint_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerCheckpointResponse"
                }
              }
            },
            "description": "Checkpoint state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Get a layer checkpoint"
      }
    },
    "/v1/layers": {
      "get": {
        "operationId": "get-v1-layers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "layers": {
                      "items": {
                        "$ref": "#/components/schemas/server.fsLayerResponse"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "layers"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Layer list."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List FS layers visible to the scope"
      },
      "post": {
        "operationId": "post-v1-layers",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.fsLayerCreateRequest"
              }
            }
          },
          "description": "Layer name and options; layer_id may be omitted.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerResponse"
                }
              }
            },
            "description": "Created layer."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Create an FS layer"
      }
    },
    "/v1/layers/{layer_ref}": {
      "delete": {
        "operationId": "delete-v1-layers-by-layer_ref",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cascade",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "layer_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "layer_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status and layer_id."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Abandon an FS layer"
      },
      "get": {
        "operationId": "get-v1-layers-by-layer_ref",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerResponse"
                }
              }
            },
            "description": "Layer state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Get an FS layer"
      }
    },
    "/v1/layers/{layer_ref}/chain": {
      "get": {
        "operationId": "get-v1-layers-by-layer_ref-chain",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "chain": {
                      "items": {
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "chain"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Chain entries."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List the layer ancestry chain"
      }
    },
    "/v1/layers/{layer_ref}/checkpoints": {
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-checkpoints",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.fsLayerCheckpointRequest"
              }
            }
          },
          "description": "Checkpoint options.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerCheckpointResponse"
                }
              }
            },
            "description": "Created checkpoint."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Create a layer checkpoint"
      }
    },
    "/v1/layers/{layer_ref}/commit": {
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-commit",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerCommitResponse"
                }
              }
            },
            "description": "Committed (status=committed)."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerCommitResponse"
                }
              }
            },
            "description": "Conflicted (status=conflicted, conflicts listed)."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Apply layer changes to the live filesystem"
      }
    },
    "/v1/layers/{layer_ref}/diff": {
      "get": {
        "description": "mode=log (or replay=1) returns the raw event log instead of the merged view.",
        "operationId": "get-v1-layers-by-layer_ref-diff",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "max_seq",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "replay",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "entries": {
                      "items": {
                        "$ref": "#/components/schemas/server.fsLayerEntryResponse"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "entries"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Entries."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List layer entries (merged view or raw log)"
      }
    },
    "/v1/layers/{layer_ref}/entries": {
      "get": {
        "operationId": "get-v1-layers-by-layer_ref-entries",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "max_seq",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerEntryResponse"
                }
              }
            },
            "description": "Entry state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Get a layer entry"
      },
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-entries",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.fsLayerEntryRequest"
              }
            }
          },
          "description": "Entry action and payload.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerEntryResponse"
                }
              }
            },
            "description": "Entry state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upsert a layer entry"
      },
      "put": {
        "operationId": "put-v1-layers-by-layer_ref-entries",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.fsLayerEntryRequest"
              }
            }
          },
          "description": "Entry action and payload.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerEntryResponse"
                }
              }
            },
            "description": "Entry state."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upsert a layer entry (PUT alias)"
      }
    },
    "/v1/layers/{layer_ref}/events": {
      "get": {
        "operationId": "get-v1-layers-by-layer_ref-events",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "events": {
                      "items": {
                        "$ref": "#/components/schemas/server.fsLayerEventResponse"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "events"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Event list."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List layer events"
      }
    },
    "/v1/layers/{layer_ref}/fork": {
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-fork",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.fsLayerForkRequest"
              }
            }
          },
          "description": "Optional fork options.",
          "required": false
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerResponse"
                }
              }
            },
            "description": "Forked layer."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Fork a child layer"
      }
    },
    "/v1/layers/{layer_ref}/objects": {
      "get": {
        "description": "Returns raw bytes (application/octet-stream); S3-backed objects redirect (307) to a presigned URL.",
        "operationId": "get-v1-layers-by-layer_ref-objects",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "max_seq",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Object bytes."
          },
          "307": {
            "description": "Redirect to the presigned object URL for S3-backed objects."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Read a layer object's bytes"
      },
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-objects",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "base_revision",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "description": "Raw object bytes.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerEntryResponse"
                }
              }
            },
            "description": "Created entry."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upload a layer object (raw body)"
      },
      "put": {
        "operationId": "put-v1-layers-by-layer_ref-objects",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "base_revision",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "description": "Raw object bytes.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerEntryResponse"
                }
              }
            },
            "description": "Created entry."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Upload a layer object (PUT alias)"
      }
    },
    "/v1/layers/{layer_ref}/rollback": {
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-rollback",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Roll the layer overlay back to its base state"
      }
    },
    "/v1/layers/{layer_ref}/uploads/initiate": {
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-uploads-initiate",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.fsLayerUploadInitiateRequest"
              }
            }
          },
          "description": "Entry path and size.",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backend.UploadPlanV2"
                }
              }
            },
            "description": "V2 upload plan."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Initiate a layer object upload (V2 plan)"
      }
    },
    "/v1/layers/{layer_ref}/uploads/{upload_id}/abort": {
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-uploads-by-upload_id-abort",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Abort a layer upload"
      }
    },
    "/v1/layers/{layer_ref}/uploads/{upload_id}/complete": {
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-uploads-by-upload_id-complete",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.fsLayerUploadCompleteRequest"
              }
            }
          },
          "description": "Parts to complete and optional checksum.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.fsLayerEntryResponse"
                }
              }
            },
            "description": "Created entry."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Complete a layer upload"
      }
    },
    "/v1/layers/{layer_ref}/uploads/{upload_id}/presign": {
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-uploads-by-upload_id-presign",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "checksum": {
                    "$ref": "#/components/schemas/backend.PresignChecksum"
                  },
                  "part_number": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "part_number"
                ],
                "type": "object"
              }
            }
          },
          "description": "part_number and optional checksum.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/s3client.UploadPartURL"
                }
              }
            },
            "description": "Presigned part URL."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Presign a layer upload part"
      }
    },
    "/v1/layers/{layer_ref}/uploads/{upload_id}/presign-batch": {
      "post": {
        "operationId": "post-v1-layers-by-layer_ref-uploads-by-upload_id-presign-batch",
        "parameters": [
          {
            "in": "path",
            "name": "layer_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "parts": {
                    "items": {
                      "$ref": "#/components/schemas/backend.PresignPartEntry"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "parts"
                ],
                "type": "object"
              }
            }
          },
          "description": "List of parts.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "parts": {
                      "items": {
                        "$ref": "#/components/schemas/s3client.UploadPartURL"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "parts"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "List of presigned part URLs."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Presign a batch of layer upload parts"
      }
    },
    "/v1/migration/events": {
      "post": {
        "operationId": "post-v1-migration-events",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "cas_attempt": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "drive9_checksum_sha256": {
                    "type": "string"
                  },
                  "emitted_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "error_class": {
                    "type": "string"
                  },
                  "event_id": {
                    "type": "string"
                  },
                  "expected_revision": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "first_seen_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "grace_seconds": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "job_id": {
                    "type": "string"
                  },
                  "latency_ms": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "mtime": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "node_name": {
                    "type": "string"
                  },
                  "operation": {
                    "enum": [
                      "create",
                      "update"
                    ],
                    "type": "string"
                  },
                  "phase": {
                    "enum": [
                      "DUAL_WRITE_REPAIRING"
                    ],
                    "type": "string"
                  },
                  "pod_name": {
                    "type": "string"
                  },
                  "resource_id": {
                    "type": "string"
                  },
                  "result": {
                    "enum": [
                      "success",
                      "conflict",
                      "failure"
                    ],
                    "type": "string"
                  },
                  "revision": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "round_id": {
                    "type": "string"
                  },
                  "size": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "source_checksum_sha256": {
                    "type": "string"
                  },
                  "source_path": {
                    "type": "string"
                  },
                  "source_version_token": {
                    "type": "string"
                  },
                  "space_id": {
                    "type": "string"
                  },
                  "target_path": {
                    "type": "string"
                  },
                  "tenant_id": {
                    "type": "string"
                  },
                  "volume_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "event_id",
                  "emitted_at",
                  "phase",
                  "round_id",
                  "first_seen_at",
                  "job_id",
                  "volume_id",
                  "node_name",
                  "pod_name",
                  "space_id",
                  "source_path",
                  "target_path",
                  "source_version_token",
                  "source_checksum_sha256",
                  "resource_id",
                  "drive9_checksum_sha256",
                  "operation",
                  "result",
                  "error_class",
                  "cas_attempt",
                  "grace_seconds",
                  "size",
                  "mtime",
                  "revision",
                  "expected_revision",
                  "latency_ms"
                ],
                "type": "object"
              }
            }
          },
          "description": "Migration event payload with the exact field set described by the schema.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "Event accepted."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Ingest a migration CAS event"
      }
    },
    "/v1/object-credentials": {
      "post": {
        "operationId": "post-v1-object-credentials",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.objectCredentialsRequest"
              }
            }
          },
          "description": "Object URI and write flag.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.objectCredentialsResponse"
                }
              }
            },
            "description": "Scoped credentials (s3/cos/tos/oss/gs/az)."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Mint scoped object-storage credentials for a URI"
      }
    },
    "/v1/quota": {
      "get": {
        "description": "Tenant is selected by the tenant_id query parameter, falling back to the X-Drive9-Tenant-ID header. With a drive9 API key the tenant is implied by the key.",
        "operationId": "get-v1-quota",
        "parameters": [
          {
            "description": "Tenant id fallback when the tenant_id query parameter is absent.",
            "in": "header",
            "name": "X-Drive9-Tenant-ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.quotaResponse"
                }
              }
            },
            "description": "Quota configuration and current usage."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Query tenant quota configuration and usage"
      }
    },
    "/v1/sql": {
      "post": {
        "operationId": "post-v1-sql",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "query": {
                    "type": "string"
                  }
                },
                "required": [
                  "query"
                ],
                "type": "object"
              }
            }
          },
          "description": "SQL query to execute.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": {},
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Query result rows (objects keyed by column name)."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Execute a SQL statement against the tenant metadata database"
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "get-v1-status",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.TenantStatusResponse"
                }
              }
            },
            "description": "Tenant status, max upload bytes, inline threshold and migration capabilities."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Get the authenticated tenant's status and limits"
      }
    },
    "/v1/tenant": {
      "delete": {
        "operationId": "delete-v1-tenant",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "private_key": {
                    "type": "string"
                  },
                  "public_key": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Optional public_key/private_key (required for tidb_cloud_native tenants).",
          "required": false
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "status: deleting or deleted"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Delete the current tenant"
      }
    },
    "/v1/tokens": {
      "get": {
        "description": "With a drive9 key, lists the authenticated tenant's tokens (tenant_id must match when provided). With control-plane credentials, lists organization tokens; tenant_id selects one tenant, omit for org-wide listing.",
        "operationId": "get-v1-tokens",
        "parameters": [
          {
            "in": "query",
            "name": "include_expired",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.tokenListResponse"
                }
              }
            },
            "description": "Token list with pagination."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List API keys / tokens"
      },
      "post": {
        "operationId": "post-v1-tokens",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.issueScopedTokenRequest"
              }
            }
          },
          "description": "Token subject, TTL and FS scope rules.",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.scopedTokenResponse"
                }
              }
            },
            "description": "Issued scoped token."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Issue a scoped token for the authenticated tenant (owner drive9 key only)"
      }
    },
    "/v1/tokens/refresh": {
      "post": {
        "operationId": "post-v1-tokens-refresh",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.refreshTokenRequest"
              }
            }
          },
          "description": "Optional TTL override.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.refreshTokenResponse"
                }
              }
            },
            "description": "Rotated token."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Rotate the current drive9 bearer token"
      }
    },
    "/v1/tokens/revoke": {
      "post": {
        "operationId": "post-v1-tokens-revoke",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.revokeScopedTokenByAPIKeyRequest"
              }
            }
          },
          "description": "api_key to revoke.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Revoke a scoped token by its API key (drive9 owner key)"
      }
    },
    "/v1/tokens/{token_id}": {
      "delete": {
        "operationId": "delete-v1-tokens-by-token_id",
        "parameters": [
          {
            "in": "path",
            "name": "token_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Revoke a token by id (drive9 owner key)"
      }
    },
    "/v1/tokens/{token_id}/activate": {
      "post": {
        "operationId": "post-v1-tokens-by-token_id-activate",
        "parameters": [
          {
            "in": "path",
            "name": "token_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.tokenStatusTransitionRequest"
              }
            }
          },
          "description": "Optional credentials.",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.tokenStatusTransitionResponse"
                }
              }
            },
            "description": "New token status."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Activate a token (disabled → active)"
      }
    },
    "/v1/tokens/{token_id}/deactivate": {
      "post": {
        "operationId": "post-v1-tokens-by-token_id-deactivate",
        "parameters": [
          {
            "in": "path",
            "name": "token_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tenant_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.tokenStatusTransitionRequest"
              }
            }
          },
          "description": "Optional credentials.",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/server.tokenStatusTransitionResponse"
                }
              }
            },
            "description": "New token status."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Deactivate a token (active → disabled)"
      }
    },
    "/v1/uploads": {
      "get": {
        "description": "Lists upload sessions targeting the given path. status defaults to uploading.",
        "operationId": "get-v1-uploads",
        "parameters": [
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "uploads": {
                      "items": {
                        "properties": {
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "expires_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "parts_total": {
                            "format": "int64",
                            "type": "integer"
                          },
                          "path": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "total_size": {
                            "format": "int64",
                            "type": "integer"
                          },
                          "upload_id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "upload_id",
                          "path",
                          "total_size",
                          "parts_total",
                          "status",
                          "created_at",
                          "expires_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "uploads"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Upload session list."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List in-progress uploads at a path"
      },
      "post": {
        "operationId": "post-v1-uploads",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "expected_revision": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "part_checksums": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "path": {
                    "type": "string"
                  },
                  "total_size": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "path",
                  "total_size",
                  "part_checksums"
                ],
                "type": "object"
              }
            }
          },
          "description": "path, total_size, part_checksums (one per part), optional expected_revision/description.",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backend.UploadPlan"
                }
              }
            },
            "description": "Upload plan with presigned part URLs."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Initiate a V1 multipart upload (alias of /v1/uploads/initiate)"
      }
    },
    "/v1/uploads/initiate": {
      "post": {
        "operationId": "post-v1-uploads-initiate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "expected_revision": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "part_checksums": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "path": {
                    "type": "string"
                  },
                  "total_size": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "path",
                  "total_size",
                  "part_checksums"
                ],
                "type": "object"
              }
            }
          },
          "description": "path, total_size, part_checksums (one per part), optional expected_revision/description.",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backend.UploadPlan"
                }
              }
            },
            "description": "Upload plan with presigned part URLs."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Initiate a V1 multipart upload"
      }
    },
    "/v1/uploads/{upload_id}": {
      "delete": {
        "operationId": "delete-v1-uploads-by-upload_id",
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Abort a V1 multipart upload"
      }
    },
    "/v1/uploads/{upload_id}/complete": {
      "post": {
        "operationId": "post-v1-uploads-by-upload_id-complete",
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.uploadCompleteRequest"
              }
            }
          },
          "description": "Optional tags and whole-file checksum.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Complete a V1 multipart upload"
      }
    },
    "/v1/uploads/{upload_id}/resume": {
      "get": {
        "operationId": "get-v1-uploads-by-upload_id-resume",
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backend.UploadPlan"
                }
              }
            },
            "description": "Resumed upload plan."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Resume a V1 multipart upload (GET alias)"
      },
      "post": {
        "description": "Body is JSON {part_checksums: [...]} or a plain list of checksums (one per line) with text/plain content type.",
        "operationId": "post-v1-uploads-by-upload_id-resume",
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "part_checksums": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "part_checksums for remaining parts.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backend.UploadPlan"
                }
              }
            },
            "description": "Resumed upload plan."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Resume a V1 multipart upload"
      }
    },
    "/v1/vault/audit": {
      "get": {
        "operationId": "get-v1-vault-audit",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "secret",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "events": {
                      "items": {
                        "$ref": "#/components/schemas/vault.AuditEvent"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "events"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Audit events."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Query vault audit log"
      }
    },
    "/v1/vault/grants": {
      "post": {
        "operationId": "post-v1-vault-grants",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "agent": {
                    "type": "string"
                  },
                  "label_hint": {
                    "type": "string"
                  },
                  "perm": {
                    "type": "string"
                  },
                  "scope": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "ttl_seconds": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "agent",
                  "ttl_seconds"
                ],
                "type": "object"
              }
            }
          },
          "description": "agent, scope, perm, ttl_seconds, label_hint.",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "expires_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "grant_id": {
                      "type": "string"
                    },
                    "perm": {
                      "type": "string"
                    },
                    "scope": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "token",
                    "grant_id",
                    "expires_at",
                    "scope",
                    "perm"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Issued grant token."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Issue a delegated vault grant token"
      }
    },
    "/v1/vault/grants/{id}": {
      "delete": {
        "operationId": "delete-v1-vault-grants-by-id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "reason": {
                    "type": "string"
                  },
                  "revoked_by": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Optional revocation metadata.",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Revoke a vault grant"
      }
    },
    "/v1/vault/read": {
      "get": {
        "description": "Authenticated with a vault capability token (vault_ prefix) or delegated grant token (vt_ prefix).",
        "operationId": "get-v1-vault-read",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "secrets": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "secrets"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Visible secret names."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "security": [
          {
            "VaultCapability": []
          }
        ],
        "summary": "Enumerate vault secrets visible to a capability token"
      }
    },
    "/v1/vault/read/{name}": {
      "get": {
        "description": "Authenticated with a vault capability token (vault_ prefix) or delegated grant token (vt_ prefix). format=env returns text/plain KEY=value lines; otherwise JSON.",
        "operationId": "get-v1-vault-read-by-name",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "Plaintext field values."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "security": [
          {
            "VaultCapability": []
          }
        ],
        "summary": "Read plaintext vault secret fields with a capability token"
      }
    },
    "/v1/vault/read/{name}/{field}": {
      "get": {
        "description": "Authenticated with a vault capability token (vault_ prefix) or delegated grant token (vt_ prefix).",
        "operationId": "get-v1-vault-read-by-name-by-field",
        "parameters": [
          {
            "in": "path",
            "name": "field",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/plain": {}
            },
            "description": "Plaintext field bytes."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "security": [
          {
            "VaultCapability": []
          }
        ],
        "summary": "Read one plaintext vault secret field with a capability token"
      }
    },
    "/v1/vault/secrets": {
      "get": {
        "operationId": "get-v1-vault-secrets",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "secrets": {
                      "items": {
                        "$ref": "#/components/schemas/vault.Secret"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "secrets"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Secret metadata list."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "List vault secrets (metadata)"
      },
      "post": {
        "operationId": "post-v1-vault-secrets",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "created_by": {
                    "type": "string"
                  },
                  "fields": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "name": {
                    "type": "string"
                  },
                  "secret_type": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "fields"
                ],
                "type": "object"
              }
            }
          },
          "description": "name, secret_type, fields (plaintext at creation).",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/vault.Secret"
                }
              }
            },
            "description": "Created secret metadata."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Create a vault secret"
      }
    },
    "/v1/vault/secrets/{name}": {
      "delete": {
        "operationId": "delete-v1-vault-secrets-by-name",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Delete a vault secret"
      },
      "get": {
        "operationId": "get-v1-vault-secrets-by-name",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/vault.Secret"
                }
              }
            },
            "description": "Secret metadata (values masked)."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Get vault secret metadata"
      },
      "put": {
        "operationId": "put-v1-vault-secrets-by-name",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "fields": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "updated_by": {
                    "type": "string"
                  }
                },
                "required": [
                  "fields"
                ],
                "type": "object"
              }
            }
          },
          "description": "New field values (plaintext).",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/vault.Secret"
                }
              }
            },
            "description": "Updated secret metadata."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Rotate / update a vault secret's fields"
      }
    },
    "/v1/vault/secrets/{name}/value": {
      "get": {
        "description": "format=env returns text/plain KEY=value lines; otherwise JSON object of field name → value.",
        "operationId": "get-v1-vault-secrets-by-name-value",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                }
              }
            },
            "description": "Plaintext field values."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Read all plaintext secret fields (owner)"
      }
    },
    "/v1/vault/secrets/{name}/value/{field}": {
      "get": {
        "description": "Returns the raw field bytes as text/plain.",
        "operationId": "get-v1-vault-secrets-by-name-value-by-field",
        "parameters": [
          {
            "in": "path",
            "name": "field",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/plain": {}
            },
            "description": "Plaintext field bytes."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Read one plaintext secret field (owner)"
      }
    },
    "/v1/vault/tokens": {
      "post": {
        "operationId": "post-v1-vault-tokens",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "agent_id": {
                    "type": "string"
                  },
                  "scope": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "task_id": {
                    "type": "string"
                  },
                  "ttl_seconds": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "agent_id, task_id, scope, ttl_seconds.",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "expires_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "token": {
                      "type": "string"
                    },
                    "token_id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "token",
                    "token_id",
                    "expires_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Issued capability token."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Issue a legacy vault capability token"
      }
    },
    "/v1/vault/tokens/{id}": {
      "delete": {
        "operationId": "delete-v1-vault-tokens-by-id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "reason": {
                    "type": "string"
                  },
                  "revoked_by": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "Optional revocation metadata.",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Revoke a vault capability token"
      }
    },
    "/v2/uploads/initiate": {
      "post": {
        "operationId": "post-v2-uploads-initiate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "expected_revision": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "path": {
                    "type": "string"
                  },
                  "total_size": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "path",
                  "total_size"
                ],
                "type": "object"
              }
            }
          },
          "description": "path, total_size, optional expected_revision/description.",
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backend.UploadPlanV2"
                }
              }
            },
            "description": "V2 upload plan (no presigned URLs; use presign endpoints)."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Initiate a V2 multipart upload"
      }
    },
    "/v2/uploads/{upload_id}/abort": {
      "post": {
        "operationId": "post-v2-uploads-by-upload_id-abort",
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Abort a V2 multipart upload"
      }
    },
    "/v2/uploads/{upload_id}/complete": {
      "post": {
        "operationId": "post-v2-uploads-by-upload_id-complete",
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/server.uploadCompleteRequest"
              }
            }
          },
          "description": "Optional tags and whole-file checksum.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "status: ok"
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Complete a V2 multipart upload"
      }
    },
    "/v2/uploads/{upload_id}/presign": {
      "post": {
        "operationId": "post-v2-uploads-by-upload_id-presign",
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "checksum": {
                    "$ref": "#/components/schemas/backend.PresignChecksum"
                  },
                  "part_number": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "part_number"
                ],
                "type": "object"
              }
            }
          },
          "description": "part_number and optional checksum.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/s3client.UploadPartURL"
                }
              }
            },
            "description": "Presigned part URL."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Presign one upload part (V2)"
      }
    },
    "/v2/uploads/{upload_id}/presign-batch": {
      "post": {
        "operationId": "post-v2-uploads-by-upload_id-presign-batch",
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "parts": {
                    "items": {
                      "$ref": "#/components/schemas/backend.PresignPartEntry"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "parts"
                ],
                "type": "object"
              }
            }
          },
          "description": "List of parts to presign.",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "parts": {
                      "items": {
                        "$ref": "#/components/schemas/s3client.UploadPartURL"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "parts"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "List of presigned part URLs."
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Error. Body: {\"error\": string}."
          }
        },
        "summary": "Presign multiple upload parts (V2)"
      }
    }
  },
  "security": [
    {
      "Drive9Key": []
    }
  ]
}
