codeam-cli 2.32.8 → 2.32.10

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,26 @@ 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.9] — 2026-06-07
8
+
9
+ ### Tests
10
+
11
+ - **cli:** Integration regression test for preview spawn → ready-pattern path
12
+
13
+ ## [2.32.8] — 2026-06-07
14
+
15
+ ### Chore
16
+
17
+ - Add FUNDING.yml — surface Sponsor button on the public repo
18
+
19
+ ### Documentation
20
+
21
+ - Drop Vercel reference from SSE cap comment
22
+
23
+ ### Fixed
24
+
25
+ - **cli:** Compile preview ready_pattern case-insensitive
26
+
7
27
  ## [2.32.7] — 2026-06-07
8
28
 
9
29
  ### 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.8",
501
+ version: "2.32.10",
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",
@@ -614,6 +614,12 @@ function showError(msg) {
614
614
  function showInfo(msg) {
615
615
  out(` ${import_picocolors.default.dim("\xB7")} ${msg}`);
616
616
  }
617
+ function showRelayNotice() {
618
+ out("");
619
+ out(` ${import_picocolors.default.bold(import_picocolors.default.yellow("\u26A0 This terminal is a relay \u2014 do not type here."))}`);
620
+ out(` ${import_picocolors.default.dim("Send your prompts from the CodeAgent Mobile app; replies stream in below.")}`);
621
+ out("");
622
+ }
617
623
  var BOX_INTERIOR = 30;
618
624
  var BOX_BORDER_TOP = ` \u250C${"\u2500".repeat(BOX_INTERIOR)}\u2510`;
619
625
  var BOX_BORDER_BOT = ` \u2514${"\u2500".repeat(BOX_INTERIOR)}\u2518`;
@@ -5869,7 +5875,7 @@ function readAnonId() {
5869
5875
  }
5870
5876
  function superProperties() {
5871
5877
  return {
5872
- cliVersion: true ? "2.32.8" : "0.0.0-dev",
5878
+ cliVersion: true ? "2.32.10" : "0.0.0-dev",
5873
5879
  nodeVersion: process.version,
5874
5880
  platform: process.platform,
5875
5881
  arch: process.arch,
@@ -17746,6 +17752,34 @@ var requestPreviewDetectH = (ctx) => {
17746
17752
  function compileReadyPattern(pattern) {
17747
17753
  return new RegExp(pattern, "i");
17748
17754
  }
17755
+ async function waitForDevServerReady(devServer, readyRe, opts = {
17756
+ timeoutMs: 12e4
17757
+ }) {
17758
+ let readyMatched = false;
17759
+ const READY_BUFFER_MAX = 32768;
17760
+ let readyBuffer = "";
17761
+ const consume = (chunk) => {
17762
+ const s = chunk.toString();
17763
+ opts.onChunk?.(s);
17764
+ if (readyMatched) return;
17765
+ readyBuffer += s;
17766
+ if (readyBuffer.length > READY_BUFFER_MAX) {
17767
+ readyBuffer = readyBuffer.slice(-READY_BUFFER_MAX);
17768
+ }
17769
+ if (readyRe.test(readyBuffer)) readyMatched = true;
17770
+ };
17771
+ devServer.stdout?.on("data", consume);
17772
+ devServer.stderr?.on("data", consume);
17773
+ const deadline = Date.now() + opts.timeoutMs;
17774
+ while (!readyMatched && Date.now() < deadline) {
17775
+ if (devServer.exitCode !== null) {
17776
+ return { kind: "exited", code: devServer.exitCode };
17777
+ }
17778
+ await new Promise((r) => setTimeout(r, 250));
17779
+ }
17780
+ if (readyMatched) return { kind: "ready" };
17781
+ return { kind: "timeout" };
17782
+ }
17749
17783
  function normalizeDetectionForSpawn(detection, cwd) {
17750
17784
  if (detection.command !== "npx") return detection;
17751
17785
  const args2 = detection.args ?? [];
@@ -17850,42 +17884,30 @@ var previewStartH = (ctx, _cmd, parsed) => {
17850
17884
  });
17851
17885
  emitProgress("BIND_PORT", String(detection.port));
17852
17886
  emitProgress("WAITING_FOR_READY", detection.ready_pattern);
17853
- let readyMatched = false;
17854
17887
  let expoUrl = null;
17855
17888
  const readyRe = compileReadyPattern(detection.ready_pattern);
17856
- const READY_BUFFER_MAX = 32768;
17857
- let readyBuffer = "";
17858
- const onChunk = (chunk) => {
17859
- const s = chunk.toString();
17860
- if (!readyMatched) {
17861
- readyBuffer += s;
17862
- if (readyBuffer.length > READY_BUFFER_MAX) {
17863
- readyBuffer = readyBuffer.slice(-READY_BUFFER_MAX);
17889
+ const outcome = await waitForDevServerReady(devServer, readyRe, {
17890
+ timeoutMs: 12e4,
17891
+ onChunk: (s) => {
17892
+ if (!expoUrl && detection.framework === "Expo") {
17893
+ expoUrl = parseExpoUrl(s);
17864
17894
  }
17865
- if (readyRe.test(readyBuffer)) readyMatched = true;
17866
- }
17867
- if (!expoUrl && detection.framework === "Expo") expoUrl = parseExpoUrl(s);
17868
- };
17869
- devServer.stdout.on("data", onChunk);
17870
- devServer.stderr.on("data", onChunk);
17871
- const readyDeadline = Date.now() + 12e4;
17872
- while (!readyMatched && Date.now() < readyDeadline) {
17873
- if (devServer.exitCode !== null) {
17874
- void postPreviewEvent({
17875
- sessionId: ctx.sessionId,
17876
- pluginId: ctx.pluginId,
17877
- pluginAuthToken,
17878
- type: "preview_error",
17879
- payload: {
17880
- stage: "spawn",
17881
- message: `Dev server exited (code ${devServer.exitCode}).`
17882
- }
17883
- });
17884
- return;
17885
17895
  }
17886
- await new Promise((r) => setTimeout(r, 250));
17896
+ });
17897
+ if (outcome.kind === "exited") {
17898
+ void postPreviewEvent({
17899
+ sessionId: ctx.sessionId,
17900
+ pluginId: ctx.pluginId,
17901
+ pluginAuthToken,
17902
+ type: "preview_error",
17903
+ payload: {
17904
+ stage: "spawn",
17905
+ message: `Dev server exited (code ${outcome.code}).`
17906
+ }
17907
+ });
17908
+ return;
17887
17909
  }
17888
- if (!readyMatched) {
17910
+ if (outcome.kind === "timeout") {
17889
17911
  try {
17890
17912
  devServer.kill("SIGTERM");
17891
17913
  } catch {
@@ -19879,6 +19901,7 @@ async function runAcpSession(opts) {
19879
19901
  `adapter handshake ok protocolVersion=${initialize.protocolVersion} sessionId=${acpSessionId.slice(0, 8)}`
19880
19902
  );
19881
19903
  showSuccess(`${opts.agent} online (ACP) \u2014 awaiting prompts from mobile.`);
19904
+ showRelayNotice();
19882
19905
  void publisher.publishOutput({
19883
19906
  type: "agent_banner",
19884
19907
  agentId: opts.agent,
@@ -24947,7 +24970,7 @@ function checkChokidar() {
24947
24970
  }
24948
24971
  async function doctor(args2 = []) {
24949
24972
  const json = args2.includes("--json");
24950
- const cliVersion = true ? "2.32.8" : "0.0.0-dev";
24973
+ const cliVersion = true ? "2.32.10" : "0.0.0-dev";
24951
24974
  const apiBase = resolveApiBaseUrl();
24952
24975
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
24953
24976
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -25146,7 +25169,7 @@ async function completion(args2) {
25146
25169
  // src/commands/version.ts
25147
25170
  var import_picocolors13 = __toESM(require("picocolors"));
25148
25171
  function version2() {
25149
- const v = true ? "2.32.8" : "unknown";
25172
+ const v = true ? "2.32.10" : "unknown";
25150
25173
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
25151
25174
  }
25152
25175
 
@@ -25432,7 +25455,7 @@ function checkForUpdates() {
25432
25455
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
25433
25456
  if (process.env.CI) return;
25434
25457
  if (!process.stdout.isTTY) return;
25435
- const current = true ? "2.32.8" : null;
25458
+ const current = true ? "2.32.10" : null;
25436
25459
  if (!current) return;
25437
25460
  const cache = readCache();
25438
25461
  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.8",
3
+ "version": "2.32.10",
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",