{"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":"error","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/677329427f32468c74b17f3ec47eeca4e05bec65/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'. Worker-based isolation for browser extension sessions is declared in the PluginTransport union but not yet implemented in the web runtime switch, so only in-memory works today and web-worker throws 'not implemented yet'.","triggerScenarios":"Passing { kind: 'web-worker' } to createPluginContext to isolate an untrusted plugin in a browser Worker; selecting worker transport from a quality/feature matrix before the SDK ships it; porting a custom worker harness to the typed PluginTransport API.","commonSituations":"Security-driven designs wanting plugin sandboxing via Workers; early adoption from type definitions; demos configured ahead of implementation.","solutions":["Use { kind: 'in-memory' } until web-worker ships.","If sandboxing is required now, spawn a Worker yourself and bridge events through an in-memory context per worker.","Re-check runtimes/web/index.ts after upgrading plugin-sdk before enabling the kind."],"exampleFix":"// before\nconst ctx = createPluginContext({ kind: 'web-worker' }) // web runtime: throws\n\n// after\nconst ctx = createPluginContext({ kind: 'in-memory' })","handlingStrategy":"type-guard","validationCode":"if (transport.kind === 'web-worker') {\n  throw new Error('web-worker transport not yet implemented; use in-memory')\n}","typeGuard":"type WebSupportedTransport = Extract<PluginTransport, { kind: 'in-memory' }>\nconst isWebSupportedTransport = (t: PluginTransport): t is WebSupportedTransport => t.kind === 'in-memory'","tryCatchPattern":null,"preventionTips":["Do not enable sandboxing flags before the SDK ships the worker transport.","Check runtimes/web/index.ts after upgrades to learn which kinds became available."],"tags":["plugin-sdk","transport","web-worker","web-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"}