moeru-ai/airi · error · Error
Node worker transport is not implemented yet.
Error message
Node worker transport is not implemented yet.
What it means
Thrown by createPluginContext() in the node runtime adapter when transport.kind is 'node-worker'. Despite node worker_threads being a natural node transport, the adapter has not wired it up and fails fast rather than silently degrading.
Source
Thrown at packages/plugin-sdk/src/plugin-host/runtimes/node/index.ts:31
* Creates the Eventa context used by node-side extension host sessions.
*
* Use when:
* - Bootstrapping a node runtime extension session
*
* Expects:
* - `transport` describes a transport supported by the node runtime
*
* Returns:
* - A node-compatible Eventa context, or throws if the transport is not implemented
*/
export function createPluginContext(transport: PluginTransport): EventContext<any, any> {
switch (transport.kind) {
case 'in-memory':
return createContext()
case 'websocket':
throw new Error('WebSocket transport is not implemented for node runtime yet.')
case 'node-worker':
throw new Error('Node worker transport is not implemented yet.')
case 'electron':
throw new Error('Electron transport is not implemented yet.')
case 'web-worker':
throw new Error('Web worker transport is not available in node runtime.')
default:
throw new Error('Unknown plugin transport kind.')
}
}
View on GitHub (pinned to 27111382b4)
Solutions
- Use { kind: 'in-memory' } until the node-worker transport is implemented.
- If worker isolation is mandatory, build a custom Eventa context bridging the worker and pass it directly, bypassing createPluginContext.
- Track/contribute the node-worker implementation in the SDK rather than working around the guard.
Example fix
// before
const ctx = createPluginContext({ kind: 'node-worker', worker: new Worker('./plugin.js') })
// after
const ctx = createPluginContext({ kind: 'in-memory' }) Defensive patterns
Strategy: validation
Validate before calling
if (transport.kind === 'node-worker') {
throw new Error('node-worker transport is not implemented yet. Use in-memory.')
}
const ctx = createPluginContext(transport) Type guard
function isImplementedNodeTransport(transport: PluginTransport): boolean {
return transport.kind === 'in-memory'
} Try / catch
try {
ctx = createPluginContext(transport)
} catch (error) {
if (error instanceof Error && /Node worker transport is not implemented/.test(error.message)) {
ctx = createPluginContext({ kind: 'in-memory' })
} else {
throw error
}
} Prevention
- Do not pass { kind: 'node-worker' } to the node adapter until it ships support.
- If worker isolation is required, build a custom Eventa context bridging worker_threads.
- Gate transport choice on an isImplementedNodeTransport check.
When it happens
Trigger: Calling createPluginContext({ kind: 'node-worker', worker }) where worker is a node:worker_threads.Worker instance. The union type permits it, but the node adapter throws.
Common situations: Attempting to isolate plugin execution in a node worker thread for performance/safety, expecting the SDK to provide the bridge. Common during sandboxing or multi-tenant plugin host design on node.
Related errors
- WebSocket transport is not implemented for node runtime yet.
- Electron transport is not implemented yet.
- Web worker transport is not available in node runtime.
- Unknown plugin transport kind.
- WebSocket transport is not implemented for web runtime yet.
AI-assisted analysis of moeru-ai/airi@27111382b4 (2026-08-12).
Data as JSON: /api/errors/3fc41130162f4a00.
Report an issue: GitHub.