{"record":{"id":"3fc41130162f4a00","repo":"moeru-ai/airi","slug":"node-worker-transport-is-not-implemented-yet","errorCode":null,"errorMessage":"Node worker transport is not implemented yet.","messagePattern":"Node worker transport is not implemented yet\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/plugin-sdk/src/plugin-host/runtimes/node/index.ts","lineNumber":31,"sourceCode":" * Creates the Eventa context used by node-side extension host sessions.\n *\n * Use when:\n * - Bootstrapping a node runtime extension session\n *\n * Expects:\n * - `transport` describes a transport supported by the node runtime\n *\n * Returns:\n * - A node-compatible Eventa context, or throws if the transport is not implemented\n */\nexport function createPluginContext(transport: PluginTransport): EventContext<any, any> {\n  switch (transport.kind) {\n    case 'in-memory':\n      return createContext()\n    case 'websocket':\n      throw new Error('WebSocket transport is not implemented for node runtime yet.')\n    case 'node-worker':\n      throw new Error('Node worker transport is not implemented yet.')\n    case 'electron':\n      throw new Error('Electron transport is not implemented yet.')\n    case 'web-worker':\n      throw new Error('Web worker transport is not available in node runtime.')\n    default:\n      throw new Error('Unknown plugin transport kind.')\n  }\n}\n","sourceCodeStart":13,"sourceCodeEnd":40,"githubUrl":"https://github.com/moeru-ai/airi/blob/677329427f32468c74b17f3ec47eeca4e05bec65/packages/plugin-sdk/src/plugin-host/runtimes/node/index.ts#L13-L40","documentation":"Thrown by createPluginContext in the node runtime when transport.kind === 'node-worker'. Worker-thread-based transport for Node extension sessions is a planned feature; the switch currently returns only the in-memory Eventa context, so node-worker requests throw immediately with an explicit 'not implemented yet' message.","triggerScenarios":"Passing { kind: 'node-worker' } to createPluginContext to move an extension into a Node worker_thread; attempting CPU-isolated extension execution; configuring transport by string pulled from env/config where 'node-worker' is selected in Node CI.","commonSituations":"Designing out-of-process/isolated extension execution before the SDK ships it; config-driven transport selection shared across runtimes; early adoption based on type definitions that include the kind but not the implementation.","solutions":["Use { kind: 'in-memory' } until node-worker ships.","If isolation is required now, spawn worker_threads yourself and exchange events through an in-memory context per worker.","Track/upgrade plugin-sdk and verify runtimes/node/index.ts implements the 'node-worker' case before enabling it.","Validate transport config at startup and fail with your own clear message so the unsupported kind never reaches this throw in production."],"exampleFix":"// before\nconst ctx = createPluginContext({ kind: 'node-worker' }) // throws in node runtime\n\n// after\nconst ctx = createPluginContext({ kind: 'in-memory' })","handlingStrategy":"type-guard","validationCode":"if (transport.kind === 'node-worker') {\n  throw new Error('node-worker transport requires plugin-sdk with worker support; use in-memory for now')\n}","typeGuard":"type NodeSupportedTransport = Extract<PluginTransport, { kind: 'in-memory' }>\nconst isNodeSupportedTransport = (t: PluginTransport): t is NodeSupportedTransport => t.kind === 'in-memory'","tryCatchPattern":null,"preventionTips":["Do not ship config that selects unimplemented kinds; validate against the runtime switch at load time.","Keep a single source of truth for 'supported transports per runtime' next to host construction."],"tags":["plugin-sdk","transport","node-worker","node-runtime","not-implemented"],"backgroundTag":"unsupported-transport-kind","analyzedSha":"677329427f32468c74b17f3ec47eeca4e05bec65","analyzedAt":"2026-08-18T17:29:58.153Z","contentChangedAt":"2026-08-18T17:29:58.153Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}