codeam-cli 2.52.9 → 2.52.11

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.52.10] — 2026-07-04
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Self-update installs into the RUNNING prefix — no more manual-update fallback
12
+
13
+ ## [2.52.9] — 2026-07-04
14
+
15
+ ### Fixed
16
+
17
+ - **cli:** SDK dir resolution vs exports map — gate no longer burns 240s per start
18
+
7
19
  ## [2.52.8] — 2026-07-03
8
20
 
9
21
  ### Changed
package/dist/index.js CHANGED
@@ -5397,7 +5397,7 @@ function readAnonId() {
5397
5397
  }
5398
5398
  function superProperties() {
5399
5399
  return {
5400
- cliVersion: true ? "2.52.9" : "0.0.0-dev",
5400
+ cliVersion: true ? "2.52.11" : "0.0.0-dev",
5401
5401
  nodeVersion: process.version,
5402
5402
  platform: process.platform,
5403
5403
  arch: process.arch,
@@ -5578,7 +5578,7 @@ var os4 = __toESM(require("os"));
5578
5578
  // package.json
5579
5579
  var package_default = {
5580
5580
  name: "codeam-cli",
5581
- version: "2.52.9",
5581
+ version: "2.52.11",
5582
5582
  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.",
5583
5583
  type: "commonjs",
5584
5584
  main: "dist/index.js",
@@ -11280,12 +11280,12 @@ function isAvailable() {
11280
11280
  }
11281
11281
  function augmentPath() {
11282
11282
  const dirs = probeInstallDirs();
11283
- const sep6 = path14.delimiter;
11283
+ const sep7 = path14.delimiter;
11284
11284
  const current = process.env.PATH ?? "";
11285
- const existing = new Set(current.split(sep6).filter(Boolean));
11285
+ const existing = new Set(current.split(sep7).filter(Boolean));
11286
11286
  const additions = dirs.filter((d3) => !existing.has(d3));
11287
11287
  if (additions.length === 0) return;
11288
- process.env.PATH = additions.join(sep6) + sep6 + current;
11288
+ process.env.PATH = additions.join(sep7) + sep7 + current;
11289
11289
  }
11290
11290
  function runInstaller() {
11291
11291
  const isWindows = process.platform === "win32";
@@ -14928,7 +14928,7 @@ async function autoUpgradeBeforeCriticalCommand() {
14928
14928
  if (process.env.NODE_ENV === "test") return;
14929
14929
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
14930
14930
  if (process.env.CI) return;
14931
- const current = true ? "2.52.9" : null;
14931
+ const current = true ? "2.52.11" : null;
14932
14932
  if (!current) return;
14933
14933
  const cache = readCache();
14934
14934
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -14945,7 +14945,7 @@ function checkForUpdates() {
14945
14945
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
14946
14946
  if (process.env.CI) return;
14947
14947
  if (!process.stdout.isTTY) return;
14948
- const current = true ? "2.52.9" : null;
14948
+ const current = true ? "2.52.11" : null;
14949
14949
  if (!current) return;
14950
14950
  const cache = readCache();
14951
14951
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -15647,7 +15647,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process15.s
15647
15647
  detached: false
15648
15648
  });
15649
15649
  function currentCliVersion() {
15650
- return true ? "2.52.9" : null;
15650
+ return true ? "2.52.11" : null;
15651
15651
  }
15652
15652
  function runCmd(cmd, args2, timeoutMs) {
15653
15653
  return new Promise((resolve7) => {
@@ -19070,13 +19070,30 @@ var defaultCliUpdateDeps = {
19070
19070
  };
19071
19071
  var CLI_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
19072
19072
  var CLI_UPDATE_MAX_ATTEMPTS = 3;
19073
+ function buildNpmInstallInvocation(opts) {
19074
+ const entryScript = opts?.entryScript ?? process.argv[1] ?? "";
19075
+ const execPath = opts?.execPath ?? process.execPath;
19076
+ const exists2 = opts?.existsSync ?? fs43.existsSync;
19077
+ const normalized = entryScript.split(path48.sep).join("/");
19078
+ const marker = "/lib/node_modules/codeam-cli/";
19079
+ const markerIdx = normalized.indexOf(marker);
19080
+ const prefix = markerIdx > 0 ? entryScript.slice(0, markerIdx) : null;
19081
+ const siblingNpm = path48.join(
19082
+ path48.dirname(execPath),
19083
+ process.platform === "win32" ? "npm.cmd" : "npm"
19084
+ );
19085
+ const command2 = exists2(siblingNpm) ? siblingNpm : "npm";
19086
+ const args2 = prefix ? ["install", "-g", "--prefix", prefix, "codeam-cli@latest"] : ["install", "-g", "codeam-cli@latest"];
19087
+ return { command: command2, args: args2 };
19088
+ }
19073
19089
  async function runNpmInstallLatest() {
19074
19090
  let lastError = "";
19091
+ const invocation = buildNpmInstallInvocation();
19075
19092
  for (let attempt = 1; attempt <= CLI_UPDATE_MAX_ATTEMPTS; attempt++) {
19076
19093
  const result = await new Promise((resolve7) => {
19077
19094
  (0, import_child_process21.execFile)(
19078
- "npm",
19079
- ["install", "-g", "codeam-cli@latest"],
19095
+ invocation.command,
19096
+ invocation.args,
19080
19097
  { timeout: CLI_UPDATE_INSTALL_TIMEOUT_MS },
19081
19098
  (err, _stdout, stderr) => {
19082
19099
  if (!err) {
@@ -26639,6 +26656,14 @@ ${opts.recentStderr}`;
26639
26656
  if (!opts.hadText) return TURN_FAILURE_MESSAGE;
26640
26657
  return null;
26641
26658
  }
26659
+ var WINDOWS_CONTROL_C_EXIT = 3221225786;
26660
+ function adapterExitMessage(opts) {
26661
+ if (opts.code === WINDOWS_CONTROL_C_EXIT) return null;
26662
+ if (opts.signal === "SIGINT") return null;
26663
+ if (opts.authFail) return AUTH_FAILURE_MESSAGE;
26664
+ if (opts.outageFail) return providerOutageMessage(opts.agent);
26665
+ return `Agent adapter exited unexpectedly (code=${opts.code ?? "null"} signal=${opts.signal ?? "null"}).`;
26666
+ }
26642
26667
  async function reportCredentialInvalid(opts, fetchImpl = fetch) {
26643
26668
  const url = `${resolveApiBaseUrl()}/api/plugin/agents/${encodeURIComponent(opts.agent)}/credential-invalid`;
26644
26669
  const body = JSON.stringify({ sessionId: opts.sessionId, pluginId: opts.pluginId });
@@ -26788,6 +26813,8 @@ async function runAcpSession(opts) {
26788
26813
  log.warn("acpRunner", `adapter died code=${code} signal=${signal}; shutting down session`);
26789
26814
  const authFail = looksLikeAuthFailure(recentStderr.join("\n"));
26790
26815
  const outageFail = !authFail && looksLikeProviderOutage(recentStderr.join("\n"));
26816
+ const message = adapterExitMessage({ code, signal, authFail, outageFail, agent: opts.agent });
26817
+ const benign = message === null;
26791
26818
  if (authFail) {
26792
26819
  void reportCredentialInvalid(opts);
26793
26820
  }
@@ -26795,15 +26822,13 @@ async function runAcpSession(opts) {
26795
26822
  await withTimeout(
26796
26823
  (async () => {
26797
26824
  await streaming.closeAll();
26798
- await publisher.publishOutput({
26799
- type: "text",
26800
- content: authFail ? AUTH_FAILURE_MESSAGE : outageFail ? providerOutageMessage(opts.agent) : `Agent adapter exited unexpectedly (code=${code ?? "null"} signal=${signal ?? "null"}).`,
26801
- done: true
26802
- });
26825
+ if (message !== null) {
26826
+ await publisher.publishOutput({ type: "text", content: message, done: true });
26827
+ }
26803
26828
  })(),
26804
26829
  5e3
26805
26830
  );
26806
- process.exit(1);
26831
+ process.exit(benign ? 0 : 1);
26807
26832
  })();
26808
26833
  }
26809
26834
  };
@@ -31387,7 +31412,7 @@ function checkChokidar() {
31387
31412
  }
31388
31413
  async function doctor(args2 = []) {
31389
31414
  const json = args2.includes("--json");
31390
- const cliVersion = true ? "2.52.9" : "0.0.0-dev";
31415
+ const cliVersion = true ? "2.52.11" : "0.0.0-dev";
31391
31416
  const apiBase2 = resolveApiBaseUrl();
31392
31417
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
31393
31418
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -31586,7 +31611,7 @@ async function completion(args2) {
31586
31611
  // src/commands/version.ts
31587
31612
  var import_picocolors15 = __toESM(require("picocolors"));
31588
31613
  function version2() {
31589
- const v = true ? "2.52.9" : "unknown";
31614
+ const v = true ? "2.52.11" : "unknown";
31590
31615
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
31591
31616
  }
31592
31617
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.52.9",
3
+ "version": "2.52.11",
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",