{"record":{"id":"39733964dddfe999","repo":"moeru-ai/airi","slug":"web-worker-transport-is-not-implemented-yet","errorCode":null,"errorMessage":"Web worker transport is not implemented yet.","messagePattern":"Web worker transport is not implemented yet\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"info","filePath":"packages/plugin-sdk/src/plugin-host/runtimes/web/index.ts","lineNumber":30,"sourceCode":" * Creates the Eventa context used by web-side extension host sessions.\n *\n * Use when:\n * - Bootstrapping a web runtime extension session\n *\n * Expects:\n * - `transport` describes a transport supported by the web runtime\n *\n * Returns:\n * - A web-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 web runtime yet.')\n    case 'web-worker':\n      throw new Error('Web worker transport is not implemented yet.')\n    case 'node-worker':\n      throw new Error('Node worker transport is not available in web runtime.')\n    case 'electron':\n      throw new Error('Electron transport is not available in web runtime.')\n    default:\n      throw new Error('Unknown plugin transport kind.')\n  }\n}\n","sourceCodeStart":12,"sourceCodeEnd":39,"githubUrl":"https://github.com/moeru-ai/airi/blob/27111382b4a79a7e983289d6e983a06af185ed0f/packages/plugin-sdk/src/plugin-host/runtimes/web/index.ts#L12-L39","documentation":"Thrown by `createPluginContext()` in the web runtime when `transport.kind === 'web-worker'`. Web-worker-based plugin isolation is not yet implemented for the web runtime; only `in-memory` is supported today. This is a placeholder guard marking an unshipped feature.","triggerScenarios":"Calling `createPluginContext({ kind: 'web-worker', ... })` (or any equivalent that selects the web-worker transport) in the web runtime. Fires at context construction, before any plugin loads.","commonSituations":"Attempting to run plugins in a Web Worker for off-main-thread isolation on web; reusing a transport configuration from another runtime that does support workers; experimenting with worker-based plugin hosts prematurely.","solutions":["Use `createPluginContext({ kind: 'in-memory' })` for web plugin contexts until web-worker support ships.","For off-main-thread work today, host the worker yourself and bridge to an in-memory plugin context via your own messaging.","Await the implementation rather than stubbing the case — the throw is intentional to signal the feature gap.","Double-check the intended runtime: Node/Electron paths may support worker transports that web does not."],"exampleFix":"// before\nconst ctx = createPluginContext({ kind: 'web-worker', workerUrl })\n\n// after\nconst ctx = createPluginContext({ kind: 'in-memory' })","handlingStrategy":"validation","validationCode":"if (transport.kind !== 'in-memory') {\n  throw new Error(`Transport '${transport.kind}' is not supported in the web runtime yet.`)\n}\nconst ctx = createPluginContext(transport)","typeGuard":"function isSupportedWebTransport(t: PluginTransport): boolean {\n  return t.kind === 'in-memory'\n}","tryCatchPattern":"try {\n  ctx = createPluginContext(transport)\n} catch (e) {\n  if (e instanceof Error && /not implemented/i.test(e.message)) {\n    ctx = createPluginContext({ kind: 'in-memory' })\n  } else throw e\n}","preventionTips":["Do not select web-worker transport on the web runtime until it ships.","For off-main-thread isolation today, host your own worker and bridge to an in-memory context.","Condition transport choice on runtime/environment detection.","Watch for the web-worker transport implementation before adopting it."],"tags":["plugin-sdk","web-runtime","transport","web-worker","not-implemented"],"backgroundTag":null,"analyzedSha":"27111382b4a79a7e983289d6e983a06af185ed0f","analyzedAt":"2026-08-12T18:33:34.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}