import { type TaskFileData, type TaskFailure } from './schema.js';
import type { TaskInfo, TaskResult } from './types.js';
import { TaskStore } from './store.js';
export declare class TaskLifecycleService {
    private readonly projectDir;
    private readonly tasksFile;
    private readonly store;
    private readonly onWarning?;
    constructor(projectDir: string, tasksFile: string, store: TaskStore, onWarning?: ((warning: string) => void) | undefined);
    addTask(content: string, options?: Omit<TaskFileData, 'task'> & {
        content_file?: string;
        task_dir?: string;
        worktree_path?: string;
        slug?: string;
        summary?: string;
    }): TaskInfo;
    claimNextTasks(count: number): TaskInfo[];
    recoverInterruptedRunningTasks(): number;
    private readRecoveryRetryMetadata;
    private readTerminalRetryMetadata;
    completeTask(result: TaskResult): string;
    failTask(result: TaskResult): string;
    forceFailRunningTask(taskName: string, failure: TaskFailure): string;
    updateRunningTaskExecution(taskName: string, execution: {
        runSlug: string;
        worktreePath?: string;
        branch?: string;
    }): TaskInfo;
    prFailTask(result: TaskResult, prError: string): string;
    private findActiveTaskIndex;
    private isRunningTaskStale;
}
//# sourceMappingURL=taskLifecycleService.d.ts.map