/**
 * The latest-snapshot accumulator.
 *
 * Every {@link RunEvent} that carries a {@link RunSnapshot} — `snapshot`,
 * `settled`, and `faulted` — moves the run forward. A {@link SnapshotAccumulator}
 * watches the event stream and remembers only the most recent snapshot, so a
 * host that just needs "where is the run right now" can read {@link
 * SnapshotAccumulator.getSnapshot} instead of folding the whole stream itself.
 *
 * Delta events (`text_delta`, `thinking_delta`) and the tool lifecycle events
 * carry no snapshot and are ignored here; they are rendered directly from the
 * bus when a host wants incremental output.
 */
import type { RunEvent, RunSnapshot } from "../contract";
import type { RunLedger } from "./bus";
/**
 * Tracks the most recent {@link RunSnapshot} seen on a stream of events.
 *
 * Stateless beyond the single latest snapshot. Construct one, feed it events
 * (or {@link SnapshotAccumulator.attach} it to a {@link RunLedger}), and query
 * {@link SnapshotAccumulator.getSnapshot} for the current state.
 */
export declare class SnapshotAccumulator {
    /** The most recent snapshot observed, or `undefined` before the first one. */
    private latest;
    /**
     * Fold one event in. Snapshot-bearing events replace the tracked snapshot;
     * all other events are ignored.
     */
    observe(event: RunEvent): void;
    /** The most recent snapshot, or `undefined` if none has been observed yet. */
    getSnapshot(): RunSnapshot | undefined;
    /** True once at least one snapshot-bearing event has been observed. */
    get hasSnapshot(): boolean;
    /** Forget the tracked snapshot, returning to the pre-observation state. */
    reset(): void;
    /**
     * Subscribe this accumulator to a {@link RunLedger} so it folds every
     * published event automatically.
     *
     * @returns the ledger's disposer; call it to stop tracking.
     */
    attach(ledger: RunLedger): () => void;
}
