import type { CounterSignal, HealthReporterConfig, HistogramSignal, ReporterRuntimeBinding } from './types';
export declare class HealthReporter {
    private readonly config;
    private readonly resource;
    private readonly flushIntervalMs;
    private readonly counters;
    private readonly histograms;
    private windowStartMs;
    private timer;
    private pagehideHandler;
    private runtime;
    /** Cleanup function for adapters that registered side effects (e.g. the
     *  web-vitals long-task observer). Called from `stop()` so SPA re-init
     *  via `initHealthReporter` doesn't accumulate observers. */
    private adapterCleanup;
    constructor(config: HealthReporterConfig);
    /**
     * Bind runtime-derived attribute resolvers. Called after the canvas/telemetry
     * are fully initialized. Must never throw — resolvers are wrapped in
     * null-safe access at flush time.
     */
    bindRuntime(binding: ReporterRuntimeBinding): void;
    /**
     * Register a cleanup function to run on `stop()`. Used by adapters
     * (e.g. webVitalsAdapter) that need to release per-bind resources
     * like PerformanceObservers. Replaces any prior cleanup — only one
     * adapter cleanup is tracked.
     */
    attachAdapterCleanup(cleanup: () => void): void;
    increment(signal: CounterSignal, by?: number): void;
    /**
     * @internal — exposed for test inspection only. Mid-window state is intentionally
     * unstable; consumers should subscribe to flush payloads instead.
     */
    snapshotCounters(): Partial<Record<CounterSignal, number>>;
    recordHistogram(signal: HistogramSignal, valueMs: number): void;
    /**
     * @internal — exposed for test inspection only. Mid-window state is intentionally
     * unstable; consumers should subscribe to flush payloads instead.
     */
    snapshotHistograms(): Partial<Record<HistogramSignal, {
        count: number;
        p50: number;
        p95: number;
    }>>;
    flush(): Promise<void>;
    start(): void;
    stop(): void;
}
export declare function initHealthReporter(config: HealthReporterConfig): HealthReporter;
export declare function getHealthReporter(): HealthReporter | null;
