codeam-cli 2.26.15 → 2.26.16

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,12 @@ 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.26.15] — 2026-06-05
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Refuse to link Codex when local auth.json is already expired (#258)
12
+
7
13
  ## [2.26.14] — 2026-06-04
8
14
 
9
15
  ### Chore
package/dist/index.js CHANGED
@@ -486,7 +486,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
486
486
  // package.json
487
487
  var package_default = {
488
488
  name: "codeam-cli",
489
- version: "2.26.15",
489
+ version: "2.26.16",
490
490
  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.",
491
491
  type: "commonjs",
492
492
  main: "dist/index.js",
@@ -787,6 +787,21 @@ async function postLinkCredential(input) {
787
787
  };
788
788
  }
789
789
  }
790
+ async function postLinkErrorSignal(input) {
791
+ try {
792
+ await _transport.postJsonAuthed(
793
+ `${API_BASE}/api/plugin/agents/${input.agentId}/link-error`,
794
+ {
795
+ sessionId: input.sessionId,
796
+ pluginId: input.pluginId,
797
+ code: input.code,
798
+ reason: input.reason
799
+ },
800
+ input.pluginAuthToken
801
+ );
802
+ } catch {
803
+ }
804
+ }
790
805
  async function postAiResult(input) {
791
806
  const body = {
792
807
  sessionId: input.sessionId,
@@ -5843,7 +5858,7 @@ function readAnonId() {
5843
5858
  }
5844
5859
  function superProperties() {
5845
5860
  return {
5846
- cliVersion: true ? "2.26.15" : "0.0.0-dev",
5861
+ cliVersion: true ? "2.26.16" : "0.0.0-dev",
5847
5862
  nodeVersion: process.version,
5848
5863
  platform: process.platform,
5849
5864
  arch: process.arch,
@@ -15945,7 +15960,7 @@ async function link(args2 = []) {
15945
15960
  installSpin.stop(`${ctx.displayName} is installed`);
15946
15961
  const existing = await ctx.locator.extract();
15947
15962
  if (existing) {
15948
- if (refuseIfStale(ctx, existing)) return;
15963
+ if (await refuseIfStale(ctx, paired, pluginId, existing)) return;
15949
15964
  showInfo(`Found existing ${ctx.displayName} credentials at ${import_picocolors2.default.bold(existing.source)}.`);
15950
15965
  await uploadAndSucceed(ctx, paired, pluginId, existing);
15951
15966
  return;
@@ -15962,13 +15977,23 @@ async function link(args2 = []) {
15962
15977
  console.log("");
15963
15978
  const captured = await captureFreshCredentials(ctx);
15964
15979
  console.log("");
15965
- if (refuseIfStale(ctx, captured)) return;
15980
+ if (await refuseIfStale(ctx, paired, pluginId, captured)) return;
15966
15981
  await uploadAndSucceed(ctx, paired, pluginId, captured);
15967
15982
  }
15968
- function refuseIfStale(ctx, token) {
15983
+ async function refuseIfStale(ctx, paired, pluginId, token) {
15969
15984
  const verdict = ctx.locator.validate?.(token);
15970
15985
  if (!verdict || verdict.status !== "expired") return false;
15971
15986
  const reason = verdict.reason ?? "Token expired";
15987
+ if (paired.pluginAuthToken) {
15988
+ await postLinkErrorSignal({
15989
+ agentId: ctx.locator.publicId,
15990
+ sessionId: paired.sessionId,
15991
+ pluginId,
15992
+ pluginAuthToken: paired.pluginAuthToken,
15993
+ code: "credentials_expired",
15994
+ reason
15995
+ });
15996
+ }
15972
15997
  showError(
15973
15998
  `Your local ${ctx.displayName} credentials at ${import_picocolors2.default.bold(ctx.locator.hint)} are already expired:
15974
15999
  ${reason}
@@ -20314,7 +20339,7 @@ function checkChokidar() {
20314
20339
  }
20315
20340
  async function doctor(args2 = []) {
20316
20341
  const json = args2.includes("--json");
20317
- const cliVersion = true ? "2.26.15" : "0.0.0-dev";
20342
+ const cliVersion = true ? "2.26.16" : "0.0.0-dev";
20318
20343
  const apiBase = resolveApiBaseUrl();
20319
20344
  const diagnosticId = (0, import_node_crypto6.randomUUID)();
20320
20345
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -20513,7 +20538,7 @@ async function completion(args2) {
20513
20538
  // src/commands/version.ts
20514
20539
  var import_picocolors13 = __toESM(require("picocolors"));
20515
20540
  function version2() {
20516
- const v = true ? "2.26.15" : "unknown";
20541
+ const v = true ? "2.26.16" : "unknown";
20517
20542
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
20518
20543
  }
20519
20544
 
@@ -20741,7 +20766,7 @@ function checkForUpdates() {
20741
20766
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
20742
20767
  if (process.env.CI) return;
20743
20768
  if (!process.stdout.isTTY) return;
20744
- const current = true ? "2.26.15" : null;
20769
+ const current = true ? "2.26.16" : null;
20745
20770
  if (!current) return;
20746
20771
  const cache = readCache();
20747
20772
  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.26.15",
3
+ "version": "2.26.16",
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",