codeam-cli 2.61.74 → 2.61.76

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.75] — 2026-07-29
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Stop misclassifying house-agent 403 usage-ceiling as an auth failure (#568)
12
+
13
+ ## [2.61.74] — 2026-07-29
14
+
15
+ ### Fixed
16
+
17
+ - **cli:** Resume a session in its own deploy-workspace cwd (warm-codespace wake loses conversation) (#567)
18
+
19
+ ### Tests
20
+
21
+ - **cli:** Fix sweepStaleCliStagingDirs test on windows (path.basename, not split('/')) (#564)
22
+
7
23
  ## [2.61.73] — 2026-07-29
8
24
 
9
25
  ### Added
package/dist/index.js CHANGED
@@ -1830,11 +1830,110 @@ var specDrivenDevelopmentSkill = {
1830
1830
  }
1831
1831
  };
1832
1832
 
1833
+ // ../../packages/shared/src/skills/code-naming.ts
1834
+ var CODE_NAMING_BODY = `Use this skill when NAMING or RENAMING code \u2014 variables, functions, classes,
1835
+ interfaces, types, files, modules, components, hooks, constants \u2014 while writing
1836
+ new code, refactoring, or reviewing a diff. A name should reveal intent and
1837
+ domain meaning so a reader understands the code without translating it in their
1838
+ head, and so it needs fewer comments.
1839
+
1840
+ ## The five core rules (name the concept, not the implementation)
1841
+
1842
+ 1. **Don't abbreviate, and don't use single letters for meaningful values.**
1843
+ \`usr\`/\`cfg\`/\`authReq\` \u2192 \`user\`/\`config\`/\`authRequest\`; \`u\`/\`p\` \u2192 \`user\`/\`project\`.
1844
+ Abbreviations rely on context the next reader may not have. Allowed: standard
1845
+ acronyms the domain already uses (API, URL, HTTP, ID, UUID, CLI, SDK, PR, OAuth),
1846
+ loop indices \`i\`/\`j\`, coordinates \`x\`/\`y\`, and generic type params \`T\`/\`K\`/\`V\`.
1847
+
1848
+ 2. **Don't put the data TYPE in a variable name.** \`userList\` \u2192 \`users\`,
1849
+ \`nameString\` \u2192 \`displayName\`, \`isActiveBool\` \u2192 \`isActive\`, \`invoiceMap\` \u2192
1850
+ \`invoicesById\`. The type system and editor already show the type; the name
1851
+ should carry the meaning.
1852
+
1853
+ 3. **Include the UNIT when a number has one** (unless the type makes it
1854
+ unmistakable). \`timeout\` \u2192 \`timeoutMs\`, \`delay\` \u2192 \`retryDelaySeconds\`,
1855
+ \`size\` \u2192 \`fileSizeBytes\`, \`price\` \u2192 \`priceUsd\`. Especially time, distance,
1856
+ money, bytes, rates, percentages, token/rate limits.
1857
+
1858
+ 4. **Don't put the type CONSTRUCT in a type's name.** \`UserClass\` \u2192 \`User\`,
1859
+ \`PaymentInterface\`/\`IPayment\` \u2192 \`Payment\` (or a role like \`PaymentGateway\`),
1860
+ \`ConfigType\` \u2192 \`Config\`, \`StatusEnum\` \u2192 \`Status\`. Name the concept, not
1861
+ "what kind of programming thing it is."
1862
+
1863
+ 5. **Refactor when you're reaching for \`Utils\`/\`Helpers\`/\`Common\`.** A generic
1864
+ bucket usually hides a missing concept. Group by domain instead:
1865
+ \`utils/parseCookie\` \u2192 a \`cookies/\` module or a \`CookieStore\`/\`CookieJar\` class;
1866
+ \`utils/formatDate\` \u2192 \`dates/\` or a \`DateRangeFormatter\`. Same for vague
1867
+ \`Base\`/\`Abstract\`/\`Manager\`/\`Helper\` class names \u2014 prefer the role
1868
+ (\`Repository\`, \`BillingService\`, \`UserProvisioner\`) unless the project
1869
+ convention explicitly requires \`Base\`/\`Abstract\`.
1870
+
1871
+ ## Shape rules
1872
+
1873
+ - **Functions are verbs / verb phrases:** \`createInvoice()\`, \`sendPasswordResetEmail()\`,
1874
+ \`findRepositoryById()\`. Booleans read like a question in an \`if\`:
1875
+ \`isActive\`, \`hasAccess\`, \`canDeploy\`, \`shouldRetry\` (prefix \`is/has/can/should/needs\`).
1876
+ - **Classes / interfaces / types are nouns or roles:** \`Invoice\`, \`PaymentGateway\`,
1877
+ \`AgentSession\` \u2014 not \`InvoiceData\`, \`SubscriptionThing\`, \`AgentSessionType\`.
1878
+ - **Collections are plural, or \`\u2026ById\`/\`\u2026ByX\` when indexed:** \`users\`,
1879
+ \`activeSessions\`, \`invoicesByCustomerId\`.
1880
+ - **Don't encode a temporary implementation in a name that may change:**
1881
+ \`postgresUserRepository\` \u2192 \`userRepository\`, \`redisCache\` \u2192 \`cache\` \u2014 unless the
1882
+ implementation IS the meaningful distinction. Name the role, not today's backend.
1883
+ - **Follow the project's existing conventions** (casing, file naming, \`useX\`
1884
+ hooks, \`handleX\` handlers). Match the surrounding code; don't introduce a new
1885
+ style without a strong reason.
1886
+
1887
+ ## Words to distrust (infer the real role, then name it)
1888
+
1889
+ \`data\`, \`info\`, \`item\`, \`obj\`, \`temp\`, \`result\`, \`value\`, \`thing\`, \`stuff\`,
1890
+ \`manager\`, \`helper\`, \`utils\`, \`common\`, \`base\`, \`abstract\`, \`processor\`,
1891
+ \`handler\`, \`payload\`. They're acceptable only when the surrounding context makes
1892
+ them precise (e.g. \`config\` inside one \`DatabaseConnection\`); vague when passed
1893
+ across many layers.
1894
+
1895
+ ## Guardrails \u2014 this is a review/refactor guide, NOT a mass-rename mandate
1896
+
1897
+ - Names that are already clear and idiomatic are DONE \u2014 leave them.
1898
+ - Before renaming: read how the identifier is used and infer the real domain
1899
+ concept. Prefer the **smallest** clear rename.
1900
+ - Do NOT do large unrelated renames, and do NOT rename purely for personal
1901
+ preference. Stay inside the change you were asked to make.
1902
+ - Preserve public API / exported names unless the task explicitly allows a break;
1903
+ when you do rename, update every reference, tests, and docs in the same change.
1904
+ - No clever names, jokes, or metaphors in production code; don't make names
1905
+ needlessly long either.
1906
+
1907
+ When reviewing, raise a naming issue only when a clearer name would materially
1908
+ help a reader \u2014 one suggestion per finding: \`current \u2192 suggested \u2014 why\`.`;
1909
+ var CODE_NAMING_INSTRUCTION = `When naming or renaming code, name the domain concept, not the implementation:
1910
+ no abbreviations or single-letter names for meaningful values (standard acronyms
1911
+ like API/URL/ID/OAuth are fine); don't put the data type in a variable name
1912
+ (userList \u2192 users); include the unit when a number has one (timeout \u2192 timeoutMs);
1913
+ don't put the type construct in a type's name (IPayment \u2192 Payment); and refactor
1914
+ generic Utils/Helper/Manager/Base buckets into a domain module or a role-named
1915
+ class. Functions are verbs (createInvoice), booleans read like questions
1916
+ (isActive/hasAccess), classes/types are nouns/roles, collections are plural or
1917
+ \u2026ById. This is a review/refactor guide, not a mandate to mass-rename: leave
1918
+ already-clear names alone, prefer the smallest clear rename, don't rename
1919
+ unrelated code, and preserve public/exported names unless the task allows a break.`;
1920
+ var codeNamingSkill = {
1921
+ id: "code-naming",
1922
+ name: "Code Naming",
1923
+ description: `Naming review & refactor: name the domain concept, not the implementation \u2014 no abbreviations, no type-in-name, units when they matter, no Utils/Manager/Base buckets; rename minimally, never mass-rename.`,
1924
+ source: "curated",
1925
+ delivery: {
1926
+ skillFile: { body: CODE_NAMING_BODY },
1927
+ instruction: { body: CODE_NAMING_INSTRUCTION }
1928
+ }
1929
+ };
1930
+
1833
1931
  // ../../packages/shared/src/skills/registry.ts
1834
1932
  var SKILL_REGISTRY = {
1835
1933
  "code-review": codeReviewSkill,
1836
1934
  "resolve-conflicts": resolveConflictsSkill,
1837
- "spec-driven-development": specDrivenDevelopmentSkill
1935
+ "spec-driven-development": specDrivenDevelopmentSkill,
1936
+ "code-naming": codeNamingSkill
1838
1937
  };
1839
1938
  function isSkillId(id) {
1840
1939
  return Object.prototype.hasOwnProperty.call(SKILL_REGISTRY, id);
@@ -7074,7 +7173,7 @@ function readAnonId() {
7074
7173
  }
7075
7174
  function superProperties() {
7076
7175
  return {
7077
- cliVersion: true ? "2.61.74" : "0.0.0-dev",
7176
+ cliVersion: true ? "2.61.76" : "0.0.0-dev",
7078
7177
  nodeVersion: process.version,
7079
7178
  platform: process.platform,
7080
7179
  arch: process.arch,
@@ -7255,7 +7354,7 @@ var os4 = __toESM(require("os"));
7255
7354
  // package.json
7256
7355
  var package_default = {
7257
7356
  name: "codeam-cli",
7258
- version: "2.61.74",
7357
+ version: "2.61.76",
7259
7358
  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
7359
  type: "commonjs",
7261
7360
  main: "dist/index.js",
@@ -8487,7 +8586,7 @@ var CommandRelayService = class _CommandRelayService {
8487
8586
  // fresh + clear the "CLI update available" banner after a self-update
8488
8587
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
8489
8588
  // pair/reconnect). Older backends ignore the extra field.
8490
- ..."2.61.74" ? { ideVersion: "2.61.74" } : {}
8589
+ ..."2.61.76" ? { ideVersion: "2.61.76" } : {}
8491
8590
  }).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
8492
8591
  }
8493
8592
  /**
@@ -19601,7 +19700,7 @@ async function autoUpgradeBeforeCriticalCommand() {
19601
19700
  if (process.env.NODE_ENV === "test") return;
19602
19701
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
19603
19702
  if (process.env.CI) return;
19604
- const current = true ? "2.61.74" : null;
19703
+ const current = true ? "2.61.76" : null;
19605
19704
  if (!current) return;
19606
19705
  const cache = readCache();
19607
19706
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -19618,7 +19717,7 @@ function checkForUpdates() {
19618
19717
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
19619
19718
  if (process.env.CI) return;
19620
19719
  if (!process.stdout.isTTY) return;
19621
- const current = true ? "2.61.74" : null;
19720
+ const current = true ? "2.61.76" : null;
19622
19721
  if (!current) return;
19623
19722
  const cache = readCache();
19624
19723
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -19638,7 +19737,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
19638
19737
  var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
19639
19738
  var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
19640
19739
  function currentCliVersion() {
19641
- return true ? "2.61.74" : null;
19740
+ return true ? "2.61.76" : null;
19642
19741
  }
19643
19742
  function runCmd(cmd, args2, timeoutMs) {
19644
19743
  return new Promise((resolve9) => {
@@ -33608,13 +33707,29 @@ function describeError(err) {
33608
33707
  return String(err);
33609
33708
  }
33610
33709
  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;
33710
+ var HOUSE_AGENT_LIMIT_RE = /HOUSE_AGENT_CEILING|CodeAgent Cloud[^\n]{0,60}(?:usage )?ceiling|CodeAgent Cloud is temporarily (?:unavailable|disabled)/i;
33711
+ function looksLikeHouseAgentLimit(text) {
33712
+ return HOUSE_AGENT_LIMIT_RE.test(text);
33713
+ }
33611
33714
  function looksLikeAuthFailure(text) {
33715
+ if (looksLikeHouseAgentLimit(text)) return false;
33612
33716
  return AUTH_FAILURE_RE.test(text);
33613
33717
  }
33614
33718
  function replyIsAuthFailure(finalText) {
33615
33719
  const t2 = finalText.trim();
33616
33720
  return t2.length > 0 && t2.length <= 200 && looksLikeAuthFailure(t2);
33617
33721
  }
33722
+ function replyIsHouseAgentLimit(finalText) {
33723
+ const t2 = finalText.trim();
33724
+ return t2.length > 0 && t2.length <= 300 && looksLikeHouseAgentLimit(t2);
33725
+ }
33726
+ function houseAgentLimitMessage(text) {
33727
+ if (/temporarily (?:unavailable|disabled)/i.test(text)) {
33728
+ 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.";
33729
+ }
33730
+ const canUpgrade = /upgrade to pro/i.test(text);
33731
+ 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.");
33732
+ }
33618
33733
  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.";
33619
33734
  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)";
33620
33735
  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.";
@@ -33667,6 +33782,10 @@ function budgetBubbleMessage(agent, period) {
33667
33782
  The local Headroom proxy rejected the ${agent} request because the configured spending cap was hit. Choose an option below to continue.`;
33668
33783
  }
33669
33784
  function failureBubble(opts) {
33785
+ if (looksLikeHouseAgentLimit(opts.detail) || looksLikeHouseAgentLimit(opts.recentStderr)) {
33786
+ return houseAgentLimitMessage(`${opts.detail}
33787
+ ${opts.recentStderr}`);
33788
+ }
33670
33789
  if (looksLikeAuthFailure(opts.detail) || looksLikeAuthFailure(opts.recentStderr)) {
33671
33790
  return AUTH_FAILURE_MESSAGE;
33672
33791
  }
@@ -33932,6 +34051,18 @@ async function startTaskH(ctx) {
33932
34051
  void history.flush();
33933
34052
  log.info("acpRunner", `start_task \u2190 cursor-plan-upgrade-required id=${cmd.id.slice(0, 8)}`);
33934
34053
  await relay.sendResult(cmd.id, "failed", { error: "cursor plan upgrade required" });
34054
+ } else if (replyIsHouseAgentLimit(finalText)) {
34055
+ const houseBubble = houseAgentLimitMessage(finalText);
34056
+ await streaming.closeWithBubble(houseBubble);
34057
+ history.appendAgentReply(houseBubble);
34058
+ void history.flush();
34059
+ turnFiles.flushTurn().catch((err) => {
34060
+ log.warn("acpRunner", `turnFiles.flushTurn failed: ${describeError(err)}`);
34061
+ });
34062
+ log.info("acpRunner", `start_task \u2190 house-agent-limit id=${cmd.id.slice(0, 8)}`);
34063
+ await relay.sendResult(cmd.id, "failed", {
34064
+ error: "house agent usage ceiling / temporarily unavailable"
34065
+ });
33935
34066
  } else if (replyIsAuthFailure(finalText)) {
33936
34067
  await streaming.closeWithBubble(AUTH_FAILURE_MESSAGE);
33937
34068
  history.appendAgentReply(AUTH_FAILURE_MESSAGE);
@@ -40089,7 +40220,7 @@ function checkChokidar() {
40089
40220
  }
40090
40221
  async function doctor(args2 = []) {
40091
40222
  const json = args2.includes("--json");
40092
- const cliVersion = true ? "2.61.74" : "0.0.0-dev";
40223
+ const cliVersion = true ? "2.61.76" : "0.0.0-dev";
40093
40224
  const apiBase2 = resolveApiBaseUrl();
40094
40225
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
40095
40226
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -40611,7 +40742,7 @@ async function mcpRun(args2) {
40611
40742
  // src/commands/version.ts
40612
40743
  var import_picocolors15 = __toESM(require("picocolors"));
40613
40744
  function version2() {
40614
- const v = true ? "2.61.74" : "unknown";
40745
+ const v = true ? "2.61.76" : "unknown";
40615
40746
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
40616
40747
  }
40617
40748
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.61.74",
3
+ "version": "2.61.76",
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",