{"record":{"id":"4f4687f8e3abf904","repo":"ruvnet/ruflo","slug":"agntcy-package-name-is-installed-but-does-not-4f4687","errorCode":null,"errorMessage":"\"${AGNTCY_PACKAGE_NAME}\" is installed but does not export joinGroup()","messagePattern":"\"(.+?)\" is installed but does not export joinGroup\\(\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"v3/@claude-flow/cli/src/commands/agntcy/swarm-join.ts","lineNumber":89,"sourceCode":"\n    const status = await detectAgntcyRuntime();\n\n    if (!status.configured) {\n      output.printInfo(AGNTCY_NOT_CONFIGURED_MESSAGE);\n      output.printInfo(\n        `Namespace \"${namespace}\" was not joined via SLIM. Local swarm/hive-mind coordination ` +\n          '(swarm_init / hive-mind_* MCP tools) remains available and unaffected.',\n      );\n      return {\n        success: true,\n        data: { joined: false, namespace, configured: false, reason: status.reason },\n      };\n    }\n\n    try {\n      const mod = (await import(AGNTCY_PACKAGE_NAME)) as AgntcySlimGroupModule;\n      if (typeof mod.joinGroup !== 'function') {\n        throw new Error(`\"${AGNTCY_PACKAGE_NAME}\" is installed but does not export joinGroup()`);\n      }\n      const result = await mod.joinGroup({ endpoint: status.endpoint as string, namespace });\n      output.printSuccess(\n        `Joined SLIM group \"${namespace}\"${typeof result?.members === 'number' ? ` (${result.members} members)` : ''}.`,\n      );\n      return { success: true, data: { joined: true, namespace, members: result?.members } };\n    } catch (error) {\n      const message = error instanceof Error ? error.message : String(error);\n      output.printError(`SLIM group join failed: ${message}`);\n      return { success: true, data: { joined: false, namespace, error: message } };\n    }\n  },\n};\n\nexport { joinCommand as swarmJoinCommand };\nexport default joinCommand;\n","sourceCodeStart":71,"sourceCodeEnd":106,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/commands/agntcy/swarm-join.ts#L71-L106","documentation":"Thrown inside the 'swarm join' command (ADR-380 §2) when the optional package '@agntcy/slim-bindings' is installed and resolves, but its module object does not have a callable 'joinGroup' function. This indicates the installed version does not export the SLIM group-membership API. The throw is immediately caught and returned as a soft failure (success: true, joined: false) — local swarm/hive-mind coordination remains unaffected.","triggerScenarios":"RUFLO_AGNTCY_SLIM_ENDPOINT is set, @agntcy/slim-bindings resolves, detectAgntcyRuntime() returns configured: true, but mod.joinGroup is undefined or not a function.","commonSituations":"An incompatible version of @agntcy/slim-bindings is installed that does not expose the group-membership API; the package was installed before the joinGroup export was added.","solutions":["Upgrade to the pinned alpha: npm install @agntcy/slim-bindings@2.0.0-alpha.5","Verify the package's exports include joinGroup","If unavailable, note that local swarm_init / hive-mind_* MCP tools work independently of SLIM"],"exampleFix":"// before\n\"@agntcy/slim-bindings\": \"1.4.1\"\n\n// after\n\"@agntcy/slim-bindings\": \"2.0.0-alpha.5\"","handlingStrategy":"type-guard","validationCode":"async function hasJoinGroup(pkgName: string): Promise<boolean> {\n  try {\n    const mod = await import(pkgName);\n    return typeof (mod as Record<string, unknown>)?.joinGroup === 'function';\n  } catch {\n    return false;\n  }\n}\n\nif (!await hasJoinGroup('@agntcy/slim-bindings')) {\n  console.error('Upgrade @agntcy/slim-bindings to support joinGroup()');\n}","typeGuard":"function hasJoinGroup(mod: unknown): mod is { joinGroup: (opts: { endpoint: string; namespace: string }) => Promise<{ members?: number }> } {\n  return typeof (mod as Record<string, unknown>)?.joinGroup === 'function';\n}","tryCatchPattern":"// The command already catches this internally. Check the return value:\nconst result = await swarmJoinCommand.action(ctx);\nif (result.data?.joined === false && result.data?.error) {\n  console.error('Join failed:', result.data.error);\n  // Local swarm coordination still works — this is a soft failure\n}","preventionTips":["Pin @agntcy/slim-bindings to 2.0.0-alpha.5 or later","Local swarm_init / hive-mind_* MCP tools do not depend on SLIM joinGroup","Check result.data.joined rather than expecting an exception"],"tags":["agntcy","slim","swarm-join","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"}