/**
 * Core Event Bus
 *
 * UI-agnostic pub/sub system for operations feed.
 * All visible output goes through the EventBus.
 *
 * Rules:
 * - In-memory only (no persistence)
 * - No UI imports inside bus. Bus is pure logic.
 * - Must support multiple subscribers.
 * - Must return an unsubscribe() function.
 */
import type { OpEvent } from './opEvent.js';
export type EventListener = (e: OpEvent) => void;
declare class EventBus {
    private subscribers;
    private eventCounter;
    /**
     * Emit an event
     * Generates id and ts if missing, then calls all subscribers synchronously
     */
    emit(e: Omit<OpEvent, "id" | "ts"> & Partial<Pick<OpEvent, "id" | "ts">>): void;
    /**
     * Subscribe to events
     * Returns unsubscribe function
     */
    subscribe(fn: EventListener): () => void;
    /**
     * Helper: emit with tag and message (for compatibility)
     */
    emitTag(tag: OpEvent['tag'], msg: string, level?: OpEvent['level']): void;
    /**
     * Get subscriber count (for debugging)
     */
    getSubscriberCount(): number;
    /**
     * Clear all handlers (for testing)
     */
    clear(): void;
}
/**
 * Global event bus instance
 */
export declare const eventBus: EventBus;
/**
 * Backward compatibility: FeedEvent type alias
 * @deprecated Use OpEvent instead
 */
export type FeedEvent = OpEvent;
export {};
//# sourceMappingURL=eventBus.d.ts.map