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: resolve hive-mind database optimization errors

rUvc211a41579ff
diff --git a/src/cli/simple-commands/hive-mind.js b/src/cli/simple-commands/hive-mind.js
index 12ed7c354a..1a9536bf21 100644
--- a/src/cli/simple-commands/hive-mind.js
+++ b/src/cli/simple-commands/hive-mind.js
@@ -157,6 +157,10 @@ async function initHiveMind(flags) {
confidence REAL DEFAULT 1.0,
created_by TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
+ accessed_at DATETIME,
+ access_count INTEGER DEFAULT 0,
+ compressed INTEGER DEFAULT 0,
+ size INTEGER DEFAULT 0,
FOREIGN KEY (swarm_id) REFERENCES swarms(id)
);
@@ -427,7 +431,8 @@ async function spawnSwarm(args, flags) {
objective TEXT,
queen_type TEXT,
status TEXT DEFAULT 'active',
- created_at DATETIME DEFAULT CURRENT_TIMESTAMP
+ created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
+ updated_at DATETIME
);
CREATE TABLE IF NOT EXISTS agents (
@@ -448,8 +453,10 @@ async function spawnSwarm(args, flags) {
agent_id TEXT,
description TEXT,
status TEXT DEFAULT 'pending',
+ priority INTEGER DEFAULT 5,
result TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
+ completed_at DATETIME,
FOREIGN KEY (swarm_id) REFERENCES swarms(id),
FOREIGN KEY (agent_id) REFERENCES agents(id)
);
diff --git a/src/cli/simple-commands/hive-mind/db-optimizer.js b/src/cli/simple-commands/hive-mind/db-optimizer.js
index 82984c46dd..c005bc3028 100644
--- a/src/cli/simple-commands/hive-mind/db-optimizer.js
+++ b/src/cli/simple-commands/hive-mind/db-optimizer.js
@@ -260,7 +260,7 @@ function ensureRequiredColumns(db) {
if (!hasUpdatedAt || hasUpdatedAt.count === 0) {
try {
- db.exec('ALTER TABLE swarms ADD COLUMN updated_at DATETIME DEFAULT CURRENT_TIMESTAMP');
+ db.exec('ALTER TABLE swarms ADD COLUMN updated_at DATETIME');
console.log('Added missing updated_at column to swarms table');
} catch (error) {
if (!error.message.includes('duplicate column')) {
@@ -374,7 +374,7 @@ function addMemoryOptimization(db) {
try {
db.exec(`
ALTER TABLE collective_memory
- ADD COLUMN accessed_at DATETIME DEFAULT CURRENT_TIMESTAMP
+ ADD COLUMN accessed_at DATETIME
`);
console.log('Added accessed_at column to collective_memory table');
} catch (error) {