{
  "openapi": "3.2.1",
  "info": {
    "title": "knowledge API",
    "version": "0.3.0-beta.3",
    "description": "Local Open Knowledge Format folder ingestion, SQLite hybrid/graph retrieval and optional RAG. Bearer authentication is required on every data route. TLS 1.3 and encrypted storage are the secure defaults. Beta evidence APIs provide immutable citations, publication consistency, scoped access and durable changes. MCP adapters use an external OpenAPI gateway. Federation v1 provides scoped signed Shares, live Mounts and encrypted replicas. An external MCP gateway uses the same caller authority."
  },
  "servers": [
    {
      "url": "https://localhost:8443"
    }
  ],
  "externalDocs": {
    "description": "Open Knowledge Format v0.2 specification",
    "url": "https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/main/SPEC.md"
  },
  "x-knowledge-format": {
    "name": "Open Knowledge Format",
    "version": "0.2",
    "source": "folder of Markdown files with YAML frontmatter and referenced assets",
    "extensions": [
      "processing.chunking",
      "relations"
    ]
  },
  "security": [
    {
      "bearerAuth": []
    },
    {
      "oauthAccess": []
    },
    {
      "dpop": []
    }
  ],
  "tags": [
    {
      "name": "knowledge"
    },
    {
      "name": "administration"
    }
  ],
  "paths": {
    "/healthz": {
      "get": {
        "operationId": "health",
        "description": "Authenticated readiness check.",
        "tags": [
          "knowledge"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "openapi",
        "description": "Authenticated OpenAPI 3.2.1 description. This route also requires a bearer token.",
        "tags": [
          "knowledge"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/bundle": {
      "get": {
        "operationId": "bundle",
        "description": "Indexed files from the configured Open Knowledge Format folder. API requests cannot select a root folder or arbitrary URL.",
        "tags": [
          "knowledge"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "status",
        "description": "Index/job counters; internal error details are redacted.",
        "tags": [
          "knowledge"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/search": {
      "post": {
        "operationId": "search",
        "description": "Search chunks from the OKF folder using lexical, vector or hybrid retrieval.",
        "tags": [
          "knowledge"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/context": {
      "post": {
        "operationId": "context",
        "description": "Build bounded source context and citation mappings.",
        "tags": [
          "knowledge"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Context"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContextRequest"
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/ask": {
      "post": {
        "operationId": "ask",
        "description": "Generate an answer from retrieved context. Citation-ID checking does not prove factual entailment.",
        "tags": [
          "knowledge"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Answer"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContextRequest"
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/documents": {
      "get": {
        "operationId": "document",
        "description": "Return parsed source metadata and derived chunks; internal processing configuration is removed.",
        "tags": [
          "knowledge"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            },
            "description": "Relative OKF file path, e.g. systems/air-quality.md. Parent traversal is rejected."
          }
        ],
        "deprecated": true
      }
    },
    "/v1/graph": {
      "get": {
        "operationId": "graph",
        "description": "Read the graph derived from OKF links, source references, application relations and validated model output.",
        "tags": [
          "knowledge"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Graph"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          },
          {
            "name": "hops",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "maximum": 4
            }
          }
        ],
        "deprecated": true
      }
    },
    "/v1/admin/reconcile": {
      "post": {
        "operationId": "reconcile",
        "description": "Admin only. Reconcile the configured OKF folder and queue changes. Worker processing runs when server.watch is enabled.",
        "tags": [
          "administration"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/v1/admin/retry": {
      "post": {
        "operationId": "retry",
        "description": "Admin only. Requeue failed processing jobs.",
        "tags": [
          "administration"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetryReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/v1/files": {
      "get": {
        "operationId": "readSourceFile",
        "description": "Read original OKF source, SHA-256 and optional base64 asset bytes. Requires a read or admin token.",
        "tags": [
          "source reading"
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceFile"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include_data",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "deprecated": true
      }
    },
    "/v1/captures": {
      "get": {
        "operationId": "inspectCapture",
        "description": "Read a knowledge-managed capture snapshot and its current tree hash.",
        "tags": [
          "source reading"
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaptureSnapshot"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "directory",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": true
      }
    },
    "/v1/admin/pages": {
      "post": {
        "operationId": "writePage",
        "description": "Write valid OKF Markdown/YAML atomically; requires server.allow_source_writes and an admin token. Existing files require expected_sha256.",
        "tags": [
          "source authoring"
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          },
          "202": {
            "description": "Source committed; indexing may be pending.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutationReceipt"
                }
              }
            }
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageInput"
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/admin/assets": {
      "post": {
        "operationId": "writeAsset",
        "description": "Upload supported media/document bytes with a separate max_upload_bytes limit; source writes must be enabled. Decoding/indexing is asynchronous.",
        "tags": [
          "source authoring"
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          },
          "202": {
            "description": "Source committed; indexing may be pending.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutationReceipt"
                }
              }
            }
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssetInput"
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/admin/files": {
      "delete": {
        "operationId": "deleteFile",
        "description": "Delete one supported regular source file. Root index.md cannot be deleted. Indexed/history retention rules apply.",
        "tags": [
          "source authoring"
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          },
          "202": {
            "description": "Source committed; indexing may be pending.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutationReceipt"
                }
              }
            }
          }
        },
        "x-required-role": "admin",
        "parameters": [
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expected_sha256",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$"
            }
          }
        ],
        "deprecated": true
      }
    },
    "/v1/admin/capture": {
      "post": {
        "operationId": "capturePage",
        "description": "Archive an allowed static UTF-8 HTML page plus optional permitted src/poster media into a new OKF folder. URL fetching and source writes must both be enabled.",
        "tags": [
          "source authoring"
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          },
          "202": {
            "description": "Source committed; indexing may be pending.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutationReceipt"
                }
              }
            }
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureInput"
              }
            }
          }
        },
        "deprecated": true
      },
      "delete": {
        "operationId": "deleteCapture",
        "description": "Delete a knowledge-managed capture and its content/assets using a current checked tree hash. Unsupported, hidden or symlinked additions are refused.",
        "tags": [
          "source authoring"
        ],
        "responses": {
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          },
          "202": {
            "description": "Source committed; indexing may be pending.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MutationReceipt"
                }
              }
            }
          }
        },
        "x-required-role": "admin",
        "parameters": [
          {
            "in": "query",
            "name": "directory",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expected_sha256",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$"
            }
          }
        ],
        "deprecated": true
      }
    },
    "/v1/capabilities": {
      "get": {
        "operationId": "capabilities",
        "tags": [
          "beta-knowledge"
        ],
        "description": "capabilities",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/retrieve": {
      "post": {
        "operationId": "retrieve_evidence",
        "tags": [
          "beta-knowledge"
        ],
        "description": "retrieve evidence",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Retrieval"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Query"
              }
            }
          }
        }
      }
    },
    "/v1/context/build": {
      "post": {
        "operationId": "build_context",
        "tags": [
          "beta-knowledge"
        ],
        "description": "build context",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceContext"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContextQuery"
              }
            }
          }
        }
      }
    },
    "/v1/evidence/{id}": {
      "get": {
        "operationId": "get_evidence",
        "tags": [
          "beta-knowledge"
        ],
        "description": "get evidence",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Evidence"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/select": {
      "post": {
        "operationId": "select_resources",
        "tags": [
          "beta-knowledge"
        ],
        "description": "select resources",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectQuery"
              }
            }
          }
        }
      }
    },
    "/v1/changes": {
      "post": {
        "operationId": "submit_changes",
        "tags": [
          "beta-knowledge"
        ],
        "description": "submit changes",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Changes"
              }
            }
          }
        }
      }
    },
    "/v1/operations/{id}": {
      "get": {
        "operationId": "get_operation",
        "tags": [
          "beta-knowledge"
        ],
        "description": "get operation",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/operations/{id}/resume": {
      "post": {
        "operationId": "resume_operation",
        "tags": [
          "beta-knowledge"
        ],
        "description": "resume operation",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "read_events",
        "tags": [
          "beta-knowledge"
        ],
        "description": "read events",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          }
        ]
      }
    },
    "/v1/admin/resolutions": {
      "post": {
        "operationId": "resolve_identity",
        "tags": [
          "beta-knowledge"
        ],
        "description": "resolve identity",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolutionResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolutionInput"
              }
            }
          }
        }
      }
    },
    "/v1/admin/diagnostics": {
      "get": {
        "operationId": "diagnostics",
        "tags": [
          "beta-knowledge"
        ],
        "description": "diagnostics",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Diagnostics"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/admin/rebuild": {
      "post": {
        "operationId": "rebuild_projections",
        "tags": [
          "beta-knowledge"
        ],
        "description": "rebuild projections",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RebuildReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/admin/retention": {
      "post": {
        "operationId": "retain_history",
        "tags": [
          "beta-knowledge"
        ],
        "description": "retain history",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetentionInput"
              }
            }
          }
        }
      }
    },
    "/v1/resources/{id}": {
      "get": {
        "operationId": "read_resource",
        "tags": [
          "beta-knowledge"
        ],
        "description": "Stream retained source bytes. Authorization precedes ETag handling. A single byte range is supported.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Range",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Source bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              }
            }
          },
          "206": {
            "description": "Byte range"
          },
          "304": {
            "description": "Unchanged"
          },
          "416": {
            "description": "Invalid range"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/media/{id}": {
      "get": {
        "operationId": "read_evidence_media",
        "tags": [
          "beta-knowledge"
        ],
        "description": "Read the retained decoder sample or original media associated with an authorized evidence ID.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Range",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Source bytes",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              }
            }
          },
          "206": {
            "description": "Byte range"
          },
          "304": {
            "description": "Unchanged"
          },
          "416": {
            "description": "Invalid range"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/admin/gc": {
      "post": {
        "operationId": "garbage_collect",
        "tags": [
          "beta-knowledge"
        ],
        "description": "garbage collect",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GcReport"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GcInput"
              }
            }
          }
        }
      }
    },
    "/v1/admin/consolidation/run": {
      "post": {
        "operationId": "run_consolidation",
        "tags": [
          "beta-knowledge"
        ],
        "description": "run consolidation; requires whole-bundle admin authority. Long analysis can outlive the HTTP deadline; poll the proposal list.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsolidationRunResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/admin/consolidation/proposals": {
      "get": {
        "operationId": "list_consolidation_proposals",
        "tags": [
          "beta-knowledge"
        ],
        "description": "list consolidation proposals; requires whole-bundle admin authority.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsolidationProposals"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/admin/consolidation/proposals/{id}": {
      "get": {
        "operationId": "get_consolidation_proposal",
        "tags": [
          "beta-knowledge"
        ],
        "description": "get consolidation proposal; requires whole-bundle admin authority.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsolidationProposal"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/admin/consolidation/proposals/{id}/review": {
      "post": {
        "operationId": "review_consolidation_proposal",
        "tags": [
          "beta-knowledge"
        ],
        "description": "review consolidation proposal; requires whole-bundle admin authority.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsolidationProposal"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsolidationReview"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/admin/consolidation/proposals/{id}/promote": {
      "post": {
        "operationId": "promote_consolidation_proposal",
        "tags": [
          "beta-knowledge"
        ],
        "description": "promote consolidation proposal; requires whole-bundle admin authority.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsolidationProposal"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsolidationPromotion"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/admin/indexing/resources": {
      "get": {
        "operationId": "indexing_resources",
        "tags": [
          "beta-knowledge"
        ],
        "description": "indexing resources; requires whole-bundle admin authority.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexingResources"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/admin/indexing/pause": {
      "post": {
        "operationId": "pause_indexing",
        "tags": [
          "beta-knowledge"
        ],
        "description": "pause indexing; requires whole-bundle admin authority.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IndexingResources"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "405": {
            "$ref": "#/components/responses/405"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "421": {
            "$ref": "#/components/responses/421"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndexingPause"
              }
            }
          }
        }
      }
    },
    "/.well-known/knowledge": {
      "get": {
        "operationId": "federation_identity",
        "tags": [
          "federation"
        ],
        "description": "Discover publisher identity. Verify the key out of band before enrollment.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationIdentity"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "operationId": "oauth_resource_metadata",
        "tags": [
          "federation"
        ],
        "description": "Discover enrolled authorization servers for this protected resource.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthResourceMetadata"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "security": []
      }
    },
    "/v1/federation/shares/{share}/retrieve": {
      "post": {
        "operationId": "retrieve_share",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/ShareRetrieval"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Query"
              }
            }
          }
        }
      }
    },
    "/v1/federation/shares/{share}/select": {
      "post": {
        "operationId": "select_share",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/ShareCatalog"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectQuery"
              }
            }
          }
        }
      }
    },
    "/v1/federation/shares/{share}/lease": {
      "get": {
        "operationId": "get_share_lease",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/FederationReceipt"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/federation/shares/{share}/snapshot": {
      "get": {
        "operationId": "get_share_snapshot",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/FederationView"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/federation/shares/{share}/manifest": {
      "get": {
        "operationId": "get_share_manifest",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/FederationManifest"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/federation/shares/{share}/items": {
      "post": {
        "operationId": "get_share_items",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/FederationExportItems"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederationViewItems"
              }
            }
          }
        }
      }
    },
    "/v1/federation/shares/{share}/export": {
      "get": {
        "operationId": "export_share_view",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/FederationView"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/federation/shares/{share}/history": {
      "get": {
        "operationId": "get_share_history",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/ShareHistory"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ]
      }
    },
    "/v1/federation/shares/{share}/evidence/{id}": {
      "get": {
        "operationId": "resolve_share_evidence",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/ShareEvidence"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ]
      }
    },
    "/v1/federation/shares/{share}/changes": {
      "get": {
        "operationId": "get_share_changes",
        "tags": [
          "federation"
        ],
        "description": "Current grant required. The reply is signed by the enrolled publisher.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationReply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "x-knowledge-signed-payload": {
          "$ref": "#/components/schemas/ShareChangePage"
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/v1/federation/shares/{share}/assets/{id}": {
      "get": {
        "operationId": "read_share_asset",
        "tags": [
          "federation"
        ],
        "description": "Read an approved asset range. Original bytes require separate permission.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          },
          "206": {
            "description": "Authorized byte range",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              }
            }
          },
          "416": {
            "description": "Range is unsatisfiable"
          },
          "304": {
            "description": "Unchanged; authorization already checked"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "oauthAccess": []
          },
          {
            "dpop": []
          },
          {
            "peerCertificate": []
          },
          {
            "oauthAccess": [],
            "peerCertificate": []
          }
        ],
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "Range",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/federation/retrieve": {
      "post": {
        "operationId": "retrieve_federated",
        "tags": [
          "federation"
        ],
        "description": "Resolve only authorized local sources and enrolled mounts.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederatedRetrieval"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederatedQuery"
              }
            }
          }
        }
      }
    },
    "/v1/federation/context": {
      "post": {
        "operationId": "build_federated_context",
        "tags": [
          "federation"
        ],
        "description": "Resolve only authorized local sources and enrolled mounts.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederatedContext"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederatedContextQuery"
              }
            }
          }
        }
      }
    },
    "/v1/federation/evidence": {
      "post": {
        "operationId": "resolve_federated_evidence",
        "tags": [
          "federation"
        ],
        "description": "Resolve only authorized local sources and enrolled mounts.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvidenceHit"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederationEvidenceQuery"
              }
            }
          }
        }
      }
    },
    "/v1/federation/asset": {
      "post": {
        "operationId": "read_federated_asset",
        "tags": [
          "federation"
        ],
        "description": "Read up to 1 MiB from an authorized mounted asset.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          },
          "206": {
            "description": "Authorized byte range",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              }
            }
          },
          "416": {
            "description": "Range is unsatisfiable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederationAssetQuery"
              }
            }
          }
        }
      }
    },
    "/v1/federation/derivations/{workspace}/{id}": {
      "get": {
        "operationId": "read_federated_derivation",
        "tags": [
          "federation"
        ],
        "description": "Read an approved digest only while every original parent is still authorized.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationDerivation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ]
      }
    },
    "/v1/admin/federation/shares/{share}": {
      "put": {
        "operationId": "update_federation_share",
        "tags": [
          "federation"
        ],
        "description": "Requires whole-bundle admin. Setting enabled/active false revokes the object.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationPolicyUpdate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "share",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederationShare"
              }
            }
          }
        }
      }
    },
    "/v1/admin/federation/grants/{id}": {
      "put": {
        "operationId": "update_federation_grant",
        "tags": [
          "federation"
        ],
        "description": "Requires whole-bundle admin. Setting enabled/active false revokes the object.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationPolicyUpdate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederationGrant"
              }
            }
          }
        }
      }
    },
    "/v1/admin/federation/bridges/{id}": {
      "put": {
        "operationId": "update_federation_bridge",
        "tags": [
          "federation"
        ],
        "description": "Requires whole-bundle admin. Setting enabled/active false revokes the object.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationPolicyUpdate"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederationBridge"
              }
            }
          }
        }
      }
    },
    "/v1/admin/federation/policies": {
      "get": {
        "operationId": "list_federation_policies",
        "tags": [
          "federation"
        ],
        "description": "Inspect Share and grant policy epochs as whole-bundle admin.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationPolicies"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/admin/federation/status": {
      "get": {
        "operationId": "federation_status",
        "tags": [
          "federation"
        ],
        "description": "Inspect received, authorized and serving replica revisions.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        }
      }
    },
    "/v1/admin/federation/mounts/{name}/stage": {
      "post": {
        "operationId": "stage_federation_mount",
        "tags": [
          "federation"
        ],
        "description": "Requires whole-bundle admin. A staged view is not yet searchable.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationSyncResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/admin/federation/mounts/{name}/publish": {
      "post": {
        "operationId": "publish_federation_mount",
        "tags": [
          "federation"
        ],
        "description": "Requires whole-bundle admin. A staged view is not yet searchable.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationSyncResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/admin/federation/mounts/{name}/sync": {
      "post": {
        "operationId": "sync_federation_mount",
        "tags": [
          "federation"
        ],
        "description": "Requires whole-bundle admin. A staged view is not yet searchable.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationSyncResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/admin/federation/derive": {
      "post": {
        "operationId": "derive_federated",
        "tags": [
          "federation"
        ],
        "description": "Propose a digest from currently authorized evidence. Uses configured indexing budgets.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationDerivation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederationDerivationRequest"
              }
            }
          }
        }
      }
    },
    "/v1/admin/federation/derivations/{workspace}/{id}/review": {
      "post": {
        "operationId": "review_federated_derivation",
        "tags": [
          "federation"
        ],
        "description": "Review the exact output hash; approval rechecks all parents.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationDerivationReview"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsolidationReview"
              }
            }
          }
        }
      }
    },
    "/v1/admin/federation/derivations/{workspace}/{id}/reshare/{recipient}": {
      "post": {
        "operationId": "reshare_federated_derivation",
        "tags": [
          "federation"
        ],
        "description": "Independent copy for a named publisher allowed by every origin.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationDerivation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409"
          },
          "413": {
            "$ref": "#/components/responses/413"
          },
          "422": {
            "$ref": "#/components/responses/422"
          },
          "429": {
            "$ref": "#/components/responses/429"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "502": {
            "$ref": "#/components/responses/502"
          },
          "504": {
            "$ref": "#/components/responses/504"
          }
        },
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "recipient",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "64 hexadecimal characters; separate read/admin token files",
        "description": "Configured static read/admin or scoped principal token. Tokens are never accepted in query strings."
      },
      "oauthAccess": {
        "type": "http",
        "scheme": "bearer",
        "description": "Access token for this resource from an enrolled issuer. OIDC ID tokens are rejected."
      },
      "peerCertificate": {
        "type": "mutualTLS",
        "description": "A verified client certificate paired to a Share principal. Certificate-bound OAuth can require both mechanisms."
      },
      "dpop": {
        "type": "http",
        "scheme": "DPoP",
        "description": "Authorization: DPoP plus a per-request DPoP proof header, bound to the token, method and resource URI."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "SearchRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32000,
            "description": "Actual limit is server-configured; default 8000 Unicode characters."
          },
          "mode": {
            "type": "string",
            "enum": [
              "lexical",
              "vector",
              "hybrid"
            ],
            "default": "hybrid"
          },
          "limit": {
            "type": "integer",
            "default": 5,
            "minimum": 1,
            "maximum": 50
          },
          "graph_hops": {
            "type": "integer",
            "default": 1,
            "minimum": 0,
            "maximum": 4
          },
          "rerank": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "none",
              "coverage",
              "mmr",
              "http",
              null
            ]
          },
          "representation": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "pattern": "^[a-zA-Z0-9_]+$"
          },
          "vector_backend": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "float32",
              "turboquant",
              null
            ],
            "description": "Optional experimental compressed candidate backend; requires a configured complete compressed index."
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      },
      "ContextRequest": {
        "type": "object",
        "properties": {
          "search": {
            "$ref": "#/components/schemas/SearchRequest"
          },
          "max_chars": {
            "type": "integer",
            "default": 12000,
            "minimum": 1,
            "maximum": 128000,
            "description": "Also bounded by configured max_context_chars; default server maximum is 16000."
          }
        },
        "required": [
          "search"
        ],
        "additionalProperties": false
      },
      "Hit": {
        "type": "object",
        "properties": {
          "chunk_id": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "representation": {
            "type": "string"
          },
          "start": {
            "type": "integer"
          },
          "end": {
            "type": "integer"
          },
          "text": {
            "type": "string"
          },
          "locator": {
            "type": "object",
            "additionalProperties": true
          },
          "score": {
            "type": "number"
          },
          "matched_by": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stale": {
            "type": "boolean"
          },
          "score_details": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "chunk_id",
          "version_id",
          "path",
          "title",
          "representation",
          "start",
          "end",
          "text",
          "locator",
          "score",
          "matched_by",
          "stale",
          "score_details"
        ],
        "additionalProperties": false
      },
      "Node": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "label"
        ],
        "additionalProperties": false
      },
      "Edge": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "predicate": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "evidence": {},
          "chunk_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "source",
          "target",
          "predicate",
          "origin",
          "evidence",
          "chunk_id"
        ],
        "additionalProperties": false
      },
      "Graph": {
        "type": "object",
        "properties": {
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Node"
            }
          },
          "edges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Edge"
            }
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "nodes",
          "edges",
          "truncated"
        ],
        "additionalProperties": false
      },
      "SearchResult": {
        "type": "object",
        "properties": {
          "hits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Hit"
            }
          },
          "graph_context": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Hit"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "timings_ms": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "rerank_before": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "graph": {
            "$ref": "#/components/schemas/Graph"
          },
          "publication_id": {
            "type": "integer"
          },
          "publication_key": {
            "type": "string"
          }
        },
        "required": [
          "hits",
          "graph_context",
          "warnings",
          "timings_ms",
          "rerank_before",
          "graph",
          "publication_id",
          "publication_key"
        ],
        "additionalProperties": false
      },
      "Context": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "citations": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "text",
          "citations",
          "warnings"
        ],
        "additionalProperties": false
      },
      "Answer": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string"
          },
          "context": {
            "$ref": "#/components/schemas/Context"
          }
        },
        "required": [
          "answer",
          "context"
        ],
        "additionalProperties": false
      },
      "Health": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ready"
          },
          "database_encrypted": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "database_encrypted"
        ],
        "additionalProperties": false
      },
      "ScanReport": {
        "type": "object",
        "properties": {
          "discovered": {
            "type": "integer"
          },
          "queued": {
            "type": "integer"
          },
          "removed": {
            "type": "integer"
          },
          "unchanged": {
            "type": "integer"
          }
        },
        "required": [
          "discovered",
          "queued",
          "removed",
          "unchanged"
        ],
        "additionalProperties": false
      },
      "RetryReport": {
        "type": "object",
        "properties": {
          "requeued": {
            "type": "integer"
          }
        },
        "required": [
          "requeued"
        ],
        "additionalProperties": false
      },
      "Document": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "chunks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "representation": {
                  "type": "string"
                },
                "locator": {
                  "type": "object",
                  "additionalProperties": true
                },
                "annotation": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "additionalProperties": true
                }
              },
              "required": [
                "id",
                "text",
                "representation",
                "locator",
                "annotation"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "path",
          "title",
          "metadata",
          "summary",
          "warnings",
          "chunks"
        ],
        "additionalProperties": false
      },
      "Status": {
        "type": "object",
        "properties": {
          "files": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "jobs": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "chunks": {
            "type": "integer"
          },
          "edges": {
            "type": "integer"
          },
          "cached_artifacts": {
            "type": "integer"
          },
          "sqlite": {
            "type": "string"
          },
          "sqlite_vec": {
            "type": "string"
          },
          "error_count": {
            "type": "integer"
          }
        },
        "required": [
          "files",
          "jobs",
          "chunks",
          "edges",
          "cached_artifacts",
          "sqlite",
          "sqlite_vec",
          "error_count"
        ],
        "additionalProperties": false
      },
      "Bundle": {
        "type": "object",
        "properties": {
          "format": {
            "const": "open_knowledge_format"
          },
          "spec_version": {
            "const": "0.2"
          },
          "reader": {
            "type": "string",
            "enum": [
              "best_effort",
              "strict_frontmatter"
            ]
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "concept_id": {
                  "type": "string"
                }
              },
              "required": [
                "path",
                "state",
                "concept_id"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "format",
          "spec_version",
          "reader",
          "files"
        ],
        "additionalProperties": false
      },
      "PageInput": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Portable bundle-relative .md path."
          },
          "content": {
            "type": "string",
            "description": "Markdown body without frontmatter; index/log constraints apply."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Authored OKF frontmatter. Ordinary concepts default type to Note; reserved index/log rules differ."
          },
          "expected_sha256": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required to update an existing file; omit when creating."
          }
        },
        "required": [
          "path",
          "content"
        ],
        "additionalProperties": false
      },
      "AssetInput": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "data_base64": {
            "type": "string",
            "contentEncoding": "base64"
          },
          "mime_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "expected_sha256": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "path",
          "data_base64"
        ],
        "additionalProperties": false
      },
      "CaptureInput": {
        "type": "object",
        "properties": {
          "directory": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 512
          },
          "include_assets": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "directory",
          "url"
        ],
        "additionalProperties": false
      },
      "MutationReceipt": {
        "type": "object",
        "properties": {
          "source_saved": {
            "type": "boolean"
          },
          "mutation": {
            "type": "object",
            "additionalProperties": true
          },
          "indexing": {
            "enum": [
              "queued",
              "scan_failed"
            ]
          },
          "scan": {
            "$ref": "#/components/schemas/ScanReport"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "source_saved",
          "mutation",
          "indexing"
        ],
        "additionalProperties": false
      },
      "SourceFile": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{64}$"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "data_base64": {
            "type": "string",
            "contentEncoding": "base64"
          }
        },
        "required": [
          "path",
          "sha256",
          "bytes",
          "kind"
        ],
        "additionalProperties": false
      },
      "CaptureSnapshot": {
        "type": "object",
        "properties": {
          "directory": {
            "type": "string"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{64}$"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "bytes": {
                  "type": "integer",
                  "minimum": 0
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-fA-F]{64}$"
                }
              },
              "required": [
                "path",
                "bytes",
                "sha256"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "directory",
          "sha256",
          "files"
        ],
        "additionalProperties": false
      },
      "Evidence": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          },
          "source_sha256": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "representation": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "description": "UTF-8 byte offset within the indexed representation; use the locator for the original file/page/time."
          },
          "end": {
            "type": "integer",
            "description": "Exclusive UTF-8 byte offset within the indexed representation."
          },
          "text": {
            "type": "string"
          },
          "locator": {},
          "annotation": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "recipe_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "path",
          "version_id",
          "source_sha256",
          "title",
          "representation",
          "start",
          "end",
          "text",
          "locator",
          "annotation",
          "recipe_id"
        ],
        "additionalProperties": false
      },
      "EvidenceHit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          },
          "source_sha256": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "representation": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "description": "UTF-8 byte offset within the indexed representation; use the locator for the original file/page/time."
          },
          "end": {
            "type": "integer",
            "description": "Exclusive UTF-8 byte offset within the indexed representation."
          },
          "text": {
            "type": "string"
          },
          "locator": {},
          "annotation": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "recipe_id": {
            "type": "string"
          },
          "uri": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "matched_by": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "score_details": {},
          "index_stale": {
            "type": "boolean"
          },
          "content_freshness": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "path",
          "version_id",
          "source_sha256",
          "title",
          "representation",
          "start",
          "end",
          "text",
          "locator",
          "annotation",
          "recipe_id",
          "uri",
          "score",
          "matched_by",
          "score_details",
          "index_stale",
          "content_freshness"
        ],
        "additionalProperties": false
      },
      "Filters": {
        "type": "object",
        "properties": {
          "path_prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "representations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "exclude_stale": {
            "type": "boolean"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Query": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "lexical",
              "vector",
              "hybrid"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "publication_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "publication_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "after_operation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "filters": {
            "$ref": "#/components/schemas/Filters"
          },
          "graph_hops": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4
          },
          "predicates": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outgoing_only": {
            "type": "boolean"
          },
          "rerank": {
            "anyOf": [
              {
                "enum": [
                  "none",
                  "coverage",
                  "mmr",
                  "http"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "strict": {
            "type": "boolean"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Retrieval": {
        "type": "object",
        "properties": {
          "publication_id": {
            "type": "integer"
          },
          "publication_key": {
            "type": "string"
          },
          "hits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvidenceHit"
            }
          },
          "graph_context": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvidenceHit"
            }
          },
          "assertions": {
            "type": "array",
            "items": {}
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "trace": {}
        },
        "required": [
          "publication_id",
          "publication_key",
          "hits",
          "graph_context",
          "assertions",
          "warnings",
          "channels",
          "trace"
        ],
        "additionalProperties": false
      },
      "ContextOptions": {
        "type": "object",
        "properties": {
          "max_tokens": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000
          },
          "max_per_source": {
            "type": "integer",
            "minimum": 1
          },
          "modalities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "neighbors": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "ContextQuery": {
        "type": "object",
        "properties": {
          "search": {
            "$ref": "#/components/schemas/Query"
          },
          "context": {
            "$ref": "#/components/schemas/ContextOptions"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "EvidenceContext": {
        "type": "object",
        "properties": {
          "publication_id": {
            "type": "integer"
          },
          "publication_key": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "citations": {
            "type": "array",
            "items": {}
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvidenceHit"
            }
          },
          "used_tokens": {
            "type": "integer"
          },
          "token_accounting": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assertions": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "publication_id",
          "publication_key",
          "text",
          "citations",
          "media",
          "used_tokens",
          "token_accounting",
          "warnings",
          "channels",
          "assertions"
        ],
        "additionalProperties": false
      },
      "Operation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "state": {
            "enum": [
              "applying",
              "conflict",
              "scan_failed",
              "indexing",
              "index_failed",
              "superseded",
              "published"
            ]
          },
          "progress": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {}
          },
          "publication_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "publication_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "state",
          "progress",
          "total",
          "results",
          "publication_id",
          "publication_key",
          "error"
        ],
        "additionalProperties": false
      },
      "Change": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "Portable bundle-relative .md path."
              },
              "content": {
                "type": "string",
                "description": "Markdown body without frontmatter; index/log constraints apply."
              },
              "metadata": {
                "type": "object",
                "additionalProperties": true,
                "description": "Authored OKF frontmatter. Ordinary concepts default type to Note; reserved index/log rules differ."
              },
              "expected_sha256": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Required to update an existing file; omit when creating."
              },
              "kind": {
                "const": "page"
              }
            },
            "required": [
              "path",
              "content",
              "kind"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "data_base64": {
                "type": "string",
                "contentEncoding": "base64"
              },
              "mime_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_sha256": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kind": {
                "const": "asset"
              }
            },
            "required": [
              "path",
              "data_base64",
              "kind"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "directory": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512
              },
              "include_assets": {
                "type": "boolean",
                "default": false
              },
              "kind": {
                "const": "capture"
              }
            },
            "required": [
              "directory",
              "url",
              "kind"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "const": "remove"
              },
              "path": {
                "type": "string"
              },
              "expected_sha256": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "path",
              "expected_sha256"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "const": "move"
              },
              "path": {
                "type": "string"
              },
              "destination": {
                "type": "string"
              },
              "expected_sha256": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "path",
              "destination",
              "expected_sha256"
            ],
            "additionalProperties": false
          }
        ]
      },
      "Changes": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "changes": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Change"
            }
          }
        },
        "required": [
          "idempotency_key",
          "changes"
        ],
        "additionalProperties": false
      },
      "SelectQuery": {
        "type": "object",
        "properties": {
          "publication_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "publication_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "filters": {
            "$ref": "#/components/schemas/Filters"
          },
          "after": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Event": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {},
          "created_at": {
            "type": "integer"
          }
        },
        "required": [
          "cursor",
          "kind",
          "path",
          "body",
          "created_at"
        ],
        "additionalProperties": false
      },
      "EventPage": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "next_cursor": {
            "type": "integer"
          }
        },
        "required": [
          "events",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ResolutionInput": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "evidence_id": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "source",
          "target",
          "evidence_id",
          "active"
        ],
        "additionalProperties": false
      },
      "ResolutionResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "publication_id": {
            "type": "integer"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "publication_id",
          "active"
        ],
        "additionalProperties": false
      },
      "RetentionInput": {
        "type": "object",
        "properties": {
          "keep_publications": {
            "type": "integer",
            "minimum": 1
          },
          "apply": {
            "type": "boolean"
          }
        },
        "required": [
          "keep_publications",
          "apply"
        ],
        "additionalProperties": false
      },
      "RetentionReport": {
        "type": "object",
        "properties": {
          "applied": {
            "type": "boolean"
          },
          "publications": {
            "type": "integer"
          },
          "versions": {
            "type": "integer"
          },
          "evidence": {
            "type": "integer"
          },
          "protected_operation_publications": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "applied",
          "publications",
          "versions",
          "evidence",
          "protected_operation_publications",
          "note"
        ],
        "additionalProperties": false
      },
      "RebuildReport": {
        "type": "object",
        "properties": {
          "publication_id": {
            "type": "integer"
          },
          "documents": {
            "type": "integer"
          },
          "inference": {
            "type": "boolean"
          }
        },
        "required": [
          "publication_id",
          "documents",
          "inference"
        ],
        "additionalProperties": false
      },
      "Diagnostics": {
        "type": "object",
        "properties": {
          "integrity": {
            "type": "string"
          },
          "schema_version": {
            "type": "integer"
          },
          "publication_id": {
            "type": "integer"
          },
          "retained": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "database_bytes": {
            "type": "integer"
          },
          "encrypted": {
            "type": "boolean"
          }
        },
        "required": [
          "integrity",
          "schema_version",
          "publication_id",
          "retained",
          "database_bytes",
          "encrypted"
        ],
        "additionalProperties": false
      },
      "Capabilities": {
        "type": "object",
        "properties": {
          "application": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "interface": {
            "type": "string"
          },
          "openapi": {
            "type": "string"
          },
          "collections": {
            "type": "array",
            "items": {}
          },
          "capabilities": {},
          "readiness": {},
          "publication_id": {
            "type": "integer"
          }
        },
        "required": [
          "application",
          "version",
          "interface",
          "openapi",
          "collections",
          "capabilities",
          "readiness",
          "publication_id"
        ],
        "additionalProperties": false
      },
      "GcInput": {
        "type": "object",
        "properties": {
          "apply": {
            "type": "boolean"
          }
        },
        "required": [
          "apply"
        ],
        "additionalProperties": false
      },
      "GcReport": {
        "type": "object",
        "properties": {
          "applied": {
            "type": "boolean"
          },
          "cache_entries": {
            "type": "integer"
          },
          "binary_artifacts": {
            "type": "integer"
          },
          "remote_versions": {
            "type": "integer"
          },
          "compacted": {
            "type": "boolean"
          }
        },
        "required": [
          "applied",
          "cache_entries",
          "binary_artifacts",
          "remote_versions",
          "compacted"
        ],
        "additionalProperties": false
      },
      "CatalogItem": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "role": {
            "enum": [
              "concept",
              "navigation",
              "asset"
            ]
          },
          "metadata": {},
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_freshness": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "version_id",
          "title",
          "role",
          "metadata",
          "summary",
          "content_freshness"
        ],
        "additionalProperties": false
      },
      "CatalogPage": {
        "type": "object",
        "properties": {
          "publication_id": {
            "type": "integer"
          },
          "publication_key": {
            "type": "string"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogItem"
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "publication_id",
          "publication_key",
          "resources",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ConsolidationSupport": {
        "type": "object",
        "properties": {
          "evidence_id": {
            "type": "string"
          },
          "quote": {
            "type": "string"
          }
        },
        "required": [
          "evidence_id",
          "quote"
        ],
        "additionalProperties": false
      },
      "ConsolidationClaim": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "extracted",
              "summarized",
              "computed",
              "inferred",
              "hypothesis"
            ]
          },
          "support": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsolidationSupport"
            }
          }
        },
        "required": [
          "text",
          "kind",
          "support"
        ],
        "additionalProperties": false
      },
      "ConsolidationAnalysis": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "claims": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsolidationClaim"
            }
          }
        },
        "required": [
          "title",
          "claims"
        ],
        "additionalProperties": false
      },
      "ConsolidationInput": {
        "type": "object",
        "properties": {
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          }
        },
        "required": [
          "evidence"
        ],
        "additionalProperties": false
      },
      "ConsolidationProposal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "state": {
            "enum": [
              "running",
              "proposed",
              "failed",
              "approved",
              "rejected",
              "invalidated",
              "promoting",
              "promoted"
            ]
          },
          "publication_key": {
            "type": "string"
          },
          "recipe_id": {
            "type": "string"
          },
          "output_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "analysis": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConsolidationAnalysis"
              },
              {
                "type": "null"
              }
            ]
          },
          "inputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsolidationInput"
            }
          },
          "reviewer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempts": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "state",
          "publication_key",
          "recipe_id",
          "output_hash",
          "analysis",
          "inputs",
          "reviewer",
          "operation_id",
          "path",
          "error",
          "attempts"
        ],
        "additionalProperties": false
      },
      "ConsolidationRunResult": {
        "type": "object",
        "properties": {
          "proposal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConsolidationProposal"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "proposal"
        ],
        "additionalProperties": false
      },
      "ConsolidationProposals": {
        "type": "object",
        "properties": {
          "proposals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsolidationProposal"
            }
          }
        },
        "required": [
          "proposals"
        ],
        "additionalProperties": false
      },
      "ConsolidationReview": {
        "type": "object",
        "properties": {
          "output_hash": {
            "type": "string"
          },
          "action": {
            "enum": [
              "approve",
              "reject",
              "retract"
            ]
          }
        },
        "required": [
          "output_hash",
          "action"
        ],
        "additionalProperties": false
      },
      "ConsolidationPromotion": {
        "type": "object",
        "properties": {
          "output_hash": {
            "type": "string"
          }
        },
        "required": [
          "output_hash"
        ],
        "additionalProperties": false
      },
      "IndexingPause": {
        "type": "object",
        "properties": {
          "paused": {
            "type": "boolean"
          }
        },
        "required": [
          "paused"
        ],
        "additionalProperties": false
      },
      "ResourceLimits": {
        "type": "object",
        "properties": {
          "cpu_threads": {
            "type": "integer"
          },
          "max_gpu_layers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_concurrent_jobs": {
            "type": "integer"
          },
          "max_embedding_batch_size": {
            "type": "integer"
          },
          "duty_cycle_percent": {
            "type": "integer"
          },
          "min_idle_ms": {
            "type": "integer"
          },
          "max_jobs_per_minute": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_rss_mb": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "cpu_threads",
          "max_gpu_layers",
          "max_concurrent_jobs",
          "max_embedding_batch_size",
          "duty_cycle_percent",
          "min_idle_ms",
          "max_jobs_per_minute",
          "max_rss_mb"
        ],
        "additionalProperties": false
      },
      "IndexingResources": {
        "type": "object",
        "properties": {
          "paused": {
            "type": "boolean"
          },
          "limits": {
            "$ref": "#/components/schemas/ResourceLimits"
          },
          "rss_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "type": "string"
          },
          "memory_policy": {
            "type": "string"
          },
          "gpu_policy": {
            "type": "string"
          }
        },
        "required": [
          "paused",
          "limits",
          "rss_bytes",
          "scope",
          "memory_policy",
          "gpu_policy"
        ],
        "additionalProperties": false
      },
      "FederationIdentity": {
        "type": "object",
        "properties": {
          "protocol": {
            "const": "knowledge-federation/1"
          },
          "publisher_id": {
            "type": "string"
          },
          "collection_id": {
            "type": "string"
          },
          "branch_id": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          }
        },
        "required": [
          "protocol",
          "publisher_id",
          "collection_id",
          "branch_id",
          "public_key"
        ],
        "additionalProperties": false
      },
      "FederationOrigin": {
        "type": "object",
        "properties": {
          "publisher_id": {
            "type": "string"
          },
          "collection_id": {
            "type": "string"
          },
          "branch_id": {
            "type": "string"
          },
          "share_id": {
            "type": "string"
          },
          "evidence_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "version_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "artifact_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "publisher_id",
          "collection_id",
          "branch_id",
          "share_id",
          "evidence_id",
          "version_id",
          "artifact_sha256"
        ],
        "additionalProperties": false
      },
      "FederationAssetDescriptor": {
        "type": "object",
        "properties": {
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "mime": {
            "type": "string"
          },
          "bytes": {
            "type": "integer"
          }
        },
        "required": [
          "sha256",
          "mime",
          "bytes"
        ],
        "additionalProperties": false
      },
      "ExportEvidence": {
        "type": "object",
        "properties": {
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          },
          "origin": {
            "$ref": "#/components/schemas/FederationOrigin"
          },
          "metadata": {
            "type": "object"
          },
          "asset": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FederationAssetDescriptor"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "evidence",
          "origin",
          "metadata",
          "asset"
        ],
        "additionalProperties": false
      },
      "FederationViewPin": {
        "type": "object",
        "properties": {
          "publisher_id": {
            "type": "string"
          },
          "grant_id": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "policy_epoch": {
            "type": "string"
          }
        },
        "required": [
          "publisher_id",
          "grant_id",
          "revision",
          "policy_epoch"
        ],
        "additionalProperties": false
      },
      "FederationReceipt": {
        "type": "object",
        "properties": {
          "publisher_id": {
            "type": "string"
          },
          "share_id": {
            "type": "string"
          },
          "grant_id": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "policy_epoch": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "enum": [
                "search",
                "read_evidence",
                "graph",
                "download_assets",
                "original_assets",
                "replicate",
                "derive",
                "reshare",
                "export",
                "history"
              ]
            }
          },
          "processing": {
            "enum": [
              "local_only",
              "configured_providers"
            ]
          },
          "allowed_model_origins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reshare_publishers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lease_until": {
            "type": "integer"
          },
          "offline_until": {
            "type": "integer"
          },
          "offline": {
            "type": "boolean"
          },
          "mount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "publisher_id",
          "share_id",
          "grant_id",
          "revision",
          "policy_epoch",
          "permissions",
          "processing",
          "allowed_model_origins",
          "reshare_publishers",
          "lease_until",
          "offline_until",
          "offline"
        ],
        "additionalProperties": false
      },
      "FederationView": {
        "type": "object",
        "properties": {
          "publisher_id": {
            "type": "string"
          },
          "share_id": {
            "type": "string"
          },
          "grant_id": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "policy_epoch": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "enum": [
                "search",
                "read_evidence",
                "graph",
                "download_assets",
                "original_assets",
                "replicate",
                "derive",
                "reshare",
                "export",
                "history"
              ]
            }
          },
          "processing": {
            "enum": [
              "local_only",
              "configured_providers"
            ]
          },
          "allowed_model_origins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reshare_publishers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lease_until": {
            "type": "integer"
          },
          "offline_until": {
            "type": "integer"
          },
          "protocol": {
            "const": "knowledge-federation/1"
          },
          "collection_id": {
            "type": "string"
          },
          "branch_id": {
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportEvidence"
            }
          },
          "assertions": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "publisher_id",
          "share_id",
          "grant_id",
          "revision",
          "policy_epoch",
          "permissions",
          "processing",
          "allowed_model_origins",
          "reshare_publishers",
          "lease_until",
          "offline_until",
          "protocol",
          "collection_id",
          "branch_id",
          "cursor",
          "evidence",
          "assertions"
        ],
        "additionalProperties": false
      },
      "SignedFederationReply": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "string",
            "description": "Unpadded base64url of the exact UTF-8 JSON bytes signed by the enrolled Ed25519 key."
          },
          "signature": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          }
        },
        "required": [
          "payload",
          "signature",
          "public_key"
        ],
        "additionalProperties": false
      },
      "FederationManifestItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "id",
          "sha256"
        ],
        "additionalProperties": false
      },
      "FederationManifest": {
        "type": "object",
        "properties": {
          "view": {
            "$ref": "#/components/schemas/FederationView"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationManifestItem"
            }
          }
        },
        "required": [
          "view",
          "items"
        ],
        "additionalProperties": false
      },
      "FederationViewItems": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "minItems": 1,
            "maxItems": 1000
          }
        },
        "required": [
          "revision",
          "ids"
        ],
        "additionalProperties": false
      },
      "FederationExportItems": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ExportEvidence"
        }
      },
      "FederationExportHit": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/ExportEvidence"
          },
          "score": {
            "type": "number"
          },
          "matched_by": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "graph_only": {
            "type": "boolean"
          }
        },
        "required": [
          "item",
          "score",
          "matched_by",
          "graph_only"
        ],
        "additionalProperties": false
      },
      "ShareRetrieval": {
        "type": "object",
        "properties": {
          "view": {
            "$ref": "#/components/schemas/FederationReceipt"
          },
          "hits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationExportHit"
            }
          },
          "assertions": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "view",
          "hits",
          "assertions",
          "warnings",
          "channels"
        ],
        "additionalProperties": false
      },
      "ShareCatalogItem": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "version_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "metadata": {
            "type": "object"
          },
          "representations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "path",
          "title",
          "version_id",
          "metadata",
          "representations"
        ],
        "additionalProperties": false
      },
      "ShareCatalog": {
        "type": "object",
        "properties": {
          "view": {
            "$ref": "#/components/schemas/FederationReceipt"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShareCatalogItem"
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "view",
          "resources",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ShareEvidence": {
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/ExportEvidence"
          },
          "view": {
            "$ref": "#/components/schemas/FederationReceipt"
          }
        },
        "required": [
          "item",
          "view"
        ],
        "additionalProperties": false
      },
      "ShareChange": {
        "type": "object",
        "properties": {
          "sequence": {
            "type": "integer"
          },
          "kind": {
            "enum": [
              "enter",
              "update",
              "leave"
            ]
          },
          "evidence_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "sequence",
          "kind",
          "evidence_id",
          "revision"
        ],
        "additionalProperties": false
      },
      "ShareChangePage": {
        "type": "object",
        "properties": {
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShareChange"
            }
          },
          "next_cursor": {
            "type": "string"
          },
          "revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "policy_epoch": {
            "type": "string"
          }
        },
        "required": [
          "changes",
          "next_cursor",
          "revision",
          "policy_epoch"
        ],
        "additionalProperties": false
      },
      "ShareHistory": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "current_revision": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "retained_revisions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              }
            },
            "required": [
              "current_revision",
              "retained_revisions"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "historical_revision": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "current": {
                "$ref": "#/components/schemas/FederationReceipt"
              },
              "evidence": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ExportEvidence"
                }
              }
            },
            "required": [
              "historical_revision",
              "current",
              "evidence"
            ],
            "additionalProperties": false
          }
        ]
      },
      "FederatedQuery": {
        "type": "object",
        "properties": {
          "query": {
            "$ref": "#/components/schemas/Query"
          },
          "workspace": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "required_sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pins": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/FederationViewPin"
            }
          },
          "include_local": {
            "type": "boolean"
          },
          "include_derived": {
            "type": "boolean"
          },
          "strict": {
            "type": "boolean"
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      },
      "FederationCoverage": {
        "type": "object",
        "properties": {
          "selected": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "completed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "unavailable": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "omitted_by_budget": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "selected",
          "completed",
          "unavailable",
          "omitted_by_budget"
        ],
        "additionalProperties": false
      },
      "FederatedRetrieval": {
        "type": "object",
        "properties": {
          "retrieval": {
            "$ref": "#/components/schemas/Retrieval"
          },
          "snapshots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationReceipt"
            }
          },
          "coverage": {
            "$ref": "#/components/schemas/FederationCoverage"
          }
        },
        "required": [
          "retrieval",
          "snapshots",
          "coverage"
        ],
        "additionalProperties": false
      },
      "FederatedContextQuery": {
        "type": "object",
        "properties": {
          "search": {
            "$ref": "#/components/schemas/FederatedQuery"
          },
          "context": {
            "$ref": "#/components/schemas/ContextOptions"
          }
        },
        "required": [
          "search",
          "context"
        ],
        "additionalProperties": false
      },
      "FederatedContext": {
        "type": "object",
        "properties": {
          "context": {
            "$ref": "#/components/schemas/EvidenceContext"
          },
          "snapshots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationReceipt"
            }
          },
          "coverage": {
            "$ref": "#/components/schemas/FederationCoverage"
          }
        },
        "required": [
          "context",
          "snapshots",
          "coverage"
        ],
        "additionalProperties": false
      },
      "FederationEvidenceRef": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "const": "local"
              },
              "evidence_id": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "required": [
              "kind",
              "evidence_id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "const": "mounted"
              },
              "mount": {
                "type": "string"
              },
              "origin": {
                "$ref": "#/components/schemas/FederationOrigin"
              }
            },
            "required": [
              "kind",
              "mount",
              "origin"
            ],
            "additionalProperties": false
          }
        ]
      },
      "FederationEvidenceQuery": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "string"
          },
          "reference": {
            "$ref": "#/components/schemas/FederationEvidenceRef"
          }
        },
        "required": [
          "workspace",
          "reference"
        ],
        "additionalProperties": false
      },
      "FederationAssetQuery": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "string"
          },
          "reference": {
            "$ref": "#/components/schemas/FederationEvidenceRef"
          },
          "start": {
            "type": "integer"
          },
          "length": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1048576
          }
        },
        "required": [
          "workspace",
          "reference",
          "start",
          "length"
        ],
        "additionalProperties": false
      },
      "FederationTimeRange": {
        "type": "object",
        "properties": {
          "start_ms": {
            "type": "integer"
          },
          "end_ms": {
            "type": "integer"
          }
        },
        "required": [
          "start_ms",
          "end_ms"
        ],
        "additionalProperties": false
      },
      "FederationShare": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "include": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "exclude": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "metadata_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "representations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pages": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },
          "time_ranges": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/FederationTimeRange"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "enum": [
                "search",
                "read_evidence",
                "graph",
                "download_assets",
                "original_assets",
                "replicate",
                "derive",
                "reshare",
                "export",
                "history"
              ]
            }
          },
          "history_views": {
            "type": "integer"
          },
          "max_lease_secs": {
            "type": "integer"
          },
          "max_offline_secs": {
            "type": "integer"
          },
          "max_evidence": {
            "type": "integer"
          },
          "max_bytes": {
            "type": "integer"
          },
          "processing": {
            "enum": [
              "local_only",
              "configured_providers"
            ]
          },
          "allowed_model_origins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reshare_publishers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "include"
        ],
        "additionalProperties": false
      },
      "FederationGrant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "share": {
            "type": "string"
          },
          "principal": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "permissions": {
            "type": "array",
            "items": {
              "enum": [
                "search",
                "read_evidence",
                "graph",
                "download_assets",
                "original_assets",
                "replicate",
                "derive",
                "reshare",
                "export",
                "history"
              ]
            }
          },
          "certificate_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "share",
          "principal"
        ],
        "additionalProperties": false
      },
      "FederationPolicyUpdate": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "boolean"
          }
        },
        "required": [
          "updated"
        ],
        "additionalProperties": false
      },
      "FederationSharePolicy": {
        "type": "object",
        "properties": {
          "policy": {
            "$ref": "#/components/schemas/FederationShare"
          },
          "epoch": {
            "type": "integer"
          }
        },
        "required": [
          "policy",
          "epoch"
        ],
        "additionalProperties": false
      },
      "FederationGrantPolicy": {
        "type": "object",
        "properties": {
          "policy": {
            "$ref": "#/components/schemas/FederationGrant"
          },
          "epoch": {
            "type": "integer"
          }
        },
        "required": [
          "policy",
          "epoch"
        ],
        "additionalProperties": false
      },
      "FederationPolicies": {
        "type": "object",
        "properties": {
          "shares": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationSharePolicy"
            }
          },
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationGrantPolicy"
            }
          }
        },
        "required": [
          "shares",
          "grants"
        ],
        "additionalProperties": false
      },
      "FederationReplicaStatus": {
        "type": "object",
        "properties": {
          "mount": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "authorized_revision": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "received_revision": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "serving_revision": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "epoch": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lease_until": {
            "type": "integer"
          },
          "offline_until": {
            "type": "integer"
          },
          "updated_at": {
            "type": "integer"
          }
        },
        "required": [
          "mount",
          "state",
          "authorized_revision",
          "received_revision",
          "serving_revision",
          "epoch",
          "lease_until",
          "offline_until",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "FederationStatus": {
        "type": "object",
        "properties": {
          "replicas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationReplicaStatus"
            }
          }
        },
        "required": [
          "replicas"
        ],
        "additionalProperties": false
      },
      "FederationSyncResult": {
        "type": "object",
        "properties": {
          "mount": {
            "type": "string"
          },
          "state": {
            "enum": [
              "staged",
              "ready",
              "unchanged",
              "deferred"
            ]
          },
          "received_revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "serving_revision": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "evidence": {
            "type": "integer"
          },
          "downloaded_items": {
            "type": "integer"
          },
          "embedding_space": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "vectors_enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "mount",
          "state"
        ],
        "additionalProperties": false
      },
      "FederationBridge": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspace": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/FederationEvidenceRef"
          },
          "target": {
            "$ref": "#/components/schemas/FederationEvidenceRef"
          },
          "predicate": {
            "type": "string"
          },
          "proof": {
            "$ref": "#/components/schemas/FederationEvidenceRef"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "workspace",
          "source",
          "target",
          "predicate",
          "proof",
          "active"
        ],
        "additionalProperties": false
      },
      "FederationDerivationRequest": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "string"
          },
          "parents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationEvidenceRef"
            }
          }
        },
        "required": [
          "workspace",
          "parents"
        ],
        "additionalProperties": false
      },
      "FederationDerivationParent": {
        "type": "object",
        "properties": {
          "reference": {
            "$ref": "#/components/schemas/FederationEvidenceRef"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "view": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FederationViewPin"
              },
              {
                "type": "null"
              }
            ]
          },
          "lease_until": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "reference",
          "sha256",
          "view",
          "lease_until"
        ],
        "additionalProperties": false
      },
      "FederationDerivation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "workspace": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "recipe": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "output_hash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "analysis": {
            "$ref": "#/components/schemas/ConsolidationAnalysis"
          },
          "parents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FederationDerivationParent"
            }
          },
          "created_at": {
            "type": "integer"
          },
          "reviewer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "workspace",
          "state",
          "recipe",
          "output_hash",
          "analysis",
          "parents",
          "created_at",
          "reviewer"
        ],
        "additionalProperties": false
      },
      "FederationDerivationReview": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "state": {
            "type": "string"
          },
          "reviewer": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "state",
          "reviewer"
        ],
        "additionalProperties": false
      },
      "OAuthResourceMetadata": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          },
          "authorization_servers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bearer_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopes_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resource_documentation": {
            "type": "string"
          }
        },
        "required": [
          "resource",
          "authorization_servers",
          "bearer_methods_supported",
          "scopes_supported",
          "resource_documentation"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "400": {
        "description": "Malformed request, unknown fields or invalid limits",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "401": {
        "description": "Missing or invalid bearer token",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "403": {
        "description": "Insufficient role or disallowed browser Origin",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404": {
        "description": "Not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "405": {
        "description": "Method not allowed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "413": {
        "description": "Request body exceeds configured limit",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "421": {
        "description": "Host is not allowed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "422": {
        "description": "Cannot process with current configuration",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "429": {
        "description": "Rate or concurrency budget exceeded",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "500": {
        "description": "Internal failure; details are not exposed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "502": {
        "description": "Configured model failed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "504": {
        "description": "Request deadline exceeded",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "409": {
        "description": "Source version conflict; inspect the current file or capture hash.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "x-knowledge-gateway": {
    "readOperations": [
      "capabilities",
      "retrieve_evidence",
      "build_context",
      "get_evidence",
      "read_resource",
      "read_evidence_media",
      "select_resources",
      "read_events",
      "retrieve_federated",
      "build_federated_context",
      "resolve_federated_evidence",
      "read_federated_asset",
      "read_federated_derivation"
    ],
    "writeOperations": [
      "submit_changes",
      "get_operation",
      "resume_operation"
    ],
    "resourceTemplate": "knowledge://{bundle_id}/evidence/{id}",
    "resourceReadOperation": "get_evidence",
    "authorization": "Forward caller credentials; no gateway bypass. Scope authoring separately.",
    "federatedResourceTemplate": "knowledge://{publisher_id}/shares/{share_id}/evidence/{id}",
    "federatedResourceReadOperation": "resolve_federated_evidence"
  }
}
