trantor 0.18.163 → 0.18.164

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.
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Trantor — the hub-world for AI agent crews: live message bus, presence, project Kanban/flow board + context-handoff for independent AI coding agents (Claude, Codex, Gemini, …)",
9
- "version": "0.18.163"
9
+ "version": "0.18.164"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "trantor",
14
14
  "source": "./",
15
15
  "description": "The hub-world for AI agent crews. Say \"fire up the crew\" and Claude becomes the architect: a plan-aware Advisor routes the work (solo / cheap inline calls / live crew of Codex, GLM, Kimi & DeepSeek in their own terminal windows), a Kanban/flow command center with a testing gate tracks it, and an economics brain (Scrooge) keeps the receipts. Includes the relay MCP, a SessionStart auto-discovery hook, and a PreCompact context-handoff so a fresh session can take over a full window instead of compacting.",
16
- "version": "0.18.163",
16
+ "version": "0.18.164",
17
17
  "author": {
18
18
  "name": "Sasha Bogojevic"
19
19
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trantor",
3
- "version": "0.18.163",
3
+ "version": "0.18.164",
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/kimi.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trantor",
3
- "version": "0.18.163",
3
+ "version": "0.18.164",
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). This manifest makes Kimi Code CLI a first-class ORCHESTRATOR, mirroring .claude-plugin/plugin.json. Hooks are the CANONICAL hooks/** executed through the kimi dialect bridge (kimi/bridge.mjs) — docs/KIMI-BRIDGE-CONTRACT.md.",
5
5
  "interface": {
6
6
  "displayName": "Trantor",
package/lib/project.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  // in the checkout (.trantor/project.json) or, unmarked, by the git repo root basename; an explicit
3
3
  // RELAY_PROJECT always wins and the hub folds aliases on top.
4
4
  import { execSync, execFileSync } from "node:child_process";
5
- import { readFileSync, writeFileSync, appendFileSync, existsSync, mkdirSync, readdirSync, statSync, realpathSync } from "node:fs";
5
+ import { readFileSync, writeFileSync, appendFileSync, existsSync, mkdirSync, readdirSync, statSync, realpathSync, renameSync, chmodSync, rmSync } from "node:fs";
6
6
  import { basename, join, dirname, resolve, sep } from "node:path";
7
7
  import { homedir, hostname } from "node:os";
8
8
  import { asRecord, asString } from "./decode.mjs";
@@ -114,8 +114,9 @@ export function devRootFor(env = process.env) {
114
114
  if (env.TRANTOR_DEV_ROOT) return env.TRANTOR_DEV_ROOT;
115
115
  const home = env.HOME || homedir();
116
116
  try {
117
- const cfg = JSON.parse(readFileSync(join(env.AGENT_BUS_DIR || join(home, ".agent-bus"), "config.json"), "utf8"));
118
- if (typeof cfg?.projectsRoot === "string" && cfg.projectsRoot.startsWith("/")) return cfg.projectsRoot;
117
+ const cfg = asRecord(JSON.parse(readFileSync(join(env.AGENT_BUS_DIR || join(home, ".agent-bus"), "config.json"), "utf8")));
118
+ const root = asString(cfg?.projectsRoot) ?? "";
119
+ if (root.startsWith("/")) return root;
119
120
  } catch {}
120
121
  return join(home, "development");
121
122
  }
@@ -311,9 +312,23 @@ export function nonSeatReason(dir = process.cwd(), env = process.env) {
311
312
  // named export rather than exposing the internal one, so the file stays the single writer.
312
313
  export function writeConfigPublic(cfg) { writeConfig(cfg); }
313
314
 
315
+ // Write-then-rename (#14801): an in-place rewrite let the app read an empty or half-written file
316
+ // and fall back to the retired local hub. A rename on one filesystem is atomic, so a reader sees
317
+ // the old file or the new one, never a partial one. The existing mode (0600) is kept.
314
318
  function writeConfig(cfg) {
315
319
  mkdirSync(busDir(), { recursive: true });
316
- writeFileSync(configPath(), JSON.stringify(cfg, null, 2));
320
+ const target = configPath();
321
+ let mode = 0o644;
322
+ try { mode = statSync(target).mode & 0o777; } catch {}
323
+ const temp = `${target}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`;
324
+ try {
325
+ writeFileSync(temp, JSON.stringify(cfg, null, 2), { mode });
326
+ chmodSync(temp, mode);
327
+ renameSync(temp, target);
328
+ } catch (error) {
329
+ rmSync(temp, { force: true });
330
+ throw error;
331
+ }
317
332
  }
318
333
 
319
334
  // Pin a project to a hub. URL must be absolute http(s); trailing slash stripped so
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trantor",
3
- "version": "0.18.163",
3
+ "version": "0.18.164",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "trantor": "bin/cli.mjs"