import { type RunResult } from "@paretools/shared"; export declare function rgCmd(args: string[], cwd?: string): Promise; /** * Resolves a user-supplied `path` parameter into a `cwd` and a positional * `target` argument suitable for ripgrep/fd. * * Behavior: * - If `path` is undefined/empty → cwd = process.cwd(), target = "." * (search current dir, isFile = false). * - If `path` is an existing directory → cwd = path, target = "." * (search recursively, isFile = false). * - If `path` is an existing file → cwd = parent dir, target = basename * (search just that file, isFile = true). Spawning with cwd pointed at a * file is what produces the `spawn ENOTDIR` crash, so we split it. * - If `path` does not exist → cwd = process.cwd(), target = path * (isFile = false). Let ripgrep surface its own "no such file" error * rather than crashing the spawn. * * The `isFile` flag lets callers add ripgrep flags like `--with-filename` * when needed (rg's `--count` omits the filename when given a single file * positional, which breaks the count parser). */ export declare function resolveSearchTarget(path?: string): { cwd: string; target: string; isFile: boolean; }; export declare function fdCmd(args: string[], cwd?: string): Promise; export declare function yqCmd(args: string[], opts?: { cwd?: string; stdin?: string; }): Promise; export declare function jqCmd(args: string[], opts?: { cwd?: string; stdin?: string; }): Promise; //# sourceMappingURL=search-runner.d.ts.map