/** * Filesystem Storage Adapter * * The default backend. Wraps `fs.promises` and honors per-subsystem root * overrides from `storage.config`. Output is byte-identical to the * pre-abstraction direct-fs calls so consumer migrations stay safe. * * @design @.aiwg/architecture/storage-design.md (§5.1) * @issue #934 * @issue #956 */ import type { StorageAdapter, StorageEntry, WriteMeta } from '../types.js'; export declare class FilesystemAdapter implements StorageAdapter { /** Absolute path where this subsystem's content lives. */ private readonly root; constructor(root: string); /** * Path traversal guard. Rejects `..`, leading `/`, leading `~`, and * backslashes (which on POSIX would be treated as filename chars but * are almost always a Windows-vs-POSIX bug). Also rejects empty paths. */ private resolveSafe; read(path: string): Promise; write(path: string, content: string, _meta?: WriteMeta): Promise; /** * Atomic append. Uses fs.appendFile, which opens with O_APPEND so the * kernel guarantees atomicity for writes ≤ PIPE_BUF (4096 bytes on * Linux). Concurrent appenders interleave at line granularity rather * than racing read-then-write. See #976. */ append(path: string, content: string): Promise; list(prefix: string): Promise; delete(path: string): Promise; } //# sourceMappingURL=fs.d.ts.map