{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "reference-app-runtime-def-onf-wait-event",
  "title": "Wait for Event",
  "section": "Library asset reference",
  "description": "Wait for an exact workspace/event/correlation match delivered through ONF runtime API or MCP.",
  "kind": "node",
  "url": "/wiki/reference-app-runtime-def-onf-wait-event/",
  "markdown": "/wiki/reference-app-runtime-def-onf-wait-event/index.md",
  "json": "/wiki/reference-app-runtime-def-onf-wait-event/index.json",
  "headings": [
    {
      "id": "wait-for-event",
      "title": "Wait for Event",
      "depth": 2
    },
    {
      "id": "catalog-identity",
      "title": "Catalog identity",
      "depth": 2
    },
    {
      "id": "inputs",
      "title": "Inputs",
      "depth": 2
    },
    {
      "id": "outputs",
      "title": "Outputs",
      "depth": 2
    },
    {
      "id": "configuration-schema",
      "title": "Configuration schema",
      "depth": 2
    },
    {
      "id": "source-and-installed-versions",
      "title": "Source and installed versions",
      "depth": 2
    }
  ],
  "sources": [
    "../OpenNodeFlow-Library/work/catalog-all.mjs",
    "../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs",
    "../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs",
    "shared/seed.ts",
    "shared/storage-library.ts",
    "shared/variable-library.ts",
    "shared/control-flow.ts",
    "shared/remote-routes.ts",
    "server/runtime-library.ts",
    "shared/error-library.ts",
    "shared/storage-model.ts",
    "shared/builtin-documentation.ts"
  ],
  "family": "app-runtime",
  "contract": {
    "key": "app.runtime.def_onf_wait_event",
    "slug": "app-runtime-def-onf-wait-event",
    "name": "Wait for Event",
    "kind": "node",
    "family": "app-runtime",
    "packId": null,
    "category": "Durable runtime",
    "description": "Wait for an exact workspace/event/correlation match delivered through ONF runtime API or MCP.",
    "inputs": [
      {
        "id": "exec",
        "name": "Exec",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "eventKey",
        "name": "Event Key",
        "type": "string",
        "typeName": "Text",
        "required": true
      },
      {
        "id": "correlationKey",
        "name": "Correlation Key",
        "type": "string",
        "typeName": "Text",
        "required": true
      },
      {
        "id": "timeoutMs",
        "name": "Timeout Ms",
        "type": "number",
        "typeName": "Number",
        "required": false,
        "default": 0
      }
    ],
    "outputs": [
      {
        "id": "next",
        "name": "Next",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "value",
        "name": "Value",
        "type": "any",
        "typeName": "Any",
        "required": false
      },
      {
        "id": "timedOut",
        "name": "Timed Out",
        "type": "boolean",
        "typeName": "Boolean",
        "required": true
      }
    ],
    "configSchema": {},
    "documentation": "## Wait for Event\n\nWait for an exact workspace/event/correlation match delivered through ONF runtime API or MCP.\n\nThe run stores its exact workflow and library versions, releases execution concurrency while waiting, and survives host restart. Completed upstream nodes are not repeated. Output `value` contains the resume payload (or null for a timer/timeout), `timedOut` reports event/approval expiry, and `next` continues execution. Approval values have `{decision,value}`; `taskId` identifies the Inbox task.\n\nEvent delivery requires a unique eventId and exact eventKey/correlationKey in the same workspace. Events match currently pending waits; they are not an unbounded pre-arrival event bus. Use Storage to retain events before a wait is created. No code child, sleep promise or worker slot is held while suspended. Cancellation closes pending tasks and never executes downstream effects.\n",
    "runtimeOperation": "wait.event",
    "tags": [
      "builtin",
      "node"
    ],
    "source": "app-builtin-catalog"
  }
}
