/**
 * CowFs - Copy-on-Write filesystem wrapper for multi-agent coordination.
 *
 * Wraps any IFileSystem and intercepts writes into a local memory layer.
 * Reads first check the local layer, then fall through to the parent.
 * This enables isolated agent workspaces that can be diffed and merged.
 *
 * Key properties:
 * - Reads delegate to parent if the path has not been locally written
 * - Writes go exclusively to the local layer (never touch parent)
 * - Deletions are tracked via tombstones
 * - The set of modified paths is available for conflict detection
 */
import type { BufferEncoding, CpOptions, DirentEntry, FileContent, FileSystemSnapshot, FsStat, IFileSystem, MkdirOptions, ReadFileOptions, RmOptions, WriteFileOptions } from "./interface.js";
export declare class CowFs implements IFileSystem {
    private readonly parent;
    private readonly local;
    private readonly deleted;
    private readonly modifiedPaths;
    constructor(parent: IFileSystem);
    /**
     * Returns the set of paths that have been locally modified or created.
     */
    getModifiedPaths(): ReadonlySet<string>;
    /**
     * Returns the set of paths that have been locally deleted.
     */
    getDeletedPaths(): ReadonlySet<string>;
    /**
     * Returns the parent filesystem for conflict detection.
     */
    getParent(): IFileSystem;
    readFile(path: string, options?: ReadFileOptions | BufferEncoding): Promise<string>;
    readFileBuffer(path: string): Promise<Uint8Array>;
    writeFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
    appendFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
    exists(path: string): Promise<boolean>;
    stat(path: string): Promise<FsStat>;
    lstat(path: string): Promise<FsStat>;
    mkdir(path: string, options?: MkdirOptions): Promise<void>;
    readdir(path: string): Promise<string[]>;
    readdirWithFileTypes(path: string): Promise<DirentEntry[]>;
    rm(path: string, options?: RmOptions): Promise<void>;
    cp(src: string, dest: string, options?: CpOptions): Promise<void>;
    mv(src: string, dest: string): Promise<void>;
    resolvePath(base: string, rel: string): string;
    getAllPaths(): string[];
    chmod(path: string, mode: number): Promise<void>;
    symlink(target: string, linkPath: string): Promise<void>;
    link(existingPath: string, newPath: string): Promise<void>;
    readlink(path: string): Promise<string>;
    realpath(path: string): Promise<string>;
    utimes(path: string, atime: Date, mtime: Date): Promise<void>;
    snapshot(): Promise<FileSystemSnapshot>;
    restore(snapshot: FileSystemSnapshot): Promise<void>;
    /**
     * Ensure parent directories exist in the local layer.
     */
    private ensureParentDirs;
}
