codeam-cli 2.75.0 → 2.75.2
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 +65 -22
- 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.75.0] — 2026-09-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **shared:** Managed provider ids in @codeam/shared; CLI runs them on the house rail (#751)
|
|
12
|
+
|
|
7
13
|
## [2.74.14] — 2026-09-11
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -3059,7 +3059,13 @@ var USER_EVENTS = {
|
|
|
3059
3059
|
* pipeline transition (stage start/done, pause, stall, completion). CLI
|
|
3060
3060
|
* posts to /api/packs/events; mobile's pack.store renders the pipeline.
|
|
3061
3061
|
* Mirrored in repo A's app-shared events.ts. */
|
|
3062
|
-
PACK_STATE: "pack_state"
|
|
3062
|
+
PACK_STATE: "pack_state",
|
|
3063
|
+
/** The prepaid credit balance moved by something the client could not have
|
|
3064
|
+
* predicted — a purchase landing, a refund, a grant. Carries the new
|
|
3065
|
+
* balance, so nothing has to be fetched to render it. ⚠️ NOT published on
|
|
3066
|
+
* debits: those are one per agent hop, and the client already walks its
|
|
3067
|
+
* own balance down as metered usage streams in. */
|
|
3068
|
+
CREDITS_CHANGED: "credits_changed"
|
|
3063
3069
|
};
|
|
3064
3070
|
|
|
3065
3071
|
// ../../packages/shared/src/preview-prompts.ts
|
|
@@ -10237,7 +10243,7 @@ function readAnonId() {
|
|
|
10237
10243
|
}
|
|
10238
10244
|
function superProperties() {
|
|
10239
10245
|
return {
|
|
10240
|
-
cliVersion: true ? "2.75.
|
|
10246
|
+
cliVersion: true ? "2.75.2" : "0.0.0-dev",
|
|
10241
10247
|
nodeVersion: process.version,
|
|
10242
10248
|
platform: process.platform,
|
|
10243
10249
|
arch: process.arch,
|
|
@@ -10479,7 +10485,7 @@ var http = __toESM(require("http"));
|
|
|
10479
10485
|
// package.json
|
|
10480
10486
|
var package_default = {
|
|
10481
10487
|
name: "codeam-cli",
|
|
10482
|
-
version: "2.75.
|
|
10488
|
+
version: "2.75.2",
|
|
10483
10489
|
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.",
|
|
10484
10490
|
type: "commonjs",
|
|
10485
10491
|
main: "dist/index.js",
|
|
@@ -12170,7 +12176,7 @@ var CommandRelayService = class _CommandRelayService {
|
|
|
12170
12176
|
// fresh + clear the "CLI update available" banner after a self-update
|
|
12171
12177
|
// (a codespace that reinstalls @latest reconnects via heartbeat, not
|
|
12172
12178
|
// pair/reconnect). Older backends ignore the extra field.
|
|
12173
|
-
..."2.75.
|
|
12179
|
+
..."2.75.2" ? { ideVersion: "2.75.2" } : {}
|
|
12174
12180
|
}).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
|
|
12175
12181
|
}
|
|
12176
12182
|
/**
|
|
@@ -24331,6 +24337,9 @@ function clearHouseProxyEnvOverrides() {
|
|
|
24331
24337
|
function isHouseProxyEnv(env) {
|
|
24332
24338
|
return typeof env.ANTHROPIC_AUTH_TOKEN === "string" && env.ANTHROPIC_AUTH_TOKEN.length > 0 && (env.ANTHROPIC_BASE_URL ?? "").includes("/api/v1/agent-proxy");
|
|
24333
24339
|
}
|
|
24340
|
+
function currentRailWireId(env = process.env) {
|
|
24341
|
+
return isHouseProxyEnv(env) ? houseRailWireId(env) : null;
|
|
24342
|
+
}
|
|
24334
24343
|
function pickHouseProxyEnv(env) {
|
|
24335
24344
|
const out2 = {};
|
|
24336
24345
|
for (const key of HOUSE_PROXY_ENV_KEYS) {
|
|
@@ -24501,7 +24510,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
24501
24510
|
if (process.env.NODE_ENV === "test") return;
|
|
24502
24511
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
24503
24512
|
if (process.env.CI) return;
|
|
24504
|
-
const current2 = true ? "2.75.
|
|
24513
|
+
const current2 = true ? "2.75.2" : null;
|
|
24505
24514
|
if (!current2) return;
|
|
24506
24515
|
const cache = readCache();
|
|
24507
24516
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -24518,7 +24527,7 @@ function checkForUpdates() {
|
|
|
24518
24527
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
24519
24528
|
if (process.env.CI) return;
|
|
24520
24529
|
if (!process.stdout.isTTY) return;
|
|
24521
|
-
const current2 = true ? "2.75.
|
|
24530
|
+
const current2 = true ? "2.75.2" : null;
|
|
24522
24531
|
if (!current2) return;
|
|
24523
24532
|
const cache = readCache();
|
|
24524
24533
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -24541,7 +24550,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
|
|
|
24541
24550
|
var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
|
|
24542
24551
|
var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
|
|
24543
24552
|
function currentCliVersion() {
|
|
24544
|
-
return true ? "2.75.
|
|
24553
|
+
return true ? "2.75.2" : null;
|
|
24545
24554
|
}
|
|
24546
24555
|
async function installedVersion(deps) {
|
|
24547
24556
|
const ls = await deps.run(
|
|
@@ -41303,12 +41312,19 @@ var PROVIDER_OUTAGE_RE = /overloaded_error|\boverloaded\b|service[ _]unavailable
|
|
|
41303
41312
|
function looksLikeProviderOutage(text) {
|
|
41304
41313
|
return PROVIDER_OUTAGE_RE.test(text);
|
|
41305
41314
|
}
|
|
41306
|
-
function agentStatusPage(agent) {
|
|
41315
|
+
function agentStatusPage(agent, railWireId) {
|
|
41316
|
+
if (railWireId) return null;
|
|
41307
41317
|
const a = (agent ?? "").toLowerCase();
|
|
41308
41318
|
const id = a.includes("claude") || a.includes("anthropic") ? "claude" : a.includes("codex") || a.includes("openai") ? "codex" : a.includes("gemini") || a.includes("google") ? "gemini" : a.includes("copilot") ? "copilot" : a.includes("cursor") ? "cursor" : null;
|
|
41309
41319
|
return id ? agentHooks(id)?.statusPage ?? null : null;
|
|
41310
41320
|
}
|
|
41311
|
-
function providerOutageMessage(agent) {
|
|
41321
|
+
function providerOutageMessage(agent, railWireId) {
|
|
41322
|
+
if (railWireId) {
|
|
41323
|
+
const who2 = isManagedProviderId(railWireId) ? MANAGED_PROVIDER_DISPLAY_NAMES[railWireId] : HOUSE_AGENT_NAME;
|
|
41324
|
+
return `\u{1F310} **CodeAgent's agent service is having a disruption \u2014 this isn't your session.**
|
|
41325
|
+
|
|
41326
|
+
Your ${who2} agent couldn't finish this turn because our provider returned an overload error. It usually clears up on its own \u2014 just send your message again in a bit.`;
|
|
41327
|
+
}
|
|
41312
41328
|
const info = agentStatusPage(agent);
|
|
41313
41329
|
const who = info ? info.vendor : "The agent provider";
|
|
41314
41330
|
return `\u{1F310} **${who} is having a service disruption \u2014 this isn\u2019t your session.**
|
|
@@ -41317,7 +41333,7 @@ The agent provider returned an overload/outage error, so this turn couldn\u2019t
|
|
|
41317
41333
|
|
|
41318
41334
|
Follow the status here: [${info.url}](${info.url})` : "");
|
|
41319
41335
|
}
|
|
41320
|
-
function startupFailureMessage(agent, detail, recentStderr) {
|
|
41336
|
+
function startupFailureMessage(agent, detail, recentStderr, railWireId) {
|
|
41321
41337
|
const haystack2 = `${detail}
|
|
41322
41338
|
${recentStderr}`;
|
|
41323
41339
|
if (agentHooks(agent)?.classifyStartupFailure?.(haystack2) === "ineligible_tier") {
|
|
@@ -41332,7 +41348,7 @@ ${recentStderr}`;
|
|
|
41332
41348
|
].join("\n");
|
|
41333
41349
|
}
|
|
41334
41350
|
if (looksLikeAuthFailure(haystack2)) return AUTH_FAILURE_MESSAGE;
|
|
41335
|
-
if (looksLikeProviderOutage(haystack2)) return providerOutageMessage(agent);
|
|
41351
|
+
if (looksLikeProviderOutage(haystack2)) return providerOutageMessage(agent, railWireId);
|
|
41336
41352
|
const tail = recentStderr.split("\n").filter(Boolean).slice(-3).join("\n");
|
|
41337
41353
|
return [`\u26A0\uFE0F The ${agent} agent failed to start.`, "", tail ? `Details:
|
|
41338
41354
|
${tail}` : detail].join(
|
|
@@ -41366,7 +41382,7 @@ ${opts.recentStderr}`;
|
|
|
41366
41382
|
return budgetBubbleMessage(opts.agent, extractBudgetPeriod(budgetHaystack));
|
|
41367
41383
|
}
|
|
41368
41384
|
if (looksLikeProviderOutage(opts.detail) || looksLikeProviderOutage(opts.recentStderr)) {
|
|
41369
|
-
return providerOutageMessage(opts.agent);
|
|
41385
|
+
return providerOutageMessage(opts.agent, opts.railWireId);
|
|
41370
41386
|
}
|
|
41371
41387
|
if (!opts.hadText) return TURN_FAILURE_MESSAGE;
|
|
41372
41388
|
return null;
|
|
@@ -41376,7 +41392,7 @@ function adapterExitMessage(opts) {
|
|
|
41376
41392
|
if (opts.code === WINDOWS_CONTROL_C_EXIT) return null;
|
|
41377
41393
|
if (opts.signal === "SIGINT") return null;
|
|
41378
41394
|
if (opts.authFail) return AUTH_FAILURE_MESSAGE;
|
|
41379
|
-
if (opts.outageFail) return providerOutageMessage(opts.agent);
|
|
41395
|
+
if (opts.outageFail) return providerOutageMessage(opts.agent, opts.railWireId);
|
|
41380
41396
|
return `Agent adapter exited unexpectedly (code=${opts.code ?? "null"} signal=${opts.signal ?? "null"}).`;
|
|
41381
41397
|
}
|
|
41382
41398
|
|
|
@@ -43074,7 +43090,11 @@ ${recentStderr.join("\n")}`);
|
|
|
43074
43090
|
detail,
|
|
43075
43091
|
recentStderr: recentStderr.join("\n"),
|
|
43076
43092
|
hadText,
|
|
43077
|
-
agent: opts.agent
|
|
43093
|
+
agent: opts.agent,
|
|
43094
|
+
// On the managed/house rail the runtime is Claude Code for EVERY
|
|
43095
|
+
// provider, so without this the bubble names Anthropic for OUR
|
|
43096
|
+
// proxy's outage. See `agentStatusPage`.
|
|
43097
|
+
railWireId: currentRailWireId()
|
|
43078
43098
|
});
|
|
43079
43099
|
const failed = { error: detail };
|
|
43080
43100
|
if (bubble) {
|
|
@@ -43208,6 +43228,15 @@ async function getConversationH(ctx) {
|
|
|
43208
43228
|
}
|
|
43209
43229
|
async function listModelsH(ctx) {
|
|
43210
43230
|
const { cmd, relay, client: client3 } = ctx;
|
|
43231
|
+
const wireId = ctx.currentHouseWireId?.();
|
|
43232
|
+
if (ctx.currentIsHouse?.() && isManagedProviderId(wireId) && wireId !== "managed-claude") {
|
|
43233
|
+
const pinned = process.env.ANTHROPIC_MODEL?.trim() || client3.getCurrentModelId() || wireId;
|
|
43234
|
+
await relay.sendResult(cmd.id, "completed", {
|
|
43235
|
+
models: [{ id: pinned, label: MANAGED_PROVIDER_DISPLAY_NAMES[wireId] }],
|
|
43236
|
+
currentModelId: pinned
|
|
43237
|
+
});
|
|
43238
|
+
return;
|
|
43239
|
+
}
|
|
43211
43240
|
await relay.sendResult(cmd.id, "completed", {
|
|
43212
43241
|
models: client3.getAvailableModels(),
|
|
43213
43242
|
currentModelId: client3.getCurrentModelId()
|
|
@@ -44202,7 +44231,12 @@ var AcpHistory = class {
|
|
|
44202
44231
|
};
|
|
44203
44232
|
var _startupCredentialReportGuard = { reported: false };
|
|
44204
44233
|
async function surfaceStartupFailure(opts) {
|
|
44205
|
-
const msg = startupFailureMessage(
|
|
44234
|
+
const msg = startupFailureMessage(
|
|
44235
|
+
opts.agent,
|
|
44236
|
+
opts.detail,
|
|
44237
|
+
opts.recentStderr,
|
|
44238
|
+
currentRailWireId()
|
|
44239
|
+
);
|
|
44206
44240
|
const reason = startupCredentialInvalidReason(opts.agent, opts.detail, opts.recentStderr);
|
|
44207
44241
|
if (reason !== null && !_startupCredentialReportGuard.reported && opts.sessionId && opts.pluginAuthToken) {
|
|
44208
44242
|
_startupCredentialReportGuard.reported = true;
|
|
@@ -44339,7 +44373,14 @@ async function runAcpSession(opts) {
|
|
|
44339
44373
|
log.warn("acpRunner", `adapter died code=${code} signal=${signal}; shutting down session`);
|
|
44340
44374
|
const authFail = looksLikeAuthFailure(recentStderr.join("\n"));
|
|
44341
44375
|
const outageFail = !authFail && looksLikeProviderOutage(recentStderr.join("\n"));
|
|
44342
|
-
const message = adapterExitMessage({
|
|
44376
|
+
const message = adapterExitMessage({
|
|
44377
|
+
code,
|
|
44378
|
+
signal,
|
|
44379
|
+
authFail,
|
|
44380
|
+
outageFail,
|
|
44381
|
+
agent: opts.agent,
|
|
44382
|
+
railWireId: currentRailWireId()
|
|
44383
|
+
});
|
|
44343
44384
|
const benign = message === null;
|
|
44344
44385
|
if (authFail) {
|
|
44345
44386
|
void reportCredentialInvalid(opts);
|
|
@@ -44360,6 +44401,8 @@ async function runAcpSession(opts) {
|
|
|
44360
44401
|
};
|
|
44361
44402
|
let client3 = new AcpClient(clientOptions);
|
|
44362
44403
|
let _budgetReachedPosted = false;
|
|
44404
|
+
const initialWireId = houseRailWireId(process.env);
|
|
44405
|
+
const initialManagedId = isHouseProxyEnv(process.env) && isManagedProviderId(initialWireId) ? initialWireId : null;
|
|
44363
44406
|
const makeBudgetRecovery = () => createBudgetRecovery({
|
|
44364
44407
|
publishText: (text) => publisher.publishOutput({ type: "text", content: text, done: true }),
|
|
44365
44408
|
publishSelectPrompt: (question, options) => publisher.publishOutput({
|
|
@@ -44376,7 +44419,7 @@ async function runAcpSession(opts) {
|
|
|
44376
44419
|
appendAgentReply: (text) => history.appendAgentReply(text),
|
|
44377
44420
|
flushHistory: () => void history.flush(),
|
|
44378
44421
|
relaunchProxyWithoutBudget,
|
|
44379
|
-
agentId: opts.agent,
|
|
44422
|
+
agentId: initialManagedId ?? opts.agent,
|
|
44380
44423
|
log: (msg) => log.info("acpRunner", msg)
|
|
44381
44424
|
});
|
|
44382
44425
|
let budgetRecovery = makeBudgetRecovery();
|
|
@@ -44424,7 +44467,7 @@ async function runAcpSession(opts) {
|
|
|
44424
44467
|
showRelayNotice();
|
|
44425
44468
|
void publisher.publishOutput({
|
|
44426
44469
|
type: "agent_banner",
|
|
44427
|
-
agentId: opts.agent,
|
|
44470
|
+
agentId: initialManagedId ?? opts.agent,
|
|
44428
44471
|
// "Welcome back!" ONLY when we actually resumed a prior conversation.
|
|
44429
44472
|
// A fresh pairing is somebody's FIRST turn — greeting them with "back"
|
|
44430
44473
|
// is plainly wrong and was the top confusion in new-user recordings.
|
|
@@ -44433,7 +44476,7 @@ async function runAcpSession(opts) {
|
|
|
44433
44476
|
// (codex-acp returns `currentModelId` on newSession; claude /
|
|
44434
44477
|
// gemini adapters omit it). Falls back to `<display name>`
|
|
44435
44478
|
// alone so the card never renders with a dangling separator.
|
|
44436
|
-
subtitle: buildBannerSubtitle(opts.agent, acpSessionId, handshakeModel, handshakeTier),
|
|
44479
|
+
subtitle: initialManagedId ? `${MANAGED_PROVIDER_DISPLAY_NAMES[initialManagedId]} \xB7 ${MANAGED_AGENT_SUBTITLE}` : buildBannerSubtitle(opts.agent, acpSessionId, handshakeModel, handshakeTier),
|
|
44437
44480
|
// A human location, NOT the raw cwd. On a self-hosted box the cwd is
|
|
44438
44481
|
// `/home/box/.codeam/self-hosted/<uuid>` and on a codespace it's a UUID
|
|
44439
44482
|
// directory — both are noise to the user and leak internal layout.
|
|
@@ -44479,7 +44522,7 @@ async function runAcpSession(opts) {
|
|
|
44479
44522
|
sessionId: opts.sessionId,
|
|
44480
44523
|
pluginId: opts.pluginId,
|
|
44481
44524
|
pluginAuthToken: opts.pluginAuthToken,
|
|
44482
|
-
agentId: opts.agent
|
|
44525
|
+
agentId: initialManagedId ?? opts.agent
|
|
44483
44526
|
});
|
|
44484
44527
|
void turnFiles.flushTurn().catch(() => {
|
|
44485
44528
|
});
|
|
@@ -49946,7 +49989,7 @@ function checkChokidar() {
|
|
|
49946
49989
|
}
|
|
49947
49990
|
async function doctor(args2 = []) {
|
|
49948
49991
|
const json = args2.includes("--json");
|
|
49949
|
-
const cliVersion = true ? "2.75.
|
|
49992
|
+
const cliVersion = true ? "2.75.2" : "0.0.0-dev";
|
|
49950
49993
|
const apiBase2 = resolveApiBaseUrl();
|
|
49951
49994
|
const diagnosticId = (0, import_node_crypto13.randomUUID)();
|
|
49952
49995
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -50470,7 +50513,7 @@ async function mcpWarm(argv = [], opts = {}) {
|
|
|
50470
50513
|
// src/commands/version.ts
|
|
50471
50514
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
50472
50515
|
function version2() {
|
|
50473
|
-
const v = true ? "2.75.
|
|
50516
|
+
const v = true ? "2.75.2" : "unknown";
|
|
50474
50517
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
50475
50518
|
}
|
|
50476
50519
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.75.
|
|
3
|
+
"version": "2.75.2",
|
|
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",
|