/** * Exit code when the server-side call succeeded (and was billed) but saving * its file locally failed. Distinct from 1 so callers can tell "nothing * happened" from "the result exists, only the local copy is missing" — the * same "didn't materialize" meaning as `skills sync`'s exit 4. */ export declare const LOCAL_SAVE_FAILED_EXIT_CODE = 4; export interface DownloadFailure { output_file: string; url: string; error: string; retry: string; } export declare function ensureParentDir(destPath: string): void; /** Reject unusable output paths before submitting a potentially billed call. */ export declare function preflightOutputFile(destPath: string): void; /** * Stream `body` into `destPath`, creating missing parent directories. */ export declare function writeBodyToFile(body: NonNullable, destPath: string, ...through: NodeJS.ReadWriteStream[]): Promise; /** * Describe a failed local save of an already-produced remote file, with a * download-only retry so an agent re-fetches the bytes instead of paying to * regenerate them. */ export declare function describeDownloadFailure(url: string, destPath: string, err: unknown): DownloadFailure; export declare function downloadFailureMessage(failure: DownloadFailure): string; //# sourceMappingURL=download-file.d.ts.map