codeam-cli 2.75.43 → 2.75.44

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.43] — 2026-09-27
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Stop the EPIPE log loop and retire daemons a restarted host-agent left behind (#851)
12
+
7
13
  ## [2.75.42] — 2026-09-27
8
14
 
9
15
  ### Fixed
package/dist/index.js CHANGED
@@ -10577,7 +10577,7 @@ function readAnonId() {
10577
10577
  }
10578
10578
  function superProperties() {
10579
10579
  return {
10580
- cliVersion: true ? "2.75.43" : "0.0.0-dev",
10580
+ cliVersion: true ? "2.75.44" : "0.0.0-dev",
10581
10581
  nodeVersion: process.version,
10582
10582
  platform: process.platform,
10583
10583
  arch: process.arch,
@@ -10822,7 +10822,7 @@ var http = __toESM(require("http"));
10822
10822
  // package.json
10823
10823
  var package_default = {
10824
10824
  name: "codeam-cli",
10825
- version: "2.75.43",
10825
+ version: "2.75.44",
10826
10826
  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.",
10827
10827
  type: "commonjs",
10828
10828
  main: "dist/index.js",
@@ -12156,7 +12156,7 @@ var CommandRelayService = class _CommandRelayService {
12156
12156
  // fresh + clear the "CLI update available" banner after a self-update
12157
12157
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
12158
12158
  // pair/reconnect). Older backends ignore the extra field.
12159
- ..."2.75.43" ? { ideVersion: "2.75.43" } : {}
12159
+ ..."2.75.44" ? { ideVersion: "2.75.44" } : {}
12160
12160
  };
12161
12161
  try {
12162
12162
  const res = await _postJson(`${API_BASE2}/api/plugin/heartbeat`, body);
@@ -48963,7 +48963,7 @@ async function autoUpgradeBeforeCriticalCommand() {
48963
48963
  if (process.env.NODE_ENV === "test") return;
48964
48964
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
48965
48965
  if (process.env.CI) return;
48966
- const current2 = true ? "2.75.43" : null;
48966
+ const current2 = true ? "2.75.44" : null;
48967
48967
  if (!current2) return;
48968
48968
  const cache = readCache();
48969
48969
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -48980,7 +48980,7 @@ function checkForUpdates() {
48980
48980
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
48981
48981
  if (process.env.CI) return;
48982
48982
  if (!process.stdout.isTTY) return;
48983
- const current2 = true ? "2.75.43" : null;
48983
+ const current2 = true ? "2.75.44" : null;
48984
48984
  if (!current2) return;
48985
48985
  const cache = readCache();
48986
48986
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -49003,7 +49003,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
49003
49003
  var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
49004
49004
  var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
49005
49005
  function currentCliVersion() {
49006
- return true ? "2.75.43" : null;
49006
+ return true ? "2.75.44" : null;
49007
49007
  }
49008
49008
  async function installedVersion(deps) {
49009
49009
  const ls = await deps.run(
@@ -49228,6 +49228,11 @@ function buildFleetBoxRunArgs(p2) {
49228
49228
  ...process.env.CODEAM_FLEET_BOX_IMAGE ? [] : ["--pull=always"],
49229
49229
  "--name",
49230
49230
  p2.containerName,
49231
+ // The box's host-agent is the container's pid 1 and its self-update restart
49232
+ // is an exit(0): without a restart policy that stopped the whole box until
49233
+ // the next wake. `docker stop` (the sleep sweep) still keeps it stopped.
49234
+ "--restart",
49235
+ "unless-stopped",
49231
49236
  "--cap-drop",
49232
49237
  "ALL",
49233
49238
  "--security-opt",
@@ -49345,8 +49350,31 @@ var defaultOnIdentityRejected = () => {
49345
49350
  };
49346
49351
  var ORPHAN_TERM_GRACE_MS = 3e3;
49347
49352
  var ORPHAN_KILL_SETTLE_MS = 500;
49353
+ function needsSelfRelaunch(env = process.env, pid = process.pid) {
49354
+ return !env.INVOCATION_ID && pid !== 1;
49355
+ }
49356
+ function relaunchArgv(execPath, argv) {
49357
+ return ["-c", 'sleep 2; exec "$0" "$@"', execPath, ...argv.slice(1)];
49358
+ }
49348
49359
  var defaultOnUpdated = (version3) => {
49349
- log.info("host-agent", `self-update: installed ${version3}, restarting`);
49360
+ const relaunch = needsSelfRelaunch();
49361
+ log.info(
49362
+ "host-agent",
49363
+ `self-update: installed ${version3}, restarting${relaunch ? " (self-relaunch, no supervisor)" : ""}`
49364
+ );
49365
+ if (relaunch) {
49366
+ try {
49367
+ (0, import_node_child_process30.spawn)("/bin/sh", relaunchArgv(process.execPath, process.argv), {
49368
+ cwd: process.cwd(),
49369
+ env: process.env,
49370
+ detached: true,
49371
+ stdio: "ignore"
49372
+ }).unref();
49373
+ } catch (err) {
49374
+ log.error("host-agent", "self-update: relaunch failed \u2014 staying on the old binary", err);
49375
+ return;
49376
+ }
49377
+ }
49350
49378
  process.exit(0);
49351
49379
  };
49352
49380
  var HostAgentSupervisor = class {
@@ -49959,6 +49987,7 @@ var HostAgentSupervisor = class {
49959
49987
  return;
49960
49988
  }
49961
49989
  log.info("host-agent", `fleet_start_box id=${payload.boxId} name=${containerName}`);
49990
+ await this.docker.run(["update", "--restart", "unless-stopped", containerName]);
49962
49991
  const res = await this.docker.run(["start", containerName]);
49963
49992
  if (res.code !== 0 && !isMissingContainerError(res.stderr)) {
49964
49993
  log.warn(
@@ -51021,7 +51050,7 @@ function checkChokidar() {
51021
51050
  }
51022
51051
  async function doctor(args2 = []) {
51023
51052
  const json = args2.includes("--json");
51024
- const cliVersion = true ? "2.75.43" : "0.0.0-dev";
51053
+ const cliVersion = true ? "2.75.44" : "0.0.0-dev";
51025
51054
  const apiBase2 = resolveApiBaseUrl();
51026
51055
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
51027
51056
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -51545,7 +51574,7 @@ async function mcpWarm(argv = [], opts = {}) {
51545
51574
  // src/commands/version.ts
51546
51575
  var import_picocolors15 = __toESM(require("picocolors"));
51547
51576
  function version2() {
51548
- const v = true ? "2.75.43" : "unknown";
51577
+ const v = true ? "2.75.44" : "unknown";
51549
51578
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
51550
51579
  }
51551
51580
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.75.43",
3
+ "version": "2.75.44",
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",