/**
 * Path Validation and Sanitization
 *
 * File path validation, sanitization, and security checks.
 * Prevents directory traversal attacks and access to sensitive paths.
 */
import type { ValidationResult, ValidationOptions } from './types.js';
/**
 * Validate file path (basic check, not security)
 */
export declare function validateFilePath(value: unknown, options?: ValidationOptions & {
    mustBeAbsolute?: boolean;
}): ValidationResult<string>;
/**
 * Dangerous path patterns that should be blocked
 */
declare const DANGEROUS_PATH_PATTERNS: RegExp[];
/**
 * Sanitize and validate a file path for write operations
 *
 * @param inputPath - The path to sanitize
 * @param basePath - Optional base path to resolve relative paths against
 * @returns Sanitized absolute path
 * @throws Error if path is dangerous or invalid
 */
export declare function sanitizeFilePath(inputPath: string, basePath?: string): string;
/**
 * Check if a path is safe for write operations (doesn't throw, returns boolean)
 */
export declare function isPathSafeForWrite(inputPath: string, basePath?: string): boolean;
/**
 * Options for path validation in unified validators
 */
export interface PathValidationOptions {
    /** Allow absolute paths (default: true) */
    allowAbsolute?: boolean;
    /** Allow relative paths (default: true) */
    allowRelative?: boolean;
    /** Base directory to resolve relative paths against */
    basePath?: string;
    /** Check for dangerous patterns like sensitive files (default: true) */
    checkDangerous?: boolean;
    /** Field name for error messages */
    fieldName?: string;
}
/**
 * Unified validation result type
 */
export interface UnifiedValidationResult<T = unknown> {
    valid: boolean;
    value?: T;
    error?: string;
}
/**
 * Validate a file path for security and correctness.
 *
 * Checks for:
 * - Path traversal attacks (../)
 * - Null byte injection
 * - Dangerous paths (sensitive system files)
 * - Absolute/relative path restrictions
 *
 * @param input - The path to validate
 * @param options - Validation options
 * @returns ValidationResult with sanitized path or error
 */
export declare function validatePath(input: string, options?: PathValidationOptions): UnifiedValidationResult<string>;
export { DANGEROUS_PATH_PATTERNS };
