Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

fix: Fix agent creation in init --force command (v2.7.41)

Claudee59a04324028
diff --git a/bin/init/agent-copier.js b/bin/init/agent-copier.js
index ab553e9323..4d33b4f790 100644
--- a/bin/init/agent-copier.js
+++ b/bin/init/agent-copier.js
@@ -13,7 +13,8 @@ export async function copyAgentFiles(targetDir, options = {}) {
const { force = false, dryRun = false } = options;
// Path to agent files - try multiple locations
- const packageAgentsDir = join(__dirname, '../../../../.claude/agents'); // From npm package
+ // From bin/init/, go up to project root: ../../.claude/agents
+ const packageAgentsDir = join(__dirname, '../../.claude/agents'); // From npm package
const localAgentsDir = '/workspaces/claude-code-flow/.claude/agents'; // Local development
const cwdAgentsDir = join(process.cwd(), '.claude/agents'); // Current working directory
@@ -190,7 +191,8 @@ export async function copyCommandFiles(targetDir, options = {}) {
const { force = false, dryRun = false } = options;
// Path to command files - try multiple locations
- const packageCommandsDir = join(__dirname, '../../../../.claude/commands'); // From npm package
+ // From bin/init/, go up to project root: ../../.claude/commands
+ const packageCommandsDir = join(__dirname, '../../.claude/commands'); // From npm package
const localCommandsDir = '/workspaces/claude-code-flow/.claude/commands'; // Local development
const cwdCommandsDir = join(process.cwd(), '.claude/commands'); // Current working directory
diff --git a/bin/init/hive-mind-init.js b/bin/init/hive-mind-init.js
index 2c06c18378..3366977213 100644
--- a/bin/init/hive-mind-init.js
+++ b/bin/init/hive-mind-init.js
@@ -305,6 +305,12 @@ export async function initializeCollectiveMemoryDatabase(workingDir, dryRun = fa
let Database;
try {
Database = (await import('better-sqlite3')).default;
+ // Test if the native binding is available by trying to create a test instance
+ const testPath = path.join(workingDir, '.hive-mind', 'test-binding.db');
+ const testDb = new Database(testPath);
+ testDb.close();
+ // Clean up test file
+ try { await fs.unlink(testPath); } catch { /* ignore */ }
} catch (err) {
console.log(' ⚠️ better-sqlite3 not available, using fallback memory database');
return await createFallbackMemoryDatabase(workingDir);
diff --git a/bin/init/index.js b/bin/init/index.js
index 2349baf70f..5f9165af79 100644
--- a/bin/init/index.js
+++ b/bin/init/index.js
@@ -1357,7 +1357,6 @@ ${commands.map((cmd) => `- [${cmd}](./${cmd}.md)`).join('\n')}
}
// Initialize comprehensive hive-mind system
- console.log('\n🧠 Initializing Hive Mind System...');
try {
const hiveMindOptions = {
config: {
diff --git a/package.json b/package.json
index 302fb6c3e0..c046a6c3eb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "claude-flow",
- "version": "2.7.35",
+ "version": "2.7.41",
"description": "Enterprise-grade AI agent orchestration with WASM-powered ReasoningBank memory and AgentDB vector database (always uses latest agentic-flow)",
"mcpName": "io.github.ruvnet/claude-flow",
"main": "cli.mjs",
diff --git a/src/cli/simple-commands/init/hive-mind-init.js b/src/cli/simple-commands/init/hive-mind-init.js
index 2c06c18378..3366977213 100644
--- a/src/cli/simple-commands/init/hive-mind-init.js
+++ b/src/cli/simple-commands/init/hive-mind-init.js
@@ -305,6 +305,12 @@ export async function initializeCollectiveMemoryDatabase(workingDir, dryRun = fa
let Database;
try {
Database = (await import('better-sqlite3')).default;
+ // Test if the native binding is available by trying to create a test instance
+ const testPath = path.join(workingDir, '.hive-mind', 'test-binding.db');
+ const testDb = new Database(testPath);
+ testDb.close();
+ // Clean up test file
+ try { await fs.unlink(testPath); } catch { /* ignore */ }
} catch (err) {
console.log(' ⚠️ better-sqlite3 not available, using fallback memory database');
return await createFallbackMemoryDatabase(workingDir);
diff --git a/src/cli/simple-commands/init/index.js b/src/cli/simple-commands/init/index.js
index b22f747748..a898396dd7 100644
--- a/src/cli/simple-commands/init/index.js
+++ b/src/cli/simple-commands/init/index.js
@@ -1652,7 +1652,6 @@ ${commands.map((cmd) => `- [${cmd}](./${cmd}.md)`).join('\n')}
}
// Initialize comprehensive hive-mind system
- console.log('\n🧠 Initializing Hive Mind System...');
try {
const hiveMindOptions = {
config: {