codeam-cli 2.51.2 → 2.51.3
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 +6 -0
- package/dist/index.js +36 -11
- package/package.json +1 -1
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.51.2] — 2026-06-29
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **headroom:** Route budget relaunch through supervisor when headroom install is active
|
|
12
|
+
|
|
7
13
|
## [2.51.1] — 2026-06-29
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -5397,7 +5397,7 @@ function readAnonId() {
|
|
|
5397
5397
|
}
|
|
5398
5398
|
function superProperties() {
|
|
5399
5399
|
return {
|
|
5400
|
-
cliVersion: true ? "2.51.
|
|
5400
|
+
cliVersion: true ? "2.51.3" : "0.0.0-dev",
|
|
5401
5401
|
nodeVersion: process.version,
|
|
5402
5402
|
platform: process.platform,
|
|
5403
5403
|
arch: process.arch,
|
|
@@ -5578,7 +5578,7 @@ var os4 = __toESM(require("os"));
|
|
|
5578
5578
|
// package.json
|
|
5579
5579
|
var package_default = {
|
|
5580
5580
|
name: "codeam-cli",
|
|
5581
|
-
version: "2.51.
|
|
5581
|
+
version: "2.51.3",
|
|
5582
5582
|
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.",
|
|
5583
5583
|
type: "commonjs",
|
|
5584
5584
|
main: "dist/index.js",
|
|
@@ -13984,13 +13984,16 @@ function saveHostIdentity(identity) {
|
|
|
13984
13984
|
});
|
|
13985
13985
|
fs27.chmodSync(file, 384);
|
|
13986
13986
|
}
|
|
13987
|
+
var TERMINAL_ENROLL_CODES = /* @__PURE__ */ new Set(["ENROLL_TOKEN_EXPIRED", "ENROLL_TOKEN_INVALID"]);
|
|
13987
13988
|
var HostHttpError = class extends Error {
|
|
13988
|
-
constructor(message, status2) {
|
|
13989
|
+
constructor(message, status2, code) {
|
|
13989
13990
|
super(message);
|
|
13990
13991
|
this.status = status2;
|
|
13992
|
+
this.code = code;
|
|
13991
13993
|
this.name = "HostHttpError";
|
|
13992
13994
|
}
|
|
13993
13995
|
status;
|
|
13996
|
+
code;
|
|
13994
13997
|
/**
|
|
13995
13998
|
* True iff this is a genuine auth-rejection of the host identity:
|
|
13996
13999
|
* 401 (token invalid), 403 (forbidden), 404 (host not found / deleted).
|
|
@@ -13999,10 +14002,25 @@ var HostHttpError = class extends Error {
|
|
|
13999
14002
|
get isAuthRejection() {
|
|
14000
14003
|
return this.status === 401 || this.status === 403 || this.status === 404;
|
|
14001
14004
|
}
|
|
14005
|
+
/**
|
|
14006
|
+
* True iff the enroll token is permanently unusable: the backend returned
|
|
14007
|
+
* a terminal 4xx (410 Gone for expired/replayed, 400 Bad Request for
|
|
14008
|
+
* malformed/invalid) with a stable `ENROLL_TOKEN_*` error code.
|
|
14009
|
+
*
|
|
14010
|
+
* These failures must NOT be retried — the token will never become valid
|
|
14011
|
+
* again. The host-agent must surface a clear message and exit so the user
|
|
14012
|
+
* knows to generate a new token in the app.
|
|
14013
|
+
*/
|
|
14014
|
+
get isTerminalEnrollError() {
|
|
14015
|
+
return typeof this.code === "string" && TERMINAL_ENROLL_CODES.has(this.code);
|
|
14016
|
+
}
|
|
14002
14017
|
};
|
|
14003
14018
|
function isHostAuthRejection(err) {
|
|
14004
14019
|
return err instanceof HostHttpError && err.isAuthRejection;
|
|
14005
14020
|
}
|
|
14021
|
+
function isTerminalEnrollError(err) {
|
|
14022
|
+
return err instanceof HostHttpError && err.isTerminalEnrollError;
|
|
14023
|
+
}
|
|
14006
14024
|
function deleteHostIdentity() {
|
|
14007
14025
|
try {
|
|
14008
14026
|
fs27.rmSync(hostIdentityPath(), { force: true });
|
|
@@ -14017,10 +14035,11 @@ async function postJson(pathname, body) {
|
|
|
14017
14035
|
});
|
|
14018
14036
|
const json = await res.json();
|
|
14019
14037
|
if (!res.ok || !json.success) {
|
|
14020
|
-
const
|
|
14038
|
+
const errBody = !json.success ? json.error : void 0;
|
|
14021
14039
|
throw new HostHttpError(
|
|
14022
|
-
`${pathname} failed (${
|
|
14023
|
-
res.status
|
|
14040
|
+
`${pathname} failed (${errBody?.code ?? `HTTP_${res.status}`}): ${errBody?.message ?? res.statusText}`,
|
|
14041
|
+
res.status,
|
|
14042
|
+
errBody?.code
|
|
14024
14043
|
);
|
|
14025
14044
|
}
|
|
14026
14045
|
return json.data;
|
|
@@ -14810,7 +14829,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
14810
14829
|
if (process.env.NODE_ENV === "test") return;
|
|
14811
14830
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
14812
14831
|
if (process.env.CI) return;
|
|
14813
|
-
const current = true ? "2.51.
|
|
14832
|
+
const current = true ? "2.51.3" : null;
|
|
14814
14833
|
if (!current) return;
|
|
14815
14834
|
const cache = readCache();
|
|
14816
14835
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -14827,7 +14846,7 @@ function checkForUpdates() {
|
|
|
14827
14846
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
14828
14847
|
if (process.env.CI) return;
|
|
14829
14848
|
if (!process.stdout.isTTY) return;
|
|
14830
|
-
const current = true ? "2.51.
|
|
14849
|
+
const current = true ? "2.51.3" : null;
|
|
14831
14850
|
if (!current) return;
|
|
14832
14851
|
const cache = readCache();
|
|
14833
14852
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -15529,7 +15548,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process15.s
|
|
|
15529
15548
|
detached: false
|
|
15530
15549
|
});
|
|
15531
15550
|
function currentCliVersion() {
|
|
15532
|
-
return true ? "2.51.
|
|
15551
|
+
return true ? "2.51.3" : null;
|
|
15533
15552
|
}
|
|
15534
15553
|
function runCmd(cmd, args2, timeoutMs) {
|
|
15535
15554
|
return new Promise((resolve7) => {
|
|
@@ -16193,6 +16212,12 @@ async function resolveHostIdentity(enrollToken) {
|
|
|
16193
16212
|
);
|
|
16194
16213
|
return identity;
|
|
16195
16214
|
} catch (err) {
|
|
16215
|
+
if (isTerminalEnrollError(err)) {
|
|
16216
|
+
throw new Error(
|
|
16217
|
+
"Enrollment token expired or invalid \u2014 generate a new one in the app (Settings \u203A Servers \u203A Add server). Tokens expire after 15 minutes and are single-use.",
|
|
16218
|
+
{ cause: err }
|
|
16219
|
+
);
|
|
16220
|
+
}
|
|
16196
16221
|
if (existing) {
|
|
16197
16222
|
log.trace(
|
|
16198
16223
|
"host-agent",
|
|
@@ -31061,7 +31086,7 @@ function checkChokidar() {
|
|
|
31061
31086
|
}
|
|
31062
31087
|
async function doctor(args2 = []) {
|
|
31063
31088
|
const json = args2.includes("--json");
|
|
31064
|
-
const cliVersion = true ? "2.51.
|
|
31089
|
+
const cliVersion = true ? "2.51.3" : "0.0.0-dev";
|
|
31065
31090
|
const apiBase2 = resolveApiBaseUrl();
|
|
31066
31091
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
31067
31092
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -31260,7 +31285,7 @@ async function completion(args2) {
|
|
|
31260
31285
|
// src/commands/version.ts
|
|
31261
31286
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
31262
31287
|
function version2() {
|
|
31263
|
-
const v = true ? "2.51.
|
|
31288
|
+
const v = true ? "2.51.3" : "unknown";
|
|
31264
31289
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
31265
31290
|
}
|
|
31266
31291
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.51.
|
|
3
|
+
"version": "2.51.3",
|
|
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",
|