codeam-cli 2.61.90 → 2.61.91

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.61.90] — 2026-08-08
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Mobile mode toggle now actually switches manual/auto (set_mode syncs autoApprovePermissions) (#599)
12
+
7
13
  ## [2.61.89] — 2026-08-08
8
14
 
9
15
  ### Added
package/dist/index.js CHANGED
@@ -7874,7 +7874,7 @@ function readAnonId() {
7874
7874
  }
7875
7875
  function superProperties() {
7876
7876
  return {
7877
- cliVersion: true ? "2.61.90" : "0.0.0-dev",
7877
+ cliVersion: true ? "2.61.91" : "0.0.0-dev",
7878
7878
  nodeVersion: process.version,
7879
7879
  platform: process.platform,
7880
7880
  arch: process.arch,
@@ -8055,7 +8055,7 @@ var os4 = __toESM(require("os"));
8055
8055
  // package.json
8056
8056
  var package_default = {
8057
8057
  name: "codeam-cli",
8058
- version: "2.61.90",
8058
+ version: "2.61.91",
8059
8059
  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.",
8060
8060
  type: "commonjs",
8061
8061
  main: "dist/index.js",
@@ -8893,6 +8893,27 @@ async function ensureHeadroomProxy(deps) {
8893
8893
  deps.spawnProxy();
8894
8894
  return "respawned";
8895
8895
  }
8896
+ async function ensureHeadroomProxyReady(deps, opts = {}) {
8897
+ if (!deps.isConfigured()) return true;
8898
+ if (await deps.probeAlive().catch(() => false)) return true;
8899
+ log.warn(
8900
+ "headroom-supervisor",
8901
+ "proxy :8787 not answering before a turn \u2014 force-respawning + waiting for readiness"
8902
+ );
8903
+ (deps.spawnProxyForce ?? deps.spawnProxy)();
8904
+ const sleep5 = opts.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
8905
+ const pollMs = opts.pollMs ?? 1500;
8906
+ const maxPolls = Math.max(1, Math.ceil((opts.timeoutMs ?? 6e4) / pollMs));
8907
+ for (let i = 0; i < maxPolls; i += 1) {
8908
+ await sleep5(pollMs);
8909
+ if (await deps.probeAlive().catch(() => false)) {
8910
+ log.info("headroom-supervisor", `proxy :8787 ready after ~${(i + 1) * pollMs / 1e3}s`);
8911
+ return true;
8912
+ }
8913
+ }
8914
+ log.warn("headroom-supervisor", "proxy :8787 still not ready after respawn wait \u2014 proceeding anyway");
8915
+ return false;
8916
+ }
8896
8917
  function isHeadroomConfiguredReal(homeDir2 = os6.homedir()) {
8897
8918
  if (process.env.HEADROOM_ENABLED === "1") return true;
8898
8919
  const csEnv = path6.join(homeDir2, ".codeam", "codespace-env.json");
@@ -8935,7 +8956,15 @@ function makeRealProxySupervisorDeps() {
8935
8956
  probeAlive: probeProxyAliveReal,
8936
8957
  proxyProcessAlive: () => isHeadroomProxyProcessAlive(),
8937
8958
  proxyStartupAgeMs: () => headroomProxyPidfileAgeMs(Date.now()),
8938
- spawnProxy: spawnProxyReal
8959
+ spawnProxy: spawnProxyReal,
8960
+ spawnProxyForce: () => spawnHeadroomProxy(
8961
+ {
8962
+ tag: "headroom-supervisor",
8963
+ spawnErrorMsg: (detail) => `force-respawn error (best-effort): ${detail}`,
8964
+ failureMsg: (detail) => `force-respawn failed (best-effort): ${detail}`
8965
+ },
8966
+ { force: true }
8967
+ )
8939
8968
  };
8940
8969
  }
8941
8970
 
@@ -9331,7 +9360,7 @@ var CommandRelayService = class _CommandRelayService {
9331
9360
  // fresh + clear the "CLI update available" banner after a self-update
9332
9361
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
9333
9362
  // pair/reconnect). Older backends ignore the extra field.
9334
- ..."2.61.90" ? { ideVersion: "2.61.90" } : {}
9363
+ ..."2.61.91" ? { ideVersion: "2.61.91" } : {}
9335
9364
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
9336
9365
  }
9337
9366
  /**
@@ -20504,7 +20533,7 @@ async function autoUpgradeBeforeCriticalCommand() {
20504
20533
  if (process.env.NODE_ENV === "test") return;
20505
20534
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
20506
20535
  if (process.env.CI) return;
20507
- const current2 = true ? "2.61.90" : null;
20536
+ const current2 = true ? "2.61.91" : null;
20508
20537
  if (!current2) return;
20509
20538
  const cache = readCache();
20510
20539
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -20521,7 +20550,7 @@ function checkForUpdates() {
20521
20550
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
20522
20551
  if (process.env.CI) return;
20523
20552
  if (!process.stdout.isTTY) return;
20524
- const current2 = true ? "2.61.90" : null;
20553
+ const current2 = true ? "2.61.91" : null;
20525
20554
  if (!current2) return;
20526
20555
  const cache = readCache();
20527
20556
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -20541,7 +20570,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
20541
20570
  var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
20542
20571
  var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
20543
20572
  function currentCliVersion() {
20544
- return true ? "2.61.90" : null;
20573
+ return true ? "2.61.91" : null;
20545
20574
  }
20546
20575
  function runCmd(cmd, args2, timeoutMs) {
20547
20576
  return new Promise((resolve9) => {
@@ -32934,6 +32963,7 @@ var AcpClient = class {
32934
32963
  if (!this.connection || !this.sessionId) {
32935
32964
  throw new Error("AcpClient.prompt called before start()");
32936
32965
  }
32966
+ await ensureHeadroomProxyReady(makeRealProxySupervisorDeps()).catch(() => void 0);
32937
32967
  const blocks = typeof input === "string" ? [{ type: "text", text: input }] : input;
32938
32968
  try {
32939
32969
  return await this.sendPromptOnce(blocks);
@@ -41764,7 +41794,7 @@ function checkChokidar() {
41764
41794
  }
41765
41795
  async function doctor(args2 = []) {
41766
41796
  const json = args2.includes("--json");
41767
- const cliVersion = true ? "2.61.90" : "0.0.0-dev";
41797
+ const cliVersion = true ? "2.61.91" : "0.0.0-dev";
41768
41798
  const apiBase2 = resolveApiBaseUrl();
41769
41799
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
41770
41800
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -42155,7 +42185,7 @@ async function mcpRun(args2) {
42155
42185
  // src/commands/version.ts
42156
42186
  var import_picocolors15 = __toESM(require("picocolors"));
42157
42187
  function version2() {
42158
- const v = true ? "2.61.90" : "unknown";
42188
+ const v = true ? "2.61.91" : "unknown";
42159
42189
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
42160
42190
  }
42161
42191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.61.90",
3
+ "version": "2.61.91",
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",