import { type AutonomyEventType, type EventPayload, type EventInput, type EnrichedEvent } from './schemas.js';
export type EventListener<T extends AutonomyEventType> = (event: EnrichedEvent<EventPayload<T>>) => void | Promise<void>;
export declare class EventBus {
    private readonly listeners;
    private totalListenerCount;
    private readonly dedupCache;
    private readonly dedupOrder;
    private lastSyncErrors;
    on<T extends AutonomyEventType>(eventType: T, listener: EventListener<T>): void;
    off<T extends AutonomyEventType>(eventType: T, listener: EventListener<T>): void;
    emit<T extends AutonomyEventType>(eventType: T, payload: EventInput<T>): EnrichedEvent<EventPayload<T>>;
    emitIdempotent<T extends AutonomyEventType>(eventId: string, eventType: T, payload: EventInput<T>): EnrichedEvent<EventPayload<T>> | null;
    getListenerCount(eventType?: AutonomyEventType): number;
    getLastSyncErrors(): ReadonlyArray<Error>;
    removeAllListeners(eventType?: AutonomyEventType): void;
    private dispatch;
    private handleListenerError;
    private trackDedup;
}
//# sourceMappingURL=EventBus.d.ts.map