codeam-cli 2.61.0 → 2.61.1
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 +97 -89
- 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.61.0] — 2026-07-15
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **cli:** Dynamic host label at enroll (hostname / CODEAM_HOST_LABEL) instead of my-server
|
|
12
|
+
|
|
7
13
|
## [2.60.70] — 2026-07-15
|
|
8
14
|
|
|
9
15
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -5970,7 +5970,7 @@ function readAnonId() {
|
|
|
5970
5970
|
}
|
|
5971
5971
|
function superProperties() {
|
|
5972
5972
|
return {
|
|
5973
|
-
cliVersion: true ? "2.61.
|
|
5973
|
+
cliVersion: true ? "2.61.1" : "0.0.0-dev",
|
|
5974
5974
|
nodeVersion: process.version,
|
|
5975
5975
|
platform: process.platform,
|
|
5976
5976
|
arch: process.arch,
|
|
@@ -6151,7 +6151,7 @@ var os4 = __toESM(require("os"));
|
|
|
6151
6151
|
// package.json
|
|
6152
6152
|
var package_default = {
|
|
6153
6153
|
name: "codeam-cli",
|
|
6154
|
-
version: "2.61.
|
|
6154
|
+
version: "2.61.1",
|
|
6155
6155
|
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.",
|
|
6156
6156
|
type: "commonjs",
|
|
6157
6157
|
main: "dist/index.js",
|
|
@@ -7294,7 +7294,7 @@ var CommandRelayService = class _CommandRelayService {
|
|
|
7294
7294
|
// fresh + clear the "CLI update available" banner after a self-update
|
|
7295
7295
|
// (a codespace that reinstalls @latest reconnects via heartbeat, not
|
|
7296
7296
|
// pair/reconnect). Older backends ignore the extra field.
|
|
7297
|
-
..."2.61.
|
|
7297
|
+
..."2.61.1" ? { ideVersion: "2.61.1" } : {}
|
|
7298
7298
|
}).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
|
|
7299
7299
|
}
|
|
7300
7300
|
/**
|
|
@@ -8672,7 +8672,7 @@ var fs55 = __toESM(require("fs"));
|
|
|
8672
8672
|
var os44 = __toESM(require("os"));
|
|
8673
8673
|
var path59 = __toESM(require("path"));
|
|
8674
8674
|
var import_crypto3 = require("crypto");
|
|
8675
|
-
var
|
|
8675
|
+
var import_child_process24 = require("child_process");
|
|
8676
8676
|
|
|
8677
8677
|
// src/lib/payload.ts
|
|
8678
8678
|
var import_zod = require("zod");
|
|
@@ -17877,7 +17877,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
17877
17877
|
if (process.env.NODE_ENV === "test") return;
|
|
17878
17878
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17879
17879
|
if (process.env.CI) return;
|
|
17880
|
-
const current = true ? "2.61.
|
|
17880
|
+
const current = true ? "2.61.1" : null;
|
|
17881
17881
|
if (!current) return;
|
|
17882
17882
|
const cache = readCache();
|
|
17883
17883
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -17894,7 +17894,7 @@ function checkForUpdates() {
|
|
|
17894
17894
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17895
17895
|
if (process.env.CI) return;
|
|
17896
17896
|
if (!process.stdout.isTTY) return;
|
|
17897
|
-
const current = true ? "2.61.
|
|
17897
|
+
const current = true ? "2.61.1" : null;
|
|
17898
17898
|
if (!current) return;
|
|
17899
17899
|
const cache = readCache();
|
|
17900
17900
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -17914,7 +17914,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
|
|
|
17914
17914
|
var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
|
|
17915
17915
|
var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
|
|
17916
17916
|
function currentCliVersion() {
|
|
17917
|
-
return true ? "2.61.
|
|
17917
|
+
return true ? "2.61.1" : null;
|
|
17918
17918
|
}
|
|
17919
17919
|
function runCmd(cmd, args2, timeoutMs) {
|
|
17920
17920
|
return new Promise((resolve7) => {
|
|
@@ -19184,6 +19184,7 @@ function makeRealApplyBudgetDeps() {
|
|
|
19184
19184
|
var fs44 = __toESM(require("fs"));
|
|
19185
19185
|
var os38 = __toESM(require("os"));
|
|
19186
19186
|
var path47 = __toESM(require("path"));
|
|
19187
|
+
var import_child_process14 = require("child_process");
|
|
19187
19188
|
function registryPath() {
|
|
19188
19189
|
return path47.join(os38.homedir(), ".codeam", "preview-ports.json");
|
|
19189
19190
|
}
|
|
@@ -19220,15 +19221,34 @@ function forgetPreviewPort(port) {
|
|
|
19220
19221
|
writeRegistry(reg);
|
|
19221
19222
|
}
|
|
19222
19223
|
function groupAlive(pgid) {
|
|
19224
|
+
const probe = process.platform === "win32" ? pgid : -pgid;
|
|
19223
19225
|
try {
|
|
19224
|
-
process.kill(
|
|
19226
|
+
process.kill(probe, 0);
|
|
19225
19227
|
return true;
|
|
19226
19228
|
} catch (err) {
|
|
19227
19229
|
return err.code === "EPERM";
|
|
19228
19230
|
}
|
|
19229
19231
|
}
|
|
19232
|
+
function killGroup(pgid) {
|
|
19233
|
+
if (process.platform === "win32") {
|
|
19234
|
+
(0, import_child_process14.spawnSync)("taskkill", ["/F", "/T", "/PID", String(pgid)], { stdio: "ignore" });
|
|
19235
|
+
return;
|
|
19236
|
+
}
|
|
19237
|
+
try {
|
|
19238
|
+
process.kill(-pgid, "SIGTERM");
|
|
19239
|
+
} catch {
|
|
19240
|
+
}
|
|
19241
|
+
try {
|
|
19242
|
+
setTimeout(() => {
|
|
19243
|
+
try {
|
|
19244
|
+
process.kill(-pgid, "SIGKILL");
|
|
19245
|
+
} catch {
|
|
19246
|
+
}
|
|
19247
|
+
}, 300).unref?.();
|
|
19248
|
+
} catch {
|
|
19249
|
+
}
|
|
19250
|
+
}
|
|
19230
19251
|
function reclaimOwnOrphanPort(port) {
|
|
19231
|
-
if (process.platform === "win32") return false;
|
|
19232
19252
|
const reg = readRegistry();
|
|
19233
19253
|
const owner = reg[String(port)];
|
|
19234
19254
|
if (!owner) return false;
|
|
@@ -19241,26 +19261,14 @@ function reclaimOwnOrphanPort(port) {
|
|
|
19241
19261
|
"preview",
|
|
19242
19262
|
`reclaiming OWN orphaned preview on port ${port} (pgid=${owner.pgid}, session=${owner.sessionId}) after a CLI restart`
|
|
19243
19263
|
);
|
|
19244
|
-
|
|
19245
|
-
process.kill(-owner.pgid, "SIGTERM");
|
|
19246
|
-
} catch {
|
|
19247
|
-
}
|
|
19248
|
-
try {
|
|
19249
|
-
setTimeout(() => {
|
|
19250
|
-
try {
|
|
19251
|
-
process.kill(-owner.pgid, "SIGKILL");
|
|
19252
|
-
} catch {
|
|
19253
|
-
}
|
|
19254
|
-
}, 300).unref?.();
|
|
19255
|
-
} catch {
|
|
19256
|
-
}
|
|
19264
|
+
killGroup(owner.pgid);
|
|
19257
19265
|
delete reg[String(port)];
|
|
19258
19266
|
writeRegistry(reg);
|
|
19259
19267
|
return true;
|
|
19260
19268
|
}
|
|
19261
19269
|
|
|
19262
19270
|
// src/services/preview/cloudflared.ts
|
|
19263
|
-
var
|
|
19271
|
+
var import_child_process15 = require("child_process");
|
|
19264
19272
|
var import_fs = require("fs");
|
|
19265
19273
|
var import_promises = __toESM(require("fs/promises"));
|
|
19266
19274
|
var import_os8 = __toESM(require("os"));
|
|
@@ -19337,7 +19345,7 @@ async function isExecutableBinary(p2) {
|
|
|
19337
19345
|
}
|
|
19338
19346
|
function extractTgz(tgzPath, destDir) {
|
|
19339
19347
|
return new Promise((resolve7, reject) => {
|
|
19340
|
-
const child = (0,
|
|
19348
|
+
const child = (0, import_child_process15.spawn)("tar", ["-xzf", tgzPath, "-C", destDir], { stdio: "ignore" });
|
|
19341
19349
|
child.on("error", (err) => reject(err));
|
|
19342
19350
|
child.on(
|
|
19343
19351
|
"exit",
|
|
@@ -19371,7 +19379,7 @@ async function spawnNamedTunnel(bin, token, port) {
|
|
|
19371
19379
|
await import_promises.default.mkdir(credDir, { recursive: true });
|
|
19372
19380
|
const credFile = import_path4.default.join(credDir, `tunnel-${creds.TunnelID}.json`);
|
|
19373
19381
|
await import_promises.default.writeFile(credFile, JSON.stringify(creds), { mode: 384 });
|
|
19374
|
-
return (0,
|
|
19382
|
+
return (0, import_child_process15.spawn)(
|
|
19375
19383
|
bin,
|
|
19376
19384
|
[
|
|
19377
19385
|
"tunnel",
|
|
@@ -19387,9 +19395,9 @@ async function spawnNamedTunnel(bin, token, port) {
|
|
|
19387
19395
|
}
|
|
19388
19396
|
|
|
19389
19397
|
// src/services/preview/codespace.ts
|
|
19390
|
-
var
|
|
19398
|
+
var import_child_process16 = require("child_process");
|
|
19391
19399
|
var import_util3 = require("util");
|
|
19392
|
-
var execFileP5 = (0, import_util3.promisify)(
|
|
19400
|
+
var execFileP5 = (0, import_util3.promisify)(import_child_process16.execFile);
|
|
19393
19401
|
|
|
19394
19402
|
// src/services/preview/config-file.ts
|
|
19395
19403
|
var import_promises3 = __toESM(require("fs/promises"));
|
|
@@ -19584,10 +19592,10 @@ var import_fs2 = require("fs");
|
|
|
19584
19592
|
var import_path6 = __toESM(require("path"));
|
|
19585
19593
|
|
|
19586
19594
|
// src/services/preview/run-setup.ts
|
|
19587
|
-
var
|
|
19595
|
+
var import_child_process17 = require("child_process");
|
|
19588
19596
|
function runSetupCommand(cmd, args2, cwd, env, opts) {
|
|
19589
19597
|
return new Promise((resolve7) => {
|
|
19590
|
-
const child = (0,
|
|
19598
|
+
const child = (0, import_child_process17.spawn)(cmd, args2, {
|
|
19591
19599
|
cwd,
|
|
19592
19600
|
env: { ...process.env, ...env ?? {} },
|
|
19593
19601
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -19930,7 +19938,7 @@ function activePreviewSessionIds() {
|
|
|
19930
19938
|
}
|
|
19931
19939
|
|
|
19932
19940
|
// src/services/preview/start-orchestrator.ts
|
|
19933
|
-
var
|
|
19941
|
+
var import_child_process18 = require("child_process");
|
|
19934
19942
|
var fs49 = __toESM(require("fs"));
|
|
19935
19943
|
var path52 = __toESM(require("path"));
|
|
19936
19944
|
var import_which2 = __toESM(require("which"));
|
|
@@ -20207,7 +20215,7 @@ async function startDevServer(ctx) {
|
|
|
20207
20215
|
}
|
|
20208
20216
|
const spawnable = normalizeDetectionForSpawn(detection, cwd);
|
|
20209
20217
|
emitProgress("BOOT_SEQUENCE", `${spawnable.command} ${spawnable.args.join(" ")}`);
|
|
20210
|
-
const devServer = (0,
|
|
20218
|
+
const devServer = (0, import_child_process18.spawn)(spawnable.command, spawnable.args, {
|
|
20211
20219
|
cwd,
|
|
20212
20220
|
env: { ...process.env, ...spawnable.env ?? {} },
|
|
20213
20221
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -20332,7 +20340,7 @@ async function establishTunnel(ctx, dev) {
|
|
|
20332
20340
|
`cloudflared quick tunnel (retry ${attempt}/${MAX_TUNNEL_ATTEMPTS})`
|
|
20333
20341
|
);
|
|
20334
20342
|
}
|
|
20335
|
-
const candidate = (0,
|
|
20343
|
+
const candidate = (0, import_child_process18.spawn)(
|
|
20336
20344
|
bin,
|
|
20337
20345
|
["tunnel", "--url", `http://localhost:${detection.port}`],
|
|
20338
20346
|
{ stdio: ["ignore", "pipe", "pipe"] }
|
|
@@ -20363,7 +20371,7 @@ async function establishTunnel(ctx, dev) {
|
|
|
20363
20371
|
}
|
|
20364
20372
|
|
|
20365
20373
|
// src/beads/bd-adapter.ts
|
|
20366
|
-
var
|
|
20374
|
+
var import_child_process19 = require("child_process");
|
|
20367
20375
|
var fs50 = __toESM(require("fs"));
|
|
20368
20376
|
var os40 = __toESM(require("os"));
|
|
20369
20377
|
var path53 = __toESM(require("path"));
|
|
@@ -20417,7 +20425,7 @@ function _defaultSpawn(binaryPath, args2, opts) {
|
|
|
20417
20425
|
return new Promise((resolve7) => {
|
|
20418
20426
|
let proc;
|
|
20419
20427
|
try {
|
|
20420
|
-
proc = (0,
|
|
20428
|
+
proc = (0, import_child_process19.spawn)(binaryPath, args2, { cwd: opts.cwd, env: opts.env });
|
|
20421
20429
|
} catch (err) {
|
|
20422
20430
|
resolve7({ code: -1, stdout: "", stderr: err.message });
|
|
20423
20431
|
return;
|
|
@@ -20574,13 +20582,13 @@ function coerceIssue(row, projectKey) {
|
|
|
20574
20582
|
}
|
|
20575
20583
|
|
|
20576
20584
|
// src/beads/provisioner.ts
|
|
20577
|
-
var
|
|
20585
|
+
var import_child_process23 = require("child_process");
|
|
20578
20586
|
var fs53 = __toESM(require("fs"));
|
|
20579
20587
|
var os42 = __toESM(require("os"));
|
|
20580
20588
|
var path56 = __toESM(require("path"));
|
|
20581
20589
|
|
|
20582
20590
|
// src/beads/install-bd.ts
|
|
20583
|
-
var
|
|
20591
|
+
var import_child_process20 = require("child_process");
|
|
20584
20592
|
var INSTALL_SH_URL = "https://raw.githubusercontent.com/gastownhall/beads/main/scripts/install.sh";
|
|
20585
20593
|
var INSTALL_PS1_URL = "https://raw.githubusercontent.com/gastownhall/beads/main/install.ps1";
|
|
20586
20594
|
function resolveInstallStrategy(platform3) {
|
|
@@ -20611,7 +20619,7 @@ function _defaultInstallSpawn(strategy) {
|
|
|
20611
20619
|
return new Promise((resolve7) => {
|
|
20612
20620
|
let proc;
|
|
20613
20621
|
try {
|
|
20614
|
-
proc = (0,
|
|
20622
|
+
proc = (0, import_child_process20.spawn)(strategy.command, strategy.args, { env: process.env });
|
|
20615
20623
|
} catch (err) {
|
|
20616
20624
|
resolve7({ ok: false, code: -1, stderr: err.message });
|
|
20617
20625
|
return;
|
|
@@ -20641,7 +20649,7 @@ async function installBd(platform3 = process.platform) {
|
|
|
20641
20649
|
}
|
|
20642
20650
|
|
|
20643
20651
|
// src/beads/install-dolt.ts
|
|
20644
|
-
var
|
|
20652
|
+
var import_child_process21 = require("child_process");
|
|
20645
20653
|
var fs51 = __toESM(require("fs"));
|
|
20646
20654
|
var os41 = __toESM(require("os"));
|
|
20647
20655
|
var path54 = __toESM(require("path"));
|
|
@@ -20803,7 +20811,7 @@ function _defaultDoltInstallSpawn(strategy) {
|
|
|
20803
20811
|
};
|
|
20804
20812
|
let proc;
|
|
20805
20813
|
try {
|
|
20806
|
-
proc = (0,
|
|
20814
|
+
proc = (0, import_child_process21.spawn)(strategy.command, strategy.args, {
|
|
20807
20815
|
env: process.env,
|
|
20808
20816
|
stdio: ["ignore", "pipe", "pipe"]
|
|
20809
20817
|
});
|
|
@@ -20901,7 +20909,7 @@ async function ensureSharedServer(adapter, options = {}) {
|
|
|
20901
20909
|
}
|
|
20902
20910
|
|
|
20903
20911
|
// src/beads/project-key.ts
|
|
20904
|
-
var
|
|
20912
|
+
var import_child_process22 = require("child_process");
|
|
20905
20913
|
var crypto2 = __toESM(require("crypto"));
|
|
20906
20914
|
var fs52 = __toESM(require("fs"));
|
|
20907
20915
|
var path55 = __toESM(require("path"));
|
|
@@ -20948,7 +20956,7 @@ function findRepoRoot(cwd) {
|
|
|
20948
20956
|
}
|
|
20949
20957
|
var _execSeam2 = {
|
|
20950
20958
|
exec: (file, args2, opts) => {
|
|
20951
|
-
const out2 = (0,
|
|
20959
|
+
const out2 = (0, import_child_process22.execFileSync)(file, args2, opts);
|
|
20952
20960
|
return typeof out2 === "string" ? out2 : out2.toString("utf8");
|
|
20953
20961
|
},
|
|
20954
20962
|
realpath: (p2) => fs52.realpathSync(p2)
|
|
@@ -21111,7 +21119,7 @@ function linkBdOntoPath(binaryPath) {
|
|
|
21111
21119
|
log.info("beads", `linked bd onto PATH: ${linkPath} -> ${binaryPath}`);
|
|
21112
21120
|
}
|
|
21113
21121
|
function setGitBeadsRole() {
|
|
21114
|
-
(0,
|
|
21122
|
+
(0, import_child_process23.execFileSync)("git", ["config", "--global", "beads.role", "contributor"], {
|
|
21115
21123
|
stdio: "ignore"
|
|
21116
21124
|
});
|
|
21117
21125
|
}
|
|
@@ -21878,7 +21886,7 @@ var sessionTerminated = async (ctx, cmd) => {
|
|
|
21878
21886
|
}
|
|
21879
21887
|
quiet(() => ctx.agent.kill());
|
|
21880
21888
|
try {
|
|
21881
|
-
const proc = (0,
|
|
21889
|
+
const proc = (0, import_child_process24.spawn)("bash", ["-lc", "pm2 delete codeam-pair >/dev/null 2>&1 || true"], {
|
|
21882
21890
|
detached: true,
|
|
21883
21891
|
stdio: "ignore"
|
|
21884
21892
|
});
|
|
@@ -21897,7 +21905,7 @@ var shutdownSession = async (ctx, cmd) => {
|
|
|
21897
21905
|
quiet(() => ctx.agent.kill());
|
|
21898
21906
|
if (ctx.keepAliveCtx.inCodespace && ctx.keepAliveCtx.codespaceName) {
|
|
21899
21907
|
try {
|
|
21900
|
-
const stopProc = (0,
|
|
21908
|
+
const stopProc = (0, import_child_process24.spawn)(
|
|
21901
21909
|
"bash",
|
|
21902
21910
|
["-lc", `sleep 1; gh codespace stop -c ${JSON.stringify(ctx.keepAliveCtx.codespaceName)} >/dev/null 2>&1 || true`],
|
|
21903
21911
|
{ detached: true, stdio: "ignore" }
|
|
@@ -21907,7 +21915,7 @@ var shutdownSession = async (ctx, cmd) => {
|
|
|
21907
21915
|
}
|
|
21908
21916
|
}
|
|
21909
21917
|
try {
|
|
21910
|
-
const proc = (0,
|
|
21918
|
+
const proc = (0, import_child_process24.spawn)("bash", ["-lc", "pm2 delete codeam-pair >/dev/null 2>&1 || true"], {
|
|
21911
21919
|
detached: true,
|
|
21912
21920
|
stdio: "ignore"
|
|
21913
21921
|
});
|
|
@@ -22430,7 +22438,7 @@ var defaultCliUpdateDeps = {
|
|
|
22430
22438
|
// Only a truly local `codeam start` (neither marker) re-execs in place below.
|
|
22431
22439
|
isSupervised: () => process.env["CODEAM_AUTO_APPROVE"] === "1" || process.env["CODESPACES"] === "true",
|
|
22432
22440
|
relaunch: (args2) => {
|
|
22433
|
-
const child = (0,
|
|
22441
|
+
const child = (0, import_child_process24.spawnSync)("codeam", args2, { stdio: "inherit", env: process.env });
|
|
22434
22442
|
process.exit(child.status ?? 0);
|
|
22435
22443
|
}
|
|
22436
22444
|
};
|
|
@@ -22459,7 +22467,7 @@ async function runNpmInstallLatest() {
|
|
|
22459
22467
|
const command2 = useShell && invocation.command.includes(" ") ? `"${invocation.command}"` : invocation.command;
|
|
22460
22468
|
for (let attempt = 1; attempt <= CLI_UPDATE_MAX_ATTEMPTS; attempt++) {
|
|
22461
22469
|
const result = await new Promise((resolve7) => {
|
|
22462
|
-
(0,
|
|
22470
|
+
(0, import_child_process24.execFile)(
|
|
22463
22471
|
command2,
|
|
22464
22472
|
invocation.args,
|
|
22465
22473
|
{ timeout: CLI_UPDATE_INSTALL_TIMEOUT_MS, shell: useShell },
|
|
@@ -23051,13 +23059,13 @@ async function dispatchCommand(ctx, cmd) {
|
|
|
23051
23059
|
}
|
|
23052
23060
|
|
|
23053
23061
|
// src/commands/start/keep-alive.ts
|
|
23054
|
-
var
|
|
23062
|
+
var import_child_process25 = require("child_process");
|
|
23055
23063
|
function buildKeepAlive(ctx) {
|
|
23056
23064
|
let timer = null;
|
|
23057
23065
|
async function setIdleTimeout(minutes) {
|
|
23058
23066
|
if (!ctx.inCodespace || !ctx.codespaceName) return;
|
|
23059
23067
|
await new Promise((resolve7) => {
|
|
23060
|
-
const proc = (0,
|
|
23068
|
+
const proc = (0, import_child_process25.spawn)(
|
|
23061
23069
|
"gh",
|
|
23062
23070
|
[
|
|
23063
23071
|
"api",
|
|
@@ -23929,7 +23937,7 @@ var path62 = __toESM(require("path"));
|
|
|
23929
23937
|
var import_fs4 = __toESM(require("fs"));
|
|
23930
23938
|
var import_os10 = __toESM(require("os"));
|
|
23931
23939
|
var import_path8 = __toESM(require("path"));
|
|
23932
|
-
var
|
|
23940
|
+
var import_child_process26 = require("child_process");
|
|
23933
23941
|
function currentPlatformKey() {
|
|
23934
23942
|
return `${process.platform}-${process.arch}`;
|
|
23935
23943
|
}
|
|
@@ -23992,7 +24000,7 @@ function isCommandOnPath(cmd, probe = defaultWhich) {
|
|
|
23992
24000
|
function defaultWhich(cmd) {
|
|
23993
24001
|
const finder = process.platform === "win32" ? "where" : "which";
|
|
23994
24002
|
try {
|
|
23995
|
-
const res = (0,
|
|
24003
|
+
const res = (0, import_child_process26.spawnSync)(finder, [cmd], { stdio: "ignore" });
|
|
23996
24004
|
return res.status === 0;
|
|
23997
24005
|
} catch {
|
|
23998
24006
|
return false;
|
|
@@ -24045,7 +24053,7 @@ var ADAPTER_MODULE_LOAD_ERROR_RE = /ERR_MODULE_NOT_FOUND|Cannot find module|ERR_
|
|
|
24045
24053
|
var PERMANENT_ADAPTER_STARTUP_RE = /IneligibleTierError|UNSUPPORTED_CLIENT|no longer supported for Gemini Code Assist|not eligible for Gemini Code Assist|Error authenticating|ProjectIdRequiredError/i;
|
|
24046
24054
|
function probeAdapterModuleGraph(command2, args2, opts = {}) {
|
|
24047
24055
|
const livenessMs = opts.livenessMs ?? 400;
|
|
24048
|
-
const spawnFn = opts.spawnFn ??
|
|
24056
|
+
const spawnFn = opts.spawnFn ?? import_child_process26.spawn;
|
|
24049
24057
|
return new Promise((resolve7) => {
|
|
24050
24058
|
let settled = false;
|
|
24051
24059
|
let stderr = "";
|
|
@@ -28532,7 +28540,7 @@ function commonPrefixLength(a, b) {
|
|
|
28532
28540
|
}
|
|
28533
28541
|
|
|
28534
28542
|
// src/agents/acp/onboarding.ts
|
|
28535
|
-
var
|
|
28543
|
+
var import_child_process27 = require("child_process");
|
|
28536
28544
|
var fs60 = __toESM(require("fs"));
|
|
28537
28545
|
var os49 = __toESM(require("os"));
|
|
28538
28546
|
var path65 = __toESM(require("path"));
|
|
@@ -28553,7 +28561,7 @@ var _onboardingSeam = {
|
|
|
28553
28561
|
*/
|
|
28554
28562
|
gitRemoteUrl: (cwd) => {
|
|
28555
28563
|
try {
|
|
28556
|
-
return (0,
|
|
28564
|
+
return (0, import_child_process27.execFileSync)("git", ["-C", cwd, "remote", "get-url", "origin"], {
|
|
28557
28565
|
encoding: "utf8",
|
|
28558
28566
|
stdio: ["ignore", "pipe", "ignore"],
|
|
28559
28567
|
timeout: 2e3
|
|
@@ -28829,7 +28837,7 @@ function extractSelectPrompt(text) {
|
|
|
28829
28837
|
var import_crypto5 = require("crypto");
|
|
28830
28838
|
|
|
28831
28839
|
// src/services/turn-files/git-changeset.ts
|
|
28832
|
-
var
|
|
28840
|
+
var import_child_process28 = require("child_process");
|
|
28833
28841
|
var fs61 = __toESM(require("fs/promises"));
|
|
28834
28842
|
var path66 = __toESM(require("path"));
|
|
28835
28843
|
async function collectRepoChangeset(opts) {
|
|
@@ -28944,7 +28952,7 @@ function defaultRunGit(cwd, args2) {
|
|
|
28944
28952
|
return new Promise((resolve7) => {
|
|
28945
28953
|
let proc;
|
|
28946
28954
|
try {
|
|
28947
|
-
proc = (0,
|
|
28955
|
+
proc = (0, import_child_process28.spawn)("git", args2, { cwd, env: process.env });
|
|
28948
28956
|
} catch {
|
|
28949
28957
|
resolve7(null);
|
|
28950
28958
|
return;
|
|
@@ -33364,11 +33372,11 @@ async function logout() {
|
|
|
33364
33372
|
var import_picocolors11 = __toESM(require("picocolors"));
|
|
33365
33373
|
|
|
33366
33374
|
// src/services/providers/github-codespaces.ts
|
|
33367
|
-
var
|
|
33375
|
+
var import_child_process29 = require("child_process");
|
|
33368
33376
|
var import_util4 = require("util");
|
|
33369
33377
|
var import_picocolors9 = __toESM(require("picocolors"));
|
|
33370
33378
|
var path69 = __toESM(require("path"));
|
|
33371
|
-
var execFileP6 = (0, import_util4.promisify)(
|
|
33379
|
+
var execFileP6 = (0, import_util4.promisify)(import_child_process29.execFile);
|
|
33372
33380
|
var MAX_BUFFER = 8 * 1024 * 1024;
|
|
33373
33381
|
function resetStdinForChild() {
|
|
33374
33382
|
if (process.stdin.isTTY) {
|
|
@@ -33412,7 +33420,7 @@ var GitHubCodespacesProvider = class {
|
|
|
33412
33420
|
if (!isAuthed) {
|
|
33413
33421
|
resetStdinForChild();
|
|
33414
33422
|
await new Promise((resolve7, reject) => {
|
|
33415
|
-
const proc = (0,
|
|
33423
|
+
const proc = (0, import_child_process29.spawn)("gh", ["auth", "login", "-s", "codespace,repo,read:user"], {
|
|
33416
33424
|
stdio: "inherit"
|
|
33417
33425
|
});
|
|
33418
33426
|
proc.on("exit", (code) => {
|
|
@@ -33446,7 +33454,7 @@ var GitHubCodespacesProvider = class {
|
|
|
33446
33454
|
wt(noteLines.join("\n"), "One more permission needed");
|
|
33447
33455
|
resetStdinForChild();
|
|
33448
33456
|
const refreshCode = await new Promise((resolve7, reject) => {
|
|
33449
|
-
const proc = (0,
|
|
33457
|
+
const proc = (0, import_child_process29.spawn)(
|
|
33450
33458
|
"gh",
|
|
33451
33459
|
["auth", "refresh", "-h", "github.com", "-s", "codespace"],
|
|
33452
33460
|
{ stdio: "inherit" }
|
|
@@ -33596,7 +33604,7 @@ var GitHubCodespacesProvider = class {
|
|
|
33596
33604
|
O2.step(`Installing gh via ${installCmd.describe}\u2026`);
|
|
33597
33605
|
resetStdinForChild();
|
|
33598
33606
|
const ok = await new Promise((resolve7) => {
|
|
33599
|
-
const proc = (0,
|
|
33607
|
+
const proc = (0, import_child_process29.spawn)(installCmd.exe, installCmd.args, { stdio: "inherit" });
|
|
33600
33608
|
proc.on("exit", (code) => resolve7(code === 0));
|
|
33601
33609
|
proc.on("error", () => resolve7(false));
|
|
33602
33610
|
});
|
|
@@ -33623,7 +33631,7 @@ var GitHubCodespacesProvider = class {
|
|
|
33623
33631
|
);
|
|
33624
33632
|
resetStdinForChild();
|
|
33625
33633
|
await new Promise((resolve7, reject) => {
|
|
33626
|
-
const proc = (0,
|
|
33634
|
+
const proc = (0, import_child_process29.spawn)(
|
|
33627
33635
|
"gh",
|
|
33628
33636
|
["auth", "refresh", "-h", "github.com", "-s", "repo,read:org"],
|
|
33629
33637
|
{ stdio: "inherit" }
|
|
@@ -33801,7 +33809,7 @@ var GitHubCodespacesProvider = class {
|
|
|
33801
33809
|
async streamCommand(workspaceId, command2) {
|
|
33802
33810
|
resetStdinForChild();
|
|
33803
33811
|
return new Promise((resolve7, reject) => {
|
|
33804
|
-
const proc = (0,
|
|
33812
|
+
const proc = (0, import_child_process29.spawn)(
|
|
33805
33813
|
"gh",
|
|
33806
33814
|
["codespace", "ssh", "-c", workspaceId, "--", "-tt", command2],
|
|
33807
33815
|
{ stdio: "inherit" }
|
|
@@ -33828,11 +33836,11 @@ var GitHubCodespacesProvider = class {
|
|
|
33828
33836
|
`mkdir -p ${shellQuote(remoteDir)} && tar -xzf - -C ${shellQuote(remoteDir)}`
|
|
33829
33837
|
];
|
|
33830
33838
|
await new Promise((resolve7, reject) => {
|
|
33831
|
-
const tar = (0,
|
|
33839
|
+
const tar = (0, import_child_process29.spawn)("tar", tarArgs, {
|
|
33832
33840
|
stdio: ["ignore", "pipe", "pipe"],
|
|
33833
33841
|
env: tarEnv
|
|
33834
33842
|
});
|
|
33835
|
-
const ssh = (0,
|
|
33843
|
+
const ssh = (0, import_child_process29.spawn)("gh", sshArgs, {
|
|
33836
33844
|
stdio: [tar.stdout, "pipe", "pipe"]
|
|
33837
33845
|
});
|
|
33838
33846
|
let tarErr = "";
|
|
@@ -33866,7 +33874,7 @@ var GitHubCodespacesProvider = class {
|
|
|
33866
33874
|
}
|
|
33867
33875
|
const cmd = parts.join(" && ");
|
|
33868
33876
|
await new Promise((resolve7, reject) => {
|
|
33869
|
-
const proc = (0,
|
|
33877
|
+
const proc = (0, import_child_process29.spawn)(
|
|
33870
33878
|
"gh",
|
|
33871
33879
|
["codespace", "ssh", "-c", workspaceId, "--", cmd],
|
|
33872
33880
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -33924,11 +33932,11 @@ function shellQuote(s) {
|
|
|
33924
33932
|
}
|
|
33925
33933
|
|
|
33926
33934
|
// src/services/providers/gitpod.ts
|
|
33927
|
-
var
|
|
33935
|
+
var import_child_process30 = require("child_process");
|
|
33928
33936
|
var import_util5 = require("util");
|
|
33929
33937
|
var path70 = __toESM(require("path"));
|
|
33930
33938
|
var import_picocolors10 = __toESM(require("picocolors"));
|
|
33931
|
-
var execFileP7 = (0, import_util5.promisify)(
|
|
33939
|
+
var execFileP7 = (0, import_util5.promisify)(import_child_process30.execFile);
|
|
33932
33940
|
var MAX_BUFFER2 = 8 * 1024 * 1024;
|
|
33933
33941
|
function resetStdinForChild2() {
|
|
33934
33942
|
if (process.stdin.isTTY) {
|
|
@@ -33968,7 +33976,7 @@ var GitpodProvider = class {
|
|
|
33968
33976
|
);
|
|
33969
33977
|
resetStdinForChild2();
|
|
33970
33978
|
await new Promise((resolve7, reject) => {
|
|
33971
|
-
const proc = (0,
|
|
33979
|
+
const proc = (0, import_child_process30.spawn)("gitpod", ["login"], { stdio: "inherit" });
|
|
33972
33980
|
proc.on("exit", (code) => {
|
|
33973
33981
|
if (code === 0) resolve7();
|
|
33974
33982
|
else reject(new Error("gitpod login failed."));
|
|
@@ -34120,7 +34128,7 @@ var GitpodProvider = class {
|
|
|
34120
34128
|
async streamCommand(workspaceId, command2) {
|
|
34121
34129
|
resetStdinForChild2();
|
|
34122
34130
|
return new Promise((resolve7, reject) => {
|
|
34123
|
-
const proc = (0,
|
|
34131
|
+
const proc = (0, import_child_process30.spawn)(
|
|
34124
34132
|
"gitpod",
|
|
34125
34133
|
["workspace", "ssh", workspaceId, "--", "-tt", command2],
|
|
34126
34134
|
{ stdio: "inherit" }
|
|
@@ -34140,11 +34148,11 @@ var GitpodProvider = class {
|
|
|
34140
34148
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
34141
34149
|
const remoteCmd = `mkdir -p ${shellQuote2(remoteDir)} && tar -xzf - -C ${shellQuote2(remoteDir)}`;
|
|
34142
34150
|
await new Promise((resolve7, reject) => {
|
|
34143
|
-
const tar = (0,
|
|
34151
|
+
const tar = (0, import_child_process30.spawn)("tar", tarArgs, {
|
|
34144
34152
|
stdio: ["ignore", "pipe", "pipe"],
|
|
34145
34153
|
env: tarEnv
|
|
34146
34154
|
});
|
|
34147
|
-
const ssh = (0,
|
|
34155
|
+
const ssh = (0, import_child_process30.spawn)(
|
|
34148
34156
|
"gitpod",
|
|
34149
34157
|
["workspace", "ssh", workspaceId, "--", remoteCmd],
|
|
34150
34158
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -34176,7 +34184,7 @@ var GitpodProvider = class {
|
|
|
34176
34184
|
}
|
|
34177
34185
|
const cmd = parts.join(" && ");
|
|
34178
34186
|
await new Promise((resolve7, reject) => {
|
|
34179
|
-
const proc = (0,
|
|
34187
|
+
const proc = (0, import_child_process30.spawn)(
|
|
34180
34188
|
"gitpod",
|
|
34181
34189
|
["workspace", "ssh", workspaceId, "--", cmd],
|
|
34182
34190
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -34200,10 +34208,10 @@ function shellQuote2(s) {
|
|
|
34200
34208
|
}
|
|
34201
34209
|
|
|
34202
34210
|
// src/services/providers/gitlab-workspaces.ts
|
|
34203
|
-
var
|
|
34211
|
+
var import_child_process31 = require("child_process");
|
|
34204
34212
|
var import_util6 = require("util");
|
|
34205
34213
|
var path71 = __toESM(require("path"));
|
|
34206
|
-
var execFileP8 = (0, import_util6.promisify)(
|
|
34214
|
+
var execFileP8 = (0, import_util6.promisify)(import_child_process31.execFile);
|
|
34207
34215
|
var MAX_BUFFER3 = 8 * 1024 * 1024;
|
|
34208
34216
|
var GITLAB_API_BASE = process.env.CODEAM_GITLAB_API_URL ?? "https://gitlab.com/api/v4";
|
|
34209
34217
|
function resetStdinForChild3() {
|
|
@@ -34245,7 +34253,7 @@ var GitLabWorkspacesProvider = class {
|
|
|
34245
34253
|
);
|
|
34246
34254
|
resetStdinForChild3();
|
|
34247
34255
|
await new Promise((resolve7, reject) => {
|
|
34248
|
-
const proc = (0,
|
|
34256
|
+
const proc = (0, import_child_process31.spawn)(
|
|
34249
34257
|
"glab",
|
|
34250
34258
|
["auth", "login", "--scopes", "api,read_user,read_repository"],
|
|
34251
34259
|
{ stdio: "inherit" }
|
|
@@ -34417,7 +34425,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
34417
34425
|
const sshHost = process.env.CODEAM_GITLAB_SSH_HOST ?? "workspaces.gitlab.com";
|
|
34418
34426
|
resetStdinForChild3();
|
|
34419
34427
|
return new Promise((resolve7, reject) => {
|
|
34420
|
-
const proc = (0,
|
|
34428
|
+
const proc = (0, import_child_process31.spawn)(
|
|
34421
34429
|
"ssh",
|
|
34422
34430
|
["-tt", "-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, command2],
|
|
34423
34431
|
{ stdio: "inherit" }
|
|
@@ -34438,8 +34446,8 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
34438
34446
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
34439
34447
|
const remoteCmd = `mkdir -p ${shellQuote3(remoteDir)} && tar -xzf - -C ${shellQuote3(remoteDir)}`;
|
|
34440
34448
|
await new Promise((resolve7, reject) => {
|
|
34441
|
-
const tar = (0,
|
|
34442
|
-
const ssh = (0,
|
|
34449
|
+
const tar = (0, import_child_process31.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
34450
|
+
const ssh = (0, import_child_process31.spawn)(
|
|
34443
34451
|
"ssh",
|
|
34444
34452
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, remoteCmd],
|
|
34445
34453
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -34469,7 +34477,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
34469
34477
|
}
|
|
34470
34478
|
const cmd = parts.join(" && ");
|
|
34471
34479
|
await new Promise((resolve7, reject) => {
|
|
34472
|
-
const proc = (0,
|
|
34480
|
+
const proc = (0, import_child_process31.spawn)(
|
|
34473
34481
|
"ssh",
|
|
34474
34482
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, cmd],
|
|
34475
34483
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -34528,10 +34536,10 @@ function shellQuote3(s) {
|
|
|
34528
34536
|
}
|
|
34529
34537
|
|
|
34530
34538
|
// src/services/providers/railway.ts
|
|
34531
|
-
var
|
|
34539
|
+
var import_child_process32 = require("child_process");
|
|
34532
34540
|
var import_util7 = require("util");
|
|
34533
34541
|
var path72 = __toESM(require("path"));
|
|
34534
|
-
var execFileP9 = (0, import_util7.promisify)(
|
|
34542
|
+
var execFileP9 = (0, import_util7.promisify)(import_child_process32.execFile);
|
|
34535
34543
|
var MAX_BUFFER4 = 8 * 1024 * 1024;
|
|
34536
34544
|
function resetStdinForChild4() {
|
|
34537
34545
|
if (process.stdin.isTTY) {
|
|
@@ -34572,7 +34580,7 @@ var RailwayProvider = class {
|
|
|
34572
34580
|
);
|
|
34573
34581
|
resetStdinForChild4();
|
|
34574
34582
|
await new Promise((resolve7, reject) => {
|
|
34575
|
-
const proc = (0,
|
|
34583
|
+
const proc = (0, import_child_process32.spawn)("railway", ["login"], { stdio: "inherit" });
|
|
34576
34584
|
proc.on("exit", (code) => {
|
|
34577
34585
|
if (code === 0) resolve7();
|
|
34578
34586
|
else reject(new Error("railway login failed."));
|
|
@@ -34715,7 +34723,7 @@ var RailwayProvider = class {
|
|
|
34715
34723
|
}
|
|
34716
34724
|
resetStdinForChild4();
|
|
34717
34725
|
return new Promise((resolve7, reject) => {
|
|
34718
|
-
const proc = (0,
|
|
34726
|
+
const proc = (0, import_child_process32.spawn)(
|
|
34719
34727
|
"railway",
|
|
34720
34728
|
["shell", "--project", projectId, "--service", serviceId, "--command", command2],
|
|
34721
34729
|
{ stdio: "inherit" }
|
|
@@ -34739,8 +34747,8 @@ var RailwayProvider = class {
|
|
|
34739
34747
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
34740
34748
|
const remoteCmd = `mkdir -p ${shellQuote4(remoteDir)} && tar -xzf - -C ${shellQuote4(remoteDir)}`;
|
|
34741
34749
|
await new Promise((resolve7, reject) => {
|
|
34742
|
-
const tar = (0,
|
|
34743
|
-
const sh = (0,
|
|
34750
|
+
const tar = (0, import_child_process32.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
34751
|
+
const sh = (0, import_child_process32.spawn)(
|
|
34744
34752
|
"railway",
|
|
34745
34753
|
["shell", "--project", projectId, "--service", serviceId, "--command", remoteCmd],
|
|
34746
34754
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -34773,7 +34781,7 @@ var RailwayProvider = class {
|
|
|
34773
34781
|
}
|
|
34774
34782
|
const cmd = parts.join(" && ");
|
|
34775
34783
|
await new Promise((resolve7, reject) => {
|
|
34776
|
-
const proc = (0,
|
|
34784
|
+
const proc = (0, import_child_process32.spawn)(
|
|
34777
34785
|
"railway",
|
|
34778
34786
|
["shell", "--project", projectId, "--service", serviceId, "--command", cmd],
|
|
34779
34787
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -35581,7 +35589,7 @@ function checkChokidar() {
|
|
|
35581
35589
|
}
|
|
35582
35590
|
async function doctor(args2 = []) {
|
|
35583
35591
|
const json = args2.includes("--json");
|
|
35584
|
-
const cliVersion = true ? "2.61.
|
|
35592
|
+
const cliVersion = true ? "2.61.1" : "0.0.0-dev";
|
|
35585
35593
|
const apiBase2 = resolveApiBaseUrl();
|
|
35586
35594
|
const diagnosticId = (0, import_node_crypto12.randomUUID)();
|
|
35587
35595
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -36092,7 +36100,7 @@ async function mcpRun(args2) {
|
|
|
36092
36100
|
// src/commands/version.ts
|
|
36093
36101
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
36094
36102
|
function version2() {
|
|
36095
|
-
const v = true ? "2.61.
|
|
36103
|
+
const v = true ? "2.61.1" : "unknown";
|
|
36096
36104
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
36097
36105
|
}
|
|
36098
36106
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.61.
|
|
3
|
+
"version": "2.61.1",
|
|
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",
|