codeam-cli 2.39.73 → 2.39.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,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.39.74] — 2026-06-21
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Preview no longer dies silently on string setup_commands
12
+
13
+ ## [2.39.73] — 2026-06-21
14
+
15
+ ### Fixed
16
+
17
+ - **cli:** Self-hosted Headroom Kompress on ONNX (no torch) + model pre-download
18
+
7
19
  ## [2.39.72] — 2026-06-21
8
20
 
9
21
  ### Fixed
package/dist/index.js CHANGED
@@ -356,7 +356,7 @@ Return ONLY a JSON object on stdout (no prose, no markdown fences):
356
356
  "port": <number>,
357
357
  "ready_pattern": "<regex matching the server-ready stdout line>",
358
358
  "env": { "HOST": "0.0.0.0" },
359
- "setup_commands": [],
359
+ "setup_commands": [{ "cmd": "<executable>", "args": ["..."] }],
360
360
  "notes": "<one-line caveat or null>"
361
361
  }
362
362
 
@@ -378,6 +378,8 @@ CRITICAL \u2014 setup_commands:
378
378
  - ONLY include setup_commands for genuinely non-install work the project needs
379
379
  before its dev server can boot: prisma generate, codegen, prebuild scripts,
380
380
  database migrations against a local SQLite, etc.
381
+ - Each setup_commands entry MUST be an object {"cmd": "...", "args": ["..."]} \u2014
382
+ e.g. {"cmd": "npx", "args": ["prisma", "generate"]}. NOT a bare string.
381
383
  - For most projects, setup_commands should be an empty array [].
382
384
 
383
385
  OUTPUT JSON ONLY. NO MARKDOWN. NO COMMENTARY.
@@ -5388,7 +5390,7 @@ function readAnonId() {
5388
5390
  }
