codeam-cli 2.39.86 → 2.39.87
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 +10 -0
- package/dist/index.js +53 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ 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.39.86] — 2026-06-23
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Report credential-invalid on mid-turn auth 401, not just adapter exit
|
|
12
|
+
|
|
13
|
+
### Tests
|
|
14
|
+
|
|
15
|
+
- **cli:** Reproduce-first guard for self-hosted house-agent 401
|
|
16
|
+
|
|
7
17
|
## [2.39.85] — 2026-06-23
|
|
8
18
|
|
|
9
19
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -5390,7 +5390,7 @@ function readAnonId() {
|
|
|
5390
5390
|
}
|
|
5391
5391
|
function superProperties() {
|
|
5392
5392
|
return {
|
|
5393
|
-
cliVersion: true ? "2.39.
|
|
5393
|
+
cliVersion: true ? "2.39.87" : "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.39.
|
|
5552
|
+
version: "2.39.87",
|
|
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",
|
|
@@ -11230,6 +11230,37 @@ function claudeCredentialLocator() {
|
|
|
11230
11230
|
validate: validateClaudeToken
|
|
11231
11231
|
};
|
|
11232
11232
|
}
|
|
11233
|
+
var SETUP_TOKEN_RE = /sk-ant-oat01-[A-Za-z0-9_-]+/;
|
|
11234
|
+
function extractSetupTokenFromOutput(output) {
|
|
11235
|
+
const m = output.match(SETUP_TOKEN_RE);
|
|
11236
|
+
return m ? m[0] : null;
|
|
11237
|
+
}
|
|
11238
|
+
function captureClaudeSetupToken() {
|
|
11239
|
+
return new Promise((resolve7, reject) => {
|
|
11240
|
+
const child = (0, import_node_child_process2.spawn)("claude", ["setup-token"], {
|
|
11241
|
+
stdio: ["inherit", "pipe", "inherit"]
|
|
11242
|
+
});
|
|
11243
|
+
let out2 = "";
|
|
11244
|
+
child.stdout?.on("data", (chunk) => {
|
|
11245
|
+
const s = chunk.toString("utf8");
|
|
11246
|
+
out2 += s;
|
|
11247
|
+
process.stdout.write(s);
|
|
11248
|
+
});
|
|
11249
|
+
child.on("error", (err) => reject(err));
|
|
11250
|
+
child.on("exit", (code) => {
|
|
11251
|
+
const token = extractSetupTokenFromOutput(out2);
|
|
11252
|
+
if (token) {
|
|
11253
|
+
resolve7({ method: "setup_token", credential: token, source: "setup-token" });
|
|
11254
|
+
return;
|
|
11255
|
+
}
|
|
11256
|
+
reject(
|
|
11257
|
+
new Error(
|
|
11258
|
+
`\`claude setup-token\` exited (code=${code ?? "null"}) without producing a token. Complete the browser authorization and paste the code when prompted, then re-run.`
|
|
11259
|
+
)
|
|
11260
|
+
);
|
|
11261
|
+
});
|
|
11262
|
+
});
|
|
11263
|
+
}
|
|
11233
11264
|
function claudeLoginLauncher() {
|
|
11234
11265
|
return {
|
|
11235
11266
|
ensureInstalled: ensureClaudeInstalled,
|
|
@@ -11237,7 +11268,11 @@ function claudeLoginLauncher() {
|
|
|
11237
11268
|
const child = (0, import_node_child_process2.spawn)("claude", [], { stdio: ["pipe", "inherit", "inherit"] });
|
|
11238
11269
|
child.stdin?.write("/login\n");
|
|
11239
11270
|
return child;
|
|
11240
|
-
}
|
|
11271
|
+
},
|
|
11272
|
+
// Preferred path for Claude: a dedicated non-rotating setup-token,
|
|
11273
|
+
// so the codespace credential never shares a refresh chain with the
|
|
11274
|
+
// user's laptop session.
|
|
11275
|
+
captureSetupToken: captureClaudeSetupToken
|
|
11241
11276
|
};
|
|
11242
11277
|
}
|
|
11243
11278
|
|
|
@@ -13448,6 +13483,16 @@ async function link(args2 = []) {
|
|
|
13448
13483
|
process.exit(1);
|
|
13449
13484
|
}
|
|
13450
13485
|
installSpin.stop(`${ctx.displayName} is installed`);
|
|
13486
|
+
if (ctx.launcher.captureSetupToken && !parsed.reuseExisting) {
|
|
13487
|
+
showInfo(
|
|
13488
|
+
`Creating a dedicated ${ctx.displayName} token for your codespaces \u2014 complete the sign-in in your browser and paste the code when prompted.`
|
|
13489
|
+
);
|
|
13490
|
+
console.log("");
|
|
13491
|
+
const setupToken = await ctx.launcher.captureSetupToken();
|
|
13492
|
+
console.log("");
|
|
13493
|
+
await uploadAndSucceed(ctx, paired, pluginId, pluginAuthToken, setupToken);
|
|
13494
|
+
return;
|
|
13495
|
+
}
|
|
13451
13496
|
const existing = await ctx.locator.extract();
|
|
13452
13497
|
if (existing) {
|
|
13453
13498
|
if (await refuseIfStale(ctx, paired, pluginId, pluginAuthToken, existing)) return;
|
|
@@ -17704,7 +17749,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
17704
17749
|
if (process.env.NODE_ENV === "test") return;
|
|
17705
17750
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17706
17751
|
if (process.env.CI) return;
|
|
17707
|
-
const current = true ? "2.39.
|
|
17752
|
+
const current = true ? "2.39.87" : null;
|
|
17708
17753
|
if (!current) return;
|
|
17709
17754
|
const cache = readCache();
|
|
17710
17755
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -17721,7 +17766,7 @@ function checkForUpdates() {
|
|
|
17721
17766
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17722
17767
|
if (process.env.CI) return;
|
|
17723
17768
|
if (!process.stdout.isTTY) return;
|
|
17724
|
-
const current = true ? "2.39.
|
|
17769
|
+
const current = true ? "2.39.87" : null;
|
|
17725
17770
|
if (!current) return;
|
|
17726
17771
|
const cache = readCache();
|
|
17727
17772
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -18159,7 +18204,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process14.s
|
|
|
18159
18204
|
detached: false
|
|
18160
18205
|
});
|
|
18161
18206
|
function currentCliVersion() {
|
|
18162
|
-
return true ? "2.39.
|
|
18207
|
+
return true ? "2.39.87" : null;
|
|
18163
18208
|
}
|
|
18164
18209
|
function runCmd(cmd, args2, timeoutMs) {
|
|
18165
18210
|
return new Promise((resolve7) => {
|
|
@@ -28979,7 +29024,7 @@ function checkChokidar() {
|
|
|
28979
29024
|
}
|
|
28980
29025
|
async function doctor(args2 = []) {
|
|
28981
29026
|
const json = args2.includes("--json");
|
|
28982
|
-
const cliVersion = true ? "2.39.
|
|
29027
|
+
const cliVersion = true ? "2.39.87" : "0.0.0-dev";
|
|
28983
29028
|
const apiBase2 = resolveApiBaseUrl();
|
|
28984
29029
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
28985
29030
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -29178,7 +29223,7 @@ async function completion(args2) {
|
|
|
29178
29223
|
// src/commands/version.ts
|
|
29179
29224
|
var import_picocolors14 = __toESM(require("picocolors"));
|
|
29180
29225
|
function version2() {
|
|
29181
|
-
const v = true ? "2.39.
|
|
29226
|
+
const v = true ? "2.39.87" : "unknown";
|
|
29182
29227
|
console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
|
|
29183
29228
|
}
|
|
29184
29229
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.39.
|
|
3
|
+
"version": "2.39.87",
|
|
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",
|