{"record":{"id":"e78956a284a26725","repo":"ruvnet/ruflo","slug":"agntcy-slim-bindings-is-installed-but-does-not-e78956","errorCode":null,"errorMessage":"\"@agntcy/slim-bindings\" is installed but does not export createSlimTransport()","messagePattern":"\"@agntcy/slim-bindings\" is installed but does not export createSlimTransport\\(\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"v3/@claude-flow/cli/src/commands/agntcy/transport.ts","lineNumber":73,"sourceCode":"    }\n\n    const status = await detectAgntcyRuntime();\n\n    if (!status.configured) {\n      output.printInfo(AGNTCY_NOT_CONFIGURED_MESSAGE);\n      output.printInfo('Active transport remains: local (in-process hooks routing).');\n      return {\n        success: true,\n        data: { transport: 'local', requested, configured: false, reason: status.reason },\n      };\n    }\n\n    // Reachable only once the optional package is actually installed AND\n    // an endpoint is configured — not possible today (package unpublished).\n    try {\n      const mod = (await import(AGNTCY_PACKAGE_NAME)) as AgntcySlimRuntimeModule;\n      if (typeof mod.createSlimTransport !== 'function') {\n        throw new Error(`\"${AGNTCY_PACKAGE_NAME}\" is installed but does not export createSlimTransport()`);\n      }\n      await mod.createSlimTransport({ endpoint: status.endpoint as string });\n      output.printSuccess(`Active transport switched to: slim (${status.endpoint})`);\n      return { success: true, data: { transport: 'slim', endpoint: status.endpoint, configured: true } };\n    } catch (error) {\n      const message = error instanceof Error ? error.message : String(error);\n      output.printError(`Failed to activate SLIM transport: ${message}`);\n      output.printInfo('Falling back to local transport.');\n      return { success: true, data: { transport: 'local', requested, configured: false, error: message } };\n    }\n  },\n};\n\nexport const transportCommand: Command = {\n  name: 'transport',\n  description: 'Manage the active swarm/hive-mind coordination transport (ADR-380 §2)',\n  subcommands: [useCommand],\n  examples: [","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/cli/src/commands/agntcy/transport.ts#L55-L91","documentation":"Thrown by the AGNTCY transport-switch command when the optional @agntcy/slim-bindings is installed and an endpoint is configured, but the imported module lacks createSlimTransport(). The error is caught, printed as 'Failed to activate SLIM transport: ...', and the command falls back to local in-process transport, returning success:true with data { transport:'local', error }. The code comment notes this branch is currently unreachable in practice because the package is unpublished.","triggerScenarios":"Invoking the transport activation command in an environment where a resolvable @agntcy/slim-bindings module exists (stub, squat, or renamed API) and AGNTCY endpoint config is present — the module loads but exports no createSlimTransport function.","commonSituations":"Private-registry placeholder packages; future real versions with a changed export surface; CI images that accidentally include a leftover package. Impact is limited: transport stays local.","solutions":["Uninstall @agntcy/slim-bindings — the command then cleanly reports local transport with configured:false instead of an error path","Pin a version that actually exports createSlimTransport() and verify via a probe import before switching transport","Treat data.transport === 'local' after this command as expected behavior until the real runtime ships"],"exampleFix":"// before\nnpm install @agntcy/slim-bindings  # stub lacking createSlimTransport\nruflo transport activate slim\n// after\nnpm uninstall @agntcy/slim-bindings\nruflo transport activate slim  # -> transport:'local', configured:false, clean fallback","handlingStrategy":"fallback","validationCode":"let slimAvailable = false;\ntry {\n  const mod = (await import('@agntcy/slim-bindings')) as { createSlimTransport?: unknown };\n  slimAvailable = typeof mod.createSlimTransport === 'function';\n} catch { slimAvailable = false; }\nif (!slimAvailable) useLocalTransport();","typeGuard":"function exportsCreateSlimTransport(m: unknown): m is { createSlimTransport: (o: { endpoint: string }) => Promise<unknown> } {\n  return typeof (m as { createSlimTransport?: unknown })?.createSlimTransport === 'function';\n}","tryCatchPattern":"const res = await activateTransport('slim');\nif (res.data?.transport === 'local') {\n  // expected until the real SLIM runtime ships; hooks keep routing in-process\n}","preventionTips":["Design callers to accept transport:'local' as a first-class outcome","Audit node_modules for stray @agntcy/slim-bindings stubs in CI images"],"tags":["agntcy","optional-dependency","dynamic-import","package-exports","transport","fallback"],"backgroundTag":"missing-package-export","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}