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

🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/hive-mind/session-manager.js

rUv37513846385a
diff --git a/.claude/checkpoints/1756226702.json b/.claude/checkpoints/1756226702.json
new file mode 100644
index 0000000000..11af96d2c1
--- /dev/null
+++ b/.claude/checkpoints/1756226702.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250826-164502", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/hive-mind/session-manager.js", "timestamp": "2025-08-26T16:45:02Z", "type": "pre-edit", "original_branch": "alpha97"}
diff --git a/.claude/checkpoints/1756226704.json b/.claude/checkpoints/1756226704.json
new file mode 100644
index 0000000000..29488ff89a
--- /dev/null
+++ b/.claude/checkpoints/1756226704.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250826-164504", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/hive-mind/session-manager.js", "timestamp": "2025-08-26T16:45:04Z", "type": "post-edit", "branch": "alpha97", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 12 ++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +++--- .claude/checkpoints/task-1756226679.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/hive-mind/session-manager.js | 2 ++ 6 files changed, 19 insertions(+), 4 deletions(-) "}
diff --git a/src/cli/simple-commands/hive-mind/session-manager.js b/src/cli/simple-commands/hive-mind/session-manager.js
index d9226f436f..93bf417328 100644
--- a/src/cli/simple-commands/hive-mind/session-manager.js
+++ b/src/cli/simple-commands/hive-mind/session-manager.js
@@ -164,12 +164,20 @@ To enable persistence, see: https://github.com/ruvnet/claude-code-flow/docs/wind
try {
// Check if required columns exist
const columns = this.db.prepare('PRAGMA table_info(sessions)').all();
+
+ // Core columns
const hasObjective = columns.some((col) => col.name === 'objective');
const hasSwarmName = columns.some((col) => col.name === 'swarm_name');
const hasCheckpointData = columns.some((col) => col.name === 'checkpoint_data');
const hasMetadata = columns.some((col) => col.name === 'metadata');
const hasParentPid = columns.some((col) => col.name === 'parent_pid');
const hasChildPids = columns.some((col) => col.name === 'child_pids');
+
+ // Timestamp columns
+ const hasUpdatedAt = columns.some((col) => col.name === 'updated_at');
+ const hasPausedAt = columns.some((col) => col.name === 'paused_at');
+ const hasResumedAt = columns.some((col) => col.name === 'resumed_at');
+ const hasCompletionPercentage = columns.some((col) => col.name === 'completion_percentage');
if (!hasObjective) {
this.db.exec('ALTER TABLE sessions ADD COLUMN objective TEXT');
@@ -200,6 +208,26 @@ To enable persistence, see: https://github.com/ruvnet/claude-code-flow/docs/wind
this.db.exec('ALTER TABLE sessions ADD COLUMN child_pids TEXT');
console.log('Added child_pids column to sessions table');
}
+
+ if (!hasUpdatedAt) {
+ this.db.exec('ALTER TABLE sessions ADD COLUMN updated_at DATETIME DEFAULT CURRENT_TIMESTAMP');
+ console.log('Added updated_at column to sessions table');
+ }
+
+ if (!hasPausedAt) {
+ this.db.exec('ALTER TABLE sessions ADD COLUMN paused_at DATETIME');
+ console.log('Added paused_at column to sessions table');
+ }
+
+ if (!hasResumedAt) {
+ this.db.exec('ALTER TABLE sessions ADD COLUMN resumed_at DATETIME');
+ console.log('Added resumed_at column to sessions table');
+ }
+
+ if (!hasCompletionPercentage) {
+ this.db.exec('ALTER TABLE sessions ADD COLUMN completion_percentage REAL DEFAULT 0');
+ console.log('Added completion_percentage column to sessions table');
+ }
} catch (error) {
console.error('Migration error:', error);
}