/** * Roster → commander resolution (interactive-cli-menu/AC-16, * interactive-cli-menu/AC-17, interactive-cli-menu/AC-34). * * Pure functions over a commander program. Required positionals are derived * structurally from `registeredArguments` rather than restated in the roster, so * the prompt set cannot go stale when a command's signature changes. * * @module */ import type { Argument, Command } from 'commander'; import { type MenuEntry } from './roster.js'; /** * Walk an entry's path from the program root to its leaf command. * * @returns the leaf `Command`, or `null` if any segment is unregistered. */ export declare function resolveEntry(program: Command, entry: MenuEntry): Command | null; /** * Required positional arguments of a command, in declaration order * (interactive-cli-menu/AC-34). * * `registeredArguments` is public commander API. Across the roster only * `review ` and `knowledge query ` have any. */ export declare function requiredArgs(cmd: Command): readonly Argument[]; /** * Secondary hint text for an entry: the leaf command's own description * (interactive-cli-menu/AC-16). Never used as the label. */ export declare function hintFor(cmd: Command): string; /** * Top-level command names on the program. * * Deliberately performs no hidden-command *detection*: `program.commands` * already contains hidden commands (verified with the deprecated `setup` * alias), `Command` exposes no public `hidden` accessor — the `hidden: boolean` * in commander's typings belongs to `Option` — and the private `_hidden` must * not be relied on. Commander's synthetic `help` command is absent from * `program.commands` and needs no entry. */ export declare function allTopLevelNames(program: Command): string[]; /** * Top-level names the roster accounts for — first path segments only. * * A nested entry such as `['knowledge','query']` accounts for nothing beyond * `knowledge`'s appearance as a *rostered* name, which is why `knowledge` is * also carried in `EXCLUSIONS`: the parent itself is not on the menu. */ export declare function rosterTopLevelNames(roster?: readonly MenuEntry[]): string[]; /** * Top-level commands accounted for by neither the roster nor the exclusion list * (interactive-cli-menu/AC-17). A non-empty result is a contract violation: a * command was registered and nobody decided whether it belongs on the menu. */ export declare function unaccountedCommands(program: Command, roster?: readonly MenuEntry[], exclusions?: Readonly>): string[]; //# sourceMappingURL=resolve.d.ts.map