/**
 * gen-html-multiple scheduler 상태 타입과 순수 계산 규칙을 정의한다.
 */
import type { GenHtmlComponentInput } from '../../gen-html/domain/types';
export type MultipleComponentStatus = 'queued' | 'running' | 'refreshing' | 'completed' | 'failed' | 'cancelled';
export type MultipleComponentRuntimeState = {
    componentName: string;
    errorMessage: string;
    errorReportPath: string;
    finishedAt: string;
    /** 진행 현황 UI에 표시할 생성 파일 목록 (output 디렉터리 기준 상대 경로) */
    generatedFiles: string[];
    historyPath: string;
    id: string;
    log: string;
    outputPath: string;
    previewUrl: string;
    queuedAt: string;
    references: GenHtmlComponentInput['references'];
    refreshStartedAt: string;
    restartRequired: boolean;
    startedAt: string;
    status: MultipleComponentStatus;
};
export type GenHtmlMultipleServerSnapshot = {
    activeCount: number;
    components: MultipleComponentRuntimeState[];
    desiredConcurrency: number;
    failedCount: number;
    overallStatus: 'idle' | 'running' | 'completed';
    queueCount: number;
    restartRequired: boolean;
    runningCount: number;
    storybookBaseUrl: string;
    summary: {
        batchCount: number;
        completedComponents: number;
        failedComponents: number;
    };
};
export declare const DEFAULT_GEN_HTML_MULTIPLE_CONCURRENCY = 1;
export declare const MAX_GEN_HTML_MULTIPLE_CONCURRENCY = 6;
/**
 * @description 사용자가 입력한 concurrency 값을 안전한 범위로 정규화한다.
 * @param value 입력 값
 * @param fallback 잘못된 입력일 때 사용할 값
 * @returns 정규화된 concurrency
 */
export declare function normalizeDesiredConcurrency(value: unknown, fallback?: number): number;
/**
 * @description 상태별 카운트를 계산한다.
 * @param components 컴포넌트 런타임 상태 목록
 * @returns scheduler 카운트
 */
export declare function summarizeMultipleComponentStates(components: MultipleComponentRuntimeState[]): {
    cancelledCount: number;
    completedCount: number;
    failedCount: number;
    queueCount: number;
    runningCount: number;
};
/**
 * @description 모든 컴포넌트가 terminal 상태인지 확인한다.
 * @param components 컴포넌트 런타임 상태 목록
 * @returns 완료 여부
 */
export declare function areAllComponentsSettled(components: MultipleComponentRuntimeState[]): boolean;
//# sourceMappingURL=scheduler-state.d.ts.map