codeam-cli 2.75.28 → 2.75.29

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,12 @@ 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.75.28] — 2026-09-25
8
+
9
+ ### Fixed
10
+
11
+ - **cli:** Preview proxy forwards to the address the dev server really serves (#820)
12
+
7
13
  ## [2.75.27] — 2026-09-25
8
14
 
9
15
  ### Fixed
package/dist/index.js CHANGED
@@ -10516,7 +10516,7 @@ function readAnonId() {
10516
10516
  }
10517
10517
  function superProperties() {
10518
10518
  return {
10519
- cliVersion: true ? "2.75.28" : "0.0.0-dev",
10519
+ cliVersion: true ? "2.75.29" : "0.0.0-dev",
10520
10520
  nodeVersion: process.version,
10521
10521
  platform: process.platform,
10522
10522
  arch: process.arch,
@@ -10758,7 +10758,7 @@ var http = __toESM(require("http"));
10758
10758
  // package.json
10759
10759
  var package_default = {
10760
10760
  name: "codeam-cli",
10761
- version: "2.75.28",
10761
+ version: "2.75.29",
10762
10762
  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.",
10763
10763
  type: "commonjs",
10764
10764
  main: "dist/index.js",
@@ -12088,7 +12088,7 @@ var CommandRelayService = class _CommandRelayService {
12088
12088
  // fresh + clear the "CLI update available" banner after a self-update
12089
12089
  // (a codespace that reinstalls @latest reconnects via heartbeat, not
12090
12090
  // pair/reconnect). Older backends ignore the extra field.
12091
- ..."2.75.28" ? { ideVersion: "2.75.28" } : {}
12091
+ ..."2.75.29" ? { ideVersion: "2.75.29" } : {}
12092
12092
  };
12093
12093
  try {
12094
12094
  const res = await _postJson(`${API_BASE2}/api/plugin/heartbeat`, body);
@@ -24273,6 +24273,18 @@ function injectAt(html, script) {
24273
24273
  }
24274
24274
  return null;
24275
24275
  }
24276
+ function upstreamRequestHeaders(headers, targetPort) {
24277
+ const out2 = { ...headers, host: `localhost:${targetPort}` };
24278
+ if (headers.host && !headers["x-forwarded-host"]) out2["x-forwarded-host"] = headers.host;
24279
+ if (!headers["x-forwarded-proto"]) out2["x-forwarded-proto"] = "https";
24280
+ return out2;
24281
+ }
24282
+ function publicLocation(location, targetPort) {
24283
+ if (!location) return location;
24284
+ const m = /^https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\]):(\d+)(\/.*)?$/i.exec(location);
24285
+ if (!m || Number(m[1]) !== targetPort) return location;
24286
+ return m[2] ?? "/";
24287
+ }
24276
24288
  async function startInspectorProxy(opts) {
24277
24289
  const targetHost = opts.targetHost ?? "127.0.0.1";
24278
24290
  const upgraded = /* @__PURE__ */ new Set();
@@ -24283,12 +24295,14 @@ async function startInspectorProxy(opts) {
24283
24295
  secFetchDest: one(req.headers["sec-fetch-dest"]),
24284
24296
  secFetchMode: one(req.headers["sec-fetch-mode"])
24285
24297
  });
24286
- const headers = { ...req.headers };
24298
+ const headers = upstreamRequestHeaders(req.headers, opts.targetPort);
24287
24299
  if (inject) delete headers["accept-encoding"];
24288
24300
  const upstream = http8.request(
24289
24301
  { host: targetHost, port: opts.targetPort, method: req.method, path: req.url, headers },
24290
24302
  (originRes) => {
24291
24303
  const outHeaders = { ...originRes.headers };
24304
+ const location = publicLocation(originRes.headers.location, opts.targetPort);
24305
+ if (location !== void 0) outHeaders.location = location;
24292
24306
  const willInject = inject && isHtmlResponse(originRes.headers["content-type"]);
24293
24307
  if (willInject) delete outHeaders["content-length"];
24294
24308
  res.writeHead(originRes.statusCode ?? 502, outHeaders);
@@ -24334,7 +24348,7 @@ async function startInspectorProxy(opts) {
24334
24348
  upgraded.add(clientSocket);
24335
24349
  const upstream = net3.connect(opts.targetPort, targetHost, () => {
24336
24350
  const lines = [`${req.method} ${req.url} HTTP/1.1`];
24337
- for (const [k2, v] of Object.entries(req.headers)) {
24351
+ for (const [k2, v] of Object.entries(upstreamRequestHeaders(req.headers, opts.targetPort))) {
24338
24352
  for (const one of Array.isArray(v) ? v : [v]) {
24339
24353
  if (one !== void 0) lines.push(`${k2}: ${one}`);
24340
24354
  }
@@ -24902,6 +24916,15 @@ async function resolveServedAddress(output, detectedPort, deps = {}) {
24902
24916
  }
24903
24917
  return { host: "127.0.0.1", port: detectedPort };
24904
24918
  }
24919
+ async function announcedPortListening(output, deps = {}) {
24920
+ const listening = deps.listening ?? isPortListening;
24921
+ for (const port of announcedPorts(output)) {
24922
+ for (const host2 of LOOPBACK_HOSTS) {
24923
+ if (await listening(port, host2)) return true;
24924
+ }
24925
+ }
24926
+ return false;
24927
+ }
24905
24928
 
24906
24929
  // src/services/preview/start-orchestrator.ts
24907
24930
  var INSTALL_TIMEOUT_MS2 = 5 * 6e4;
@@ -25251,7 +25274,7 @@ async function startDevServer(ctx, extraEnv = {}) {
25251
25274
  "i"
25252
25275
  ) : compileReadyPattern(detection.ready_pattern);
25253
25276
  const isNextJs = /next/i.test(detection.framework);
25254
- const portProbe = isExpo ? () => waitForExpoManifest(detection.port, { timeoutMs: 1e3, intervalMs: 250 }) : isNextJs ? () => waitForPortListening(detection.port, { timeoutMs: 1e3, intervalMs: 250 }) : void 0;
25277
+ const portProbe = isExpo ? () => waitForExpoManifest(detection.port, { timeoutMs: 1e3, intervalMs: 250 }) : isNextJs ? () => waitForPortListening(detection.port, { timeoutMs: 1e3, intervalMs: 250 }) : () => announcedPortListening(outputTail);
25255
25278
  const outcome = await waitForDevServerReady(devServer, readyRe, {
25256
25279
  timeoutMs: devServerReadyTimeoutMs(detection),
25257
25280
  onChunk: (s) => {
@@ -38390,10 +38413,10 @@ function completedReplyFailureBubble(opts) {
38390
38413
  }
38391
38414
  function houseAgentLimitMessage(text) {
38392
38415
  if (/temporarily (?:unavailable|disabled)/i.test(text)) {
38393
- return "\u23F3 **CodeAgent Cloud is temporarily unavailable \u2014 this one\u2019s on us, not your account.**\n\nThere\u2019s nothing to buy and nothing owed, and it isn\u2019t a problem with your login, so re-authenticating won\u2019t help. Send your message again in a bit, or connect your own agent (Claude Code, Codex, Cursor, Gemini) in **Profile \u203A Agents** to keep going now.";
38416
+ return "\u23F3 **Our agent service is temporarily unavailable \u2014 this one\u2019s on us, not your account.**\n\nThere\u2019s nothing to buy and nothing owed, and it isn\u2019t a problem with your login, so re-authenticating won\u2019t help. Send your message again in a bit, or connect your own agent (Claude Code, Codex, Cursor, Gemini) in **Profile \u203A Agents** to keep going now.";
38394
38417
  }
38395
38418
  const canUpgrade = /upgrade to pro/i.test(text);
38396
- 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.");
38419
+ return "\u{1F4CA} **You\u2019ve reached today\u2019s agent usage limit.**\n\nThe free 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.");
38397
38420
  }
38398
38421
  var AUTH_FAILURE_MESSAGE = (
38399
38422
  // ⚠️ Do NOT name a status code here. This bubble fires for several
@@ -38423,10 +38446,10 @@ function agentStatusPage(agent, railWireId) {
38423
38446
  }
38424
38447
  function providerOutageMessage(agent, railWireId) {
38425
38448
  if (railWireId) {
38426
- const who2 = isManagedProviderId(railWireId) ? MANAGED_PROVIDER_DISPLAY_NAMES[railWireId] : HOUSE_AGENT_NAME;
38449
+ const who2 = isManagedProviderId(railWireId) ? `${MANAGED_PROVIDER_DISPLAY_NAMES[railWireId]} ` : "";
38427
38450
  return `\u{1F310} **CodeAgent's agent service is having a disruption \u2014 this isn't your session.**
38428
38451
 
38429
- Your ${who2} agent couldn't finish this turn because our provider returned an overload error. It usually clears up on its own \u2014 just send your message again in a bit.`;
38452
+ Your ${who2}agent couldn't finish this turn because our provider returned an overload error. It usually clears up on its own \u2014 just send your message again in a bit.`;
38430
38453
  }
38431
38454
  const info = agentStatusPage(agent);
38432
38455
  const who = info ? info.vendor : "The agent provider";
@@ -48614,7 +48637,7 @@ async function autoUpgradeBeforeCriticalCommand() {
48614
48637
  if (process.env.NODE_ENV === "test") return;
48615
48638
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
48616
48639
  if (process.env.CI) return;
48617
- const current2 = true ? "2.75.28" : null;
48640
+ const current2 = true ? "2.75.29" : null;
48618
48641
  if (!current2) return;
48619
48642
  const cache = readCache();
48620
48643
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -48631,7 +48654,7 @@ function checkForUpdates() {
48631
48654
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
48632
48655
  if (process.env.CI) return;
48633
48656
  if (!process.stdout.isTTY) return;
48634
- const current2 = true ? "2.75.28" : null;
48657
+ const current2 = true ? "2.75.29" : null;
48635
48658
  if (!current2) return;
48636
48659
  const cache = readCache();
48637
48660
  const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
@@ -48654,7 +48677,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
48654
48677
  var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
48655
48678
  var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
48656
48679
  function currentCliVersion() {
48657
- return true ? "2.75.28" : null;
48680
+ return true ? "2.75.29" : null;
48658
48681
  }
48659
48682
  async function installedVersion(deps) {
48660
48683
  const ls = await deps.run(
@@ -50619,7 +50642,7 @@ function checkChokidar() {
50619
50642
  }
50620
50643
  async function doctor(args2 = []) {
50621
50644
  const json = args2.includes("--json");
50622
- const cliVersion = true ? "2.75.28" : "0.0.0-dev";
50645
+ const cliVersion = true ? "2.75.29" : "0.0.0-dev";
50623
50646
  const apiBase2 = resolveApiBaseUrl();
50624
50647
  const diagnosticId = (0, import_node_crypto13.randomUUID)();
50625
50648
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -51143,7 +51166,7 @@ async function mcpWarm(argv = [], opts = {}) {
51143
51166
  // src/commands/version.ts
51144
51167
  var import_picocolors15 = __toESM(require("picocolors"));
51145
51168
  function version2() {
51146
- const v = true ? "2.75.28" : "unknown";
51169
+ const v = true ? "2.75.29" : "unknown";
51147
51170
  console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
51148
51171
  }
51149
51172
 
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // src/postinstall.ts
5
+ var c = {
6
+ reset: "\x1B[0m",
7
+ bold: "\x1B[1m",
8
+ dim: "\x1B[2m",
9
+ green: "\x1B[32m",
10
+ cyan: "\x1B[36m",
11
+ violet: "\x1B[35m",
12
+ white: "\x1B[97m"
13
+ };
14
+ var lines = [
15
+ "",
16
+ ` ${c.violet}${c.bold}codeam-cli${c.reset} ${c.dim}\u2014 Claude Code remote control${c.reset}`,
17
+ "",
18
+ ` ${c.dim}1.${c.reset} Pair your phone:`,
19
+ ` ${c.cyan}codeam pair${c.reset}`,
20
+ "",
21
+ ` ${c.dim}2.${c.reset} Launch Claude Code with mobile control:`,
22
+ ` ${c.cyan}codeam${c.reset}`,
23
+ "",
24
+ ` ${c.dim}Other commands:${c.reset}`,
25
+ ` ${c.white}codeam sessions${c.reset} ${c.dim}list paired devices${c.reset}`,
26
+ ` ${c.white}codeam status${c.reset} ${c.dim}show connection info${c.reset}`,
27
+ ` ${c.white}codeam logout${c.reset} ${c.dim}remove all sessions${c.reset}`,
28
+ "",
29
+ ` ${c.dim}Requires Claude Code:${c.reset} ${c.green}npm install -g @anthropic-ai/claude-code${c.reset}`,
30
+ ` ${c.dim}Mobile app:${c.reset} ${c.green}https://www.codeagent-mobile.com${c.reset}`,
31
+ ""
32
+ ];
33
+ process.stdout.write(lines.join("\n") + "\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeam-cli",
3
- "version": "2.75.28",
3
+ "version": "2.75.29",
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",