codeam-cli 2.75.19 → 2.75.21

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,18 @@ 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.20] — 2026-09-25
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Preview heals a committed host-allow shim instead of wrapping it
12
+
13
+ ## [2.75.19] — 2026-09-25
14
+
15
+ ### Fixed
16
+
17
+ - **cli:** Authenticate gh on self-hosted boxes with a token lacking read:org
18
+
7
19
  ## [2.75.18] — 2026-09-25
8
20
 
9
21
  ### Fixed
package/dist/index.js CHANGED
@@ -10509,7 +10509,7 @@ function readAnonId() {
10509
10509
  }
10510
10510
  function superProperties() {
10511
10511
  return {
10512
- cliVersion: true ? "2.75.19" : "0.0.0-dev",
10512
+ cliVersion: true ? "2.75.21" : "0.0.0-dev",
10513
10513
  nodeVersion: process.version,
10514
10514
  platform: process.platform,
10515
10515
  arch: process.arch,
@@ -10751,7 +10751,7 @@ var http = __toESM(require("http"));
10751
10751
  // package.json
10752
10752
  var package_default = {
10753
10753
  name: "codeam-cli",
10754
- version: "2.75.19",
10754
+ version: "2.75.21",
10755
10755
  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.",
10756
10756
  type: "commonjs",
10757
10757
  main: "dist/index.js",
@@ -12081,7 +12081,7 @@ var CommandRelayService = class _CommandRelayService {
12081
12081
  // fresh + clear the "CLI update available" banner after a self-update
12082
12082
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
12083
12083
  // pair/reconnect). Older backends ignore the extra field.
12084
- ..."2.75.19" ? { ideVersion: "2.75.19" } : {}
12084
+ ..."2.75.21" ? { ideVersion: "2.75.21" } : {}
12085
12085
  };
12086
12086
  try {
12087
12087
  const res = await _postJson(`${API_BASE2}/api/plugin/heartbeat`, body);
@@ -22784,6 +22784,14 @@ module.exports = { server: { allowedHosts: ${list} } };
22784
22784
  function shimFor(framework, origBasename, esm) {
22785
22785
  return framework === "next" ? nextShim(origBasename, esm) : viteShim(origBasename, esm);
22786
22786
  }
22787
+ var SHIM_HEADER = "// codeam preview host-allow shim";
22788
+ async function isOurShim(abs) {
22789
+ try {
22790
+ return (await import_fs2.promises.readFile(abs, "utf8")).startsWith(SHIM_HEADER);
22791
+ } catch {
22792
+ return false;
22793
+ }
22794
+ }
22787
22795
  async function writeMarker(cwd, marker) {
22788
22796
  await import_fs2.promises.mkdir(path41.join(cwd, MARKER_DIR), { recursive: true });
22789
22797
  await import_fs2.promises.writeFile(markerPath(cwd), JSON.stringify(marker, null, 2), "utf8");
@@ -22837,6 +22845,16 @@ async function applyPreviewHostAllow(cwd) {
22837
22845
  if (existing) {
22838
22846
  const ext = path41.extname(existing);
22839
22847
  const origBasename = `${CONFIG_BASENAMES[framework]}${ORIG_INFIX}${ext}`;
22848
+ if (await isOurShim(path41.join(cwd, existing))) {
22849
+ const origAbs = path41.join(cwd, origBasename);
22850
+ if (!await fileExists(origAbs) || await isOurShim(origAbs)) {
22851
+ log.warn("preview", `host-allow: ${existing} is a leftover shim with no original \u2014 skipped`);
22852
+ return;
22853
+ }
22854
+ await import_fs2.promises.rm(path41.join(cwd, existing), { force: true });
22855
+ await import_fs2.promises.rename(origAbs, path41.join(cwd, existing));
22856
+ log.info("preview", `host-allow: restored ${existing} from a leftover ${origBasename}`);
22857
+ }
22840
22858
  const esm = await isEsmConfig(cwd, existing);
22841
22859
  await import_fs2.promises.rename(path41.join(cwd, existing), path41.join(cwd, origBasename));
22842
22860
  await import_fs2.promises.writeFile(path41.join(cwd, existing), shimFor(framework, origBasename, esm), "utf8");
@@ -36693,11 +36711,30 @@ var import_node_crypto9 = require("crypto");
36693
36711
  var BD_PRIME_COMMAND_RE = /(?:^|[;&|]\s*)bd\s+prime\b/;
36694
36712
  var ToolCallTracker = class {
36695
36713
  bdPrimeIds = /* @__PURE__ */ new Set();
36714
+ /** Latest non-empty title per open call — see {@link lastTitle}. */
36715
+ titles = /* @__PURE__ */ new Map();
36696
36716
  /** Record a `tool_call` so its later `tool_call_update` can be recognised. */
36697
36717
  note(update) {
36698
- if (update.sessionUpdate !== "tool_call" || !update.toolCallId) return;
36718
+ if (!update.toolCallId) return;
36719
+ if (update.sessionUpdate !== "tool_call" && update.sessionUpdate !== "tool_call_update") return;
36720
+ const title = update.title?.trim();
36721
+ if (title) this.titles.set(update.toolCallId, title);
36722
+ if (update.sessionUpdate !== "tool_call") return;
36699
36723
  if (isBdPrimeInvocation(update)) this.bdPrimeIds.add(update.toolCallId);
36700
36724
  }
36725
+ /**
36726
+ * The call's most recent title, forgotten once read. claude-agent-acp opens
36727
+ * a Write as "Preparing file…", renames it in a non-terminal update
36728
+ * ("Write FOO.md"), then completes it with NO content and an EMPTY title —
36729
+ * the completion mapped to nothing and the phone showed "Preparing file…"
36730
+ * pending forever (break-it 2026-09-24, fleet box).
36731
+ */
36732
+ lastTitle(toolCallId) {
36733
+ if (!toolCallId) return null;
36734
+ const title = this.titles.get(toolCallId) ?? null;
36735
+ this.titles.delete(toolCallId);
36736
+ return title;
36737
+ }
36701
36738
  /** True when this tool call was `bd prime`; forgets terminal ids. */
36702
36739
  isBdPrime(toolCallId, terminal) {
36703
36740
  if (!toolCallId) return false;
@@ -36745,7 +36782,8 @@ function mapSessionUpdate(notification, tracker) {
36745
36782
  if (update.status !== "completed" && update.status !== "failed") {
36746
36783
  return [];
36747
36784
  }
36748
- const rawBody = describeToolCallUpdate(update);
36785
+ const remembered = tracker?.lastTitle(update.toolCallId) ?? null;
36786
+ const rawBody = describeToolCallUpdate(update) ?? remembered;
36749
36787
  if (!rawBody) return [];
36750
36788
  const body = update.status === "completed" && tracker?.isBdPrime(update.toolCallId, true) ? bdPrimeResultSummary(rawBody) : rawBody;
36751
36789
  const prefix = update.status === "failed" ? "[failed] " : "";
@@ -47680,7 +47718,7 @@ async function autoUpgradeBeforeCriticalCommand() {
47680
47718
  if (process.env.NODE_ENV === "test") return;
47681
47719
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
47682
47720
  if (process.env.CI) return;
47683
- const current2 = true ? "2.75.19" : null;
47721
+ const current2 = true ? "2.75.21" : null;
47684
47722
  if (!current2) return;
47685
47723
  const cache = readCache();
47686
47724
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -47697,7 +47735,7 @@ function checkForUpdates() {
47697
47735
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
47698
47736
  if (process.env.CI) return;
47699
47737
  if (!process.stdout.isTTY) return;
47700
- const current2 = true ? "2.75.19" : null;
47738
+ const current2 = true ? "2.75.21" : null;
47701
47739
  if (!current2) return;
47702
47740
  const cache = readCache();
47703
47741
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -47720,7 +47758,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
47720
47758
  var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
47721
47759
  var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
47722
47760
  function currentCliVersion() {
47723
- return true ? "2.75.19" : null;
47761
+ return true ? "2.75.21" : null;
47724
47762
  }
47725
47763
  async function installedVersion(deps) {
47726
47764
  const ls = await deps.run(
@@ -49606,7 +49644,7 @@ function checkChokidar() {
49606
49644
  }
49607
49645
  async function doctor(args2 = []) {
49608
49646
  const json = args2.includes("--json");
49609
- const cliVersion = true ? "2.75.19" : "0.0.0-dev";
49647
+ const cliVersion = true ? "2.75.21" : "0.0.0-dev";
49610
49648
  const apiBase2 = resolveApiBaseUrl();
49611
49649
  const diagnosticId = (0, import_node_crypto12.randomUUID)();
49612
49650
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -50130,7 +50168,7 @@ async function mcpWarm(argv = [], opts = {}) {
50130
50168
  // src/commands/version.ts
50131
50169
  var import_picocolors15 = __toESM(require("picocolors"));
50132
50170
  function version2() {
50133
- const v = true ? "2.75.19" : "unknown";
50171
+ const v = true ? "2.75.21" : "unknown";
50134
50172
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
50135
50173
  }
50136
50174
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.75.19",
3
+ "version": "2.75.21",
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",