codeam-cli 2.32.7 → 2.32.9

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,13 @@ 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.32.7] — 2026-06-07
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Use dns.lookup (OS resolver) as primary probe for cloudflared tunnel readiness
12
+ - **cli:** Keep Gemini snapshot valid as long as refresh_token is present
13
+
7
14
  ## [2.32.6] — 2026-06-07
8
15
 
9
16
  ### Fixed
package/dist/index.js CHANGED
@@ -498,7 +498,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
498
498
  // package.json
499
499
  var package_default = {
500
500
  name: "codeam-cli",
501
- version: "2.32.7",
501
+ version: "2.32.9",
502
502
  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.",
503
503
  type: "commonjs",
504
504
  main: "dist/index.js",
@@ -5869,7 +5869,7 @@ function readAnonId() {
5869
5869
  }
5870
5870
  function superProperties() {
5871
5871
  return {
5872
- cliVersion: true ? "2.32.7" : "0.0.0-dev",
5872
+ cliVersion: true ? "2.32.9" : "0.0.0-dev",
5873
5873
  nodeVersion: process.version,
5874
5874
  platform: process.platform,
5875
5875
  arch: process.arch,
@@ -17743,6 +17743,37 @@ var requestPreviewDetectH = (ctx) => {
17743
17743
  });
17744
17744
  })();
17745
17745
  };
17746
+ function compileReadyPattern(pattern) {
17747
+ return new RegExp(pattern, "i");
17748
+ }
17749
+ async function waitForDevServerReady(devServer, readyRe, opts = {
17750
+ timeoutMs: 12e4
17751
+ }) {
17752
+ let readyMatched = false;
17753
+ const READY_BUFFER_MAX = 32768;
17754
+ let readyBuffer = "";
17755
+ const consume = (chunk) => {
17756
+ const s = chunk.toString();
17757
+ opts.onChunk?.(s);
17758
+ if (readyMatched) return;
17759
+ readyBuffer += s;
17760
+ if (readyBuffer.length > READY_BUFFER_MAX) {
17761
+ readyBuffer = readyBuffer.slice(-READY_BUFFER_MAX);
17762
+ }
17763
+ if (readyRe.test(readyBuffer)) readyMatched = true;
17764
+ };
17765
+ devServer.stdout?.on("data", consume);
17766
+ devServer.stderr?.on("data", consume);
17767
+ const deadline = Date.now() + opts.timeoutMs;
17768
+ while (!readyMatched && Date.now() < deadline) {
17769
+ if (devServer.exitCode !== null) {
17770
+ return { kind: "exited", code: devServer.exitCode };
17771
+ }
17772
+ await new Promise((r) => setTimeout(r, 250));
17773
+ }
17774
+ if (readyMatched) return { kind: "ready" };
17775
+ return { kind: "timeout" };
17776
+ }
17746
17777
  function normalizeDetectionForSpawn(detection, cwd) {
17747
17778
  if (detection.command !== "npx") return detection;
17748
17779
  const args2 = detection.args ?? [];
@@ -17847,42 +17878,30 @@ var previewStartH = (ctx, _cmd, parsed) => {
17847
17878
  });
17848
17879
  emitProgress("BIND_PORT", String(detection.port));
17849
17880
  emitProgress("WAITING_FOR_READY", detection.ready_pattern);
17850
- let readyMatched = false;
17851
17881
  let expoUrl = null;
17852
- const readyRe = new RegExp(detection.ready_pattern);
17853
- const READY_BUFFER_MAX = 32768;
17854
- let readyBuffer = "";
17855
- const onChunk = (chunk) => {
17856
- const s = chunk.toString();
17857
- if (!readyMatched) {
17858
- readyBuffer += s;
17859
- if (readyBuffer.length > READY_BUFFER_MAX) {
17860
- readyBuffer = readyBuffer.slice(-READY_BUFFER_MAX);
17882
+ const readyRe = compileReadyPattern(detection.ready_pattern);
17883
+ const outcome = await waitForDevServerReady(devServer, readyRe, {
17884
+ timeoutMs: 12e4,
17885
+ onChunk: (s) => {
17886
+ if (!expoUrl && detection.framework === "Expo") {
17887
+ expoUrl = parseExpoUrl(s);
17861
17888
  }
17862
- if (readyRe.test(readyBuffer)) readyMatched = true;
17863
17889
  }
17864
- if (!expoUrl && detection.framework === "Expo") expoUrl = parseExpoUrl(s);
17865
- };
17866
- devServer.stdout.on("data", onChunk);
17867
- devServer.stderr.on("data", onChunk);
17868
- const readyDeadline = Date.now() + 12e4;
17869
- while (!readyMatched && Date.now() < readyDeadline) {
17870
- if (devServer.exitCode !== null) {
17871
- void postPreviewEvent({
17872
- sessionId: ctx.sessionId,
17873
- pluginId: ctx.pluginId,
17874
- pluginAuthToken,
17875
- type: "preview_error",
17876
- payload: {
17877
- stage: "spawn",
17878
- message: `Dev server exited (code ${devServer.exitCode}).`
17879
- }
17880
- });
17881
- return;
17882
- }
17883
- await new Promise((r) => setTimeout(r, 250));
17890
+ });
17891
+ if (outcome.kind === "exited") {
17892
+ void postPreviewEvent({
17893
+ sessionId: ctx.sessionId,
17894
+ pluginId: ctx.pluginId,
17895
+ pluginAuthToken,
17896
+ type: "preview_error",
17897
+ payload: {
17898
+ stage: "spawn",
17899
+ message: `Dev server exited (code ${outcome.code}).`
17900
+ }
17901
+ });
17902
+ return;
17884
17903
  }
17885
- if (!readyMatched) {
17904
+ if (outcome.kind === "timeout") {
17886
17905
  try {
17887
17906
  devServer.kill("SIGTERM");
17888
17907
  } catch {
@@ -24944,7 +24963,7 @@ function checkChokidar() {
24944
24963
  }
24945
24964
  async function doctor(args2 = []) {
24946
24965
  const json = args2.includes("--json");
24947
- const cliVersion = true ? "2.32.7" : "0.0.0-dev";
24966
+ const cliVersion = true ? "2.32.9" : "0.0.0-dev";
24948
24967
  const apiBase = resolveApiBaseUrl();
24949
24968
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
24950
24969
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -25143,7 +25162,7 @@ async function completion(args2) {
25143
25162
  // src/commands/version.ts
25144
25163
  var import_picocolors13 = __toESM(require("picocolors"));
25145
25164
  function version2() {
25146
- const v = true ? "2.32.7" : "unknown";
25165
+ const v = true ? "2.32.9" : "unknown";
25147
25166
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
25148
25167
  }
25149
25168
 
@@ -25429,7 +25448,7 @@ function checkForUpdates() {
25429
25448
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
25430
25449
  if (process.env.CI) return;
25431
25450
  if (!process.stdout.isTTY) return;
25432
- const current = true ? "2.32.7" : null;
25451
+ const current = true ? "2.32.9" : null;
25433
25452
  if (!current) return;
25434
25453
  const cache = readCache();
25435
25454
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.32.7",
3
+ "version": "2.32.9",
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",