/**
 * File-checkpoint hook for the WIRED facade tool layer.
 *
 * This is the framework half of the rewind feature. The product (the coding
 * agent) constructs a `CheckpointStore`, exposes a small duck-typed
 * {@link CheckpointHandle} on the shared `ctx.framework` bag under the literal
 * key `'checkpoint'`, and passes it into the `write` / `edit` factories — the
 * same place the read-before-edit gate's `readState` handle is wired. When a
 * handle is present, every mutating file tool captures the file's pre-mutation
 * on-disk content EXACTLY ONCE per mutated path, so a later rewind can roll the
 * working tree back to that snapshot.
 *
 * Like the read-edit gate, the whole mechanism is *additive*: with no handle
 * present every helper here is a no-op and the tools behave exactly as they did
 * before. The handle is duck-typed so the host and these factories agree on
 * shape without a cross-package type import.
 */
/**
 * Duck-typed sink the host injects to receive pre-mutation snapshots.
 *
 * `record` is called once per mutated path, before the write lands, with the
 * file's OLD on-disk content — or `null` when the file did not exist on disk
 * before this mutation (so a rewind that visits this snapshot knows to DELETE
 * the file rather than restore stale bytes).
 */
export interface CheckpointHandle {
    /**
     * Capture the pre-mutation state of `absPath`.
     *
     * @param absPath  Absolute path of the file about to be written.
     * @param previous The file's content before this mutation, or `null` if the
     *                 file did not exist on disk beforehand.
     */
    record(absPath: string, previous: string | null): void;
}
/**
 * Read the CURRENT on-disk content of `absPath` and hand it to the checkpoint
 * handle, capturing the PRE-mutation state.
 *
 * This MUST be invoked synchronously-ordered immediately before the write so the
 * captured snapshot is the OLD content (no read/write race). When the file does
 * not exist on disk, `null` is recorded so a rewind knows to delete it.
 *
 * No-op when no handle is present. A read/stat failure that is NOT a plain
 * "missing file" is swallowed: checkpointing is best-effort and must never mask
 * the real operation's outcome. (A genuine ENOENT is reported as `null`, the
 * meaningful "file absent" snapshot.)
 */
export declare function recordCheckpoint(handle: CheckpointHandle | undefined, absPath: string): void;
