trantor 0.18.27 → 0.18.28

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trantor",
3
- "version": "0.18.27",
3
+ "version": "0.18.28",
4
4
  "description": "Trantor — the hub-world for AI agent crews: live message bus, presence, project Kanban/flow board + crew orchestration for independent AI coding agents (Claude, Codex, Gemini, Kimi, DeepSeek)",
5
5
  "mcpServers": {
6
6
  "relay": {
@@ -66,10 +66,35 @@ function ensureSeatWorktree(sourceDir) {
66
66
  }
67
67
 
68
68
  try { mkdirSync(join(homedir(), ".agent-bus", "worktrees", safePathSegment(PROJ)), { recursive: true }); } catch {}
69
- const r = spawnSync("git", ["-C", root, "worktree", "add", "-B", branch, seatDir, "HEAD"], {
69
+
70
+ // Fast-forward the base branch before branching: the worktree should build
71
+ // against the latest main, not a stale checkout. (#5403)
72
+ const base = gitOut(["-C", root, "rev-parse", "--abbrev-ref", "HEAD"], root);
73
+ if (base) {
74
+ const remote = gitOut(["-C", root, "rev-parse", "--abbrev-ref", `${base}@{upstream}`], root);
75
+ if (remote) {
76
+ const ff = spawnSync("git", ["-C", root, "merge", "--ff-only", remote], { stdio: "ignore", timeout: 15000 });
77
+ if (ff && ff.status === 0) console.log(`\x1b[2m[runner]\x1b[0m ${base} fast-forwarded to ${remote}`);
78
+ }
79
+ }
80
+
81
+ const r = spawnSync("git", ["-C", root, "worktree", "add", "--no-track", "-B", branch, seatDir, "HEAD"], {
70
82
  encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], timeout: 30000,
71
83
  });
72
- if (r.status === 0) return seatDir;
84
+ if (r.status === 0) {
85
+ // Persist the base branch so the Review lens can name the real base instead
86
+ // of guessing via merge-base. Stale metadata is unset, not trusted. (#5403)
87
+ if (base) {
88
+ spawnSync("git", ["-C", seatDir, "config", `branch.${branch}.base`, base], { stdio: "ignore", timeout: 5000 });
89
+ }
90
+ // Set push.autoSetupRemote so a plain git push creates and sets upstream on
91
+ // first push (git >= 2.37, older clients ignore it). (#5403)
92
+ const pushAuto = gitOut(["-C", seatDir, "config", "--get", "push.autoSetupRemote"], seatDir);
93
+ if (!pushAuto) {
94
+ spawnSync("git", ["-C", seatDir, "config", "push.autoSetupRemote", "true"], { stdio: "ignore", timeout: 5000 });
95
+ }
96
+ return seatDir;
97
+ }
73
98
  console.log(`\x1b[33m[runner]\x1b[0m could not create ${branch} worktree — using ${sourceDir}`);
74
99
  return sourceDir;
75
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trantor",
3
- "version": "0.18.27",
3
+ "version": "0.18.28",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "trantor": "bin/cli.mjs"