ruvnet/ruflo · warning · Error

"@agntcy/slim-bindings" is installed but does not export joi

Error message

"@agntcy/slim-bindings" is installed but does not export joinGroup()

What it means

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.

Source

Thrown at v3/@claude-flow/cli/src/commands/agntcy/swarm-join.ts:89

    const status = await detectAgntcyRuntime();

    if (!status.configured) {
      output.printInfo(AGNTCY_NOT_CONFIGURED_MESSAGE);
      output.printInfo(
        `Namespace "${namespace}" was not joined via SLIM. Local swarm/hive-mind coordination ` +
          '(swarm_init / hive-mind_* MCP tools) remains available and unaffected.',
      );
      return {
        success: true,
        data: { joined: false, namespace, configured: false, reason: status.reason },
      };
    }

    try {
      const mod = (await import(AGNTCY_PACKAGE_NAME)) as AgntcySlimGroupModule;
      if (typeof mod.joinGroup !== 'function') {
        throw new Error(`"${AGNTCY_PACKAGE_NAME}" is installed but does not export joinGroup()`);
      }
      const result = await mod.joinGroup({ endpoint: status.endpoint as string, namespace });
      output.printSuccess(
        `Joined SLIM group "${namespace}"${typeof result?.members === 'number' ? ` (${result.members} members)` : ''}.`,
      );
      return { success: true, data: { joined: true, namespace, members: result?.members } };
    } catch (error) {
      const message = error instanceof Error ? error.message : String(error);
      output.printError(`SLIM group join failed: ${message}`);
      return { success: true, data: { joined: false, namespace, error: message } };
    }
  },
};

export { joinCommand as swarmJoinCommand };
export default joinCommand;

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Uninstall @agntcy/slim-bindings so the command takes the clean 'not configured' skip path (local coordination unaffected)
  2. 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'
  3. Check CommandResult.data (joined:false + error) instead of relying on the exit code

Example fix

// before
npm install @agntcy/slim-bindings  # placeholder without joinGroup
ruflo swarm join --namespace demo
// after
npm uninstall @agntcy/slim-bindings
ruflo swarm join --namespace demo  # -> joined:false, configured:false, clean skip
Defensive patterns

Strategy: fallback

Validate before calling

let canJoin = false;
try {
  const mod = (await import('@agntcy/slim-bindings')) as { joinGroup?: unknown };
  canJoin = typeof mod.joinGroup === 'function';
} catch { canJoin = false; }
if (!canJoin) useLocalCoordinationOnly();

Type guard

function exportsJoinGroup(m: unknown): m is { joinGroup: (o: { endpoint: string; namespace: string }) => Promise<{ members?: number }> } {
  return typeof (m as { joinGroup?: unknown })?.joinGroup === 'function';
}

Try / catch

const res = await runSwarmJoin(namespace);
if (res.success && res.data?.joined === false && res.data?.error) {
  // local swarm/hive-mind coordination remains available — proceed without SLIM
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/a6fa59a613379363. Report an issue: GitHub.