docs: OpenAPI and API.md cover every route; drop removed endpoints; guard config writes

- openapi-extra/run.js describes tmux pane runs only: the removed
  POST /api/run/{id}/message and stream-json run_stream/run_input_ack are gone.
- 108 operations added to OpenAPI (lanes, run, settings, reports, cc-config,
  pets, ai-proxies, tool-profiles, ai-tools, snapshots, locks, ...);
  openapi.yaml regenerated.
- docs/API.md: 74 routes added, 4 endpoints that no longer exist removed.
- Role is `developer`, not `member` (CLI.md, DATABASE.md, OVERVIEW.md);
  `agenthub update` -> `update-check`; help lists `server install-system|tools`
  and `users provision`; ARCHITECTURE.md's stale paths and names fixed.
- cc-config/codex-config writes carry sameOriginGuard (an MCP server or plugin
  is code Claude runs later), with a test; `command -v` takes its name as $1.
This commit is contained in:
2026-10-22 12:17:18 +07:00
parent 50ac0f0daf
commit 57f02f0d89
19 changed files with 8345 additions and 1531 deletions
+59
View File
@@ -1903,6 +1903,65 @@ const paths = {
},
},
},
patch: {
tags: ["CcConfig"],
summary: "Merge keys into one settings layer",
description:
'Sets and/or unsets dotted keys (`set: {"hooks.PreToolUse": [...]}`, `unset: ["model"]`) in one settings.json layer. The file is re-read unredacted and only the named keys change; a value containing the `<redacted>` placeholder is refused (`EREDACTED`). The project layers resolve against the SERVER\'s cwd, never `?cwd=`. An existing file is backed up first. Broadcasts `cc_config_changed`. Admin-only in server mode.',
operationId: "ccConfigPatchSettings",
requestBody: {
required: true,
content: {
"application/json": {
schema: {
type: "object",
required: ["scope"],
properties: {
scope: { type: "string", enum: ["user", "project", "project-local"] },
set: { type: "object", additionalProperties: true },
unset: { type: "array", items: { type: "string" } },
},
},
},
},
},
responses: {
200: {
description: "Written (or nothing changed).",
content: {
"application/json": {
schema: {
type: "object",
properties: {
path: { type: "string" },
backupPath: { type: "string", nullable: true },
created: { type: "boolean" },
changed: { type: "array", items: { type: "string" } },
},
},
},
},
},
400: {
description: "`EBADSCOPE`, `EBADCONTENT` (nothing to change) or `EREDACTED`.",
content: {
"application/json": { schema: { $ref: "#/components/schemas/ErrorResponse" } },
},
},
409: {
description: "`EBADJSON` — the file on disk is not a JSON object; fix it by hand.",
content: {
"application/json": { schema: { $ref: "#/components/schemas/ErrorResponse" } },
},
},
413: {
description: "`ETOOLARGE`.",
content: {
"application/json": { schema: { $ref: "#/components/schemas/ErrorResponse" } },
},
},
},
},
},
"/api/cc-config/memory": {