type EventMap = {
    'session:stdout': {
        sessionId: string;
        data: string;
    };
    'session:patch': {
        sessionId: string;
        patch: unknown[];
        seq: number;
    };
    'session:exit': {
        sessionId: string;
        exitCode?: number;
    };
    'session:completed': {
        sessionId: string;
        status: string;
    };
    'session:started': {
        sessionId: string;
    };
    'session:stopped': {
        sessionId: string;
    };
    'session:sessionId': {
        sessionId: string;
        agentSessionId: string;
    };
    'task:updated': {
        taskId: string;
        projectId: string;
        status: string;
    };
    'task:deleted': {
        taskId: string;
        projectId: string;
    };
    'terminal:stdout': {
        terminalId: string;
        data: string;
    };
    'terminal:exit': {
        terminalId: string;
        exitCode?: number;
    };
    'workspace:setup_progress': {
        workspaceId: string;
        taskId: string;
        status: 'running' | 'completed' | 'failed';
        currentCommand?: string;
        currentIndex?: number;
        totalCommands: number;
        error?: string;
    };
    'workspace:commit_message_updated': {
        workspaceId: string;
        taskId: string;
        commitMessage: string | null;
    };
    'workspace:hibernated': {
        workspaceId: string;
        taskId: string;
        projectId: string;
    };
};
type EventName = keyof EventMap;
type Handler<K extends EventName> = (payload: EventMap[K]) => void;
/**
 * A small, type-safe in-process event bus.
 */
export declare class EventBus {
    private listeners;
    on<K extends EventName>(event: K, handler: Handler<K>): void;
    off<K extends EventName>(event: K, handler: Handler<K>): void;
    emit<K extends EventName>(event: K, payload: EventMap[K]): void;
}
export type { EventMap, EventName };
//# sourceMappingURL=event-bus.d.ts.map