codeam-cli 2.61.73 → 2.61.75

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,22 @@ 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.61.74] — 2026-07-29
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Resume a session in its own deploy-workspace cwd (warm-codespace wake loses conversation) (#567)
12
+
13
+ ### Tests
14
+
15
+ - **cli:** Fix sweepStaleCliStagingDirs test on windows (path.basename, not split('/')) (#564)
16
+
17
+ ## [2.61.73] — 2026-07-29
18
+
19
+ ### Added
20
+
21
+ - **cli:** Honor suppressOnboardingWelcome on self-hosted/warm deploys (#562)
22
+
7
23
  ## [2.61.72] — 2026-07-29
8
24
 
9
25
  ### Fixed
package/dist/index.js CHANGED
@@ -7074,7 +7074,7 @@ function readAnonId() {
7074
7074
  }
7075
7075
  function superProperties() {
7076
7076
  return {
7077
- cliVersion: true ? "2.61.73" : "0.0.0-dev",
7077
+ cliVersion: true ? "2.61.75" : "0.0.0-dev",
7078
7078
  nodeVersion: process.version,
7079
7079
  platform: process.platform,
7080
7080
  arch: process.arch,
@@ -7255,7 +7255,7 @@ var os4 = __toESM(require("os"));
7255
7255
  // package.json
7256
7256
  var package_default = {
7257
7257
  name: "codeam-cli",
7258
- version: "2.61.73",
7258
+ version: "2.61.75",
7259
7259
  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.",
7260
7260
  type: "commonjs",
7261
7261
  main: "dist/index.js",
@@ -8487,7 +8487,7 @@ var CommandRelayService = class _CommandRelayService {
8487
8487
  // fresh + clear the "CLI update available" banner after a self-update
8488
8488
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
8489
8489
  // pair/reconnect). Older backends ignore the extra field.
8490
- ..."2.61.73" ? { ideVersion: "2.61.73" } : {}
8490
+ ..."2.61.75" ? { ideVersion: "2.61.75" } : {}
8491
8491
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
8492
8492
  }
8493
8493
  /**
@@ -19601,7 +19601,7 @@ async function autoUpgradeBeforeCriticalCommand() {
19601
19601
  if (process.env.NODE_ENV === "test") return;
19602
19602
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
19603
19603
  if (process.env.CI) return;
19604
- const current = true ? "2.61.73" : null;
19604
+ const current = true ? "2.61.75" : null;
19605
19605
  if (!current) return;
19606
19606
  const cache = readCache();
19607
19607
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -19618,7 +19618,7 @@ function checkForUpdates() {
19618
19618
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
19619
19619
  if (process.env.CI) return;
19620
19620
  if (!process.stdout.isTTY) return;
19621
- const current = true ? "2.61.73" : null;
19621
+ const current = true ? "2.61.75" : null;
19622
19622
  if (!current) return;
19623
19623
  const cache = readCache();
19624
19624
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -19638,7 +19638,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
19638
19638
  var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
19639
19639
  var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
19640
19640
  function currentCliVersion() {
19641
- return true ? "2.61.73" : null;
19641
+ return true ? "2.61.75" : null;
19642
19642
  }
19643
19643
  function runCmd(cmd, args2, timeoutMs) {
19644
19644
  return new Promise((resolve9) => {
@@ -20809,7 +20809,7 @@ var HostAgentSupervisor = class {
20809
20809
  if (this.children.size > 0) return;
20810
20810
  const session = getActiveSession();
20811
20811
  if (!session || !session.pluginId || !session.pollSecret || !session.agent) return;
20812
- const cwd = process.cwd();
20812
+ const cwd = session.cwd && fs44.existsSync(session.cwd) ? session.cwd : process.cwd();
20813
20813
  const proc = this.resumeSpawner({ ...readHeadroomChildEnv() }, cwd);
20814
20814
  const child = {
20815
20815
  deployId: session.id,
@@ -25736,7 +25736,12 @@ async function pairAuto(args2) {
25736
25736
  pluginAuthToken: claimed.pluginAuthToken,
25737
25737
  // SEC crit1 (#813): persist so boot-time /reconnect proves possession.
25738
25738
  pollSecret,
25739
- agent: claimed.agent
25739
+ agent: claimed.agent,
25740
+ // The pair-auto child runs IN the deploy workspace, so this is the cwd the
25741
+ // agent's conversation lives under. Persist it so a supervisor-boot resume
25742
+ // (warm-codespace wake / restart) re-spawns in the SAME dir and resumes the
25743
+ // real conversation instead of a fresh one in the host-agent's cwd.
25744
+ cwd: process.cwd()
25740
25745
  };
25741
25746
  addSession(claimedSession);
25742
25747
  identifyUser({
@@ -33603,13 +33608,29 @@ function describeError(err) {
33603
33608
  return String(err);
33604
33609
  }
33605
33610
  var AUTH_FAILURE_RE = /invalid authentication credentials|failed to authenticate|authentication[_ ](?:error|required)|please run \/login|\bunauthorized\b|\binvalid x-api-key\b|oauth (?:token|session) (?:expired|revoked)|(?:session|token|credentials?|oauth)[^\n]{0,40}could not be refreshed|(?:api error|http|status)[:\s]+401|\b401\b[^\n]{0,40}(?:unauthor|authenticat|credential|api[_ ]?key|login)/i;
33611
+ var HOUSE_AGENT_LIMIT_RE = /HOUSE_AGENT_CEILING|CodeAgent Cloud[^\n]{0,60}(?:usage )?ceiling|CodeAgent Cloud is temporarily (?:unavailable|disabled)/i;
33612
+ function looksLikeHouseAgentLimit(text) {
33613
+ return HOUSE_AGENT_LIMIT_RE.test(text);
33614
+ }
33606
33615
  function looksLikeAuthFailure(text) {
33616
+ if (looksLikeHouseAgentLimit(text)) return false;
33607
33617
  return AUTH_FAILURE_RE.test(text);
33608
33618
  }
33609
33619
  function replyIsAuthFailure(finalText) {
33610
33620
  const t2 = finalText.trim();
33611
33621
  return t2.length > 0 && t2.length <= 200 && looksLikeAuthFailure(t2);
33612
33622
  }
33623
+ function replyIsHouseAgentLimit(finalText) {
33624
+ const t2 = finalText.trim();
33625
+ return t2.length > 0 && t2.length <= 300 && looksLikeHouseAgentLimit(t2);
33626
+ }
33627
+ function houseAgentLimitMessage(text) {
33628
+ if (/temporarily (?:unavailable|disabled)/i.test(text)) {
33629
+ return "\u23F3 **CodeAgent Cloud is temporarily unavailable.**\n\nThe free CodeAgent Cloud agent is paused server-side right now \u2014 this isn\u2019t a problem with your login, so re-authenticating won\u2019t help. Please send your message again in a bit, or connect your own agent (Claude, Codex, \u2026) in **Profile \u203A Agents** to run independently.";
33630
+ }
33631
+ const canUpgrade = /upgrade to pro/i.test(text);
33632
+ return "\u{1F4CA} **You\u2019ve reached your daily CodeAgent Cloud limit.**\n\nThe free CodeAgent Cloud agent has a daily usage ceiling that resets at midnight UTC. This is a usage limit, not a problem with your login \u2014 re-authenticating won\u2019t change it. " + (canUpgrade ? "To keep going now, upgrade to **Pro** for a higher ceiling, or connect your own agent (Claude, Codex, \u2026) in **Profile \u203A Agents** to run without this limit." : "To keep going now, connect your own agent (Claude, Codex, \u2026) in **Profile \u203A Agents** to run without this limit, or wait for the reset.");
33633
+ }
33613
33634
  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.";
33614
33635
  var CURSOR_UPGRADE_MESSAGE = "\u26A1 **Cursor needs a paid plan to run the agent.**\n\nThe headless Cursor Agent requires Cursor **Pro** \u2014 your Free plan\u2019s included usage does NOT cover Agent runs, even with quota left. This is your Cursor account (not CodeAgent). Upgrade, then send your message again:\n\n[Upgrade to Cursor Pro \u2192](https://cursor.com/dashboard)";
33615
33636
  var ONE_M_CREDITS_MESSAGE = "\u{1F504} **Reconnect your Claude subscription to continue.**\n\nClaude requested 1M-context but your account doesn\u2019t have the usage credits for it on this credential. Reconnecting refreshes your subscription so the agent can keep going \u2014 disabling 1M context won\u2019t fix a credits gate.\n\nTap [Reconnect this agent](codeam://reauth) to reconnect your Claude subscription in Profile \u203A Agents, then send your message again.";
@@ -33662,6 +33683,10 @@ function budgetBubbleMessage(agent, period) {
33662
33683
  The local Headroom proxy rejected the ${agent} request because the configured spending cap was hit. Choose an option below to continue.`;
33663
33684
  }
33664
33685
  function failureBubble(opts) {
33686
+ if (looksLikeHouseAgentLimit(opts.detail) || looksLikeHouseAgentLimit(opts.recentStderr)) {
33687
+ return houseAgentLimitMessage(`${opts.detail}
33688
+ ${opts.recentStderr}`);
33689
+ }
33665
33690
  if (looksLikeAuthFailure(opts.detail) || looksLikeAuthFailure(opts.recentStderr)) {
33666
33691
  return AUTH_FAILURE_MESSAGE;
33667
33692
  }
@@ -33927,6 +33952,18 @@ async function startTaskH(ctx) {
33927
33952
  void history.flush();
33928
33953
  log.info("acpRunner", `start_task \u2190 cursor-plan-upgrade-required id=${cmd.id.slice(0, 8)}`);
33929
33954
  await relay.sendResult(cmd.id, "failed", { error: "cursor plan upgrade required" });
33955
+ } else if (replyIsHouseAgentLimit(finalText)) {
33956
+ const houseBubble = houseAgentLimitMessage(finalText);
33957
+ await streaming.closeWithBubble(houseBubble);
33958
+ history.appendAgentReply(houseBubble);
33959
+ void history.flush();
33960
+ turnFiles.flushTurn().catch((err) => {
33961
+ log.warn("acpRunner", `turnFiles.flushTurn failed: ${describeError(err)}`);
33962
+ });
33963
+ log.info("acpRunner", `start_task \u2190 house-agent-limit id=${cmd.id.slice(0, 8)}`);
33964
+ await relay.sendResult(cmd.id, "failed", {
33965
+ error: "house agent usage ceiling / temporarily unavailable"
33966
+ });
33930
33967
  } else if (replyIsAuthFailure(finalText)) {
33931
33968
  await streaming.closeWithBubble(AUTH_FAILURE_MESSAGE);
33932
33969
  history.appendAgentReply(AUTH_FAILURE_MESSAGE);
@@ -40084,7 +40121,7 @@ function checkChokidar() {
40084
40121
  }
40085
40122
  async function doctor(args2 = []) {
40086
40123
  const json = args2.includes("--json");
40087
- const cliVersion = true ? "2.61.73" : "0.0.0-dev";
40124
+ const cliVersion = true ? "2.61.75" : "0.0.0-dev";
40088
40125
  const apiBase2 = resolveApiBaseUrl();
40089
40126
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
40090
40127
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -40606,7 +40643,7 @@ async function mcpRun(args2) {
40606
40643
  // src/commands/version.ts
40607
40644
  var import_picocolors15 = __toESM(require("picocolors"));
40608
40645
  function version2() {
40609
- const v = true ? "2.61.73" : "unknown";
40646
+ const v = true ? "2.61.75" : "unknown";
40610
40647
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
40611
40648
  }
40612
40649
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.61.73",
3
+ "version": "2.61.75",
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",