{"record":{"id":"7466d16617116c72","repo":"ruvnet/ruflo","slug":"agntcy-package-name-is-installed-but-does-not-7466d1","errorCode":null,"errorMessage":"\"${AGNTCY_PACKAGE_NAME}\" is installed but does not export createSlimTransport()","messagePattern":"\"(.+?)\" 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/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/commands/agntcy/transport.ts#L55-L91","documentation":"Thrown inside the 'transport use slim' command (ADR-380 §2) when the optional package '@agntcy/slim-bindings' is installed and resolves, but its module object does not have a callable 'createSlimTransport' function. The throw is immediately caught and the command falls back to local transport with a user-facing message. The error is returned as a soft failure (success: true, transport: 'local').","triggerScenarios":"RUFLO_AGNTCY_SLIM_ENDPOINT is set, @agntcy/slim-bindings resolves, detectAgntcyRuntime() returns configured: true, but mod.createSlimTransport is undefined or not a function.","commonSituations":"The installed @agntcy/slim-bindings version predates the createSlimTransport export; a different major version was installed that renamed or restructured the transport factory.","solutions":["Upgrade to the pinned alpha: npm install @agntcy/slim-bindings@2.0.0-alpha.5","Confirm the package exports createSlimTransport by checking its type definitions","If unavailable, the local in-process transport is used automatically — no action needed"],"exampleFix":"// before\n\"@agntcy/slim-bindings\": \"^1.0.0\"\n\n// after\n\"@agntcy/slim-bindings\": \"2.0.0-alpha.5\"","handlingStrategy":"type-guard","validationCode":"async function hasCreateSlimTransport(pkgName: string): Promise<boolean> {\n  try {\n    const mod = await import(pkgName);\n    return typeof (mod as Record<string, unknown>)?.createSlimTransport === 'function';\n  } catch {\n    return false;\n  }\n}\n\nif (!await hasCreateSlimTransport('@agntcy/slim-bindings')) {\n  console.error('Upgrade @agntcy/slim-bindings to support createSlimTransport()');\n}","typeGuard":"function hasCreateSlimTransport(mod: unknown): mod is { createSlimTransport: (opts: { endpoint: string }) => Promise<unknown> } {\n  return typeof (mod as Record<string, unknown>)?.createSlimTransport === 'function';\n}","tryCatchPattern":"// The command already catches this internally and falls back to local transport.\nconst result = await useCommand.action(ctx);\nif (result.data?.transport === 'local' && result.data?.error) {\n  console.error('SLIM transport unavailable, using local:', result.data.error);\n}","preventionTips":["Pin @agntcy/slim-bindings to 2.0.0-alpha.5 or later","Local transport is always the default and needs no package","Check result.data.transport rather than expecting an exception"],"tags":["agntcy","slim","transport","version-mismatch","optional-dep","adr-380"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}