import { spawn } from 'child_process'; export interface FlushResult { uploaded: number; failed: number; } interface SpawnDeps { spawnFn?: typeof spawn; } /** * Upload every pending record. Deletes each on a confirmed success; on any failure the * file is kept and the "flush failed" marker is set so the next command can remind the * user (Option B). Clears the marker when everything uploaded cleanly. */ export declare function flushPending(): Promise; /** * Launch the flush as a detached background process so the foreground command (login, * or a retry prompt) returns immediately. Mirrors the detached-spawn pattern used to * open the browser in `auth/open-browser.ts`. Best-effort: any failure just means the * records wait and retry on the next command. */ export declare function spawnBackgroundFlush(deps?: SpawnDeps): void; /** Hidden `__flush-pending` command run by the detached background process. */ export declare function run(): Promise; export {}; //# sourceMappingURL=flush-pending.d.ts.map