/**
 * Retry mode for failed tasks.
 *
 * Provides a dedicated conversation loop with failure context,
 * run session data, and workflow structure injected into the system prompt.
 */
import { type WorkflowContext } from './interactive-summary.js';
import type { InstructModeResult } from './instructModeTypes.js';
/** Failure information for a retry task */
export interface RetryFailureInfo {
    readonly taskName: string;
    readonly taskContent: string;
    readonly createdAt: string;
    readonly failedStep: string;
    readonly error: string;
    readonly lastMessage: string;
    readonly retryNote: string;
}
/** Run session reference data for retry prompt */
export interface RetryRunInfo {
    readonly logsDir: string;
    readonly reportsDir: string;
    readonly task: string;
    readonly workflow: string;
    readonly status: string;
    readonly stepLogs: string;
    readonly reports: string;
}
export type RetrySubjectKind = 'branch' | 'run';
export interface RetrySubject {
    readonly kind: RetrySubjectKind;
    readonly value: string;
}
/** Full retry context assembled by the caller */
export interface RetryContext {
    readonly failure: RetryFailureInfo;
    readonly subject: RetrySubject;
    readonly workflowContext: WorkflowContext;
    readonly run: RetryRunInfo | null;
    readonly previousOrderContent: string | null;
}
export declare function buildRetryTemplateVars(ctx: RetryContext, lang: 'en' | 'ja'): Record<string, string | boolean>;
export declare function runTaskRetryMode(cwd: string, retryContext: RetryContext): Promise<InstructModeResult>;
export declare function runDirectRetryMode(cwd: string, retryContext: RetryContext): Promise<InstructModeResult>;
//# sourceMappingURL=retryMode.d.ts.map