{
  "formatVersion": 1,
  "generatedOn": "2026-10-23",
  "basePath": "/api",
  "endpointCount": 106,
  "endpoints": [
    {
      "method": "GET",
      "path": "/api/ai-help/conversations/:id",
      "description": "GET /api/ai-help/conversations/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/ai-help.ts",
        "line": 1101
      },
      "contract": "Stored chat/context and active request ID, with known protected values redacted from message text.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/ai-help/conversations/new",
      "description": "POST /api/ai-help/conversations/new",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/ai-help.ts",
        "line": 1096
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/ai-help/conversations/resolve",
      "description": "POST /api/ai-help/conversations/resolve",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/ai-help.ts",
        "line": 1093
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/ai-help/executor-review/activate",
      "description": "POST /api/ai-help/executor-review/activate",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/ai-help.ts",
        "line": 1050
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/ai-help/messages",
      "description": "POST /api/ai-help/messages",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          202
        ],
        "fields": []
      },
      "source": {
        "file": "server/ai-help.ts",
        "line": 1092
      },
      "contract": "`{requestId,conversationId,mode,message,thinking,context}`; UUID identifiers generated before sending; message up to 20,000 characters; mode `help` (default) or `executor`; thinking `low`, `medium`, `high` or `xhigh`, defaulting to Medium for Help and High for Executor. Context contains optional workspace/workflow IDs, saved workflow revision, selected node IDs and view. Accepts asynchronous work with HTTP 202 and returns its request.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/ai-help/proposals/:id",
      "description": "GET /api/ai-help/proposals/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/ai-help.ts",
        "line": 1053
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/ai-help/proposals/:id/actions/:actionId/apply",
      "description": "POST /api/ai-help/proposals/:id/actions/:actionId/apply",
      "request": {
        "path": [
          "actionId",
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedProposalRevision"
      ],
      "source": {
        "file": "server/ai-help.ts",
        "line": 1066
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/ai-help/proposals/:id/actions/:actionId/reject",
      "description": "POST /api/ai-help/proposals/:id/actions/:actionId/reject",
      "request": {
        "path": [
          "actionId",
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedProposalRevision"
      ],
      "source": {
        "file": "server/ai-help.ts",
        "line": 1081
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/ai-help/proposals/:id/apply",
      "description": "POST /api/ai-help/proposals/:id/apply",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedProposalRevision"
      ],
      "source": {
        "file": "server/ai-help.ts",
        "line": 1058
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/ai-help/proposals/:id/reject",
      "description": "POST /api/ai-help/proposals/:id/reject",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedProposalRevision"
      ],
      "source": {
        "file": "server/ai-help.ts",
        "line": 1058
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/ai-help/requests/:id",
      "description": "GET /api/ai-help/requests/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/ai-help.ts",
        "line": 1097
      },
      "contract": "Request status `pending`, `succeeded`, `failed` or `uncertain`, scoped context and eventual reply/error. Polling does not resend the agent turn.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/ai-help/status",
      "description": "GET /api/ai-help/status",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/ai-help.ts",
        "line": 1049
      },
      "contract": "Local configuration readiness, agent/model, default thinking and supported levels. Configured is not a live inference/authentication check.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/bootstrap",
      "description": "GET /api/bootstrap",
      "request": {
        "path": [],
        "query": [
          "view"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "definitions",
          "libraryFolders",
          "libraryMetadata",
          "libraryPacks",
          "runs",
          "secrets",
          "settings",
          "workflows",
          "workspaceLibraries",
          "workspaces"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 445
      },
      "contract": "`{workspaces, definitions, workflows, runs, secrets, settings, libraryFolders, libraryMetadata}` — Latest definition version per ID; newest 100 runs; secret names/times and separate organization records",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/collections",
      "description": "POST /api/collections",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/collections.ts",
        "line": 135
      },
      "contract": "Publish a new collection node, exact list types and explicit array validator using a pinned typed subflow body. The request selects item/index/result sockets, concurrency, item limit and failure policy. No parent workflow save or execution occurs.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/connections",
      "description": "GET /api/connections",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/connections.ts",
        "line": 348
      },
      "contract": "Profile metadata, credential-name references, expiry, scopes and verification state; no credential values.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/connections",
      "description": "POST /api/connections",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/connections.ts",
        "line": 377
      },
      "contract": "Create with `expectedRevision:0`; selected credentials reference existing encrypted Settings secrets.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/connections/:id",
      "description": "DELETE /api/connections/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "ok"
        ]
      },
      "inlineConcurrencyFields": [
        "expectedRevision"
      ],
      "source": {
        "file": "server/connections.ts",
        "line": 379
      },
      "contract": "Exact `expectedRevision` guard; deletion rejects saved definition/workflow and active execution snapshot references.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/connections/:id",
      "description": "GET /api/connections/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/connections.ts",
        "line": 349
      },
      "contract": "Profile metadata, credential-name references, expiry, scopes and verification state; no credential values.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/connections/:id",
      "description": "PUT /api/connections/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/connections.ts",
        "line": 378
      },
      "contract": "Exact `expectedRevision` guard; deletion rejects saved definition/workflow and active execution snapshot references.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/connections/:id/check",
      "description": "POST /api/connections/:id/check",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedRevision"
      ],
      "source": {
        "file": "server/connections.ts",
        "line": 410
      },
      "contract": "Explicit revision-guarded credential check using the configured GET endpoint. Response bodies are discarded and redirects rejected.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/connections/:id/refresh",
      "description": "POST /api/connections/:id/refresh",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": [
          "expectedRevision"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedRevision"
      ],
      "source": {
        "file": "server/connections.ts",
        "line": 447
      },
      "contract": "Explicit revision-guarded OAuth refresh; rotation is persisted and uncertain outcomes are blocked from automatic repetition.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/context-docs",
      "description": "GET /api/context-docs",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/context-docs.ts",
        "line": 159
      },
      "contract": "`{target,markdown,revision,updatedAt?}`. A valid target without notes returns empty Markdown and revision 0.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/context-docs",
      "description": "PUT /api/context-docs",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          409
        ],
        "fields": [
          "current",
          "error"
        ]
      },
      "source": {
        "file": "server/context-docs.ts",
        "line": 160
      },
      "contract": "`{target,markdown,expectedRevision}`. Exact compare-and-swap; a stale write returns 409 plus the current record and preserves the editor's draft. Empty Markdown clears content while advancing the revision.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/context-docs/search",
      "description": "GET /api/context-docs/search",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/context-docs.ts",
        "line": 158
      },
      "contract": "Optional `query`, `kind`, `workspaceId`, `workflowId`, `offset` and `limit` (1–100, default 30). Every query word must match the Markdown/scope names. Returns paged metadata/excerpts; use the exact target read for full Markdown.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/control-flow/merge",
      "description": "POST /api/control-flow/merge",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/control-flow.ts",
        "line": 127
      },
      "contract": "`{name,type,typeVersion?,branches}`; 201 new typed merge. Alternatives 2–8; custom type versions are required and exact, primitive types have no version.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/definitions",
      "description": "POST /api/definitions",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 583
      },
      "contract": "Definition authoring fields — `201 Definition` — Server assigns ID/version 1/timestamps",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/definitions/:id",
      "description": "DELETE /api/definitions/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "ok"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 610
      },
      "contract": "No body — `200 {ok:true}` — Removes all versions; `404` unknown; `409` if referenced",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/definitions/:id",
      "description": "GET /api/definitions/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [
          "version"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 600
      },
      "contract": "No body — `200 Definition[]` — All versions newest first; unknown ID returns `[]`",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/definitions/:id",
      "description": "PUT /api/definitions/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 589
      },
      "contract": "Partial definition fields plus optional `expectedVersion` — `200 Definition` — Merges latest version, creates next version; kind cannot change; provided stale expected version returns 409",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/definitions/:id/versions",
      "description": "GET /api/definitions/:id/versions",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 599
      },
      "contract": "No body — `200 Definition[]` — All versions newest first; unknown ID returns `[]`",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/definitions/test",
      "description": "POST /api/definitions/test",
      "request": {
        "path": [],
        "query": [],
        "body": [
          "config",
          "definition",
          "input",
          "inputs"
        ]
      },
      "response": {
        "statuses": [],
        "fields": [
          "durationMs",
          "logs",
          "outputs"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 504
      },
      "contract": "Test payload below — `200 TestResult` — Executes draft code without publication; type tests check schema value",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/errors",
      "description": "GET /api/errors",
      "request": {
        "path": [],
        "query": [
          "view",
          "workspaceId"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/error-events.ts",
        "line": 90
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/errors/:id",
      "description": "GET /api/errors/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          404
        ],
        "fields": [
          "error",
          "value"
        ]
      },
      "source": {
        "file": "server/error-events.ts",
        "line": 128
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/events",
      "description": "GET /api/events",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 934
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/export",
      "description": "GET /api/export",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "contextDocumentation",
          "definitions",
          "format",
          "libraryFolders",
          "libraryMetadata",
          "libraryPacks",
          "version",
          "workflows",
          "workspaceLibraries",
          "workspaces"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 990
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/health",
      "description": "GET /api/health",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "app",
          "ok",
          "version"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 386
      },
      "contract": "`{ok:true, app:'OpenNodeFlow', version:'1.0.0'}` — Basic HTTP process health; does not execute a workflow or check third-party credentials",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/hooks/:workflowId",
      "description": "POST /api/hooks/:workflowId",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 807
      },
      "contract": "JSON trigger body; existing webhook header — Targets one enabled webhook root; workflow master required. Same-entry overlap409; distinct entries independent",
      "guard": "Network Host/Origin boundary plus the workflow-specific X-ONF-Webhook-Key; enabled/paused/busy entry state is checked before admission."
    },
    {
      "method": "POST",
      "path": "/api/hooks/:workflowId/:nodeId",
      "description": "POST /api/hooks/:workflowId/:nodeId",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 806
      },
      "contract": "JSON trigger body; existing webhook header — Targets one enabled webhook root; workflow master required. Same-entry overlap409; distinct entries independent",
      "guard": "Network Host/Origin boundary plus the workflow-specific X-ONF-Webhook-Key; enabled/paused/busy entry state is checked before admission."
    },
    {
      "method": "POST",
      "path": "/api/import",
      "description": "POST /api/import",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "ok"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 1005
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/library",
      "description": "GET /api/library",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/library.ts",
        "line": 196
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/library/assets/:id",
      "description": "PUT /api/library/assets/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/library.ts",
        "line": 213
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/library/codecs",
      "description": "PUT /api/library/codecs",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/library-packs.ts",
        "line": 198
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/library/codecs/:id",
      "description": "DELETE /api/library/codecs/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [
          "expectedDecodeRevision",
          "expectedEncodeRevision"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/library-packs.ts",
        "line": 199
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/library/folders",
      "description": "POST /api/library/folders",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/library.ts",
        "line": 197
      },
      "contract": "`{name, parentId?}` — 201 folder, revision 1",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/library/folders/:id",
      "description": "DELETE /api/library/folders/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [
          "expectedRevision"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedRevision"
      ],
      "source": {
        "file": "server/library.ts",
        "line": 207
      },
      "contract": "No body — Exact current positive revision; nonempty folders return 409",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/library/folders/:id",
      "description": "PUT /api/library/folders/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/library.ts",
        "line": 202
      },
      "contract": "`{expectedRevision, name?, parentId?}` — Current positive folder revision required; parentId:null moves to root, omission preserves parent",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/library/packs",
      "description": "GET /api/library/packs",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "packs",
          "workspaceLibraries"
        ]
      },
      "source": {
        "file": "server/library-packs.ts",
        "line": 192
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/library/packs",
      "description": "POST /api/library/packs",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/library-packs.ts",
        "line": 193
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/library/packs/:id",
      "description": "DELETE /api/library/packs/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [
          "expectedRevision"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedRevision"
      ],
      "source": {
        "file": "server/library-packs.ts",
        "line": 195
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/library/packs/:id",
      "description": "PUT /api/library/packs/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/library-packs.ts",
        "line": 194
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/mappings",
      "description": "POST /api/mappings",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/mappings.ts",
        "line": 38
      },
      "contract": "`{spec,input}`; validate the source, apply explicit field mappings and validate the target. Returns `{valid,output?,errors}` without executing provider/workflow code.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/mappings/preview",
      "description": "POST /api/mappings/preview",
      "request": {
        "path": [],
        "query": [],
        "body": [
          "input",
          "spec"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/mappings.ts",
        "line": 35
      },
      "contract": "`{spec,input}`; validate the source, apply explicit field mappings and validate the target. Returns `{valid,output?,errors}` without executing provider/workflow code.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/mcp/status",
      "description": "GET /api/mcp/status",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "authentication",
          "endpoint",
          "name",
          "prompts",
          "resources",
          "sessionMode",
          "toolCount",
          "tools",
          "transport",
          "version"
        ]
      },
      "source": {
        "file": "server/mcp.ts",
        "line": 114
      },
      "contract": "`{name,version,transport,endpoint,authentication,tools,toolCount,resources,prompts,sessionMode}` — Source catalog: 111 tools, stateless Streamable HTTP, no authentication; verify the live response after deployment",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/repeats",
      "description": "POST /api/repeats",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/control-flow.ts",
        "line": 122
      },
      "contract": "`{name,repeat:{bodyDefinitionId,bodyDefinitionVersion,carryInput,resultOutput,stopOutput,indexInput?,maxIterations}}`; 201 new node. Name 1–100 characters; iterations 1–1,000. The exact pinned subflow needs identical carry/result types and a separate boolean stop output.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/runs",
      "description": "GET /api/runs",
      "request": {
        "path": [],
        "query": [
          "limit",
          "view",
          "workspaceId"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 826
      },
      "contract": "`Run[]` — Newest first, maximum 250",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/runs/:id",
      "description": "GET /api/runs/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 897
      },
      "contract": "`Run` — `404` unknown",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/runs/:id/cancel",
      "description": "POST /api/runs/:id/cancel",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 933
      },
      "contract": "`Run` — Cancels queued/active execution; terminal runs return unchanged",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/runs/:id/snapshot",
      "description": "GET /api/runs/:id/snapshot",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 902
      },
      "contract": "`{workflow:Workflow, definitions:Definition[]}` — Actual graph/dependencies used; `404` missing run or unavailable snapshot",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/runs/:id/storage",
      "description": "GET /api/runs/:id/storage",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 908
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/runtime/debug",
      "description": "POST /api/runtime/debug",
      "request": {
        "path": [],
        "query": [],
        "body": [
          "input",
          "triggerNodeId",
          "workflowId"
        ]
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/runtime-api.ts",
        "line": 51
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/runtime/debug/events",
      "description": "GET /api/runtime/debug/events",
      "request": {
        "path": [],
        "query": [
          "after",
          "triggerNodeId",
          "workflowId"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/runtime-api.ts",
        "line": 82
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/runtime/debug/listeners",
      "description": "POST /api/runtime/debug/listeners",
      "request": {
        "path": [],
        "query": [],
        "body": [
          "workflowId"
        ]
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/runtime-api.ts",
        "line": 63
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/runtime/debug/listeners/:id",
      "description": "DELETE /api/runtime/debug/listeners/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/runtime-api.ts",
        "line": 78
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/runtime/debug/listeners/:id",
      "description": "GET /api/runtime/debug/listeners/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/runtime-api.ts",
        "line": 74
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/runtime/events",
      "description": "POST /api/runtime/events",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/runtime-api.ts",
        "line": 140
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/runtime/inbox",
      "description": "GET /api/runtime/inbox",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/runtime-api.ts",
        "line": 144
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/runtime/inbox/:id/complete",
      "description": "POST /api/runtime/inbox/:id/complete",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": [
          "decision",
          "expectedRevision",
          "value"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedRevision"
      ],
      "source": {
        "file": "server/runtime-api.ts",
        "line": 154
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/runtime/runs/:id/debug",
      "description": "POST /api/runtime/runs/:id/debug",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/runtime-api.ts",
        "line": 124
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/runtime/waits",
      "description": "GET /api/runtime/waits",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/runtime-api.ts",
        "line": 128
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/runtime/waits/:id/resume",
      "description": "POST /api/runtime/waits/:id/resume",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": [
          "expectedRevision",
          "value"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedRevision"
      ],
      "source": {
        "file": "server/runtime-api.ts",
        "line": 136
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/secrets",
      "description": "GET /api/secrets",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 951
      },
      "contract": "None — `200 SecretInfo[]`",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/secrets/:name",
      "description": "DELETE /api/secrets/:name",
      "request": {
        "path": [
          "name"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "ok"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 960
      },
      "contract": "None — `200 {ok:true}`; missing names are harmless",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/secrets/:name",
      "description": "PUT /api/secrets/:name",
      "request": {
        "path": [
          "name"
        ],
        "query": [],
        "body": [
          "value"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 952
      },
      "contract": "`{value:string}` — `200 SecretInfo` for saved secret",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/settings",
      "description": "PUT /api/settings",
      "request": {
        "path": [],
        "query": [],
        "body": [
          "defaultTimeoutMs",
          "logRetentionDays",
          "maxConcurrentRuns"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 965
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/storage",
      "description": "GET /api/storage",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 423
      },
      "contract": "No body — `{scopes:[{workspaceId,namespace,records,conversations,questions,queue}]}`; scalar counts only",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/storage/:workspaceId/:namespace",
      "description": "POST /api/storage/:workspaceId/:namespace",
      "request": {
        "path": [
          "namespace",
          "workspaceId"
        ],
        "query": [],
        "body": [
          "args",
          "op"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 424
      },
      "contract": "`{op, args}` — The selected operation's typed result, sanitized against known protected strings",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/subflows",
      "description": "GET /api/subflows",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/subflows.ts",
        "line": 184
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/subflows",
      "description": "POST /api/subflows",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/subflows.ts",
        "line": 187
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/subflows/:id",
      "description": "PUT /api/subflows/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/subflows.ts",
        "line": 192
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/subflows/extract",
      "description": "POST /api/subflows/extract",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/subflows.ts",
        "line": 197
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/triggers",
      "description": "GET /api/triggers",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 389
      },
      "contract": "`{definitions:Definition[],instances:TriggerInstance[]}` — All latest library trigger types including unused, all workflow-node instances and observed scalar health metadata",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/variables",
      "description": "GET /api/variables",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/variables.ts",
        "line": 621
      },
      "contract": "Explicit metadata-only lookup; no value decryption/readback. Useful for verifying an existing binding.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/variables",
      "description": "POST /api/variables",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/variables.ts",
        "line": 626
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/variables/:id",
      "description": "DELETE /api/variables/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [
          "expectedRevision"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedRevision"
      ],
      "source": {
        "file": "server/variables.ts",
        "line": 641
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/variables/:id",
      "description": "GET /api/variables/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/variables.ts",
        "line": 622
      },
      "contract": "Explicit metadata-only lookup; no value decryption/readback. Useful for verifying an existing binding.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/variables/:id",
      "description": "PUT /api/variables/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/variables.ts",
        "line": 631
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/variables/:id/metadata",
      "description": "GET /api/variables/:id/metadata",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/variables.ts",
        "line": 623
      },
      "contract": "Explicit metadata-only lookup; no value decryption/readback. Useful for verifying an existing binding.",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/variables/:id/operations",
      "description": "POST /api/variables/:id/operations",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/variables.ts",
        "line": 636
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/workers",
      "description": "GET /api/workers",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/workers.ts",
        "line": 180
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/workers/pools/:id",
      "description": "PUT /api/workers/pools/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": [
          "id"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/workers.ts",
        "line": 194
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/workers/refresh",
      "description": "POST /api/workers/refresh",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/workers.ts",
        "line": 187
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/workflows",
      "description": "POST /api/workflows",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 638
      },
      "contract": "Workflow authoring fields — `201 Workflow` — Requires existing `workspaceId`; server assigns ID/revision/times",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/workflows/:id",
      "description": "DELETE /api/workflows/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "ok"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 689
      },
      "contract": "No body — `200 {ok:true}` — `404` missing; `409` if queued/running runs exist",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/workflows/:id",
      "description": "GET /api/workflows/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 645
      },
      "contract": "No body — `200 Workflow` — Selected complete saved graph and revision; unknown ID 404; no full-library export",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/workflows/:id",
      "description": "PUT /api/workflows/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": [
          "revision"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 646
      },
      "contract": "Partial workflow fields; send current `revision` — `200 Workflow` — Revision increments; supplied stale revision rejects `409`",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/workflows/:id/duplicate",
      "description": "POST /api/workflows/:id/duplicate",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 724
      },
      "contract": "No body — `201 Workflow` — New ID, name with ` copy`, disabled, revision 1",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/workflows/:id/run",
      "description": "POST /api/workflows/:id/run",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          202
        ],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 714
      },
      "contract": "`{input?: object,triggerNodeId?:string}` — `202 Run` — Validates/enqueues saved graph; default `{}`",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PATCH",
      "path": "/api/workflows/:id/triggers/:nodeId",
      "description": "PATCH /api/workflows/:id/triggers/:nodeId",
      "request": {
        "path": [
          "id",
          "nodeId"
        ],
        "query": [],
        "body": [
          "expectedRevision"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "inlineConcurrencyFields": [
        "expectedRevision"
      ],
      "source": {
        "file": "server/index.ts",
        "line": 659
      },
      "contract": "`{expectedRevision,enabled?,kind?,intervalSeconds?,cron?}` → `Workflow` — Required revision guard, preserves siblings. Pure pause bypasses graph validity only; resume/config changes validate",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/workflows/:id/validate",
      "description": "POST /api/workflows/:id/validate",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "issues",
          "valid"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 709
      },
      "contract": "No body — `200 {valid,issues}` — Validates saved workflow, not an arbitrary body/draft",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/workflows/:id/webhook-key",
      "description": "GET /api/workflows/:id/webhook-key",
      "request": {
        "path": [
          "id"
        ],
        "query": [
          "triggerNodeId"
        ],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "key",
          "url"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 750
      },
      "contract": "No body — `200 {key,url}` — Generates missing key and stores it; treat as sensitive",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/api/workspaces",
      "description": "POST /api/workspaces",
      "request": {
        "path": [],
        "query": [],
        "body": [
          "color",
          "description",
          "name"
        ]
      },
      "response": {
        "statuses": [
          201
        ],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 462
      },
      "contract": "`{name, description?, color?}` — `201 Workspace` — Invalid/blank/overlong name",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "DELETE",
      "path": "/api/workspaces/:id",
      "description": "DELETE /api/workspaces/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": [
          "ok"
        ]
      },
      "source": {
        "file": "server/index.ts",
        "line": 486
      },
      "contract": "No body — `200 {ok:true}` — `404` missing; `409` workflows or durable storage namespaces still belong to workspace",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/workspaces/:id",
      "description": "PUT /api/workspaces/:id",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": [
          "color",
          "description",
          "name"
        ]
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/index.ts",
        "line": 474
      },
      "contract": "Partial `{name?, description?, color?}` — `200 Workspace` — `404` missing workspace",
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "GET",
      "path": "/api/workspaces/:id/library",
      "description": "GET /api/workspaces/:id/library",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/library-packs.ts",
        "line": 196
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "PUT",
      "path": "/api/workspaces/:id/library",
      "description": "PUT /api/workspaces/:id/library",
      "request": {
        "path": [
          "id"
        ],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [],
        "fields": []
      },
      "source": {
        "file": "server/library-packs.ts",
        "line": 197
      },
      "guard": "Trusted-host Host/Origin boundary; per-route revision, version and validation checks apply."
    },
    {
      "method": "POST",
      "path": "/mcp",
      "description": "POST /mcp",
      "request": {
        "path": [],
        "query": [],
        "body": []
      },
      "response": {
        "statuses": [
          500
        ],
        "fields": [
          "error",
          "id",
          "jsonrpc"
        ]
      },
      "source": {
        "file": "server/mcp.ts",
        "line": 128
      },
      "guard": "MCP client initialization and protocol required; network Host/Origin boundary applies."
    }
  ],
  "sourceFiles": [
    {
      "file": "docs/API.md",
      "sha256": "3d79468a7799ade47a48ec93df9e7328723e6225cdabb0df63c76c407bf145e5"
    },
    {
      "file": "server/ai-help.ts",
      "sha256": "184424e25ffd3629c3b60bfb9a0f6213822dc30448e4a6a5e258a4f406d2d2c8"
    },
    {
      "file": "server/collections.ts",
      "sha256": "cdfd60e52cf86f4f7c1104d8fc9c013f8f6067614d2c4b6c3929bb168b661cbb"
    },
    {
      "file": "server/connections.ts",
      "sha256": "1ff33d7d2399e72a19169093f4ed379fada3281194c564b1216036b8570fe2ff"
    },
    {
      "file": "server/context-docs.ts",
      "sha256": "dedb505070d419840218b8b4c532bf3874efd29f094c87578d517c52f5a8e83e"
    },
    {
      "file": "server/control-flow.ts",
      "sha256": "67810ec58b61e53e0c3530a2ac7d7e183f0da0cc72ca571a0a5098bc0ca478d9"
    },
    {
      "file": "server/error-events.ts",
      "sha256": "87fea3ed2ff0e90d4998c3c85e2426b17e5b722a1be6556d8d19f85576bf2e15"
    },
    {
      "file": "server/index.ts",
      "sha256": "8c0bda2be5e9049b55946ff56ec042421c14230b5a4f18038ee588472e517bdc"
    },
    {
      "file": "server/library-packs.ts",
      "sha256": "8dc069a9f047e83abe2ee1f627acb09a5559e0f737d39dc5f9cca812244b50a3"
    },
    {
      "file": "server/library.ts",
      "sha256": "e5b3bb6598319f605b08bc37daf4481a8e29377934debba1be20a07553b02cf9"
    },
    {
      "file": "server/mappings.ts",
      "sha256": "cd9af3b8973e2875fb14cb6af173d5f4ba594899da07196e3d3c466a468fff3e"
    },
    {
      "file": "server/mcp.ts",
      "sha256": "562b63e86fd642c447fdd8f327a4bdfa236891f9223e74ecd93cea2ca6b2112c"
    },
    {
      "file": "server/runtime-api.ts",
      "sha256": "263fdbe751113142d5a34ba2fb93d50bc3f4ec716f0e51040af0b0555c147d9e"
    },
    {
      "file": "server/subflows.ts",
      "sha256": "60e9da01278b453fbcd217c24c18632b43f14d83ed613d89e30264c08d606f48"
    },
    {
      "file": "server/variables.ts",
      "sha256": "1c1ef3df52ec28aefcbf9d96769aa4875c60860dc44b3abe24281da4d605797a"
    },
    {
      "file": "server/workers.ts",
      "sha256": "4884d74bf25a9344bdce096a00976f8893912388c3e794b3d419de7bdcd46118"
    }
  ],
  "notes": [
    "Source syntax inventory of explicit public API routes, including literal for-of route choices. Source files are parsed, never imported or executed.",
    "Request/response prose is attached from reviewed API tables when an exact route matches. Request/response field lists describe directly visible handler access only; normalization helpers and conditional unions may impose additional constraints. Empty lists do not mean an empty request or response. This inventory is not an OpenAPI compatibility guarantee or complete runtime validation schema.",
    "Methods other than POST at /mcp return 405. The administrative API is unauthenticated and intended for trusted local/LAN use."
  ]
}
