import type { Channel, ChannelStats } from "@sp8d/core";
export interface SlotState {
    index: number;
    status: number;
    ageMs: number;
}
export interface ChannelDiagnostics {
    readonly stats: ChannelStats & {
        throughput: number;
        consumerLag: number;
        avgSlotAge: number;
        maxSlotAge: number;
    };
    getSlotState(): SlotState[];
    getHistory(): ChannelStats[];
    start(): void;
    stop(): void;
    onUpdate(cb: (stats: ChannelDiagnostics["stats"]) => void): void;
}
export interface ChannelDiagnosticsOptions {
    intervalMs?: number;
    slotSample?: number | "all";
    onUpdate?: (stats: ChannelDiagnostics["stats"]) => void;
}
/**
 * Create diagnostics for a channel, with flexible options and developer-friendly API.
 * @param channel The channel to monitor
 * @param options Diagnostics options (intervalMs, slotSample, onUpdate)
 */
export declare function createChannelDiagnostics(channel: Channel, options?: ChannelDiagnosticsOptions): ChannelDiagnostics;
/**
 * Start diagnostics in a worker thread for zero main-thread impact.
 * @param channel The channel to monitor
 * @param options Diagnostics options (intervalMs, slotSample, onUpdate)
 * @returns The Worker instance
 */
export declare function startDiagnosticsWorker(channel: Channel, options?: ChannelDiagnosticsOptions): Worker;
//# sourceMappingURL=sp8d-diagnostics.d.ts.map