/** * ParallelExecutor Application Service * * Executes independent tasks in parallel * * @see REQ-PAD-002 - Parallel Execution * @see DES-PAD-002 - ParallelExecutor */ import type { SubagentSpec, SubagentResult } from '../domain/entities/SubagentSpec.js'; import type { DependencyGraph } from '../domain/services/DependencyAnalyzer.js'; /** * Executor function type */ export type SubagentExecutor = (spec: SubagentSpec) => Promise; /** * Parallel executor interface */ export interface IParallelExecutor { /** * Execute specs in parallel respecting dependencies * @param specs - Subagent specifications * @param graph - Dependency graph * @param executor - Executor function * @returns All results */ execute(specs: SubagentSpec[], graph: DependencyGraph, executor: SubagentExecutor): Promise; /** * Execute specs in a single level (all parallel) * @param specs - Subagent specifications * @param executor - Executor function * @returns Results */ executeLevel(specs: SubagentSpec[], executor: SubagentExecutor): Promise; } /** * Executor configuration */ export interface ParallelExecutorConfig { /** Maximum concurrent executions (default: 5) */ maxConcurrency?: number; /** Continue on error (default: true) */ continueOnError?: boolean; /** Global timeout (ms) */ globalTimeoutMs?: number; } /** * Create a parallel executor * * @param config - Optional configuration * @returns IParallelExecutor implementation */ export declare function createParallelExecutor(config?: ParallelExecutorConfig): IParallelExecutor; /** * Execution progress callback */ export type ProgressCallback = (completed: number, total: number, current: SubagentResult) => void; /** * Create executor with progress tracking * * @param config - Configuration * @param onProgress - Progress callback * @returns Executor with progress */ export declare function createProgressExecutor(config?: ParallelExecutorConfig, onProgress?: ProgressCallback): IParallelExecutor; //# sourceMappingURL=ParallelExecutor.d.ts.map