{
  "schemaVersion": 1,
  "generatedAt": "2026-08-17T18:36:09.695Z",
  "generationKey": "ee6f31e7c940a1efe74c2fcbd9b197ee2aa47858075209096f8af609bb4b7213",
  "metadataPayloadSha256": "eb5c5ec1042fad7e8cb2db347033cebbbddcaf5df19cf3795cfcf95fb927907f",
  "diagram": {
    "id": "ports-system-architecture-5a58d8c0",
    "title": "Ports — system architecture",
    "description": "Rectangles are API routes and services, the rounded node is the chat model, and cylinders are workspace tables under row-level security. The reattach tail reads only the database, which is why any web replica can serve a stream.",
    "status": "current",
    "canonicalAppearanceKey": "tsx:src/app/(docs)/docs/modules/ports/page.tsx:systemArchitectureChart#1"
  },
  "aliases": [],
  "concepts": [
    "System architecture",
    "Public surface",
    "Worker loop",
    "Run control (web process)",
    "Modules",
    "Ports"
  ],
  "keywords": [
    "POST {slug}/runs (API)",
    "POST + {slug} (API)",
    "GET {id} + /steps + /stream (API)",
    "POST {id}/cancel + /approve + /feedback (API)",
    "Reattach SSE tail (service)",
    "Native MCP server (service)",
    "Agent runner (service)",
    "Tool registry (service)",
    "Approval gate (service)",
    "model: chat",
    "Admission control (service)",
    "Durable executor + job queue (service)",
    "Capability lock (service)",
    "/api/v1/agents",
    "/api/v1/runs",
    "/api/mcp",
    "/api/mcp/agents",
    "slug",
    "id",
    "store"
  ],
  "mermaid": {
    "type": "flowchart",
    "direction": "TB",
    "sourceSha256": "5a58d8c0f7f92963663aa62883702e1d0cbb699730a1f3ae52508e35d94cde88"
  },
  "provenance": [
    {
      "appearanceKey": "tsx:src/app/(docs)/docs/modules/ports/page.tsx:systemArchitectureChart#1",
      "surface": "route",
      "sourcePath": "src/app/(docs)/docs/modules/ports/page.tsx",
      "line": 69,
      "route": "/docs/modules/ports",
      "symbol": "systemArchitectureChart",
      "caption": "Rectangles are API routes and services, the rounded node is the chat model, and cylinders are workspace tables under row-level security. The reattach tail reads only the database, which is why any web replica can serve a stream."
    }
  ],
  "embeddedMetadata": [
    {
      "sourcePath": "src/app/(docs)/docs/modules/ports/page.tsx",
      "caption": "Rectangles are API routes and services, the rounded node is the chat model, and cylinders are workspace tables under row-level security. The reattach tail reads only the database, which is why any web replica can serve a stream."
    }
  ],
  "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-system-architecture-5a58d8c0/ports-system-architecture-5a58d8c0.mmd",
    "svg": "/diagrams/ports-system-architecture-5a58d8c0/ports-system-architecture-5a58d8c0.svg",
    "png": "/diagrams/ports-system-architecture-5a58d8c0/ports-system-architecture-5a58d8c0.png",
    "drawio": "/diagrams/ports-system-architecture-5a58d8c0/ports-system-architecture-5a58d8c0.drawio",
    "json": "/diagrams/ports-system-architecture-5a58d8c0/ports-system-architecture-5a58d8c0.json"
  },
  "artifactSha256": {
    "mmd": "49a87e187a68dd1980a043501e1aa6e77e94b48bef644f990a4dff7cd08b3f7a",
    "svg": "d37a044698fa1503ca2102e5a1f0a322b9c5c3e68648f6d6e2a22c59276ee729",
    "png": "a1a7e07d82e710ff1635e82f6d8739c711bd8b61940c25e556fae679779ec8b0",
    "drawio": "5384e98fd43bf10af060cd1a342ce81b3263e778822e0950e054bf8e0724bfd5"
  }
}
