/**
 * The run error model.
 *
 * Failures inside a run are surfaced as a typed, discriminable value rather
 * than thrown exceptions or synthetic assistant messages. A {@link RunError}
 * becomes the `error` field of a faulted {@link import("./run-state").RunSnapshot}
 * and the payload of a `fault` signal, so callers branch on `kind` instead of
 * matching message strings.
 */
/** The class of failure a {@link RunError} represents. */
export type RunErrorKind = "model_failed" | "tool_failed" | "aborted" | "compaction_failed" | "turn_budget" | "invalid_state";
/** A normalized, discriminable failure raised anywhere inside a run. */
export interface RunError {
    /** Which failure class this is. */
    readonly kind: RunErrorKind;
    /** A human-readable description. */
    readonly message: string;
    /** The underlying error or value that triggered this one, if any. */
    readonly cause?: unknown;
}
/** Construct a {@link RunError}. Convenience over an object literal. */
export declare function runError(kind: RunErrorKind, message: string, cause?: unknown): RunError;
