import type { PartialDeep, Promisable } from 'type-fest';
import { ExpectError } from '../../errors/ExpectError';
import type { PipelineExecutorResult } from '../PipelineExecutorResult';
import type { $OngoingTaskResult } from './$OngoingTaskResult';
/**
 * Stores one failed attempt, reports the expectation error, and throws the aggregated retry error after the final
 * regular attempt.
 *
 * @private function of `executeAttempts`
 */
export declare function handleAttemptFailure(options: {
    /**
     * Expectation error raised by the current attempt.
     */
    readonly error: ExpectError;
    /**
     * Zero-based attempt index for the current execution loop.
     */
    readonly attemptIndex: number;
    /**
     * Maximum number of attempts for the current task type.
     */
    readonly maxAttempts: number;
    /**
     * Maximum number of model execution attempts for prompt tasks.
     */
    readonly maxExecutionAttempts: number;
    /**
     * Callback invoked with partial progress updates.
     */
    onProgress(newOngoingResult: PartialDeep<PipelineExecutorResult>): Promisable<void>;
    /**
     * String identifier for the pipeline, used for error reporting.
     */
    readonly pipelineIdentification: string;
    /**
     * Mutable per-task execution state.
     */
    readonly $ongoingTaskResult: $OngoingTaskResult;
}): void;
