import type { StructuredCaller } from '../../../agents/structured-caller.js';
import type { AgentResponse, WorkflowConfig, WorkflowMaxSteps, WorkflowResumePoint, WorkflowStep } from '../../models/types.js';
import type { RunPaths } from '../run/run-paths.js';
import type { WorkflowEngineOptions, WorkflowSharedRuntimeState } from '../types.js';
import { ArpeggioRunner } from './ArpeggioRunner.js';
import { LoopMonitorJudgeRunner } from './LoopMonitorJudgeRunner.js';
import { OptionsBuilder } from './OptionsBuilder.js';
import { ParallelRunner } from './ParallelRunner.js';
import { StepExecutor } from './StepExecutor.js';
import { SystemStepExecutor } from './SystemStepExecutor.js';
import { TeamLeaderRunner } from './TeamLeaderRunner.js';
import { WorkflowCallRunner } from './WorkflowCallRunner.js';
import type { WorkflowCallChildEngine } from '../types.js';
import type { StructuredOutputNormalizerRegistry } from './structured-output-normalizer.js';
interface WorkflowEngineSetupParams {
    config: WorkflowConfig;
    state: {
        personaSessions: Map<string, string>;
    };
    task: string;
    projectCwd: string;
    getCwd: () => string;
    getReportDir: () => string;
    getRunPaths: () => RunPaths;
    getMaxSteps: () => WorkflowMaxSteps;
    options: WorkflowEngineOptions & {
        structuredOutputNormalizers: StructuredOutputNormalizerRegistry;
    };
    detectRuleIndex: (content: string, stepName: string) => number;
    structuredCaller: StructuredCaller;
    sharedRuntime: WorkflowSharedRuntimeState;
    resumeStackPrefix: WorkflowEngineOptions['resumeStackPrefix'];
    runPaths: RunPaths;
    updateMaxSteps: (maxSteps: WorkflowMaxSteps) => void;
    setActiveResumePoint: (step: WorkflowStep, iteration: number) => void;
    updatePersonaSession: (persona: string, sessionId: string | undefined) => void;
    resolveNextStepFromDone: (step: WorkflowStep, response: AgentResponse) => string;
    resetCycleDetector: () => void;
    emitEvent: (event: string, ...args: unknown[]) => void;
    createEngine: (config: WorkflowConfig, cwd: string, task: string, options: WorkflowEngineOptions) => WorkflowCallChildEngine;
}
export interface WorkflowEngineServices {
    optionsBuilder: OptionsBuilder;
    stepExecutor: StepExecutor;
    parallelRunner: ParallelRunner;
    arpeggioRunner: ArpeggioRunner;
    teamLeaderRunner: TeamLeaderRunner;
    systemStepExecutor: SystemStepExecutor;
    loopMonitorJudgeRunner: LoopMonitorJudgeRunner;
    workflowCallRunner: WorkflowCallRunner;
}
export declare function assertTaskPrefixPair(taskPrefix: string | undefined, taskColorIndex: number | undefined): void;
export declare function createSharedRuntime(resumePoint: WorkflowResumePoint | undefined, maxSteps: WorkflowMaxSteps): WorkflowSharedRuntimeState;
export declare function ensureRunDirsExist(runPaths: RunPaths): void;
export declare function applyRuntimeEnvironment(cwd: string, config: WorkflowConfig, stage: 'init' | 'step'): void;
export declare function createWorkflowEngineServices(params: WorkflowEngineSetupParams): WorkflowEngineServices;
export {};
//# sourceMappingURL=WorkflowEngineSetup.d.ts.map