From 6b6effab8dc4a9264f433dafa20539cf2227ed2a Mon Sep 17 00:00:00 2001 From: rUv Date: Thu, 17 Jul 2025 04:55:16 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Update=20version=20to=202.0.0-al?= =?UTF-8?q?pha.60=20and=20fix=20Claude=20Code=20integration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Updated package.json version to 2.0.0-alpha.60 - Updated CLI help text to reflect alpha.60 features - Fixed Claude Code integration with hive-mind spawn - Improved session directory management (.hive-mind/sessions) - Removed --no-interactive flag for proper interactive sessions - Fixed mkdirAsync usage for session directory creation šŸ¤– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- package.json | 2 +- src/cli/help-text.js | 4 ++-- src/cli/simple-commands/hive-mind.js | 16 ++++++++++------ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 73932c1a86..d41d3ed4f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "claude-flow", - "version": "2.0.0-alpha.59", + "version": "2.0.0-alpha.60", "description": "Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)", "main": "cli.mjs", "bin": { diff --git a/src/cli/help-text.js b/src/cli/help-text.js index 555a453db8..5d25e39b00 100644 --- a/src/cli/help-text.js +++ b/src/cli/help-text.js @@ -3,14 +3,14 @@ * Provides clear, actionable command documentation */ -export const VERSION = '2.0.0-alpha.58'; +export const VERSION = '2.0.0-alpha.60'; export const MAIN_HELP = ` 🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform šŸŽÆ ENTERPRISE FEATURES: Complete ruv-swarm integration with 87 MCP tools, neural networking, and production-ready infrastructure šŸ NEW: Advanced Hive Mind System with Queen-led coordination, collective intelligence, and unlimited scaling -⚔ ALPHA 58: Hive-mind wizard prompt generation, session cleanup, Claude API config, and TypeScript fixes +⚔ ALPHA 60: Fixed Claude Code integration with hive-mind spawn, proper session directory management, and improved coordination USAGE: claude-flow [options] diff --git a/src/cli/simple-commands/hive-mind.js b/src/cli/simple-commands/hive-mind.js index 7328223c13..0cf5d75d7d 100644 --- a/src/cli/simple-commands/hive-mind.js +++ b/src/cli/simple-commands/hive-mind.js @@ -1685,7 +1685,11 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers, try { // ALWAYS save the prompt file first (fix for issue #330) - const promptFile = `hive-mind-prompt-${swarmId}.txt`; + // Ensure sessions directory exists + const sessionsDir = path.join('.hive-mind', 'sessions'); + await mkdirAsync(sessionsDir, { recursive: true }); + + const promptFile = path.join(sessionsDir, `hive-mind-prompt-${swarmId}.txt`); await writeFile(promptFile, hiveMindPrompt, 'utf8'); console.log(chalk.green(`\nāœ“ Hive Mind prompt saved to: ${promptFile}`)); @@ -1705,8 +1709,8 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers, if (claudeAvailable && !flags.dryRun) { // Pass the prompt directly as an argument to claude - // Using non-interactive mode to prevent hanging - const claudeArgs = [hiveMindPrompt, '--no-interactive']; + // Remove --print to allow interactive session + const claudeArgs = [hiveMindPrompt]; // Add auto-permission flag by default for hive-mind mode (unless explicitly disabled) if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) { @@ -1715,9 +1719,9 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers, } // Spawn claude with the prompt as the first argument - // Use 'pipe' instead of 'inherit' to prevent terminal conflicts + // Use 'inherit' to allow interactive session const claudeProcess = childSpawn('claude', claudeArgs, { - stdio: 'pipe', + stdio: 'inherit', shell: false }); @@ -2391,7 +2395,7 @@ async function launchClaudeWithContext(prompt, flags) { } if (claudeAvailable && !flags.dryRun) { - const claudeArgs = [prompt, '--no-interactive']; + const claudeArgs = [prompt, '--print']; if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) { claudeArgs.push('--dangerously-skip-permissions');