/** * An error whose message is meant for the user, not a stack trace. * cli.ts prints the message and exits with `exitCode`. * * `code` is a short machine-readable category (`not_logged_in`, `unreachable`, * `pro_expired`, ...) for the command-outcome report the CLI sends to api-server * (telemetry/report.ts). It is deliberately NOT the message: messages name * paths, games and balances, and none of that belongs in an analytics event. * Optional, because most refusals are one-of-a-kind and are counted under the * generic bucket by exit code alone; set it at the shared throw sites — the * http client, the session — where one line classifies a whole family. */ export declare class CliError extends Error { readonly exitCode: number; readonly code: string | undefined; constructor(message: string, exitCode?: number, code?: string); } /** * The `code` off a Node fs/child-process error, without pulling in the NodeJS global namespace. * * Shared because both copies existed to answer the same question — "is this the ENOENT I have a * sentence for, or something I must not swallow?" — and a lane that maps only the codes it thought * of lets the rest escape as a raw stack trace, past whatever guarantee its command documents. */ export declare function errnoCode(error: unknown): string | undefined; /** The errno, or the message when there is none — so no failure mode is left unmapped. */ export declare function describeErrno(error: unknown): string;