codeam-cli 2.61.96 → 2.61.98
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 +86 -18
- 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.61.97] — 2026-08-10
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **cli:** Keep the machine awake for the lifetime of a local session (per-OS) (#607)
|
|
12
|
+
|
|
13
|
+
## [2.61.96] — 2026-08-08
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **packs:** A review-only stage that approves clean is DONE, not a stall (#606)
|
|
18
|
+
|
|
7
19
|
## [2.61.95] — 2026-08-08
|
|
8
20
|
|
|
9
21
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -90,11 +90,11 @@ var require_src = __commonJS({
|
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
// src/integrations/stdio-proxy.ts
|
|
93
|
-
var
|
|
93
|
+
var import_node_child_process33, import_node_readline3, RESTART_CHECK_INTERVAL_MS, SIGKILL_ESCALATION_MS, TOOL_CALL_TIMEOUT_MS, REPLAY_INIT_ID, RestartableStdioProxy;
|
|
94
94
|
var init_stdio_proxy = __esm({
|
|
95
95
|
"src/integrations/stdio-proxy.ts"() {
|
|
96
96
|
"use strict";
|
|
97
|
-
|
|
97
|
+
import_node_child_process33 = require("child_process");
|
|
98
98
|
import_node_readline3 = __toESM(require("readline"));
|
|
99
99
|
RESTART_CHECK_INTERVAL_MS = 3e4;
|
|
100
100
|
SIGKILL_ESCALATION_MS = 2e3;
|
|
@@ -271,8 +271,8 @@ var init_stdio_proxy = __esm({
|
|
|
271
271
|
}
|
|
272
272
|
async spawnChild(stdout, preResolved) {
|
|
273
273
|
const spec = preResolved ?? await this.opts.spawnSpec();
|
|
274
|
-
const
|
|
275
|
-
const child =
|
|
274
|
+
const spawn45 = this.opts.spawnImpl ?? import_node_child_process33.spawn;
|
|
275
|
+
const child = spawn45(spec.command, spec.args, {
|
|
276
276
|
env: { ...process.env, ...spec.env },
|
|
277
277
|
// env only — never argv
|
|
278
278
|
stdio: ["pipe", "pipe", "inherit"]
|
|
@@ -8021,7 +8021,7 @@ function readAnonId() {
|
|
|
8021
8021
|
}
|
|
8022
8022
|
function superProperties() {
|
|
8023
8023
|
return {
|
|
8024
|
-
cliVersion: true ? "2.61.
|
|
8024
|
+
cliVersion: true ? "2.61.98" : "0.0.0-dev",
|
|
8025
8025
|
nodeVersion: process.version,
|
|
8026
8026
|
platform: process.platform,
|
|
8027
8027
|
arch: process.arch,
|
|
@@ -8202,7 +8202,7 @@ var os4 = __toESM(require("os"));
|
|
|
8202
8202
|
// package.json
|
|
8203
8203
|
var package_default = {
|
|
8204
8204
|
name: "codeam-cli",
|
|
8205
|
-
version: "2.61.
|
|
8205
|
+
version: "2.61.98",
|
|
8206
8206
|
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.",
|
|
8207
8207
|
type: "commonjs",
|
|
8208
8208
|
main: "dist/index.js",
|
|
@@ -9519,7 +9519,7 @@ var CommandRelayService = class _CommandRelayService {
|
|
|
9519
9519
|
// fresh + clear the "CLI update available" banner after a self-update
|
|
9520
9520
|
// (a codespace that reinstalls @latest reconnects via heartbeat, not
|
|
9521
9521
|
// pair/reconnect). Older backends ignore the extra field.
|
|
9522
|
-
..."2.61.
|
|
9522
|
+
..."2.61.98" ? { ideVersion: "2.61.98" } : {}
|
|
9523
9523
|
}).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
|
|
9524
9524
|
}
|
|
9525
9525
|
/**
|
|
@@ -14065,9 +14065,26 @@ var PosixOsStrategy = class {
|
|
|
14065
14065
|
};
|
|
14066
14066
|
var DarwinOsStrategy = class extends PosixOsStrategy {
|
|
14067
14067
|
id = "darwin";
|
|
14068
|
+
keepAwakeCommand(pid) {
|
|
14069
|
+
return { cmd: "caffeinate", args: ["-i", "-s", "-w", String(pid)] };
|
|
14070
|
+
}
|
|
14068
14071
|
};
|
|
14069
14072
|
var LinuxOsStrategy = class extends PosixOsStrategy {
|
|
14070
14073
|
id = "linux";
|
|
14074
|
+
keepAwakeCommand(pid) {
|
|
14075
|
+
return {
|
|
14076
|
+
cmd: "systemd-inhibit",
|
|
14077
|
+
args: [
|
|
14078
|
+
"--what=sleep:idle",
|
|
14079
|
+
"--why=CodeAgent local session active",
|
|
14080
|
+
"--mode=block",
|
|
14081
|
+
"tail",
|
|
14082
|
+
`--pid=${pid}`,
|
|
14083
|
+
"-f",
|
|
14084
|
+
"/dev/null"
|
|
14085
|
+
]
|
|
14086
|
+
};
|
|
14087
|
+
}
|
|
14071
14088
|
};
|
|
14072
14089
|
|
|
14073
14090
|
// src/os/win32.ts
|
|
@@ -14351,6 +14368,19 @@ var Win32OsStrategy = class {
|
|
|
14351
14368
|
list.push(new WindowsPtyStrategy(opts));
|
|
14352
14369
|
return list;
|
|
14353
14370
|
}
|
|
14371
|
+
keepAwakeCommand(pid) {
|
|
14372
|
+
const script = [
|
|
14373
|
+
"$s=Add-Type -Name P -Namespace W -PassThru -MemberDefinition",
|
|
14374
|
+
`'[DllImport("kernel32.dll")] public static extern uint SetThreadExecutionState(uint e);';`,
|
|
14375
|
+
"$s::SetThreadExecutionState(2147483649) | Out-Null;",
|
|
14376
|
+
`try { (Get-Process -Id ${pid} -ErrorAction Stop).WaitForExit() } catch {};`,
|
|
14377
|
+
"$s::SetThreadExecutionState(2147483648) | Out-Null;"
|
|
14378
|
+
].join(" ");
|
|
14379
|
+
return {
|
|
14380
|
+
cmd: "powershell",
|
|
14381
|
+
args: ["-NoProfile", "-NonInteractive", "-Command", script]
|
|
14382
|
+
};
|
|
14383
|
+
}
|
|
14354
14384
|
};
|
|
14355
14385
|
|
|
14356
14386
|
// src/os/registry.ts
|
|
@@ -20692,7 +20722,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
20692
20722
|
if (process.env.NODE_ENV === "test") return;
|
|
20693
20723
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
20694
20724
|
if (process.env.CI) return;
|
|
20695
|
-
const current2 = true ? "2.61.
|
|
20725
|
+
const current2 = true ? "2.61.98" : null;
|
|
20696
20726
|
if (!current2) return;
|
|
20697
20727
|
const cache = readCache();
|
|
20698
20728
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -20709,7 +20739,7 @@ function checkForUpdates() {
|
|
|
20709
20739
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
20710
20740
|
if (process.env.CI) return;
|
|
20711
20741
|
if (!process.stdout.isTTY) return;
|
|
20712
|
-
const current2 = true ? "2.61.
|
|
20742
|
+
const current2 = true ? "2.61.98" : null;
|
|
20713
20743
|
if (!current2) return;
|
|
20714
20744
|
const cache = readCache();
|
|
20715
20745
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -20729,7 +20759,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
|
|
|
20729
20759
|
var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
|
|
20730
20760
|
var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
|
|
20731
20761
|
function currentCliVersion() {
|
|
20732
|
-
return true ? "2.61.
|
|
20762
|
+
return true ? "2.61.98" : null;
|
|
20733
20763
|
}
|
|
20734
20764
|
function runCmd(cmd, args2, timeoutMs) {
|
|
20735
20765
|
return new Promise((resolve9) => {
|
|
@@ -33775,12 +33805,12 @@ function buildRelaunchProxyEnv(baseEnv) {
|
|
|
33775
33805
|
return env;
|
|
33776
33806
|
}
|
|
33777
33807
|
var relaunchProxyWithoutBudget = async () => {
|
|
33778
|
-
const { spawn:
|
|
33808
|
+
const { spawn: spawn45 } = await import("child_process");
|
|
33779
33809
|
killHeadroomProxy();
|
|
33780
33810
|
await new Promise((r) => setTimeout(r, 500));
|
|
33781
33811
|
const proxyEnv = buildRelaunchProxyEnv(process.env);
|
|
33782
33812
|
try {
|
|
33783
|
-
const proxy =
|
|
33813
|
+
const proxy = spawn45(
|
|
33784
33814
|
"headroom",
|
|
33785
33815
|
["proxy", "--port", "8787"],
|
|
33786
33816
|
{ stdio: "ignore", detached: true, env: proxyEnv }
|
|
@@ -39550,6 +39580,42 @@ function toEpochMs(ts) {
|
|
|
39550
39580
|
return Number.isFinite(parsed) ? parsed : Date.now();
|
|
39551
39581
|
}
|
|
39552
39582
|
|
|
39583
|
+
// src/services/keep-awake.ts
|
|
39584
|
+
var import_node_child_process32 = require("child_process");
|
|
39585
|
+
function keepDeviceAwake(deps = {}) {
|
|
39586
|
+
const env = deps.env ?? process.env;
|
|
39587
|
+
const isLocal = deps.isLocal ?? isLocalSession(env);
|
|
39588
|
+
const noop = () => {
|
|
39589
|
+
};
|
|
39590
|
+
if (!isLocal) return noop;
|
|
39591
|
+
if (env.CODEAM_NO_KEEP_AWAKE === "1") return noop;
|
|
39592
|
+
const command2 = deps.command !== void 0 ? deps.command : createOsStrategy().keepAwakeCommand(deps.pid ?? process.pid);
|
|
39593
|
+
if (!command2) return noop;
|
|
39594
|
+
const spawnFn = deps.spawnFn ?? import_node_child_process32.spawn;
|
|
39595
|
+
let child = null;
|
|
39596
|
+
try {
|
|
39597
|
+
child = spawnFn(command2.cmd, command2.args, { stdio: "ignore", detached: true });
|
|
39598
|
+
child.once("error", () => {
|
|
39599
|
+
});
|
|
39600
|
+
child.unref();
|
|
39601
|
+
log.info("keep-awake", `holding a power assertion for this local session (${command2.cmd})`);
|
|
39602
|
+
} catch {
|
|
39603
|
+
child = null;
|
|
39604
|
+
}
|
|
39605
|
+
let released = false;
|
|
39606
|
+
return () => {
|
|
39607
|
+
if (released) return;
|
|
39608
|
+
released = true;
|
|
39609
|
+
if (child && child.pid && !child.killed) {
|
|
39610
|
+
try {
|
|
39611
|
+
child.kill("SIGTERM");
|
|
39612
|
+
} catch {
|
|
39613
|
+
}
|
|
39614
|
+
}
|
|
39615
|
+
child = null;
|
|
39616
|
+
};
|
|
39617
|
+
}
|
|
39618
|
+
|
|
39553
39619
|
// src/agents/claude/onboarding.ts
|
|
39554
39620
|
var fs77 = __toESM(require("fs"));
|
|
39555
39621
|
var os60 = __toESM(require("os"));
|
|
@@ -39734,6 +39800,8 @@ async function start(requestedAgent, presetSession) {
|
|
|
39734
39800
|
`agent-spawn gate released (beads ungated, ${beads ? "already ready" : "still provisioning in background"}); project deps provisioned`
|
|
39735
39801
|
);
|
|
39736
39802
|
}
|
|
39803
|
+
const releaseKeepAwake = keepDeviceAwake();
|
|
39804
|
+
process.once("exit", releaseKeepAwake);
|
|
39737
39805
|
if (isLocalSession() && requiresAcp(session.agent)) {
|
|
39738
39806
|
const adapter = await resolveAcpAdapterWithRetry(session.agent);
|
|
39739
39807
|
const batonCapable = runtimeSupportsBaton(createRuntimeStrategy(session.agent));
|
|
@@ -42530,7 +42598,7 @@ function checkChokidar() {
|
|
|
42530
42598
|
}
|
|
42531
42599
|
async function doctor(args2 = []) {
|
|
42532
42600
|
const json = args2.includes("--json");
|
|
42533
|
-
const cliVersion = true ? "2.61.
|
|
42601
|
+
const cliVersion = true ? "2.61.98" : "0.0.0-dev";
|
|
42534
42602
|
const apiBase2 = resolveApiBaseUrl();
|
|
42535
42603
|
const diagnosticId = (0, import_node_crypto13.randomUUID)();
|
|
42536
42604
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -42727,7 +42795,7 @@ async function completion(args2) {
|
|
|
42727
42795
|
}
|
|
42728
42796
|
|
|
42729
42797
|
// src/integrations/mcp-run.ts
|
|
42730
|
-
var
|
|
42798
|
+
var import_node_child_process34 = require("child_process");
|
|
42731
42799
|
var import_node_fs12 = require("fs");
|
|
42732
42800
|
var import_node_os14 = __toESM(require("os"));
|
|
42733
42801
|
var import_node_path12 = __toESM(require("path"));
|
|
@@ -42802,7 +42870,7 @@ function resolveDelivery(id) {
|
|
|
42802
42870
|
function commandExists(command2) {
|
|
42803
42871
|
try {
|
|
42804
42872
|
const probe = process.platform === "win32" ? "where" : "which";
|
|
42805
|
-
(0,
|
|
42873
|
+
(0, import_node_child_process34.execFileSync)(probe, [command2], { stdio: "ignore" });
|
|
42806
42874
|
return true;
|
|
42807
42875
|
} catch {
|
|
42808
42876
|
return false;
|
|
@@ -42835,7 +42903,7 @@ function ensureCommand(command2) {
|
|
|
42835
42903
|
}
|
|
42836
42904
|
if (command2 === "uvx") {
|
|
42837
42905
|
try {
|
|
42838
|
-
(0,
|
|
42906
|
+
(0, import_node_child_process34.execSync)("curl -LsSf https://astral.sh/uv/install.sh | sh", {
|
|
42839
42907
|
stdio: ["ignore", process.stderr, process.stderr],
|
|
42840
42908
|
timeout: 18e4,
|
|
42841
42909
|
env: { ...process.env, UV_NO_MODIFY_PATH: "1" }
|
|
@@ -42844,7 +42912,7 @@ function ensureCommand(command2) {
|
|
|
42844
42912
|
}
|
|
42845
42913
|
if (resolveLauncherPath(command2) !== command2) return;
|
|
42846
42914
|
try {
|
|
42847
|
-
(0,
|
|
42915
|
+
(0, import_node_child_process34.execSync)("python3 -m pip install --user --quiet uv", {
|
|
42848
42916
|
stdio: ["ignore", process.stderr, process.stderr],
|
|
42849
42917
|
timeout: 18e4
|
|
42850
42918
|
});
|
|
@@ -42921,7 +42989,7 @@ async function mcpRun(args2) {
|
|
|
42921
42989
|
// src/commands/version.ts
|
|
42922
42990
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
42923
42991
|
function version2() {
|
|
42924
|
-
const v = true ? "2.61.
|
|
42992
|
+
const v = true ? "2.61.98" : "unknown";
|
|
42925
42993
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
42926
42994
|
}
|
|
42927
42995
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.61.
|
|
3
|
+
"version": "2.61.98",
|
|
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",
|