{
  "openapi": "3.1.0",
  "info": {
    "title": "wabe Disk HTTP API",
    "version": "0.1.0",
    "description": "Standalone wabe Disk API. Examples assume a server configured with a Bearer API key. Buffered writes acknowledge RAM publication; use flush to confirm persistence. No hosted service URL is preconfigured."
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Check the server",
        "tags": [
          "System"
        ],
        "responses": {
          "200": {
            "description": "ok followed by newline.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/files/{path}": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "path",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "description": "Virtual file path relative to root; may contain slash-separated components."
          }
        }
      ],
      "get": {
        "operationId": "readFile",
        "summary": "Read a file",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "Exact file bytes.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, query, name or source.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Requested file, parent or script was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "operationId": "writeFile",
        "summary": "Replace a file",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "Complete replacement published according to configured durability.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expected_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_revision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ]
      },
      "post": {
        "operationId": "appendFile",
        "summary": "Append streamed bytes to current EOF",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WriteResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expected_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_revision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeFile",
        "summary": "Remove file or empty directory",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "204": {
            "description": "Success."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/disks/{disk}/entries": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "get": {
        "operationId": "listEntries",
        "summary": "List direct directory children",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "Newline-delimited JSON records; consume or close the body to release the request lease.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "x-record-schema": "#/components/schemas/Entry"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, query, name or source.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Requested file, parent or script was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "/"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/disks/{disk}/exec": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "execute",
        "summary": "Execute shell or JavaScript",
        "tags": [
          "Execution"
        ],
        "responses": {
          "200": {
            "description": "Newline-delimited JSON records; consume or close the body to release the request lease.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "x-record-schema": "#/components/schemas/ExecutionRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, query, name or source.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Requested file, parent or script was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "description": "Select body, script or path as source. Source limit is 64 KiB. HTTP 200 starts the response; require a final exit record and inspect its code. Runtime failures are stderr/exit records. Default elapsed deadline is 30 seconds. JS runs as an async function body on Linux.",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "bash",
                "js"
              ],
              "default": "bash"
            }
          },
          {
            "name": "script",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "UTF-8 source as query text; the body becomes stdin."
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Stored virtual JS source path; requires kind=js. Body becomes stdin."
            }
          },
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            },
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/kv/{namespace}": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "namespace",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "keyValue",
        "summary": "Operate on a KV namespace",
        "tags": [
          "KV"
        ],
        "responses": {
          "200": {
            "description": "JSON response for get/exists/put/delete/batch, NDJSON entries for scan. Missing get returns found:false with HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KvResponse"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "x-record-schema": "#/components/schemas/KvEntry"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, query, name or source.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "KV size or request-body limit exceeded.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "KV body requires application/json.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "KV JSON shape or operation is unsupported.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "description": "Keys: 16 KiB; values: 1 MiB; encoded batches and JSON bodies: 8 MiB. Scan stays within the namespace and uses byte order with an exclusive after cursor sharing the prefix. TTL is unsupported. Mutations never trigger flush; optional remote mode waits for background/explicit persistence.",
        "requestBody": {
          "required": true,
          "x-max-body-bytes": 8388608,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KvRequest"
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/flush": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "flushDisk",
        "summary": "Confirm persistence of files and KV",
        "tags": [
          "Lifecycle"
        ],
        "responses": {
          "200": {
            "description": "Persistence barrier completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, query, name or source.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tables",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "description": "Also request SST table creation; does not compact or create a named checkpoint."
            }
          }
        ]
      }
    },
    "/v1/disks/{disk}/evict": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "evictDisk",
        "summary": "Persist and unload the local disk",
        "tags": [
          "Lifecycle"
        ],
        "responses": {
          "200": {
            "description": "Requests drained, persistence completed and local instance/caches retired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Success"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, query, name or source.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "description": "Stored data remains; later access reopens the disk. An unconsumed stream can delay eviction."
      }
    },
    "/v1/disks/{disk}/gc": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "collectFiles",
        "summary": "Collect unreachable filesystem data and obsolete Redis data",
        "description": "Without limit, complete filesystem collection and Redis cleanup. With limit, process one bounded filesystem step; Redis cleanup is skipped. Flush deletions before returning.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4096
            }
          }
        ],
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GcStats"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/config": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "put": {
        "operationId": "setChunkSize",
        "summary": "Set the chunk size for future file writes",
        "tags": [
          "Configuration"
        ],
        "responses": {
          "204": {
            "description": "Updated; empty body."
          },
          "400": {
            "description": "Invalid input, query, name or source.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "chunk_bytes",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 4096,
              "maximum": 4194304
            }
          }
        ]
      },
      "get": {
        "operationId": "getStorageConfig",
        "summary": "Read file storage settings",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageConfig"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "setStorageConfig",
        "summary": "Set all file storage settings",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "204": {
            "description": "Success."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageConfig"
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/redis/{namespace}": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "namespace",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "postRedisCommand",
        "summary": "Execute supported Redis commands",
        "tags": [
          "Redis"
        ],
        "responses": {
          "200": {
            "description": "Command result, or pipeline/multi result envelopes including per-command errors.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid command, arguments, request shape or encoding.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "wabe Disk request or response limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Storage failure.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid server Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RedisCommand"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RedisCommand"
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putRedisCommand",
        "summary": "Execute supported Redis commands",
        "tags": [
          "Redis"
        ],
        "responses": {
          "200": {
            "description": "Command result, or pipeline/multi result envelopes including per-command errors.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid command, arguments, request shape or encoding.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "wabe Disk request or response limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Storage failure.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid server Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RedisCommand"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RedisCommand"
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/redis/{namespace}/{command}": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "namespace",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "command",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Slash-separated URL-encoded command and arguments, or pipeline/multi-exec."
        }
      ],
      "get": {
        "operationId": "getRedisPath",
        "summary": "Execute supported Redis commands",
        "tags": [
          "Redis"
        ],
        "responses": {
          "200": {
            "description": "Command result, or pipeline/multi result envelopes including per-command errors.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid command, arguments, request shape or encoding.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "wabe Disk request or response limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Storage failure.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid server Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postRedisPath",
        "summary": "Execute supported Redis commands",
        "tags": [
          "Redis"
        ],
        "responses": {
          "200": {
            "description": "Command result, or pipeline/multi result envelopes including per-command errors.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid command, arguments, request shape or encoding.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "wabe Disk request or response limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Storage failure.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid server Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            },
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putRedisPath",
        "summary": "Execute supported Redis commands",
        "tags": [
          "Redis"
        ],
        "responses": {
          "200": {
            "description": "Command result, or pipeline/multi result envelopes including per-command errors.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid command, arguments, request shape or encoding.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "wabe Disk request or response limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Storage failure.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RedisReply"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RedisReply"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid server Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            },
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/notifications": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "get": {
        "operationId": "readNotifications",
        "summary": "Read retained changes or subscribe",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "sequence",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exclusive opaque cursor; omitted or 0 starts at retained history.",
            "required": false
          },
          {
            "name": "sse",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Replay retained history then stream live events with SSE.",
            "required": false
          },
          {
            "name": "include_value",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Deliver previously captured content in value_chunk records.",
            "required": false
          },
          {
            "name": "entity",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "file",
                "kv"
              ]
            },
            "description": "Restrict the resource kind.",
            "required": false
          },
          {
            "name": "file_prefix",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Literal normalized file-path prefix; cannot combine with namespace.",
            "required": false
          },
          {
            "name": "namespace",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exact KV namespace; cannot combine with file_prefix.",
            "required": false
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            },
            "description": "Finite GET only; maximum examined events, including filtered events.",
            "required": false
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Cursor fallback when sequence query is omitted."
          },
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Finite NDJSON records, or SSE replay followed by live records. Stream errors use a terminal error record.",
            "headers": {
              "X-Notification-Sequence": {
                "description": "Journal head at request start.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                },
                "x-record-schema": "#/components/schemas/NotificationRecord"
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "x-record-schema": "#/components/schemas/NotificationRecord",
                "description": "When sse=true; Last-Event-ID can supply the resume cursor."
              }
            }
          },
          "400": {
            "description": "Invalid settings, cursor or filters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationError"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "sequence_expired: reload state and resume from sequence=0.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationError"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationError"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "Notifications closed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "configureNotifications",
        "summary": "Update notification capture and retention",
        "tags": [
          "Notifications"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationUpdate",
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "retention": {
                    "type": "object",
                    "properties": {
                      "max_count": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 1
                      },
                      "max_bytes": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 1
                      }
                    },
                    "required": [],
                    "additionalProperties": false
                  },
                  "coalesce_window_ms": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 60000
                  },
                  "include_value": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated settings. A supplied retention object replaces the previous one; at least one positive limit is required while enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid settings, cursor or filters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationError"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationError"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "Notifications closed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/stat": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "get": {
        "operationId": "statFile",
        "summary": "Read object metadata",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Metadata"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/disks/{disk}/mkdir": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "makeDirectory",
        "summary": "Create directory",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "204": {
            "description": "Success."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recursive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ]
      }
    },
    "/v1/disks/{disk}/move": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "moveEntry",
        "summary": "Move to exact destination",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "204": {
            "description": "Success."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/branches": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "get": {
        "operationId": "listBranches",
        "summary": "List branches",
        "description": "List the filesystem branches on a disk. Use a branch name in the branch query parameter to select it for file or execution requests.",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "One JSON record per branch, separated by newlines.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                },
                "x-record-schema": "#/components/schemas/BranchInfo",
                "example": "{\"id\":\"8ec08f61-c6b4-4f3a-83e9-d46ae3e5bc30\",\"name\":\"main\",\"root_directory_id\":\"7c8fd44b-019f-4a0c-94bf-627a04d5d07f\",\"revision\":0,\"base_commit\":null,\"head_commit\":null}\n"
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createBranch",
        "summary": "Create independently writable branch",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BranchInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "from": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "name",
                  "from"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteBranch",
        "summary": "Delete a nondefault branch",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "204": {
            "description": "Success."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/disks/{disk}/commits": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "get": {
        "operationId": "listCommits",
        "summary": "List retained workspace commits",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                },
                "x-record-schema": "#/components/schemas/CommitInfo"
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "createCommit",
        "summary": "Seal selected branch and create a commit",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommitInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "maxLength": 8192,
                    "default": ""
                  },
                  "label": {
                    "type": "string"
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/commits/{commit}": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "commit",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "delete": {
        "operationId": "deleteCommit",
        "summary": "Delete an unreferenced commit",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "204": {
            "description": "Success."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/history": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "get": {
        "operationId": "fileHistory",
        "summary": "List file versions newest first",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                },
                "x-record-schema": "#/components/schemas/VersionInfo"
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/disks/{disk}/versions/{version}": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "version",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "operationId": "readFileVersion",
        "summary": "Read sealed file version",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/restore": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "restoreFile",
        "summary": "Restore shared content as a new file state",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Metadata"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expected_version": {
                    "$ref": "#/components/schemas/VersionMatch"
                  }
                },
                "required": [
                  "path",
                  "version"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/disks/{disk}/labels": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "get": {
        "operationId": "listLabels",
        "summary": "List explicit pins",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                },
                "x-record-schema": "#/components/schemas/LabelInfo"
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "pinState",
        "summary": "Pin a file, directory view or commit",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "branch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "path"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "commit": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "name",
                      "commit"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteLabel",
        "summary": "Remove a pin",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "204": {
            "description": "Success."
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/disks/{disk}/label-content": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "get": {
        "operationId": "readFileLabel",
        "summary": "Read pinned file bytes",
        "tags": [
          "Versioned filesystem"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or incorrect Bearer key.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Historical filesystem view is read-only.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Object was not found.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Conflict, nonempty destination or referenced object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Storage, I/O or corruption failure.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/disks/{disk}/git/{path}": {
      "get": {
        "summary": "Git ref advertisement",
        "parameters": [
          {
            "name": "disk",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "info/refs"
              ]
            }
          },
          {
            "name": "service",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "git-upload-pack",
                "git-receive-pack"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Git protocol response"
          },
          "400": {
            "description": "Unsupported operation"
          },
          "409": {
            "description": "Branch conflict"
          }
        }
      },
      "post": {
        "summary": "Git smart HTTP RPC",
        "parameters": [
          {
            "name": "disk",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "git-upload-pack",
                "git-receive-pack"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Git protocol response"
          },
          "400": {
            "description": "Unsupported operation"
          },
          "409": {
            "description": "Branch conflict"
          }
        }
      }
    },
    "/v1/disks/{disk}/sqlite/{database}/hrana/v3/pipeline": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "database",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "hranaPipeline",
        "summary": "Execute a Hrana JSON v3 pipeline",
        "tags": [
          "SQL"
        ],
        "description": "SDK base /v1/disks/{disk}/sqlite/{database}/hrana/. Named databases are independent within a disk. Bearer authentication is required on every continuation. Transaction TTL defaults to 60 seconds, idle sessions outside a transaction to 30 seconds. The previous custom SQL and libsql URI routes are disabled. Protobuf, WebSocket and replication are outside this profile.",
        "requestBody": {
          "required": true,
          "x-max-body-bytes": 4194304,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HranaPipelineRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Protocol results; statement errors can occur inside HTTP 200. SQL COMMIT acknowledges buffered state without an object-store flush. Cursor EOF alone does not commit an open transaction.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HranaPipelineResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid names or protocol request."
          },
          "401": {
            "description": "Missing or incorrect Bearer key."
          },
          "403": {
            "description": "SQL security policy rejected an operation."
          },
          "404": {
            "description": "Invalid, expired, wrong-scope or retired-session baton."
          },
          "408": {
            "description": "SQL execution/admission/backpressure deadline expired."
          },
          "413": {
            "description": "Request or configured resource limit exceeded."
          },
          "503": {
            "description": "SQL execution unavailable or storage failure."
          }
        }
      }
    },
    "/v1/disks/{disk}/sqlite/{database}/hrana/v3/cursor": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "database",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "hranaCursor",
        "summary": "Execute a Hrana JSON v3 cursor",
        "tags": [
          "SQL"
        ],
        "description": "SDK base /v1/disks/{disk}/sqlite/{database}/hrana/. Named databases are independent within a disk. Bearer authentication is required on every continuation. Transaction TTL defaults to 60 seconds, idle sessions outside a transaction to 30 seconds. The previous custom SQL and libsql URI routes are disabled. Protobuf, WebSocket and replication are outside this profile.",
        "requestBody": {
          "required": true,
          "x-max-body-bytes": 4194304,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HranaCursorRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Protocol results; statement errors can occur inside HTTP 200. SQL COMMIT acknowledges buffered state without an object-store flush. Cursor EOF alone does not commit an open transaction.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "x-record-schema": "#/components/schemas/HranaCursorRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid names or protocol request."
          },
          "401": {
            "description": "Missing or incorrect Bearer key."
          },
          "403": {
            "description": "SQL security policy rejected an operation."
          },
          "404": {
            "description": "Invalid, expired, wrong-scope or retired-session baton."
          },
          "408": {
            "description": "SQL execution/admission/backpressure deadline expired."
          },
          "413": {
            "description": "Request or configured resource limit exceeded."
          },
          "503": {
            "description": "SQL execution unavailable or storage failure."
          }
        }
      }
    },
    "/v1/disks/{disk}/turso/{database}/v3/pipeline": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "database",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "tursoPipeline",
        "summary": "Experimental Rust Turso pipeline",
        "tags": [
          "SQL"
        ],
        "description": "Experimental API, available only when built with experimental-turso. Uses the JSON v3 protocol with the Rust Turso engine and SlateDB storage. SQLite remains the default engine; its endpoints and wabesql are unchanged.",
        "requestBody": {
          "required": true,
          "x-max-body-bytes": 4194304,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HranaPipelineRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Protocol results; statement errors can occur inside HTTP 200. SQL COMMIT acknowledges buffered state without an object-store flush. Cursor EOF alone does not commit an open transaction.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HranaPipelineResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid names or protocol request."
          },
          "401": {
            "description": "Missing or incorrect Bearer key."
          },
          "403": {
            "description": "SQL security policy rejected an operation."
          },
          "404": {
            "description": "Invalid, expired, wrong-scope or retired-session baton."
          },
          "408": {
            "description": "SQL execution/admission/backpressure deadline expired."
          },
          "413": {
            "description": "Request or configured resource limit exceeded."
          },
          "503": {
            "description": "SQL execution unavailable or storage failure."
          }
        },
        "x-requires-feature": "experimental-turso"
      }
    },
    "/v1/disks/{disk}/turso/{database}/v3/cursor": {
      "parameters": [
        {
          "name": "disk",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        },
        {
          "name": "database",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,128}$"
          }
        }
      ],
      "post": {
        "operationId": "tursoCursor",
        "summary": "Experimental Rust Turso cursor",
        "tags": [
          "SQL"
        ],
        "description": "Experimental API, available only when built with experimental-turso. Uses the JSON v3 protocol with the Rust Turso engine and SlateDB storage. SQLite remains the default engine; its endpoints and wabesql are unchanged.",
        "requestBody": {
          "required": true,
          "x-max-body-bytes": 4194304,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HranaCursorRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Protocol results; statement errors can occur inside HTTP 200. SQL COMMIT acknowledges buffered state without an object-store flush. Cursor EOF alone does not commit an open transaction.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string",
                  "x-record-schema": "#/components/schemas/HranaCursorRecord"
                }
              }
            }
          },
          "400": {
            "description": "Invalid names or protocol request."
          },
          "401": {
            "description": "Missing or incorrect Bearer key."
          },
          "403": {
            "description": "SQL security policy rejected an operation."
          },
          "404": {
            "description": "Invalid, expired, wrong-scope or retired-session baton."
          },
          "408": {
            "description": "SQL execution/admission/backpressure deadline expired."
          },
          "413": {
            "description": "Request or configured resource limit exceeded."
          },
          "503": {
            "description": "SQL execution unavailable or storage failure."
          }
        },
        "x-requires-feature": "experimental-turso"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Full-access server key configured with WABE_DISK_API_KEY."
      }
    },
    "schemas": {
      "Key": {
        "oneOf": [
          {
            "type": "string",
            "maxLength": 16384,
            "description": "UTF-8 key, at most 16 KiB of encoded bytes. Empty is allowed."
          },
          {
            "type": "object",
            "properties": {
              "base64": {
                "type": "string",
                "contentEncoding": "base64",
                "maxLength": 21848
              }
            },
            "required": [
              "base64"
            ],
            "additionalProperties": false
          }
        ],
        "description": "At most 16384 decoded bytes; string and binary encodings of identical bytes identify the same key.",
        "x-max-decoded-bytes": 16384
      },
      "Value": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "text"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "json"
              },
              "value": {}
            },
            "required": [
              "type",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "bytes"
              },
              "value": {
                "type": "string",
                "contentEncoding": "base64",
                "maxLength": 1398104
              }
            },
            "required": [
              "type",
              "value"
            ],
            "additionalProperties": false
          }
        ],
        "description": "At most 1048576 stored UTF-8/decoded payload bytes, excluding the storage type header.",
        "x-max-stored-bytes": 1048576
      },
      "Mutation": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "put"
              },
              "key": {
                "$ref": "#/components/schemas/Key"
              },
              "value": {
                "$ref": "#/components/schemas/Value"
              }
            },
            "required": [
              "op",
              "key",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "delete"
              },
              "key": {
                "$ref": "#/components/schemas/Key"
              }
            },
            "required": [
              "op",
              "key"
            ],
            "additionalProperties": false
          }
        ]
      },
      "KvRequest": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "get"
              },
              "key": {
                "$ref": "#/components/schemas/Key"
              }
            },
            "required": [
              "op",
              "key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "exists"
              },
              "key": {
                "$ref": "#/components/schemas/Key"
              }
            },
            "required": [
              "op",
              "key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "delete"
              },
              "key": {
                "$ref": "#/components/schemas/Key"
              }
            },
            "required": [
              "op",
              "key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "put"
              },
              "key": {
                "$ref": "#/components/schemas/Key"
              },
              "value": {
                "$ref": "#/components/schemas/Value"
              }
            },
            "required": [
              "op",
              "key",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "batch"
              },
              "operations": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Mutation"
                }
              }
            },
            "required": [
              "op",
              "operations"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "const": "scan"
              },
              "prefix": {
                "$ref": "#/components/schemas/Key"
              },
              "after": {
                "$ref": "#/components/schemas/Key"
              },
              "limit": {
                "type": "integer",
                "minimum": 0
              },
              "reverse": {
                "type": "boolean",
                "default": false
              }
            },
            "required": [
              "op"
            ],
            "additionalProperties": false
          }
        ],
        "discriminator": {
          "propertyName": "op"
        }
      },
      "KvEntry": {
        "type": "object",
        "properties": {
          "key": {
            "$ref": "#/components/schemas/Key"
          },
          "value": {
            "$ref": "#/components/schemas/Value"
          },
          "revision": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Opaque decimal sequence string."
          }
        },
        "required": [
          "key",
          "value",
          "revision"
        ],
        "additionalProperties": false
      },
      "Success": {
        "type": "object",
        "properties": {
          "success": {
            "const": true
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "Metadata": {
        "type": "object",
        "properties": {
          "version": {
            "const": 2
          },
          "kind": {
            "oneOf": [
              {
                "const": "Directory"
              },
              {
                "type": "object",
                "properties": {
                  "File": {
                    "type": "object",
                    "properties": {
                      "size": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "chunk_bytes": {
                        "type": "integer",
                        "minimum": 4096,
                        "maximum": 4194304
                      },
                      "content_root": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "pattern": "^[0-9a-f]{64}$"
                      }
                    },
                    "required": [
                      "content_root",
                      "size",
                      "chunk_bytes"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "File"
                ],
                "additionalProperties": false
              }
            ]
          },
          "object_id": {
            "type": "string",
            "format": "uuid"
          },
          "version_id": {
            "type": "string",
            "format": "uuid"
          },
          "branch_id": {
            "type": "string",
            "format": "uuid",
            "description": "Origin of the version; inherited or imported versions may refer to an internal or deleted branch absent from the branch list."
          },
          "revision": {
            "type": "integer",
            "minimum": 0
          },
          "first_edit_at_ms": {
            "type": "integer",
            "minimum": 0
          },
          "last_edit_at_ms": {
            "type": "integer",
            "minimum": 0
          },
          "mode": {
            "type": "integer",
            "enum": [
              16384,
              33188,
              33261,
              40960
            ]
          }
        },
        "required": [
          "version",
          "kind",
          "object_id",
          "version_id",
          "branch_id",
          "revision",
          "first_edit_at_ms",
          "last_edit_at_ms",
          "mode"
        ],
        "additionalProperties": false
      },
      "Entry": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        },
        "required": [
          "path",
          "metadata"
        ],
        "additionalProperties": false
      },
      "ExecutionRecord": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "stdout",
                  "stderr"
                ]
              },
              "data": {
                "type": "string",
                "contentEncoding": "base64"
              }
            },
            "required": [
              "type",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "result"
              },
              "value": {}
            },
            "required": [
              "type",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "exit"
              },
              "code": {
                "type": "integer"
              }
            },
            "required": [
              "type",
              "code"
            ],
            "additionalProperties": false
          }
        ]
      },
      "KvResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Success"
          },
          {
            "type": "object",
            "properties": {
              "exists": {
                "type": "boolean"
              }
            },
            "required": [
              "exists"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "found": {
                "const": false
              }
            },
            "required": [
              "found"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "found": {
                "const": true
              },
              "entry": {
                "$ref": "#/components/schemas/KvEntry"
              }
            },
            "required": [
              "found",
              "entry"
            ],
            "additionalProperties": false
          }
        ]
      },
      "RedisCommand": {
        "type": "array",
        "minItems": 1,
        "items": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "description": "Redis command name followed by positional arguments."
      },
      "RedisReply": {
        "type": "object",
        "properties": {
          "result": {},
          "error": {
            "type": "string"
          }
        },
        "description": "One result or error envelope. Pipeline/multi return an array of these."
      },
      "NotificationSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "retention": {
            "type": "object",
            "properties": {
              "max_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1
              },
              "max_bytes": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1
              }
            },
            "additionalProperties": false,
            "required": []
          },
          "coalesce_window_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 60000
          },
          "include_value": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "retention",
          "coalesce_window_ms",
          "include_value"
        ],
        "additionalProperties": false
      },
      "NotificationUpdate": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "retention": {
            "type": "object",
            "properties": {
              "max_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1
              },
              "max_bytes": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1
              }
            },
            "additionalProperties": false
          },
          "coalesce_window_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 60000
          },
          "include_value": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "NotificationError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "NotificationRecord": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "enum": [
              "notification",
              "checkpoint",
              "value_chunk",
              "value_end",
              "error"
            ]
          }
        },
        "description": "NDJSON or SSE data record. Notifications carry sequence, entity (file/kv), operation, revision, resource metadata and value_available. Checkpoints carry sequence. Value chunks carry sequence, offset and base64; value_end carries sequence and bytes. Errors carry code and message. See docs/wabe_Disk_Notifications.md for delivery and acknowledgement rules."
      },
      "VersionMatch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "revision"
        ],
        "additionalProperties": false
      },
      "WriteResult": {
        "type": "object",
        "properties": {
          "bytes": {
            "type": "integer",
            "minimum": 0
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        },
        "required": [
          "bytes",
          "metadata"
        ],
        "additionalProperties": false
      },
      "StorageConfig": {
        "type": "object",
        "properties": {
          "chunk_bytes": {
            "type": "integer",
            "minimum": 4096,
            "maximum": 4194304
          },
          "autosave_interval_ms": {
            "type": "integer",
            "minimum": 0
          },
          "history_retention_ms": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          }
        },
        "required": [
          "chunk_bytes",
          "autosave_interval_ms",
          "history_retention_ms"
        ],
        "additionalProperties": false
      },
      "BranchInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "root_directory_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "minimum": 0
          },
          "base_commit": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "head_commit": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "id",
          "name",
          "root_directory_id",
          "revision",
          "base_commit",
          "head_commit"
        ],
        "additionalProperties": false
      },
      "CommitInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "branch_id": {
            "type": "string",
            "format": "uuid"
          },
          "root_directory_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "minimum": 0
          },
          "base_commit": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "parent_commit": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at_ms": {
            "type": "integer",
            "minimum": 0
          },
          "message": {
            "type": "string"
          },
          "git_oid": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_commits": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "branch_id",
          "root_directory_id",
          "revision",
          "base_commit",
          "parent_commit",
          "created_at_ms",
          "message",
          "git_oid",
          "parent_commits"
        ],
        "additionalProperties": false
      },
      "VersionInfo": {
        "type": "object",
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "sealed": {
            "type": "boolean"
          }
        },
        "required": [
          "metadata",
          "sealed"
        ],
        "additionalProperties": false
      },
      "LabelInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "target": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "const": "commit"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "kind",
                  "id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "const": "object"
                  },
                  "version": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "directory": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "version",
                  "directory"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "name",
          "target"
        ],
        "additionalProperties": false
      },
      "GcStats": {
        "type": "object",
        "properties": {
          "reclaimed_bytes": {
            "type": "integer",
            "description": "Filesystem blob payload bytes tombstoned, plus removed Redis collection payload bytes during full collection.",
            "minimum": 0
          },
          "removed_blobs": {
            "type": "integer",
            "minimum": 0
          },
          "removed_nodes": {
            "type": "integer",
            "minimum": 0
          },
          "removed_versions": {
            "type": "integer",
            "minimum": 0
          },
          "examined_entries": {
            "type": "integer",
            "minimum": 0
          },
          "batches": {
            "type": "integer",
            "minimum": 0
          },
          "removed_index_entries": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "reclaimed_bytes",
          "removed_blobs",
          "removed_nodes",
          "removed_versions",
          "examined_entries",
          "batches",
          "removed_index_entries"
        ],
        "additionalProperties": false
      },
      "HranaPipelineRequest": {
        "type": "object",
        "required": [
          "requests"
        ],
        "properties": {
          "baton": {
            "type": [
              "string",
              "null"
            ],
            "description": "Omit or use null for a new session. Pass the latest baton to continue; the SDK rotates tokens. A cursor header baton becomes usable only after body EOF."
          },
          "requests": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "execute",
                    "batch",
                    "sequence",
                    "describe",
                    "get_autocommit",
                    "store_sql",
                    "close_sql",
                    "close"
                  ]
                }
              },
              "description": "Operation payload follows the Hrana JSON v3 profile; execute has stmt, batch has batch.steps, SQL-cache operations use sql_id and SQL text."
            }
          }
        }
      },
      "HranaCursorRequest": {
        "type": "object",
        "required": [
          "batch"
        ],
        "properties": {
          "baton": {
            "type": [
              "string",
              "null"
            ],
            "description": "Omit or use null for a new session. Pass the latest baton to continue; the SDK rotates tokens. A cursor header baton becomes usable only after body EOF."
          },
          "batch": {
            "type": "object",
            "required": [
              "steps"
            ],
            "properties": {
              "steps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "stmt"
                  ],
                  "properties": {
                    "stmt": {
                      "type": "object",
                      "description": "One sql or sql_id, typed args or named_args, and optional want_rows (default true)."
                    },
                    "condition": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "Hrana ok/error/not/and/or/is_autocommit condition; step references point to earlier steps."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "HranaPipelineResponse": {
        "type": "object",
        "required": [
          "baton",
          "base_url",
          "results"
        ],
        "properties": {
          "baton": {
            "type": [
              "string",
              "null"
            ],
            "description": "Omit or use null for a new session. Pass the latest baton to continue; the SDK rotates tokens. A cursor header baton becomes usable only after body EOF."
          },
          "base_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type"
              ],
              "properties": {
                "type": {
                  "enum": [
                    "ok",
                    "error"
                  ]
                },
                "response": {
                  "type": "object",
                  "description": "Successful operation result, including typed statement values or batch step results/errors."
                },
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "extended_code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "HranaCursorRecord": {
        "type": "object",
        "description": "One NDJSON record: session header (baton/base_url), then Hrana step_begin, row, step_end, step_error or fatal error records. The response is bounded and must be consumed or closed; abandonment closes the session and rolls back an open transaction."
      }
    }
  }
}
