mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
🚀 Alpha.74: SQLite & Async/Await Fixes
✅ TECHNICAL FIXES - Fixed SQLite loading in sqlite-wrapper.js - now properly loads better-sqlite3 - Fixed async/await in hive-mind sessions command - no more forEach errors - Fixed async/await in session-manager getActiveSessionsWithProcessInfo - Reordered SQLite loading to try CommonJS require first (more reliable) 🔧 VERSION UPDATES - package.json: 2.0.0-alpha.74 - bin/claude-flow: 2.0.0-alpha.74 - src/cli/help-text.js: 2.0.0-alpha.74 - Updated help text to reflect alpha.74 fixes 🐛 BUGS FIXED - 'sessions.forEach is not a function' error resolved - SQLite not available fallback fixed - now properly uses persistent storage - Hive-mind sessions command now displays all active sessions correctly 🎯 Key Achievement: Hive-mind persistence and reliability improvements 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
62a29dfce7
commit
47612bc14e
7 files changed
+22
-27
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Claude-Flow Smart Dispatcher - Detects and uses the best available runtime
|
||||
|
||||
VERSION="2.0.0-alpha.73"
|
||||
VERSION="2.0.0-alpha.74"
|
||||
|
||||
# Determine the correct path based on how the script is invoked
|
||||
if [ -L "$0" ]; then
|
||||
|
||||
+1
-1
Submodule claude-flow-wiki updated: 86fa2a5876...6c8650f78d.
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "claude-flow",
|
||||
"version": "2.0.0-alpha.73",
|
||||
"version": "2.0.0-alpha.74",
|
||||
"description": "Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)",
|
||||
"main": "cli.mjs",
|
||||
"bin": {
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
import { HelpFormatter } from './help-formatter.js';
|
||||
|
||||
export const VERSION = '2.0.0-alpha.73';
|
||||
export const VERSION = '2.0.0-alpha.74';
|
||||
|
||||
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 73: Complete 64-agent system with swarm coordination, enhanced CLAUDE.md integration, and optimized init system
|
||||
⚡ ALPHA 74: Fixed SQLite loading & hive-mind sessions, async/await corrections for better reliability
|
||||
|
||||
USAGE:
|
||||
claude-flow <command> [options]
|
||||
|
||||
@@ -2420,7 +2420,7 @@ function getWorkerTypeInstructions(workerType) {
|
||||
async function showSessions(flags) {
|
||||
try {
|
||||
const sessionManager = new HiveMindSessionManager();
|
||||
const sessions = sessionManager.getActiveSessions();
|
||||
const sessions = await sessionManager.getActiveSessions();
|
||||
|
||||
if (sessions.length === 0) {
|
||||
console.log(chalk.gray('No active or paused sessions found'));
|
||||
|
||||
@@ -925,8 +925,8 @@ To enable persistence, see: https://github.com/ruvnet/claude-code-flow/docs/wind
|
||||
/**
|
||||
* Get active sessions with process information
|
||||
*/
|
||||
getActiveSessionsWithProcessInfo() {
|
||||
const sessions = this.getActiveSessions();
|
||||
async getActiveSessionsWithProcessInfo() {
|
||||
const sessions = await this.getActiveSessions();
|
||||
|
||||
// Add process info to each session
|
||||
return sessions.map((session) => {
|
||||
|
||||
@@ -17,27 +17,22 @@ let loadError = null;
|
||||
/**
|
||||
* Try to load better-sqlite3 with comprehensive error handling
|
||||
*/
|
||||
function tryLoadSQLite() {
|
||||
async function tryLoadSQLite() {
|
||||
try {
|
||||
// Try ES module import
|
||||
const module = import('better-sqlite3');
|
||||
return module.then(m => {
|
||||
Database = m.default;
|
||||
// Try CommonJS require first (more reliable in Node.js)
|
||||
const require = createRequire(import.meta.url);
|
||||
Database = require('better-sqlite3');
|
||||
sqliteAvailable = true;
|
||||
return true;
|
||||
} catch (requireErr) {
|
||||
// Fallback to ES module import
|
||||
try {
|
||||
const module = await import('better-sqlite3');
|
||||
Database = module.default;
|
||||
sqliteAvailable = true;
|
||||
return true;
|
||||
}).catch(err => {
|
||||
loadError = err;
|
||||
return false;
|
||||
});
|
||||
} catch (err) {
|
||||
// Fallback to CommonJS require
|
||||
try {
|
||||
const require = createRequire(import.meta.url);
|
||||
Database = require('better-sqlite3');
|
||||
sqliteAvailable = true;
|
||||
return Promise.resolve(true);
|
||||
} catch (requireErr) {
|
||||
loadError = requireErr;
|
||||
} catch (importErr) {
|
||||
loadError = importErr;
|
||||
|
||||
// Check for specific Windows errors
|
||||
if (requireErr.message.includes('was compiled against a different Node.js version') ||
|
||||
@@ -72,7 +67,7 @@ function tryLoadSQLite() {
|
||||
`);
|
||||
}
|
||||
|
||||
return Promise.resolve(false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user