import type { TerminalError } from '../types/errors.js'; /** * Base class for user-facing errors that the CLI handler layer normalizes * into a coded ScaffoldError via toScaffoldError(). Every subclass maps to * ExitCode.ValidationError (1); exit code 2 is MissingDependency * (src/types/enums.ts) and must not be used for input errors. Internal * errors that should surface as stack traces do NOT extend this. */ export declare abstract class ScaffoldUserError extends Error { constructor(message: string); } export declare class FlagConflictError extends ScaffoldUserError { constructor(conflictSummary: string); } export declare class InvalidYamlError extends ScaffoldUserError { constructor(sourceLabel: string, detail: string); } export declare class InvalidConfigError extends ScaffoldUserError { constructor(sourceLabel: string, detail: string); } export declare class FromPathReadError extends ScaffoldUserError { constructor(pathArg: string, cause: string); } export declare class TTYStdinError extends ScaffoldUserError { constructor(); } export declare class MultiServiceNotSupportedError extends ScaffoldUserError { constructor(commandName: string); } export declare class ExistingScaffoldError extends ScaffoldUserError { constructor(projectRoot: string); } export declare class ServiceRequiredError extends ScaffoldUserError { constructor(stepName: string); } export declare class ServiceRejectedError extends ScaffoldUserError { constructor(stepName: string); } export declare class ServiceNotFoundError extends ScaffoldUserError { constructor(serviceName: string); } export declare class ServiceFlagWithoutServicesError extends ScaffoldUserError { constructor(); } export declare class MultiServiceOverlayMissingError extends ScaffoldUserError { constructor(); } export declare function isScaffoldUserError(err: unknown): err is ScaffoldUserError; /** * Code and recovery for each ScaffoldUserError subclass. * * `recovery` is REQUIRED, not optional. Every terminal failure must name its * own fix, and a mapping that allowed an entry without one would let that * guarantee rot silently as subclasses were added. */ export declare const USER_ERROR_CODES: Record; /** * Normalize a ScaffoldUserError into the coded error the CLI emits. * * Throws on an unmapped subclass rather than falling back to a generic code. * A silent fallback would emit an error with no actionable recovery, which is * the exact failure this work exists to remove; failing loudly in development * beats shipping an unhelpful error. */ export declare function toScaffoldError(err: ScaffoldUserError): TerminalError; //# sourceMappingURL=user-errors.d.ts.map