/**
 * Overflow bookkeeping of the monitor notifier: events that did not fit a monitor's batch. Line
 * bodies are written to the monitor's overflow file in chunks (when a spill sink exists), and the
 * wake that carries the monitor names the file; without a file the wake says how many were omitted.
 */
import type { MonitorEvent } from "./monitor-registry.ts";
export interface MonitorSpillResult {
    readonly path: string;
    /** The file rotated to `<path>.1` while this chunk was written. */
    readonly rotated: boolean;
}
export type MonitorSpill = (id: string, lines: readonly string[]) => MonitorSpillResult | undefined;
export interface MonitorOverflow {
    readonly id: string;
    readonly description: string;
    count: number;
    kinds: Set<MonitorEvent["type"]>;
    humanInput: boolean;
    pending: string[];
    spilled: number;
    path: string | undefined;
    rotated: boolean;
}
export declare class OverflowBook {
    #private;
    constructor(spill: MonitorSpill | undefined);
    get(id: string): MonitorOverflow | undefined;
    count(id: string): number;
    ids(): string[];
    record(event: MonitorEvent, body: string): void;
    flush(id: string): void;
    /** The notice a wake carries for this monitor's overflow; "" when nothing overflowed. */
    notice(id: string): string;
    delete(id: string): void;
    clear(): void;
}
//# sourceMappingURL=monitor-overflow.d.ts.map