codeam-cli 2.40.0 → 2.40.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ 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.40.0] — 2026-06-24
8
+
9
+ ### Added
10
+
11
+ - **cli:** Add formatAgentReplyLine for the pair full-thread echo
12
+ - **cli:** Echo agent reply in codeam pair so the full thread is visible
13
+
14
+ ### Fixed
15
+
16
+ - **cli:** Refresh plugin-auth token and retry once on 401/403 output POST
17
+ - **cli:** Wire plugin-auth token refresh into ACP publisher
18
+ - **cli:** Await bounded terminal-frame flush before adapter-exit teardown
19
+
20
+ ### Merge
21
+
22
+ - Session-hang CLI fix (token self-heal + flush-before-exit) + codeam pair agent-reply echo
23
+
7
24
  ## [2.39.87] — 2026-06-23
8
25
 
9
26
  ### Added
package/dist/index.js CHANGED
@@ -5390,7 +5390,7 @@ function readAnonId() {
5390
5390
  }
5391
5391
  function superProperties() {
5392
5392
  return {
5393
- cliVersion: true ? "2.40.0" : "0.0.0-dev",
5393
+ cliVersion: true ? "2.40.1" : "0.0.0-dev",
5394
5394
  nodeVersion: process.version,
5395
5395
  platform: process.platform,
5396
5396
  arch: process.arch,
@@ -5549,7 +5549,7 @@ var os4 = __toESM(require("os"));
5549
5549
  // package.json
5550
5550
  var package_default = {
5551
5551
  name: "codeam-cli",
5552
- version: "2.40.0",
5552
+ version: "2.40.1",
5553
5553
  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.",
5554
5554
  type: "commonjs",
5555
5555
  main: "dist/index.js",
@@ -17749,7 +17749,7 @@ async function autoUpgradeBeforeCriticalCommand() {
17749
17749
  if (process.env.NODE_ENV === "test") return;
17750
17750
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17751
17751
  if (process.env.CI) return;
17752
- const current = true ? "2.40.0" : null;
17752
+ const current = true ? "2.40.1" : null;
17753
17753
  if (!current) return;
17754
17754
  const cache = readCache();
17755
17755
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17766,7 +17766,7 @@ function checkForUpdates() {
17766
17766
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17767
17767
  if (process.env.CI) return;
17768
17768
  if (!process.stdout.isTTY) return;
17769
- const current = true ? "2.40.0" : null;
17769
+ const current = true ? "2.40.1" : null;
17770
17770
  if (!current) return;
17771
17771
  const cache = readCache();
17772
17772
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -18204,7 +18204,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process14.s
18204
18204
  detached: false
18205
18205
  });
18206
18206
  function currentCliVersion() {
18207
- return true ? "2.40.0" : null;
18207
+ return true ? "2.40.1" : null;
18208
18208
  }
18209
18209
  function runCmd(cmd, args2, timeoutMs) {
18210
18210
  return new Promise((resolve7) => {
@@ -24623,18 +24623,28 @@ function failureBubble(opts) {
24623
24623
  return null;
24624
24624
  }
24625
24625
  async function reportCredentialInvalid(opts, fetchImpl = fetch) {
24626
+ const url = `${resolveApiBaseUrl()}/api/plugin/agents/${encodeURIComponent(opts.agent)}/credential-invalid`;
24627
+ const body = JSON.stringify({ sessionId: opts.sessionId, pluginId: opts.pluginId });
24626
24628
  try {
24627
- await fetchImpl(
24628
- `${resolveApiBaseUrl()}/api/plugin/agents/${encodeURIComponent(opts.agent)}/credential-invalid`,
24629
- {
24630
- method: "POST",
24631
- headers: {
24632
- "Content-Type": "application/json",
24633
- "X-Plugin-Auth-Token": opts.pluginAuthToken
24634
- },
24635
- body: JSON.stringify({ sessionId: opts.sessionId, pluginId: opts.pluginId })
24629
+ const makeHeaders = (token) => ({
24630
+ "Content-Type": "application/json",
24631
+ "X-Plugin-Auth-Token": token
24632
+ });
24633
+ const response = await fetchImpl(url, {
24634
+ method: "POST",
24635
+ headers: makeHeaders(opts.pluginAuthToken),
24636
+ body
24637
+ });
24638
+ if (response.status === 401 || response.status === 403) {
24639
+ const freshToken = await fetchCurrentPluginAuthToken(
24640
+ opts.sessionId,
24641
+ opts.pluginId,
24642
+ opts.pollSecret
24643
+ );
24644
+ if (freshToken !== null) {
24645
+ await fetchImpl(url, { method: "POST", headers: makeHeaders(freshToken), body });
24636
24646
  }
24637
- );
24647
+ }
24638
24648
  } catch {
24639
24649
  }
24640
24650
  }
@@ -29082,7 +29092,7 @@ function checkChokidar() {
29082
29092
  }
29083
29093
  async function doctor(args2 = []) {
29084
29094
  const json = args2.includes("--json");
29085
- const cliVersion = true ? "2.40.0" : "0.0.0-dev";
29095
+ const cliVersion = true ? "2.40.1" : "0.0.0-dev";
29086
29096
  const apiBase2 = resolveApiBaseUrl();
29087
29097
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
29088
29098
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -29281,7 +29291,7 @@ async function completion(args2) {
29281
29291
  // src/commands/version.ts
29282
29292
  var import_picocolors14 = __toESM(require("picocolors"));
29283
29293
  function version2() {
29284
- const v = true ? "2.40.0" : "unknown";
29294
+ const v = true ? "2.40.1" : "unknown";
29285
29295
  console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
29286
29296
  }
29287
29297
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.40.0",
3
+ "version": "2.40.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",