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 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.
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.
Example fix
// before
const ctx = createPluginContext({ kind: 'node-worker' }) // throws in node runtime
// after
const ctx = createPluginContext({ kind: 'in-memory' }) Defensive patterns
Strategy: type-guard
Validate before calling
if (transport.kind === 'node-worker') {
throw new Error('node-worker transport requires plugin-sdk with worker support; use in-memory for now')
} Type guard
type NodeSupportedTransport = Extract<PluginTransport, { kind: 'in-memory' }>
const isNodeSupportedTransport = (t: PluginTransport): t is NodeSupportedTransport => t.kind === 'in-memory' Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Electron transport is not implemented yet.
- WebSocket transport is not implemented for node runtime yet.
- Node worker transport is not available in web runtime.
- Web worker transport is not available in node runtime.
- Web worker transport is not implemented yet.
AI-assisted analysis of moeru-ai/airi@677329427f (2026-08-18).
Data as JSON: /api/errors/3fc41130162f4a00.
Report an issue: GitHub.
Appendix: 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 677329427f)