{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "reference-websocket-trigger-managed",
  "title": "WebSocket Managed Subscription",
  "section": "Library asset reference",
  "description": "Host-managed subscription entry. Set saved node.trigger.kind=websocket, enabled=true and websocket:{url OR urlSecret,protocols?,subscribeSecret?,heartbeatSecret?,heartbeatIntervalSeconds?,idleTimeoutSeconds?,connectTimeoutMs?,maxMessageByte",
  "kind": "trigger",
  "url": "/wiki/reference-websocket-trigger-managed/",
  "markdown": "/wiki/reference-websocket-trigger-managed/index.md",
  "json": "/wiki/reference-websocket-trigger-managed/index.json",
  "headings": [
    {
      "id": "audited-socket-contract-21-october-2026",
      "title": "Audited socket contract (21 October 2026)",
      "depth": 2
    },
    {
      "id": "catalog-identity",
      "title": "Catalog identity",
      "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": "websocket",
  "contract": {
    "key": "websocket.trigger.managed",
    "slug": "websocket-trigger-managed",
    "name": "WebSocket Managed Subscription",
    "kind": "trigger",
    "family": "websocket",
    "packId": null,
    "category": "WebSockets",
    "description": "",
    "inputs": [],
    "outputs": [
      {
        "id": "next",
        "name": "next",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "error",
        "name": "error",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "frame",
        "name": "frame",
        "type": "@websocket.type.frame",
        "typeName": "WebSocket Received Frame",
        "typeKey": "websocket.type.frame",
        "typeVersion": 1,
        "required": true
      }
    ],
    "configSchema": {
      "type": "object",
      "properties": {},
      "required": [],
      "additionalProperties": false
    },
    "documentation": "Host-managed subscription entry. Set saved node.trigger.kind=websocket, enabled=true and websocket:{url OR urlSecret,protocols?,subscribeSecret?,heartbeatSecret?,heartbeatIntervalSeconds?,idleTimeoutSeconds?,connectTimeoutMs?,maxMessageBytes?,maxQueueMessages?,maxQueueBytes?,maxPendingRuns?,reconnectMinMs?,reconnectMaxMs?}. workflow.enabled must also be true. Real persistent host lifecycle reconnects with bounded jitter, tracks health and stops on pause/delete/config/secret revisions/shutdown; saved enabled entries reconnect after restart. It enqueues one run per bounded frame. Receive queue is volatile; overflow disconnects and increments rejected/overflow counters. No replay, exactly-once, server-side cursor or durable-receive guarantee. Use provider correlation IDs and existing durable storage downstream. Manual run requires {frame:...} synthetic input. The trigger code itself only emits an already accepted frame; it does not pretend a returning child owns a persistent listener.\n\nUses native Node 24 WebSocket client. No arbitrary handshake headers, TLS bypass, distributed listener or exactly-once guarantee. Use urlSecret/subscribeSecret for protected values. Errors and health omit raw remote errors, URLs and credential payloads. wss:// required except ws:// loopback mocks. Existing provider JSON types are reused. These v1 assets preserve exact socket/type/executor pins. Verified with isolated fixtures; external account access is unverified.\n\n## Audited socket contract (21 October 2026)\n\nInputs:\nNo data sockets.\n\nOutputs:\n- `frame`: `@websocket.type.frame`; required.\n\nConfiguration:\nNo asset-specific configuration.\n\nKnown provider records and list elements have structural schemas. Explicit dynamic payloads, selected query results and provider extensions retain the recursive JSON Value vocabulary; they do not imply a known provider entity. Null is distinct from omission. Runtime validates the exact selected immutable type version; reading newer documentation never repins existing graphs. This audit used synthetic fixtures/local mocks and does not establish live provider authorization or delivery.",
    "runtime": "javascript",
    "tags": [
      "library-expansion",
      "managed",
      "subscription",
      "trigger",
      "websocket"
    ],
    "source": "baseline-catalog"
  }
}
