export type Spool = { path: string; /** Appends one line; rejects once the byte limit is passed or the stream has failed. */ write: (line: string) => Promise; /** Flushes and closes the file, keeping it on disk for a replay. */ close: () => Promise; /** Closes the stream if open and deletes the spool directory. */ discard: () => Promise; }; /** * A temporary line spool for the history a forked Codex child inherits before its first owned * task. It lives under `tempRoot` so a large inherited prefix never sits in memory. */ export declare function createSpool(tempRoot: string, limitBytes: number): Promise;