import type { ParsedCommand } from './shell-parser'; export interface DetectedCommand { /** The build tool detected (e.g., 'tsc', 'webpack', 'npm') */ tool: string; /** The configuration file path, if detected */ configFile: string | null; /** Whether the config file is JavaScript (dynamic config) */ isDynamicConfig: boolean; /** The inferred output directory, if detectable */ outputDir: string | null; /** Warnings to display to the user */ warnings: string[]; /** * Sub-commands detected when a command expands to multiple commands (e.g., npm script * with &&) */ subCommands?: DetectedCommand[]; } /** * Find the common ancestor directory of multiple paths, bounded by the project root. * * @param paths - Array of absolute paths * @param projectRoot - The project root directory (boundary) * @returns The common ancestor path, or null if paths are empty or no common ancestor * within project root */ export declare function findCommonAncestor(paths: string[], projectRoot: string): string | null; /** * Detect multiple commands from a command line that may contain shell operators (;, &&). * Returns output directories from all detected commands. */ export declare function detectMultipleCommands(commandLine: string, cwd: string): Promise<{ commands: DetectedCommand[]; outputDirs: string[]; commonOutputDir: string | null; }>; /** Detect the build tool and its configuration from a parsed command */ export declare function detectCommand(parsed: ParsedCommand, cwd: string, depth?: number): Promise;