export interface Sample { t: number; values: Record; } export interface SignalStats { min: number; max: number; avg: number; last: number; slope: number; first_t: number; last_t: number; n: number; } export interface Point { t: number; v: number; } export declare class TraceBuffer { private signals; private capacity; private buf; constructor(signals: string[], capacity: number); push(s: Sample): void; count(): number; signalNames(): string[]; /** Add a signal to the watched set (no-op if already present). Does not touch * stored samples — history of a previously-removed signal survives in the ring. */ addSignal(name: string): void; /** Drop a signal from the watched set (no-op if absent). Stored samples are * left intact so already-captured history remains queryable until it ages out. */ removeSignal(name: string): void; stats(sig: string): SignalStats | null; downsample(sig: string, maxPoints: number, window?: { fromT?: number; toT?: number; }): Point[]; /** Read-only view of stored samples (oldest→newest). */ samples(): readonly Sample[]; }