UNPKG

@sethdouglasford/claude-flow

Version:

Claude Code Flow - Advanced AI-powered development workflows with SPARC methodology

82 lines 2.55 kB
/** * Enhanced Swarm Coordinator * Implements hierarchical model strategy with intelligent task decomposition * Provides advanced AI-powered coordination for multi-agent systems */ import { EventEmitter } from "events"; import { AgentType, SwarmStrategy } from "./types.js"; export interface HierarchicalModelConfig { primary: string; apply: string; review: string; threshold: number; } export interface ContextWindow { files: string[]; maxTokens: number; priority: "immediate" | "extended" | "project" | "semantic"; chunks: ContextChunk[]; } export interface ContextChunk { content: string; type: "function" | "class" | "module" | "test" | "config"; priority: number; tokens: number; } export interface TaskComplexityAnalysis { complexity: "simple" | "medium" | "complex"; estimatedTokens: number; requiredContext: string[]; suggestedModel: string; agentType: AgentType; } export interface ExtendedTaskMetadata { complexity?: "simple" | "medium" | "complex"; suggestedModel?: string; estimatedTokens?: number; requiredContext?: string[]; } /** * Enhanced Swarm Coordinator with AI-powered task management * Features: * - Hierarchical model selection based on task complexity * - Intelligent context window management * - Advanced task decomposition and analysis * - Multi-agent coordination with specialized roles */ export declare class EnhancedSwarmCoordinator extends EventEmitter { private agents; private taskQueue; private activeTasksMap; private modelConfig; private contextCache; private strategy; private strategyInstance; constructor(config: { modelConfig: HierarchicalModelConfig; strategy: SwarmStrategy; maxAgents?: number; }); private setupEventHandlers; private initializeAgents; addObjective(objective: string): Promise<string>; private decomposeObjective; private createFallbackTasks; private analyzeTaskComplexity; private extractContextFiles; private determineChunkType; private processTasks; private getNextTask; private findBestAgent; private agentCanHandleTaskLenient; private areCapabilitiesRelated; private prepareContextWindow; private determineContextPriority; private createContextChunks; private calculateChunkPriority; private handleAgentTaskCompleted; private handleAgentTaskError; getStatus(): any; shutdown(): Promise<void>; } //# sourceMappingURL=enhanced-coordinator.d.ts.map