{"record":{"id":"a6fa59a613379363","repo":"ruvnet/ruflo","slug":"agntcy-slim-bindings-is-installed-but-does-not-a6fa59","errorCode":null,"errorMessage":"\"@agntcy/slim-bindings\" is installed but does not export joinGroup()","messagePattern":"\"@agntcy/slim-bindings\" 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/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/cli/src/commands/agntcy/swarm-join.ts#L71-L106","documentation":"Thrown by the AGNTCY swarm-join command when it dynamic-imports @agntcy/slim-bindings after detectAgntcyRuntime() reports it installed and configured, but the loaded module has no joinGroup() function. It is caught and printed as 'SLIM group join failed: ...'; the command returns success:true with data { joined:false, error } and explicitly notes local swarm/hive-mind coordination remains unaffected.","triggerScenarios":"Running the SLIM swarm-join command for a namespace while a resolvable-but-wrong @agntcy/slim-bindings package is installed (the real one is unpublished upstream, so resolvable installs are stubs/squats) and an endpoint is configured.","commonSituations":"Vendored/private-registry placeholder under the @agntcy/slim-bindings name; API surface renamed in a newer revision; leftover artifact from an experiment. The join silently degrades to local-only coordination.","solutions":["Uninstall @agntcy/slim-bindings so the command takes the clean 'not configured' skip path (local coordination unaffected)","If joining is required, install the exact version exporting joinGroup() and probe it first: const mod = await import('@agntcy/slim-bindings'); typeof mod.joinGroup === 'function'","Check CommandResult.data (joined:false + error) instead of relying on the exit code"],"exampleFix":"// before\nnpm install @agntcy/slim-bindings  # placeholder without joinGroup\nruflo swarm join --namespace demo\n// after\nnpm uninstall @agntcy/slim-bindings\nruflo swarm join --namespace demo  # -> joined:false, configured:false, clean skip","handlingStrategy":"fallback","validationCode":"let canJoin = false;\ntry {\n  const mod = (await import('@agntcy/slim-bindings')) as { joinGroup?: unknown };\n  canJoin = typeof mod.joinGroup === 'function';\n} catch { canJoin = false; }\nif (!canJoin) useLocalCoordinationOnly();","typeGuard":"function exportsJoinGroup(m: unknown): m is { joinGroup: (o: { endpoint: string; namespace: string }) => Promise<{ members?: number }> } {\n  return typeof (m as { joinGroup?: unknown })?.joinGroup === 'function';\n}","tryCatchPattern":"const res = await runSwarmJoin(namespace);\nif (res.success && res.data?.joined === false && res.data?.error) {\n  // local swarm/hive-mind coordination remains available — proceed without SLIM\n}","preventionTips":["Keep local coordination as the designed fallback — do not hard-fail on joined:false","Probe optional package exports once at startup instead of per command"],"tags":["agntcy","optional-dependency","dynamic-import","package-exports","degraded-mode","swarm"],"backgroundTag":"missing-package-export","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}