codeam-cli 2.75.28 → 2.75.30
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 +12 -0
- package/dist/index.js +45 -19
- package/dist/postinstall.js +33 -0
- package/package.json +1 -1
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.75.29] — 2026-09-25
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Preview reaches the real dev server (readiness, Host), no CodeAgent Cloud copy (#821)
|
|
12
|
+
|
|
13
|
+
## [2.75.28] — 2026-09-25
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **cli:** Preview proxy forwards to the address the dev server really serves (#820)
|
|
18
|
+
|
|
7
19
|
## [2.75.27] — 2026-09-25
|
|
8
20
|
|
|
9
21
|
### 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.
|
|
10519
|
+
cliVersion: true ? "2.75.30" : "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.
|
|
10761
|
+
version: "2.75.30",
|
|
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.
|
|
12091
|
+
..."2.75.30" ? { ideVersion: "2.75.30" } : {}
|
|
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 =
|
|
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
|
}
|
|
@@ -24881,10 +24895,13 @@ async function bringUpInspector(targetPort, deps = {}) {
|
|
|
24881
24895
|
|
|
24882
24896
|
// src/services/preview/served-address.ts
|
|
24883
24897
|
var LOOPBACK_HOSTS = ["127.0.0.1", "::1"];
|
|
24884
|
-
var ANSI_RE2 = /\x1b\[[0-9
|
|
24898
|
+
var ANSI_RE2 = /\x1b\[[0-9;?]*[A-Za-z]/g;
|
|
24899
|
+
function stripAnsi(text) {
|
|
24900
|
+
return text.replace(ANSI_RE2, "");
|
|
24901
|
+
}
|
|
24885
24902
|
var LOCAL_URL_RE = /https?:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1?\]|\[::\]):(\d{2,5})\b/gi;
|
|
24886
24903
|
function announcedPorts(output) {
|
|
24887
|
-
const clean = output
|
|
24904
|
+
const clean = stripAnsi(output);
|
|
24888
24905
|
const ports = [];
|
|
24889
24906
|
for (const m of clean.matchAll(LOCAL_URL_RE)) {
|
|
24890
24907
|
const port = Number(m[1]);
|
|
@@ -24902,6 +24919,15 @@ async function resolveServedAddress(output, detectedPort, deps = {}) {
|
|
|
24902
24919
|
}
|
|
24903
24920
|
return { host: "127.0.0.1", port: detectedPort };
|
|
24904
24921
|
}
|
|
24922
|
+
async function announcedPortListening(output, deps = {}) {
|
|
24923
|
+
const listening = deps.listening ?? isPortListening;
|
|
24924
|
+
for (const port of announcedPorts(output)) {
|
|
24925
|
+
for (const host2 of LOOPBACK_HOSTS) {
|
|
24926
|
+
if (await listening(port, host2)) return true;
|
|
24927
|
+
}
|
|
24928
|
+
}
|
|
24929
|
+
return false;
|
|
24930
|
+
}
|
|
24905
24931
|
|
|
24906
24932
|
// src/services/preview/start-orchestrator.ts
|
|
24907
24933
|
var INSTALL_TIMEOUT_MS2 = 5 * 6e4;
|
|
@@ -25251,7 +25277,7 @@ async function startDevServer(ctx, extraEnv = {}) {
|
|
|
25251
25277
|
"i"
|
|
25252
25278
|
) : compileReadyPattern(detection.ready_pattern);
|
|
25253
25279
|
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 }) :
|
|
25280
|
+
const portProbe = isExpo ? () => waitForExpoManifest(detection.port, { timeoutMs: 1e3, intervalMs: 250 }) : isNextJs ? () => waitForPortListening(detection.port, { timeoutMs: 1e3, intervalMs: 250 }) : () => announcedPortListening(outputTail);
|
|
25255
25281
|
const outcome = await waitForDevServerReady(devServer, readyRe, {
|
|
25256
25282
|
timeoutMs: devServerReadyTimeoutMs(detection),
|
|
25257
25283
|
onChunk: (s) => {
|
|
@@ -25264,7 +25290,7 @@ async function startDevServer(ctx, extraEnv = {}) {
|
|
|
25264
25290
|
emit2(USER_EVENTS.PREVIEW_ERROR, {
|
|
25265
25291
|
stage: "spawn",
|
|
25266
25292
|
message: `The dev server exited (code ${outcome.code}) before it was ready. It may need a database or other services.`,
|
|
25267
|
-
stderrTail: outputTail.slice(-8e3)
|
|
25293
|
+
stderrTail: stripAnsi(outputTail).slice(-8e3)
|
|
25268
25294
|
});
|
|
25269
25295
|
return null;
|
|
25270
25296
|
}
|
|
@@ -25273,7 +25299,7 @@ async function startDevServer(ctx, extraEnv = {}) {
|
|
|
25273
25299
|
emit2(USER_EVENTS.PREVIEW_ERROR, {
|
|
25274
25300
|
stage: "ready_timeout",
|
|
25275
25301
|
message: "The dev server didn't become ready in time. It may be stuck waiting on a database or other service.",
|
|
25276
|
-
stderrTail: outputTail.slice(-8e3)
|
|
25302
|
+
stderrTail: stripAnsi(outputTail).slice(-8e3)
|
|
25277
25303
|
});
|
|
25278
25304
|
return null;
|
|
25279
25305
|
}
|
|
@@ -38390,10 +38416,10 @@ function completedReplyFailureBubble(opts) {
|
|
|
38390
38416
|
}
|
|
38391
38417
|
function houseAgentLimitMessage(text) {
|
|
38392
38418
|
if (/temporarily (?:unavailable|disabled)/i.test(text)) {
|
|
38393
|
-
return "\u23F3 **
|
|
38419
|
+
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
38420
|
}
|
|
38395
38421
|
const canUpgrade = /upgrade to pro/i.test(text);
|
|
38396
|
-
return "\u{1F4CA} **You\u2019ve reached
|
|
38422
|
+
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
38423
|
}
|
|
38398
38424
|
var AUTH_FAILURE_MESSAGE = (
|
|
38399
38425
|
// ⚠️ Do NOT name a status code here. This bubble fires for several
|
|
@@ -38423,10 +38449,10 @@ function agentStatusPage(agent, railWireId) {
|
|
|
38423
38449
|
}
|
|
38424
38450
|
function providerOutageMessage(agent, railWireId) {
|
|
38425
38451
|
if (railWireId) {
|
|
38426
|
-
const who2 = isManagedProviderId(railWireId) ? MANAGED_PROVIDER_DISPLAY_NAMES[railWireId] :
|
|
38452
|
+
const who2 = isManagedProviderId(railWireId) ? `${MANAGED_PROVIDER_DISPLAY_NAMES[railWireId]} ` : "";
|
|
38427
38453
|
return `\u{1F310} **CodeAgent's agent service is having a disruption \u2014 this isn't your session.**
|
|
38428
38454
|
|
|
38429
|
-
Your ${who2}
|
|
38455
|
+
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
38456
|
}
|
|
38431
38457
|
const info = agentStatusPage(agent);
|
|
38432
38458
|
const who = info ? info.vendor : "The agent provider";
|
|
@@ -48614,7 +48640,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
48614
48640
|
if (process.env.NODE_ENV === "test") return;
|
|
48615
48641
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
48616
48642
|
if (process.env.CI) return;
|
|
48617
|
-
const current2 = true ? "2.75.
|
|
48643
|
+
const current2 = true ? "2.75.30" : null;
|
|
48618
48644
|
if (!current2) return;
|
|
48619
48645
|
const cache = readCache();
|
|
48620
48646
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -48631,7 +48657,7 @@ function checkForUpdates() {
|
|
|
48631
48657
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
48632
48658
|
if (process.env.CI) return;
|
|
48633
48659
|
if (!process.stdout.isTTY) return;
|
|
48634
|
-
const current2 = true ? "2.75.
|
|
48660
|
+
const current2 = true ? "2.75.30" : null;
|
|
48635
48661
|
if (!current2) return;
|
|
48636
48662
|
const cache = readCache();
|
|
48637
48663
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -48654,7 +48680,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
|
|
|
48654
48680
|
var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
|
|
48655
48681
|
var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
|
|
48656
48682
|
function currentCliVersion() {
|
|
48657
|
-
return true ? "2.75.
|
|
48683
|
+
return true ? "2.75.30" : null;
|
|
48658
48684
|
}
|
|
48659
48685
|
async function installedVersion(deps) {
|
|
48660
48686
|
const ls = await deps.run(
|
|
@@ -50619,7 +50645,7 @@ function checkChokidar() {
|
|
|
50619
50645
|
}
|
|
50620
50646
|
async function doctor(args2 = []) {
|
|
50621
50647
|
const json = args2.includes("--json");
|
|
50622
|
-
const cliVersion = true ? "2.75.
|
|
50648
|
+
const cliVersion = true ? "2.75.30" : "0.0.0-dev";
|
|
50623
50649
|
const apiBase2 = resolveApiBaseUrl();
|
|
50624
50650
|
const diagnosticId = (0, import_node_crypto13.randomUUID)();
|
|
50625
50651
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -51143,7 +51169,7 @@ async function mcpWarm(argv = [], opts = {}) {
|
|
|
51143
51169
|
// src/commands/version.ts
|
|
51144
51170
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
51145
51171
|
function version2() {
|
|
51146
|
-
const v = true ? "2.75.
|
|
51172
|
+
const v = true ? "2.75.30" : "unknown";
|
|
51147
51173
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
51148
51174
|
}
|
|
51149
51175
|
|
|
@@ -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.
|
|
3
|
+
"version": "2.75.30",
|
|
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",
|