import { type FileTokenCountCache } from './token-count-cache.js';
import type { CodebaseIndex, DirectoryTreeOptions, DirectoryTreeResult } from './types.js';
export interface BuildDirectoryTreeOptions extends DirectoryTreeOptions {
    countTokens?: (text: string) => number;
    tokenizer?: string;
    tokenCountCache?: FileTokenCountCache;
}
export interface DirectoryTokenRollupProjection {
    path: string;
    depth: number;
    files: number;
    tokens: number;
}
export interface ProjectDirectoryTokenRollupsOptions {
    countTokens?: (text: string) => number;
    tokenizer?: string;
    tokenCountCache?: FileTokenCountCache;
}
/**
 * Project held source spend per directory with the same post-order rollup used
 * by `dirtree --tokens`. Excerpts are accepted when a map index deliberately
 * did not retain full bodies; this is projection-only and never reads or parses
 * another file.
 */
export declare function projectDirectoryTokenRollups(index: CodebaseIndex, options?: ProjectDirectoryTokenRollupsOptions): DirectoryTokenRollupProjection[];
export declare function directoryTreeHeader(result: Pick<DirectoryTreeResult, 'root' | 'mode' | 'totalFiles' | 'totalTokens' | 'mapTokens' | 'wouldFitBudget'>): string;
export declare function directoryTreeFooter(result: Pick<DirectoryTreeResult, 'truncated' | 'truncatedPaths'>): string | null;
export declare function buildDirectoryTree(index: CodebaseIndex, options?: BuildDirectoryTreeOptions): DirectoryTreeResult;
