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:

rUv779578c2992d
diff --git a/v3/@claude-flow/swarm/src/message-bus.ts b/v3/@claude-flow/swarm/src/message-bus.ts
index 39b5dbb23f..845d0ee9c3 100644
--- a/v3/@claude-flow/swarm/src/message-bus.ts
+++ b/v3/@claude-flow/swarm/src/message-bus.ts
@@ -34,10 +34,14 @@ export class MessageBus extends EventEmitter implements IMessageBus {
private subscriptions: Map<string, Subscription> = new Map();
private pendingAcks: Map<string, { message: Message; timeout: NodeJS.Timeout }> = new Map();
private processingInterval?: NodeJS.Timeout;
+ private statsInterval?: NodeJS.Timeout;
private messageCounter: number = 0;
private stats: MessageBusStats;
private startTime: Date = new Date();
+ // Circular buffer for message history (max 60 entries for 60 seconds)
private messageHistory: { timestamp: number; count: number }[] = [];
+ private messageHistoryIndex: number = 0;
+ private static readonly MAX_HISTORY_SIZE = 60;
constructor(config: Partial<MessageBusConfig> = {}) {
super();