/** * 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'; import { type ApscDecision, type ApscSignal } from '../services/pheromone-adaptive.js'; interface SwarmState { swarmId: string; topology: string; maxAgents: number; status: 'initializing' | 'running' | 'paused' | 'shutting_down' | 'terminated'; agents: string[]; tasks: string[]; config: Record; 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; version: string; } export declare function loadSwarmStore(): SwarmStore; export declare function saveSwarmStore(store: SwarmStore): void; /** Shared by hooks_post-task so outcome labels immediately drive APSC. */ export declare function recordSwarmPheromoneSignal(signal: ApscSignal): { active: false; reason: string; } | { active: true; swarmId: string; decision: ApscDecision; }; /** Scheduling gate used by agent_execute. Dry-run topologies remain eligible. */ export declare function pheromoneAgentEligibility(agentId: string): { eligible: boolean; active: boolean; reason?: string; }; export declare const swarmTools: MCPTool[]; export {}; //# sourceMappingURL=swarm-tools.d.ts.map