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: v2.7.17 - Improve error detection for SQLite migration failures in npx

rUve53a16d33efa
diff --git a/.claude-flow/metrics/performance.json b/.claude-flow/metrics/performance.json
index d91e5f1b54..d60b8f501d 100644
--- a/.claude-flow/metrics/performance.json
+++ b/.claude-flow/metrics/performance.json
@@ -1,7 +1,7 @@
{
- "startTime": 1761423682293,
- "sessionId": "session-1761423682293",
- "lastActivity": 1761423682293,
+ "startTime": 1761423979194,
+ "sessionId": "session-1761423979194",
+ "lastActivity": 1761423979194,
"sessionDuration": 0,
"totalTasks": 1,
"successfulTasks": 1,
diff --git a/.claude-flow/metrics/system-metrics.json b/.claude-flow/metrics/system-metrics.json
index b43141d036..82f8f9d18d 100644
--- a/.claude-flow/metrics/system-metrics.json
+++ b/.claude-flow/metrics/system-metrics.json
@@ -5350,5 +5350,125 @@
"cpuLoad": 0.055625,
"platform": "linux",
"uptime": 15569.35
+ },
+ {
+ "timestamp": 1761423695355,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5311377408,
+ "memoryFree": 62116163584,
+ "memoryUsagePercent": 7.877163144107796,
+ "memoryEfficiency": 92.1228368558922,
+ "cpuCount": 16,
+ "cpuLoad": 0.049375,
+ "platform": "linux",
+ "uptime": 15599.38
+ },
+ {
+ "timestamp": 1761423725373,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5364842496,
+ "memoryFree": 62062698496,
+ "memoryUsagePercent": 7.956455799917894,
+ "memoryEfficiency": 92.04354420008211,
+ "cpuCount": 16,
+ "cpuLoad": 0.045625,
+ "platform": "linux",
+ "uptime": 15629.4
+ },
+ {
+ "timestamp": 1761423755404,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5267529728,
+ "memoryFree": 62160011264,
+ "memoryUsagePercent": 7.812133811353094,
+ "memoryEfficiency": 92.18786618864691,
+ "cpuCount": 16,
+ "cpuLoad": 0.040625,
+ "platform": "linux",
+ "uptime": 15659.43
+ },
+ {
+ "timestamp": 1761423785434,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5232029696,
+ "memoryFree": 62195511296,
+ "memoryUsagePercent": 7.759484654231658,
+ "memoryEfficiency": 92.24051534576834,
+ "cpuCount": 16,
+ "cpuLoad": 0.044375,
+ "platform": "linux",
+ "uptime": 15689.46
+ },
+ {
+ "timestamp": 1761423815449,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5282070528,
+ "memoryFree": 62145470464,
+ "memoryUsagePercent": 7.833698886671095,
+ "memoryEfficiency": 92.1663011133289,
+ "cpuCount": 16,
+ "cpuLoad": 0.04,
+ "platform": "linux",
+ "uptime": 15719.47
+ },
+ {
+ "timestamp": 1761423845478,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5289828352,
+ "memoryFree": 62137712640,
+ "memoryUsagePercent": 7.845204309953431,
+ "memoryEfficiency": 92.15479569004657,
+ "cpuCount": 16,
+ "cpuLoad": 0.039375,
+ "platform": "linux",
+ "uptime": 15749.5
+ },
+ {
+ "timestamp": 1761423875483,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5392244736,
+ "memoryFree": 62035296256,
+ "memoryUsagePercent": 7.997095336221394,
+ "memoryEfficiency": 92.00290466377861,
+ "cpuCount": 16,
+ "cpuLoad": 0.036875,
+ "platform": "linux",
+ "uptime": 15779.5
+ },
+ {
+ "timestamp": 1761423905514,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5332885504,
+ "memoryFree": 62094655488,
+ "memoryUsagePercent": 7.909061231571124,
+ "memoryEfficiency": 92.09093876842887,
+ "cpuCount": 16,
+ "cpuLoad": 0.045,
+ "platform": "linux",
+ "uptime": 15809.54
+ },
+ {
+ "timestamp": 1761423935543,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5387902976,
+ "memoryFree": 62039638016,
+ "memoryUsagePercent": 7.990656186971512,
+ "memoryEfficiency": 92.0093438130285,
+ "cpuCount": 16,
+ "cpuLoad": 0.063125,
+ "platform": "linux",
+ "uptime": 15839.56
+ },
+ {
+ "timestamp": 1761423965556,
+ "memoryTotal": 67427540992,
+ "memoryUsed": 5486563328,
+ "memoryFree": 61940977664,
+ "memoryUsagePercent": 8.136976741671416,
+ "memoryEfficiency": 91.86302325832858,
+ "cpuCount": 16,
+ "cpuLoad": 0.06125,
+ "platform": "linux",
+ "uptime": 15869.58
}
]
\ No newline at end of file
diff --git a/.claude-flow/metrics/task-metrics.json b/.claude-flow/metrics/task-metrics.json
index 0e0eaa2d0f..8d9b6dcda8 100644
--- a/.claude-flow/metrics/task-metrics.json
+++ b/.claude-flow/metrics/task-metrics.json
@@ -1,10 +1,10 @@
[
{
- "id": "cmd-hooks-1761423682395",
+ "id": "cmd-hooks-1761423979293",
"type": "hooks",
"success": true,
- "duration": 8.613906999999983,
- "timestamp": 1761423682404,
+ "duration": 7.072566000000052,
+ "timestamp": 1761423979300,
"metadata": {}
}
]
\ No newline at end of file
diff --git a/bin/claude-flow b/bin/claude-flow
index 916711abf4..971b2905a6 100755
--- a/bin/claude-flow
+++ b/bin/claude-flow
@@ -1,7 +1,7 @@
#!/bin/sh
# Claude-Flow Smart Dispatcher - Detects and uses the best available runtime
-VERSION="2.7.16"
+VERSION="2.7.17"
# Determine the correct path based on how the script is invoked
if [ -L "$0" ]; then
diff --git a/package.json b/package.json
index a1dc94d7c7..45656f6ac9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "claude-flow",
- "version": "2.7.16",
+ "version": "2.7.17",
"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/memory.js b/src/cli/simple-commands/memory.js
index 07f62c453e..43295b173f 100644
--- a/src/cli/simple-commands/memory.js
+++ b/src/cli/simple-commands/memory.js
@@ -423,13 +423,16 @@ async function detectMemoryMode(flags, subArgs) {
return 'reasoningbank';
} catch (error) {
// SQLite initialization failed - fall back to JSON
- const isBetterSqliteError = error.message?.includes('BetterSqlite3') ||
- error.message?.includes('better-sqlite3');
+ const isSqliteError = error.message?.includes('BetterSqlite3') ||
+ error.message?.includes('better-sqlite3') ||
+ error.message?.includes('could not run migrations') ||
+ error.message?.includes('ReasoningBank initialization failed');
const isNpx = process.env.npm_config_user_agent?.includes('npx') ||
process.cwd().includes('_npx');
- if (isBetterSqliteError && isNpx) {
+ if (isSqliteError && isNpx) {
// Silent fallback for npx - error already shown by adapter
+ console.log('\n✅ Automatically using JSON fallback for this command\n');
return 'basic';
} else {
printWarning(`⚠️ SQLite unavailable, using JSON fallback`);
diff --git a/src/reasoningbank/reasoningbank-adapter.js b/src/reasoningbank/reasoningbank-adapter.js
index 48684281d5..b12aea84fb 100644
--- a/src/reasoningbank/reasoningbank-adapter.js
+++ b/src/reasoningbank/reasoningbank-adapter.js
@@ -44,8 +44,11 @@ async function ensureInitialized() {
console.error('[ReasoningBank] Backend initialization failed:', error);
// Check if this is the better-sqlite3 missing error (npx issue)
- if (error.message?.includes('BetterSqlite3 is not a constructor') ||
- error.message?.includes('better-sqlite3')) {
+ const isSqliteError = error.message?.includes('BetterSqlite3 is not a constructor') ||
+ error.message?.includes('better-sqlite3') ||
+ error.message?.includes('could not run migrations');
+
+ if (isSqliteError) {
const isNpx = process.env.npm_config_user_agent?.includes('npx') ||
process.cwd().includes('_npx');
@@ -58,7 +61,7 @@ async function ensureInitialized() {
console.error(' 2. USE MCP TOOLS instead:');
console.error(' mcp__claude-flow__memory_usage({ action: "store", key: "test", value: "data" })\n');
console.error(' 3. USE JSON FALLBACK:');
- console.error(' npx claude-flow@alpha memory store "key" "value" --no-reasoningbank\n');
+ console.error(' npx claude-flow@alpha memory store "key" "value" --basic\n');
console.error('See: docs/MEMORY_COMMAND_FIX.md for details\n');
}
}