codeam-cli 2.43.4 → 2.43.6

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,18 @@ 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.43.5] — 2026-06-25
8
+
9
+ ### Added
10
+
11
+ - **cli:** Self-hosted provisioning for Gemini credentials
12
+
13
+ ## [2.43.4] — 2026-06-25
14
+
15
+ ### Fixed
16
+
17
+ - **cli:** Codex conversation resume loads the transcript (per-agent history)
18
+
7
19
  ## [2.43.3] — 2026-06-25
8
20
 
9
21
  ### Fixed
package/dist/index.js CHANGED
@@ -5397,7 +5397,7 @@ function readAnonId() {
5397
5397
  }
5398
5398
  function superProperties() {
5399
5399
  return {
5400
- cliVersion: true ? "2.43.4" : "0.0.0-dev",
5400
+ cliVersion: true ? "2.43.6" : "0.0.0-dev",
5401
5401
  nodeVersion: process.version,
5402
5402
  platform: process.platform,
5403
5403
  arch: process.arch,
@@ -5578,7 +5578,7 @@ var os4 = __toESM(require("os"));
5578
5578
  // package.json
5579
5579
  var package_default = {
5580
5580
  name: "codeam-cli",
5581
- version: "2.43.4",
5581
+ version: "2.43.6",
5582
5582
  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.",
5583
5583
  type: "commonjs",
5584
5584
  main: "dist/index.js",
@@ -17463,9 +17463,24 @@ var codexProvisioner = {
17463
17463
  return {};
17464
17464
  }
17465
17465
  };
17466
+ var geminiProvisioner = {
17467
+ write(auth, home) {
17468
+ const settingsJson = path43.join(home, ".gemini", "settings.json");
17469
+ const oauthCreds = path43.join(home, ".gemini", "oauth_creds.json");
17470
+ if (auth.kind === "api_key") {
17471
+ rmIfExists(oauthCreds);
17472
+ writeFile0600(settingsJson, '{"security":{"auth":{"selectedType":"gemini-api-key"}}}');
17473
+ return { GEMINI_API_KEY: auth.value };
17474
+ }
17475
+ writeFile0600(oauthCreds, auth.value);
17476
+ writeFile0600(settingsJson, '{"security":{"auth":{"selectedType":"oauth-personal"}}}');
17477
+ return {};
17478
+ }
17479
+ };
17466
17480
  var PROVISIONERS = {
17467
17481
  claude: claudeProvisioner,
17468
- codex: codexProvisioner
17482
+ codex: codexProvisioner,
17483
+ gemini: geminiProvisioner
17469
17484
  };
17470
17485
  var UnsupportedAgentError = class extends Error {
17471
17486
  agentId;
@@ -17884,7 +17899,7 @@ async function autoUpgradeBeforeCriticalCommand() {
17884
17899
  if (process.env.NODE_ENV === "test") return;
17885
17900
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17886
17901
  if (process.env.CI) return;
17887
- const current = true ? "2.43.4" : null;
17902
+ const current = true ? "2.43.6" : null;
17888
17903
  if (!current) return;
17889
17904
  const cache = readCache();
17890
17905
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17901,7 +17916,7 @@ function checkForUpdates() {
17901
17916
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17902
17917
  if (process.env.CI) return;
17903
17918
  if (!process.stdout.isTTY) return;
17904
- const current = true ? "2.43.4" : null;
17919
+ const current = true ? "2.43.6" : null;
17905
17920
  if (!current) return;
17906
17921
  const cache = readCache();
17907
17922
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -18339,7 +18354,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process14.s
18339
18354
  detached: false
18340
18355
  });
18341
18356
  function currentCliVersion() {
18342
- return true ? "2.43.4" : null;
18357
+ return true ? "2.43.6" : null;
18343
18358
  }
18344
18359
  function runCmd(cmd, args2, timeoutMs) {
18345
18360
  return new Promise((resolve7) => {
@@ -22819,6 +22834,8 @@ function createIdleTimeout(idleMs, makeError) {
22819
22834
 
22820
22835
  // src/agents/acp/client.ts
22821
22836
  var PROTOCOL_VERSION2 = 1;
22837
+ var FATAL_STARTUP_RE = /IneligibleTierError|UNSUPPORTED_CLIENT|no longer supported for Gemini Code Assist|not eligible for Gemini Code Assist|Error authenticating|ProjectIdRequiredError/i;
22838
+ var NEWSESSION_TIMEOUT_MS = 12e4;
22822
22839
  var PROMPT_IDLE_TIMEOUT_MS = 9e4;
22823
22840
  var CLIENT_CAPABILITIES = {
22824
22841
  fs: { readTextFile: true, writeTextFile: true },
@@ -22846,6 +22863,14 @@ var AcpClient = class {
22846
22863
  * (the agent is demonstrably working, just blocked on the tool), and
22847
22864
  * re-arm only once the last one finishes. Reset per prompt. */
22848
22865
  pendingToolCalls = /* @__PURE__ */ new Set();
22866
+ /** Last few adapter stderr lines — so a startup failure surfaces the REAL
22867
+ * cause (e.g. gemini's `IneligibleTierError`) instead of a bare timeout. */
22868
+ recentStderr = [];
22869
+ /** Set while `newSession` is in flight; the stderr watcher calls it to fail
22870
+ * fast when the adapter prints a fatal startup error. `gemini --acp`
22871
+ * swallows the Code Assist onboarding error and never rejects `newSession`,
22872
+ * so without this the session hangs forever ("loading… / offline"). */
22873
+ startupFailureReject = null;
22849
22874
  /**
22850
22875
  * Spawn the adapter + perform the initial handshake (initialize
22851
22876
  * → newSession). Returns the ACP-assigned sessionId so the caller
@@ -22878,6 +22903,12 @@ var AcpClient = class {
22878
22903
  if (trimmed) {
22879
22904
  log.info("acpAdapter", trimmed);
22880
22905
  this.opts.onStderr?.(trimmed);
22906
+ this.recentStderr.push(trimmed);
22907
+ if (this.recentStderr.length > 12) this.recentStderr.shift();
22908
+ if (this.startupFailureReject && FATAL_STARTUP_RE.test(trimmed)) {
22909
+ this.startupFailureReject(new Error(`AGENT_STARTUP_FAILED: ${trimmed}`));
22910
+ this.startupFailureReject = null;
22911
+ }
22881
22912
  }
22882
22913
  }
22883
22914
  });
@@ -22914,10 +22945,30 @@ var AcpClient = class {
22914
22945
  `initialize \u2190 ok protocolVersion=${initialize.protocolVersion} agentCaps=${JSON.stringify(initialize.agentCapabilities ?? {}).slice(0, 200)}`
22915
22946
  );
22916
22947
  log.info("acpClient", "newSession \u2192 sending");
22917
- const newSession = await this.connection.newSession({
22918
- cwd,
22919
- mcpServers: []
22948
+ let startupTimer;
22949
+ const startupFailure = new Promise((_2, reject) => {
22950
+ this.startupFailureReject = reject;
22951
+ startupTimer = setTimeout(() => {
22952
+ const tail = this.recentStderr.slice(-4).join(" | ");
22953
+ reject(
22954
+ new Error(
22955
+ `AGENT_STARTUP_TIMEOUT: ${this.opts.adapter.requiresAgentBinary} did not create a session within ${Math.round(
22956
+ NEWSESSION_TIMEOUT_MS / 1e3
22957
+ )}s${tail ? ` \u2014 last output: ${tail}` : ""}`
22958
+ )
22959
+ );
22960
+ }, NEWSESSION_TIMEOUT_MS);
22920
22961
  });
22962
+ let newSession;
22963
+ try {
22964
+ newSession = await Promise.race([
22965
+ this.connection.newSession({ cwd, mcpServers: [] }),
22966
+ startupFailure
22967
+ ]);
22968
+ } finally {
22969
+ if (startupTimer) clearTimeout(startupTimer);
22970
+ this.startupFailureReject = null;
22971
+ }
22921
22972
  this.sessionId = newSession.sessionId;
22922
22973
  const newSessionMeta = newSession;
22923
22974
  log.info(
@@ -29500,7 +29551,7 @@ function checkChokidar() {
29500
29551
  }
29501
29552
  async function doctor(args2 = []) {
29502
29553
  const json = args2.includes("--json");
29503
- const cliVersion = true ? "2.43.4" : "0.0.0-dev";
29554
+ const cliVersion = true ? "2.43.6" : "0.0.0-dev";
29504
29555
  const apiBase2 = resolveApiBaseUrl();
29505
29556
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
29506
29557
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -29699,7 +29750,7 @@ async function completion(args2) {
29699
29750
  // src/commands/version.ts
29700
29751
  var import_picocolors14 = __toESM(require("picocolors"));
29701
29752
  function version2() {
29702
- const v = true ? "2.43.4" : "unknown";
29753
+ const v = true ? "2.43.6" : "unknown";
29703
29754
  console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
29704
29755
  }
29705
29756
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.43.4",
3
+ "version": "2.43.6",
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",