import { EventEmitter } from 'node:events';

interface ToolCallEvent {
    tool: string;
    input: any;
    timestamp: string;
    durationMs?: number;
    success?: boolean;
    error?: string;
}
interface ScanProgressEvent {
    current: number;
    total: number;
    file: string;
}
interface ScanCompleteEvent {
    filesCount: number;
    durationMs: number;
}
declare function getToolCallsLogPath(mapxDir: string): string;
declare class UiEventBus extends EventEmitter {
    private static instance;
    private mapxDir;
    static getInstance(): UiEventBus;
    /**
     * Set the .mapx directory so tool calls can be persisted to disk.
     * Must be called once after the project directory is known.
     */
    setMapxDir(dir: string): void;
    emitToolCall(event: ToolCallEvent): void;
    emitScanProgress(event: ScanProgressEvent): void;
    emitScanComplete(event: ScanCompleteEvent): void;
    private trimLogIfNeeded;
}

export { type ScanCompleteEvent, type ScanProgressEvent, type ToolCallEvent, UiEventBus, getToolCallsLogPath };
