export interface WalkSnapshot { done: number; total: number; complete: boolean; } /** A fixed-width bar. Pure, so the rendering is pinned by tests. */ export declare function renderBar(done: number, total: number, width?: number): string; /** `1,240/15,748` — grouped, because five- and six-digit counts are unreadable raw. */ export declare function renderCount(done: number, total: number): string; /** * The one line shown while a walk is in flight, or the one line shown when it * is handed off / finished. Kept pure and separate from the polling so the exact * wording is testable — the whole point of this change is the wording. */ export declare function progressLine(snap: WalkSnapshot | null): string; export declare function handOffLine(snap: WalkSnapshot | null): string; export interface FirstSyncDeps { /** Current walk state, or null when none has been reported yet. */ readProgress: () => WalkSnapshot | null; /** Draw the single line, in place. */ draw: (text: string) => void; /** Start the detached worker. Returns a stop handle for tests. */ startWorker: () => void; now: () => number; sleep: (ms: number) => Promise; /** How long to watch before handing off. */ handOffAfterMs?: number; pollMs?: number; } export interface FirstSyncOutcome { /** True when the walk reported `complete` before the hand-off deadline. */ finished: boolean; snapshot: WalkSnapshot | null; } /** * Start the sync, watch it on ONE line, and stop watching at the deadline. * * Never kills the worker — handing off means letting it run, not cancelling it. * The caller prints the final line, because only it knows the surrounding * layout. */ export declare function watchFirstSync(deps: FirstSyncDeps): Promise; /** * Spawn ` sync` fully detached, stdio discarded. * * `stdio: 'ignore'` is the half that silences the daemon log; `detached` + * `unref` is the half that lets a long walk outlive `init`. `argv[1]` rather * than a resolved package path, so a dev checkout, a global install and a * user-prefix install all re-invoke the binary that is actually running. */ export declare function spawnDetachedSync(extraArgs?: string[]): void; //# sourceMappingURL=init-progress.d.ts.map