import { type CommandContext, type CommandDefinition, type CommandHandler, type CommandInvocation } from "./command.js"; export interface CommandHelpEntry { readonly command: string; readonly usage?: string | undefined; readonly description: string; readonly aliases: readonly string[]; } export declare class CommandRegistry { private readonly byName; private readonly aliasToName; private readonly handlers; register(definition: CommandDefinition): void; resolve(nameOrAlias: string): string | undefined; has(nameOrAlias: string): boolean; get(nameOrAlias: string): CommandDefinition | undefined; all(): CommandDefinition[]; setHandler(nameOrAlias: string, handler: CommandHandler): void; /** Prefix match over canonical names and aliases (for completion menus). */ suggestions(prefix: string): CommandDefinition[]; help(): CommandHelpEntry[]; /** Parse a raw `/name args` line into a resolved invocation, or undefined. */ parse(line: string, context?: CommandContext): CommandInvocation | undefined; looksLikeCommand(line: string): boolean; /** Resolve + run the registered handler. Returns false if unknown/unhandled. */ dispatch(invocation: { name: string; args?: string | undefined; context?: CommandContext | undefined; }): Promise; } export declare function buildDefaultCommandRegistry(): CommandRegistry;