{
  "schemaVersion": 1,
  "generatedAt": "2026-08-12T23:40:51.634Z",
  "generationKey": "08bd8579d8eacb3d001a3ad6dfeda5c7a3004305ad39819a922c0f875be38652",
  "metadataPayloadSha256": "e36785c18d608f4f8ced8005783fc9fd03f9f58b7806d23a66cfea6c31621238",
  "diagram": {
    "id": "ports-rest-mcp-durable-agents-and-events-6662b869",
    "title": "Ports — REST, MCP, durable agents, and events",
    "description": "REST, MCP, schedules, durable runs/continuations, reattachment, and safe webhook delivery share one authenticated RLS control plane.",
    "status": "current",
    "canonicalAppearanceKey": "tsx:src/app/(docs)/docs/concepts/system-diagrams/page.tsx:PORTS_CHART#1"
  },
  "aliases": [],
  "concepts": [
    "System diagrams",
    "Key-gated surfaces · one RLS pipeline",
    "Ports",
    "Ports — REST, MCP, durable agents, and events",
    "Durable run loop · enqueue → worker → reattach"
  ],
  "keywords": [
    "kb_* tools under RLS",
    "reattach SSE",
    "MCP clients · Claude · IDEs · agents",
    "stable-key pg-boss reconcile",
    "Grounded pipeline · withWorkspace RLS",
    "encrypted HMAC · safe bounded HTTP",
    "pg-boss agent-run / agent-resume",
    "eli_sk_ / eli_uk_",
    "agent_runs = queued",
    "runner.ts durable loop",
    "api_keys / user_api_keys",
    "scheduled_jobs desired state",
    "webhook_endpoints · webhook_deliveries",
    "admitRun → executor.enqueue",
    "run.completed / failed / suspended",
    "Durable agents",
    "worker start / resume",
    "GET :id/stream",
    "kb / data / reports",
    "kb / data scope",
    "allow / deny / edit",
    "suspended → queued",
    "HITL suspend · reaper",
    "poll steps by cursor",
    "REST clients · SDKs · playground",
    "workspace + scopes + live capabilities + ACL",
    "SHA-256 hash · scope grants",
    "retrieval · graph · answerStructured",
    "dispatchRunEvent → deliverAlert",
    "query · documents · search · entities",
    "hash lookup · requireScope",
    "atomic decision (allow / deny / edit)",
    "MCP",
    "/api/v1",
    "/api/mcp",
    "/api/v1/runs",
    "resolveAnyApiKey",
    "Sn",
    "Dn",
    "REST"
  ],
  "mermaid": {
    "type": "flowchart",
    "direction": "TD",
    "sourceSha256": "6662b869be5ec7937a335aab8457df7bc68418af9ba412ffec22f39c4089f3e8"
  },
  "provenance": [
    {
      "appearanceKey": "md:docs/architecture/system-diagrams.md#9",
      "surface": "markdown",
      "sourcePath": "docs/architecture/system-diagrams.md",
      "line": 624,
      "heading": "8 · Ports — REST, MCP, durable agents, and events"
    },
    {
      "appearanceKey": "tsx:src/app/(docs)/docs/concepts/system-diagrams/page.tsx:PORTS_CHART#1",
      "surface": "route",
      "sourcePath": "src/app/(docs)/docs/concepts/system-diagrams/page.tsx",
      "line": 425,
      "route": "/docs/concepts/system-diagrams",
      "symbol": "PORTS_CHART",
      "caption": "REST, MCP, schedules, durable runs/continuations, reattachment, and safe webhook delivery share one authenticated RLS control plane."
    }
  ],
  "embeddedMetadata": [
    {
      "sourcePath": "docs/architecture/system-diagrams.md",
      "heading": "8 · Ports — REST, MCP, durable agents, and events"
    },
    {
      "sourcePath": "src/app/(docs)/docs/concepts/system-diagrams/page.tsx",
      "caption": "REST, MCP, schedules, durable runs/continuations, reattachment, and safe webhook delivery share one authenticated RLS control plane."
    }
  ],
  "generation": {
    "application": {
      "name": "eli-ai",
      "version": "0.1.0"
    },
    "environment": {
      "node": "v26.3.1",
      "yarn": "4.17.1",
      "platform": "linux",
      "architecture": "x64",
      "containerImage": "playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109"
    },
    "packages": {
      "mermaid": "11.16.0",
      "mermaidCli": "11.16.0",
      "playwright": "1.62.1",
      "playwrightCore": "1.62.1",
      "puppeteer": "25.6.0",
      "puppeteerCore": "25.6.0"
    },
    "renderer": {
      "mermaidConfigSha256": "68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101",
      "themeCssSha256": "c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033",
      "browser": {
        "name": "chromium",
        "revision": "1234",
        "version": "151.0.7922.34",
        "executableSha256": "0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71"
      },
      "font": {
        "family": "Eli Diagram Inter Variable",
        "fileSha256": "3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62",
        "licenseSha256": "3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345"
      }
    },
    "adapterVersions": {
      "diagramGenerator": "2",
      "drawioFlowchart": "1",
      "drawioSequence": "1",
      "drawioState": "1",
      "drawioGantt": "1"
    }
  },
  "artifacts": {
    "mmd": "/diagrams/ports-rest-mcp-durable-agents-and-events-6662b869/ports-rest-mcp-durable-agents-and-events-6662b869.mmd",
    "svg": "/diagrams/ports-rest-mcp-durable-agents-and-events-6662b869/ports-rest-mcp-durable-agents-and-events-6662b869.svg",
    "png": "/diagrams/ports-rest-mcp-durable-agents-and-events-6662b869/ports-rest-mcp-durable-agents-and-events-6662b869.png",
    "drawio": "/diagrams/ports-rest-mcp-durable-agents-and-events-6662b869/ports-rest-mcp-durable-agents-and-events-6662b869.drawio",
    "json": "/diagrams/ports-rest-mcp-durable-agents-and-events-6662b869/ports-rest-mcp-durable-agents-and-events-6662b869.json"
  },
  "artifactSha256": {
    "mmd": "109c5caf0570863b3802fb42ff75891cdc81cdb9ee2a902752f1d3335bbaabf2",
    "svg": "692c6f2b9b51a37a364050af6d6d49a3ef830ff107c559637d5123e292feeb3c",
    "png": "b114b1fdd2ebacd19df8e41af7ce031c3f69afdcbdad4f16a9f3b423393d6dc1",
    "drawio": "2401bbe37d901385d010cf404e177a12520d83f385bdd4d06e31f13cc6e1ccca"
  }
}
