export type EventHandler = (payload: any) => void | Promise; /** * Lightweight publish/subscribe event bus for inter-service communication. * Replaces direct ad-hoc calls between services (e.g. notification hook * bolted onto every hook handler). * * Handlers are fire-and-forget — errors are caught and logged, never propagated. */ export declare class EventBus { private handlers; /** Subscribe to an event. Returns an unsubscribe function. */ on(event: string, handler: EventHandler): () => void; /** Unsubscribe a handler from an event. */ off(event: string, handler: EventHandler): void; /** Emit an event to all subscribers. Handlers run sequentially. Errors are caught. */ emit(event: string, payload?: any): Promise; /** Remove all handlers for a specific event (or all events if no arg). */ clear(event?: string): void; } //# sourceMappingURL=event-bus.d.ts.map