codeam-cli 2.75.14 → 2.75.16

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 CHANGED
@@ -4,6 +4,20 @@ 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.15] — 2026-09-25
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Accept the documented `--agent <id>` space form in pair/deploy
12
+ - **cli:** Recognise OpenRouter's "requires more credits" 402 as a BYO billing failure
13
+
14
+ ## [2.75.14] — 2026-09-24
15
+
16
+ ### Fixed
17
+
18
+ - **cli:** PTY helper forwards SIGTERM to the agent; kill is awaited before respawn/hand-off
19
+ - **cli:** A new ACP text message after a finished sentence starts a new paragraph
20
+
7
21
  ## [2.75.13] — 2026-09-24
8
22
 
9
23
  ### Added
package/dist/index.js CHANGED
@@ -10509,7 +10509,7 @@ function readAnonId() {
10509
10509
  }
10510
10510
  function superProperties() {
10511
10511
  return {
10512
- cliVersion: true ? "2.75.14" : "0.0.0-dev",
10512
+ cliVersion: true ? "2.75.16" : "0.0.0-dev",
10513
10513
  nodeVersion: process.version,
10514
10514
  platform: process.platform,
10515
10515
  arch: process.arch,
@@ -10751,7 +10751,7 @@ var http = __toESM(require("http"));
10751
10751
  // package.json
10752
10752
  var package_default = {
10753
10753
  name: "codeam-cli",
10754
- version: "2.75.14",
10754
+ version: "2.75.16",
10755
10755
  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.",
10756
10756
  type: "commonjs",
10757
10757
  main: "dist/index.js",
@@ -12081,7 +12081,7 @@ var CommandRelayService = class _CommandRelayService {
12081
12081
  // fresh + clear the "CLI update available" banner after a self-update
12082
12082
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
12083
12083
  // pair/reconnect). Older backends ignore the extra field.
12084
- ..."2.75.14" ? { ideVersion: "2.75.14" } : {}
12084
+ ..."2.75.16" ? { ideVersion: "2.75.16" } : {}
12085
12085
  };
12086
12086
  try {
12087
12087
  const res = await _postJson(`${API_BASE2}/api/plugin/heartbeat`, body);
@@ -17463,6 +17463,20 @@ async function fetchClaudeQuota() {
17463
17463
  });
17464
17464
  }
17465
17465
 
17466
+ // src/agents/current-agent-env.ts
17467
+ var overlay = {};
17468
+ function setCurrentAgentEnv(next) {
17469
+ overlay = { ...next ?? {} };
17470
+ }
17471
+ function currentAgentEnv(base = process.env) {
17472
+ const out2 = { ...base };
17473
+ for (const [k2, v] of Object.entries(overlay)) {
17474
+ if (v === void 0) delete out2[k2];
17475
+ else out2[k2] = v;
17476
+ }
17477
+ return out2;
17478
+ }
17479
+
17466
17480
  // src/services/spawn-and-capture.ts
17467
17481
  var import_child_process11 = require("child_process");
17468
17482
  var activeChildren = /* @__PURE__ */ new Set();
@@ -17489,7 +17503,9 @@ async function spawnAndCapture(cmd, args2, opts = {}) {
17489
17503
  try {
17490
17504
  child = (0, import_child_process11.spawn)(cmd, [...args2], {
17491
17505
  cwd: opts.cwd,
17492
- env: opts.env ?? process.env,
17506
+ // The CURRENT agent's env, not the deploy-time process env — see
17507
+ // agents/current-agent-env.ts.
17508
+ env: opts.env ?? currentAgentEnv(),
17493
17509
  stdio: ["ignore", "pipe", "pipe"]
17494
17510
  });
17495
17511
  } catch {
@@ -37665,7 +37681,7 @@ function replyIsHouseAgentLimit(finalText) {
37665
37681
  const t2 = finalText.trim();
37666
37682
  return t2.length > 0 && t2.length <= 400 && looksLikeHouseAgentLimit(t2);
37667
37683
  }
37668
- var BYO_PROVIDER_BILLING_RE = /(?:api error|http|status)[:\s]+402\b[^\n]{0,80}insufficient (?:credits?|balance)|\b402\b[^\n]{0,40}insufficient (?:credits?|balance)|insufficient (?:credits?|balance)[^\n]{0,40}\b402\b/i;
37684
+ var BYO_PROVIDER_BILLING_RE = /(?:api error|http|status)[:\s]+402\b[^\n]{0,80}(?:insufficient (?:credits?|balance)|requires more credits)|\b402\b[^\n]{0,40}(?:insufficient (?:credits?|balance)|requires more credits)|insufficient (?:credits?|balance)[^\n]{0,40}\b402\b/i;
37669
37685
  function looksLikeByoProviderBilling(text, env = process.env) {
37670
37686
  return !isHouseProxyEnv(env) && BYO_PROVIDER_BILLING_RE.test(text);
37671
37687
  }
@@ -41181,6 +41197,7 @@ async function runAcpSession(opts) {
41181
41197
  autoApprovePermissions: opts.autoApprovePermissions,
41182
41198
  disable1mContext
41183
41199
  });
41200
+ setCurrentAgentEnv(extraEnv);
41184
41201
  const toolCallTracker = new ToolCallTracker();
41185
41202
  const clientOptions = {
41186
41203
  adapter: opts.adapter,
@@ -41499,6 +41516,7 @@ async function runAcpSession(opts) {
41499
41516
  };
41500
41517
  const next = new AcpClient(clientOptions);
41501
41518
  const hs = await next.start();
41519
+ setCurrentAgentEnv(clientOptions.extraEnv);
41502
41520
  client3 = next;
41503
41521
  opts.agent = nextAgent;
41504
41522
  opts.adapter = adapter;
@@ -44342,9 +44360,18 @@ var import_picocolors4 = __toESM(require("picocolors"));
44342
44360
 
44343
44361
  // src/lib/agent-prompt.ts
44344
44362
  function parseAgentFlag(args2) {
44345
- const flag = args2.find((a) => a.startsWith("--agent="));
44346
- if (!flag) return null;
44347
- const value = flag.slice("--agent=".length);
44363
+ let value;
44364
+ const eq = args2.find((a) => a.startsWith("--agent="));
44365
+ if (eq) {
44366
+ value = eq.slice("--agent=".length);
44367
+ } else {
44368
+ const i = args2.indexOf("--agent");
44369
+ if (i === -1) return null;
44370
+ value = args2[i + 1];
44371
+ if (!value || value.startsWith("-")) {
44372
+ throw new Error(`--agent needs a value; valid: ${Object.keys(AGENT_REGISTRY).join(", ")}`);
44373
+ }
44374
+ }
44348
44375
  if (!isKnownAgentId(value)) {
44349
44376
  throw new Error(
44350
44377
  `invalid agent "${value}"; valid: ${Object.keys(AGENT_REGISTRY).join(", ")}`
@@ -47589,7 +47616,7 @@ async function autoUpgradeBeforeCriticalCommand() {
47589
47616
  if (process.env.NODE_ENV === "test") return;
47590
47617
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
47591
47618
  if (process.env.CI) return;
47592
- const current2 = true ? "2.75.14" : null;
47619
+ const current2 = true ? "2.75.16" : null;
47593
47620
  if (!current2) return;
47594
47621
  const cache = readCache();
47595
47622
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -47606,7 +47633,7 @@ function checkForUpdates() {
47606
47633
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
47607
47634
  if (process.env.CI) return;
47608
47635
  if (!process.stdout.isTTY) return;
47609
- const current2 = true ? "2.75.14" : null;
47636
+ const current2 = true ? "2.75.16" : null;
47610
47637
  if (!current2) return;
47611
47638
  const cache = readCache();
47612
47639
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -47629,7 +47656,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
47629
47656
  var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
47630
47657
  var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
47631
47658
  function currentCliVersion() {
47632
- return true ? "2.75.14" : null;
47659
+ return true ? "2.75.16" : null;
47633
47660
  }
47634
47661
  async function installedVersion(deps) {
47635
47662
  const ls = await deps.run(
@@ -49490,7 +49517,7 @@ function checkChokidar() {
49490
49517
  }
49491
49518
  async function doctor(args2 = []) {
49492
49519
  const json = args2.includes("--json");
49493
- const cliVersion = true ? "2.75.14" : "0.0.0-dev";
49520
+ const cliVersion = true ? "2.75.16" : "0.0.0-dev";
49494
49521
  const apiBase2 = resolveApiBaseUrl();
49495
49522
  const diagnosticId = (0, import_node_crypto12.randomUUID)();
49496
49523
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -50014,7 +50041,7 @@ async function mcpWarm(argv = [], opts = {}) {
50014
50041
  // src/commands/version.ts
50015
50042
  var import_picocolors15 = __toESM(require("picocolors"));
50016
50043
  function version2() {
50017
- const v = true ? "2.75.14" : "unknown";
50044
+ const v = true ? "2.75.16" : "unknown";
50018
50045
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
50019
50046
  }
50020
50047
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.75.14",
3
+ "version": "2.75.16",
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",