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:

rUv793393d2868d
diff --git a/v3/@claude-flow/swarm/src/coordination/swarm-hub.ts b/v3/@claude-flow/swarm/src/coordination/swarm-hub.ts
index 92d56d18a4..6f7390b2de 100644
--- a/v3/@claude-flow/swarm/src/coordination/swarm-hub.ts
+++ b/v3/@claude-flow/swarm/src/coordination/swarm-hub.ts
@@ -727,23 +727,47 @@ export class SwarmHub implements ISwarmHub {
}
// =============================================================================
-// Factory Functions
+// Factory Functions - COMPATIBILITY LAYER (ADR-003)
// =============================================================================
+/**
+ * @deprecated Use createUnifiedSwarmCoordinator() instead.
+ * This factory is maintained for backward compatibility only.
+ *
+ * Migration:
+ * ```typescript
+ * // OLD:
+ * const hub = createSwarmHub();
+ *
+ * // NEW:
+ * import { createUnifiedSwarmCoordinator } from '@claude-flow/swarm';
+ * const coordinator = createUnifiedSwarmCoordinator();
+ * ```
+ */
export function createSwarmHub(eventBus?: IEventBus): ISwarmHub {
+ console.warn('[DEPRECATION] createSwarmHub() is deprecated. Use createUnifiedSwarmCoordinator() instead.');
return new SwarmHub(eventBus);
}
let globalSwarmHub: ISwarmHub | null = null;
+/**
+ * @deprecated Use UnifiedSwarmCoordinator singleton pattern instead.
+ * This function is maintained for backward compatibility only.
+ */
export function getSwarmHub(): ISwarmHub {
+ console.warn('[DEPRECATION] getSwarmHub() is deprecated. Use UnifiedSwarmCoordinator directly.');
if (!globalSwarmHub) {
globalSwarmHub = createSwarmHub();
}
return globalSwarmHub;
}
+/**
+ * @deprecated Use coordinator.shutdown() directly instead.
+ */
export function resetSwarmHub(): void {
+ console.warn('[DEPRECATION] resetSwarmHub() is deprecated. Call shutdown() on your coordinator instance.');
if (globalSwarmHub?.isInitialized()) {
globalSwarmHub.shutdown();
}