{
  "schemaVersion": 1,
  "generatedAt": "2026-08-17T18:36:07.602Z",
  "generationKey": "1cab2b2e409b3736acb2811686772901a32f12b57a5d9f2ea231ac3f86b3938e",
  "metadataPayloadSha256": "61dff96855e843b2378a912eaeaa8770f15b5450c6f0312abfa25fe92c7ce113",
  "diagram": {
    "id": "ports-run-lifecycle-557105ba",
    "title": "Ports — run lifecycle",
    "description": "The durable contract: 202 with a run id, execution on the worker, replay-and-tail over SSE. Approvals close the stream — resolve the gate, then reattach.",
    "status": "current",
    "canonicalAppearanceKey": "tsx:src/app/(docs)/docs/modules/ports/page.tsx:runLifecycle#1"
  },
  "aliases": [],
  "concepts": [
    "Run lifecycle",
    "Modules",
    "Ports"
  ],
  "keywords": [
    "model_call / tool_call",
    "claim run, persist run_steps",
    "Your app",
    "GET /runs/{id}/stream",
    "replay steps, then poll",
    "POST /runs/{id}/approve",
    "POST /agents/{slug}/runs",
    "admit + persist queued run",
    "suspended (approvalId) · stream closes",
    "GET /runs/{id}/stream (reattach)",
    "final { status, text, citations }",
    "Postgres",
    "eli.ai",
    "/api/v1",
    "Worker"
  ],
  "mermaid": {
    "type": "sequence",
    "sourceSha256": "557105badae2e01d5307ed1d1ace15ed87dcc2575e8fe842e2e6763210a6390e"
  },
  "provenance": [
    {
      "appearanceKey": "tsx:src/app/(docs)/docs/modules/ports/page.tsx:runLifecycle#1",
      "surface": "route",
      "sourcePath": "src/app/(docs)/docs/modules/ports/page.tsx",
      "line": 47,
      "route": "/docs/modules/ports",
      "symbol": "runLifecycle",
      "caption": "The durable contract: 202 with a run id, execution on the worker, replay-and-tail over SSE. Approvals close the stream — resolve the gate, then reattach."
    }
  ],
  "embeddedMetadata": [
    {
      "sourcePath": "src/app/(docs)/docs/modules/ports/page.tsx",
      "caption": "The durable contract: 202 with a run id, execution on the worker, replay-and-tail over SSE. Approvals close the stream — resolve the gate, then reattach."
    }
  ],
  "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-run-lifecycle-557105ba/ports-run-lifecycle-557105ba.mmd",
    "svg": "/diagrams/ports-run-lifecycle-557105ba/ports-run-lifecycle-557105ba.svg",
    "png": "/diagrams/ports-run-lifecycle-557105ba/ports-run-lifecycle-557105ba.png",
    "drawio": "/diagrams/ports-run-lifecycle-557105ba/ports-run-lifecycle-557105ba.drawio",
    "json": "/diagrams/ports-run-lifecycle-557105ba/ports-run-lifecycle-557105ba.json"
  },
  "artifactSha256": {
    "mmd": "0a0452b3f9500b9a257f4a0aaf52f62ae1a351b427c71ca4b8f4cac84212323a",
    "svg": "cd99744acbc390850f2c3b415a47d259747b215a91fa988119f897947b244747",
    "png": "186915ac4b200c11d0aae47b6bff06c49e6922830fe39ee56c61555ee131ba11",
    "drawio": "72ab4bc843ac25f08c9915282e5d2383914d669fe03d6bb855c4e8a856ce9ad6"
  }
}
