{
 "openapi": "3.1.0",
 "info": {
  "title": "Claude Commander API",
  "version": "3.0.15",
  "summary": "HTTP surface of the Claude Commander server (REST + served config). WebSocket PTY channel is described in asyncapi.yaml.",
  "description": "Generated from the route inventory by scripts/build-openapi.mjs; hand enrichments in openapi.overrides.json. Every route is served by server.js or lib/*.js (see x-source). Routes marked x-operator-hand touch the login seam or the promotion ladder and are never driven by agents. x-entitlement lists the feature keys (any-of) that must be enabled by the installed license (enforcement is a per-install setting).",
  "contact": {
   "name": "DataShield",
   "url": "https://myorg.ai/contact"
  },
  "license": {
   "name": "Proprietary \u2014 see https://myorg.ai/commander#editions"
  },
  "x-verified-against": "d2907aa"
 },
 "servers": [
  {
   "url": "https://{host}",
   "variables": {
    "host": {
     "default": "commander.example.com",
     "description": "Your Commander instance (HTTP port default 3200; WebSocket on 3201)"
    }
   }
  }
 ],
 "tags": [
  {
   "name": "admin",
   "description": "Admin maintenance"
  },
  {
   "name": "agents",
   "description": "Governed persona sync (FEAT-024 P3a)"
  },
  {
   "name": "artifacts",
   "description": "Artifacts registry (FEAT-039/042)"
  },
  {
   "name": "auth",
   "description": "Login, session cookie, OIDC (login seam \u2014 operator-hand)"
  },
  {
   "name": "blueprint",
   "description": "Blueprint wizard intake"
  },
  {
   "name": "boot-sequence",
   "description": "boot-sequence"
  },
  {
   "name": "build-notes",
   "description": "Build notes"
  },
  {
   "name": "cc",
   "description": "Claude Code capability descriptor + layered config (FEAT-022)"
  },
  {
   "name": "claude-sessions",
   "description": "Logged Claude Code transcripts (Session Manager)"
  },
  {
   "name": "client-config",
   "description": "Served client configuration"
  },
  {
   "name": "deployments",
   "description": "Deployment records"
  },
  {
   "name": "embedded",
   "description": "Embedded console"
  },
  {
   "name": "files",
   "description": "Confined file browser"
  },
  {
   "name": "git",
   "description": "Git panel and git-tracking tasks"
  },
  {
   "name": "guardian",
   "description": "Guardian link"
  },
  {
   "name": "heartbeat",
   "description": "Process/host monitoring"
  },
  {
   "name": "integrations",
   "description": "External integrations (FEAT-051)"
  },
  {
   "name": "license",
   "description": "Lighthouse license plane"
  },
  {
   "name": "mcp",
   "description": "MCP consumer/broker (FEAT-016)"
  },
  {
   "name": "me",
   "description": "Current principal"
  },
  {
   "name": "models",
   "description": "Model registry"
  },
  {
   "name": "personas",
   "description": "Persona registry (FEAT-015)"
  },
  {
   "name": "projects",
   "description": "Projects, ladders, promotion, tracking"
  },
  {
   "name": "prompts",
   "description": "Prompt library"
  },
  {
   "name": "release-notes",
   "description": "Releases tab"
  },
  {
   "name": "root",
   "description": "SPA shell"
  },
  {
   "name": "screenshots",
   "description": "Screenshot library + annotation"
  },
  {
   "name": "service-accounts",
   "description": "Provider accounts (FEAT-019)"
  },
  {
   "name": "sessions",
   "description": "Live PTY sessions"
  },
  {
   "name": "settings",
   "description": "Instance settings (config chain)"
  },
  {
   "name": "skill-packs",
   "description": "Skill packs"
  },
  {
   "name": "tasks",
   "description": "DB tasks"
  },
  {
   "name": "transcripts",
   "description": "Transcript corpus stats/export"
  },
  {
   "name": "tunables",
   "description": "Operator tunables registry (FEAT-055)"
  },
  {
   "name": "ui-tests",
   "description": "UI test records"
  },
  {
   "name": "upload",
   "description": "Uploads"
  },
  {
   "name": "usage",
   "description": "Token/cost analytics"
  },
  {
   "name": "vault",
   "description": "Password Vault (FEAT-056)"
  },
  {
   "name": "well-known",
   "description": "Signed agent manifest (FEAT-026)"
  }
 ],
 "security": [
  {
   "cookieAuth": []
  },
  {
   "headerAuth": []
  }
 ],
 "paths": {
  "*": {
   "get": {
    "operationId": "getcatchAll",
    "tags": [
     "root"
    ],
    "summary": "SPA shell (public/index.html) for every non-API path",
    "x-source": "server.js:7686",
    "security": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/.well-known/agents/jwks.json": {
   "get": {
    "operationId": "getWellKnownAgentsJwksJson",
    "tags": [
     "well-known"
    ],
    "summary": "Public JWKS for the signed agent manifest (EdDSA, RFC 7638 kids)",
    "x-source": "lib/agent-manifest.js:152",
    "security": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/.well-known/agents/manifest.jws": {
   "get": {
    "operationId": "getWellKnownAgentsManifestJws",
    "tags": [
     "well-known"
    ],
    "summary": "Signed persona manifest (JWS) for federation (FEAT-026)",
    "x-source": "lib/agent-manifest.js:133",
    "security": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/admin/reconcile-transcript-links": {
   "post": {
    "operationId": "postAdminReconcileTranscriptLinks",
    "tags": [
     "admin"
    ],
    "summary": "Re-link sessions to transcripts by --session-id (FEAT-018 reconciler)",
    "x-source": "server.js:6709",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/agents/sync": {
   "post": {
    "operationId": "postAgentsSync",
    "tags": [
     "agents"
    ],
    "summary": "Pull governed personas from Auth (hash-pinned, retire-by-disable)",
    "x-source": "lib/agent-sync.js:165",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/agents/sync/status": {
   "get": {
    "operationId": "getAgentsSyncStatus",
    "tags": [
     "agents"
    ],
    "summary": "Last governed-sync result",
    "x-source": "lib/agent-sync.js:173",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/artifacts": {
   "get": {
    "operationId": "getArtifacts",
    "tags": [
     "artifacts"
    ],
    "summary": "List registered artifacts (content-addressed store)",
    "x-source": "server.js:6527",
    "x-entitlement": {
     "anyOf": [
      "session-manager",
      "session-rejoin"
     ]
    },
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/artifacts/{id}/raw": {
   "get": {
    "operationId": "getArtifactsIdRaw",
    "tags": [
     "artifacts"
    ],
    "summary": "Serve an artifact file under a sandboxed CSP",
    "x-source": "server.js:6605",
    "x-entitlement": {
     "anyOf": [
      "session-manager",
      "session-rejoin"
     ]
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/artifacts/prune": {
   "post": {
    "operationId": "postArtifactsPrune",
    "tags": [
     "artifacts"
    ],
    "summary": "Remove artifact records whose files are gone",
    "x-source": "server.js:6586",
    "x-entitlement": {
     "anyOf": [
      "session-manager",
      "session-rejoin"
     ]
    },
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/artifacts/sync": {
   "post": {
    "operationId": "postArtifactsSync",
    "tags": [
     "artifacts"
    ],
    "summary": "Scan transcripts (by byte offset) for published artifacts",
    "x-source": "server.js:6576",
    "x-entitlement": {
     "anyOf": [
      "session-manager",
      "session-rejoin"
     ]
    },
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/auth": {
   "post": {
    "operationId": "postAuth",
    "tags": [
     "auth"
    ],
    "summary": "Log in with the app password; sets commander_token cookie and returns the token",
    "x-source": "server.js:1175",
    "x-operator-hand": true,
    "x-rate-limited": true,
    "security": [],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "password": {
          "type": "string",
          "description": "Instance app password"
         }
        },
        "required": [
         "password"
        ],
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Authenticated; Set-Cookie commander_token",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "token": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "429": {
      "description": "Rate limited"
     }
    }
   }
  },
  "/api/auth/check": {
   "get": {
    "operationId": "getAuthCheck",
    "tags": [
     "auth"
    ],
    "summary": "Is this request authenticated? (cookie or x-auth-token)",
    "x-source": "server.js:1220",
    "x-operator-hand": true,
    "security": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/auth/logout": {
   "post": {
    "operationId": "postAuthLogout",
    "tags": [
     "auth"
    ],
    "summary": "Revoke the current session",
    "x-source": "server.js:1212",
    "x-operator-hand": true,
    "security": [],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     }
    }
   }
  },
  "/api/auth/oidc/callback": {
   "get": {
    "operationId": "getAuthOidcCallback",
    "tags": [
     "auth"
    ],
    "summary": "OIDC authorization-code callback (PKCE) \u2014 login seam",
    "x-source": "server.js:1251",
    "x-operator-hand": true,
    "x-rate-limited": true,
    "security": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/auth/oidc/start": {
   "get": {
    "operationId": "getAuthOidcStart",
    "tags": [
     "auth"
    ],
    "summary": "Begin OIDC login via DataShield Auth \u2014 login seam",
    "x-source": "server.js:1240",
    "x-operator-hand": true,
    "x-rate-limited": true,
    "security": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/blueprint/definition/{slug}": {
   "get": {
    "operationId": "getBlueprintDefinitionSlug",
    "tags": [
     "blueprint"
    ],
    "summary": "One Blueprint app definition",
    "x-source": "lib/blueprint-intake.js:50",
    "parameters": [
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/blueprint/definitions": {
   "get": {
    "operationId": "getBlueprintDefinitions",
    "tags": [
     "blueprint"
    ],
    "summary": "Blueprint app definitions available for intake",
    "x-source": "lib/blueprint-intake.js:45",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/blueprint/intake": {
   "post": {
    "operationId": "postBlueprintIntake",
    "tags": [
     "blueprint"
    ],
    "summary": "Register a Blueprint-generated app as a project",
    "x-source": "lib/blueprint-intake.js:57",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/boot-sequence/{projectId}": {
   "get": {
    "operationId": "getBootSequenceProjectId",
    "tags": [
     "boot-sequence"
    ],
    "summary": "Boot-sequence log for a project",
    "x-source": "server.js:6085",
    "parameters": [
     {
      "name": "projectId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/build-notes/{id}": {
   "patch": {
    "operationId": "patchBuildNotesId",
    "tags": [
     "build-notes"
    ],
    "summary": "Edit a build note",
    "x-source": "server.js:4653",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteBuildNotesId",
    "tags": [
     "build-notes"
    ],
    "summary": "Delete a build note",
    "x-source": "server.js:4669",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/cc/agents": {
   "get": {
    "operationId": "getCcAgents",
    "tags": [
     "cc"
    ],
    "summary": "Sub-agent catalogue projected from personas (FEAT-052)",
    "x-source": "server.js:5153",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/cc/capability": {
   "get": {
    "operationId": "getCcCapability",
    "tags": [
     "cc"
    ],
    "summary": "Claude Code capability descriptor (commands, flags, tunables) \u2014 public",
    "x-source": "server.js:5078",
    "security": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/cc/config/account/{id}": {
   "get": {
    "operationId": "getCcConfigAccountId",
    "tags": [
     "cc"
    ],
    "summary": "Account-layer Claude Code config",
    "x-source": "server.js:5169",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "put": {
    "operationId": "putCcConfigAccountId",
    "tags": [
     "cc"
    ],
    "summary": "Set account-layer Claude Code config",
    "x-source": "server.js:5173",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/cc/config/persona/{id}": {
   "get": {
    "operationId": "getCcConfigPersonaId",
    "tags": [
     "cc"
    ],
    "summary": "Persona-layer Claude Code config",
    "x-source": "server.js:5179",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "put": {
    "operationId": "putCcConfigPersonaId",
    "tags": [
     "cc"
    ],
    "summary": "Set persona-layer Claude Code config",
    "x-source": "server.js:5183",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/cc/sessions/{id}/launch-config": {
   "post": {
    "operationId": "postCcSessionsIdLaunchConfig",
    "tags": [
     "cc"
    ],
    "summary": "Resolve the layered cc_config (instance\u2190account\u2190persona\u2190session) for a launch",
    "x-source": "server.js:5196",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/claude-sessions": {
   "get": {
    "operationId": "getClaudeSessions",
    "tags": [
     "claude-sessions"
    ],
    "summary": "List logged Claude Code transcripts with kind, size, and linkage",
    "x-source": "server.js:5273",
    "x-entitlement": {
     "anyOf": [
      "session-manager",
      "session-rejoin"
     ]
    },
    "parameters": [
     {
      "name": "project",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "state",
      "in": "query",
      "schema": {
       "type": "string",
       "description": "hot|cold|trash"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/claude-sessions/{sid}": {
   "delete": {
    "operationId": "deleteClaudeSessionsSid",
    "tags": [
     "claude-sessions"
    ],
    "summary": "Purge a transcript (after trash)",
    "x-source": "server.js:5349",
    "parameters": [
     {
      "name": "sid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/claude-sessions/{sid}/brief": {
   "post": {
    "operationId": "postClaudeSessionsSidBrief",
    "tags": [
     "claude-sessions"
    ],
    "summary": "Generate a short brief for a transcript",
    "x-source": "server.js:5330",
    "x-entitlement": {
     "anyOf": [
      "session-manager"
     ]
    },
    "parameters": [
     {
      "name": "sid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/claude-sessions/{sid}/exists": {
   "get": {
    "operationId": "getClaudeSessionsSidExists",
    "tags": [
     "claude-sessions"
    ],
    "summary": "Does the transcript file still exist on disk?",
    "x-source": "server.js:6274",
    "x-entitlement": {
     "anyOf": [
      "session-rejoin",
      "session-manager"
     ]
    },
    "parameters": [
     {
      "name": "sid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/claude-sessions/{sid}/prompts": {
   "get": {
    "operationId": "getClaudeSessionsSidPrompts",
    "tags": [
     "claude-sessions"
    ],
    "summary": "User prompts extracted from a transcript (transcript search)",
    "x-source": "server.js:5322",
    "x-entitlement": {
     "anyOf": [
      "transcript-search",
      "session-manager"
     ]
    },
    "parameters": [
     {
      "name": "sid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/claude-sessions/{sid}/restore": {
   "post": {
    "operationId": "postClaudeSessionsSidRestore",
    "tags": [
     "claude-sessions"
    ],
    "summary": "Restore a trashed transcript",
    "x-source": "server.js:5344",
    "parameters": [
     {
      "name": "sid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/claude-sessions/{sid}/trash": {
   "post": {
    "operationId": "postClaudeSessionsSidTrash",
    "tags": [
     "claude-sessions"
    ],
    "summary": "Move a transcript to trash (retention-swept)",
    "x-source": "server.js:5335",
    "x-entitlement": {
     "anyOf": [
      "session-manager"
     ]
    },
    "parameters": [
     {
      "name": "sid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/claude-sessions/{sid}/unarchive": {
   "post": {
    "operationId": "postClaudeSessionsSidUnarchive",
    "tags": [
     "claude-sessions"
    ],
    "summary": "Move a transcript from cold archive back to hot",
    "x-source": "server.js:6663",
    "x-entitlement": {
     "anyOf": [
      "session-manager",
      "session-rejoin"
     ]
    },
    "parameters": [
     {
      "name": "sid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/client-config": {
   "get": {
    "operationId": "getClientConfig",
    "tags": [
     "client-config"
    ],
    "summary": "Served client configuration (63 keys) \u2014 the third rung of the config chain; public",
    "x-source": "server.js:696",
    "security": [],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     }
    }
   }
  },
  "/api/deployments/{id}": {
   "patch": {
    "operationId": "patchDeploymentsId",
    "tags": [
     "deployments"
    ],
    "summary": "Update a deployment record",
    "x-source": "server.js:4824",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/embedded/launch": {
   "post": {
    "operationId": "postEmbeddedLaunch",
    "tags": [
     "embedded"
    ],
    "summary": "Launch an embedded-console session (scope-limited token)",
    "x-source": "lib/embedded-console.js:45",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/files": {
   "get": {
    "operationId": "getFiles",
    "tags": [
     "files"
    ],
    "summary": "List a directory (confined to root allowlist)",
    "x-source": "server.js:7067",
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Directory; must resolve inside a browse root (403 otherwise)"
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/files/activity": {
   "get": {
    "operationId": "getFilesActivity",
    "tags": [
     "files"
    ],
    "summary": "Docs activity map for a directory",
    "x-source": "server.js:7137",
    "x-entitlement": {
     "anyOf": [
      "docs-visuals"
     ]
    },
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/files/mkdir": {
   "post": {
    "operationId": "postFilesMkdir",
    "tags": [
     "files"
    ],
    "summary": "Create a directory (confined)",
    "x-source": "server.js:7236",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/files/raw": {
   "get": {
    "operationId": "getFilesRaw",
    "tags": [
     "files"
    ],
    "summary": "Raw file bytes (confined, size-capped)",
    "x-source": "server.js:7196",
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "File; confined to browse roots"
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/files/read": {
   "get": {
    "operationId": "getFilesRead",
    "tags": [
     "files"
    ],
    "summary": "Read a text file (confined, secrets masked)",
    "x-source": "server.js:7219",
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "File; confined to browse roots"
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/files/save": {
   "post": {
    "operationId": "postFilesSave",
    "tags": [
     "files"
    ],
    "summary": "Save a text file (confined; sensitive basenames refused)",
    "x-source": "server.js:7273",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/files/upload": {
   "post": {
    "operationId": "postFilesUpload",
    "tags": [
     "files"
    ],
    "summary": "Upload into a directory (confined)",
    "x-source": "server.js:7252",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/git-branches": {
   "get": {
    "operationId": "getGitBranches",
    "tags": [
     "git"
    ],
    "summary": "Branches of a repo",
    "x-source": "server.js:6052",
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Repository directory (confined to browse roots)"
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/git-commit-details": {
   "get": {
    "operationId": "getGitCommitDetails",
    "tags": [
     "git"
    ],
    "summary": "One commit with file list",
    "x-source": "server.js:6796",
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Repository directory (confined to browse roots)"
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/git-commit-file-diff": {
   "get": {
    "operationId": "getGitCommitFileDiff",
    "tags": [
     "git"
    ],
    "summary": "Patch for one file in one commit",
    "description": "Repo directory is confined to the filesystem root allowlist (SECSCAN-2026-09-22 S1/S2): a `path` outside every browse root is refused with 403 before git runs.",
    "x-source": "server.js:6886",
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Repository directory (confined to browse roots)"
     },
     {
      "name": "hash",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9a-f]{4,64}$"
      }
     },
     {
      "name": "file",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "repo-relative"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/git-file-at-ref": {
   "get": {
    "operationId": "getGitFileAtRef",
    "tags": [
     "git"
    ],
    "summary": "File content at a commit or the working tree",
    "description": "Repo directory is confined to the filesystem root allowlist (SECSCAN-2026-09-22 S1/S2): a `path` outside every browse root is refused with 403 before git runs. With `ref=working` the file is read from the working tree; credential basenames are refused with 403.",
    "x-source": "server.js:7012",
    "x-entitlement": {
     "anyOf": [
      "git-history"
     ]
    },
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Repository directory (confined to browse roots)"
     },
     {
      "name": "file",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "repo-relative, no .."
      }
     },
     {
      "name": "ref",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "commit hash or \"working\""
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/git-file-history": {
   "get": {
    "operationId": "getGitFileHistory",
    "tags": [
     "git"
    ],
    "summary": "Commit history for one file (--follow)",
    "description": "Repo directory is confined to the filesystem root allowlist (SECSCAN-2026-09-22 S1/S2): a `path` outside every browse root is refused with 403 before git runs.",
    "x-source": "server.js:6967",
    "x-entitlement": {
     "anyOf": [
      "git-history"
     ]
    },
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Repository directory (confined to browse roots)"
     },
     {
      "name": "file",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "repo-relative"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/git-info": {
   "get": {
    "operationId": "getGitInfo",
    "tags": [
     "git"
    ],
    "summary": "Working-tree status summary",
    "x-source": "server.js:6000",
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Repository directory (confined to browse roots)"
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/git-log": {
   "get": {
    "operationId": "getGitLog",
    "tags": [
     "git"
    ],
    "summary": "Paginated commit log",
    "x-source": "server.js:6032",
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Repository directory (confined to browse roots)"
     },
     {
      "name": "page",
      "in": "query",
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/git-working-file-diff": {
   "get": {
    "operationId": "getGitWorkingFileDiff",
    "tags": [
     "git"
    ],
    "summary": "Uncommitted diff for one file",
    "description": "Repo directory is confined to the filesystem root allowlist (SECSCAN-2026-09-22 S1/S2): a `path` outside every browse root is refused with 403 before git runs.",
    "x-source": "server.js:6925",
    "parameters": [
     {
      "name": "path",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Repository directory (confined to browse roots)"
     },
     {
      "name": "file",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "repo-relative"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/git/tasks": {
   "post": {
    "operationId": "postGitTasks",
    "tags": [
     "git"
    ],
    "summary": "Git-tracking task action",
    "x-source": "server.js:3708",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/git/tasks/{taskId}/claim": {
   "post": {
    "operationId": "postGitTasksTaskIdClaim",
    "tags": [
     "git"
    ],
    "summary": "Claim a task",
    "x-source": "server.js:3765",
    "parameters": [
     {
      "name": "taskId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/git/tasks/{taskId}/complete": {
   "post": {
    "operationId": "postGitTasksTaskIdComplete",
    "tags": [
     "git"
    ],
    "summary": "Complete a task",
    "x-source": "server.js:3788",
    "parameters": [
     {
      "name": "taskId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/git/tasks/{taskId}/fail": {
   "post": {
    "operationId": "postGitTasksTaskIdFail",
    "tags": [
     "git"
    ],
    "summary": "Mark a task failed",
    "x-source": "server.js:3809",
    "parameters": [
     {
      "name": "taskId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/git/tasks/{taskId}/handoff": {
   "post": {
    "operationId": "postGitTasksTaskIdHandoff",
    "tags": [
     "git"
    ],
    "summary": "Hand a task off",
    "x-source": "server.js:3830",
    "parameters": [
     {
      "name": "taskId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/git/tasks/all": {
   "get": {
    "operationId": "getGitTasksAll",
    "tags": [
     "git"
    ],
    "summary": "All git-tracking tasks across projects",
    "x-source": "server.js:3877",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/git/tasks/create": {
   "post": {
    "operationId": "postGitTasksCreate",
    "tags": [
     "git"
    ],
    "summary": "Create a git-tracking task",
    "x-source": "server.js:3731",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/guardian/link": {
   "post": {
    "operationId": "postGuardianLink",
    "tags": [
     "guardian"
    ],
    "summary": "Store the Guardian link key",
    "x-source": "server.js:5941",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/guardian/status": {
   "get": {
    "operationId": "getGuardianStatus",
    "tags": [
     "guardian"
    ],
    "summary": "Guardian daemon status",
    "x-source": "server.js:5930",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/heartbeat/activity": {
   "get": {
    "operationId": "getHeartbeatActivity",
    "tags": [
     "heartbeat"
    ],
    "summary": "Recent process activity",
    "x-source": "server.js:5899",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/heartbeat/deps": {
   "get": {
    "operationId": "getHeartbeatDeps",
    "tags": [
     "heartbeat"
    ],
    "summary": "Runtime dependency versions (Node, Claude Code, pm2, Postgres)",
    "x-source": "server.js:5840",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/heartbeat/disk": {
   "get": {
    "operationId": "getHeartbeatDisk",
    "tags": [
     "heartbeat"
    ],
    "summary": "Disk usage for the data volume",
    "x-source": "server.js:5962",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/heartbeat/pm2": {
   "get": {
    "operationId": "getHeartbeatPm2",
    "tags": [
     "heartbeat"
    ],
    "summary": "pm2 process list (+ Guardian systemd services)",
    "x-source": "server.js:5681",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/heartbeat/pm2/{name}/logs": {
   "get": {
    "operationId": "getHeartbeatPm2NameLogs",
    "tags": [
     "heartbeat"
    ],
    "summary": "Tail logs of a process",
    "x-source": "server.js:5816",
    "parameters": [
     {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/heartbeat/pm2/{name}/restart": {
   "post": {
    "operationId": "postHeartbeatPm2NameRestart",
    "tags": [
     "heartbeat"
    ],
    "summary": "Restart a pm2 process or validated systemd service",
    "x-source": "server.js:5736",
    "x-operator-hand": true,
    "parameters": [
     {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/heartbeat/system": {
   "get": {
    "operationId": "getHeartbeatSystem",
    "tags": [
     "heartbeat"
    ],
    "summary": "Host CPU/memory/load with steal",
    "x-source": "server.js:5978",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/integrations": {
   "get": {
    "operationId": "getIntegrations",
    "tags": [
     "integrations"
    ],
    "summary": "List external integrations (masked)",
    "x-source": "server.js:2103",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   },
   "post": {
    "operationId": "postIntegrations",
    "tags": [
     "integrations"
    ],
    "summary": "Create an integration (secret encrypted AES-256-GCM)",
    "x-source": "server.js:2111",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "provider_type": {
          "type": "string",
          "description": "One of the descriptor provider types"
         },
         "label": {
          "type": "string"
         },
         "secret": {
          "type": "string"
         },
         "config": {
          "type": "object",
          "additionalProperties": true
         }
        },
        "required": [
         "provider_type"
        ],
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/integrations/{id}": {
   "patch": {
    "operationId": "patchIntegrationsId",
    "tags": [
     "integrations"
    ],
    "summary": "Update an integration",
    "x-source": "server.js:2131",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteIntegrationsId",
    "tags": [
     "integrations"
    ],
    "summary": "Delete an integration",
    "x-source": "server.js:2159",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/integrations/{id}/health": {
   "post": {
    "operationId": "postIntegrationsIdHealth",
    "tags": [
     "integrations"
    ],
    "summary": "Probe the provider with the stored credential",
    "x-source": "server.js:2261",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/integrations/{id}/reveal": {
   "post": {
    "operationId": "postIntegrationsIdReveal",
    "tags": [
     "integrations"
    ],
    "summary": "Reveal the secret once (audited)",
    "x-source": "server.js:2169",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/license/activate": {
   "post": {
    "operationId": "postLicenseActivate",
    "tags": [
     "license"
    ],
    "summary": "Activate a Lighthouse license",
    "x-source": "lib/lighthouse.js:203",
    "x-operator-hand": true,
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/license/plane": {
   "get": {
    "operationId": "getLicensePlane",
    "tags": [
     "license"
    ],
    "summary": "License plane state (contract 1.0.2)",
    "x-source": "lib/lighthouse.js:180",
    "x-operator-hand": true,
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/license/renew": {
   "post": {
    "operationId": "postLicenseRenew",
    "tags": [
     "license"
    ],
    "summary": "Renew the license with Lighthouse",
    "x-source": "lib/lighthouse.js:242",
    "x-operator-hand": true,
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/mcp/bindings/{personaId}": {
   "get": {
    "operationId": "getMcpBindingsPersonaId",
    "tags": [
     "mcp"
    ],
    "summary": "MCP server bindings for a persona",
    "x-source": "lib/mcp-routes.js:82",
    "parameters": [
     {
      "name": "personaId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "put": {
    "operationId": "putMcpBindingsPersonaId",
    "tags": [
     "mcp"
    ],
    "summary": "Set MCP bindings for a persona",
    "x-source": "lib/mcp-routes.js:89",
    "parameters": [
     {
      "name": "personaId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "bindings": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "server_id": {
             "type": "string"
            },
            "tool_scope": {
             "type": "array",
             "items": {
              "type": "string"
             }
            }
           }
          }
         }
        },
        "required": [
         "bindings"
        ],
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/mcp/local": {
   "post": {
    "operationId": "postMcpLocal",
    "tags": [
     "mcp"
    ],
    "summary": "Register a local (stdio) MCP server",
    "x-source": "lib/mcp-routes.js:114",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "slug": {
          "type": "string"
         },
         "command": {
          "type": "string"
         },
         "args": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "env": {
          "type": "object",
          "additionalProperties": {
           "type": "string"
          }
         }
        },
        "required": [
         "slug",
         "command"
        ],
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/mcp/servers": {
   "get": {
    "operationId": "getMcpServers",
    "tags": [
     "mcp"
    ],
    "summary": "MCP server catalogue (synced from Auth + local)",
    "x-source": "lib/mcp-routes.js:62",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/mcp/sessions/{id}/launch-config": {
   "post": {
    "operationId": "postMcpSessionsIdLaunchConfig",
    "tags": [
     "mcp"
    ],
    "summary": "Mint per-session MCP tokens and the 0600 .mcp.json for a launch",
    "x-source": "lib/mcp-routes.js:139",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/mcp/sync": {
   "post": {
    "operationId": "postMcpSync",
    "tags": [
     "mcp"
    ],
    "summary": "Sync the MCP catalogue from Auth (RFC 8414 discovery)",
    "x-source": "lib/mcp-routes.js:76",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/me": {
   "get": {
    "operationId": "getMe",
    "tags": [
     "me"
    ],
    "summary": "Current principal (subject, idp, profile)",
    "x-source": "server.js:1280",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/models": {
   "get": {
    "operationId": "getModels",
    "tags": [
     "models"
    ],
    "summary": "Live model list per provider with registry fallback",
    "x-source": "server.js:5034",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/personas": {
   "get": {
    "operationId": "getPersonas",
    "tags": [
     "personas"
    ],
    "summary": "Persona registry",
    "x-source": "server.js:5043",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/personas/{id}": {
   "get": {
    "operationId": "getPersonasId",
    "tags": [
     "personas"
    ],
    "summary": "One persona",
    "x-source": "server.js:5047",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "patch": {
    "operationId": "patchPersonasId",
    "tags": [
     "personas"
    ],
    "summary": "Edit a persona (prompt change versions history)",
    "x-source": "server.js:5056",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/personas/{id}/cc-agents": {
   "get": {
    "operationId": "getPersonasIdCcAgents",
    "tags": [
     "personas"
    ],
    "summary": "Sub-agents a persona may spawn",
    "x-source": "server.js:5157",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "put": {
    "operationId": "putPersonasIdCcAgents",
    "tags": [
     "personas"
    ],
    "summary": "Set sub-agents for a persona",
    "x-source": "server.js:5161",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/personas/{id}/mcp-bindings": {
   "put": {
    "operationId": "putPersonasIdMcpBindings",
    "tags": [
     "personas"
    ],
    "summary": "Set MCP bindings (alias)",
    "x-source": "server.js:5268",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/personas/{id}/prompt-history": {
   "get": {
    "operationId": "getPersonasIdPromptHistory",
    "tags": [
     "personas"
    ],
    "summary": "Prompt version history",
    "x-source": "server.js:5063",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/personas/{id}/prompt-revert": {
   "post": {
    "operationId": "postPersonasIdPromptRevert",
    "tags": [
     "personas"
    ],
    "summary": "Revert prompt to a version",
    "x-source": "server.js:5067",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/personas/{id}/skills": {
   "put": {
    "operationId": "putPersonasIdSkills",
    "tags": [
     "personas"
    ],
    "summary": "Set skill packs for a persona",
    "x-source": "server.js:5264",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects": {
   "get": {
    "operationId": "getProjects",
    "tags": [
     "projects"
    ],
    "summary": "List projects",
    "x-source": "server.js:2394",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   },
   "post": {
    "operationId": "postProjects",
    "tags": [
     "projects"
    ],
    "summary": "Create a project",
    "x-source": "server.js:2398",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "working_dir": {
          "type": "string",
          "description": "Absolute path inside a project root"
         },
         "git_repo_path": {
          "type": "string"
         },
         "color": {
          "type": "string",
          "description": "#rrggbb"
         },
         "environment": {
          "type": "string"
         },
         "slug": {
          "type": "string"
         },
         "parent_project_id": {
          "type": "string"
         }
        },
        "required": [
         "name"
        ],
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/projects/{id}": {
   "patch": {
    "operationId": "patchProjectsId",
    "tags": [
     "projects"
    ],
    "summary": "Update a project (ladder, colour, env)",
    "x-source": "server.js:2474",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteProjectsId",
    "tags": [
     "projects"
    ],
    "summary": "Delete a project",
    "x-source": "server.js:2545",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{id}/duplicate": {
   "post": {
    "operationId": "postProjectsIdDuplicate",
    "tags": [
     "projects"
    ],
    "summary": "Duplicate a project",
    "x-source": "server.js:2560",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{id}/init-tracking": {
   "post": {
    "operationId": "postProjectsIdInitTracking",
    "tags": [
     "projects"
    ],
    "summary": "Seed tracking/ in the repo",
    "x-source": "server.js:2701",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{id}/promote": {
   "post": {
    "operationId": "postProjectsIdPromote",
    "tags": [
     "projects"
    ],
    "summary": "Promote one stage up the ladder \u2014 operator-hand",
    "description": "Runs the whole ladder from the `from` stage to the adjacent `to` stage, one rung at a time: verify (with verify-autoclean when autoclean is on), plan, test, push-source, push-target, advance, install, migrate, restart, config, health. Each rung is recorded as a step with its own name, and a failure halts the run at that rung and returns the step log with the queued commits. The response also carries `prevHead` and `newHead`. A successful run writes a `commander.deployments` row. This is an operator-hand action: an agent must not run it.",
    "x-source": "server.js:2895",
    "x-entitlement": {
     "anyOf": [
      "deploy-ladder"
     ]
    },
    "x-operator-hand": true,
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "from": {
          "type": "string",
          "description": "source stage name, as named in the project's ladder"
         },
         "to": {
          "type": "string",
          "description": "target stage name \u2014 the rung immediately above `from`"
         },
         "dryRun": {
          "type": "boolean",
          "description": "plan only: run the read-only rungs and return the step log without moving anything"
         },
         "reason": {
          "type": "string",
          "description": "recorded as the deployment's trigger reason; required when `override` is set"
         },
         "override": {
          "type": "boolean",
          "description": "audited dirty-tree override (FEAT-046). Refused unless the promote_allow_override setting is on; the server still rechecks fast-forward safety and never clobbers."
         }
        },
        "required": [
         "from",
         "to"
        ],
        "additionalProperties": false
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{id}/promotion-status": {
   "get": {
    "operationId": "getProjectsIdPromotionStatus",
    "tags": [
     "projects"
    ],
    "summary": "Ladder status per rung",
    "x-source": "server.js:3209",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{id}/rollback": {
   "post": {
    "operationId": "postProjectsIdRollback",
    "tags": [
     "projects"
    ],
    "summary": "Rewind one stage to an earlier commit \u2014 operator-hand",
    "description": "Rewinds `stage` to `toSha`, recording a `rewind` step, then re-runs restart and health. Links the deployment being restored when the target sha has a prior successful journal entry on that stage.",
    "x-source": "server.js:3115",
    "x-entitlement": {
     "anyOf": [
      "deploy-ladder"
     ]
    },
    "x-operator-hand": true,
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "stage": {
          "type": "string",
          "description": "stage name to rewind"
         },
         "toSha": {
          "type": "string",
          "description": "commit to rewind to; must be a rollback candidate for that stage"
         },
         "dryRun": {
          "type": "boolean"
         },
         "reason": {
          "type": "string"
         },
         "confirm": {
          "type": "boolean",
          "description": "explicit confirmation; a rewind is not run without it"
         }
        },
        "required": [
         "stage",
         "toSha"
        ],
        "additionalProperties": false
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{id}/rollback-candidates": {
   "get": {
    "operationId": "getProjectsIdRollbackCandidates",
    "tags": [
     "projects"
    ],
    "summary": "Rollback candidates",
    "x-source": "server.js:3088",
    "x-entitlement": {
     "anyOf": [
      "deploy-ladder"
     ]
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{id}/verify-git-path": {
   "post": {
    "operationId": "postProjectsIdVerifyGitPath",
    "tags": [
     "projects"
    ],
    "summary": "Validate a git path against project roots",
    "x-source": "server.js:2637",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/active-model": {
   "get": {
    "operationId": "getProjectsPidActiveModel",
    "tags": [
     "projects"
    ],
    "summary": "Model currently active in the project sessions",
    "x-source": "server.js:6733",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/build-notes": {
   "get": {
    "operationId": "getProjectsPidBuildNotes",
    "tags": [
     "projects"
    ],
    "summary": "Build notes",
    "x-source": "server.js:4634",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "post": {
    "operationId": "postProjectsPidBuildNotes",
    "tags": [
     "projects"
    ],
    "summary": "Add a build note",
    "x-source": "server.js:4641",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/commit-meta": {
   "get": {
    "operationId": "getProjectsPidCommitMeta",
    "tags": [
     "projects"
    ],
    "summary": "Commit metadata (task ids) for hashes",
    "x-source": "server.js:4789",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/deployments": {
   "get": {
    "operationId": "getProjectsPidDeployments",
    "tags": [
     "projects"
    ],
    "summary": "Deployment history",
    "x-source": "server.js:4758",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "post": {
    "operationId": "postProjectsPidDeployments",
    "tags": [
     "projects"
    ],
    "summary": "Record a deployment",
    "x-source": "server.js:4813",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/git-tracking/changelog": {
   "get": {
    "operationId": "getProjectsPidGitTrackingChangelog",
    "tags": [
     "projects"
    ],
    "summary": "tracking/CHANGELOG",
    "x-source": "server.js:4229",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/git-tracking/notes": {
   "get": {
    "operationId": "getProjectsPidGitTrackingNotes",
    "tags": [
     "projects"
    ],
    "summary": "tracking notes",
    "x-source": "server.js:4079",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "post": {
    "operationId": "postProjectsPidGitTrackingNotes",
    "tags": [
     "projects"
    ],
    "summary": "Create a note file",
    "x-source": "server.js:4122",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/git-tracking/notes/{filename}": {
   "patch": {
    "operationId": "patchProjectsPidGitTrackingNotesFilename",
    "tags": [
     "projects"
    ],
    "summary": "Edit a note",
    "x-source": "server.js:4155",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "filename",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteProjectsPidGitTrackingNotesFilename",
    "tags": [
     "projects"
    ],
    "summary": "Delete a note",
    "x-source": "server.js:4189",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "filename",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/git-tracking/roadmap": {
   "get": {
    "operationId": "getProjectsPidGitTrackingRoadmap",
    "tags": [
     "projects"
    ],
    "summary": "tracking roadmap",
    "x-source": "server.js:4211",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/git-tracking/tasks": {
   "get": {
    "operationId": "getProjectsPidGitTrackingTasks",
    "tags": [
     "projects"
    ],
    "summary": "tracking task files (frontmatter parsed)",
    "x-source": "server.js:3939",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "post": {
    "operationId": "postProjectsPidGitTrackingTasks",
    "tags": [
     "projects"
    ],
    "summary": "Create a task file",
    "x-source": "server.js:3986",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/git-tracking/tasks/{filename}": {
   "patch": {
    "operationId": "patchProjectsPidGitTrackingTasksFilename",
    "tags": [
     "projects"
    ],
    "summary": "Edit a task file",
    "x-source": "server.js:4019",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "filename",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteProjectsPidGitTrackingTasksFilename",
    "tags": [
     "projects"
    ],
    "summary": "Delete a task file",
    "x-source": "server.js:4055",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "filename",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/github-builds": {
   "get": {
    "operationId": "getProjectsPidGithubBuilds",
    "tags": [
     "projects"
    ],
    "summary": "GitHub build status",
    "x-source": "server.js:4247",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/sessions": {
   "get": {
    "operationId": "getProjectsPidSessions",
    "tags": [
     "projects"
    ],
    "summary": "Sessions of a project",
    "x-source": "server.js:3569",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "post": {
    "operationId": "postProjectsPidSessions",
    "tags": [
     "projects"
    ],
    "summary": "Create a session (shell or Claude Code launch via the launcher command)",
    "x-source": "server.js:3608",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "command": {
          "type": "string",
          "description": "Launcher-rendered claude command (buildClaudeCommand) or empty for a shell"
         },
         "persona_id": {
          "type": "string"
         },
         "account_id": {
          "type": "string"
         },
         "model_override": {
          "type": "string"
         },
         "provider_override": {
          "type": "string"
         },
         "cols": {
          "type": "integer"
         },
         "rows": {
          "type": "integer"
         }
        },
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/sessions/archived": {
   "get": {
    "operationId": "getProjectsPidSessionsArchived",
    "tags": [
     "projects"
    ],
    "summary": "Archived sessions",
    "x-source": "server.js:4907",
    "x-entitlement": {
     "anyOf": [
      "session-rejoin"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/tasks": {
   "get": {
    "operationId": "getProjectsPidTasks",
    "tags": [
     "projects"
    ],
    "summary": "DB tasks",
    "x-source": "server.js:4677",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "post": {
    "operationId": "postProjectsPidTasks",
    "tags": [
     "projects"
    ],
    "summary": "Create a DB task",
    "x-source": "server.js:4687",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/ui-tests": {
   "get": {
    "operationId": "getProjectsPidUiTests",
    "tags": [
     "projects"
    ],
    "summary": "UI test records",
    "x-source": "server.js:4841",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "post": {
    "operationId": "postProjectsPidUiTests",
    "tags": [
     "projects"
    ],
    "summary": "Record a UI test",
    "x-source": "server.js:4848",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/{pid}/upload": {
   "post": {
    "operationId": "postProjectsPidUpload",
    "tags": [
     "projects"
    ],
    "summary": "Upload into the project",
    "x-source": "server.js:4588",
    "parameters": [
     {
      "name": "pid",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/init-git-repo": {
   "post": {
    "operationId": "postProjectsInitGitRepo",
    "tags": [
     "projects"
    ],
    "summary": "git init a new project directory",
    "x-source": "server.js:3282",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/projects/resolve/{key}": {
   "get": {
    "operationId": "getProjectsResolveKey",
    "tags": [
     "projects"
    ],
    "summary": "Resolve short id / slug / uuid to a project",
    "x-source": "server.js:2429",
    "parameters": [
     {
      "name": "key",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/projects/slug-check": {
   "get": {
    "operationId": "getProjectsSlugCheck",
    "tags": [
     "projects"
    ],
    "summary": "Is a slug free?",
    "x-source": "server.js:2367",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/projects/slug-suggestions": {
   "get": {
    "operationId": "getProjectsSlugSuggestions",
    "tags": [
     "projects"
    ],
    "summary": "Suggested slugs",
    "x-source": "server.js:2381",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/prompts": {
   "get": {
    "operationId": "getPrompts",
    "tags": [
     "prompts"
    ],
    "summary": "Prompt library",
    "x-source": "server.js:4462",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   },
   "post": {
    "operationId": "postPrompts",
    "tags": [
     "prompts"
    ],
    "summary": "Add a prompt",
    "x-source": "server.js:4480",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/prompts/{id}": {
   "patch": {
    "operationId": "patchPromptsId",
    "tags": [
     "prompts"
    ],
    "summary": "Edit a prompt",
    "x-source": "server.js:4489",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deletePromptsId",
    "tags": [
     "prompts"
    ],
    "summary": "Delete a prompt",
    "x-source": "server.js:4499",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/prompts/{id}/use": {
   "post": {
    "operationId": "postPromptsIdUse",
    "tags": [
     "prompts"
    ],
    "summary": "Count a use",
    "x-source": "server.js:4505",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/release-notes": {
   "get": {
    "operationId": "getReleaseNotes",
    "tags": [
     "release-notes"
    ],
    "summary": "Latest release notes",
    "x-source": "server.js:839",
    "x-entitlement": {
     "anyOf": [
      "releases-tab"
     ]
    },
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/release-notes/{version}": {
   "get": {
    "operationId": "getReleaseNotesVersion",
    "tags": [
     "release-notes"
    ],
    "summary": "Release notes for a version",
    "x-source": "server.js:876",
    "x-entitlement": {
     "anyOf": [
      "releases-tab"
     ]
    },
    "parameters": [
     {
      "name": "version",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/release-notes/list": {
   "get": {
    "operationId": "getReleaseNotesList",
    "tags": [
     "release-notes"
    ],
    "summary": "Release list",
    "x-source": "server.js:855",
    "x-entitlement": {
     "anyOf": [
      "releases-tab"
     ]
    },
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/screenshots": {
   "get": {
    "operationId": "getScreenshots",
    "tags": [
     "screenshots"
    ],
    "summary": "Screenshot library (paged)",
    "x-source": "server.js:4334",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   },
   "post": {
    "operationId": "postScreenshots",
    "tags": [
     "screenshots"
    ],
    "summary": "Upload a screenshot",
    "x-source": "server.js:4308",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/screenshots/{id}": {
   "patch": {
    "operationId": "patchScreenshotsId",
    "tags": [
     "screenshots"
    ],
    "summary": "Edit metadata",
    "x-source": "server.js:4358",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteScreenshotsId",
    "tags": [
     "screenshots"
    ],
    "summary": "Delete",
    "x-source": "server.js:4369",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/screenshots/{id}/annotate": {
   "post": {
    "operationId": "postScreenshotsIdAnnotate",
    "tags": [
     "screenshots"
    ],
    "summary": "Bake annotations into the image",
    "x-source": "server.js:4382",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/screenshots/{id}/base": {
   "get": {
    "operationId": "getScreenshotsIdBase",
    "tags": [
     "screenshots"
    ],
    "summary": "Original (pre-annotation) image",
    "x-source": "server.js:4406",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/screenshots/{id}/tag": {
   "post": {
    "operationId": "postScreenshotsIdTag",
    "tags": [
     "screenshots"
    ],
    "summary": "Tag / categorise",
    "x-source": "server.js:4510",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/service-accounts": {
   "get": {
    "operationId": "getServiceAccounts",
    "tags": [
     "service-accounts"
    ],
    "summary": "Provider accounts (secrets masked)",
    "x-source": "server.js:1390",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   },
   "post": {
    "operationId": "postServiceAccounts",
    "tags": [
     "service-accounts"
    ],
    "summary": "Add an account",
    "x-source": "server.js:1424",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/service-accounts/{id}": {
   "patch": {
    "operationId": "patchServiceAccountsId",
    "tags": [
     "service-accounts"
    ],
    "summary": "Edit",
    "x-source": "server.js:1888",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteServiceAccountsId",
    "tags": [
     "service-accounts"
    ],
    "summary": "Delete (refused if dependents)",
    "x-source": "server.js:1935",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/service-accounts/{id}/dependents": {
   "get": {
    "operationId": "getServiceAccountsIdDependents",
    "tags": [
     "service-accounts"
    ],
    "summary": "Personas/sessions using this account",
    "x-source": "server.js:2013",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/service-accounts/{id}/oauth-code": {
   "post": {
    "operationId": "postServiceAccountsIdOauthCode",
    "tags": [
     "service-accounts"
    ],
    "summary": "Relay the OAuth code to the CLI login flow (rate-limited)",
    "x-source": "server.js:1766",
    "x-rate-limited": true,
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/service-accounts/{id}/start-oauth": {
   "post": {
    "operationId": "postServiceAccountsIdStartOauth",
    "tags": [
     "service-accounts"
    ],
    "summary": "Start a CLI OAuth login (rate-limited)",
    "x-source": "server.js:1724",
    "x-rate-limited": true,
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/service-accounts/{id}/usage": {
   "get": {
    "operationId": "getServiceAccountsIdUsage",
    "tags": [
     "service-accounts"
    ],
    "summary": "Usage for one account",
    "x-source": "server.js:2028",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/service-accounts/{id}/verify": {
   "post": {
    "operationId": "postServiceAccountsIdVerify",
    "tags": [
     "service-accounts"
    ],
    "summary": "Verify credential against the provider",
    "x-source": "server.js:1988",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/service-accounts/limit-status": {
   "get": {
    "operationId": "getServiceAccountsLimitStatus",
    "tags": [
     "service-accounts"
    ],
    "summary": "Account count vs entitlement",
    "x-source": "server.js:1400",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/service-accounts/oauth-status/{id}": {
   "get": {
    "operationId": "getServiceAccountsOauthStatusId",
    "tags": [
     "service-accounts"
    ],
    "summary": "OAuth flow status",
    "x-source": "server.js:1872",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/sessions/{id}": {
   "patch": {
    "operationId": "patchSessionsId",
    "tags": [
     "sessions"
    ],
    "summary": "Rename / set overrides on a session",
    "x-source": "server.js:3618",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteSessionsId",
    "tags": [
     "sessions"
    ],
    "summary": "Kill and delete a session",
    "x-source": "server.js:3635",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/sessions/{id}/archive": {
   "patch": {
    "operationId": "patchSessionsIdArchive",
    "tags": [
     "sessions"
    ],
    "summary": "Archive (park) a session",
    "x-source": "server.js:4876",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/sessions/{id}/messages": {
   "get": {
    "operationId": "getSessionsIdMessages",
    "tags": [
     "sessions"
    ],
    "summary": "Chat sidecar messages",
    "x-source": "server.js:3650",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "post": {
    "operationId": "postSessionsIdMessages",
    "tags": [
     "sessions"
    ],
    "summary": "Append a chat message",
    "x-source": "server.js:3671",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteSessionsIdMessages",
    "tags": [
     "sessions"
    ],
    "summary": "Clear chat messages",
    "x-source": "server.js:3680",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/sessions/{id}/restart-cc": {
   "post": {
    "operationId": "postSessionsIdRestartCc",
    "tags": [
     "sessions"
    ],
    "summary": "Restart Claude Code in the PTY (resume)",
    "x-source": "server.js:3662",
    "x-entitlement": {
     "anyOf": [
      "session-manager",
      "session-rejoin"
     ]
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/sessions/{id}/restore": {
   "get": {
    "operationId": "getSessionsIdRestore",
    "tags": [
     "sessions"
    ],
    "summary": "Scrollback for reconnect",
    "x-source": "server.js:3685",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/sessions/{id}/usage": {
   "get": {
    "operationId": "getSessionsIdUsage",
    "tags": [
     "sessions"
    ],
    "summary": "Token usage for the session transcript",
    "x-source": "server.js:6719",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/settings": {
   "get": {
    "operationId": "getSettings",
    "tags": [
     "settings"
    ],
    "summary": "Instance settings (secrets masked)",
    "x-source": "server.js:1298",
    "x-operator-hand": true,
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   },
   "patch": {
    "operationId": "patchSettings",
    "tags": [
     "settings"
    ],
    "summary": "Update settings; login-critical keys need x-current-password (428) \u2014 operator-hand",
    "description": "Any settings key from the reference catalogue. Keys on the login seam (app_password, auth_mode, auth_oidc_*, mcp_auth_base_url) require the x-current-password header (RFC 6585 428 otherwise; 422 when the write would strand login). Operator-hand.",
    "x-source": "server.js:1314",
    "x-operator-hand": true,
    "parameters": [
     {
      "name": "x-current-password",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Step-up proof for login-critical keys"
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/skill-packs": {
   "get": {
    "operationId": "getSkillPacks",
    "tags": [
     "skill-packs"
    ],
    "summary": "Skill packs on disk",
    "x-source": "server.js:5260",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/tasks/{id}": {
   "patch": {
    "operationId": "patchTasksId",
    "tags": [
     "tasks"
    ],
    "summary": "Edit a DB task",
    "x-source": "server.js:4712",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteTasksId",
    "tags": [
     "tasks"
    ],
    "summary": "Delete a DB task",
    "x-source": "server.js:4728",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/tasks/reorder": {
   "patch": {
    "operationId": "patchTasksReorder",
    "tags": [
     "tasks"
    ],
    "summary": "Reorder tasks",
    "x-source": "server.js:4702",
    "x-entitlement": {
     "anyOf": [
      "tasks-notes"
     ]
    },
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/transcripts/export": {
   "get": {
    "operationId": "getTranscriptsExport",
    "tags": [
     "transcripts"
    ],
    "summary": "Export transcripts",
    "x-source": "server.js:6672",
    "x-entitlement": {
     "anyOf": [
      "session-manager"
     ]
    },
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/transcripts/flood-status": {
   "get": {
    "operationId": "getTranscriptsFloodStatus",
    "tags": [
     "transcripts"
    ],
    "summary": "Runaway-population alerts",
    "x-source": "server.js:6645",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/transcripts/stats": {
   "get": {
    "operationId": "getTranscriptsStats",
    "tags": [
     "transcripts"
    ],
    "summary": "Corpus statistics (hot/cold/trash, kinds)",
    "x-source": "server.js:6628",
    "x-entitlement": {
     "anyOf": [
      "session-manager",
      "session-rejoin"
     ]
    },
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "403": {
      "$ref": "#/components/responses/Forbidden"
     }
    }
   }
  },
  "/api/tunables": {
   "get": {
    "operationId": "getTunables",
    "tags": [
     "tunables"
    ],
    "summary": "Tunables registry with resolved values and provenance (FEAT-055)",
    "x-source": "server.js:1310",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/ui-tests/{id}": {
   "patch": {
    "operationId": "patchUiTestsId",
    "tags": [
     "ui-tests"
    ],
    "summary": "Edit a UI test record",
    "x-source": "server.js:4859",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/upload": {
   "post": {
    "operationId": "postUpload",
    "tags": [
     "upload"
    ],
    "summary": "Generic upload",
    "x-source": "server.js:4565",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/usage/stats": {
   "get": {
    "operationId": "getUsageStats",
    "tags": [
     "usage"
    ],
    "summary": "Token/cost analytics (per-file fold cache, message-id dedup)",
    "x-source": "lib/usage-stats.js:625",
    "parameters": [
     {
      "name": "days",
      "in": "query",
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "account",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "project",
      "in": "query",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/usage/stats/progress": {
   "get": {
    "operationId": "getUsageStatsProgress",
    "tags": [
     "usage"
    ],
    "summary": "Scan progress",
    "x-source": "lib/usage-stats.js:717",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/usage/window": {
   "get": {
    "operationId": "getUsageWindow",
    "tags": [
     "usage"
    ],
    "summary": "Rate-window meters",
    "x-source": "lib/usage-stats.js:682",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/vault": {
   "get": {
    "operationId": "getVault",
    "tags": [
     "vault"
    ],
    "summary": "Vault entries (masked)",
    "x-source": "server.js:2197",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   },
   "post": {
    "operationId": "postVault",
    "tags": [
     "vault"
    ],
    "summary": "Create an entry; generate:true returns the secret once",
    "x-source": "server.js:2209",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string",
          "description": "Unique, case-insensitive; upsert key for the agent CLI"
         },
         "category": {
          "type": "string"
         },
         "username": {
          "type": "string"
         },
         "url": {
          "type": "string",
          "description": "Absolute http(s) URL (RFC 3986)"
         },
         "secret": {
          "type": "string"
         },
         "generate": {
          "type": "boolean",
          "description": "Server generates; plaintext returned once as `generated`"
         },
         "notes": {
          "type": "string"
         },
         "tags": {
          "type": "array",
          "items": {
           "type": "string"
          }
         }
        },
        "required": [
         "name"
        ],
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  },
  "/api/vault/{id}": {
   "patch": {
    "operationId": "patchVaultId",
    "tags": [
     "vault"
    ],
    "summary": "Edit; rotate:true regenerates",
    "x-source": "server.js:2223",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   },
   "delete": {
    "operationId": "deleteVaultId",
    "tags": [
     "vault"
    ],
    "summary": "Delete",
    "x-source": "server.js:2248",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/vault/{id}/reveal": {
   "post": {
    "operationId": "postVaultIdReveal",
    "tags": [
     "vault"
    ],
    "summary": "Reveal once (audited, auto-hide window served)",
    "x-source": "server.js:2238",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/BadRequest"
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     },
     "404": {
      "$ref": "#/components/responses/NotFound"
     }
    }
   }
  },
  "/api/vault/generate": {
   "get": {
    "operationId": "getVaultGenerate",
    "tags": [
     "vault"
    ],
    "summary": "Generate a password with the shared generator",
    "x-source": "server.js:2203",
    "security": [
     {
      "cookieAuth": []
     },
     {
      "headerAuth": []
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": true
        }
       }
      }
     },
     "401": {
      "$ref": "#/components/responses/Unauthorized"
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "cookieAuth": {
    "type": "apiKey",
    "in": "cookie",
    "name": "commander_token",
    "description": "Opaque session token issued by POST /api/auth (stored server-side as a SHA-256 digest; SameSite + Secure)."
   },
   "headerAuth": {
    "type": "apiKey",
    "in": "header",
    "name": "x-auth-token",
    "description": "Same opaque token as the cookie, for automation clients."
   }
  },
  "responses": {
   "BadRequest": {
    "description": "Validation error",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Unauthorized": {
    "description": "Not authenticated",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Forbidden": {
    "description": "Forbidden (entitlement, confinement, or scope)",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "NotFound": {
    "description": "Not found",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "Conflict": {
    "description": "Conflict",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "UnprocessableContent": {
    "description": "Incoherent write refused",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "StepUpRequired": {
    "description": "Step-up required (RFC 6585) \u2014 resend with x-current-password",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "string"
     },
     "hint": {
      "type": "string"
     },
     "touched": {
      "type": "array",
      "items": {
       "type": "string"
      }
     }
    },
    "additionalProperties": true
   }
  }
 }
}