import type { TaskFileData, TaskFailure } from './schema.js';
import type { TaskInfo, TaskResult, TaskListItem } from './types.js';
import type { TaskStatus } from './schema.js';
import { type ExceedTaskOptions } from './taskExceedService.js';
import type { WorkflowResumePoint } from '../../core/models/index.js';
export type { TaskInfo, TaskResult, TaskListItem };
export interface TaskRunnerOptions {
    onWarning?: (warning: string) => void;
}
export declare class TaskRunner {
    private readonly projectDir;
    private readonly store;
    private readonly tasksFile;
    private readonly lifecycle;
    private readonly query;
    private readonly deletion;
    private readonly exceed;
    private readonly retry;
    constructor(projectDir: string, options?: TaskRunnerOptions);
    ensureDirs(): void;
    getTasksFilePath(): string;
    addTask(content: string, options?: Omit<TaskFileData, 'task'> & {
        content_file?: string;
        task_dir?: string;
        worktree_path?: string;
        slug?: string;
        summary?: string;
    }): TaskInfo;
    listTasks(): TaskInfo[];
    claimNextTasks(count: number): TaskInfo[];
    recoverInterruptedRunningTasks(): number;
    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;
    listPendingTaskItems(): TaskListItem[];
    listAllTaskItems(): TaskListItem[];
    listFailedTasks(): TaskListItem[];
    listExceededTasks(): TaskListItem[];
    requeueFailedTask(taskRef: string, startStep?: string, retryNote?: string): string;
    requeueTask(taskRef: string, allowedStatuses: readonly TaskStatus[], startStep?: string, retryNote?: string, resumePoint?: WorkflowResumePoint, workflow?: string, taskDir?: string): string;
    startReExecution(taskRef: string, allowedStatuses: readonly TaskStatus[], startStep?: string, retryNote?: string, resumePoint?: WorkflowResumePoint, workflow?: string, taskDir?: string): TaskInfo;
    deleteTask(name: string, kind: 'pending' | 'failed' | 'completed' | 'exceeded' | 'pr_failed'): void;
    exceedTask(taskName: string, options: ExceedTaskOptions): void;
    requeueExceededTask(taskName: string): void;
}
//# sourceMappingURL=runner.d.ts.map