codeam-cli 2.28.0 → 2.29.0

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,29 @@ 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.28.1] — 2026-06-06
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** RequestCode times out at 10s instead of hanging forever
12
+
13
+ ## [2.28.0] — 2026-06-06
14
+
15
+ ### Added
16
+
17
+ - **cli:** Auto-update on stale version + re-exec into new binary
18
+
19
+ ### Fixed
20
+
21
+ - **cli:** IDE terminal output + Save round-trip on ACP sessions
22
+ - **cli:** File-watcher honors .gitignore per-repo
23
+ - **cli:** Refresh pluginAuthToken on boot to survive JWT_SECRET rotation
24
+ - **cli:** Use /pairing/reconnect on boot to refresh token + activate session
25
+
26
+ ### Diag
27
+
28
+ - **cli:** Log boot triple + on-401 triple to isolate INVALID_PLUGIN_TOKEN
29
+
7
30
  ## [2.27.16] — 2026-06-06
8
31
 
9
32
  ### Added
package/dist/index.js CHANGED
@@ -498,7 +498,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
498
498
  // package.json
499
499
  var package_default = {
500
500
  name: "codeam-cli",
501
- version: "2.28.0",
501
+ version: "2.29.0",
502
502
  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.",
503
503
  type: "commonjs",
504
504
  main: "dist/index.js",
@@ -692,20 +692,34 @@ function computePollDelay({ baseMs, failures }) {
692
692
 
693
693
  // src/services/pairing.service.ts
694
694
  var API_BASE = resolveApiBaseUrl();
695
- async function requestCode(pluginId) {
695
+ var REQUEST_CODE_TIMEOUT_MS = 1e4;
696
+ async function requestCode(pluginId, options = {}) {
696
697
  try {
697
698
  const runtime = process.env.CODESPACES === "true" ? "github-codespaces" : "local";
698
699
  const codespaceName = process.env.CODESPACE_NAME;
699
700
  const branch = detectCurrentBranch();
700
- const result = await _transport.postJson(`${API_BASE}/api/pairing/code`, {
701
+ const post2 = _transport.postJson(`${API_BASE}/api/pairing/code`, {
701
702
  pluginId,
702
703
  ideName: "Terminal (codeam-cli)",
703
704
  ideVersion: package_default.version,
704
705
  hostname: os2.hostname(),
705
706
  runtime,
706
707
  branch,
707
- ...codespaceName ? { codespaceName } : {}
708
+ ...codespaceName ? { codespaceName } : {},
709
+ ...options.originatorSessionId && options.originatorPluginId && options.originatorAuthToken ? {
710
+ originatorSessionId: options.originatorSessionId,
711
+ originatorPluginId: options.originatorPluginId,
712
+ originatorAuthToken: options.originatorAuthToken
713
+ } : {}
708
714
  });
715
+ let timer;
716
+ const timeoutSentinel = /* @__PURE__ */ Symbol("request-code-timeout");
717
+ const timeoutPromise = new Promise((resolve6) => {
718
+ timer = setTimeout(() => resolve6(timeoutSentinel), REQUEST_CODE_TIMEOUT_MS);
719
+ });
720
+ const result = await Promise.race([post2, timeoutPromise]);
721
+ clearTimeout(timer);
722
+ if (result === timeoutSentinel) return null;
709
723
  const data = result?.data;
710
724
  if (!data?.code) return null;
711
725
  return { code: data.code, expiresAt: data.expiresAt };
@@ -5888,7 +5902,7 @@ function readAnonId() {
5888
5902
  }
5889
5903
  function superProperties() {
5890
5904
  return {
5891
- cliVersion: true ? "2.28.0" : "0.0.0-dev",
5905
+ cliVersion: true ? "2.29.0" : "0.0.0-dev",
5892
5906
  nodeVersion: process.version,
5893
5907
  platform: process.platform,
5894
5908
  arch: process.arch,
@@ -16372,7 +16386,12 @@ async function link(args2 = []) {
16372
16386
  const pluginId = (0, import_node_crypto6.randomUUID)();
16373
16387
  const spin = dist_exports.spinner();
16374
16388
  spin.start("Requesting pairing code...");
16375
- const pairing = await requestCode(pluginId);
16389
+ const originator = getActiveSession();
16390
+ const pairing = await requestCode(pluginId, {
16391
+ originatorSessionId: originator?.id,
16392
+ originatorPluginId: originator?.pluginId,
16393
+ originatorAuthToken: originator?.pluginAuthToken
16394
+ });
16376
16395
  if (!pairing) {
16377
16396
  spin.stop("Failed");
16378
16397
  showError("Could not reach the server. Check your connection and try again.");
@@ -24670,7 +24689,7 @@ function checkChokidar() {
24670
24689
  }
24671
24690
  async function doctor(args2 = []) {
24672
24691
  const json = args2.includes("--json");
24673
- const cliVersion = true ? "2.28.0" : "0.0.0-dev";
24692
+ const cliVersion = true ? "2.29.0" : "0.0.0-dev";
24674
24693
  const apiBase = resolveApiBaseUrl();
24675
24694
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
24676
24695
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -24869,7 +24888,7 @@ async function completion(args2) {
24869
24888
  // src/commands/version.ts
24870
24889
  var import_picocolors13 = __toESM(require("picocolors"));
24871
24890
  function version2() {
24872
- const v = true ? "2.28.0" : "unknown";
24891
+ const v = true ? "2.29.0" : "unknown";
24873
24892
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
24874
24893
  }
24875
24894
 
@@ -25155,7 +25174,7 @@ function checkForUpdates() {
25155
25174
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
25156
25175
  if (process.env.CI) return;
25157
25176
  if (!process.stdout.isTTY) return;
25158
- const current = true ? "2.28.0" : null;
25177
+ const current = true ? "2.29.0" : null;
25159
25178
  if (!current) return;
25160
25179
  const cache = readCache();
25161
25180
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.28.0",
3
+ "version": "2.29.0",
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",