/** * Core orchestration engine implementation */ import { type Workflow, type WorkflowResult } from '@orchestr8/schema'; import type { OrchestrationEngine as IOrchestrationEngine, OrchestrationOptions } from './types.js'; /** * Main orchestration engine implementation */ export declare class OrchestrationEngine implements IOrchestrationEngine { private readonly agentRegistry; private readonly resilienceAdapter; private readonly logger; private readonly defaultCompositionOrder; private readonly maxConcurrency; private readonly maxResultBytesPerStep; private readonly maxExpansionDepth; private readonly maxExpansionSize; private readonly strictConditions; private readonly eventBus; constructor(options: OrchestrationOptions); /** * Execute a workflow */ execute(workflow: Workflow, variables?: Record, signal?: AbortSignal): Promise; /** * Build execution graph from workflow * * Note: JavaScript Map maintains insertion order, which is critical for * deterministic step scheduling. Steps are inserted in workflow definition * order, and this ordering is used as a tiebreaker in scheduleSteps() * when steps have equal dependency counts. */ private buildExecutionGraph; /** * Detect cycles in the execution graph */ private detectCycles; /** * Build execution levels using topological sort */ private buildExecutionLevels; /** * Schedule steps in deterministic order */ private scheduleSteps; /** * Execute the workflow graph */ private executeGraph; /** * Execute a level of steps in parallel */ private executeLevel; /** * Execute a single step */ private executeStep; /** * Execute fallback step */ private executeFallback; /** * Evaluate step conditions */ private evaluateConditions; /** * Resolve step input mappings */ private resolveStepInput; /** * Truncate result to fit within memory limits * * Currently performs simple byte-based truncation to 90% of the limit. * Future enhancement: Consider adding safe JSON preview that shows * truncation point with ellipsis or partial data structure preservation. */ private truncateResult; /** * Normalize resilience policy to ensure all required fields are present */ private normalizeResiliencePolicy; /** * Normalize errors to ExecutionError */ private normalizeError; } //# sourceMappingURL=orchestration-engine.d.ts.map