/**
 * OrchestrationStateManager — 병렬 오케스트레이션 상태 관리
 *
 * Refactored to use pure state-transition functions.
 * Original mutable implementation extracted into run-state-machine.ts and node-state-machine.ts.
 */
import type { RunState, TaskResult } from "../../contracts/orchestration.js";
import type { OrchestrationEvent, OrchestrationState, StateManagerOptions, WorkerState } from "../contracts/index.js";
export declare class OrchestrationStateManager {
    private state;
    private persister;
    private runState;
    private orchestrationError?;
    constructor(options: StateManagerOptions);
    /**
     * 워커 상태 초기화
     */
    initializeWorker(nodeId: string, maxRetries: number): void;
    /**
     * 워커 시작
     */
    startWorker(nodeId: string, assignment?: WorkerState["assignment"]): void;
    /**
     * 워커 완료
     */
    completeWorker(nodeId: string, result: TaskResult): void;
    /**
     * 워커 재시도
     */
    retryWorker(nodeId: string): boolean;
    /**
     * 워커 실패 (재시도 불가)
     */
    failWorker(nodeId: string, error: string): void;
    /**
     * 배치 완료
     */
    completeBatch(batchIndex: number, nodeIds: string[]): void;
    /**
     * 오케스트레이션 완료
     */
    complete(success: boolean): void;
    /**
     * 워커 상태 조회
     */
    getWorker(nodeId: string): WorkerState | undefined;
    /**
     * 모든 워커 상태 조회
     */
    getAllWorkers(): WorkerState[];
    /**
     * 실행 중인 워커 수
     */
    getRunningWorkerCount(): number;
    /**
     * 완료된 워커 수
     */
    getCompletedWorkerCount(): number;
    /**
     * 실패한 워커 수
     */
    getFailedWorkerCount(): number;
    /**
     * 이벤트 조회
     */
    getEvents(): OrchestrationEvent[];
    /**
     * RunState 조회
     */
    getRunState(): RunState;
    /**
     * 상태 저장
     */
    save(): Promise<void>;
    /**
     * 상태 로드
     */
    load(): Promise<boolean>;
    /**
     * 이벤트 추가
     */
    private addEvent;
    /**
     * 상태 조회
     */
    getStatus(): OrchestrationState["status"];
    getStartedAt(): string;
    getCompletedAt(): string | undefined;
    getError(): string | undefined;
    /**
     * 초기화
     */
    initialize(): void;
    /**
     * 상태 설정
     */
    setStatus(status: OrchestrationState["status"]): void;
    setCompletedAt(completedAt: string): void;
    setError(error: string): void;
    /**
     * 이벤트 발생
     */
    emitEvent(event: OrchestrationEvent): void;
    /**
     * 상태 요약 출력
     */
    formatSummary(): string;
}
