codeam-cli 2.75.18 → 2.75.20

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,19 @@ 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.19] — 2026-09-25
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Authenticate gh on self-hosted boxes with a token lacking read:org
12
+
13
+ ## [2.75.18] — 2026-09-25
14
+
15
+ ### Fixed
16
+
17
+ - **cli:** Skip bd bootstrap on an empty remote; agent must not repair beads
18
+ - **cli:** Beads mint must not write agent files or git hooks into the repo
19
+
7
20
  ## [2.75.17] — 2026-09-25
8
21
 
9
22
  ### 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.18" : "0.0.0-dev",
10512
+ cliVersion: true ? "2.75.20" : "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.18",
10754
+ version: "2.75.20",
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.18" ? { ideVersion: "2.75.18" } : {}
12084
+ ..."2.75.20" ? { ideVersion: "2.75.20" } : {}
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");
@@ -47347,13 +47365,45 @@ async function ensureGhAuth(runner, ghCmd, token) {
47347
47365
  });
47348
47366
  if (login.code === 0) {
47349
47367
  log.info("host-agent", "gh authenticated with the linked GitHub token");
47368
+ } else if (/missing required scope/i.test(login.stderr) && writeGhHostsToken(token)) {
47369
+ log.info("host-agent", "gh authenticated via hosts.yml (token lacks read:org)");
47350
47370
  } else {
47351
- log.warn("host-agent", `gh auth login failed (code=${String(login.code)}) \u2014 gh unauthenticated`);
47371
+ log.warn(
47372
+ "host-agent",
47373
+ `gh auth login failed (code=${String(login.code)}): ${login.stderr.trim().slice(0, 200)} \u2014 gh unauthenticated`
47374
+ );
47352
47375
  }
47353
47376
  } catch (e) {
47354
47377
  log.warn("host-agent", `gh auth errored: ${e instanceof Error ? e.message : String(e)}`);
47355
47378
  }
47356
47379
  }
47380
+ function ghConfigDir() {
47381
+ if (process.env.GH_CONFIG_DIR) return process.env.GH_CONFIG_DIR;
47382
+ if (process.env.XDG_CONFIG_HOME) return path88.join(process.env.XDG_CONFIG_HOME, "gh");
47383
+ if (process.platform === "win32" && process.env.APPDATA) {
47384
+ return path88.join(process.env.APPDATA, "GitHub CLI");
47385
+ }
47386
+ return path88.join(os60.homedir(), ".config", "gh");
47387
+ }
47388
+ function writeGhHostsToken(token) {
47389
+ try {
47390
+ const dir = ghConfigDir();
47391
+ const file = path88.join(dir, "hosts.yml");
47392
+ if (fs75.existsSync(file)) return false;
47393
+ fs75.mkdirSync(dir, { recursive: true, mode: 448 });
47394
+ fs75.writeFileSync(
47395
+ file,
47396
+ `github.com:
47397
+ oauth_token: ${token}
47398
+ git_protocol: https
47399
+ `,
47400
+ { mode: 384, flag: "wx" }
47401
+ );
47402
+ return true;
47403
+ } catch {
47404
+ return false;
47405
+ }
47406
+ }
47357
47407
  var FALLBACK_GLAB_VERSION = "1.54.0";
47358
47408
  var GLAB_RELEASE_API = "https://gitlab.com/api/v4/projects/gitlab-org%2Fcli/releases/permalink/latest";
47359
47409
  async function resolveLatestGlabVersion() {
@@ -47648,7 +47698,7 @@ async function autoUpgradeBeforeCriticalCommand() {
47648
47698
  if (process.env.NODE_ENV === "test") return;
47649
47699
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
47650
47700
  if (process.env.CI) return;
47651
- const current2 = true ? "2.75.18" : null;
47701
+ const current2 = true ? "2.75.20" : null;
47652
47702
  if (!current2) return;
47653
47703
  const cache = readCache();
47654
47704
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -47665,7 +47715,7 @@ function checkForUpdates() {
47665
47715
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
47666
47716
  if (process.env.CI) return;
47667
47717
  if (!process.stdout.isTTY) return;
47668
- const current2 = true ? "2.75.18" : null;
47718
+ const current2 = true ? "2.75.20" : null;
47669
47719
  if (!current2) return;
47670
47720
  const cache = readCache();
47671
47721
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -47688,7 +47738,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
47688
47738
  var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
47689
47739
  var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
47690
47740
  function currentCliVersion() {
47691
- return true ? "2.75.18" : null;
47741
+ return true ? "2.75.20" : null;
47692
47742
  }
47693
47743
  async function installedVersion(deps) {
47694
47744
  const ls = await deps.run(
@@ -49574,7 +49624,7 @@ function checkChokidar() {
49574
49624
  }
49575
49625
  async function doctor(args2 = []) {
49576
49626
  const json = args2.includes("--json");
49577
- const cliVersion = true ? "2.75.18" : "0.0.0-dev";
49627
+ const cliVersion = true ? "2.75.20" : "0.0.0-dev";
49578
49628
  const apiBase2 = resolveApiBaseUrl();
49579
49629
  const diagnosticId = (0, import_node_crypto12.randomUUID)();
49580
49630
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -50098,7 +50148,7 @@ async function mcpWarm(argv = [], opts = {}) {
50098
50148
  // src/commands/version.ts
50099
50149
  var import_picocolors15 = __toESM(require("picocolors"));
50100
50150
  function version2() {
50101
- const v = true ? "2.75.18" : "unknown";
50151
+ const v = true ? "2.75.20" : "unknown";
50102
50152
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
50103
50153
  }
50104
50154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.75.18",
3
+ "version": "2.75.20",
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",