import { type TaskInfo, type TaskListItem } from '../../../infra/task/index.js'; export interface ReusedWorktreeExecution { execCwd: string; branch?: string; worktreePath: string; isWorktree: true; } export interface ReusedTaskPreparationOverride { workflow?: string; worktreePath?: string; resumeMode?: TaskInfo['resumeMode']; } export declare function toReusedTaskInfo(task: TaskInfo | TaskListItem, preparation?: ReusedTaskPreparationOverride): TaskInfo; /** * Validate the trust boundary for a worktree that an existing task says to reuse. * * Callers that are about to operate on a task's existing worktree use this * named boundary before reading task data or mutating task state. Initial * executions may still choose a new clone when no reusable path is supplied; * retry/instruct callers must not use that fallback. */ export declare function assertReusableWorktreePath(projectDir: string, candidatePath: string): void; /** Permit a missing clone only while a saved PR merge task is still preparing it. */ export declare function assertPrMergeRetryWorktreePath(projectDir: string, candidatePath: string, clonePrepared: boolean): boolean; export declare function inspectReusedWorktreeExecution(projectDir: string, task: TaskInfo): ReusedWorktreeExecution | undefined; export declare function resolveReusedWorktreeExecution(projectDir: string, task: TaskInfo): ReusedWorktreeExecution | undefined; //# sourceMappingURL=reusedWorktree.d.ts.map