/**
 * TelemetryBus — fanout to multiple {@link TelemetrySink}s, non-blocking.
 *
 * Invariants :
 *   1. Sink failures are ISOLATED — one sink throwing never affects the others
 *      nor the host agent loop. Failures are logged via the bus logger.
 *   2. The bus itself implements {@link TelemetrySink}, so it can be passed
 *      transparently to consumers expecting a single sink (composition).
 *   3. When `nonBlocking: true` (default), `start`/`step`/`finish` return
 *      immediately and dispatch in background. Errors surface via the logger.
 *   4. Backpressure : if internal queue > `maxQueueDepth`, oldest events are
 *      dropped and counted.
 *
 * Ref: command-center:sprint-693:telemetry-bus
 */
import { type TelemetrySink } from "./port.js";
export interface TelemetryLogger {
    warn(obj: Record<string, unknown>, msg?: string): void;
    error(obj: Record<string, unknown>, msg?: string): void;
}
export interface TelemetryBusOptions {
    sinks: readonly TelemetrySink[];
    /** Pino-compatible logger. Defaults to no-op. */
    logger?: TelemetryLogger;
    /**
     * When true (default), `start/step/finish` resolve immediately and dispatch
     * in background. Set false in tests for deterministic assertions.
     */
    nonBlocking?: boolean;
    /**
     * Max number of in-flight events per sink before dropping oldest.
     * Defaults to 1000.
     */
    maxQueueDepth?: number;
}
export interface TelemetryCounters {
    /** Events dropped due to queue overflow. */
    readonly dropped: number;
    /** Sink errors caught and isolated. */
    readonly sinkErrors: number;
    /** Events successfully dispatched. */
    readonly dispatched: number;
}
/**
 * Build a TelemetryBus that fans events to all sinks non-blockingly.
 *
 * If `sinks` is empty, returns {@link NOOP_TELEMETRY_SINK} so callers never
 * need to null-check.
 */
export declare function createTelemetryBus(opts: TelemetryBusOptions): TelemetrySink & {
    counters: TelemetryCounters;
    flush(): Promise<void>;
};
//# sourceMappingURL=bus.d.ts.map