codeam-cli 2.60.29 → 2.60.31

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,16 @@ 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.60.29] — 2026-07-10
8
+
9
+ ### Added
10
+
11
+ - **shared:** Add CODERABBIT_* to USER_EVENTS (fix A↔B shared-drift)
12
+
13
+ ### Fixed
14
+
15
+ - **cli:** Route "Authentication required" to the re-auth bubble (kimi codespace)
16
+
7
17
  ## [2.60.28] — 2026-07-09
8
18
 
9
19
  ### Fixed
package/dist/index.js CHANGED
@@ -5689,7 +5689,7 @@ function readAnonId() {
5689
5689
  }
5690
5690
  function superProperties() {
5691
5691
  return {
5692
- cliVersion: true ? "2.60.29" : "0.0.0-dev",
5692
+ cliVersion: true ? "2.60.31" : "0.0.0-dev",
5693
5693
  nodeVersion: process.version,
5694
5694
  platform: process.platform,
5695
5695
  arch: process.arch,
@@ -5870,7 +5870,7 @@ var os4 = __toESM(require("os"));
5870
5870
  // package.json
5871
5871
  var package_default = {
5872
5872
  name: "codeam-cli",
5873
- version: "2.60.29",
5873
+ version: "2.60.31",
5874
5874
  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.",
5875
5875
  type: "commonjs",
5876
5876
  main: "dist/index.js",
@@ -6963,7 +6963,7 @@ var CommandRelayService = class {
6963
6963
  // fresh + clear the "CLI update available" banner after a self-update
6964
6964
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
6965
6965
  // pair/reconnect). Older backends ignore the extra field.
6966
- ..."2.60.29" ? { ideVersion: "2.60.29" } : {}
6966
+ ..."2.60.31" ? { ideVersion: "2.60.31" } : {}
6967
6967
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
6968
6968
  }
6969
6969
  /**
@@ -15655,7 +15655,7 @@ async function configureCoderabbit(input, deps = {}) {
15655
15655
  }
15656
15656
 
15657
15657
  // src/commands/host-agent.ts
15658
- var import_node_child_process23 = require("child_process");
15658
+ var import_node_child_process22 = require("child_process");
15659
15659
  var os35 = __toESM(require("os"));
15660
15660
  var fs41 = __toESM(require("fs"));
15661
15661
  var path44 = __toESM(require("path"));
@@ -16074,7 +16074,6 @@ async function prepareWorkspace(repoOrPath, deployId, cloneToken) {
16074
16074
  var fs35 = __toESM(require("fs"));
16075
16075
  var os31 = __toESM(require("os"));
16076
16076
  var path39 = __toESM(require("path"));
16077
- var import_node_child_process17 = require("child_process");
16078
16077
  var PUBLIC_TO_INTERNAL_AGENT = {
16079
16078
  claude_code: "claude",
16080
16079
  claude: "claude",
@@ -16188,24 +16187,9 @@ var kimiProvisioner = {
16188
16187
  return { KIMI_API_KEY: auth.value };
16189
16188
  }
16190
16189
  credentialsFiles.forEach((f) => writeFile0600(f, auth.value));
16191
- provisionKimiConfig(home);
16192
16190
  return {};
16193
16191
  }
16194
16192
  };
16195
- function provisionKimiConfig(home) {
16196
- try {
16197
- const osStrat = createOsStrategy();
16198
- const binary = osStrat.findInPath("kimi");
16199
- if (!binary) return;
16200
- const launch = osStrat.buildLaunch(binary, ["login"]);
16201
- (0, import_node_child_process17.spawnSync)(launch.cmd, launch.args, {
16202
- stdio: "ignore",
16203
- timeout: 6e4,
16204
- env: { ...process.env, HOME: home, USERPROFILE: home }
16205
- });
16206
- } catch {
16207
- }
16208
- }
16209
16193
  var coderabbitProvisioner = {
16210
16194
  write(auth, home) {
16211
16195
  const dir = path39.join(home, ".coderabbit");
@@ -16256,7 +16240,7 @@ function provisionAgentCredentials(publicAgentId, auth, homeDir2 = os31.homedir(
16256
16240
  }
16257
16241
 
16258
16242
  // src/commands/host/git-tooling.ts
16259
- var import_node_child_process18 = require("child_process");
16243
+ var import_node_child_process17 = require("child_process");
16260
16244
  var fs36 = __toESM(require("fs"));
16261
16245
  var os32 = __toESM(require("os"));
16262
16246
  var path40 = __toESM(require("path"));
@@ -16370,7 +16354,7 @@ var defaultGitToolingRunner = {
16370
16354
  which(cmd) {
16371
16355
  try {
16372
16356
  const probe = process.platform === "win32" ? "where" : "which";
16373
- (0, import_node_child_process18.execFileSync)(probe, [cmd], { stdio: "ignore" });
16357
+ (0, import_node_child_process17.execFileSync)(probe, [cmd], { stdio: "ignore" });
16374
16358
  return true;
16375
16359
  } catch {
16376
16360
  return false;
@@ -16378,7 +16362,7 @@ var defaultGitToolingRunner = {
16378
16362
  },
16379
16363
  run(cmd, args2, opts = {}) {
16380
16364
  return new Promise((resolve7) => {
16381
- const child = (0, import_node_child_process18.spawn)(cmd, args2, {
16365
+ const child = (0, import_node_child_process17.spawn)(cmd, args2, {
16382
16366
  stdio: [opts.input !== void 0 ? "pipe" : "ignore", "ignore", "pipe"]
16383
16367
  });
16384
16368
  let stderr = "";
@@ -16532,12 +16516,12 @@ var HeadroomStatsReporter = class {
16532
16516
  };
16533
16517
 
16534
16518
  // src/commands/host/os-packages.ts
16535
- var import_node_child_process19 = require("child_process");
16519
+ var import_node_child_process18 = require("child_process");
16536
16520
  var PM_INSTALL_TIMEOUT_MS = 18e4;
16537
16521
  var defaultHeadroomRunner = {
16538
16522
  which(cmd) {
16539
16523
  try {
16540
- (0, import_node_child_process19.execFileSync)("which", [cmd], { stdio: "ignore" });
16524
+ (0, import_node_child_process18.execFileSync)("which", [cmd], { stdio: "ignore" });
16541
16525
  return true;
16542
16526
  } catch {
16543
16527
  return false;
@@ -16546,7 +16530,7 @@ var defaultHeadroomRunner = {
16546
16530
  run(cmd, args2, opts = {}) {
16547
16531
  return new Promise((resolve7) => {
16548
16532
  const spawnEnv = opts.env ?? process.env;
16549
- const child = (0, import_node_child_process19.spawn)(cmd, args2, { stdio: ["ignore", "pipe", "pipe"], env: spawnEnv });
16533
+ const child = (0, import_node_child_process18.spawn)(cmd, args2, { stdio: ["ignore", "pipe", "pipe"], env: spawnEnv });
16550
16534
  let stderrBuf = "";
16551
16535
  let stdoutBuf = "";
16552
16536
  let settled = false;
@@ -17053,14 +17037,14 @@ async function setupHeadroomForSelfHosted(agent, runner = defaultHeadroomRunner,
17053
17037
  }
17054
17038
 
17055
17039
  // src/commands/host/self-update.ts
17056
- var import_node_child_process21 = require("child_process");
17040
+ var import_node_child_process20 = require("child_process");
17057
17041
 
17058
17042
  // src/lib/updateNotifier.ts
17059
17043
  var fs39 = __toESM(require("fs"));
17060
17044
  var os34 = __toESM(require("os"));
17061
17045
  var path43 = __toESM(require("path"));
17062
17046
  var https6 = __toESM(require("https"));
17063
- var import_node_child_process20 = require("child_process");
17047
+ var import_node_child_process19 = require("child_process");
17064
17048
  var import_picocolors3 = __toESM(require("picocolors"));
17065
17049
  var PKG_NAME = "codeam-cli";
17066
17050
  var REGISTRY_URL = `https://registry.npmjs.org/${PKG_NAME}/latest`;
@@ -17154,7 +17138,7 @@ function notifyIfStale(currentVersion, latest) {
17154
17138
  }
17155
17139
  function isLinkedInstall() {
17156
17140
  try {
17157
- const root = (0, import_node_child_process20.execSync)("npm root -g", {
17141
+ const root = (0, import_node_child_process19.execSync)("npm root -g", {
17158
17142
  encoding: "utf8",
17159
17143
  stdio: ["ignore", "pipe", "ignore"],
17160
17144
  timeout: 2e3
@@ -17182,7 +17166,7 @@ function maybeAutoUpdate(currentVersion, latest) {
17182
17166
 
17183
17167
  `
17184
17168
  );
17185
- const install = (0, import_node_child_process20.spawnSync)("npm", ["install", "-g", `${PKG_NAME}@latest`], {
17169
+ const install = (0, import_node_child_process19.spawnSync)("npm", ["install", "-g", `${PKG_NAME}@latest`], {
17186
17170
  stdio: "inherit",
17187
17171
  env: process.env
17188
17172
  });
@@ -17203,7 +17187,7 @@ function maybeAutoUpdate(currentVersion, latest) {
17203
17187
  process.stderr.write(` ${import_picocolors3.default.green("\u2713")} Updated. Resuming session...
17204
17188
 
17205
17189
  `);
17206
- const child = (0, import_node_child_process20.spawnSync)("codeam", process.argv.slice(2), {
17190
+ const child = (0, import_node_child_process19.spawnSync)("codeam", process.argv.slice(2), {
17207
17191
  stdio: "inherit",
17208
17192
  env: process.env
17209
17193
  });
@@ -17213,7 +17197,7 @@ async function autoUpgradeBeforeCriticalCommand() {
17213
17197
  if (process.env.NODE_ENV === "test") return;
17214
17198
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17215
17199
  if (process.env.CI) return;
17216
- const current = true ? "2.60.29" : null;
17200
+ const current = true ? "2.60.31" : null;
17217
17201
  if (!current) return;
17218
17202
  const cache = readCache();
17219
17203
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17230,7 +17214,7 @@ function checkForUpdates() {
17230
17214
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17231
17215
  if (process.env.CI) return;
17232
17216
  if (!process.stdout.isTTY) return;
17233
- const current = true ? "2.60.29" : null;
17217
+ const current = true ? "2.60.31" : null;
17234
17218
  if (!current) return;
17235
17219
  const cache = readCache();
17236
17220
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17250,11 +17234,11 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
17250
17234
  var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
17251
17235
  var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
17252
17236
  function currentCliVersion() {
17253
- return true ? "2.60.29" : null;
17237
+ return true ? "2.60.31" : null;
17254
17238
  }
17255
17239
  function runCmd(cmd, args2, timeoutMs) {
17256
17240
  return new Promise((resolve7) => {
17257
- (0, import_node_child_process21.execFile)(cmd, args2, { timeout: timeoutMs }, (err, stdout, stderr) => {
17241
+ (0, import_node_child_process20.execFile)(cmd, args2, { timeout: timeoutMs }, (err, stdout, stderr) => {
17258
17242
  const code = err && typeof err.code === "number" ? err.code : err ? null : 0;
17259
17243
  resolve7({ code, stdout: stdout ?? "", stderr: stderr ?? "" });
17260
17244
  });
@@ -17316,11 +17300,11 @@ async function runSelfUpdate() {
17316
17300
  }
17317
17301
 
17318
17302
  // src/commands/host/teardown.ts
17319
- var import_node_child_process22 = require("child_process");
17303
+ var import_node_child_process21 = require("child_process");
17320
17304
  var fs40 = __toESM(require("fs"));
17321
17305
  var defaultDisableService = () => {
17322
17306
  try {
17323
- (0, import_node_child_process22.execFileSync)("systemctl", ["disable", "--now", "codeam-host-agent"], { stdio: "ignore" });
17307
+ (0, import_node_child_process21.execFileSync)("systemctl", ["disable", "--now", "codeam-host-agent"], { stdio: "ignore" });
17324
17308
  } catch {
17325
17309
  }
17326
17310
  };
@@ -17328,7 +17312,7 @@ var defaultTeardownHeadroom = () => {
17328
17312
  try {
17329
17313
  const kind = JSON.parse(fs40.readFileSync(headroomConfigPath(), "utf8")).agent;
17330
17314
  if (kind) {
17331
- (0, import_node_child_process22.execFileSync)("headroom", ["unwrap", kind], { stdio: "ignore", timeout: 15e3 });
17315
+ (0, import_node_child_process21.execFileSync)("headroom", ["unwrap", kind], { stdio: "ignore", timeout: 15e3 });
17332
17316
  }
17333
17317
  } catch {
17334
17318
  }
@@ -17486,7 +17470,7 @@ var CONTROL_AGENT_META = {
17486
17470
  headroomWrappable: false,
17487
17471
  acp: false
17488
17472
  };
17489
- var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process23.spawn)(process.execPath, [process.argv[1], "pair-auto", ...args2], {
17473
+ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process22.spawn)(process.execPath, [process.argv[1], "pair-auto", ...args2], {
17490
17474
  cwd,
17491
17475
  env: { ...process.env, ...env },
17492
17476
  stdio: ["ignore", "pipe", "pipe"],
@@ -17966,7 +17950,7 @@ var HostAgentSupervisor = class {
17966
17950
  runAgentInstall(script) {
17967
17951
  return new Promise((resolve7) => {
17968
17952
  const home = process.env.HOME || os35.homedir();
17969
- const child = (0, import_node_child_process23.spawn)("sh", ["-c", script], {
17953
+ const child = (0, import_node_child_process22.spawn)("sh", ["-c", script], {
17970
17954
  env: { ...process.env, HOME: home },
17971
17955
  stdio: ["ignore", "pipe", "pipe"]
17972
17956
  });
@@ -18274,11 +18258,11 @@ function makeRealApplyBudgetDeps() {
18274
18258
  var import_child_process14 = require("child_process");
18275
18259
  var import_fs = require("fs");
18276
18260
  var import_promises = __toESM(require("fs/promises"));
18277
- var import_os9 = __toESM(require("os"));
18261
+ var import_os8 = __toESM(require("os"));
18278
18262
  var import_path4 = __toESM(require("path"));
18279
18263
  var import_promises2 = require("stream/promises");
18280
18264
  var import_which = __toESM(require("which"));
18281
- var CACHED_BINARY = import_path4.default.join(import_os9.default.homedir(), ".codeam", "bin", "cloudflared");
18265
+ var CACHED_BINARY = import_path4.default.join(import_os8.default.homedir(), ".codeam", "bin", "cloudflared");
18282
18266
  async function resolveCloudflared(opts = {}) {
18283
18267
  try {
18284
18268
  return await (0, import_which.default)("cloudflared");
@@ -18378,7 +18362,7 @@ function decodeTunnelToken(token) {
18378
18362
  }
18379
18363
  async function spawnNamedTunnel(bin, token, port) {
18380
18364
  const creds = decodeTunnelToken(token);
18381
- const credDir = import_path4.default.join(import_os9.default.homedir(), ".codeam");
18365
+ const credDir = import_path4.default.join(import_os8.default.homedir(), ".codeam");
18382
18366
  await import_promises.default.mkdir(credDir, { recursive: true });
18383
18367
  const credFile = import_path4.default.join(credDir, `tunnel-${creds.TunnelID}.json`);
18384
18368
  await import_promises.default.writeFile(credFile, JSON.stringify(creds), { mode: 384 });
@@ -22432,7 +22416,7 @@ async function pairAuto(args2) {
22432
22416
  }
22433
22417
 
22434
22418
  // src/services/headroom/wrap-launch.ts
22435
- var import_node_child_process24 = require("child_process");
22419
+ var import_node_child_process23 = require("child_process");
22436
22420
  function wrapWithHeadroom(launch, opts) {
22437
22421
  if (!opts.enabled || !opts.headroomPresent) return launch;
22438
22422
  return {
@@ -22445,7 +22429,7 @@ var _present;
22445
22429
  function headroomPresent() {
22446
22430
  if (_present !== void 0) return Promise.resolve(_present);
22447
22431
  return new Promise((resolve7) => {
22448
- (0, import_node_child_process24.execFile)("headroom", ["--version"], (err) => {
22432
+ (0, import_node_child_process23.execFile)("headroom", ["--version"], (err) => {
22449
22433
  _present = !err;
22450
22434
  resolve7(_present);
22451
22435
  });
@@ -22799,7 +22783,7 @@ var path60 = __toESM(require("path"));
22799
22783
 
22800
22784
  // src/agents/acp/agent-binary.ts
22801
22785
  var import_fs4 = __toESM(require("fs"));
22802
- var import_os11 = __toESM(require("os"));
22786
+ var import_os10 = __toESM(require("os"));
22803
22787
  var import_path8 = __toESM(require("path"));
22804
22788
  var import_child_process25 = require("child_process");
22805
22789
  function currentPlatformKey() {
@@ -22895,7 +22879,7 @@ function resolveCursorAgentBinary(deps = {}) {
22895
22879
  const exe = import_path8.default.win32.join(localAppData, "cursor-agent", "cursor-agent.exe");
22896
22880
  return existsSync26(exe) ? exe : null;
22897
22881
  }
22898
- const home = deps.homedir ?? import_os11.default.homedir();
22882
+ const home = deps.homedir ?? import_os10.default.homedir();
22899
22883
  const unix = import_path8.default.posix.join(home, ".local", "bin", "cursor-agent");
22900
22884
  return existsSync26(unix) ? unix : null;
22901
22885
  }
@@ -22969,7 +22953,7 @@ async function waitForAdapterModuleGraph(command2, args2, opts = {}) {
22969
22953
  }
22970
22954
 
22971
22955
  // src/agents/kimi/installer.ts
22972
- var import_node_child_process25 = require("child_process");
22956
+ var import_node_child_process24 = require("child_process");
22973
22957
  var import_node_os6 = require("os");
22974
22958
  var import_node_path6 = require("path");
22975
22959
  var INSTALL_URL2 = "https://code.kimi.com/kimi-code/install.sh";
@@ -22977,7 +22961,7 @@ function kimiBinDir() {
22977
22961
  return (0, import_node_path6.join)(process.env.KIMI_CODE_HOME || (0, import_node_path6.join)((0, import_node_os6.homedir)(), ".kimi-code"), "bin");
22978
22962
  }
22979
22963
  function kimiRuns() {
22980
- const r = (0, import_node_child_process25.spawnSync)("kimi", ["--version"], { stdio: "ignore", timeout: 15e3 });
22964
+ const r = (0, import_node_child_process24.spawnSync)("kimi", ["--version"], { stdio: "ignore", timeout: 15e3 });
22981
22965
  return !r.error && r.status === 0;
22982
22966
  }
22983
22967
  function augmentPath2() {
@@ -22987,7 +22971,7 @@ function augmentPath2() {
22987
22971
  }
22988
22972
  async function runInstaller2() {
22989
22973
  return new Promise((resolve7) => {
22990
- const proc = (0, import_node_child_process25.spawn)("sh", ["-c", `curl -fsSL ${INSTALL_URL2} | bash`], { stdio: "inherit" });
22974
+ const proc = (0, import_node_child_process24.spawn)("sh", ["-c", `curl -fsSL ${INSTALL_URL2} | bash`], { stdio: "inherit" });
22991
22975
  proc.on("close", (code) => resolve7(code === 0));
22992
22976
  proc.on("error", () => resolve7(false));
22993
22977
  });
@@ -23724,7 +23708,7 @@ var HistoryService = class _HistoryService {
23724
23708
  };
23725
23709
 
23726
23710
  // src/agents/acp/client.ts
23727
- var import_node_child_process26 = require("child_process");
23711
+ var import_node_child_process25 = require("child_process");
23728
23712
  var fs57 = __toESM(require("fs/promises"));
23729
23713
  var fsSync = __toESM(require("fs"));
23730
23714
  var os46 = __toESM(require("os"));
@@ -26328,7 +26312,7 @@ var AcpClient = class {
26328
26312
  "acpClient",
26329
26313
  `spawn cmd=${adapter.command} args=[${adapter.args.join(",")}] cwd=${cwd}`
26330
26314
  );
26331
- const child = (0, import_node_child_process26.spawn)(adapter.command, adapter.args, {
26315
+ const child = (0, import_node_child_process25.spawn)(adapter.command, adapter.args, {
26332
26316
  cwd,
26333
26317
  // extraEnv (e.g. CLAUDE_CODE_DISABLE_1M_CONTEXT=1 on an on-demand
26334
26318
  // re-spawn) layers over process.env; PATH stays last so the augmented
@@ -27712,7 +27696,7 @@ async function discoverRepos(workingDir, maxDepth = 4) {
27712
27696
  // src/services/turn-files/files-outbox.ts
27713
27697
  var fs60 = __toESM(require("fs/promises"));
27714
27698
  var path65 = __toESM(require("path"));
27715
- var import_os12 = require("os");
27699
+ var import_os11 = require("os");
27716
27700
  var HOME_OUTBOX_DIR = ".codeam/outbox";
27717
27701
  var MAX_AGE_MS = 24 * 60 * 60 * 1e3;
27718
27702
  var BACKOFF_STEPS_MS = [
@@ -27879,7 +27863,7 @@ function applyJitter(ms) {
27879
27863
  return Math.round(ms * factor);
27880
27864
  }
27881
27865
  function homeDir() {
27882
- return process.env.HOME ?? process.env.USERPROFILE ?? (0, import_os12.tmpdir)();
27866
+ return process.env.HOME ?? process.env.USERPROFILE ?? (0, import_os11.tmpdir)();
27883
27867
  }
27884
27868
 
27885
27869
  // src/services/turn-files/turn-file-aggregator.ts
@@ -34203,7 +34187,7 @@ function checkChokidar() {
34203
34187
  }
34204
34188
  async function doctor(args2 = []) {
34205
34189
  const json = args2.includes("--json");
34206
- const cliVersion = true ? "2.60.29" : "0.0.0-dev";
34190
+ const cliVersion = true ? "2.60.31" : "0.0.0-dev";
34207
34191
  const apiBase2 = resolveApiBaseUrl();
34208
34192
  const diagnosticId = (0, import_node_crypto12.randomUUID)();
34209
34193
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -34402,7 +34386,7 @@ async function completion(args2) {
34402
34386
  // src/commands/version.ts
34403
34387
  var import_picocolors15 = __toESM(require("picocolors"));
34404
34388
  function version2() {
34405
- const v = true ? "2.60.29" : "unknown";
34389
+ const v = true ? "2.60.31" : "unknown";
34406
34390
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
34407
34391
  }
34408
34392
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.60.29",
3
+ "version": "2.60.31",
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",