import { type TaskFileData, type TaskRecord, type TaskFailure } from './schema.js'; import type { TaskInfo, TaskResult, TaskState } from './types.js'; import { TaskStore } from './store.js'; import type { MergeMethod } from '../../core/models/config-types.js'; import type { PrExecutionContext } from '../../core/workflow/system/pr-execution-context.js'; export declare class TaskClaimLockAcquisitionError extends Error { } export declare class TaskLifecycleService { private readonly projectDir; private readonly tasksFile; private readonly store; private readonly onWarning?; private readonly goalTasksOnly?; constructor(projectDir: string, tasksFile: string, store: TaskStore, onWarning?: ((warning: string) => void) | undefined, goalTasksOnly?: boolean | undefined); 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; addTask(content: string, options?: Omit & { content_file?: string; task_dir?: string; worktree_path?: string; slug?: string; summary?: string; deduplicateActiveTargets?: boolean; }): TaskInfo; claimNextTasks(count: number): TaskInfo[]; invalidatePendingGoalTasks(goalId: string): void; failInterruptedRunningTasks(goalId?: string, onRecovered?: (task: TaskState) => void): number; private readTerminalRetryMetadata; requestTaskStop(goalId: string | undefined, taskName: string, executionId: string): NonNullable; 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; completePublishedTask(taskName: string, prUrl: string | undefined): void; private findActiveTaskIndex; private isRunningTaskStale; } //# sourceMappingURL=taskLifecycleService.d.ts.map