intellibrix v1.0.0
    Preparing search index...

    Function withFileLock

    • Runs fn while holding an in-process lock on file, so concurrent tool calls on the same file (the agent loop runs one step's calls in parallel) take turns instead of losing each other's update. file should be a real path, as resolveJailed returns. This does not coordinate between processes.

      Type Parameters

      • T

      Parameters

      • file: string
      • fn: () => Promise<T>

      Returns Promise<T>