import { EventEmitter } from 'events';
import { InboundMessage, OutboundMessage } from '../../channels/transport-types.js';
interface MessageBusEvents {
    inbound: (msg: InboundMessage) => void;
    outbound: (msg: OutboundMessage) => void;
}
/**
 * Error thrown when MessageBus is shut down
 */
declare class MessageBusShutdownError extends Error {
    constructor();
}
declare class MessageBus extends EventEmitter {
    private inboundQueue;
    private outboundQueue;
    private inboundConsumers;
    private outboundConsumers;
    private isShutdown;
    publishInbound(msg: InboundMessage): Promise<void>;
    publishOutbound(msg: OutboundMessage): Promise<void>;
    consumeInbound(): Promise<InboundMessage>;
    consumeOutbound(): Promise<OutboundMessage>;
    /**
     * Shutdown the message bus and cancel all pending consumers
     */
    shutdown(): void;
    /**
     * Check if the bus has been shut down
     */
    getShutdownState(): boolean;
    /**
     * Reset the bus state (for testing only)
     */
    reset(): void;
    clear(): void;
}
export declare const bus: MessageBus;
export { MessageBus, MessageBusShutdownError };
export type { MessageBusEvents };
