export interface DownloadOwner { schemaVersion: 1; id: string; hostname: string; parentPid: number; workerPid: number | null; downloaderPid: number | null; phase: "allocated" | "idle" | "spawning" | "downloading"; } export interface DownloadCredentialRecovery { removed: string[]; blocked: string[]; } export declare function allocateDownloadCredentials(root: string): Promise<{ directory: string; owner: DownloadOwner; }>; export declare function readDownloadOwner(directory: string): Promise; export declare function updateDownloadOwner(directory: string, owner: DownloadOwner, update: Partial>): Promise; /** 当前所有者也只能清理已确认没有下载进程的目录;冷恢复绝不按旧 PID 杀进程。 */ export declare function cleanupDownloadCredentials(directory: string, ownerId: string, activeWorker?: boolean): Promise; /** 必须在控制服务工作区独占锁内执行。存活、PID重用、不同主机和损坏状态均保守阻断。 */ export declare function recoverDownloadCredentials(root: string): Promise; //# sourceMappingURL=generation-download-state.d.ts.map