import type { ModuleCommandResult, ModuleLifecycleContext } from "../contracts/module-contract.js";
import { ModuleRegistry } from "./module-registry.js";
export type ModuleCommandDescriptor = {
    name: string;
    moduleId: string;
    instructionFile: string;
    description?: string;
};
export type ModuleCommandRouterOptions = {
    aliases?: Record<string, string>;
};
export declare class ModuleCommandRouterError extends Error {
    readonly code: string;
    constructor(code: string, message: string);
}
/** Cap unknown-command error text when the router lists hundreds of module commands. */
export declare const UNKNOWN_COMMAND_SAMPLE_LIMIT = 15;
export declare function formatUnknownCommandMessage(attempted: string, allNames: string[]): string;
export declare class ModuleCommandRouter {
    private readonly commands;
    private readonly aliases;
    private readonly registry;
    constructor(registry: ModuleRegistry, options?: ModuleCommandRouterOptions);
    listCommands(): ModuleCommandDescriptor[];
    describeCommand(name: string): ModuleCommandDescriptor | undefined;
    execute(name: string, args: Record<string, unknown> | undefined, ctx: ModuleLifecycleContext): Promise<ModuleCommandResult>;
    private indexEnabledModuleCommands;
    private validateAliases;
    private resolveCommandName;
}
