codeam-cli 2.75.38 → 2.75.40

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to `codeam-cli` are documented here.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.75.39] — 2026-09-27
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Host never resumes a dead session into the filesystem root (#841)
12
+
13
+ ## [2.75.38] — 2026-09-27
14
+
15
+ ### Fixed
16
+
17
+ - **cli:** Beads never commits to the user's repo (bd init --stealth) (#844)
18
+
7
19
  ## [2.75.37] — 2026-09-27
8
20
 
9
21
  ### Fixed
package/dist/index.js CHANGED
@@ -10529,7 +10529,7 @@ function readAnonId() {
10529
10529
  }
10530
10530
  function superProperties() {
10531
10531
  return {
10532
- cliVersion: true ? "2.75.38" : "0.0.0-dev",
10532
+ cliVersion: true ? "2.75.40" : "0.0.0-dev",
10533
10533
  nodeVersion: process.version,
10534
10534
  platform: process.platform,
10535
10535
  arch: process.arch,
@@ -10771,7 +10771,7 @@ var http = __toESM(require("http"));
10771
10771
  // package.json
10772
10772
  var package_default = {
10773
10773
  name: "codeam-cli",
10774
- version: "2.75.38",
10774
+ version: "2.75.40",
10775
10775
  description: "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device \u2014 async. The terminal companion for CodeAgent Mobile.",
10776
10776
  type: "commonjs",
10777
10777
  main: "dist/index.js",
@@ -12101,7 +12101,7 @@ var CommandRelayService = class _CommandRelayService {
12101
12101
  // fresh + clear the "CLI update available" banner after a self-update
12102
12102
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
12103
12103
  // pair/reconnect). Older backends ignore the extra field.
12104
- ..."2.75.38" ? { ideVersion: "2.75.38" } : {}
12104
+ ..."2.75.40" ? { ideVersion: "2.75.40" } : {}
12105
12105
  };
12106
12106
  try {
12107
12107
  const res = await _postJson(`${API_BASE2}/api/plugin/heartbeat`, body);
@@ -12436,6 +12436,10 @@ function isUnsafeWindowsWatchRoot(dir, homedir53) {
12436
12436
  }
12437
12437
  return false;
12438
12438
  }
12439
+ function isFilesystemRoot(dir) {
12440
+ const resolved = path5.resolve(dir);
12441
+ return resolved === path5.parse(resolved).root;
12442
+ }
12439
12443
  var _chokidarSeam = {
12440
12444
  load: () => {
12441
12445
  try {
@@ -12520,6 +12524,13 @@ var FileWatcherService = class {
12520
12524
  if (this.stopped) {
12521
12525
  throw new Error("FileWatcherService has already been stopped \u2014 re-instantiate to restart.");
12522
12526
  }
12527
+ if (isFilesystemRoot(this.opts.workingDir)) {
12528
+ log.warn(
12529
+ "fileWatcher",
12530
+ `refusing to watch ${this.opts.workingDir} \u2014 the filesystem root. Run codeam from your project folder to enable file change emission.`
12531
+ );
12532
+ return;
12533
+ }
12523
12534
  const isWin = process.platform === "win32";
12524
12535
  if (isWin && isUnsafeWindowsWatchRoot(this.opts.workingDir, os5.homedir())) {
12525
12536
  log.warn(
@@ -13651,7 +13662,13 @@ var startCommandSchema = import_zod.z.object({
13651
13662
  // session (Claude hot-reloads ~/.claude/skills/), or list what's installed.
13652
13663
  "add",
13653
13664
  "remove",
13654
- "list"
13665
+ "list",
13666
+ // `guardrail_configure` — read / update the session's guardrail policy.
13667
+ // ⚠️ Missing until 2026-09-26: the generic parse rejected `{action:'read'}`
13668
+ // as malformed BEFORE the handler ran, so Guardrails never loaded ("isn't
13669
+ // responding") and every save was silently dropped.
13670
+ "read",
13671
+ "write"
13655
13672
  ]).optional(),
13656
13673
  // `coderabbit_configure` (action='link_apikey') — the CodeRabbit API key.
13657
13674
  apiKey: import_zod.z.string().min(1).max(512).optional(),
@@ -33098,13 +33115,13 @@ var ConnectionBuilder = class {
33098
33115
  /**
33099
33116
  * Adds a typed request handler for one method.
33100
33117
  */
33101
- onReceiveRequest(method, parse, handler) {
33118
+ onReceiveRequest(method, parse2, handler) {
33102
33119
  return this.withHandler({
33103
33120
  handleMessage: async (message, cx) => {
33104
33121
  if (message.kind !== "request" || message.method !== method) {
33105
33122
  return Handled.no(message);
33106
33123
  }
33107
- const request2 = parse(message.params);
33124
+ const request2 = parse2(message.params);
33108
33125
  return await handler(request2, message.responder, cx) ?? Handled.yes();
33109
33126
  },
33110
33127
  describe: () => `${this.connectionName ?? "request"}:${method}`
@@ -33113,13 +33130,13 @@ var ConnectionBuilder = class {
33113
33130
  /**
33114
33131
  * Adds a typed notification handler for one method.
33115
33132
  */
33116
- onReceiveNotification(method, parse, handler) {
33133
+ onReceiveNotification(method, parse2, handler) {
33117
33134
  return this.withHandler({
33118
33135
  handleMessage: async (message, cx) => {
33119
33136
  if (message.kind !== "notification" || message.method !== method) {
33120
33137
  return Handled.no(message);
33121
33138
  }
33122
- const notification = parse(message.params);
33139
+ const notification = parse2(message.params);
33123
33140
  return await handler(notification, cx) ?? Handled.yes();
33124
33141
  },
33125
33142
  describe: () => `${this.connectionName ?? "notification"}:${method}`
@@ -48344,9 +48361,9 @@ function fileSessionChildStore(file = hostSessionStatePath()) {
48344
48361
  load() {
48345
48362
  try {
48346
48363
  const raw = JSON.parse(fs77.readFileSync(file, "utf8"));
48347
- return Array.isArray(raw?.sessions) ? raw.sessions.filter(isRecord5) : [];
48364
+ return Array.isArray(raw?.sessions) ? raw.sessions.filter(isRecord5) : null;
48348
48365
  } catch {
48349
- return [];
48366
+ return null;
48350
48367
  }
48351
48368
  },
48352
48369
  save(list) {
@@ -48835,7 +48852,7 @@ async function autoUpgradeBeforeCriticalCommand() {
48835
48852
  if (process.env.NODE_ENV === "test") return;
48836
48853
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
48837
48854
  if (process.env.CI) return;
48838
- const current2 = true ? "2.75.38" : null;
48855
+ const current2 = true ? "2.75.40" : null;
48839
48856
  if (!current2) return;
48840
48857
  const cache = readCache();
48841
48858
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -48852,7 +48869,7 @@ function checkForUpdates() {
48852
48869
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
48853
48870
  if (process.env.CI) return;
48854
48871
  if (!process.stdout.isTTY) return;
48855
- const current2 = true ? "2.75.38" : null;
48872
+ const current2 = true ? "2.75.40" : null;
48856
48873
  if (!current2) return;
48857
48874
  const cache = readCache();
48858
48875
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -48875,7 +48892,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
48875
48892
  var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
48876
48893
  var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
48877
48894
  function currentCliVersion() {
48878
- return true ? "2.75.38" : null;
48895
+ return true ? "2.75.40" : null;
48879
48896
  }
48880
48897
  async function installedVersion(deps) {
48881
48898
  const ls = await deps.run(
@@ -50149,11 +50166,12 @@ var HostAgentSupervisor = class {
50149
50166
  try {
50150
50167
  if (this.children.size > 0) return;
50151
50168
  const records = this.sessionStore.load();
50152
- if (records.length === 0) {
50169
+ if (records === null) {
50153
50170
  const target = this.fallbackResumeTarget();
50154
50171
  if (target) this.resumeOne(target);
50155
50172
  return;
50156
50173
  }
50174
+ if (records.length === 0) return;
50157
50175
  const max = resolveMaxResumeSessions();
50158
50176
  const { resume, dropped } = planSessionResume(records, max);
50159
50177
  for (const rec of dropped) {
@@ -50201,6 +50219,13 @@ var HostAgentSupervisor = class {
50201
50219
  const session = getActiveSession();
50202
50220
  if (!session || !session.pluginId || !session.pollSecret || !session.agent) return null;
50203
50221
  const cwd = session.cwd && fs80.existsSync(session.cwd) ? session.cwd : process.cwd();
50222
+ if (isFilesystemRoot(cwd)) {
50223
+ log.warn(
50224
+ "host-agent",
50225
+ `resume: skipping session ${session.id.slice(0, 8)} \u2014 it has no saved workspace and the fallback is the filesystem root`
50226
+ );
50227
+ return null;
50228
+ }
50204
50229
  const deployId = deployIdFromWorkspace(session.cwd) ?? session.id;
50205
50230
  return { deployId, cwd, session };
50206
50231
  }
@@ -50272,7 +50297,7 @@ var HostAgentSupervisor = class {
50272
50297
  */
50273
50298
  knownSavedSessions() {
50274
50299
  try {
50275
- const persisted = new Map(this.sessionStore.load().map((r) => [r.deployId, r.agent]));
50300
+ const persisted = new Map((this.sessionStore.load() ?? []).map((r) => [r.deployId, r.agent]));
50276
50301
  for (const c2 of this.children.values()) persisted.set(c2.deployId, c2.agent);
50277
50302
  return this.listSavedSessions().map((s) => ({ s, deployId: deployIdFromWorkspace(s.cwd) })).filter(
50278
50303
  (x) => x.deployId !== null && !!x.s.cwd && fs80.existsSync(x.s.cwd)
@@ -50843,7 +50868,7 @@ function checkChokidar() {
50843
50868
  }
50844
50869
  async function doctor(args2 = []) {
50845
50870
  const json = args2.includes("--json");
50846
- const cliVersion = true ? "2.75.38" : "0.0.0-dev";
50871
+ const cliVersion = true ? "2.75.40" : "0.0.0-dev";
50847
50872
  const apiBase2 = resolveApiBaseUrl();
50848
50873
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
50849
50874
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -51367,7 +51392,7 @@ async function mcpWarm(argv = [], opts = {}) {
51367
51392
  // src/commands/version.ts
51368
51393
  var import_picocolors15 = __toESM(require("picocolors"));
51369
51394
  function version2() {
51370
- const v = true ? "2.75.38" : "unknown";
51395
+ const v = true ? "2.75.40" : "unknown";
51371
51396
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
51372
51397
  }
51373
51398
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.75.38",
3
+ "version": "2.75.40",
4
4
  "description": "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device — async. The terminal companion for CodeAgent Mobile.",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",