5389
5391
  function superProperties() {
5390
5392
  return {
5391
- cliVersion: true ? "2.39.73" : "0.0.0-dev",
5393
+ cliVersion: true ? "2.39.75" : "0.0.0-dev",
5392
5394
  nodeVersion: process.version,
5393
5395
  platform: process.platform,
5394
5396
  arch: process.arch,
@@ -5547,7 +5549,7 @@ var os4 = __toESM(require("os"));
5547
5549
  // package.json
5548
5550
  var package_default = {
5549
5551
  name: "codeam-cli",
5550
- version: "2.39.73",
5552
+ version: "2.39.75",
5551
5553
  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.",
5552
5554
  type: "commonjs",
5553
5555
  main: "dist/index.js",
@@ -7739,10 +7741,21 @@ var startCommandSchema = import_zod.z.object({
7739
7741
  port: import_zod.z.number().int().min(1).max(65535),
7740
7742
  ready_pattern: import_zod.z.string().min(1).max(4096),
7741
7743
  env: import_zod.z.record(import_zod.z.string(), import_zod.z.string().max(8192)).optional(),
7744
+ // The agent emits entries as either {cmd,args} objects OR bare command
7745
+ // strings ("npx prisma generate"). Accept both and normalize strings to
7746
+ // {cmd,args} so a string entry doesn't reject the whole detection (which
7747
+ // would silently drop the preview) and downstream always gets objects.
7742
7748
  setup_commands: import_zod.z.array(
7743
- import_zod.z.object({
7744
- cmd: import_zod.z.string().min(1).max(256),
7745
- args: import_zod.z.array(import_zod.z.string().max(1024)).max(64)
7749
+ import_zod.z.union([
7750
+ import_zod.z.string().min(1).max(1024),
7751
+ import_zod.z.object({
7752
+ cmd: import_zod.z.string().min(1).max(256),
7753
+ args: import_zod.z.array(import_zod.z.string().max(1024)).max(64)
7754
+ })
7755
+ ]).transform((entry) => {
7756
+ if (typeof entry !== "string") return entry;
7757
+ const parts = entry.trim().split(/\s+/).filter(Boolean);
7758
+ return { cmd: parts[0] ?? "", args: parts.slice(1) };
7746
7759
  })
7747
7760
  ).max(32).optional(),
7748
7761
  notes: import_zod.z.string().max(4096).nullable().optional()
@@ -8282,18 +8295,16 @@ function boxRow(content, visibleLength) {
8282
8295
  }
8283
8296
  function showPairingCode(code) {
8284
8297
  const spaced = code.split("").join(" ");
8285
- console.log(BOX_BORDER_TOP);
8298
+ out(BOX_BORDER_TOP);
8286
8299
  const label = " Code: ";
8287
8300
  const codeVisible = `${label}${spaced}`.length;
8288
- console.log(
8289
- boxRow(`${label}${import_picocolors.default.bold(import_picocolors.default.yellow(spaced))}`, codeVisible)
8290
- );
8291
- console.log(BOX_BORDER_BOT);
8292
- console.log("");
8301
+ out(boxRow(`${label}${import_picocolors.default.bold(import_picocolors.default.yellow(spaced))}`, codeVisible));
8302
+ out(BOX_BORDER_BOT);
8303
+ out("");
8293
8304
  import_qrcode_terminal.default.generate(code, { small: true }, (qr) => {
8294
- qr.split("\n").forEach((line) => console.log(" " + line));
8305
+ qr.split("\n").forEach((line) => out(" " + line));
8295
8306
  });
8296
- console.log("");
8307
+ out("");
8297
8308
  }
8298
8309
  function formatRemaining(expiresAt) {
8299
8310
  const secs = Math.max(0, Math.floor((expiresAt - Date.now()) / 1e3));
@@ -13308,8 +13319,11 @@ async function link(args2 = []) {
13308
13319
  }
13309
13320
  spin.stop("Got pairing code");
13310
13321
  showPairingCode(pairing.code);
13311
- console.log(import_picocolors2.default.dim(" Scan the QR or enter the code in CodeAgent Mobile."));
13312
- console.log("");
13322
+ process.stderr.write(
13323
+ `${import_picocolors2.default.dim(" Scan the QR or enter the code in CodeAgent Mobile.")}
13324
+
13325
+ `
13326
+ );
13313
13327
  const waitSpin = dist_exports.spinner();
13314
13328
  const waitMsg = () => `Waiting for mobile pair... \xB7 expires in ${formatRemaining(pairing.expiresAt)}`;
13315
13329
  waitSpin.start(waitMsg());
@@ -16173,9 +16187,18 @@ var previewStartH = (ctx, _cmd, parsed) => {
16173
16187
  }
16174
16188
  preflightRan = true;
16175
16189
  }
16176
- const agentSetupCommands = preflightRan ? (detection.setup_commands ?? []).filter(
16177
- (s) => !isJsInstallCommand(s.cmd, s.args)
16178
- ) : detection.setup_commands ?? [];
16190
+ const normalizedSetup = (detection.setup_commands ?? []).map((entry) => {
16191
+ if (typeof entry === "string") {
16192
+ const parts = entry.trim().split(/\s+/).filter(Boolean);
16193
+ return { cmd: parts[0] ?? "", args: parts.slice(1) };
16194
+ }
16195
+ const o = entry ?? {};
16196
+ return {
16197
+ cmd: typeof o.cmd === "string" ? o.cmd : "",
16198
+ args: Array.isArray(o.args) ? o.args.filter((a) => typeof a === "string") : []
16199
+ };
16200
+ }).filter((s) => s.cmd.length > 0);
16201
+ const agentSetupCommands = preflightRan ? normalizedSetup.filter((s) => !isJsInstallCommand(s.cmd, s.args)) : normalizedSetup;
16179
16202
  for (const setup of agentSetupCommands) {
16180
16203
  emitProgress("SETUP_RUN", `${setup.cmd} ${setup.args.join(" ")}`);
16181
16204
  const timeoutMs = isJsInstallCommand(setup.cmd, setup.args) ? INSTALL_TIMEOUT_MS : SETUP_TIMEOUT_MS;
@@ -16486,7 +16509,17 @@ var previewStartH = (ctx, _cmd, parsed) => {
16486
16509
  type: "preview_ready",
16487
16510
  payload: { url, framework: detection.framework, port: detection.port }
16488
16511
  });
16489
- })();
16512
+ })().catch((err) => {
16513
+ const message = err instanceof Error ? err.message : String(err);
16514
+ log.warn("preview", `start crashed before ready: ${message}`);
16515
+ void postPreviewEvent({
16516
+ sessionId: ctx.sessionId,
16517
+ pluginId: ctx.pluginId,
16518
+ pluginAuthToken,
16519
+ type: "preview_error",
16520
+ payload: { stage: "spawn", message: `Preview failed to start: ${message}` }
16521
+ });
16522
+ });
16490
16523
  };
16491
16524
  var previewStopH = (ctx) => {
16492
16525
  if (!ctx.pluginAuthToken) {
@@ -17406,7 +17439,7 @@ function checkForUpdates() {
17406
17439
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
17407
17440
  if (process.env.CI) return;
17408
17441
  if (!process.stdout.isTTY) return;
17409
- const current = true ? "2.39.73" : null;
17442
+ const current = true ? "2.39.75" : null;
17410
17443
  if (!current) return;
17411
17444
  const cache = readCache();
17412
17445
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -17805,7 +17838,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process13.s
17805
17838
  detached: false
17806
17839
  });
17807
17840
  function currentCliVersion() {
17808
- return true ? "2.39.73" : null;
17841
+ return true ? "2.39.75" : null;
17809
17842
  }
17810
17843
  function runCmd(cmd, args2, timeoutMs) {
17811
17844
  return new Promise((resolve7) => {
@@ -26058,8 +26091,11 @@ async function pair(args2 = []) {
26058
26091
  process.exit(0);
26059
26092
  }
26060
26093
  showPairingCode(result.code);
26061
- console.log(import_picocolors5.default.dim(" Scan the QR code or enter the code in CodeAgent Mobile."));
26062
- console.log("");
26094
+ process.stderr.write(
26095
+ `${import_picocolors5.default.dim(" Scan the QR code or enter the code in CodeAgent Mobile.")}
26096
+
26097
+ `
26098
+ );
26063
26099
  const waitSpin = dist_exports.spinner();
26064
26100
  const waitMessage = () => `Waiting for mobile app... \xB7 expires in ${formatRemaining(result.expiresAt)}`;
26065
26101
  waitSpin.start(waitMessage());
@@ -28459,7 +28495,7 @@ function checkChokidar() {
28459
28495
  }
28460
28496
  async function doctor(args2 = []) {
28461
28497
  const json = args2.includes("--json");
28462
- const cliVersion = true ? "2.39.73" : "0.0.0-dev";
28498
+ const cliVersion = true ? "2.39.75" : "0.0.0-dev";
28463
28499
  const apiBase2 = resolveApiBaseUrl();
28464
28500
  const diagnosticId = (0, import_node_crypto8.randomUUID)();
28465
28501
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -28658,7 +28694,7 @@ async function completion(args2) {
28658
28694
  // src/commands/version.ts
28659
28695
  var import_picocolors14 = __toESM(require("picocolors"));
28660
28696
  function version2() {
28661
- const v = true ? "2.39.73" : "unknown";
28697
+ const v = true ? "2.39.75" : "unknown";
28662
28698
  console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
28663
28699
  }
28664
28700
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.39.73",
3
+ "version": "2.39.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",