export interface PathGuardValidateOptions { /** * Reject inputs that are absolute paths. Defaults to `false` for backward * compatibility — absolute paths are permitted so long as they resolve * within the project root. */ rejectAbsolute?: boolean; /** * If the resolved target exists, also resolve symlinks via `realpath()` * and re-check that the real path stays inside the project root. This * blocks symlink-escape attacks on systems where the resolved path would * point outside the project root. */ resolveSymlinks?: boolean; } export declare class PathGuard { private readonly projectRoot; private readonly realProjectRoot; constructor(projectRoot: string); /** * Validates that a path resolves within the project root. * Throws if path traversal is detected, if the path contains a NUL byte * or other control character, or if the path is unreasonably long. * Returns the resolved absolute path if safe. */ validate(inputPath: string, options?: PathGuardValidateOptions): string; private assertInsideRoot; /** * Returns relative path from project root. * Used for storing paths in SQLite — never store absolute paths. */ toRelative(absolutePath: string): string; /** * Validates a list of paths. Returns only the safe ones. * Silently drops unsafe paths — used for batch git diff processing. */ validateBatch(paths: string[]): string[]; } //# sourceMappingURL=path-guard.d.ts.map