codeam-cli 2.43.5 → 2.43.7
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 +12 -0
- package/dist/index.js +117 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ 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.43.6] — 2026-06-25
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** ACP newSession no longer hangs forever on a fatal startup error
|
|
12
|
+
|
|
13
|
+
## [2.43.5] — 2026-06-25
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **cli:** Self-hosted provisioning for Gemini credentials
|
|
18
|
+
|
|
7
19
|
## [2.43.4] — 2026-06-25
|
|
8
20
|
|
|
9
21
|
### 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.43.
|
|
5400
|
+
cliVersion: true ? "2.43.7" : "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.43.
|
|
5581
|
+
version: "2.43.7",
|
|
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",
|
|
@@ -17899,7 +17899,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
17899
17899
|
if (process.env.NODE_ENV === "test") return;
|
|
17900
17900
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17901
17901
|
if (process.env.CI) return;
|
|
17902
|
-
const current = true ? "2.43.
|
|
17902
|
+
const current = true ? "2.43.7" : null;
|
|
17903
17903
|
if (!current) return;
|
|
17904
17904
|
const cache = readCache();
|
|
17905
17905
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -17916,7 +17916,7 @@ function checkForUpdates() {
|
|
|
17916
17916
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17917
17917
|
if (process.env.CI) return;
|
|
17918
17918
|
if (!process.stdout.isTTY) return;
|
|
17919
|
-
const current = true ? "2.43.
|
|
17919
|
+
const current = true ? "2.43.7" : null;
|
|
17920
17920
|
if (!current) return;
|
|
17921
17921
|
const cache = readCache();
|
|
17922
17922
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -18354,7 +18354,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process14.s
|
|
|
18354
18354
|
detached: false
|
|
18355
18355
|
});
|
|
18356
18356
|
function currentCliVersion() {
|
|
18357
|
-
return true ? "2.43.
|
|
18357
|
+
return true ? "2.43.7" : null;
|
|
18358
18358
|
}
|
|
18359
18359
|
function runCmd(cmd, args2, timeoutMs) {
|
|
18360
18360
|
return new Promise((resolve7) => {
|
|
@@ -22834,6 +22834,8 @@ function createIdleTimeout(idleMs, makeError) {
|
|
|
22834
22834
|
|
|
22835
22835
|
// src/agents/acp/client.ts
|
|
22836
22836
|
var PROTOCOL_VERSION2 = 1;
|
|
22837
|
+
var FATAL_STARTUP_RE = /IneligibleTierError|UNSUPPORTED_CLIENT|no longer supported for Gemini Code Assist|not eligible for Gemini Code Assist|Error authenticating|ProjectIdRequiredError/i;
|
|
22838
|
+
var NEWSESSION_TIMEOUT_MS = 12e4;
|
|
22837
22839
|
var PROMPT_IDLE_TIMEOUT_MS = 9e4;
|
|
22838
22840
|
var CLIENT_CAPABILITIES = {
|
|
22839
22841
|
fs: { readTextFile: true, writeTextFile: true },
|
|
@@ -22861,6 +22863,14 @@ var AcpClient = class {
|
|
|
22861
22863
|
* (the agent is demonstrably working, just blocked on the tool), and
|
|
22862
22864
|
* re-arm only once the last one finishes. Reset per prompt. */
|
|
22863
22865
|
pendingToolCalls = /* @__PURE__ */ new Set();
|
|
22866
|
+
/** Last few adapter stderr lines — so a startup failure surfaces the REAL
|
|
22867
|
+
* cause (e.g. gemini's `IneligibleTierError`) instead of a bare timeout. */
|
|
22868
|
+
recentStderr = [];
|
|
22869
|
+
/** Set while `newSession` is in flight; the stderr watcher calls it to fail
|
|
22870
|
+
* fast when the adapter prints a fatal startup error. `gemini --acp`
|
|
22871
|
+
* swallows the Code Assist onboarding error and never rejects `newSession`,
|
|
22872
|
+
* so without this the session hangs forever ("loading… / offline"). */
|
|
22873
|
+
startupFailureReject = null;
|
|
22864
22874
|
/**
|
|
22865
22875
|
* Spawn the adapter + perform the initial handshake (initialize
|
|
22866
22876
|
* → newSession). Returns the ACP-assigned sessionId so the caller
|
|
@@ -22893,6 +22903,12 @@ var AcpClient = class {
|
|
|
22893
22903
|
if (trimmed) {
|
|
22894
22904
|
log.info("acpAdapter", trimmed);
|
|
22895
22905
|
this.opts.onStderr?.(trimmed);
|
|
22906
|
+
this.recentStderr.push(trimmed);
|
|
22907
|
+
if (this.recentStderr.length > 12) this.recentStderr.shift();
|
|
22908
|
+
if (this.startupFailureReject && FATAL_STARTUP_RE.test(trimmed)) {
|
|
22909
|
+
this.startupFailureReject(new Error(`AGENT_STARTUP_FAILED: ${trimmed}`));
|
|
22910
|
+
this.startupFailureReject = null;
|
|
22911
|
+
}
|
|
22896
22912
|
}
|
|
22897
22913
|
}
|
|
22898
22914
|
});
|
|
@@ -22929,10 +22945,30 @@ var AcpClient = class {
|
|
|
22929
22945
|
`initialize \u2190 ok protocolVersion=${initialize.protocolVersion} agentCaps=${JSON.stringify(initialize.agentCapabilities ?? {}).slice(0, 200)}`
|
|
22930
22946
|
);
|
|
22931
22947
|
log.info("acpClient", "newSession \u2192 sending");
|
|
22932
|
-
|
|
22933
|
-
|
|
22934
|
-
|
|
22948
|
+
let startupTimer;
|
|
22949
|
+
const startupFailure = new Promise((_2, reject) => {
|
|
22950
|
+
this.startupFailureReject = reject;
|
|
22951
|
+
startupTimer = setTimeout(() => {
|
|
22952
|
+
const tail = this.recentStderr.slice(-4).join(" | ");
|
|
22953
|
+
reject(
|
|
22954
|
+
new Error(
|
|
22955
|
+
`AGENT_STARTUP_TIMEOUT: ${this.opts.adapter.requiresAgentBinary} did not create a session within ${Math.round(
|
|
22956
|
+
NEWSESSION_TIMEOUT_MS / 1e3
|
|
22957
|
+
)}s${tail ? ` \u2014 last output: ${tail}` : ""}`
|
|
22958
|
+
)
|
|
22959
|
+
);
|
|
22960
|
+
}, NEWSESSION_TIMEOUT_MS);
|
|
22935
22961
|
});
|
|
22962
|
+
let newSession;
|
|
22963
|
+
try {
|
|
22964
|
+
newSession = await Promise.race([
|
|
22965
|
+
this.connection.newSession({ cwd, mcpServers: [] }),
|
|
22966
|
+
startupFailure
|
|
22967
|
+
]);
|
|
22968
|
+
} finally {
|
|
22969
|
+
if (startupTimer) clearTimeout(startupTimer);
|
|
22970
|
+
this.startupFailureReject = null;
|
|
22971
|
+
}
|
|
22936
22972
|
this.sessionId = newSession.sessionId;
|
|
22937
22973
|
const newSessionMeta = newSession;
|
|
22938
22974
|
log.info(
|
|
@@ -24958,6 +24994,61 @@ The agent provider returned an overload/outage error, so this turn couldn\u2019t
|
|
|
24958
24994
|
|
|
24959
24995
|
Follow the status here: [${info.url}](${info.url})` : "");
|
|
24960
24996
|
}
|
|
24997
|
+
function isGeminiIneligibleTier(haystack) {
|
|
24998
|
+
return /IneligibleTierError|UNSUPPORTED_CLIENT|no longer supported for Gemini Code Assist|not eligible for Gemini Code Assist/i.test(
|
|
24999
|
+
haystack
|
|
25000
|
+
);
|
|
25001
|
+
}
|
|
25002
|
+
function startupFailureMessage(agent, detail, recentStderr) {
|
|
25003
|
+
const haystack = `${detail}
|
|
25004
|
+
${recentStderr}`;
|
|
25005
|
+
if (agent === "gemini" && isGeminiIneligibleTier(haystack)) {
|
|
25006
|
+
return [
|
|
25007
|
+
"\u26A0\uFE0F **Gemini couldn't start \u2014 your Google account isn't eligible.**",
|
|
25008
|
+
"",
|
|
25009
|
+
"Google discontinued free **\u201CLogin with Google\u201D** access to the Gemini CLI on 2026-06-18. The free / individual tier (and Google AI Pro/Ultra) can no longer authenticate here.",
|
|
25010
|
+
"",
|
|
25011
|
+
"To use Gemini from CodeAgent, re-link it in **Profile \u203A Agents** with either:",
|
|
25012
|
+
"\u2022 a **Gemini API key** (AI Studio \u2014 free quota available), or",
|
|
25013
|
+
"\u2022 a paid **Gemini Code Assist (Standard/Enterprise)** subscription."
|
|
25014
|
+
].join("\n");
|
|
25015
|
+
}
|
|
25016
|
+
if (looksLikeAuthFailure(haystack)) return AUTH_FAILURE_MESSAGE;
|
|
25017
|
+
if (looksLikeProviderOutage(haystack)) return providerOutageMessage(agent);
|
|
25018
|
+
const tail = recentStderr.split("\n").filter(Boolean).slice(-3).join("\n");
|
|
25019
|
+
return [
|
|
25020
|
+
`\u26A0\uFE0F The ${agent} agent failed to start.`,
|
|
25021
|
+
"",
|
|
25022
|
+
tail ? `Details:
|
|
25023
|
+
${tail}` : detail
|
|
25024
|
+
].join("\n");
|
|
25025
|
+
}
|
|
25026
|
+
async function surfaceStartupFailure(opts) {
|
|
25027
|
+
const msg = startupFailureMessage(opts.agent, opts.detail, opts.recentStderr);
|
|
25028
|
+
const publish = async () => {
|
|
25029
|
+
try {
|
|
25030
|
+
await opts.publisher.publishOutput({ type: "new_turn", done: false });
|
|
25031
|
+
await opts.publisher.publishOutput({ type: "text", content: msg, done: true });
|
|
25032
|
+
} catch {
|
|
25033
|
+
}
|
|
25034
|
+
};
|
|
25035
|
+
await publish();
|
|
25036
|
+
const errRelay = new CommandRelayService(
|
|
25037
|
+
opts.pluginId,
|
|
25038
|
+
async (cmd) => {
|
|
25039
|
+
if (cmd.type === "get_conversation") {
|
|
25040
|
+
await errRelay.sendResult(cmd.id, "completed", {}).catch(() => void 0);
|
|
25041
|
+
return;
|
|
25042
|
+
}
|
|
25043
|
+
await publish();
|
|
25044
|
+
await errRelay.sendResult(cmd.id, "failed", {
|
|
25045
|
+
error: `${opts.agent} is unavailable \u2014 see the message in chat.`
|
|
25046
|
+
}).catch(() => void 0);
|
|
25047
|
+
},
|
|
25048
|
+
{ id: opts.agent, name: opts.agent, displayName: opts.agent }
|
|
25049
|
+
);
|
|
25050
|
+
errRelay.start();
|
|
25051
|
+
}
|
|
24961
25052
|
function failureBubble(opts) {
|
|
24962
25053
|
if (looksLikeAuthFailure(opts.detail) || looksLikeAuthFailure(opts.recentStderr)) {
|
|
24963
25054
|
return AUTH_FAILURE_MESSAGE;
|
|
@@ -25158,12 +25249,27 @@ async function runAcpSession(opts) {
|
|
|
25158
25249
|
log: (msg) => log.info("acpRunner", msg)
|
|
25159
25250
|
});
|
|
25160
25251
|
showInfo(`Starting ${opts.agent} via ACP adapter (${opts.adapter.requiresAgentBinary})\u2026`);
|
|
25252
|
+
let handshake;
|
|
25253
|
+
try {
|
|
25254
|
+
handshake = await client2.start();
|
|
25255
|
+
} catch (startErr) {
|
|
25256
|
+
const detail = describeError(startErr);
|
|
25257
|
+
log.warn("acpRunner", `ACP start failed for ${opts.agent}: ${detail}`);
|
|
25258
|
+
await surfaceStartupFailure({
|
|
25259
|
+
agent: opts.agent,
|
|
25260
|
+
pluginId: opts.pluginId,
|
|
25261
|
+
detail,
|
|
25262
|
+
recentStderr: recentStderr.join("\n"),
|
|
25263
|
+
publisher
|
|
25264
|
+
});
|
|
25265
|
+
return;
|
|
25266
|
+
}
|
|
25161
25267
|
const {
|
|
25162
25268
|
sessionId: acpSessionId,
|
|
25163
25269
|
initialize,
|
|
25164
25270
|
model: handshakeModel,
|
|
25165
25271
|
tier: handshakeTier
|
|
25166
|
-
} =
|
|
25272
|
+
} = handshake;
|
|
25167
25273
|
log.trace(
|
|
25168
25274
|
"acpRunner",
|
|
25169
25275
|
`adapter handshake ok protocolVersion=${initialize.protocolVersion} sessionId=${acpSessionId.slice(0, 8)}`
|
|
@@ -29515,7 +29621,7 @@ function checkChokidar() {
|
|
|
29515
29621
|
}
|
|
29516
29622
|
async function doctor(args2 = []) {
|
|
29517
29623
|
const json = args2.includes("--json");
|
|
29518
|
-
const cliVersion = true ? "2.43.
|
|
29624
|
+
const cliVersion = true ? "2.43.7" : "0.0.0-dev";
|
|
29519
29625
|
const apiBase2 = resolveApiBaseUrl();
|
|
29520
29626
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
29521
29627
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -29714,7 +29820,7 @@ async function completion(args2) {
|
|
|
29714
29820
|
// src/commands/version.ts
|
|
29715
29821
|
var import_picocolors14 = __toESM(require("picocolors"));
|
|
29716
29822
|
function version2() {
|
|
29717
|
-
const v = true ? "2.43.
|
|
29823
|
+
const v = true ? "2.43.7" : "unknown";
|
|
29718
29824
|
console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
|
|
29719
29825
|
}
|
|
29720
29826
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.7",
|
|
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",
|