import type { TaskFileData, TaskFailure } from './schema.js'; import type { TaskInfo, TaskResult, TaskListItem, TaskState } from './types.js'; import type { TaskStatus } from './schema.js'; import { type TaskDeletionCleanup } from './taskDeletionService.js'; import { type ExceedTaskOptions, type RequeueExceededTaskOptions } from './taskExceedService.js'; import type { RunResumeSource } from '../../core/workflow/run/run-meta.js'; import { type AutoRequeueResult, type TaskRetryOptions } from './taskRetryService.js'; import type { MergeMethod } from '../../core/models/config-types.js'; import type { PrExecutionContext } from '../../core/workflow/system/pr-execution-context.js'; export type { TaskInfo, TaskResult, TaskListItem, TaskState }; export interface TaskRunnerOptions { onWarning?: (warning: string) => void; goalTasksOnly?: boolean; } 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 & { content_file?: string; task_dir?: string; worktree_path?: string; slug?: string; summary?: string; deduplicateActiveTargets?: boolean; }): TaskInfo; startPrMergeTask(input: { prNumber: number; headBranch: string; baseBranch: string; headSha: string; prUrl?: string; headRepositoryUrl: string; headRepositoryPushUrls: readonly string[]; workflow: string; method: MergeMethod; worktreePath: string; threatCheckMaxDiffBytes: number; concurrency?: number; parentTaskName?: string; }): TaskInfo; clearCompletedPrMergeWorktree(taskName: string): void; recordPrMergeClonePrepared(taskName: string): void; recordPrMergeKnownRemoteHead(taskName: string, headSha: string): void; recordPrMergePushedHead(taskName: string, headSha: string, previousRemoteHeadSha: string, source: NonNullable): void; recordCacciaPushedHead(taskName: string, headSha: string, context: PrExecutionContext): void; listTasks(): TaskInfo[]; listTasksForProviderPreflight(goalTasksOnly?: boolean): TaskInfo[]; claimNextTasks(count: number): TaskInfo[]; failInterruptedRunningTasks(goalId?: string, onRecovered?: (task: TaskState) => void): number; invalidatePendingGoalTasks(goalId: string): void; completeTask(result: TaskResult): string; requestTaskStop(goalId: string | undefined, taskName: string, executionId: string): { execution_id: string; requested_at: 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; completePublishedTask(taskName: string, prUrl: string | undefined): void; listPendingTaskItems(): TaskListItem[]; listAllTaskItems(): TaskListItem[]; listTaskStateItems(): TaskState[]; listFailedTasks(): TaskListItem[]; listExceededTasks(): TaskListItem[]; requeueFailedTask(taskRef: string, startStep?: string, retryNote?: string): string; autoRequeueFailedTask(taskRef: string, options: { maxAttempts: number; }): AutoRequeueResult; isAutoRequeueEligible(taskRef: string, maxAttempts: number): boolean; requeueTask(taskRef: string, allowedStatuses: readonly TaskStatus[], options?: TaskRetryOptions): string; startReExecution(taskRef: string, allowedStatuses: readonly TaskStatus[], resumeMode: RunResumeSource['resumeMode'], options?: TaskRetryOptions): TaskInfo; deleteTask(name: string, kind: 'pending' | 'failed' | 'completed' | 'exceeded' | 'pr_failed', cleanup?: TaskDeletionCleanup): void; deleteTaskWithCleanup(name: string, kind: 'pending' | 'failed' | 'completed' | 'exceeded' | 'pr_failed', cleanup: () => boolean): boolean; exceedTask(taskName: string, options: ExceedTaskOptions): void; requeueExceededTask(taskName: string, options?: RequeueExceededTaskOptions): void; } //# sourceMappingURL=runner.d.ts.map