codeam-cli 2.58.0 → 2.58.1

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 (3) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/index.js +118 -76
  3. package/package.json +1 -1
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.58.0] — 2026-07-07
8
+
9
+ ### CI
10
+
11
+ - Knip dead-code gate (blocking) for repo B + delete grep-verified dead code (codeagent-nvt)
12
+
13
+ ### Changed
14
+
15
+ - **cli:** Quiet.ts best-effort helpers + merge util dirs into lib/ (codeagent-nvt)
16
+
7
17
  ## [2.57.0] — 2026-07-07
8
18
 
9
19
  ### Changed
package/dist/index.js CHANGED
@@ -5652,7 +5652,7 @@ function readAnonId() {
5652
5652
  }
5653
5653
  function superProperties() {
5654
5654
  return {
5655
- cliVersion: true ? "2.58.0" : "0.0.0-dev",
5655
+ cliVersion: true ? "2.58.1" : "0.0.0-dev",
5656
5656
  nodeVersion: process.version,
5657
5657
  platform: process.platform,
5658
5658
  arch: process.arch,
@@ -5833,7 +5833,7 @@ var os4 = __toESM(require("os"));
5833
5833
  // package.json
5834
5834
  var package_default = {
5835
5835
  name: "codeam-cli",
5836
- version: "2.58.0",
5836
+ version: "2.58.1",
5837
5837
  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.",
5838
5838
  type: "commonjs",
5839
5839
  main: "dist/index.js",
@@ -6881,7 +6881,7 @@ var CommandRelayService = class {
6881
6881
  // fresh + clear the "CLI update available" banner after a self-update
6882
6882
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
6883
6883
  // pair/reconnect). Older backends ignore the extra field.
6884
- ..."2.58.0" ? { ideVersion: "2.58.0" } : {}
6884
+ ..."2.58.1" ? { ideVersion: "2.58.1" } : {}
6885
6885
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
6886
6886
  }
6887
6887
  /**
@@ -11687,10 +11687,10 @@ function buildForPlatform(platform3) {
11687
11687
  var import_node_crypto4 = require("crypto");
11688
11688
 
11689
11689
  // src/agents/claude/resolver.ts
11690
- function buildClaudeLaunch(extraArgs = [], os46 = createOsStrategy()) {
11691
- const found = os46.findInPath("claude") ?? os46.findInPath("claude-code");
11690
+ function buildClaudeLaunch(extraArgs = [], os47 = createOsStrategy()) {
11691
+ const found = os47.findInPath("claude") ?? os47.findInPath("claude-code");
11692
11692
  if (!found) return null;
11693
- return os46.buildLaunch(found, extraArgs);
11693
+ return os47.buildLaunch(found, extraArgs);
11694
11694
  }
11695
11695
 
11696
11696
  // src/agents/claude/installer.ts
@@ -12274,8 +12274,8 @@ var ClaudeRuntimeStrategy = class {
12274
12274
  meta = getAgent("claude");
12275
12275
  mode = "interactive";
12276
12276
  os;
12277
- constructor(os46) {
12278
- this.os = os46;
12277
+ constructor(os47) {
12278
+ this.os = os47;
12279
12279
  }
12280
12280
  /**
12281
12281
  * Claude Code's react-ink TUI enables bracketed-paste mode at
@@ -12952,8 +12952,8 @@ function codexCredentialLocator() {
12952
12952
  function codexLoginLauncher() {
12953
12953
  return {
12954
12954
  async ensureInstalled() {
12955
- const os46 = createOsStrategy();
12956
- return os46.findInPath("codex") !== null;
12955
+ const os47 = createOsStrategy();
12956
+ return os47.findInPath("codex") !== null;
12957
12957
  },
12958
12958
  launch() {
12959
12959
  return (0, import_node_child_process4.spawn)("codex", ["login"], { stdio: "inherit" });
@@ -12976,8 +12976,8 @@ var CodexRuntimeStrategy = class {
12976
12976
  meta = getAgent("codex");
12977
12977
  mode = "interactive";
12978
12978
  os;
12979
- constructor(os46) {
12980
- this.os = os46;
12979
+ constructor(os47) {
12980
+ this.os = os47;
12981
12981
  }
12982
12982
  async prepareLaunch() {
12983
12983
  let binary = this.os.findInPath("codex");
@@ -13076,12 +13076,12 @@ var CodexRuntimeStrategy = class {
13076
13076
  });
13077
13077
  }
13078
13078
  };
13079
- function resolveNpm(os46) {
13080
- return os46.id === "win32" ? "npm.cmd" : "npm";
13079
+ function resolveNpm(os47) {
13080
+ return os47.id === "win32" ? "npm.cmd" : "npm";
13081
13081
  }
13082
- async function installCodexViaNpm(os46) {
13082
+ async function installCodexViaNpm(os47) {
13083
13083
  return new Promise((resolve7, reject) => {
13084
- const proc = (0, import_node_child_process5.spawn)(resolveNpm(os46), ["install", "-g", "@openai/codex"], {
13084
+ const proc = (0, import_node_child_process5.spawn)(resolveNpm(os47), ["install", "-g", "@openai/codex"], {
13085
13085
  stdio: "inherit"
13086
13086
  });
13087
13087
  proc.on("close", (code) => {
@@ -13098,16 +13098,16 @@ async function installCodexViaNpm(os46) {
13098
13098
  });
13099
13099
  });
13100
13100
  }
13101
- function augmentNpmGlobalBin(os46) {
13101
+ function augmentNpmGlobalBin(os47) {
13102
13102
  try {
13103
- const result = (0, import_node_child_process5.spawnSync)(resolveNpm(os46), ["prefix", "-g"], {
13103
+ const result = (0, import_node_child_process5.spawnSync)(resolveNpm(os47), ["prefix", "-g"], {
13104
13104
  stdio: ["ignore", "pipe", "ignore"]
13105
13105
  });
13106
13106
  if (result.status !== 0) return;
13107
13107
  const prefix = result.stdout.toString().trim();
13108
13108
  if (!prefix) return;
13109
- const binDir = os46.id === "win32" ? prefix : path24.join(prefix, "bin");
13110
- os46.augmentPath([binDir]);
13109
+ const binDir = os47.id === "win32" ? prefix : path24.join(prefix, "bin");
13110
+ os47.augmentPath([binDir]);
13111
13111
  } catch {
13112
13112
  }
13113
13113
  }
@@ -13191,9 +13191,9 @@ var import_node_child_process8 = require("child_process");
13191
13191
  // src/agents/coderabbit/installer.ts
13192
13192
  var import_node_child_process6 = require("child_process");
13193
13193
  var INSTALL_URL = "https://cli.coderabbit.ai/install.sh";
13194
- async function ensureCoderabbitInstalled(os46) {
13195
- if (os46.findInPath("coderabbit")) return true;
13196
- if (os46.id === "win32") {
13194
+ async function ensureCoderabbitInstalled(os47) {
13195
+ if (os47.findInPath("coderabbit")) return true;
13196
+ if (os47.id === "win32") {
13197
13197
  console.error(
13198
13198
  "\n \u2717 CodeRabbit on Windows requires WSL.\n Install the CLI inside your WSL distribution\n (curl -fsSL https://cli.coderabbit.ai/install.sh | sh)\n then re-run `codeam link coderabbit` from WSL.\n"
13199
13199
  );
@@ -13208,8 +13208,8 @@ async function ensureCoderabbitInstalled(os46) {
13208
13208
  proc.on("error", () => resolve7(false));
13209
13209
  });
13210
13210
  if (!ok) return false;
13211
- os46.augmentPath([`${os46.homeDir()}/.local/bin`, "/opt/homebrew/bin"]);
13212
- return os46.findInPath("coderabbit") !== null;
13211
+ os47.augmentPath([`${os47.homeDir()}/.local/bin`, "/opt/homebrew/bin"]);
13212
+ return os47.findInPath("coderabbit") !== null;
13213
13213
  }
13214
13214
 
13215
13215
  // src/agents/coderabbit/link.ts
@@ -13244,10 +13244,10 @@ function coderabbitCredentialLocator() {
13244
13244
  validate: validateNonEmptyCredential
13245
13245
  };
13246
13246
  }
13247
- function coderabbitLoginLauncher(os46) {
13247
+ function coderabbitLoginLauncher(os47) {
13248
13248
  return {
13249
13249
  async ensureInstalled() {
13250
- return ensureCoderabbitInstalled(os46);
13250
+ return ensureCoderabbitInstalled(os47);
13251
13251
  },
13252
13252
  launch() {
13253
13253
  return (0, import_node_child_process7.spawn)("coderabbit", ["login"], { stdio: "inherit" });
@@ -13293,8 +13293,8 @@ var CoderabbitRuntimeStrategy = class {
13293
13293
  meta = getAgent("coderabbit");
13294
13294
  mode = "batch";
13295
13295
  os;
13296
- constructor(os46) {
13297
- this.os = os46;
13296
+ constructor(os47) {
13297
+ this.os = os47;
13298
13298
  }
13299
13299
  getDefaultArgs() {
13300
13300
  return ["review"];
@@ -13410,10 +13410,10 @@ function cursorCredentialLocator() {
13410
13410
  validate: validateNonEmptyCredential
13411
13411
  };
13412
13412
  }
13413
- function cursorLoginLauncher(os46) {
13413
+ function cursorLoginLauncher(os47) {
13414
13414
  return {
13415
13415
  async ensureInstalled() {
13416
- if (os46.findInPath("cursor-agent")) return true;
13416
+ if (os47.findInPath("cursor-agent")) return true;
13417
13417
  console.error(
13418
13418
  "\n \u2717 cursor-agent binary not on PATH.\n Install Cursor (https://cursor.com/) and ensure the CLI\n plugin is enabled, then re-run `codeam link cursor`.\n"
13419
13419
  );
@@ -13475,8 +13475,8 @@ var CursorRuntimeStrategy = class {
13475
13475
  meta = getAgent("cursor");
13476
13476
  mode = "interactive";
13477
13477
  os;
13478
- constructor(os46) {
13479
- this.os = os46;
13478
+ constructor(os47) {
13479
+ this.os = os47;
13480
13480
  }
13481
13481
  async prepareLaunch() {
13482
13482
  const binary = this.os.findInPath("cursor-agent");
@@ -13615,10 +13615,10 @@ function aiderCredentialLocator() {
13615
13615
  validate: validateNonEmptyCredential
13616
13616
  };
13617
13617
  }
13618
- function aiderLoginLauncher(os46) {
13618
+ function aiderLoginLauncher(os47) {
13619
13619
  return {
13620
13620
  async ensureInstalled() {
13621
- if (os46.findInPath("aider")) return true;
13621
+ if (os47.findInPath("aider")) return true;
13622
13622
  console.error(
13623
13623
  "\n \u2717 aider binary not on PATH.\n Install Aider:\n pip install aider-chat\n then re-run `codeam link aider`.\n"
13624
13624
  );
@@ -13628,7 +13628,7 @@ function aiderLoginLauncher(os46) {
13628
13628
  console.error(
13629
13629
  "\n Aider has no interactive login flow.\n Set ANTHROPIC_API_KEY or OPENAI_API_KEY in your shell,\n or re-run `codeam link aider --api-key=<your-key>`.\n"
13630
13630
  );
13631
- return (0, import_node_child_process10.spawn)(os46.id === "win32" ? "cmd.exe" : "sh", os46.id === "win32" ? ["/c", "exit", "0"] : ["-c", "exit 0"], {
13631
+ return (0, import_node_child_process10.spawn)(os47.id === "win32" ? "cmd.exe" : "sh", os47.id === "win32" ? ["/c", "exit", "0"] : ["-c", "exit 0"], {
13632
13632
  stdio: "ignore"
13633
13633
  });
13634
13634
  }
@@ -13700,8 +13700,8 @@ var AiderRuntimeStrategy = class {
13700
13700
  meta = getAgent("aider");
13701
13701
  mode = "interactive";
13702
13702
  os;
13703
- constructor(os46) {
13704
- this.os = os46;
13703
+ constructor(os47) {
13704
+ this.os = os47;
13705
13705
  }
13706
13706
  async prepareLaunch() {
13707
13707
  const binary = this.os.findInPath("aider");
@@ -13830,8 +13830,8 @@ function geminiCredentialLocator() {
13830
13830
  function geminiLoginLauncher() {
13831
13831
  return {
13832
13832
  async ensureInstalled() {
13833
- const os46 = createOsStrategy();
13834
- return os46.findInPath("gemini") !== null;
13833
+ const os47 = createOsStrategy();
13834
+ return os47.findInPath("gemini") !== null;
13835
13835
  },
13836
13836
  launch() {
13837
13837
  return (0, import_node_child_process11.spawn)("gemini", ["auth", "login"], { stdio: "inherit" });
@@ -13864,8 +13864,8 @@ var GeminiRuntimeStrategy = class {
13864
13864
  meta = getAgent("gemini");
13865
13865
  mode = "interactive";
13866
13866
  os;
13867
- constructor(os46) {
13868
- this.os = os46;
13867
+ constructor(os47) {
13868
+ this.os = os47;
13869
13869
  }
13870
13870
  async prepareLaunch() {
13871
13871
  const binary = this.os.findInPath("gemini");
@@ -13964,18 +13964,18 @@ var GeminiRuntimeStrategy = class {
13964
13964
 
13965
13965
  // src/agents/registry.ts
13966
13966
  var runtimeBuilders = {
13967
- claude: (os46) => new ClaudeRuntimeStrategy(os46),
13968
- codex: (os46) => new CodexRuntimeStrategy(os46),
13969
- coderabbit: (os46) => new CoderabbitRuntimeStrategy(os46),
13970
- cursor: (os46) => new CursorRuntimeStrategy(os46),
13971
- aider: (os46) => new AiderRuntimeStrategy(os46),
13972
- gemini: (os46) => new GeminiRuntimeStrategy(os46)
13967
+ claude: (os47) => new ClaudeRuntimeStrategy(os47),
13968
+ codex: (os47) => new CodexRuntimeStrategy(os47),
13969
+ coderabbit: (os47) => new CoderabbitRuntimeStrategy(os47),
13970
+ cursor: (os47) => new CursorRuntimeStrategy(os47),
13971
+ aider: (os47) => new AiderRuntimeStrategy(os47),
13972
+ gemini: (os47) => new GeminiRuntimeStrategy(os47)
13973
13973
  };
13974
13974
  var deployBuilders = {
13975
13975
  claude: () => new ClaudeDeployStrategy(),
13976
13976
  codex: () => new CodexDeployStrategy()
13977
13977
  };
13978
- function createAgentStrategy(agent, os46 = createOsStrategy()) {
13978
+ function createAgentStrategy(agent, os47 = createOsStrategy()) {
13979
13979
  if (!AGENT_REGISTRY[agent]?.enabled) {
13980
13980
  throw new Error(
13981
13981
  `Agent "${agent}" is not supported in this codeam-cli version. Upgrade with 'npm i -g codeam-cli@latest'.`
@@ -13985,10 +13985,10 @@ function createAgentStrategy(agent, os46 = createOsStrategy()) {
13985
13985
  if (!build) {
13986
13986
  throw new Error(`No runtime strategy registered for agent "${agent}"`);
13987
13987
  }
13988
- return build(os46);
13988
+ return build(os47);
13989
13989
  }
13990
- function createInteractiveAgentStrategy(agent, os46 = createOsStrategy()) {
13991
- const s = createAgentStrategy(agent, os46);
13990
+ function createInteractiveAgentStrategy(agent, os47 = createOsStrategy()) {
13991
+ const s = createAgentStrategy(agent, os47);
13992
13992
  if (s.mode !== "interactive") {
13993
13993
  throw new Error(
13994
13994
  `Agent "${agent}" is a batch agent; use createAgentStrategy + .runOneShot for one-shot reviews.`
@@ -15888,7 +15888,7 @@ async function autoUpgradeBeforeCriticalCommand() {
15888
15888
  if (process.env.NODE_ENV === "test") return;
15889
15889
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
15890
15890
  if (process.env.CI) return;
15891
- const current = true ? "2.58.0" : null;
15891
+ const current = true ? "2.58.1" : null;
15892
15892
  if (!current) return;
15893
15893
  const cache = readCache();
15894
15894
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -15905,7 +15905,7 @@ function checkForUpdates() {
15905
15905
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
15906
15906
  if (process.env.CI) return;
15907
15907
  if (!process.stdout.isTTY) return;
15908
- const current = true ? "2.58.0" : null;
15908
+ const current = true ? "2.58.1" : null;
15909
15909
  if (!current) return;
15910
15910
  const cache = readCache();
15911
15911
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -15925,7 +15925,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
15925
15925
  var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
15926
15926
  var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
15927
15927
  function currentCliVersion() {
15928
- return true ? "2.58.0" : null;
15928
+ return true ? "2.58.1" : null;
15929
15929
  }
15930
15930
  function runCmd(cmd, args2, timeoutMs) {
15931
15931
  return new Promise((resolve7) => {
@@ -18355,11 +18355,11 @@ function resolveDoltInstallStrategy(platform3) {
18355
18355
  }
18356
18356
  var DOLT_RELEASE_BASE = "https://github.com/dolthub/dolt/releases/latest/download";
18357
18357
  function doltPlatformTuple(platform3, arch2) {
18358
- const os46 = platform3 === "win32" ? "windows" : platform3 === "darwin" ? "darwin" : "linux";
18358
+ const os47 = platform3 === "win32" ? "windows" : platform3 === "darwin" ? "darwin" : "linux";
18359
18359
  const a = arch2 === "x64" ? "amd64" : arch2 === "arm64" ? "arm64" : null;
18360
18360
  if (!a) return null;
18361
- if (os46 === "windows" && a !== "amd64") return null;
18362
- return `${os46}-${a}`;
18361
+ if (os47 === "windows" && a !== "amd64") return null;
18362
+ return `${os47}-${a}`;
18363
18363
  }
18364
18364
  function resolveDoltTarballStrategy(targetDir, platform3, arch2) {
18365
18365
  const tuple = doltPlatformTuple(platform3, arch2);
@@ -21383,6 +21383,7 @@ var path56 = __toESM(require("path"));
21383
21383
 
21384
21384
  // src/agents/acp/agent-binary.ts
21385
21385
  var import_fs4 = __toESM(require("fs"));
21386
+ var import_os7 = __toESM(require("os"));
21386
21387
  var import_path8 = __toESM(require("path"));
21387
21388
  var import_child_process25 = require("child_process");
21388
21389
  function currentPlatformKey() {
@@ -21468,6 +21469,34 @@ async function waitForCommandOnPath(cmd, opts = {}) {
21468
21469
  }
21469
21470
  return check();
21470
21471
  }
21472
+ function resolveCursorAgentBinary(deps = {}) {
21473
+ const existsSync24 = deps.existsSync ?? import_fs4.default.existsSync;
21474
+ const platform3 = deps.platform ?? process.platform;
21475
+ const env = deps.env ?? process.env;
21476
+ if (platform3 === "win32") {
21477
+ const localAppData = env.LOCALAPPDATA;
21478
+ if (!localAppData) return null;
21479
+ const exe = import_path8.default.win32.join(localAppData, "cursor-agent", "cursor-agent.exe");
21480
+ return existsSync24(exe) ? exe : null;
21481
+ }
21482
+ const home = deps.homedir ?? import_os7.default.homedir();
21483
+ const unix = import_path8.default.posix.join(home, ".local", "bin", "cursor-agent");
21484
+ return existsSync24(unix) ? unix : null;
21485
+ }
21486
+ async function waitForCursorAgent(opts = {}) {
21487
+ const timeoutMs = opts.timeoutMs ?? 18e4;
21488
+ const pollMs = opts.pollMs ?? 500;
21489
+ const now = opts.now ?? Date.now;
21490
+ const sleep3 = opts.sleep ?? realSleep;
21491
+ const check = () => resolveCursorAgentBinary(opts) !== null || isCommandOnPath("cursor-agent", opts.probe);
21492
+ const deadline = now() + timeoutMs;
21493
+ if (check()) return true;
21494
+ while (now() < deadline) {
21495
+ await sleep3(pollMs);
21496
+ if (check()) return true;
21497
+ }
21498
+ return check();
21499
+ }
21471
21500
  var ADAPTER_MODULE_LOAD_ERROR_RE = /ERR_MODULE_NOT_FOUND|Cannot find module|ERR_REQUIRE_ESM|ERR_UNKNOWN_BUILTIN_MODULE|SyntaxError|Unexpected (token|end|identifier)|missing \) after argument list/i;
21472
21501
  function probeAdapterModuleGraph(command2, args2, opts = {}) {
21473
21502
  const livenessMs = opts.livenessMs ?? 400;
@@ -21576,11 +21605,19 @@ var REGISTRY = {
21576
21605
  // so the provisioned `CURSOR_API_KEY` actually reaches cursor-agent — the
21577
21606
  // interactive PTY path left cursor unauthenticated. It also gives the typed
21578
21607
  // streaming (tool calls / subagents) the other ACP agents emit.
21608
+ //
21609
+ // ⚠️ Windows stale-PATH: Cursor's installer drops `cursor-agent.exe` in
21610
+ // `%LOCALAPPDATA%\cursor-agent\` and adds that dir to the *User* PATH,
21611
+ // which a process already running (our CLI host, spawned at pairing)
21612
+ // never inherits — so a bare `cursor-agent` spawn ENOENTs even though
21613
+ // it's installed. `resolveCursorAgentBinary()` returns the absolute path
21614
+ // when present (sidestepping PATH), falling back to the bare name on
21615
+ // macOS/Linux and when it isn't in the known location yet.
21579
21616
  cursor: () => ({
21580
- command: "cursor-agent",
21617
+ command: resolveCursorAgentBinary() ?? "cursor-agent",
21581
21618
  args: ["acp"],
21582
21619
  requiresAgentBinary: "cursor-agent",
21583
- waitForBinary: (o) => waitForCommandOnPath("cursor-agent", o)
21620
+ waitForBinary: (o) => waitForCursorAgent(o)
21584
21621
  }),
21585
21622
  // Gemini speaks ACP natively via `gemini --acp` — no npm adapter
21586
21623
  // package, just the user-installed `gemini` binary on PATH. Same
@@ -21615,7 +21652,7 @@ var import_node_crypto7 = require("crypto");
21615
21652
  // src/services/history.service.ts
21616
21653
  var fs53 = __toESM(require("fs"));
21617
21654
  var path57 = __toESM(require("path"));
21618
- var os41 = __toESM(require("os"));
21655
+ var os42 = __toESM(require("os"));
21619
21656
  var https7 = __toESM(require("https"));
21620
21657
  var http6 = __toESM(require("http"));
21621
21658
  var import_zod2 = require("zod");
@@ -21783,7 +21820,7 @@ var HistoryService = class _HistoryService {
21783
21820
  return this._quotaPercent === null || Date.now() - this._quotaFetchedAt > ttlMs;
21784
21821
  }
21785
21822
  get projectDir() {
21786
- return this.runtime.resolveHistoryDir(this.cwd) ?? path57.join(os41.homedir(), ".claude", "projects", encodeCwd(this.cwd));
21823
+ return this.runtime.resolveHistoryDir(this.cwd) ?? path57.join(os42.homedir(), ".claude", "projects", encodeCwd(this.cwd));
21787
21824
  }
21788
21825
  /** Set the current Claude conversation ID (extracted from /cost command or session start) */
21789
21826
  setCurrentConversationId(id) {
@@ -22193,7 +22230,7 @@ var HistoryService = class _HistoryService {
22193
22230
  var import_node_child_process21 = require("child_process");
22194
22231
  var fs54 = __toESM(require("fs/promises"));
22195
22232
  var fsSync = __toESM(require("fs"));
22196
- var os42 = __toESM(require("os"));
22233
+ var os43 = __toESM(require("os"));
22197
22234
  var path58 = __toESM(require("path"));
22198
22235
  var import_node_stream = require("stream");
22199
22236
 
@@ -25093,7 +25130,7 @@ function applyLineRange(content, line, limit) {
25093
25130
  return { content: lines.slice(start2, end).join("\n") };
25094
25131
  }
25095
25132
  function knownAgentBinaryDirs() {
25096
- const home = os42.homedir();
25133
+ const home = os43.homedir();
25097
25134
  const out2 = [];
25098
25135
  out2.push("/tmp/codeam-node20/bin");
25099
25136
  for (const root of [
@@ -25112,6 +25149,11 @@ function knownAgentBinaryDirs() {
25112
25149
  out2.push("/usr/bin");
25113
25150
  out2.push(path58.join(home, ".local/bin"));
25114
25151
  out2.push(path58.join(home, "bin"));
25152
+ if (process.platform === "win32") {
25153
+ const { LOCALAPPDATA, APPDATA } = process.env;
25154
+ if (LOCALAPPDATA) out2.push(path58.join(LOCALAPPDATA, "cursor-agent"));
25155
+ if (APPDATA) out2.push(path58.join(APPDATA, "npm"));
25156
+ }
25115
25157
  return out2.filter((p2) => {
25116
25158
  try {
25117
25159
  return fsSync.statSync(p2).isDirectory();
@@ -25583,10 +25625,10 @@ function commonPrefixLength(a, b) {
25583
25625
  // src/agents/acp/onboarding.ts
25584
25626
  var import_child_process26 = require("child_process");
25585
25627
  var fs55 = __toESM(require("fs"));
25586
- var os43 = __toESM(require("os"));
25628
+ var os44 = __toESM(require("os"));
25587
25629
  var path59 = __toESM(require("path"));
25588
25630
  var _onboardingSeam = {
25589
- markerPath: (sessionId) => path59.join(os43.homedir(), ".codeam", "welcomed", `${sessionId}.done`),
25631
+ markerPath: (sessionId) => path59.join(os44.homedir(), ".codeam", "welcomed", `${sessionId}.done`),
25590
25632
  exists: (p2) => fs55.existsSync(p2),
25591
25633
  write: (p2) => {
25592
25634
  fs55.mkdirSync(path59.dirname(p2), { recursive: true });
@@ -26057,7 +26099,7 @@ async function discoverRepos(workingDir, maxDepth = 4) {
26057
26099
  // src/services/turn-files/files-outbox.ts
26058
26100
  var fs57 = __toESM(require("fs/promises"));
26059
26101
  var path61 = __toESM(require("path"));
26060
- var import_os7 = require("os");
26102
+ var import_os8 = require("os");
26061
26103
  var HOME_OUTBOX_DIR = ".codeam/outbox";
26062
26104
  var MAX_AGE_MS = 24 * 60 * 60 * 1e3;
26063
26105
  var BACKOFF_STEPS_MS = [
@@ -26224,7 +26266,7 @@ function applyJitter(ms) {
26224
26266
  return Math.round(ms * factor);
26225
26267
  }
26226
26268
  function homeDir() {
26227
- return process.env.HOME ?? process.env.USERPROFILE ?? (0, import_os7.tmpdir)();
26269
+ return process.env.HOME ?? process.env.USERPROFILE ?? (0, import_os8.tmpdir)();
26228
26270
  }
26229
26271
 
26230
26272
  // src/services/turn-files/turn-file-aggregator.ts
@@ -28977,11 +29019,11 @@ function fetchQuotaUsage(runtime, historySvc) {
28977
29019
 
28978
29020
  // src/agents/claude/onboarding.ts
28979
29021
  var fs58 = __toESM(require("fs"));
28980
- var os44 = __toESM(require("os"));
29022
+ var os45 = __toESM(require("os"));
28981
29023
  var path62 = __toESM(require("path"));
28982
29024
  function ensureClaudeOnboarded() {
28983
29025
  try {
28984
- const file = path62.join(os44.homedir(), ".claude.json");
29026
+ const file = path62.join(os45.homedir(), ".claude.json");
28985
29027
  let config = {};
28986
29028
  try {
28987
29029
  config = JSON.parse(fs58.readFileSync(file, "utf8"));
@@ -31801,9 +31843,9 @@ function checkSessions() {
31801
31843
  }
31802
31844
  }
31803
31845
  function checkAgentBinaries() {
31804
- const os46 = createOsStrategy();
31846
+ const os47 = createOsStrategy();
31805
31847
  return getEnabledAgents().map((meta) => {
31806
- const found = os46.findInPath(meta.binaryName);
31848
+ const found = os47.findInPath(meta.binaryName);
31807
31849
  return {
31808
31850
  id: `agent-${meta.id}`,
31809
31851
  label: `Agent binary: ${meta.displayName} (${meta.binaryName})`,
@@ -31867,7 +31909,7 @@ function checkChokidar() {
31867
31909
  }
31868
31910
  async function doctor(args2 = []) {
31869
31911
  const json = args2.includes("--json");
31870
- const cliVersion = true ? "2.58.0" : "0.0.0-dev";
31912
+ const cliVersion = true ? "2.58.1" : "0.0.0-dev";
31871
31913
  const apiBase2 = resolveApiBaseUrl();
31872
31914
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
31873
31915
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -32066,7 +32108,7 @@ async function completion(args2) {
32066
32108
  // src/commands/version.ts
32067
32109
  var import_picocolors15 = __toESM(require("picocolors"));
32068
32110
  function version2() {
32069
- const v = true ? "2.58.0" : "unknown";
32111
+ const v = true ? "2.58.1" : "unknown";
32070
32112
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
32071
32113
  }
32072
32114
 
@@ -32215,10 +32257,10 @@ var EXIT_CODE_NAMES = {
32215
32257
  };
32216
32258
 
32217
32259
  // src/index.ts
32218
- var os45 = __toESM(require("os"));
32260
+ var os46 = __toESM(require("os"));
32219
32261
  if (!process.env.HOME) {
32220
32262
  try {
32221
- const home = os45.homedir();
32263
+ const home = os46.homedir();
32222
32264
  if (home) process.env.HOME = home;
32223
32265
  } catch {
32224
32266
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.58.0",
3
+ "version": "2.58.1",
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",