codeam-cli 2.39.55 → 2.39.57
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 +6 -0
- package/dist/index.js +45 -7
- package/package.json +1 -1
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.39.55] — 2026-06-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **cli:** Self-hosted host-agent auto-update + persistent headroom env
|
|
12
|
+
|
|
7
13
|
## [2.39.54] — 2026-06-20
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -5388,7 +5388,7 @@ function readAnonId() {
|
|
|
5388
5388
|
}
|
|
5389
5389
|
function superProperties() {
|
|
5390
5390
|
return {
|
|
5391
|
-
cliVersion: true ? "2.39.
|
|
5391
|
+
cliVersion: true ? "2.39.57" : "0.0.0-dev",
|
|
5392
5392
|
nodeVersion: process.version,
|
|
5393
5393
|
platform: process.platform,
|
|
5394
5394
|
arch: process.arch,
|
|
@@ -5547,7 +5547,7 @@ var os4 = __toESM(require("os"));
|
|
|
5547
5547
|
// package.json
|
|
5548
5548
|
var package_default = {
|
|
5549
5549
|
name: "codeam-cli",
|
|
5550
|
-
version: "2.39.
|
|
5550
|
+
version: "2.39.57",
|
|
5551
5551
|
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
5552
|
type: "commonjs",
|
|
5553
5553
|
main: "dist/index.js",
|
|
@@ -16929,6 +16929,13 @@ async function sendHostHeartbeat(identity, metrics) {
|
|
|
16929
16929
|
const elapsedNs = process.hrtime.bigint() - start2;
|
|
16930
16930
|
return Math.round(Number(elapsedNs) / 1e6);
|
|
16931
16931
|
}
|
|
16932
|
+
async function reportSessionEvent(identity, body) {
|
|
16933
|
+
await postJson("/api/self-hosted/session-event", {
|
|
16934
|
+
hostId: identity.hostId,
|
|
16935
|
+
hostToken: identity.hostToken,
|
|
16936
|
+
...body
|
|
16937
|
+
});
|
|
16938
|
+
}
|
|
16932
16939
|
function isSealedEnvelope(v) {
|
|
16933
16940
|
if (typeof v !== "object" || v === null) return false;
|
|
16934
16941
|
const o = v;
|
|
@@ -17360,7 +17367,7 @@ function checkForUpdates() {
|
|
|
17360
17367
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17361
17368
|
if (process.env.CI) return;
|
|
17362
17369
|
if (!process.stdout.isTTY) return;
|
|
17363
|
-
const current = true ? "2.39.
|
|
17370
|
+
const current = true ? "2.39.57" : null;
|
|
17364
17371
|
if (!current) return;
|
|
17365
17372
|
const cache = readCache();
|
|
17366
17373
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -17720,7 +17727,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process13.s
|
|
|
17720
17727
|
detached: false
|
|
17721
17728
|
});
|
|
17722
17729
|
function currentCliVersion() {
|
|
17723
|
-
return true ? "2.39.
|
|
17730
|
+
return true ? "2.39.57" : null;
|
|
17724
17731
|
}
|
|
17725
17732
|
function runCmd(cmd, args2, timeoutMs) {
|
|
17726
17733
|
return new Promise((resolve7) => {
|
|
@@ -17861,6 +17868,10 @@ var HostAgentSupervisor = class {
|
|
|
17861
17868
|
void this.beat();
|
|
17862
17869
|
this.heartbeatTimer = setInterval(() => void this.beat(), HEARTBEAT_INTERVAL_MS);
|
|
17863
17870
|
this.heartbeatTimer.unref?.();
|
|
17871
|
+
void reportSessionEvent(
|
|
17872
|
+
{ hostId: this.identity.hostId, hostToken: this.identity.hostToken },
|
|
17873
|
+
{ event: "reconcile", activeDeployIds: this.activeSessions().map((s) => s.id) }
|
|
17874
|
+
).catch((err) => log.trace("host-agent", "boot reconcile failed (best-effort)", err));
|
|
17864
17875
|
const updateMs = this.selfUpdateIntervalMs();
|
|
17865
17876
|
if (updateMs > 0) {
|
|
17866
17877
|
this.selfUpdateTimer = setInterval(() => void this.selfUpdateTick(), updateMs);
|
|
@@ -17978,6 +17989,22 @@ var HostAgentSupervisor = class {
|
|
|
17978
17989
|
childCount() {
|
|
17979
17990
|
return this.children.size;
|
|
17980
17991
|
}
|
|
17992
|
+
/**
|
|
17993
|
+
* Snapshot the supervisor's live children as heartbeat session entries.
|
|
17994
|
+
*
|
|
17995
|
+
* Each entry's `id` is the deployId-correlated sessionId the backend
|
|
17996
|
+
* recognizes (the supervisor keys its children by it — the same id a
|
|
17997
|
+
* `self_hosted_stop` arrives with, see `stopChild`). `agent` is the deploy's
|
|
17998
|
+
* `agentId`; `startedAt` is the epoch-ms spawn time tracked on the child.
|
|
17999
|
+
* Returns `[]` when no children are active so the backend reflects "0 active".
|
|
18000
|
+
*/
|
|
18001
|
+
activeSessions() {
|
|
18002
|
+
return [...this.children.values()].map((child) => ({
|
|
18003
|
+
id: child.deployId,
|
|
18004
|
+
agent: child.agent,
|
|
18005
|
+
startedAt: child.startedAt
|
|
18006
|
+
}));
|
|
18007
|
+
}
|
|
17981
18008
|
/**
|
|
17982
18009
|
* Route a relay command. Only `self_hosted_deploy` / `self_hosted_stop`
|
|
17983
18010
|
* are understood; anything else is ignored (the box accepts no
|
|
@@ -18094,7 +18121,12 @@ var HostAgentSupervisor = class {
|
|
|
18094
18121
|
}
|
|
18095
18122
|
report("spawning", "starting agent");
|
|
18096
18123
|
const proc = this.spawnSessionChild(childEnv, cwd, extraArgs);
|
|
18097
|
-
const child = {
|
|
18124
|
+
const child = {
|
|
18125
|
+
deployId: payload.deployId,
|
|
18126
|
+
proc,
|
|
18127
|
+
agent: payload.agentId,
|
|
18128
|
+
startedAt: Date.now()
|
|
18129
|
+
};
|
|
18098
18130
|
this.children.set(payload.deployId, child);
|
|
18099
18131
|
let tail = "";
|
|
18100
18132
|
const appendTail = (buf) => {
|
|
@@ -18108,6 +18140,12 @@ var HostAgentSupervisor = class {
|
|
|
18108
18140
|
if (tracked) {
|
|
18109
18141
|
this.children.delete(payload.deployId);
|
|
18110
18142
|
}
|
|
18143
|
+
if (tracked) {
|
|
18144
|
+
void reportSessionEvent(
|
|
18145
|
+
{ hostId: this.identity.hostId, hostToken: this.identity.hostToken },
|
|
18146
|
+
{ event: "ended", deployId: payload.deployId }
|
|
18147
|
+
).catch((err) => log.trace("host-agent", "session ended report failed (best-effort)", err));
|
|
18148
|
+
}
|
|
18111
18149
|
if (tracked && typeof code === "number" && code !== 0) {
|
|
18112
18150
|
const detail = tail.trim().slice(-500);
|
|
18113
18151
|
report("failed", detail ? `agent exited (${code}): ${detail}` : `agent exited (${code})`);
|
|
@@ -28241,7 +28279,7 @@ function checkChokidar() {
|
|
|
28241
28279
|
}
|
|
28242
28280
|
async function doctor(args2 = []) {
|
|
28243
28281
|
const json = args2.includes("--json");
|
|
28244
|
-
const cliVersion = true ? "2.39.
|
|
28282
|
+
const cliVersion = true ? "2.39.57" : "0.0.0-dev";
|
|
28245
28283
|
const apiBase2 = resolveApiBaseUrl();
|
|
28246
28284
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
28247
28285
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -28440,7 +28478,7 @@ async function completion(args2) {
|
|
|
28440
28478
|
// src/commands/version.ts
|
|
28441
28479
|
var import_picocolors14 = __toESM(require("picocolors"));
|
|
28442
28480
|
function version2() {
|
|
28443
|
-
const v = true ? "2.39.
|
|
28481
|
+
const v = true ? "2.39.57" : "unknown";
|
|
28444
28482
|
console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
|
|
28445
28483
|
}
|
|
28446
28484
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.39.
|
|
3
|
+
"version": "2.39.57",
|
|
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",
|