/** Why a run was aborted mid-flight. Extensible — user-initiated cancel will add to this. * `lease_lost`: another worker reclaimed this run (our lease expired + a sweep re-dispatched it), * so we must stop WITHOUT finalizing — the new owner owns the terminal write. */ export type AbortReason = "credit_exhausted" | "cancelled" | "lease_lost"; /** Thrown by WorkflowHost hooks once the run's AbortSignal has fired, so the program unwinds. A plain * Error subclass (no AppError/model coupling) carrying the machine-readable reason. */ export declare class RunAbortedError extends Error { readonly reason: AbortReason; constructor(reason: AbortReason); } /** The reason an aborted signal carries (set via `controller.abort(new RunAbortedError(reason))`), or * null when the signal isn't aborted / wasn't aborted with a RunAbortedError. */ export declare function abortReason(signal: AbortSignal): AbortReason | null; /** Throw if the signal has already aborted — the guard every WorkflowHost hook calls at entry. Re-uses * the signal's own RunAbortedError when present, so the reason propagates verbatim. */ export declare function throwIfAborted(signal: AbortSignal | undefined): void;