import { CommandMeta, GeneratorLogger } from "./types.mjs"; //#region src/codegen/discovery.d.ts type DiscoverySource = 'help' | 'completion' | 'bash' | 'fish' | 'zsh'; interface DiscoveryOptions { /** The command to discover (e.g. 'gh', 'docker', 'kubectl'). */ command: string; /** * Which parsing sources to use. Default: ['help']. * Use `'completion'` to auto-detect the best shell completion source * by probing ` completion ` (bash → fish → zsh). */ sources?: DiscoverySource[]; /** Max subcommand depth. 0 = root only, undefined = unlimited. */ depth?: number; /** Delay in ms between help invocations. Default: 50 */ delay?: number; /** Logger for progress reporting. */ log?: GeneratorLogger; /** Timeout per help invocation in ms. Default: 10000 */ timeout?: number; } interface DiscoveryResult { /** The discovered command tree. */ command: CommandMeta; /** Number of help invocations made. */ invocations: number; /** Errors encountered (non-fatal). */ warnings: string[]; } /** * Discover CLI structure by running --help recursively and optionally * parsing shell completion scripts. */ declare function discoverCli(options: DiscoveryOptions): Promise; /** * Detect the best shell for completion parsing by probing the command. * Tries ` completion ` for bash, fish, zsh (in that order). * Returns the shell name if successful, or null if no completion command exists. */ declare function detectCompletionShell(command: string, timeout?: number): Promise<'bash' | 'fish' | 'zsh' | null>; //#endregion export { DiscoveryOptions, DiscoveryResult, DiscoverySource, detectCompletionShell, discoverCli }; //# sourceMappingURL=discovery.d.mts.map