import type { FileStat, SandboxEnv } from './sandbox.js'; /** * Out-of-band filesystem surface for a session sandbox. * * These operations do not write to conversation history and are intended for * host-side plumbing: staging files, collecting artifacts, and preparing * scratch space. If the model should reason about a file, prompt it to use the * normal read/write/edit tools instead. */ export interface FabricFs { /** Read a UTF-8 text file. */ readText(path: string): Promise; /** Alias for `readText()` shared by filesystem and sandbox sources. */ readFile(path: string): Promise; /** Read a file as raw bytes. */ readBytes(path: string): Promise; /** Alias for `readBytes()` shared by filesystem and sandbox sources. */ readFileBuffer(path: string): Promise; /** Write text or bytes, replacing any existing file. */ write(path: string, content: string | Uint8Array): Promise; /** Write a UTF-8 text file. */ writeText(path: string, content: string): Promise; /** Alias for `write()` shared by filesystem and sandbox sources. */ writeFile(path: string, content: string | Uint8Array): Promise; /** Get file metadata. */ stat(path: string): Promise; /** List directory entries by name. */ list(path: string): Promise; /** Alias for `list()`. */ readdir(path: string): Promise; /** True if a path exists. */ exists(path: string): Promise; /** Create a directory. */ mkdir(path: string, options?: { recursive?: boolean; }): Promise; /** Remove a file or directory. */ remove(path: string, options?: { recursive?: boolean; force?: boolean; }): Promise; /** Alias for `remove()`. */ rm(path: string, options?: { recursive?: boolean; force?: boolean; }): Promise; /** Resolve a path using the sandbox's cwd and path semantics. */ resolvePath(path: string): Promise; } /** Adapt a sandbox into the public filesystem convenience surface. */ export declare function createFabricFs(sandboxLike: SandboxEnv | Promise | (() => SandboxEnv | Promise)): FabricFs; //# sourceMappingURL=filesystem.d.ts.map