import { type PathValidationResult } from "../../workspace/workspace-isolation.js";
export interface IFileStat {
    isDirectory(): boolean;
    isFile(): boolean;
    size: number;
    mtime: Date;
}
export interface VfsEntry {
    name: string;
    isDirectory: boolean;
    isFile: boolean;
}
export interface IVfsProvider {
    readFile(path: string, encoding?: string): Promise<string>;
    readFileBuffer(path: string): Promise<Buffer>;
    writeFile(path: string, content: string, encoding?: string): Promise<void>;
    writeFileBuffer(path: string, content: Buffer): Promise<void>;
    exists(path: string): Promise<boolean>;
    stat(path: string): Promise<IFileStat>;
    readdir(path: string): Promise<string[]>;
    readDirectory(path: string): Promise<VfsEntry[]>;
    ensureDir(path: string): Promise<void>;
    remove(path: string): Promise<void>;
    rename(oldPath: string, newPath: string): Promise<void>;
    resolvePath(filePath: string, baseDir: string): {
        valid: boolean;
        resolved: string;
        error?: string;
    };
}
/**
 * Unified Virtual File System Router
 * Centralizes all file operations to prevent "Split Brain" scenarios and enable
 * virtual file systems (e.g. for testing, archives, or remote sync).
 */
export declare class UnifiedVfsRouter implements IVfsProvider {
    private static instance;
    private providers;
    private constructor();
    static get Instance(): UnifiedVfsRouter;
    /**
     * Default implementation using physical file system (fs-extra)
     * File operations are wrapped with latency measurement for performance tracking.
     */
    readFile(filePath: string, encoding?: string): Promise<string>;
    readFileBuffer(filePath: string): Promise<Buffer>;
    writeFile(filePath: string, content: string, encoding?: string): Promise<void>;
    writeFileBuffer(filePath: string, content: Buffer): Promise<void>;
    exists(filePath: string): Promise<boolean>;
    stat(filePath: string): Promise<IFileStat>;
    readdir(dirPath: string): Promise<string[]>;
    readDirectory(dirPath: string): Promise<VfsEntry[]>;
    ensureDir(dirPath: string): Promise<void>;
    remove(filePath: string): Promise<void>;
    rename(oldPath: string, newPath: string): Promise<void>;
    /**
     * Validates path traversal prevention using workspace isolation.
     * Delegates to WorkspaceIsolation for comprehensive security checks:
     * - Workspace boundary validation
     * - Path traversal prevention
     * - Symlink escape detection
     * - Blocked path enforcement
     * - System whitelist support
     */
    resolvePath(filePath: string, baseDir: string): {
        valid: boolean;
        resolved: string;
        error?: string;
    };
    /**
     * Basic path resolution without workspace isolation.
     * Used as fallback when isolation is disabled.
     */
    private basicResolvePath;
    /**
     * Validate a path using workspace isolation
     * Returns the full PathValidationResult for detailed error handling
     */
    validateWithIsolation(filePath: string, operation?: string): PathValidationResult;
}
