{
  "openapi": "3.1.1",
  "info": {
    "title": "PetBox.Web | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://petbox.3po.su/"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatusResponse"
                }
              }
            }
          }
        }
      },
      "head": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/version": {
      "get": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          }
        }
      },
      "head": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource/{rest}": {
      "get": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/.well-known/oauth-authorization-server/{rest}": {
      "get": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/.well-known/openid-configuration": {
      "get": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/.well-known/openid-configuration/{rest}": {
      "get": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "tags": [
          "PetBox.Web"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/validate": {
      "get": {
        "tags": [
          "AuthApi"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthValidResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthInvalidResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/ui/workspace": {
      "post": {
        "tags": [
          "WorkspaceSwitchEndpoint"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "ws": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "zone": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "ws": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "zone": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/ui/project": {
      "post": {
        "tags": [
          "ProjectSwitchEndpoint"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "ws": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "zone": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "ws": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "zone": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/ui/board-filter-prefs": {
      "post": {
        "tags": [
          "BoardFilterPrefsEndpoint"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "activeOnly": {
                        "type": "boolean"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "sortBy": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "sortDesc": {
                        "type": "boolean"
                      }
                    }
                  }
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "activeOnly": {
                        "type": "boolean"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "sortBy": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "sortDesc": {
                        "type": "boolean"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/config/{workspaceKey}/bindings": {
      "post": {
        "tags": [
          "ConfigApi"
        ],
        "parameters": [
          {
            "name": "workspaceKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigBindingDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigBindingCreatedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ConfigApi"
        ],
        "parameters": [
          {
            "name": "workspaceKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/conf": {
      "get": {
        "tags": [
          "ConfigApi"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigProjectNotFoundResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigAmbiguousResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/ingest/{projectKey}/{logName}/clef": {
      "post": {
        "tags": [
          "LogApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/ingest/{projectKey}/{logName}/compat/seq/api/events/raw": {
      "post": {
        "tags": [
          "LogApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/logs/{projectKey}/logs": {
      "post": {
        "tags": [
          "LogApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLogRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "LogApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LogInfo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/logs/{projectKey}/logs/{name}": {
      "delete": {
        "tags": [
          "LogApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/logs/{projectKey}/{logName}/query": {
      "get": {
        "tags": [
          "LogApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KqlTableResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KqlExecutionErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/logs/{projectKey}/{logName}/live-tail": {
      "get": {
        "tags": [
          "LogApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/logs/{projectKey}/{logName}/services": {
      "get": {
        "tags": [
          "LogApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/share": {
      "post": {
        "tags": [
          "ShareApi"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShareCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareCreatedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/share/{token}/tsv": {
      "get": {
        "tags": [
          "ShareApi"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/logs/{projectKey}/{logName}": {
      "post": {
        "tags": [
          "OtlpEndpoints"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/traces/{projectKey}/{logName}": {
      "post": {
        "tags": [
          "OtlpEndpoints"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/metrics/{projectKey}/{logName}": {
      "post": {
        "tags": [
          "OtlpEndpoints"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "logName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/traces": {
      "post": {
        "tags": [
          "OtlpEndpoints"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/logs": {
      "post": {
        "tags": [
          "OtlpEndpoints"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/metrics": {
      "post": {
        "tags": [
          "OtlpEndpoints"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/events/raw": {
      "post": {
        "tags": [
          "LogApi"
        ],
        "responses": {
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{projectKey}/{sessionId}": {
      "post": {
        "tags": [
          "SessionApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-ndjson": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionUpsertResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "SessionApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{projectKey}/{sessionId}/append": {
      "post": {
        "tags": [
          "SessionApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-ndjson": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionAppendResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionAppendGapResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{projectKey}": {
      "get": {
        "tags": [
          "SessionApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/{projectKey}/agent-defs": {
      "get": {
        "tags": [
          "AgentDefsApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDefinitionListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/{projectKey}/agent-defs/{key}": {
      "get": {
        "tags": [
          "AgentDefsApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDefinitionView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "AgentDefsApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDefinitionPutBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDefinitionAck"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AgentDefsApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDefinitionAck"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/memory/{projectKey}/canon": {
      "get": {
        "tags": [
          "MemoryApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CanonResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "tags": [
          "LlmRouterApi"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/health": {
      "post": {
        "tags": [
          "HealthApi"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HealthPushRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data/{projectKey}/dbs": {
      "post": {
        "tags": [
          "DataDbsApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDbRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DbInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "DataDbsApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DbInfo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/data/{projectKey}/dbs/{name}": {
      "delete": {
        "tags": [
          "DataDbsApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data/{projectKey}/{dbName}/schema": {
      "post": {
        "tags": [
          "SchemaApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dbName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaApplyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaApplyResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SchemaApplyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data/{projectKey}/{dbName}/migrations": {
      "get": {
        "tags": [
          "SchemaApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dbName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MigrationEntry"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/data/{projectKey}/{dbName}/query": {
      "post": {
        "tags": [
          "QueryExecApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dbName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SqliteErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large"
          },
          "507": {
            "description": "Insufficient Storage"
          }
        }
      }
    },
    "/api/data/{projectKey}/{dbName}/exec": {
      "post": {
        "tags": [
          "QueryExecApi"
        ],
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dbName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SqliteErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large"
          },
          "507": {
            "description": "Insufficient Storage"
          }
        }
      }
    },
    "/agent/poll": {
      "get": {
        "tags": [
          "DeployApi"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PollResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/agent/heartbeat": {
      "post": {
        "tags": [
          "DeployApi"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HeartbeatReport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/deploy/nodes": {
      "post": {
        "tags": [
          "DeployApi"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NodeEnrollRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeEnrollResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ActualReport": {
        "required": [
          "service",
          "containerId",
          "state",
          "imageDigest",
          "healthy"
        ],
        "type": "object",
        "properties": {
          "service": {
            "type": "string"
          },
          "containerId": {
            "type": [
              "null",
              "string"
            ]
          },
          "state": {
            "$ref": "#/components/schemas/ActualState"
          },
          "imageDigest": {
            "type": [
              "null",
              "string"
            ]
          },
          "healthy": {
            "type": "boolean"
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ActualState": {
        "type": "integer"
      },
      "AgentDefinitionAck": {
        "required": [
          "key",
          "version",
          "changed"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "changed": {
            "type": "boolean"
          }
        }
      },
      "AgentDefinitionDoc": {
        "required": [
          "name",
          "roles"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentDefinitionRole"
            }
          }
        }
      },
      "AgentDefinitionEscalation": {
        "required": [
          "available"
        ],
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "targets": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AgentDefinitionListItem": {
        "required": [
          "key",
          "name",
          "version",
          "updated"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AgentDefinitionListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentDefinitionListItem"
            }
          }
        }
      },
      "AgentDefinitionPutBody": {
        "required": [
          "version",
          "definition"
        ],
        "type": "object",
        "properties": {
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "definition": {
            "$ref": "#/components/schemas/JsonElement"
          }
        }
      },
      "AgentDefinitionRole": {
        "required": [
          "slug",
          "tier",
          "requiredCapabilities"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "requiredCapabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "spawn": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentDefinitionSpawn"
              }
            ]
          },
          "escalation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AgentDefinitionEscalation"
              }
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentDefinitionSpawn": {
        "required": [
          "allowed"
        ],
        "type": "object",
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "allowedRoles": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AgentDefinitionView": {
        "required": [
          "key",
          "definition",
          "version",
          "created",
          "updated"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "definition": {
            "$ref": "#/components/schemas/AgentDefinitionDoc"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AuthInvalidResponse": {
        "required": [
          "valid"
        ],
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          }
        }
      },
      "AuthValidResponse": {
        "required": [
          "project",
          "scopes",
          "workspace"
        ],
        "type": "object",
        "properties": {
          "project": {
            "type": "string"
          },
          "scopes": {
            "type": "string"
          },
          "workspace": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BindingKind": {
        "type": "integer",
        "default": 0
      },
      "CanonPart": {
        "required": [
          "body",
          "updatedAt",
          "version"
        ],
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "CanonResponse": {
        "required": [
          "project",
          "workspace"
        ],
        "type": "object",
        "properties": {
          "project": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CanonPart"
              }
            ]
          },
          "workspace": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CanonPart"
              }
            ]
          }
        }
      },
      "ConfigAmbiguousResponse": {
        "required": [
          "error",
          "path",
          "candidates"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "candidates": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        }
      },
      "ConfigBindingCreatedResponse": {
        "required": [
          "id",
          "path",
          "tags"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "path": {
            "type": "string"
          },
          "tags": {
            "type": "string"
          }
        }
      },
      "ConfigBindingDto": {
        "required": [
          "path",
          "value",
          "tags"
        ],
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "tags": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/BindingKind"
          }
        }
      },
      "ConfigProjectNotFoundResponse": {
        "required": [
          "error",
          "project"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "project": {
            "type": "string"
          }
        }
      },
      "CreateDbRequest": {
        "required": [
          "name",
          "description",
          "maxPageCount"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "maxPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "CreateLogRequest": {
        "required": [
          "name",
          "description"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "retentionDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DbInfo": {
        "required": [
          "name",
          "description",
          "maxPageCount",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "maxPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DeletedResponse": {
        "required": [
          "deleted"
        ],
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "DesiredState": {
        "type": "integer"
      },
      "ErrorResponse": {
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "ExecResponse": {
        "required": [
          "affected"
        ],
        "type": "object",
        "properties": {
          "affected": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "HealthPushRequest": {
        "required": [
          "svc",
          "name",
          "tags",
          "version",
          "sha",
          "buildDate",
          "status"
        ],
        "type": "object",
        "properties": {
          "svc": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "version": {
            "type": [
              "null",
              "string"
            ]
          },
          "sha": {
            "type": [
              "null",
              "string"
            ]
          },
          "buildDate": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "type": "string"
          }
        }
      },
      "HealthStatusResponse": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "HealthcheckSpec": {
        "required": [
          "cmd"
        ],
        "type": "object",
        "properties": {
          "cmd": {
            "type": "string"
          },
          "interval": {
            "type": [
              "null",
              "string"
            ]
          },
          "timeout": {
            "type": [
              "null",
              "string"
            ]
          },
          "retries": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "HeartbeatReport": {
        "required": [
          "actual"
        ],
        "type": "object",
        "properties": {
          "actual": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActualReport"
            }
          },
          "capabilities": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "host": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HostReport"
              }
            ]
          }
        }
      },
      "HostDisk": {
        "type": "object",
        "properties": {
          "totalGb": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "freeGb": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "HostMemory": {
        "type": "object",
        "properties": {
          "totalMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "availableMb": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "HostReport": {
        "type": "object",
        "properties": {
          "security": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HostSecurity"
              }
            ]
          },
          "memory": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HostMemory"
              }
            ]
          },
          "disk": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HostDisk"
              }
            ]
          },
          "os": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "HostSecurity": {
        "type": "object",
        "properties": {
          "rootLoginEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "passwordAuthEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "IngestResponse": {
        "required": [
          "ingested",
          "errors"
        ],
        "type": "object",
        "properties": {
          "ingested": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "errors": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "JsonElement": { },
      "KqlExecutionErrorResponse": {
        "required": [
          "error",
          "type"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "KqlTableResponse": {
        "required": [
          "columns",
          "rows"
        ],
        "type": "object",
        "properties": {
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "array"
            }
          },
          "truncated": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "LogInfo": {
        "required": [
          "name",
          "description",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "retentionDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MaskMode": {
        "type": "integer"
      },
      "MigrationEntry": {
        "required": [
          "id",
          "scriptName",
          "applied",
          "hash"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "scriptName": {
            "type": "string"
          },
          "applied": {
            "type": "string",
            "format": "date-time"
          },
          "hash": {
            "type": "string"
          }
        }
      },
      "NodeEnrollRequest": {
        "required": [
          "id",
          "displayName",
          "tags",
          "ephemeral",
          "mintKey"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": [
              "null",
              "string"
            ]
          },
          "ephemeral": {
            "type": "boolean"
          },
          "mintKey": {
            "type": "boolean"
          }
        }
      },
      "NodeEnrollResponse": {
        "required": [
          "node",
          "key"
        ],
        "type": "object",
        "properties": {
          "node": {
            "$ref": "#/components/schemas/NodeView"
          },
          "key": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "NodeView": {
        "required": [
          "id",
          "displayName",
          "tags",
          "ephemeral",
          "keyRef",
          "lastSeenAt",
          "online",
          "deployments",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "tags": {
            "type": "string"
          },
          "ephemeral": {
            "type": "boolean"
          },
          "keyRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastSeenAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "online": {
            "type": "boolean"
          },
          "deployments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "capabilities": {
            "type": "string",
            "default": ""
          },
          "host": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HostReport"
              }
            ]
          },
          "warnings": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OkResponse": {
        "required": [
          "ok"
        ],
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        }
      },
      "PollItem": {
        "required": [
          "service",
          "project",
          "imageDigest",
          "desired",
          "configTags",
          "configHash"
        ],
        "type": "object",
        "properties": {
          "service": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "imageDigest": {
            "type": "string"
          },
          "desired": {
            "$ref": "#/components/schemas/DesiredState"
          },
          "configTags": {
            "type": "string"
          },
          "configHash": {
            "type": "string"
          },
          "runSpec": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RunSpec"
              }
            ]
          },
          "env": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "PollResponse": {
        "required": [
          "nodeId",
          "deployments"
        ],
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "deployments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PollItem"
            }
          }
        }
      },
      "QueryRequest": {
        "required": [
          "sql",
          "params"
        ],
        "type": "object",
        "properties": {
          "sql": {
            "type": "string"
          },
          "params": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SqlParam"
            }
          }
        }
      },
      "ResourcesSpec": {
        "type": "object",
        "properties": {
          "memory": {
            "type": [
              "null",
              "string"
            ]
          },
          "cpus": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "RunSpec": {
        "type": "object",
        "properties": {
          "ports": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "volumes": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "restart": {
            "type": [
              "null",
              "string"
            ]
          },
          "healthcheck": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HealthcheckSpec"
              }
            ]
          },
          "resources": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ResourcesSpec"
              }
            ]
          },
          "network": {
            "type": [
              "null",
              "string"
            ]
          },
          "command": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "labels": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "site": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SiteSpec"
              }
            ]
          }
        }
      },
      "SchemaApplyRequest": {
        "required": [
          "name",
          "sql"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "sql": {
            "type": "string"
          }
        }
      },
      "SchemaApplyResponse": {
        "required": [
          "kind",
          "hash",
          "existingHash"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "existingHash": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SessionAppendGapResponse": {
        "required": [
          "error",
          "lastOrdinal"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "lastOrdinal": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "SessionAppendResponse": {
        "required": [
          "sessionId",
          "lastOrdinal",
          "appended"
        ],
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "lastOrdinal": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "appended": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SessionHeaderResponse": {
        "required": [
          "sessionId",
          "agent",
          "version",
          "updated"
        ],
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "agent": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          },
          "meta": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SessionListResponse": {
        "required": [
          "sessions"
        ],
        "type": "object",
        "properties": {
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionHeaderResponse"
            }
          }
        }
      },
      "SessionUpsertResponse": {
        "required": [
          "sessionId",
          "version",
          "messageCount"
        ],
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "messageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ShareCreateRequest": {
        "required": [
          "projectKey",
          "kql",
          "ttlMinutes",
          "columns",
          "modes"
        ],
        "type": "object",
        "properties": {
          "projectKey": {
            "type": "string"
          },
          "kql": {
            "type": "string"
          },
          "ttlMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "columns": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "modes": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "$ref": "#/components/schemas/MaskMode"
            }
          },
          "logName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ShareCreatedResponse": {
        "required": [
          "id",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SiteSpec": {
        "required": [
          "domain"
        ],
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SqlParam": {
        "required": [
          "name",
          "value",
          "dbType"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JsonElement"
              }
            ]
          },
          "dbType": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SqliteErrorResponse": {
        "required": [
          "error",
          "code"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "VersionResponse": {
        "required": [
          "semVer",
          "shortSha",
          "commitDate"
        ],
        "type": "object",
        "properties": {
          "semVer": {
            "type": "string"
          },
          "shortSha": {
            "type": "string"
          },
          "commitDate": {
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "PetBox.Web"
    },
    {
      "name": "AuthApi"
    },
    {
      "name": "WorkspaceSwitchEndpoint"
    },
    {
      "name": "ProjectSwitchEndpoint"
    },
    {
      "name": "BoardFilterPrefsEndpoint"
    },
    {
      "name": "ConfigApi"
    },
    {
      "name": "LogApi"
    },
    {
      "name": "ShareApi"
    },
    {
      "name": "OtlpEndpoints"
    },
    {
      "name": "SessionApi"
    },
    {
      "name": "AgentDefsApi"
    },
    {
      "name": "MemoryApi"
    },
    {
      "name": "LlmRouterApi"
    },
    {
      "name": "HealthApi"
    },
    {
      "name": "DataDbsApi"
    },
    {
      "name": "SchemaApi"
    },
    {
      "name": "QueryExecApi"
    },
    {
      "name": "DeployApi"
    }
  ]
}