import type { SessionManager } from './session-manager.js';
import type { WorkspaceGitWatcherService } from './workspace-git-watcher.service.js';
export declare const TaskCleanupJobStatus: {
    readonly PENDING: "PENDING";
    readonly RUNNING: "RUNNING";
    readonly COMPLETED: "COMPLETED";
    readonly FAILED: "FAILED";
};
interface TaskCleanupSessionSnapshot {
    id: string;
}
interface TaskCleanupWorkspaceSnapshot {
    id: string;
    worktreePath: string;
    workingDir: string;
    workspaceKind: string;
    branchName: string;
    baseBranch: string | null;
    sessions: TaskCleanupSessionSnapshot[];
}
export interface TaskCleanupSnapshot {
    taskId: string;
    projectId: string;
    project: {
        repoPath: string;
        mainBranch: string;
    };
    workspaces: TaskCleanupWorkspaceSnapshot[];
}
export declare function getTaskCleanupRetryDelayMs(attempts: number): number;
/**
 * Persistent worker for resources left behind by fast task deletion.
 */
export declare class TaskCleanupService {
    private readonly sessionManager;
    private readonly workspaceGitWatcher?;
    private running;
    private timer;
    constructor(sessionManager: SessionManager, workspaceGitWatcher?: Pick<WorkspaceGitWatcherService, "unwatchWorkspace"> | undefined);
    start(intervalMs?: number): void;
    stop(): void;
    trigger(): void;
    processDueJobs(limit?: number): Promise<number>;
    processJob(jobId: string): Promise<void>;
    private claimNextJob;
    private cleanupSnapshot;
    private recordFailure;
}
export {};
//# sourceMappingURL=task-cleanup.service.d.ts.map