export interface CliErrorOptions { /** One actionable line: a command to run, a flag to pass, a file to fix. */ hint?: string; /** Defaults to 1. Use 0 for a user-initiated cancellation. */ exitCode?: number; /** The underlying failure. Shown only under `--verbose`/`DEBUG`. */ cause?: unknown; } /** * A failure that is the user's to act on, carrying the fix alongside it. * * Anything that reaches the user as a bare stack trace is a bug in this module's * coverage, not a reason to add another `console.error`. */ export declare class CliError extends Error { readonly hint: string | undefined; readonly exitCode: number; constructor(message: string, options?: CliErrorOptions); } /** Raised when the registry has no such entry. */ export declare class RegistryNotFoundError extends CliError { readonly what: string; constructor(what: string); } /** * A clean stop the user asked for. Exits 0 — declining a prompt is not a * failure, and scripts should not see it as one. */ export declare function cancelled(message?: string): CliError; /** Normalise anything throwable into something printable. */ export declare function toCliError(error: unknown): CliError; /** * Print a failure and set the exit code. The only place that does either. * * Sets `process.exitCode` rather than calling `process.exit()`, which would * truncate buffered stdout when output is piped. */ export declare function reportFatal(error: unknown): void; /** * Report a step that failed without failing the command. * * This names an existing and deliberate policy rather than introducing one: * external tooling (`convex dev`, `supabase link`) and cache writes must * degrade, because a scaffolded project is still useful when the optional * backend wiring did not complete. The user gets the manual command instead. */ export declare function softFail(message: string, options?: { hint?: string; cause?: unknown; }): void;