declare function resolveUnderRepo(repoRoot: string, targetPath: string): string;
declare function ensureWithinRepo(repoRoot: string, absTarget: string): void;
declare function toRepoRelative(repoRoot: string, absPath: string): string;
declare function isSymlink(p: string): boolean;
/**
 * Detects and removes consecutive duplicate path segments.
 *
 * When the model predicts a path that includes the repo directory name,
 * joining with repoRoot creates duplication:
 *   repoRoot="/Users/dhruv/repo" + predicted="repo/src/file.ts"
 *   → "/Users/dhruv/repo/repo/src/file.ts"
 *
 * This function detects such patterns and returns the corrected path,
 * or null if no duplication is found.
 */
declare function fixPathRepetition(fullPath: string): string | null;
declare function isTextualFile(filePath: string, maxBytes?: number): boolean;

export { ensureWithinRepo, fixPathRepetition, isSymlink, isTextualFile, resolveUnderRepo, toRepoRelative };
