/**
 * The swarm fault model.
 *
 * Every failure the swarm kernel raises is a {@link SwarmFault} — a real
 * `Error` subclass carrying a typed, discriminable `kind`. Callers branch on
 * `fault.kind` (or `instanceof SwarmFault`) instead of matching message
 * substrings or sniffing for sentinel prefixes. The underlying trigger, when
 * there is one, is preserved verbatim on the standard `Error.cause` slot so a
 * stack/cause chain survives across the kernel boundary.
 *
 * The `kind` axis is closed and exhaustive:
 *
 *   - `lock_timeout` — an exclusive guard could not be acquired before its
 *     deadline. Transient; the caller may retry or treat it as "skip this poll".
 *   - `validation`   — a value failed its zod schema on read or write. The
 *     `cause` is the originating `ZodError` when available.
 *   - `not_found`    — a cell, ticket, or log entry the caller named does not
 *     exist.
 *   - `conflict`     — a guarded mutation lost a race or violated an invariant
 *     (e.g. claiming an already-claimed ticket).
 *   - `isolation`    — a worktree / sandbox provisioning step failed.
 *   - `spawn`        — a teammate agent could not be brought up.
 *
 * This file is pure (no I/O) and is the one dependency every other kernel
 * module is allowed to lean on.
 */
/** The closed set of failure classes the swarm kernel can raise. */
export type SwarmFaultKind = "lock_timeout" | "validation" | "not_found" | "conflict" | "isolation" | "spawn";
/**
 * A typed, discriminable failure raised anywhere inside the swarm kernel.
 *
 * It is a genuine `Error` (so it throws, stringifies, and carries a stack like
 * any other), tagged with a {@link SwarmFaultKind} on {@link kind}. The
 * `discriminated union on kind` the spec asks for is expressed structurally:
 * narrowing on `fault.kind` narrows the value, and `instanceof SwarmFault`
 * separates kernel faults from incidental errors.
 */
export declare class SwarmFault<K extends SwarmFaultKind = SwarmFaultKind> extends Error {
    /** Which failure class this fault belongs to. */
    readonly kind: K;
    /** Stable error name, useful for logs and `error.name` consumers. */
    readonly name = "SwarmFault";
    constructor(kind: K, message: string, cause?: unknown);
    /** Type guard narrowing an unknown value to a fault of a specific `kind`. */
    static is<K extends SwarmFaultKind>(value: unknown, kind: K): value is SwarmFault<K>;
}
/**
 * Construct a {@link SwarmFault}. The ergonomic front door — prefer this over
 * `new SwarmFault(...)` at call sites so the kind/message/cause order stays
 * uniform across the kernel.
 */
export declare function swarmFault<K extends SwarmFaultKind>(kind: K, message: string, cause?: unknown): SwarmFault<K>;
