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: File edit:

rUv8d7f4b3c5b36
diff --git a/.claude/helpers/checkpoint-manager.sh b/.claude/helpers/checkpoint-manager.sh
index 6a69b736c2..c1edf13e2d 100755
--- a/.claude/helpers/checkpoint-manager.sh
+++ b/.claude/helpers/checkpoint-manager.sh
@@ -281,7 +281,7 @@ case "$1" in
echo "PUSH_BATCH_SIZE: $PUSH_BATCH_SIZE"
echo "MIN_CHANGES_THRESHOLD: $MIN_CHANGES_THRESHOLD"
echo ""
- local commits_ahead=$(git rev-list --count "@{u}..HEAD" 2>/dev/null || echo 0)
+ commits_ahead=$(git rev-list --count "@{u}..HEAD" 2>/dev/null || echo 0)
echo "Commits ahead of remote: $commits_ahead"
;;
diff --git a/v3/@claude-flow/hooks/src/swarm/index.ts b/v3/@claude-flow/hooks/src/swarm/index.ts
index d05b64f4b8..307679defa 100644
--- a/v3/@claude-flow/hooks/src/swarm/index.ts
+++ b/v3/@claude-flow/hooks/src/swarm/index.ts
@@ -195,6 +195,29 @@ export class SwarmCommunication extends EventEmitter {
this.emit('initialized', { agentId: this.config.agentId });
}
+ /**
+ * Shutdown swarm communication and cleanup resources
+ */
+ async shutdown(): Promise<void> {
+ if (!this.initialized) return;
+
+ // Clear cleanup timer to prevent memory leaks
+ if (this.cleanupTimer) {
+ clearInterval(this.cleanupTimer);
+ this.cleanupTimer = undefined;
+ }
+
+ // Clear all maps
+ this.messages.clear();
+ this.broadcasts.clear();
+ this.consensusRequests.clear();
+ this.handoffs.clear();
+ this.agents.clear();
+
+ this.initialized = false;
+ this.emit('shutdown', { agentId: this.config.agentId });
+ }
+
// ============================================================================
// Agent-to-Agent Messaging
// ============================================================================