/** chars/4 token estimate. Matches @codragraph/compress's `estimateTokens`. */ export declare function estimateTokens(text: string): number; /** * Walk a result object and collect every file path we can find. Looks for * `filePath`, `file_path`, and `file` keys at any depth. Used to estimate * the raw-grep baseline (sum of source bytes the agent would have read * without CodraGraph). */ export declare function collectFilePaths(obj: unknown, paths?: Set): Set; /** * Estimate raw-grep-equivalent token count by summing on-disk byte sizes of * the referenced files. Returns null if any file is missing or unreadable — * in that case we silently skip the comparison rather than show a misleading * number. */ export declare function estimateRawGrepTokens(filePaths: Iterable): number | null; /** * Format a one-line token-savings summary suitable for stderr display. * If a raw baseline is provided AND it's larger than the structured response, * the line includes the savings percentage. Otherwise it only reports * the structured token count. */ export declare function formatTokenLine(structuredTokens: number, rawTokens?: number | null): string; /** * Compute and print the token-savings line for a tool result. Best-effort: * never throws, never blocks output. Goes to stderr so JSON consumers piping * stdout to jq stay clean. */ export declare function emitTokenStats(result: unknown): void;