/**
 * Executes parallel workflow steps concurrently and aggregates results.
 *
 * When onStream is provided, uses ParallelLogger to prefix each
 * sub-step output with `[name]` for readable interleaved display.
 */
import type { WorkflowStep, WorkflowState, WorkflowMaxSteps, WorkflowResumePointEntry } from '../../models/types.js';
import type { OptionsBuilder } from './OptionsBuilder.js';
import type { StepExecutor } from './StepExecutor.js';
import type { WorkflowEngineOptions, PhaseName, PhasePromptParts, JudgeStageEntry, StepRunResult } from '../types.js';
import type { RuntimeStepResolution } from '../types.js';
import type { StructuredCaller } from '../../../agents/structured-caller.js';
import type { QualityGateRunResult } from '../quality-gates/types.js';
export interface ParallelRunnerDeps {
    readonly optionsBuilder: OptionsBuilder;
    readonly stepExecutor: StepExecutor;
    readonly engineOptions: WorkflowEngineOptions;
    readonly getCwd: () => string;
    readonly getReportDir: () => string;
    readonly getWorkflowName: () => string;
    readonly getInteractive: () => boolean;
    readonly observabilityEnabled: boolean;
    readonly observabilityRunId?: string;
    readonly sanitizeObservabilityText?: (text: string) => string;
    readonly getCurrentWorkflowStack?: () => WorkflowResumePointEntry[] | undefined;
    readonly detectRuleIndex: (content: string, stepName: string) => number;
    readonly structuredCaller: StructuredCaller;
    readonly runQualityGates: (options: {
        qualityGates: WorkflowStep['qualityGates'];
        projectRoot: string;
        step: WorkflowStep;
    }) => Promise<QualityGateRunResult>;
    readonly onPhaseStart?: (step: WorkflowStep, phase: 1 | 2 | 3, phaseName: PhaseName, instruction: string, promptParts: PhasePromptParts, phaseExecutionId?: string, iteration?: number) => void;
    readonly onPhaseComplete?: (step: WorkflowStep, phase: 1 | 2 | 3, phaseName: PhaseName, content: string, status: string, error?: string, phaseExecutionId?: string, iteration?: number) => void;
    readonly onJudgeStage?: (step: WorkflowStep, phase: 3, phaseName: 'judge', entry: JudgeStageEntry, phaseExecutionId?: string, iteration?: number) => void;
}
export declare class ParallelRunner {
    private readonly deps;
    constructor(deps: ParallelRunnerDeps);
    /**
     * Run a parallel step: execute all sub-steps concurrently, then aggregate results.
     * The aggregated output becomes the parent step response for rules evaluation.
     */
    runParallelStep(step: WorkflowStep, state: WorkflowState, task: string, maxSteps: WorkflowMaxSteps, updatePersonaSession: (persona: string, sessionId: string | undefined) => void, runtime?: RuntimeStepResolution): Promise<StepRunResult>;
    private buildParallelLoggerOptions;
    private createTerminalParentResult;
    private collectTerminalResults;
    private buildTerminalDiagnostic;
    private firstFailureCategory;
    private firstRateLimitMetadata;
}
//# sourceMappingURL=ParallelRunner.d.ts.map