codeam-cli 2.75.40 → 2.75.41

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,12 @@ 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.40] — 2026-09-27
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Guardrail_configure read/write reach their handler (#843)
12
+
7
13
  ## [2.75.39] — 2026-09-27
8
14
 
9
15
  ### Fixed
package/dist/index.js CHANGED
@@ -3437,6 +3437,41 @@ function resolveLogDir() {
3437
3437
  var LOG_DIR = resolveLogDir();
3438
3438
  var debugFilePath = path.join(LOG_DIR, `debug-${process.pid}.log`);
3439
3439
  var fileInitialized = false;
3440
+ var LOG_RETENTION_MS = 7 * 24 * 60 * 60 * 1e3;
3441
+ var LOG_DIR_BUDGET_BYTES = 200 * 1024 * 1024;
3442
+ function pidAlive(pid) {
3443
+ try {
3444
+ process.kill(pid, 0);
3445
+ return true;
3446
+ } catch (err) {
3447
+ return err.code === "EPERM";
3448
+ }
3449
+ }
3450
+ function pruneStaleLogs(dir, now = Date.now(), isAlive = pidAlive) {
3451
+ let removed = 0;
3452
+ try {
3453
+ const entries = fs.readdirSync(dir).map((name) => ({ name, m: /^debug-(\d+)\.log/.exec(name) })).filter((e) => e.m !== null).map(({ name, m }) => {
3454
+ const full = path.join(dir, name);
3455
+ const st3 = fs.statSync(full);
3456
+ return { full, pid: Number(m[1]), mtime: st3.mtimeMs, size: st3.size };
3457
+ }).sort((a, b) => b.mtime - a.mtime);
3458
+ let used = 0;
3459
+ for (const e of entries) {
3460
+ used += e.size;
3461
+ if (e.pid === process.pid || isAlive(e.pid)) continue;
3462
+ if (now - e.mtime > LOG_RETENTION_MS || used > LOG_DIR_BUDGET_BYTES) {
3463
+ try {
3464
+ fs.unlinkSync(e.full);
3465
+ removed++;
3466
+ used -= e.size;
3467
+ } catch {
3468
+ }
3469
+ }
3470
+ }
3471
+ } catch {
3472
+ }
3473
+ return removed;
3474
+ }
3440
3475
  function maybeRotate() {
3441
3476
  try {
3442
3477
  const st3 = fs.statSync(debugFilePath);
@@ -3470,6 +3505,7 @@ function appendToFile(line) {
3470
3505
  try {
3471
3506
  if (!fileInitialized) {
3472
3507
  fs.mkdirSync(path.dirname(debugFilePath), { recursive: true, mode: 448 });
3508
+ pruneStaleLogs(path.dirname(debugFilePath));
3473
3509
  if (fs.existsSync(debugFilePath)) rotateNow();
3474
3510
  const header = jsonMode ? `${JSON.stringify({
3475
3511
  ts: (/* @__PURE__ */ new Date()).toISOString(),
@@ -10529,7 +10565,7 @@ function readAnonId() {
10529
10565
  }
10530
10566
  function superProperties() {
10531
10567
  return {
10532
- cliVersion: true ? "2.75.40" : "0.0.0-dev",
10568
+ cliVersion: true ? "2.75.41" : "0.0.0-dev",
10533
10569
  nodeVersion: process.version,
10534
10570
  platform: process.platform,
10535
10571
  arch: process.arch,
@@ -10771,7 +10807,7 @@ var http = __toESM(require("http"));
10771
10807
  // package.json
10772
10808
  var package_default = {
10773
10809
  name: "codeam-cli",
10774
- version: "2.75.40",
10810
+ version: "2.75.41",
10775
10811
  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
10812
  type: "commonjs",
10777
10813
  main: "dist/index.js",
@@ -12101,7 +12137,7 @@ var CommandRelayService = class _CommandRelayService {
12101
12137
  // fresh + clear the "CLI update available" banner after a self-update
12102
12138
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
12103
12139
  // pair/reconnect). Older backends ignore the extra field.
12104
- ..."2.75.40" ? { ideVersion: "2.75.40" } : {}
12140
+ ..."2.75.41" ? { ideVersion: "2.75.41" } : {}
12105
12141
  };
12106
12142
  try {
12107
12143
  const res = await _postJson(`${API_BASE2}/api/plugin/heartbeat`, body);
@@ -27663,13 +27699,13 @@ function resolveGlobalNodeModulesDir(opts) {
27663
27699
  var STALE_STAGING_AGE_MS = CLI_UPDATE_INSTALL_TIMEOUT_MS;
27664
27700
  function sweepStaleCliStagingDirs(nodeModulesDir, now = Date.now(), deps) {
27665
27701
  if (!nodeModulesDir) return 0;
27666
- const readdirSync14 = deps?.readdirSync ?? fs51.readdirSync;
27702
+ const readdirSync15 = deps?.readdirSync ?? fs51.readdirSync;
27667
27703
  const statSync16 = deps?.statSync ?? fs51.statSync;
27668
27704
  const rmSync10 = deps?.rmSync ?? fs51.rmSync;
27669
27705
  let removed = 0;
27670
27706
  let entries;
27671
27707
  try {
27672
- entries = readdirSync14(nodeModulesDir);
27708
+ entries = readdirSync15(nodeModulesDir);
27673
27709
  } catch {
27674
27710
  return 0;
27675
27711
  }
@@ -39932,7 +39968,7 @@ function readFileVars(file) {
39932
39968
  return {};
39933
39969
  }
39934
39970
  }
39935
- function pidAlive(pid) {
39971
+ function pidAlive2(pid) {
39936
39972
  try {
39937
39973
  process.kill(pid, 0);
39938
39974
  return true;
@@ -39951,7 +39987,7 @@ function pruneStale(dir) {
39951
39987
  const m = /^(\d+)-[a-z]+\.json$/.exec(name);
39952
39988
  if (!m) continue;
39953
39989
  const pid = Number(m[1]);
39954
- if (pid === process.pid || pidAlive(pid)) continue;
39990
+ if (pid === process.pid || pidAlive2(pid)) continue;
39955
39991
  try {
39956
39992
  fs69.unlinkSync(path80.join(dir, name));
39957
39993
  } catch {
@@ -48852,7 +48888,7 @@ async function autoUpgradeBeforeCriticalCommand() {
48852
48888
  if (process.env.NODE_ENV === "test") return;
48853
48889
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
48854
48890
  if (process.env.CI) return;
48855
- const current2 = true ? "2.75.40" : null;
48891
+ const current2 = true ? "2.75.41" : null;
48856
48892
  if (!current2) return;
48857
48893
  const cache = readCache();
48858
48894
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -48869,7 +48905,7 @@ function checkForUpdates() {
48869
48905
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
48870
48906
  if (process.env.CI) return;
48871
48907
  if (!process.stdout.isTTY) return;
48872
- const current2 = true ? "2.75.40" : null;
48908
+ const current2 = true ? "2.75.41" : null;
48873
48909
  if (!current2) return;
48874
48910
  const cache = readCache();
48875
48911
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -48892,7 +48928,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
48892
48928
  var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
48893
48929
  var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
48894
48930
  function currentCliVersion() {
48895
- return true ? "2.75.40" : null;
48931
+ return true ? "2.75.41" : null;
48896
48932
  }
48897
48933
  async function installedVersion(deps) {
48898
48934
  const ls = await deps.run(
@@ -50868,7 +50904,7 @@ function checkChokidar() {
50868
50904
  }
50869
50905
  async function doctor(args2 = []) {
50870
50906
  const json = args2.includes("--json");
50871
- const cliVersion = true ? "2.75.40" : "0.0.0-dev";
50907
+ const cliVersion = true ? "2.75.41" : "0.0.0-dev";
50872
50908
  const apiBase2 = resolveApiBaseUrl();
50873
50909
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
50874
50910
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -51392,7 +51428,7 @@ async function mcpWarm(argv = [], opts = {}) {
51392
51428
  // src/commands/version.ts
51393
51429
  var import_picocolors15 = __toESM(require("picocolors"));
51394
51430
  function version2() {
51395
- const v = true ? "2.75.40" : "unknown";
51431
+ const v = true ? "2.75.41" : "unknown";
51396
51432
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
51397
51433
  }
51398
51434
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.75.40",
3
+ "version": "2.75.41",
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",