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

rUv638eb843774f
diff --git a/.claude/checkpoints/1754356594.json b/.claude/checkpoints/1754356594.json
new file mode 100644
index 0000000000..48ec03b376
--- /dev/null
+++ b/.claude/checkpoints/1754356594.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250805-011634", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/hive-mind/session-manager.js", "timestamp": "2025-08-05T01:16:34Z", "type": "pre-edit", "original_branch": "alpha-85"}
diff --git a/.claude/checkpoints/1754356596.json b/.claude/checkpoints/1754356596.json
new file mode 100644
index 0000000000..881877c112
--- /dev/null
+++ b/.claude/checkpoints/1754356596.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250805-011636", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/hive-mind/session-manager.js", "timestamp": "2025-08-05T01:16:36Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 40 ++++++++-------------- .claude-flow/metrics/task-metrics.json | 6 ++-- .claude/checkpoints/1754356567.json | 1 + .claude/checkpoints/1754356569.json | 1 + claude-flow-wiki | 0 .../simple-commands/hive-mind/session-manager.js | 10 ++++-- 7 files changed, 28 insertions(+), 32 deletions(-) "}
diff --git a/src/cli/simple-commands/hive-mind/session-manager.js b/src/cli/simple-commands/hive-mind/session-manager.js
index dfb514eb98..4e7df82bcb 100644
--- a/src/cli/simple-commands/hive-mind/session-manager.js
+++ b/src/cli/simple-commands/hive-mind/session-manager.js
@@ -537,30 +537,41 @@ To enable persistence, see: https://github.com/ruvnet/claude-code-flow/docs/wind
}
// Update session status
- const stmt = this.db.prepare(`
- UPDATE sessions
- SET status = 'active', resumed_at = CURRENT_TIMESTAMP, updated_at = CURRENT_TIMESTAMP
- WHERE id = ?
- `);
-
- stmt.run(sessionId);
+ if (this.isInMemory) {
+ // Use in-memory storage
+ const sessionData = this.memoryStore.sessions.get(sessionId);
+ if (sessionData) {
+ sessionData.status = 'active';
+ sessionData.resumed_at = new Date().toISOString();
+ sessionData.updated_at = new Date().toISOString();
+ }
+ } else {
+ // Use SQLite
+ const stmt = this.db.prepare(`
+ UPDATE sessions
+ SET status = 'active', resumed_at = CURRENT_TIMESTAMP, updated_at = CURRENT_TIMESTAMP
+ WHERE id = ?
+ `);
- // Update swarm status
- this.db.prepare('UPDATE swarms SET status = ? WHERE id = ?').run('active', session.swarm_id);
+ stmt.run(sessionId);
- // Update agent statuses
- this.db
- .prepare(
- `
- UPDATE agents
- SET status = CASE
- WHEN role = 'queen' THEN 'active'
- ELSE 'idle'
- END
- WHERE swarm_id = ?
- `,
- )
- .run(session.swarm_id);
+ // Update swarm status
+ this.db.prepare('UPDATE swarms SET status = ? WHERE id = ?').run('active', session.swarm_id);
+
+ // Update agent statuses
+ this.db
+ .prepare(
+ `
+ UPDATE agents
+ SET status = CASE
+ WHEN role = 'queen' THEN 'active'
+ ELSE 'idle'
+ END
+ WHERE swarm_id = ?
+ `,
+ )
+ .run(session.swarm_id);
+ }
await this.logSessionEvent(sessionId, 'info', 'Session resumed', null, {
pausedDuration: session.paused_at ? new Date() - new Date(session.paused_at) : null,