benignswarm 0.12.121 → 0.12.122

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.
@@ -187,7 +187,7 @@ export async function harnessStart(p, out, harness) {
187
187
  if (harness === "antigravity") {
188
188
  if (inContainer)
189
189
  provisionContainerInstallRecord();
190
- settings = antigravitySettings(sandbox, process.cwd(), configRoot(), new URL(creds.url).host, [...writable, ...ownWorktreeGitDir(process.cwd())], requireInstall().bin);
190
+ settings = antigravitySettings(sandbox, process.cwd(), configRoot(), new URL(creds.url).host, [...writable, ...ownWorktreeGitDir(process.cwd()), ...sharedGitDataDirs(process.cwd())], requireInstall().bin);
191
191
  }
192
192
  const priorState = readState(ref);
193
193
  if (priorState.turn_guard?.fault) {
@@ -694,6 +694,23 @@ export function ownWorktreeGitDir(cwd) {
694
694
  const [gitDir, common] = r.stdout.trim().split("\n");
695
695
  return gitDir && common && gitDir !== common ? [gitDir] : [];
696
696
  }
697
+ /**
698
+ * The shared git data a linked worktree needs to commit, fetch, branch and add unit worktrees:
699
+ * the common git folder's objects, refs, logs and worktrees. Antigravity's terminal sandbox mounts
700
+ * every `.git` under a writable folder read-only unless a path inside it is added by name, so a
701
+ * pool agent there could neither commit nor run `wu start` (EROFS on the clone's .git; seen on two
702
+ * projects). The folder itself is deliberately not listed: its `config` and `hooks` stay read-only,
703
+ * because a sandboxed write there would run outside the sandbox the next time git is used.
704
+ */
705
+ export function sharedGitDataDirs(cwd) {
706
+ const r = spawnSync("git", ["rev-parse", "--absolute-git-dir", "--path-format=absolute", "--git-common-dir"], { cwd, encoding: "utf8" });
707
+ if (r.status !== 0)
708
+ return [];
709
+ const [gitDir, common] = r.stdout.trim().split("\n");
710
+ if (!gitDir || !common || gitDir === common)
711
+ return [];
712
+ return ["objects", "refs", "logs", "worktrees"].map((name) => joinPath(common, name));
713
+ }
697
714
  /** Starts a headless Codex session in its own process group and returns its thread id from the JSON event stream. */
698
715
  async function startThread(codexBin, args, logPath, agent) {
699
716
  const fd = openSync(logPath, "a");
@@ -67,7 +67,7 @@ function writeMachineState(s) {
67
67
  * again once with them. 2: the agent's own worktree git folder is writable under workspace-write.
68
68
  * 3: turns get TMPDIR beside the checkout instead of the system's /tmp.
69
69
  */
70
- const START_REV = 7;
70
+ const START_REV = 8;
71
71
  export const sessionFingerprint = (s, writable = [], imageDigest = null) => JSON.stringify([s.id, s.harness, ...(s.provider && s.provider !== "anthropic" ? [s.provider] : []), s.dir, s.sandbox, s.model, s.effort, s.turn_timeout, s.turns_per_hour ?? DEFAULT_TURNS_PER_HOUR, s.unproductive_per_hour ?? DEFAULT_UNPRODUCTIVE_PER_HOUR, s.turn_coalesce_seconds ?? 180, s.thread, ...(writable.length ? [writable] : []), ...(imageDigest ? [imageDigest] : []), ...(START_REV > 1 ? [`rev${START_REV}`] : [])]);
72
72
  /** A server thread update must restart the watcher even if a stored fingerprint is unexpectedly stale. */
73
73
  export function sessionConfigChanged(s, local, fingerprint) {
package/dist/git.js CHANGED
@@ -263,7 +263,7 @@ export function createWorktree(path, branch, base, cwd = process.cwd(), exclude
263
263
  const sparse = exclude.length > 0;
264
264
  // Always defer checkout until we have explicitly applied this project's policy. Otherwise Git
265
265
  // may inherit the source worktree's shared sparse-checkout settings.
266
- const args = ["worktree", "add", "--no-checkout", ...(exists ? [path, branch] : ["-b", branch, path, base])];
266
+ const args = ["worktree", "add", "--no-checkout", ...(exists ? [path, branch] : ["--no-track", "-b", branch, path, base])];
267
267
  const r = spawnSync("git", args, { cwd, encoding: "utf8" });
268
268
  if (r.status !== 0)
269
269
  throw new Error(`git ${args.join(" ")}: ${(r.stderr || r.stdout).trim()}`);
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.12.121";
1
+ export const CLI_VERSION = "0.12.122";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "benignswarm",
3
- "version": "0.12.121",
3
+ "version": "0.12.122",
4
4
  "description": "b9s: chat, status board and evidence store for coding agents (benignswarm.org)",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {