codeam-cli 2.60.24 → 2.60.25

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.
Files changed (2) hide show
  1. package/dist/index.js +56 -40
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5680,7 +5680,7 @@ function readAnonId() {
5680
5680
  }
5681
5681
  function superProperties() {
5682
5682
  return {
5683
- cliVersion: true ? "2.60.24" : "0.0.0-dev",
5683
+ cliVersion: true ? "2.60.25" : "0.0.0-dev",
5684
5684
  nodeVersion: process.version,
5685
5685
  platform: process.platform,
5686
5686
  arch: process.arch,
@@ -5861,7 +5861,7 @@ var os4 = __toESM(require("os"));
5861
5861
  // package.json
5862
5862
  var package_default = {
5863
5863
  name: "codeam-cli",
5864
- version: "2.60.24",
5864
+ version: "2.60.25",
5865
5865
  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.",
5866
5866
  type: "commonjs",
5867
5867
  main: "dist/index.js",
@@ -6954,7 +6954,7 @@ var CommandRelayService = class {
6954
6954
  // fresh + clear the "CLI update available" banner after a self-update
6955
6955
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
6956
6956
  // pair/reconnect). Older backends ignore the extra field.
6957
- ..."2.60.24" ? { ideVersion: "2.60.24" } : {}
6957
+ ..."2.60.25" ? { ideVersion: "2.60.25" } : {}
6958
6958
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
6959
6959
  }
6960
6960
  /**
@@ -15637,7 +15637,7 @@ async function configureCoderabbit(input, deps = {}) {
15637
15637
  }
15638
15638
 
15639
15639
  // src/commands/host-agent.ts
15640
- var import_node_child_process22 = require("child_process");
15640
+ var import_node_child_process23 = require("child_process");
15641
15641
  var os35 = __toESM(require("os"));
15642
15642
  var fs41 = __toESM(require("fs"));
15643
15643
  var path43 = __toESM(require("path"));
@@ -16056,6 +16056,7 @@ async function prepareWorkspace(repoOrPath, deployId, cloneToken) {
16056
16056
  var fs35 = __toESM(require("fs"));
16057
16057
  var os31 = __toESM(require("os"));
16058
16058
  var path38 = __toESM(require("path"));
16059
+ var import_node_child_process17 = require("child_process");
16059
16060
  var PUBLIC_TO_INTERNAL_AGENT = {
16060
16061
  claude_code: "claude",
16061
16062
  claude: "claude",
@@ -16169,9 +16170,24 @@ var kimiProvisioner = {
16169
16170
  return { KIMI_API_KEY: auth.value };
16170
16171
  }
16171
16172
  credentialsFiles.forEach((f) => writeFile0600(f, auth.value));
16173
+ provisionKimiConfig(home);
16172
16174
  return {};
16173
16175
  }
16174
16176
  };
16177
+ function provisionKimiConfig(home) {
16178
+ try {
16179
+ const osStrat = createOsStrategy();
16180
+ const binary = osStrat.findInPath("kimi");
16181
+ if (!binary) return;
16182
+ const launch = osStrat.buildLaunch(binary, ["login"]);
16183
+ (0, import_node_child_process17.spawnSync)(launch.cmd, launch.args, {
16184
+ stdio: "ignore",
16185
+ timeout: 6e4,
16186
+ env: { ...process.env, HOME: home, USERPROFILE: home }
16187
+ });
16188
+ } catch {
16189
+ }
16190
+ }
16175
16191
  var coderabbitProvisioner = {
16176
16192
  write(auth, home) {
16177
16193
  const dir = path38.join(home, ".coderabbit");
@@ -16222,7 +16238,7 @@ function provisionAgentCredentials(publicAgentId, auth, homeDir2 = os31.homedir(
16222
16238
  }
16223
16239
 
16224
16240
  // src/commands/host/git-tooling.ts
16225
- var import_node_child_process17 = require("child_process");
16241
+ var import_node_child_process18 = require("child_process");
16226
16242
  var fs36 = __toESM(require("fs"));
16227
16243
  var os32 = __toESM(require("os"));
16228
16244
  var path39 = __toESM(require("path"));
@@ -16336,7 +16352,7 @@ var defaultGitToolingRunner = {
16336
16352
  which(cmd) {
16337
16353
  try {
16338
16354
  const probe = process.platform === "win32" ? "where" : "which";
16339
- (0, import_node_child_process17.execFileSync)(probe, [cmd], { stdio: "ignore" });
16355
+ (0, import_node_child_process18.execFileSync)(probe, [cmd], { stdio: "ignore" });
16340
16356
  return true;
16341
16357
  } catch {
16342
16358
  return false;
@@ -16344,7 +16360,7 @@ var defaultGitToolingRunner = {
16344
16360
  },
16345
16361
  run(cmd, args2, opts = {}) {
16346
16362
  return new Promise((resolve7) => {
16347
- const child = (0, import_node_child_process17.spawn)(cmd, args2, {
16363
+ const child = (0, import_node_child_process18.spawn)(cmd, args2, {
16348
16364
  stdio: [opts.input !== void 0 ? "pipe" : "ignore", "ignore", "pipe"]
16349
16365
  });
16350
16366
  let stderr = "";
@@ -16498,12 +16514,12 @@ var HeadroomStatsReporter = class {
16498
16514
  };
16499
16515
 
16500
16516
  // src/commands/host/os-packages.ts
16501
- var import_node_child_process18 = require("child_process");
16517
+ var import_node_child_process19 = require("child_process");
16502
16518
  var PM_INSTALL_TIMEOUT_MS = 18e4;
16503
16519
  var defaultHeadroomRunner = {
16504
16520
  which(cmd) {
16505
16521
  try {
16506
- (0, import_node_child_process18.execFileSync)("which", [cmd], { stdio: "ignore" });
16522
+ (0, import_node_child_process19.execFileSync)("which", [cmd], { stdio: "ignore" });
16507
16523
  return true;
16508
16524
  } catch {
16509
16525
  return false;
@@ -16512,7 +16528,7 @@ var defaultHeadroomRunner = {
16512
16528
  run(cmd, args2, opts = {}) {
16513
16529
  return new Promise((resolve7) => {
16514
16530
  const spawnEnv = opts.env ?? process.env;
16515
- const child = (0, import_node_child_process18.spawn)(cmd, args2, { stdio: ["ignore", "pipe", "pipe"], env: spawnEnv });
16531
+ const child = (0, import_node_child_process19.spawn)(cmd, args2, { stdio: ["ignore", "pipe", "pipe"], env: spawnEnv });
16516
16532
  let stderrBuf = "";
16517
16533
  let stdoutBuf = "";
16518
16534
  let settled = false;
@@ -17019,14 +17035,14 @@ async function setupHeadroomForSelfHosted(agent, runner = defaultHeadroomRunner,
17019
17035
  }
17020
17036
 
17021
17037
  // src/commands/host/self-update.ts
17022
- var import_node_child_process20 = require("child_process");
17038
+ var import_node_child_process21 = require("child_process");
17023
17039
 
17024
17040
  // src/lib/updateNotifier.ts
17025
17041
  var fs39 = __toESM(require("fs"));
17026
17042
  var os34 = __toESM(require("os"));
17027
17043
  var path42 = __toESM(require("path"));
17028
17044
  var https6 = __toESM(require("https"));
17029
- var import_node_child_process19 = require("child_process");
17045
+ var import_node_child_process20 = require("child_process");
17030
17046
  var import_picocolors3 = __toESM(require("picocolors"));
17031
17047
  var PKG_NAME = "codeam-cli";
17032
17048
  var REGISTRY_URL = `https://registry.npmjs.org/${PKG_NAME}/latest`;
@@ -17120,7 +17136,7 @@ function notifyIfStale(currentVersion, latest) {
17120
17136
  }
17121
17137
  function isLinkedInstall() {
17122
17138
  try {
17123
- const root = (0, import_node_child_process19.execSync)("npm root -g", {
17139
+ const root = (0, import_node_child_process20.execSync)("npm root -g", {
17124
17140
  encoding: "utf8",
17125
17141
  stdio: ["ignore", "pipe", "ignore"],
17126
17142
  timeout: 2e3
@@ -17148,7 +17164,7 @@ function maybeAutoUpdate(currentVersion, latest) {
17148
17164
 
17149
17165
  `
17150
17166
  );
17151
- const install = (0, import_node_child_process19.spawnSync)("npm", ["install", "-g", `${PKG_NAME}@latest`], {
17167
+ const install = (0, import_node_child_process20.spawnSync)("npm", ["install", "-g", `${PKG_NAME}@latest`], {
17152
17168
  stdio: "inherit",
17153
17169
  env: process.env
17154
17170
  });
@@ -17169,7 +17185,7 @@ function maybeAutoUpdate(currentVersion, latest) {
17169
17185
  process.stderr.write(` ${import_picocolors3.default.green("\u2713")} Updated. Resuming session...
17170
17186
 
17171
17187
  `);
17172
- const child = (0, import_node_child_process19.spawnSync)("codeam", process.argv.slice(2), {
17188
+ const child = (0, import_node_child_process20.spawnSync)("codeam", process.argv.slice(2), {
17173
17189
  stdio: "inherit",
17174
17190
  env: process.env
17175
17191
  });
@@ -17179,7 +17195,7 @@ async function autoUpgradeBeforeCriticalCommand() {
17179
17195
  if (process.env.NODE_ENV === "test") return;
17180
17196
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17181
17197
  if (process.env.CI) return;
17182
- const current = true ? "2.60.24" : null;
17198
+ const current = true ? "2.60.25" : null;
17183
17199
  if (!current) return;
17184
17200
  const cache = readCache();
17185
17201
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17196,7 +17212,7 @@ function checkForUpdates() {
17196
17212
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17197
17213
  if (process.env.CI) return;
17198
17214
  if (!process.stdout.isTTY) return;
17199
- const current = true ? "2.60.24" : null;
17215
+ const current = true ? "2.60.25" : null;
17200
17216
  if (!current) return;
17201
17217
  const cache = readCache();
17202
17218
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17216,11 +17232,11 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
17216
17232
  var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
17217
17233
  var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
17218
17234
  function currentCliVersion() {
17219
- return true ? "2.60.24" : null;
17235
+ return true ? "2.60.25" : null;
17220
17236
  }
17221
17237
  function runCmd(cmd, args2, timeoutMs) {
17222
17238
  return new Promise((resolve7) => {
17223
- (0, import_node_child_process20.execFile)(cmd, args2, { timeout: timeoutMs }, (err, stdout, stderr) => {
17239
+ (0, import_node_child_process21.execFile)(cmd, args2, { timeout: timeoutMs }, (err, stdout, stderr) => {
17224
17240
  const code = err && typeof err.code === "number" ? err.code : err ? null : 0;
17225
17241
  resolve7({ code, stdout: stdout ?? "", stderr: stderr ?? "" });
17226
17242
  });
@@ -17282,11 +17298,11 @@ async function runSelfUpdate() {
17282
17298
  }
17283
17299
 
17284
17300
  // src/commands/host/teardown.ts
17285
- var import_node_child_process21 = require("child_process");
17301
+ var import_node_child_process22 = require("child_process");
17286
17302
  var fs40 = __toESM(require("fs"));
17287
17303
  var defaultDisableService = () => {
17288
17304
  try {
17289
- (0, import_node_child_process21.execFileSync)("systemctl", ["disable", "--now", "codeam-host-agent"], { stdio: "ignore" });
17305
+ (0, import_node_child_process22.execFileSync)("systemctl", ["disable", "--now", "codeam-host-agent"], { stdio: "ignore" });
17290
17306
  } catch {
17291
17307
  }
17292
17308
  };
@@ -17294,7 +17310,7 @@ var defaultTeardownHeadroom = () => {
17294
17310
  try {
17295
17311
  const kind = JSON.parse(fs40.readFileSync(headroomConfigPath(), "utf8")).agent;
17296
17312
  if (kind) {
17297
- (0, import_node_child_process21.execFileSync)("headroom", ["unwrap", kind], { stdio: "ignore", timeout: 15e3 });
17313
+ (0, import_node_child_process22.execFileSync)("headroom", ["unwrap", kind], { stdio: "ignore", timeout: 15e3 });
17298
17314
  }
17299
17315
  } catch {
17300
17316
  }
@@ -17452,7 +17468,7 @@ var CONTROL_AGENT_META = {
17452
17468
  headroomWrappable: false,
17453
17469
  acp: false
17454
17470
  };
17455
- var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process22.spawn)(process.execPath, [process.argv[1], "pair-auto", ...args2], {
17471
+ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process23.spawn)(process.execPath, [process.argv[1], "pair-auto", ...args2], {
17456
17472
  cwd,
17457
17473
  env: { ...process.env, ...env },
17458
17474
  stdio: ["ignore", "pipe", "pipe"],
@@ -17932,7 +17948,7 @@ var HostAgentSupervisor = class {
17932
17948
  runAgentInstall(script) {
17933
17949
  return new Promise((resolve7) => {
17934
17950
  const home = process.env.HOME || os35.homedir();
17935
- const child = (0, import_node_child_process22.spawn)("sh", ["-c", script], {
17951
+ const child = (0, import_node_child_process23.spawn)("sh", ["-c", script], {
17936
17952
  env: { ...process.env, HOME: home },
17937
17953
  stdio: ["ignore", "pipe", "pipe"]
17938
17954
  });
@@ -18240,11 +18256,11 @@ function makeRealApplyBudgetDeps() {
18240
18256
  var import_child_process14 = require("child_process");
18241
18257
  var import_fs = require("fs");
18242
18258
  var import_promises = __toESM(require("fs/promises"));
18243
- var import_os8 = __toESM(require("os"));
18259
+ var import_os9 = __toESM(require("os"));
18244
18260
  var import_path4 = __toESM(require("path"));
18245
18261
  var import_promises2 = require("stream/promises");
18246
18262
  var import_which = __toESM(require("which"));
18247
- var CACHED_BINARY = import_path4.default.join(import_os8.default.homedir(), ".codeam", "bin", "cloudflared");
18263
+ var CACHED_BINARY = import_path4.default.join(import_os9.default.homedir(), ".codeam", "bin", "cloudflared");
18248
18264
  async function resolveCloudflared(opts = {}) {
18249
18265
  try {
18250
18266
  return await (0, import_which.default)("cloudflared");
@@ -18344,7 +18360,7 @@ function decodeTunnelToken(token) {
18344
18360
  }
18345
18361
  async function spawnNamedTunnel(bin, token, port) {
18346
18362
  const creds = decodeTunnelToken(token);
18347
- const credDir = import_path4.default.join(import_os8.default.homedir(), ".codeam");
18363
+ const credDir = import_path4.default.join(import_os9.default.homedir(), ".codeam");
18348
18364
  await import_promises.default.mkdir(credDir, { recursive: true });
18349
18365
  const credFile = import_path4.default.join(credDir, `tunnel-${creds.TunnelID}.json`);
18350
18366
  await import_promises.default.writeFile(credFile, JSON.stringify(creds), { mode: 384 });
@@ -22396,7 +22412,7 @@ async function pairAuto(args2) {
22396
22412
  }
22397
22413
 
22398
22414
  // src/services/headroom/wrap-launch.ts
22399
- var import_node_child_process23 = require("child_process");
22415
+ var import_node_child_process24 = require("child_process");
22400
22416
  function wrapWithHeadroom(launch, opts) {
22401
22417
  if (!opts.enabled || !opts.headroomPresent) return launch;
22402
22418
  return {
@@ -22409,7 +22425,7 @@ var _present;
22409
22425
  function headroomPresent() {
22410
22426
  if (_present !== void 0) return Promise.resolve(_present);
22411
22427
  return new Promise((resolve7) => {
22412
- (0, import_node_child_process23.execFile)("headroom", ["--version"], (err) => {
22428
+ (0, import_node_child_process24.execFile)("headroom", ["--version"], (err) => {
22413
22429
  _present = !err;
22414
22430
  resolve7(_present);
22415
22431
  });
@@ -22763,7 +22779,7 @@ var path59 = __toESM(require("path"));
22763
22779
 
22764
22780
  // src/agents/acp/agent-binary.ts
22765
22781
  var import_fs4 = __toESM(require("fs"));
22766
- var import_os10 = __toESM(require("os"));
22782
+ var import_os11 = __toESM(require("os"));
22767
22783
  var import_path8 = __toESM(require("path"));
22768
22784
  var import_child_process25 = require("child_process");
22769
22785
  function currentPlatformKey() {
@@ -22859,7 +22875,7 @@ function resolveCursorAgentBinary(deps = {}) {
22859
22875
  const exe = import_path8.default.win32.join(localAppData, "cursor-agent", "cursor-agent.exe");
22860
22876
  return existsSync26(exe) ? exe : null;
22861
22877
  }
22862
- const home = deps.homedir ?? import_os10.default.homedir();
22878
+ const home = deps.homedir ?? import_os11.default.homedir();
22863
22879
  const unix = import_path8.default.posix.join(home, ".local", "bin", "cursor-agent");
22864
22880
  return existsSync26(unix) ? unix : null;
22865
22881
  }
@@ -22933,7 +22949,7 @@ async function waitForAdapterModuleGraph(command2, args2, opts = {}) {
22933
22949
  }
22934
22950
 
22935
22951
  // src/agents/kimi/installer.ts
22936
- var import_node_child_process24 = require("child_process");
22952
+ var import_node_child_process25 = require("child_process");
22937
22953
  var import_node_os6 = require("os");
22938
22954
  var import_node_path6 = require("path");
22939
22955
  var INSTALL_URL2 = "https://code.kimi.com/kimi-code/install.sh";
@@ -22941,7 +22957,7 @@ function kimiBinDir() {
22941
22957
  return (0, import_node_path6.join)(process.env.KIMI_CODE_HOME || (0, import_node_path6.join)((0, import_node_os6.homedir)(), ".kimi-code"), "bin");
22942
22958
  }
22943
22959
  function kimiRuns() {
22944
- const r = (0, import_node_child_process24.spawnSync)("kimi", ["--version"], { stdio: "ignore", timeout: 15e3 });
22960
+ const r = (0, import_node_child_process25.spawnSync)("kimi", ["--version"], { stdio: "ignore", timeout: 15e3 });
22945
22961
  return !r.error && r.status === 0;
22946
22962
  }
22947
22963
  function augmentPath2() {
@@ -22951,7 +22967,7 @@ function augmentPath2() {
22951
22967
  }
22952
22968
  async function runInstaller2() {
22953
22969
  return new Promise((resolve7) => {
22954
- const proc = (0, import_node_child_process24.spawn)("sh", ["-c", `curl -fsSL ${INSTALL_URL2} | bash`], { stdio: "inherit" });
22970
+ const proc = (0, import_node_child_process25.spawn)("sh", ["-c", `curl -fsSL ${INSTALL_URL2} | bash`], { stdio: "inherit" });
22955
22971
  proc.on("close", (code) => resolve7(code === 0));
22956
22972
  proc.on("error", () => resolve7(false));
22957
22973
  });
@@ -23688,7 +23704,7 @@ var HistoryService = class _HistoryService {
23688
23704
  };
23689
23705
 
23690
23706
  // src/agents/acp/client.ts
23691
- var import_node_child_process25 = require("child_process");
23707
+ var import_node_child_process26 = require("child_process");
23692
23708
  var fs57 = __toESM(require("fs/promises"));
23693
23709
  var fsSync = __toESM(require("fs"));
23694
23710
  var os46 = __toESM(require("os"));
@@ -26292,7 +26308,7 @@ var AcpClient = class {
26292
26308
  "acpClient",
26293
26309
  `spawn cmd=${adapter.command} args=[${adapter.args.join(",")}] cwd=${cwd}`
26294
26310
  );
26295
- const child = (0, import_node_child_process25.spawn)(adapter.command, adapter.args, {
26311
+ const child = (0, import_node_child_process26.spawn)(adapter.command, adapter.args, {
26296
26312
  cwd,
26297
26313
  // extraEnv (e.g. CLAUDE_CODE_DISABLE_1M_CONTEXT=1 on an on-demand
26298
26314
  // re-spawn) layers over process.env; PATH stays last so the augmented
@@ -27676,7 +27692,7 @@ async function discoverRepos(workingDir, maxDepth = 4) {
27676
27692
  // src/services/turn-files/files-outbox.ts
27677
27693
  var fs60 = __toESM(require("fs/promises"));
27678
27694
  var path64 = __toESM(require("path"));
27679
- var import_os11 = require("os");
27695
+ var import_os12 = require("os");
27680
27696
  var HOME_OUTBOX_DIR = ".codeam/outbox";
27681
27697
  var MAX_AGE_MS = 24 * 60 * 60 * 1e3;
27682
27698
  var BACKOFF_STEPS_MS = [
@@ -27843,7 +27859,7 @@ function applyJitter(ms) {
27843
27859
  return Math.round(ms * factor);
27844
27860
  }
27845
27861
  function homeDir() {
27846
- return process.env.HOME ?? process.env.USERPROFILE ?? (0, import_os11.tmpdir)();
27862
+ return process.env.HOME ?? process.env.USERPROFILE ?? (0, import_os12.tmpdir)();
27847
27863
  }
27848
27864
 
27849
27865
  // src/services/turn-files/turn-file-aggregator.ts
@@ -34167,7 +34183,7 @@ function checkChokidar() {
34167
34183
  }
34168
34184
  async function doctor(args2 = []) {
34169
34185
  const json = args2.includes("--json");
34170
- const cliVersion = true ? "2.60.24" : "0.0.0-dev";
34186
+ const cliVersion = true ? "2.60.25" : "0.0.0-dev";
34171
34187
  const apiBase2 = resolveApiBaseUrl();
34172
34188
  const diagnosticId = (0, import_node_crypto12.randomUUID)();
34173
34189
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -34366,7 +34382,7 @@ async function completion(args2) {
34366
34382
  // src/commands/version.ts
34367
34383
  var import_picocolors15 = __toESM(require("picocolors"));
34368
34384
  function version2() {
34369
- const v = true ? "2.60.24" : "unknown";
34385
+ const v = true ? "2.60.25" : "unknown";
34370
34386
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
34371
34387
  }
34372
34388
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.60.24",
3
+ "version": "2.60.25",
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",