Expand description
Per-realpath serialization for file mutations (edit / write).
Ports .references/pi/packages/coding-agent/src/core/tools/file-mutation-queue.ts.
Operations targeting the same canonical path run FIFO; operations on
distinct paths run concurrently. The queue key is
realpath(resolve(path)), falling back to the lexically resolved path
when the target does not yet exist (ENOENT / ENOTDIR). Map entries
are cleaned up when the last waiter for a key finishes, including on
cancellation via a drop guard.
Enums§
- Mutation
Queue Error - Errors produced while registering a path into the mutation queue.
Functions§
- with_
file_ mutation_ queue - Serialize
fagainst every other mutation targeting the same realpath. Distinct keys run in parallel. TypeScriptwithFileMutationQueue.