claude-flow
Version:
Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration
37 lines • 1.3 kB
TypeScript
/**
* Swarm MCP Tools for CLI
*
* Tool definitions for swarm coordination with file-based state persistence.
* Replaces previous stub implementations with real state tracking.
*/
import { type MCPTool } from './types.js';
interface SwarmState {
swarmId: string;
topology: string;
maxAgents: number;
status: 'initializing' | 'running' | 'paused' | 'shutting_down' | 'terminated';
agents: string[];
tasks: string[];
config: Record<string, unknown>;
createdAt: string;
updatedAt: string;
/**
* #1799 — process that initialized this swarm. Used by reconciliation
* on `loadSwarmStore()` to detect orphan entries whose host process has
* already exited (common on Windows where backgrounded daemons don't
* always survive shell exit). Optional for backward compat with
* pre-#1799 stores.
*/
pid?: number;
/** Reason set when status was forced to 'terminated' by reconciliation. */
terminationReason?: string;
}
interface SwarmStore {
swarms: Record<string, SwarmState>;
version: string;
}
export declare function loadSwarmStore(): SwarmStore;
export declare function saveSwarmStore(store: SwarmStore): void;
export declare const swarmTools: MCPTool[];
export {};
//# sourceMappingURL=swarm-tools.d.ts.map