/**
 * Lazy command loaders.
 *
 * Modules here trigger their `register({...})` side effect on import; the
 * caller then mounts the requested command via `registry.installOne` (or via
 * the explicit registrar functions for non-registry commands).
 *
 * Keeping this map static-but-thunked means `bin.ts` short-circuits and
 * `runCli` can resolve a single subcommand without paying for unrelated
 * command modules.
 */
import type { Command } from 'commander';
import { type CLIContext } from './registry.js';
export type CommandLoader = () => Promise<unknown>;
export declare const REGISTRY_COMMAND_MODULES: Record<string, CommandLoader>;
export interface NonRegistryMatcher {
    matches: (name: string) => boolean;
    load: (program: Command) => Promise<void>;
}
export declare const NON_REGISTRY_COMMAND_MATCHERS: NonRegistryMatcher[];
/**
 * Resolve which command module to load based on argv. Skips global flags
 * (`--verbose`/`--config <path>`/`--workspace <path>`) and treats
 * `help <cmd>` as if the user had typed `<cmd>`, so that `xopc help gateway`
 * loads only the gateway module.
 */
export declare function resolveCommandName(argv: string[]): string | undefined;
export declare function tryLoadCommand(program: Command, ctx: CLIContext, name: string, getCtx?: () => CLIContext): Promise<boolean>;
export declare function loadAllCommands(program: Command, ctx: CLIContext, getCtx?: () => CLIContext): Promise<void>;
