toolroll 0.9.78 → 0.9.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -190,7 +190,7 @@ function nestedRepository(path) {
190
190
  * repository (boundDirs; `binding.repo` when the caller has the project's), is refused; so is a command whose
191
191
  * repository changed under it while git ran.
192
192
  */
193
- async function inView(cwd, binding, work, after = true) {
193
+ async function inView(cwd, binding, work, after = true, lockTimeoutMs, gitFile = "git") {
194
194
  const root = checkoutRootOf(cwd);
195
195
  if (root === null)
196
196
  return NOT_A_REPOSITORY;
@@ -206,7 +206,7 @@ async function inView(cwd, binding, work, after = true) {
206
206
  return await withCheckoutLock(realpathSync(homedir()), key, async () => {
207
207
  let view;
208
208
  try {
209
- view = gitView(root, "write", binding);
209
+ view = gitView(root, "write", binding, gitFile);
210
210
  }
211
211
  catch (error) {
212
212
  return refused(error instanceof Error ? error.message : "the checkout couldn't be read");
@@ -221,7 +221,7 @@ async function inView(cwd, binding, work, after = true) {
221
221
  finally {
222
222
  view.dispose();
223
223
  }
224
- });
224
+ }, lockTimeoutMs);
225
225
  }
226
226
  catch (error) {
227
227
  return refused(error instanceof Error ? error.message : "the checkout is busy");
@@ -234,11 +234,11 @@ async function inView(cwd, binding, work, after = true) {
234
234
  * target is bound to the same repository as the folder it is removed from. A removal without --force runs under the
235
235
  * target's own view (its own config.worktree folded in), so git's last check of whether it is clean reads it as the
236
236
  * target itself would. `binding.repo`: the project's main checkout, from the plane's records, when the caller has it. */
237
- export function teardownGit(runner = run, binding = {}) {
237
+ export function teardownGit(runner = run, binding = {}, lockTimeoutMs, gitFile = "git") {
238
238
  const options = (cwd, env) => ({ cwd, envAllowlist: ENV_ALLOWLIST, env: { ...ENV, ...env }, timeoutMs: WORKTREE_TIMEOUT_MS, maxBuffer: 512 * 1024 * 1024 });
239
239
  const configProblem = async (cwd, env) => {
240
240
  // git-lfs's own filters may stand only beside a .lfsconfig that names no extension (commandSetting's lfsChecked).
241
- if (lfsExtensionIn(env["GIT_WORK_TREE"] ?? cwd))
241
+ if (lfsExtensionIn(env["GIT_WORK_TREE"] ?? cwd, gitFile))
242
242
  return refused("the checkout's .lfsconfig sets a git-lfs key that can run a command");
243
243
  const config = await runner("git", ["--no-optional-locks", "config", "--list", "--no-includes", "--show-scope", "-z"], options(cwd, env));
244
244
  if (config.code !== 0)
@@ -287,8 +287,8 @@ export function teardownGit(runner = run, binding = {}) {
287
287
  // the target's view, inspected above, so it judges the target by the target's own settings.
288
288
  return ran(removal && !forced ? { ...view.env, GIT_COMMON_DIR: targetView.env["GIT_COMMON_DIR"] } : view.env);
289
289
  // A removed target has no git directory left to prove: the folder it was removed from is proven instead.
290
- }, !removal);
291
- });
290
+ }, !removal, lockTimeoutMs, gitFile);
291
+ }, true, lockTimeoutMs, gitFile);
292
292
  }
293
293
  /**
294
294
  * Git on a build's checkout, as the plane runs it outside every fence (staging, committing and inspecting the build's
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolroll",
3
- "version": "0.9.78",
3
+ "version": "0.9.81",
4
4
  "description": "A control plane for unattended coding agents — queue tasks, walk away, come back to pull requests. Agents build in leased worktrees, never touch your default branch, and interrupt you only for decisions that need a human.",
5
5
  "directories": {
6
6
  "doc": "docs"