diff --git a/package.json b/package.json index e5a72380e6..86f4b117db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "claude-flow", - "version": "3.31.1", + "version": "3.31.2", "description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration", "main": "dist/index.js", "type": "module", diff --git a/ruflo/package.json b/ruflo/package.json index cab90f0ab1..fefc9cc292 100644 --- a/ruflo/package.json +++ b/ruflo/package.json @@ -1,6 +1,6 @@ { "name": "ruflo", - "version": "3.31.1", + "version": "3.31.2", "description": "Ruflo - Enterprise AI agent orchestration platform. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration", "main": "bin/ruflo.js", "type": "module", diff --git a/v3/@claude-flow/cli/package-lock.json b/v3/@claude-flow/cli/package-lock.json index fc88703de8..7dc98c5ffd 100644 --- a/v3/@claude-flow/cli/package-lock.json +++ b/v3/@claude-flow/cli/package-lock.json @@ -1,12 +1,12 @@ { "name": "@claude-flow/cli", - "version": "3.31.1", + "version": "3.31.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@claude-flow/cli", - "version": "3.31.1", + "version": "3.31.2", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/v3/@claude-flow/cli/package.json b/v3/@claude-flow/cli/package.json index 648887319e..e5bc66f4c4 100644 --- a/v3/@claude-flow/cli/package.json +++ b/v3/@claude-flow/cli/package.json @@ -1,6 +1,6 @@ { "name": "@claude-flow/cli", - "version": "3.31.1", + "version": "3.31.2", "type": "module", "description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code", "main": "dist/src/index.js", diff --git a/v3/@claude-flow/cli/src/commands/init.ts b/v3/@claude-flow/cli/src/commands/init.ts index ed5d5d8ec3..7519afe85a 100644 --- a/v3/@claude-flow/cli/src/commands/init.ts +++ b/v3/@claude-flow/cli/src/commands/init.ts @@ -173,6 +173,22 @@ async function maybeInstallSkillsSh(ctx: CommandContext): Promise { if (ctx.flags.format === 'json') return; if (/^(1|true|on|yes)$/i.test(String(process.env.RUFLO_NO_SKILLS_SH || ''))) return; + // Idempotency gate: if this project has already registered ruflo with + // skills.sh, don't re-clone the repo + re-fire a fresh install telemetry + // event on every `ruflo init --force` / `init upgrade` / etc. Each install + // pings skills.sh's leaderboard AND clones the whole ruvnet/ruflo repo + // (~50MB) — re-running per-init would silently inflate our own metrics + // (GitHub unique-cloners, skills.sh rank) and waste user bandwidth. This + // check makes the registration once-per-project, matching the intent. + const nodePath = await import('path'); + const nodeFs = await import('fs'); + const marker = nodePath.join(ctx.cwd, '.agents', 'skills', 'ruflo'); + if (nodeFs.existsSync(marker)) { + output.writeln(); + output.writeln(output.dim(' skills.sh registration already present at .agents/skills/ruflo — skipping')); + return; + } + const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx'; if (!commandExists('npx')) return;