import type { CommandEnvelope, OmkEvent } from "./contracts/command-envelope.js";
export interface CommandBusResult {
    readonly handled: boolean;
    readonly events: readonly OmkEvent[];
    readonly output: string;
}
export type CommandHandler = (envelope: CommandEnvelope) => Promise<CommandBusResult>;
export interface CommandBus {
    dispatch(envelope: CommandEnvelope): Promise<CommandBusResult>;
    registerHandler(command: string, handler: CommandHandler): void;
    listCommands(): readonly string[];
}
export declare function createCommandBus(): CommandBus;
