import type { CLIConfig, CommandDef, ResolvedCommand } from "./types"; /** Node in the command graph representing a registered command. */ export interface CommandGraphNode { name: string; def: CommandDef; children: Record; depth: number; } /** In-memory command graph built from a `CLIConfig`. */ export interface CommandGraph { rootCommands: Record; } /** * Build a command graph from a `CLIConfig`. * * The graph mirrors the nested `commands` structure and attaches a depth * field to each node to help with rendering and diagnostics. */ export declare function buildGraph(cfg: CLIConfig): CommandGraph; /** * Resolve a sequence of path parts into a ResolvedCommand. Throws * `CommandNotFoundError` when the path cannot be fully resolved. */ export declare function resolveCommand(graph: CommandGraph, pathParts: string[]): ResolvedCommand;