import type { StandardSchemaV1 } from "@standard-schema/spec"; /** The value passed to `run()` failed validation against `defineInput`'s schema. */ export declare class SchemaValidationError extends Error { readonly issues: ReadonlyArray; constructor(issues: ReadonlyArray); } /** * A step was declared in a way the script cannot honour — today, a `clean` * naming a key some step reserved through `rollbackKeys`. Thrown by `addStep`, * while the script is being built, long before anything runs. */ export declare class StepDefinitionError extends Error { readonly step: string; constructor(step: string, message: string); } /** * Two phases, or two steps within one phase, were given the same name. Thrown * while the script is being built. * * Names are not decoration: they label the frame, they are what `outline()` * reports, and they identify a phase's or step's cache entry. Two units * sharing a name share a slot, which surfaces as wrong data rather than as a * failure — so it is refused up front. */ export declare class DuplicateNameError extends Error { readonly kind: "phase" | "step" | "flag"; readonly duplicate: string; constructor(kind: "phase" | "step" | "flag", duplicate: string, message: string); } /** * A cached value was read for a field it does not have. * * Without a `schema` a slot's type is inferred from the steps that produce it, * which describes *today's* code — while the entry on disk was written by * whatever the code looked like when it last ran. This is thrown at the exact * property access where those two disagree, rather than letting an `undefined` * travel somewhere less obvious. */ export declare class CacheShapeError extends Error { readonly slot: string; readonly path: string; constructor(slot: string, path: string); } /** A step's handler threw. `cause` holds whatever it actually threw. */ export declare class StepFailedError extends Error { readonly phase: string; readonly step: string; readonly attempts: number; constructor(phase: string, step: string, attempts: number, cause: unknown); } export declare class StepTimeoutError extends Error { readonly step: string; readonly timeoutMs: number; constructor(step: string, timeoutMs: number); } /** The run was cancelled — Ctrl-C, SIGTERM, or a caller-supplied signal. */ export declare class ScriptAbortedError extends Error { readonly reason: string; constructor(reason: string); } /** A compensation handler itself threw; the original failure is in `cause`. */ export declare class RollbackFailedError extends Error { readonly phase: string; readonly step: string; readonly rollbackError: unknown; constructor(phase: string, step: string, rollbackError: unknown, cause: unknown); } /** * `run()` saw `--foo` or `-f` on the command line, but no `defineFlag` call * named it. Thrown before any phase executes, the same as a bad `defineInput` * schema — parsing happens once, up front. */ export declare class UnknownFlagError extends Error { readonly flag: string; constructor(flag: string, known: readonly string[]); } /** A non-boolean flag was given with nothing after it — `--env` with no value. */ export declare class MissingFlagValueError extends Error { readonly flag: string; constructor(flag: string); } /** A `context.prompt` call was cancelled — Ctrl-C while waiting on input. */ export declare class PromptCancelledError extends Error { constructor(); } /** * A step called `context.prompt` but stdin isn't an interactive terminal — * CI, a pipe, a non-TTY subprocess — and the prompt declared no `default` to * fall back to. Thrown instead of hanging on a stream nothing will ever * write to. */ export declare class PromptUnavailableError extends Error { constructor(message: string); } export declare function isAbort(error: unknown): boolean; //# sourceMappingURL=errors.d.ts.map