codeam-cli 2.40.2 → 2.41.0
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 +39 -9
- 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.40.2] — 2026-06-24
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Provision Claude setup-token via CLAUDE_CODE_OAUTH_TOKEN on self-hosted (was malformed .credentials.json → 401)
|
|
12
|
+
|
|
13
|
+
### Merge
|
|
14
|
+
|
|
15
|
+
- Provision Claude setup-token via CLAUDE_CODE_OAUTH_TOKEN on self-hosted
|
|
16
|
+
|
|
7
17
|
## [2.40.1] — 2026-06-24
|
|
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.
|
|
5393
|
+
cliVersion: true ? "2.41.0" : "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.
|
|
5552
|
+
version: "2.41.0",
|
|
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",
|
|
@@ -17753,7 +17753,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
17753
17753
|
if (process.env.NODE_ENV === "test") return;
|
|
17754
17754
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17755
17755
|
if (process.env.CI) return;
|
|
17756
|
-
const current = true ? "2.
|
|
17756
|
+
const current = true ? "2.41.0" : null;
|
|
17757
17757
|
if (!current) return;
|
|
17758
17758
|
const cache = readCache();
|
|
17759
17759
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -17770,7 +17770,7 @@ function checkForUpdates() {
|
|
|
17770
17770
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17771
17771
|
if (process.env.CI) return;
|
|
17772
17772
|
if (!process.stdout.isTTY) return;
|
|
17773
|
-
const current = true ? "2.
|
|
17773
|
+
const current = true ? "2.41.0" : null;
|
|
17774
17774
|
if (!current) return;
|
|
17775
17775
|
const cache = readCache();
|
|
17776
17776
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -18208,7 +18208,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process14.s
|
|
|
18208
18208
|
detached: false
|
|
18209
18209
|
});
|
|
18210
18210
|
function currentCliVersion() {
|
|
18211
|
-
return true ? "2.
|
|
18211
|
+
return true ? "2.41.0" : null;
|
|
18212
18212
|
}
|
|
18213
18213
|
function runCmd(cmd, args2, timeoutMs) {
|
|
18214
18214
|
return new Promise((resolve7) => {
|
|
@@ -24619,10 +24619,38 @@ function looksLikeAuthFailure(text) {
|
|
|
24619
24619
|
}
|
|
24620
24620
|
var AUTH_FAILURE_MESSAGE = "\u{1F512} **Authentication failed \u2014 your agent credentials are invalid or expired (API 401).**\n\nTap [Re-authenticate this agent](codeam://reauth) to renew your credentials in Profile \u203A Agents, then send your message again.";
|
|
24621
24621
|
var TURN_FAILURE_MESSAGE = "\u26A0\uFE0F **The agent hit an error and couldn\u2019t finish this turn.** Please send your message again.";
|
|
24622
|
+
var PROVIDER_OUTAGE_RE = /overloaded_error|\boverloaded\b|service[ _]unavailable|temporarily[ _]unavailable|(?:api error|http|status)[:\s]+(?:529|503|502|504)\b|\b(?:529|503|502|504)\b[^\n]{0,40}(?:overload|unavailable|gateway|upstream|server error)|bad gateway|gateway time-?out|upstream (?:error|connect|timeout)/i;
|
|
24623
|
+
function looksLikeProviderOutage(text) {
|
|
24624
|
+
return PROVIDER_OUTAGE_RE.test(text);
|
|
24625
|
+
}
|
|
24626
|
+
function agentStatusPage(agent) {
|
|
24627
|
+
const a = (agent ?? "").toLowerCase();
|
|
24628
|
+
if (a.includes("claude") || a.includes("anthropic"))
|
|
24629
|
+
return { vendor: "Anthropic", url: "https://status.anthropic.com" };
|
|
24630
|
+
if (a.includes("codex") || a.includes("openai"))
|
|
24631
|
+
return { vendor: "OpenAI", url: "https://status.openai.com" };
|
|
24632
|
+
if (a.includes("gemini") || a.includes("google"))
|
|
24633
|
+
return { vendor: "Google", url: "https://status.cloud.google.com" };
|
|
24634
|
+
if (a.includes("copilot")) return { vendor: "GitHub", url: "https://www.githubstatus.com" };
|
|
24635
|
+
if (a.includes("cursor")) return { vendor: "Cursor", url: "https://status.cursor.com" };
|
|
24636
|
+
return null;
|
|
24637
|
+
}
|
|
24638
|
+
function providerOutageMessage(agent) {
|
|
24639
|
+
const info = agentStatusPage(agent);
|
|
24640
|
+
const who = info ? info.vendor : "The agent provider";
|
|
24641
|
+
return `\u{1F310} **${who} is having a service disruption \u2014 this isn\u2019t your session.**
|
|
24642
|
+
|
|
24643
|
+
The agent provider returned an overload/outage error, so this turn couldn\u2019t finish. It usually clears up on its own \u2014 just send your message again in a bit.` + (info ? `
|
|
24644
|
+
|
|
24645
|
+
Follow the status here: [${info.url}](${info.url})` : "");
|
|
24646
|
+
}
|
|
24622
24647
|
function failureBubble(opts) {
|
|
24623
24648
|
if (looksLikeAuthFailure(opts.detail) || looksLikeAuthFailure(opts.recentStderr)) {
|
|
24624
24649
|
return AUTH_FAILURE_MESSAGE;
|
|
24625
24650
|
}
|
|
24651
|
+
if (looksLikeProviderOutage(opts.detail) || looksLikeProviderOutage(opts.recentStderr)) {
|
|
24652
|
+
return providerOutageMessage(opts.agent);
|
|
24653
|
+
}
|
|
24626
24654
|
if (!opts.hadText) return TURN_FAILURE_MESSAGE;
|
|
24627
24655
|
return null;
|
|
24628
24656
|
}
|
|
@@ -24740,6 +24768,7 @@ async function runAcpSession(opts) {
|
|
|
24740
24768
|
onUnexpectedExit: (code, signal) => {
|
|
24741
24769
|
log.warn("acpRunner", `adapter died code=${code} signal=${signal}; shutting down session`);
|
|
24742
24770
|
const authFail = looksLikeAuthFailure(recentStderr.join("\n"));
|
|
24771
|
+
const outageFail = !authFail && looksLikeProviderOutage(recentStderr.join("\n"));
|
|
24743
24772
|
if (authFail) {
|
|
24744
24773
|
void reportCredentialInvalid(opts);
|
|
24745
24774
|
}
|
|
@@ -24749,7 +24778,7 @@ async function runAcpSession(opts) {
|
|
|
24749
24778
|
await streaming.closeAll();
|
|
24750
24779
|
await publisher.publishOutput({
|
|
24751
24780
|
type: "text",
|
|
24752
|
-
content: authFail ? AUTH_FAILURE_MESSAGE : `Agent adapter exited unexpectedly (code=${code ?? "null"} signal=${signal ?? "null"}).`,
|
|
24781
|
+
content: authFail ? AUTH_FAILURE_MESSAGE : outageFail ? providerOutageMessage(opts.agent) : `Agent adapter exited unexpectedly (code=${code ?? "null"} signal=${signal ?? "null"}).`,
|
|
24753
24782
|
done: true
|
|
24754
24783
|
});
|
|
24755
24784
|
})(),
|
|
@@ -24937,7 +24966,8 @@ async function handleCommand(cmd, client2, relay, acpSessionId, models, streamin
|
|
|
24937
24966
|
const bubble = failureBubble({
|
|
24938
24967
|
detail,
|
|
24939
24968
|
recentStderr: recentStderr.join("\n"),
|
|
24940
|
-
hadText
|
|
24969
|
+
hadText,
|
|
24970
|
+
agent: opts.agent
|
|
24941
24971
|
});
|
|
24942
24972
|
if (bubble) {
|
|
24943
24973
|
await publisher.publishOutput({ type: "text", content: bubble, done: true });
|
|
@@ -29096,7 +29126,7 @@ function checkChokidar() {
|
|
|
29096
29126
|
}
|
|
29097
29127
|
async function doctor(args2 = []) {
|
|
29098
29128
|
const json = args2.includes("--json");
|
|
29099
|
-
const cliVersion = true ? "2.
|
|
29129
|
+
const cliVersion = true ? "2.41.0" : "0.0.0-dev";
|
|
29100
29130
|
const apiBase2 = resolveApiBaseUrl();
|
|
29101
29131
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
29102
29132
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -29295,7 +29325,7 @@ async function completion(args2) {
|
|
|
29295
29325
|
// src/commands/version.ts
|
|
29296
29326
|
var import_picocolors14 = __toESM(require("picocolors"));
|
|
29297
29327
|
function version2() {
|
|
29298
|
-
const v = true ? "2.
|
|
29328
|
+
const v = true ? "2.41.0" : "unknown";
|
|
29299
29329
|
console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
|
|
29300
29330
|
}
|
|
29301
29331
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.41.0",
|
|
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",
|