/** * Publish the captured session ATOMICALLY (UD-7): stage the bytes beside the * artifact, then `renameSync` them onto it. * * A rename within one directory is one filesystem operation, so * `storageState.json` is either the previous profile or the complete new one — * never a truncated half of either. That is what makes the failure message * honest: a thrown write or a thrown rename leaves the artifact as it was, so * "this run did not modify it" is a fact rather than an assertion. * * The staging file never survives this call: the `catch` unlinks it before * rethrowing, and `runHeadedLogin`'s `finally` sweeps it on every path out. * Nothing may ever READ the staging path; it exists only between these two * calls. */ export declare function publishState(statePath: string, snapshot: unknown, warnings: string[]): void; /** * Delete this run's staging file, and sweep any a KILLED run left behind. * * Called on EVERY path out of `runHeadedLogin` — a thrown write, a failed * rename, a timeout, a never-captured close, and after a successful publish * (where the rename has already consumed the file, making this a no-op). The * staging file holds live session cookies, and the carve-out allows it only * while a publish is in flight: it must never outlive the command that created * it. */ export declare function discardStaging(statePath: string, warnings: string[]): void;