import { EventEmitter } from 'node:events';
import type { EventBusEvent } from '../../types/file-hooks.js';
/**
 * Typed event bus extending EventEmitter.
 * Provides typed events with discriminated unions, filtering,
 * event history (FIFO, last 100), and meta-events.
 */
export declare class EventBus extends EventEmitter {
    private readonly history;
    private idCounter;
    constructor();
    /**
     * Emit a typed event. Automatically adds to history and fires meta-events.
     */
    emitEvent(type: EventBusEvent['type'], data: Record<string, unknown>): EventBusEvent;
    /**
     * Subscribe to events of a specific type.
     */
    onEvent(type: EventBusEvent['type'] | '*', listener: (event: EventBusEvent) => void): this;
    /**
     * Subscribe to events once.
     */
    onceEvent(type: EventBusEvent['type'] | '*', listener: (event: EventBusEvent) => void): this;
    /**
     * Escape special regex metacharacters so user-supplied file patterns are
     * treated as literal glob-style strings (* and ? retain special meaning).
     */
    private static escapeRegex;
    /**
     * Get filtered event history.
     */
    getHistory(filter?: {
        type?: EventBusEvent['type'];
        filePattern?: string;
    }): EventBusEvent[];
    /**
     * Get all events in history (readonly).
     */
    getFullHistory(): readonly EventBusEvent[];
    /**
     * Clear history.
     */
    clearHistory(): void;
}
//# sourceMappingURL=event-bus.d.ts.map