codeam-cli 2.75.1 → 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.
Files changed (2) hide show
  1. package/dist/index.js +50 -18
  2. package/package.json +1 -1
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.1" : "0.0.0-dev",
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.1",
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.1" ? { ideVersion: "2.75.1" } : {}
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.1" : null;
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.1" : null;
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.1" : null;
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) {
@@ -44211,7 +44231,12 @@ var AcpHistory = class {
44211
44231
  };
44212
44232
  var _startupCredentialReportGuard = { reported: false };
44213
44233
  async function surfaceStartupFailure(opts) {
44214
- const msg = startupFailureMessage(opts.agent, opts.detail, opts.recentStderr);
44234
+ const msg = startupFailureMessage(
44235
+ opts.agent,
44236
+ opts.detail,
44237
+ opts.recentStderr,
44238
+ currentRailWireId()
44239
+ );
44215
44240
  const reason = startupCredentialInvalidReason(opts.agent, opts.detail, opts.recentStderr);
44216
44241
  if (reason !== null && !_startupCredentialReportGuard.reported && opts.sessionId && opts.pluginAuthToken) {
44217
44242
  _startupCredentialReportGuard.reported = true;
@@ -44348,7 +44373,14 @@ async function runAcpSession(opts) {
44348
44373
  log.warn("acpRunner", `adapter died code=${code} signal=${signal}; shutting down session`);
44349
44374
  const authFail = looksLikeAuthFailure(recentStderr.join("\n"));
44350
44375
  const outageFail = !authFail && looksLikeProviderOutage(recentStderr.join("\n"));
44351
- const message = adapterExitMessage({ code, signal, authFail, outageFail, agent: opts.agent });
44376
+ const message = adapterExitMessage({
44377
+ code,
44378
+ signal,
44379
+ authFail,
44380
+ outageFail,
44381
+ agent: opts.agent,
44382
+ railWireId: currentRailWireId()
44383
+ });
44352
44384
  const benign = message === null;
44353
44385
  if (authFail) {
44354
44386
  void reportCredentialInvalid(opts);
@@ -49957,7 +49989,7 @@ function checkChokidar() {
49957
49989
  }
49958
49990
  async function doctor(args2 = []) {
49959
49991
  const json = args2.includes("--json");
49960
- const cliVersion = true ? "2.75.1" : "0.0.0-dev";
49992
+ const cliVersion = true ? "2.75.2" : "0.0.0-dev";
49961
49993
  const apiBase2 = resolveApiBaseUrl();
49962
49994
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
49963
49995
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -50481,7 +50513,7 @@ async function mcpWarm(argv = [], opts = {}) {
50481
50513
  // src/commands/version.ts
50482
50514
  var import_picocolors15 = __toESM(require("picocolors"));
50483
50515
  function version2() {
50484
- const v = true ? "2.75.1" : "unknown";
50516
+ const v = true ? "2.75.2" : "unknown";
50485
50517
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
50486
50518
  }
50487
50519
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.75.1",
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",