/** * 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'; import { type PullRequestContext } from '../../core/workflow/pr-context.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; readonly prContext?: PullRequestContext; } export declare function buildRetryTemplateVars(ctx: RetryContext, lang: 'en' | 'ja'): Record; export declare function runTaskRetryMode(cwd: string, retryContext: RetryContext): Promise; export declare function runDirectRetryMode(cwd: string, retryContext: RetryContext): Promise; //# sourceMappingURL=retryMode.d.ts.map