trantor 0.18.97 → 0.18.98

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.97",
3
+ "version": "0.18.98",
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": {
package/bin/crew/core.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { accessSync, constants, existsSync, mkdirSync, readFileSync } from "node:fs";
1
+ import { accessSync, constants, existsSync, mkdirSync, readFileSync, realpathSync } from "node:fs";
2
2
  import { basename, dirname, join } from "node:path";
3
3
  import { spawnSync } from "node:child_process";
4
4
  import { fileURLToPath } from "node:url";
@@ -85,8 +85,20 @@ function selectMux(env, have) {
85
85
  return "terminal";
86
86
  }
87
87
 
88
+ // PWD keeps a symlinked spelling of the cwd, so prefer it, but only while it still names the cwd.
89
+ // A parent that spawns with a different cwd leaves its own PWD behind: the app relaunched from a
90
+ // trantor shell ran every `trantor open <other>` as trantor and the handoff refused.
91
+ export function workingDir(env = process.env, cwd = process.cwd()) {
92
+ if (!env.PWD) return cwd;
93
+ try {
94
+ return realpathSync(env.PWD) === realpathSync(cwd) ? env.PWD : cwd;
95
+ } catch {
96
+ return cwd;
97
+ }
98
+ }
99
+
88
100
  export function createContext(command, env = process.env) {
89
- const dir = env.PWD || process.cwd();
101
+ const dir = workingDir(env);
90
102
  const home = env.HOME || "";
91
103
  const project = env.RELAY_PROJECT || projectFromGit(dir);
92
104
  const have = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trantor",
3
- "version": "0.18.97",
3
+ "version": "0.18.98",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "trantor": "bin/cli.mjs"