/** * Multi-Agent Orchestration Coordinator * * Central coordinator for multi-agent orchestration that integrates all orchestration components * for comprehensive E2E workflow management and coordination. * * @since 2026-01-23 */ import { TaskDefinition } from "../agents/types.js"; import { XrayStateManager } from "../state/state-manager.js"; export interface OrchestrationWorkflow { id: string; name: string; description: string; tasks: TaskDefinition[]; priority: "low" | "medium" | "high" | "critical"; timeout?: number; dependencies?: string[]; context?: Record; } export interface OrchestrationResult { success: boolean; workflowId: string; completedTasks: number; failedTasks: number; totalTasks: number; duration: number; results: unknown[]; errors: string[]; agentCoordination: { agentsUsed: string[]; coordinationEvents: number; conflictsResolved: number; }; } export interface ExecutionPlan { complexityScore: number; recommendedStrategy: "single-agent" | "multi-agent" | "orchestrator-led"; parallelGroups: TaskDefinition[][]; dependencyGraph: Map; estimatedDuration: number; } export interface ResourceAllocation { allocatedAgents: string[]; resourceAvailability: Record; coordinationCapacity: number; } export interface WorkflowTaskResult { success: boolean; taskId?: string | undefined; result?: unknown | undefined; error?: string | undefined; duration: number; } export interface CoordinatedWorkflowResult { taskResults: WorkflowTaskResult[]; coordinationEvents: number; conflictsResolved: number; agentsUsed: string[]; } export interface CoordinationMetrics { totalWorkflows: number; successfulWorkflows: number; failedWorkflows: number; averageDuration: number; agentUtilization: Record; coordinationEfficiency: number; } export declare class MultiAgentOrchestrationCoordinator { private xrayOrchestrator; private enhancedOrchestrator; private agentDelegator; private stateManager; private complexityAnalyzer; private coordinationMetrics; constructor(stateManager?: XrayStateManager); /** * Initialize the coordination system with all components */ private initializeCoordinationSystem; /** * Execute a complete orchestration workflow with full coordination */ executeOrchestrationWorkflow(workflow: OrchestrationWorkflow, sessionId?: string): Promise; /** * Analyze workflow complexity and create execution plan */ private analyzeWorkflowComplexity; /** * Allocate resources for workflow execution */ private allocateWorkflowResources; /** * Execute coordinated workflow using all orchestration components */ private executeCoordinatedWorkflow; /** * Consolidate workflow results */ private consolidateWorkflowResults; /** * Build parallel execution groups based on dependencies */ private buildParallelExecutionGroups; /** * Update coordination metrics */ private updateCoordinationMetrics; /** * Get coordination metrics */ getCoordinationMetrics(): CoordinationMetrics; /** * Validate orchestration workflow */ validateWorkflow(workflow: OrchestrationWorkflow): { valid: boolean; errors: string[]; warnings: string[]; }; /** * Shutdown coordination system */ shutdown(): Promise; } export declare const multiAgentOrchestrationCoordinator: MultiAgentOrchestrationCoordinator;