/**
 * Codebase scout: deterministic helpers for the deep-research-codebase workflow.
 *
 * Responsibilities:
 *   1. Discover the codebase root (git toplevel, falling back to cwd).
 *   2. List all source files, honoring `.gitignore` via git ls-files in repos
 *      and via `rg --files` in non-repo directories that still have one.
 *   3. Count lines of code per file using batched `wc -l`.
 *   4. Render a compact directory tree (depth-bounded) for prompt context.
 *   5. Build "partition units" by aggregating LOC at depth-1, then drilling
 *      down on any unit that is too large to live in a single explorer.
 *   6. Bin-pack partition units into N balanced groups (largest-first).
 *
 * Everything here is pure TypeScript + child_process — no LLM calls.
 */
/** Per-file LOC + path. */
export type FileStats = {
    path: string;
    loc: number;
};
/**
 * A "partition unit" is the atomic chunk of work that gets bin-packed into
 * an explorer. It is always one directory (possibly drilled down to depth 2)
 * with all of the code files that live anywhere underneath it.
 */
export type PartitionUnit = {
    /** Repo-relative path, e.g. "src/cli" or "packages/foo/src". */
    path: string;
    loc: number;
    fileCount: number;
    /** Repo-relative file paths inside this unit (full recursive listing). */
    files: string[];
};
export type CodebaseScout = {
    /** Absolute path to the repository root. */
    root: string;
    totalLoc: number;
    totalFiles: number;
    /** Compact rendered directory tree (depth-bounded) for prompt context. */
    tree: string;
    /** Partition units, sorted by LOC descending. */
    units: PartitionUnit[];
};
/** Resolve the project root. Prefers `git rev-parse --show-toplevel`. */
export declare function getCodebaseRoot(): string;
/**
 * Run the full scout: list files, count LOC, render tree, build partition units.
 */
export declare function scoutCodebase(root: string): CodebaseScout;
/**
 * Bin-pack partition units into `count` balanced groups. Greedy
 * largest-first: assign each unit to the currently-lightest bin.
 *
 * If there are fewer units than requested bins, the result has exactly
 * `units.length` non-empty bins (we never return empty bins).
 */
export declare function partitionUnits(units: PartitionUnit[], count: number): PartitionUnit[][];
//# sourceMappingURL=scout.d.ts.map