export interface CommandRunDeps { fetch: typeof globalThis.fetch; sleep: (ms: number) => Promise; /** Injected where a command stamps or compares times. */ now?: () => number; /** Test-only override; production omits it and loadProjectContext walks up from process.cwd(). */ startDir?: string; /** Test-only override; production omits it and the auth store reads ~/.bitmagic. */ baseDir?: string; log: (message: string) => void; } /** * Built AFTER `--json` is known, so `log` is the Output seam rather than a bare console.log — a * deps object constructed before the flag is parsed could only route prose to stdout. */ export declare function commandRunDeps(json: boolean): CommandRunDeps; /** * Rethrow a failure with a reworded message, keeping everything else about it. * * Only the MESSAGE is this function's to change. Re-minting the error with the constructor's * defaults silently downgraded "not logged in" (exit 2, `not_logged_in`) to a generic exit-1 * `cli_error` for every `generate` and `cover` — so the documented exit codes were wrong for a * scripted caller and the documented failure categories never appeared in analytics for those * lanes. Anything that is not a `CliError` is a genuine bug rather than a condition we designed a * message for, and passes through untouched for citty's stack-trace handling. */ export declare function decoratedError(error: unknown, decorate: (message: string) => string): unknown;