codeam-cli 2.39.59 → 2.39.60
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 +31 -12
- 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.39.59] — 2026-06-20
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **host-agent:** Resolve bundled claude via fs walk, not exports-blocked require
|
|
12
|
+
|
|
7
13
|
## [2.39.58] — 2026-06-20
|
|
8
14
|
|
|
9
15
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -5388,7 +5388,7 @@ function readAnonId() {
|
|
|
5388
5388
|
}
|
|
5389
5389
|
function superProperties() {
|
|
5390
5390
|
return {
|
|
5391
|
-
cliVersion: true ? "2.39.
|
|
5391
|
+
cliVersion: true ? "2.39.60" : "0.0.0-dev",
|
|
5392
5392
|
nodeVersion: process.version,
|
|
5393
5393
|
platform: process.platform,
|
|
5394
5394
|
arch: process.arch,
|
|
@@ -5547,7 +5547,7 @@ var os4 = __toESM(require("os"));
|
|
|
5547
5547
|
// package.json
|
|
5548
5548
|
var package_default = {
|
|
5549
5549
|
name: "codeam-cli",
|
|
5550
|
-
version: "2.39.
|
|
5550
|
+
version: "2.39.60",
|
|
5551
5551
|
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.",
|
|
5552
5552
|
type: "commonjs",
|
|
5553
5553
|
main: "dist/index.js",
|
|
@@ -17367,7 +17367,7 @@ function checkForUpdates() {
|
|
|
17367
17367
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17368
17368
|
if (process.env.CI) return;
|
|
17369
17369
|
if (!process.stdout.isTTY) return;
|
|
17370
|
-
const current = true ? "2.39.
|
|
17370
|
+
const current = true ? "2.39.60" : null;
|
|
17371
17371
|
if (!current) return;
|
|
17372
17372
|
const cache = readCache();
|
|
17373
17373
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -17769,7 +17769,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process13.s
|
|
|
17769
17769
|
detached: false
|
|
17770
17770
|
});
|
|
17771
17771
|
function currentCliVersion() {
|
|
17772
|
-
return true ? "2.39.
|
|
17772
|
+
return true ? "2.39.60" : null;
|
|
17773
17773
|
}
|
|
17774
17774
|
function runCmd(cmd, args2, timeoutMs) {
|
|
17775
17775
|
return new Promise((resolve7) => {
|
|
@@ -23448,6 +23448,11 @@ var AcpHistory = class {
|
|
|
23448
23448
|
]);
|
|
23449
23449
|
}
|
|
23450
23450
|
};
|
|
23451
|
+
var AUTH_FAILURE_RE = /invalid authentication credentials|authentication[_ ]error|please run \/login|\bunauthorized\b|\binvalid x-api-key\b|oauth token (?:expired|revoked)|(?:api error|http|status)[:\s]+401|\b401\b[^\n]{0,40}(?:unauthor|authenticat|credential|api[_ ]?key|login)/i;
|
|
23452
|
+
function looksLikeAuthFailure(text) {
|
|
23453
|
+
return AUTH_FAILURE_RE.test(text);
|
|
23454
|
+
}
|
|
23455
|
+
var AUTH_FAILURE_MESSAGE = "\u{1F512} **Authentication failed \u2014 your agent credentials are invalid or expired (API 401).**\n\nRe-authenticate this agent in **Profile \u203A Agents**, then send your message again.";
|
|
23451
23456
|
async function runAcpSession(opts) {
|
|
23452
23457
|
const publisher = new AcpPublisher({
|
|
23453
23458
|
sessionId: opts.sessionId,
|
|
@@ -23455,6 +23460,7 @@ async function runAcpSession(opts) {
|
|
|
23455
23460
|
pluginAuthToken: opts.pluginAuthToken
|
|
23456
23461
|
});
|
|
23457
23462
|
const streaming = new StreamingState(publisher);
|
|
23463
|
+
const recentStderr = [];
|
|
23458
23464
|
registerTerminalHandlers({
|
|
23459
23465
|
onData: ({ sessionId, data }) => {
|
|
23460
23466
|
void publisher.publishOutput({
|
|
@@ -23515,14 +23521,17 @@ async function runAcpSession(opts) {
|
|
|
23515
23521
|
optionIdByLabel
|
|
23516
23522
|
});
|
|
23517
23523
|
},
|
|
23518
|
-
onStderr: (
|
|
23524
|
+
onStderr: (line) => {
|
|
23525
|
+
recentStderr.push(line);
|
|
23526
|
+
if (recentStderr.length > 40) recentStderr.shift();
|
|
23519
23527
|
},
|
|
23520
23528
|
onUnexpectedExit: (code, signal) => {
|
|
23521
23529
|
log.warn("acpRunner", `adapter died code=${code} signal=${signal}; shutting down session`);
|
|
23530
|
+
const authFail = looksLikeAuthFailure(recentStderr.join("\n"));
|
|
23522
23531
|
void streaming.closeAll().then(
|
|
23523
23532
|
() => publisher.publishOutput({
|
|
23524
23533
|
type: "text",
|
|
23525
|
-
content: `Agent adapter exited unexpectedly (code=${code ?? "null"} signal=${signal ?? "null"}).`,
|
|
23534
|
+
content: authFail ? AUTH_FAILURE_MESSAGE : `Agent adapter exited unexpectedly (code=${code ?? "null"} signal=${signal ?? "null"}).`,
|
|
23526
23535
|
done: true
|
|
23527
23536
|
})
|
|
23528
23537
|
);
|
|
@@ -23616,7 +23625,9 @@ async function runAcpSession(opts) {
|
|
|
23616
23625
|
history,
|
|
23617
23626
|
initialize.agentCapabilities,
|
|
23618
23627
|
turnFiles,
|
|
23619
|
-
getBeads
|
|
23628
|
+
getBeads,
|
|
23629
|
+
publisher,
|
|
23630
|
+
recentStderr
|
|
23620
23631
|
);
|
|
23621
23632
|
},
|
|
23622
23633
|
{ id: opts.agent, name: opts.agent, displayName: opts.agent }
|
|
@@ -23640,7 +23651,7 @@ async function runAcpSession(opts) {
|
|
|
23640
23651
|
await new Promise(() => {
|
|
23641
23652
|
});
|
|
23642
23653
|
}
|
|
23643
|
-
async function handleCommand(cmd, client2, relay, acpSessionId, models, streaming, opts, history, agentCaps, turnFiles, getBeads) {
|
|
23654
|
+
async function handleCommand(cmd, client2, relay, acpSessionId, models, streaming, opts, history, agentCaps, turnFiles, getBeads, publisher, recentStderr) {
|
|
23644
23655
|
switch (cmd.type) {
|
|
23645
23656
|
case "beads_action": {
|
|
23646
23657
|
const beads = getBeads();
|
|
@@ -23691,8 +23702,16 @@ async function handleCommand(cmd, client2, relay, acpSessionId, models, streamin
|
|
|
23691
23702
|
await relay.sendResult(cmd.id, "completed", { stopReason: reply.stopReason });
|
|
23692
23703
|
} catch (err) {
|
|
23693
23704
|
await recoverFromFailedTurn(client2, streaming);
|
|
23694
|
-
|
|
23695
|
-
|
|
23705
|
+
const detail = describeError(err);
|
|
23706
|
+
log.warn("acpRunner", `prompt failed: ${detail}`);
|
|
23707
|
+
if (looksLikeAuthFailure(detail) || looksLikeAuthFailure(recentStderr.join("\n"))) {
|
|
23708
|
+
await publisher.publishOutput({
|
|
23709
|
+
type: "text",
|
|
23710
|
+
content: AUTH_FAILURE_MESSAGE,
|
|
23711
|
+
done: true
|
|
23712
|
+
});
|
|
23713
|
+
}
|
|
23714
|
+
await relay.sendResult(cmd.id, "failed", { error: detail });
|
|
23696
23715
|
}
|
|
23697
23716
|
return;
|
|
23698
23717
|
}
|
|
@@ -28321,7 +28340,7 @@ function checkChokidar() {
|
|
|
28321
28340
|
}
|
|
28322
28341
|
async function doctor(args2 = []) {
|
|
28323
28342
|
const json = args2.includes("--json");
|
|
28324
|
-
const cliVersion = true ? "2.39.
|
|
28343
|
+
const cliVersion = true ? "2.39.60" : "0.0.0-dev";
|
|
28325
28344
|
const apiBase2 = resolveApiBaseUrl();
|
|
28326
28345
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
28327
28346
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -28520,7 +28539,7 @@ async function completion(args2) {
|
|
|
28520
28539
|
// src/commands/version.ts
|
|
28521
28540
|
var import_picocolors14 = __toESM(require("picocolors"));
|
|
28522
28541
|
function version2() {
|
|
28523
|
-
const v = true ? "2.39.
|
|
28542
|
+
const v = true ? "2.39.60" : "unknown";
|
|
28524
28543
|
console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
|
|
28525
28544
|
}
|
|
28526
28545
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.39.
|
|
3
|
+
"version": "2.39.60",
|
|
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",
|