codeam-cli 2.34.0 → 2.35.0
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 +13 -0
- package/dist/index.js +132 -53
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@ 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.34.0] — 2026-06-10
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **cli:** Beads home-brain provisioner (idempotent init, no bd setup)
|
|
12
|
+
- **cli:** Composition-root beads orchestrator + provisioning SSE signal
|
|
13
|
+
- **cli:** Run bd setup <recipe> --global so the agent uses bd natively (revert D12)
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **cli:** Address beads home brain via BEADS_DIR, drop broken --global
|
|
18
|
+
- **cli:** Move beads provisioning to the composition root (SRP / D10)
|
|
19
|
+
|
|
7
20
|
## [2.33.0] — 2026-06-09
|
|
8
21
|
|
|
9
22
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -498,7 +498,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
|
|
|
498
498
|
// package.json
|
|
499
499
|
var package_default = {
|
|
500
500
|
name: "codeam-cli",
|
|
501
|
-
version: "2.
|
|
501
|
+
version: "2.35.0",
|
|
502
502
|
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.",
|
|
503
503
|
type: "commonjs",
|
|
504
504
|
main: "dist/index.js",
|
|
@@ -5898,7 +5898,7 @@ function readAnonId() {
|
|
|
5898
5898
|
}
|
|
5899
5899
|
function superProperties() {
|
|
5900
5900
|
return {
|
|
5901
|
-
cliVersion: true ? "2.
|
|
5901
|
+
cliVersion: true ? "2.35.0" : "0.0.0-dev",
|
|
5902
5902
|
nodeVersion: process.version,
|
|
5903
5903
|
platform: process.platform,
|
|
5904
5904
|
arch: process.arch,
|
|
@@ -15714,7 +15714,7 @@ var fs32 = __toESM(require("fs"));
|
|
|
15714
15714
|
var os25 = __toESM(require("os"));
|
|
15715
15715
|
var path39 = __toESM(require("path"));
|
|
15716
15716
|
var import_crypto3 = require("crypto");
|
|
15717
|
-
var
|
|
15717
|
+
var import_child_process16 = require("child_process");
|
|
15718
15718
|
|
|
15719
15719
|
// src/lib/payload.ts
|
|
15720
15720
|
var import_zod = require("zod");
|
|
@@ -17392,6 +17392,7 @@ function defaultBeadsHomeDir() {
|
|
|
17392
17392
|
}
|
|
17393
17393
|
|
|
17394
17394
|
// src/beads/provisioner.ts
|
|
17395
|
+
var import_child_process14 = require("child_process");
|
|
17395
17396
|
var fs30 = __toESM(require("fs"));
|
|
17396
17397
|
var path36 = __toESM(require("path"));
|
|
17397
17398
|
|
|
@@ -17468,8 +17469,58 @@ var AGENT_SETUP_RECIPE = {
|
|
|
17468
17469
|
};
|
|
17469
17470
|
var _provisionSeam = {
|
|
17470
17471
|
install: installBd,
|
|
17471
|
-
homeBrainInitialized
|
|
17472
|
+
homeBrainInitialized,
|
|
17473
|
+
/** GAP 1 — symlink the resolved bd onto PATH for the agent's own shell. */
|
|
17474
|
+
linkBdOntoPath,
|
|
17475
|
+
/** Silence bd's `beads.role not configured` warning. */
|
|
17476
|
+
setGitBeadsRole
|
|
17472
17477
|
};
|
|
17478
|
+
var _linkSeam = {
|
|
17479
|
+
platform: () => process.platform,
|
|
17480
|
+
/**
|
|
17481
|
+
* The directory the `codeam` executable lives in — guaranteed on PATH (npm
|
|
17482
|
+
* puts global bins there, and that's how the user launched us). We symlink
|
|
17483
|
+
* `bd` alongside it so the AGENT's shell resolves `bd` natively. Derived from
|
|
17484
|
+
* `process.argv[1]` (the CLI entry script). Returns null when it can't be
|
|
17485
|
+
* determined.
|
|
17486
|
+
*/
|
|
17487
|
+
cliBinDir: () => {
|
|
17488
|
+
const entry = process.argv[1];
|
|
17489
|
+
if (!entry) return null;
|
|
17490
|
+
try {
|
|
17491
|
+
return path36.dirname(fs30.realpathSync(entry));
|
|
17492
|
+
} catch {
|
|
17493
|
+
return path36.dirname(entry);
|
|
17494
|
+
}
|
|
17495
|
+
},
|
|
17496
|
+
/** Current symlink target at `linkPath`, or null when absent / not a link. */
|
|
17497
|
+
readlink: (linkPath) => {
|
|
17498
|
+
try {
|
|
17499
|
+
return fs30.readlinkSync(linkPath);
|
|
17500
|
+
} catch {
|
|
17501
|
+
return null;
|
|
17502
|
+
}
|
|
17503
|
+
},
|
|
17504
|
+
unlink: (linkPath) => fs30.unlinkSync(linkPath),
|
|
17505
|
+
symlink: (target, linkPath) => fs30.symlinkSync(target, linkPath)
|
|
17506
|
+
};
|
|
17507
|
+
function linkBdOntoPath(binaryPath) {
|
|
17508
|
+
if (_linkSeam.platform() === "win32") return;
|
|
17509
|
+
const binDir = _linkSeam.cliBinDir();
|
|
17510
|
+
if (!binDir) return;
|
|
17511
|
+
const linkPath = path36.join(binDir, "bd");
|
|
17512
|
+
if (linkPath === binaryPath) return;
|
|
17513
|
+
const current = _linkSeam.readlink(linkPath);
|
|
17514
|
+
if (current === binaryPath) return;
|
|
17515
|
+
if (current !== null) _linkSeam.unlink(linkPath);
|
|
17516
|
+
_linkSeam.symlink(binaryPath, linkPath);
|
|
17517
|
+
log.info("beads", `linked bd onto PATH: ${linkPath} -> ${binaryPath}`);
|
|
17518
|
+
}
|
|
17519
|
+
function setGitBeadsRole() {
|
|
17520
|
+
(0, import_child_process14.execFileSync)("git", ["config", "--global", "beads.role", "contributor"], {
|
|
17521
|
+
stdio: "ignore"
|
|
17522
|
+
});
|
|
17523
|
+
}
|
|
17473
17524
|
function homeBrainInitialized(beadsDir) {
|
|
17474
17525
|
try {
|
|
17475
17526
|
return fs30.statSync(path36.join(beadsDir, "embeddeddolt")).isDirectory();
|
|
@@ -17499,6 +17550,19 @@ async function provisionBeads(opts = {}) {
|
|
|
17499
17550
|
return result;
|
|
17500
17551
|
}
|
|
17501
17552
|
result.bdAvailable = true;
|
|
17553
|
+
const binaryPath = bd.resolveBinary();
|
|
17554
|
+
if (binaryPath) {
|
|
17555
|
+
try {
|
|
17556
|
+
_provisionSeam.linkBdOntoPath(binaryPath);
|
|
17557
|
+
} catch (err) {
|
|
17558
|
+
log.warn("beads", "linking bd onto PATH failed (non-fatal)", err);
|
|
17559
|
+
}
|
|
17560
|
+
}
|
|
17561
|
+
try {
|
|
17562
|
+
_provisionSeam.setGitBeadsRole();
|
|
17563
|
+
} catch (err) {
|
|
17564
|
+
log.trace("beads", `git config beads.role failed (non-fatal): ${err.message}`);
|
|
17565
|
+
}
|
|
17502
17566
|
if (_provisionSeam.homeBrainInitialized(beadsDir)) {
|
|
17503
17567
|
log.trace("beads", `home brain already initialized at ${beadsDir}`);
|
|
17504
17568
|
result.initialized = true;
|
|
@@ -17560,7 +17624,7 @@ var crypto3 = __toESM(require("crypto"));
|
|
|
17560
17624
|
var path38 = __toESM(require("path"));
|
|
17561
17625
|
|
|
17562
17626
|
// src/beads/project-key.ts
|
|
17563
|
-
var
|
|
17627
|
+
var import_child_process15 = require("child_process");
|
|
17564
17628
|
var crypto2 = __toESM(require("crypto"));
|
|
17565
17629
|
var fs31 = __toESM(require("fs"));
|
|
17566
17630
|
var path37 = __toESM(require("path"));
|
|
@@ -17607,7 +17671,7 @@ function findRepoRoot(cwd) {
|
|
|
17607
17671
|
}
|
|
17608
17672
|
var _execSeam2 = {
|
|
17609
17673
|
exec: (file, args2, opts) => {
|
|
17610
|
-
const out2 = (0,
|
|
17674
|
+
const out2 = (0, import_child_process15.execFileSync)(file, args2, opts);
|
|
17611
17675
|
return typeof out2 === "string" ? out2 : out2.toString("utf8");
|
|
17612
17676
|
},
|
|
17613
17677
|
realpath: (p2) => fs31.realpathSync(p2)
|
|
@@ -17694,6 +17758,14 @@ function _post2(url, headers, payload) {
|
|
|
17694
17758
|
// src/beads/watcher.ts
|
|
17695
17759
|
var API_BASE4 = resolveApiBaseUrl();
|
|
17696
17760
|
var DEBOUNCE_MS = 400;
|
|
17761
|
+
var ZERO_SUMMARY = {
|
|
17762
|
+
open_issues: 0,
|
|
17763
|
+
ready_issues: 0,
|
|
17764
|
+
blocked_issues: 0,
|
|
17765
|
+
in_progress_issues: 0,
|
|
17766
|
+
closed_issues: 0,
|
|
17767
|
+
total_issues: 0
|
|
17768
|
+
};
|
|
17697
17769
|
var _chokidarSeam = {
|
|
17698
17770
|
load: () => {
|
|
17699
17771
|
try {
|
|
@@ -17793,8 +17865,14 @@ var BeadsWatcher = class {
|
|
|
17793
17865
|
projectLabel,
|
|
17794
17866
|
fullSnapshot: true,
|
|
17795
17867
|
issues,
|
|
17868
|
+
// The backend DTO requires `dependencies` (not `deps`). We don't track
|
|
17869
|
+
// edges in the P0 snapshot yet, so always send an empty array rather than
|
|
17870
|
+
// omitting the field (an omitted/conditional field 400s the ingest).
|
|
17871
|
+
dependencies: [],
|
|
17796
17872
|
memories: [],
|
|
17797
|
-
|
|
17873
|
+
// Always send a summary — a null `bd status` yields a zeroed block rather
|
|
17874
|
+
// than an omitted field, so the backend never has to special-case it.
|
|
17875
|
+
summary: summary ?? ZERO_SUMMARY
|
|
17798
17876
|
};
|
|
17799
17877
|
const body = JSON.stringify(payload);
|
|
17800
17878
|
const hash = crypto3.createHash("sha256").update(body).digest("hex");
|
|
@@ -17914,6 +17992,7 @@ async function provisionBeadsForStart(ctx) {
|
|
|
17914
17992
|
log.trace("beads", "CODEAM_BEADS_DISABLED set \u2014 beads off this run");
|
|
17915
17993
|
return null;
|
|
17916
17994
|
}
|
|
17995
|
+
process.env.BEADS_DIR = defaultBeadsHomeDir();
|
|
17917
17996
|
if (!ctx.pluginAuthToken) {
|
|
17918
17997
|
log.trace("beads", "no pluginAuthToken \u2014 beads off");
|
|
17919
17998
|
return null;
|
|
@@ -18132,7 +18211,7 @@ var sessionTerminated = async (ctx, cmd) => {
|
|
|
18132
18211
|
} catch {
|
|
18133
18212
|
}
|
|
18134
18213
|
try {
|
|
18135
|
-
const proc = (0,
|
|
18214
|
+
const proc = (0, import_child_process16.spawn)("bash", ["-lc", "pm2 delete codeam-pair >/dev/null 2>&1 || true"], {
|
|
18136
18215
|
detached: true,
|
|
18137
18216
|
stdio: "ignore"
|
|
18138
18217
|
});
|
|
@@ -18154,7 +18233,7 @@ var shutdownSession = async (ctx, cmd) => {
|
|
|
18154
18233
|
}
|
|
18155
18234
|
if (ctx.keepAliveCtx.inCodespace && ctx.keepAliveCtx.codespaceName) {
|
|
18156
18235
|
try {
|
|
18157
|
-
const stopProc = (0,
|
|
18236
|
+
const stopProc = (0, import_child_process16.spawn)(
|
|
18158
18237
|
"bash",
|
|
18159
18238
|
["-lc", `sleep 1; gh codespace stop -c ${JSON.stringify(ctx.keepAliveCtx.codespaceName)} >/dev/null 2>&1 || true`],
|
|
18160
18239
|
{ detached: true, stdio: "ignore" }
|
|
@@ -18164,7 +18243,7 @@ var shutdownSession = async (ctx, cmd) => {
|
|
|
18164
18243
|
}
|
|
18165
18244
|
}
|
|
18166
18245
|
try {
|
|
18167
|
-
const proc = (0,
|
|
18246
|
+
const proc = (0, import_child_process16.spawn)("bash", ["-lc", "pm2 delete codeam-pair >/dev/null 2>&1 || true"], {
|
|
18168
18247
|
detached: true,
|
|
18169
18248
|
stdio: "ignore"
|
|
18170
18249
|
});
|
|
@@ -18671,7 +18750,7 @@ var previewStartH = (ctx, _cmd, parsed) => {
|
|
|
18671
18750
|
"BOOT_SEQUENCE",
|
|
18672
18751
|
`${spawnable.command} ${spawnable.args.join(" ")}`
|
|
18673
18752
|
);
|
|
18674
|
-
const devServer = (0,
|
|
18753
|
+
const devServer = (0, import_child_process16.spawn)(spawnable.command, spawnable.args, {
|
|
18675
18754
|
cwd: process.cwd(),
|
|
18676
18755
|
env: { ...process.env, ...spawnable.env ?? {} },
|
|
18677
18756
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -18797,7 +18876,7 @@ var previewStartH = (ctx, _cmd, parsed) => {
|
|
|
18797
18876
|
});
|
|
18798
18877
|
return;
|
|
18799
18878
|
}
|
|
18800
|
-
tunnel = (0,
|
|
18879
|
+
tunnel = (0, import_child_process16.spawn)(bin, ["tunnel", "--url", `http://localhost:${detection.port}`], {
|
|
18801
18880
|
stdio: ["ignore", "pipe", "pipe"]
|
|
18802
18881
|
});
|
|
18803
18882
|
let parsedUrl = null;
|
|
@@ -18895,7 +18974,7 @@ var previewStopH = (ctx) => {
|
|
|
18895
18974
|
};
|
|
18896
18975
|
function runOnce(cmd, args2, cwd, env) {
|
|
18897
18976
|
return new Promise((resolve7) => {
|
|
18898
|
-
const child = (0,
|
|
18977
|
+
const child = (0, import_child_process16.spawn)(cmd, args2, {
|
|
18899
18978
|
cwd,
|
|
18900
18979
|
env: { ...process.env, ...env ?? {} },
|
|
18901
18980
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -18991,7 +19070,7 @@ async function dispatchCommand(ctx, cmd) {
|
|
|
18991
19070
|
}
|
|
18992
19071
|
|
|
18993
19072
|
// src/services/file-watcher.service.ts
|
|
18994
|
-
var
|
|
19073
|
+
var import_child_process17 = require("child_process");
|
|
18995
19074
|
var fs33 = __toESM(require("fs"));
|
|
18996
19075
|
var os26 = __toESM(require("os"));
|
|
18997
19076
|
var path40 = __toESM(require("path"));
|
|
@@ -19757,7 +19836,7 @@ async function _runGitImpl(cwd, args2, opts = {}) {
|
|
|
19757
19836
|
return new Promise((resolve7) => {
|
|
19758
19837
|
let proc;
|
|
19759
19838
|
try {
|
|
19760
|
-
proc = (0,
|
|
19839
|
+
proc = (0, import_child_process17.spawn)("git", args2, { cwd, env: process.env });
|
|
19761
19840
|
} catch {
|
|
19762
19841
|
resolve7(null);
|
|
19763
19842
|
return;
|
|
@@ -19789,7 +19868,7 @@ function _runGit(cwd, args2, opts = {}) {
|
|
|
19789
19868
|
var import_crypto4 = require("crypto");
|
|
19790
19869
|
|
|
19791
19870
|
// src/services/turn-files/git-changeset.ts
|
|
19792
|
-
var
|
|
19871
|
+
var import_child_process18 = require("child_process");
|
|
19793
19872
|
var path41 = __toESM(require("path"));
|
|
19794
19873
|
async function collectRepoChangeset(opts) {
|
|
19795
19874
|
const status2 = await runGit3(opts.repoRoot, ["status", "--porcelain=v1", "-z"]);
|
|
@@ -19873,7 +19952,7 @@ function defaultRunGit(cwd, args2) {
|
|
|
19873
19952
|
return new Promise((resolve7) => {
|
|
19874
19953
|
let proc;
|
|
19875
19954
|
try {
|
|
19876
|
-
proc = (0,
|
|
19955
|
+
proc = (0, import_child_process18.spawn)("git", args2, { cwd, env: process.env });
|
|
19877
19956
|
} catch {
|
|
19878
19957
|
resolve7(null);
|
|
19879
19958
|
return;
|
|
@@ -22728,13 +22807,13 @@ function fetchQuotaUsage(runtime, historySvc) {
|
|
|
22728
22807
|
}
|
|
22729
22808
|
|
|
22730
22809
|
// src/commands/start/keep-alive.ts
|
|
22731
|
-
var
|
|
22810
|
+
var import_child_process19 = require("child_process");
|
|
22732
22811
|
function buildKeepAlive(ctx) {
|
|
22733
22812
|
let timer = null;
|
|
22734
22813
|
async function setIdleTimeout(minutes) {
|
|
22735
22814
|
if (!ctx.inCodespace || !ctx.codespaceName) return;
|
|
22736
22815
|
await new Promise((resolve7) => {
|
|
22737
|
-
const proc = (0,
|
|
22816
|
+
const proc = (0, import_child_process19.spawn)(
|
|
22738
22817
|
"gh",
|
|
22739
22818
|
[
|
|
22740
22819
|
"api",
|
|
@@ -23683,11 +23762,11 @@ async function logout() {
|
|
|
23683
23762
|
var import_picocolors10 = __toESM(require("picocolors"));
|
|
23684
23763
|
|
|
23685
23764
|
// src/services/providers/github-codespaces.ts
|
|
23686
|
-
var
|
|
23765
|
+
var import_child_process20 = require("child_process");
|
|
23687
23766
|
var import_util4 = require("util");
|
|
23688
23767
|
var import_picocolors8 = __toESM(require("picocolors"));
|
|
23689
23768
|
var path44 = __toESM(require("path"));
|
|
23690
|
-
var execFileP5 = (0, import_util4.promisify)(
|
|
23769
|
+
var execFileP5 = (0, import_util4.promisify)(import_child_process20.execFile);
|
|
23691
23770
|
var MAX_BUFFER = 8 * 1024 * 1024;
|
|
23692
23771
|
function resetStdinForChild() {
|
|
23693
23772
|
if (process.stdin.isTTY) {
|
|
@@ -23731,7 +23810,7 @@ var GitHubCodespacesProvider = class {
|
|
|
23731
23810
|
if (!isAuthed) {
|
|
23732
23811
|
resetStdinForChild();
|
|
23733
23812
|
await new Promise((resolve7, reject) => {
|
|
23734
|
-
const proc = (0,
|
|
23813
|
+
const proc = (0, import_child_process20.spawn)("gh", ["auth", "login", "-s", "codespace,repo,read:user"], {
|
|
23735
23814
|
stdio: "inherit"
|
|
23736
23815
|
});
|
|
23737
23816
|
proc.on("exit", (code) => {
|
|
@@ -23765,7 +23844,7 @@ var GitHubCodespacesProvider = class {
|
|
|
23765
23844
|
wt(noteLines.join("\n"), "One more permission needed");
|
|
23766
23845
|
resetStdinForChild();
|
|
23767
23846
|
const refreshCode = await new Promise((resolve7, reject) => {
|
|
23768
|
-
const proc = (0,
|
|
23847
|
+
const proc = (0, import_child_process20.spawn)(
|
|
23769
23848
|
"gh",
|
|
23770
23849
|
["auth", "refresh", "-h", "github.com", "-s", "codespace"],
|
|
23771
23850
|
{ stdio: "inherit" }
|
|
@@ -23915,7 +23994,7 @@ var GitHubCodespacesProvider = class {
|
|
|
23915
23994
|
O2.step(`Installing gh via ${installCmd.describe}\u2026`);
|
|
23916
23995
|
resetStdinForChild();
|
|
23917
23996
|
const ok = await new Promise((resolve7) => {
|
|
23918
|
-
const proc = (0,
|
|
23997
|
+
const proc = (0, import_child_process20.spawn)(installCmd.exe, installCmd.args, { stdio: "inherit" });
|
|
23919
23998
|
proc.on("exit", (code) => resolve7(code === 0));
|
|
23920
23999
|
proc.on("error", () => resolve7(false));
|
|
23921
24000
|
});
|
|
@@ -23942,7 +24021,7 @@ var GitHubCodespacesProvider = class {
|
|
|
23942
24021
|
);
|
|
23943
24022
|
resetStdinForChild();
|
|
23944
24023
|
await new Promise((resolve7, reject) => {
|
|
23945
|
-
const proc = (0,
|
|
24024
|
+
const proc = (0, import_child_process20.spawn)(
|
|
23946
24025
|
"gh",
|
|
23947
24026
|
["auth", "refresh", "-h", "github.com", "-s", "repo,read:org"],
|
|
23948
24027
|
{ stdio: "inherit" }
|
|
@@ -24120,7 +24199,7 @@ var GitHubCodespacesProvider = class {
|
|
|
24120
24199
|
async streamCommand(workspaceId, command2) {
|
|
24121
24200
|
resetStdinForChild();
|
|
24122
24201
|
return new Promise((resolve7, reject) => {
|
|
24123
|
-
const proc = (0,
|
|
24202
|
+
const proc = (0, import_child_process20.spawn)(
|
|
24124
24203
|
"gh",
|
|
24125
24204
|
["codespace", "ssh", "-c", workspaceId, "--", "-tt", command2],
|
|
24126
24205
|
{ stdio: "inherit" }
|
|
@@ -24147,11 +24226,11 @@ var GitHubCodespacesProvider = class {
|
|
|
24147
24226
|
`mkdir -p ${shellQuote(remoteDir)} && tar -xzf - -C ${shellQuote(remoteDir)}`
|
|
24148
24227
|
];
|
|
24149
24228
|
await new Promise((resolve7, reject) => {
|
|
24150
|
-
const tar = (0,
|
|
24229
|
+
const tar = (0, import_child_process20.spawn)("tar", tarArgs, {
|
|
24151
24230
|
stdio: ["ignore", "pipe", "pipe"],
|
|
24152
24231
|
env: tarEnv
|
|
24153
24232
|
});
|
|
24154
|
-
const ssh = (0,
|
|
24233
|
+
const ssh = (0, import_child_process20.spawn)("gh", sshArgs, {
|
|
24155
24234
|
stdio: [tar.stdout, "pipe", "pipe"]
|
|
24156
24235
|
});
|
|
24157
24236
|
let tarErr = "";
|
|
@@ -24185,7 +24264,7 @@ var GitHubCodespacesProvider = class {
|
|
|
24185
24264
|
}
|
|
24186
24265
|
const cmd = parts.join(" && ");
|
|
24187
24266
|
await new Promise((resolve7, reject) => {
|
|
24188
|
-
const proc = (0,
|
|
24267
|
+
const proc = (0, import_child_process20.spawn)(
|
|
24189
24268
|
"gh",
|
|
24190
24269
|
["codespace", "ssh", "-c", workspaceId, "--", cmd],
|
|
24191
24270
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -24243,11 +24322,11 @@ function shellQuote(s) {
|
|
|
24243
24322
|
}
|
|
24244
24323
|
|
|
24245
24324
|
// src/services/providers/gitpod.ts
|
|
24246
|
-
var
|
|
24325
|
+
var import_child_process21 = require("child_process");
|
|
24247
24326
|
var import_util5 = require("util");
|
|
24248
24327
|
var path45 = __toESM(require("path"));
|
|
24249
24328
|
var import_picocolors9 = __toESM(require("picocolors"));
|
|
24250
|
-
var execFileP6 = (0, import_util5.promisify)(
|
|
24329
|
+
var execFileP6 = (0, import_util5.promisify)(import_child_process21.execFile);
|
|
24251
24330
|
var MAX_BUFFER2 = 8 * 1024 * 1024;
|
|
24252
24331
|
function resetStdinForChild2() {
|
|
24253
24332
|
if (process.stdin.isTTY) {
|
|
@@ -24287,7 +24366,7 @@ var GitpodProvider = class {
|
|
|
24287
24366
|
);
|
|
24288
24367
|
resetStdinForChild2();
|
|
24289
24368
|
await new Promise((resolve7, reject) => {
|
|
24290
|
-
const proc = (0,
|
|
24369
|
+
const proc = (0, import_child_process21.spawn)("gitpod", ["login"], { stdio: "inherit" });
|
|
24291
24370
|
proc.on("exit", (code) => {
|
|
24292
24371
|
if (code === 0) resolve7();
|
|
24293
24372
|
else reject(new Error("gitpod login failed."));
|
|
@@ -24439,7 +24518,7 @@ var GitpodProvider = class {
|
|
|
24439
24518
|
async streamCommand(workspaceId, command2) {
|
|
24440
24519
|
resetStdinForChild2();
|
|
24441
24520
|
return new Promise((resolve7, reject) => {
|
|
24442
|
-
const proc = (0,
|
|
24521
|
+
const proc = (0, import_child_process21.spawn)(
|
|
24443
24522
|
"gitpod",
|
|
24444
24523
|
["workspace", "ssh", workspaceId, "--", "-tt", command2],
|
|
24445
24524
|
{ stdio: "inherit" }
|
|
@@ -24459,11 +24538,11 @@ var GitpodProvider = class {
|
|
|
24459
24538
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
24460
24539
|
const remoteCmd = `mkdir -p ${shellQuote2(remoteDir)} && tar -xzf - -C ${shellQuote2(remoteDir)}`;
|
|
24461
24540
|
await new Promise((resolve7, reject) => {
|
|
24462
|
-
const tar = (0,
|
|
24541
|
+
const tar = (0, import_child_process21.spawn)("tar", tarArgs, {
|
|
24463
24542
|
stdio: ["ignore", "pipe", "pipe"],
|
|
24464
24543
|
env: tarEnv
|
|
24465
24544
|
});
|
|
24466
|
-
const ssh = (0,
|
|
24545
|
+
const ssh = (0, import_child_process21.spawn)(
|
|
24467
24546
|
"gitpod",
|
|
24468
24547
|
["workspace", "ssh", workspaceId, "--", remoteCmd],
|
|
24469
24548
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -24495,7 +24574,7 @@ var GitpodProvider = class {
|
|
|
24495
24574
|
}
|
|
24496
24575
|
const cmd = parts.join(" && ");
|
|
24497
24576
|
await new Promise((resolve7, reject) => {
|
|
24498
|
-
const proc = (0,
|
|
24577
|
+
const proc = (0, import_child_process21.spawn)(
|
|
24499
24578
|
"gitpod",
|
|
24500
24579
|
["workspace", "ssh", workspaceId, "--", cmd],
|
|
24501
24580
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -24519,10 +24598,10 @@ function shellQuote2(s) {
|
|
|
24519
24598
|
}
|
|
24520
24599
|
|
|
24521
24600
|
// src/services/providers/gitlab-workspaces.ts
|
|
24522
|
-
var
|
|
24601
|
+
var import_child_process22 = require("child_process");
|
|
24523
24602
|
var import_util6 = require("util");
|
|
24524
24603
|
var path46 = __toESM(require("path"));
|
|
24525
|
-
var execFileP7 = (0, import_util6.promisify)(
|
|
24604
|
+
var execFileP7 = (0, import_util6.promisify)(import_child_process22.execFile);
|
|
24526
24605
|
var MAX_BUFFER3 = 8 * 1024 * 1024;
|
|
24527
24606
|
var GITLAB_API_BASE = process.env.CODEAM_GITLAB_API_URL ?? "https://gitlab.com/api/v4";
|
|
24528
24607
|
function resetStdinForChild3() {
|
|
@@ -24564,7 +24643,7 @@ var GitLabWorkspacesProvider = class {
|
|
|
24564
24643
|
);
|
|
24565
24644
|
resetStdinForChild3();
|
|
24566
24645
|
await new Promise((resolve7, reject) => {
|
|
24567
|
-
const proc = (0,
|
|
24646
|
+
const proc = (0, import_child_process22.spawn)(
|
|
24568
24647
|
"glab",
|
|
24569
24648
|
["auth", "login", "--scopes", "api,read_user,read_repository"],
|
|
24570
24649
|
{ stdio: "inherit" }
|
|
@@ -24736,7 +24815,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
24736
24815
|
const sshHost = process.env.CODEAM_GITLAB_SSH_HOST ?? "workspaces.gitlab.com";
|
|
24737
24816
|
resetStdinForChild3();
|
|
24738
24817
|
return new Promise((resolve7, reject) => {
|
|
24739
|
-
const proc = (0,
|
|
24818
|
+
const proc = (0, import_child_process22.spawn)(
|
|
24740
24819
|
"ssh",
|
|
24741
24820
|
["-tt", "-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, command2],
|
|
24742
24821
|
{ stdio: "inherit" }
|
|
@@ -24757,8 +24836,8 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
24757
24836
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
24758
24837
|
const remoteCmd = `mkdir -p ${shellQuote3(remoteDir)} && tar -xzf - -C ${shellQuote3(remoteDir)}`;
|
|
24759
24838
|
await new Promise((resolve7, reject) => {
|
|
24760
|
-
const tar = (0,
|
|
24761
|
-
const ssh = (0,
|
|
24839
|
+
const tar = (0, import_child_process22.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
24840
|
+
const ssh = (0, import_child_process22.spawn)(
|
|
24762
24841
|
"ssh",
|
|
24763
24842
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, remoteCmd],
|
|
24764
24843
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -24788,7 +24867,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
24788
24867
|
}
|
|
24789
24868
|
const cmd = parts.join(" && ");
|
|
24790
24869
|
await new Promise((resolve7, reject) => {
|
|
24791
|
-
const proc = (0,
|
|
24870
|
+
const proc = (0, import_child_process22.spawn)(
|
|
24792
24871
|
"ssh",
|
|
24793
24872
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, cmd],
|
|
24794
24873
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -24847,10 +24926,10 @@ function shellQuote3(s) {
|
|
|
24847
24926
|
}
|
|
24848
24927
|
|
|
24849
24928
|
// src/services/providers/railway.ts
|
|
24850
|
-
var
|
|
24929
|
+
var import_child_process23 = require("child_process");
|
|
24851
24930
|
var import_util7 = require("util");
|
|
24852
24931
|
var path47 = __toESM(require("path"));
|
|
24853
|
-
var execFileP8 = (0, import_util7.promisify)(
|
|
24932
|
+
var execFileP8 = (0, import_util7.promisify)(import_child_process23.execFile);
|
|
24854
24933
|
var MAX_BUFFER4 = 8 * 1024 * 1024;
|
|
24855
24934
|
function resetStdinForChild4() {
|
|
24856
24935
|
if (process.stdin.isTTY) {
|
|
@@ -24891,7 +24970,7 @@ var RailwayProvider = class {
|
|
|
24891
24970
|
);
|
|
24892
24971
|
resetStdinForChild4();
|
|
24893
24972
|
await new Promise((resolve7, reject) => {
|
|
24894
|
-
const proc = (0,
|
|
24973
|
+
const proc = (0, import_child_process23.spawn)("railway", ["login"], { stdio: "inherit" });
|
|
24895
24974
|
proc.on("exit", (code) => {
|
|
24896
24975
|
if (code === 0) resolve7();
|
|
24897
24976
|
else reject(new Error("railway login failed."));
|
|
@@ -25034,7 +25113,7 @@ var RailwayProvider = class {
|
|
|
25034
25113
|
}
|
|
25035
25114
|
resetStdinForChild4();
|
|
25036
25115
|
return new Promise((resolve7, reject) => {
|
|
25037
|
-
const proc = (0,
|
|
25116
|
+
const proc = (0, import_child_process23.spawn)(
|
|
25038
25117
|
"railway",
|
|
25039
25118
|
["shell", "--project", projectId, "--service", serviceId, "--command", command2],
|
|
25040
25119
|
{ stdio: "inherit" }
|
|
@@ -25058,8 +25137,8 @@ var RailwayProvider = class {
|
|
|
25058
25137
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
25059
25138
|
const remoteCmd = `mkdir -p ${shellQuote4(remoteDir)} && tar -xzf - -C ${shellQuote4(remoteDir)}`;
|
|
25060
25139
|
await new Promise((resolve7, reject) => {
|
|
25061
|
-
const tar = (0,
|
|
25062
|
-
const sh = (0,
|
|
25140
|
+
const tar = (0, import_child_process23.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
25141
|
+
const sh = (0, import_child_process23.spawn)(
|
|
25063
25142
|
"railway",
|
|
25064
25143
|
["shell", "--project", projectId, "--service", serviceId, "--command", remoteCmd],
|
|
25065
25144
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -25092,7 +25171,7 @@ var RailwayProvider = class {
|
|
|
25092
25171
|
}
|
|
25093
25172
|
const cmd = parts.join(" && ");
|
|
25094
25173
|
await new Promise((resolve7, reject) => {
|
|
25095
|
-
const proc = (0,
|
|
25174
|
+
const proc = (0, import_child_process23.spawn)(
|
|
25096
25175
|
"railway",
|
|
25097
25176
|
["shell", "--project", projectId, "--service", serviceId, "--command", cmd],
|
|
25098
25177
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -25797,7 +25876,7 @@ function checkChokidar() {
|
|
|
25797
25876
|
}
|
|
25798
25877
|
async function doctor(args2 = []) {
|
|
25799
25878
|
const json = args2.includes("--json");
|
|
25800
|
-
const cliVersion = true ? "2.
|
|
25879
|
+
const cliVersion = true ? "2.35.0" : "0.0.0-dev";
|
|
25801
25880
|
const apiBase = resolveApiBaseUrl();
|
|
25802
25881
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
25803
25882
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -25996,7 +26075,7 @@ async function completion(args2) {
|
|
|
25996
26075
|
// src/commands/version.ts
|
|
25997
26076
|
var import_picocolors13 = __toESM(require("picocolors"));
|
|
25998
26077
|
function version2() {
|
|
25999
|
-
const v = true ? "2.
|
|
26078
|
+
const v = true ? "2.35.0" : "unknown";
|
|
26000
26079
|
console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
|
|
26001
26080
|
}
|
|
26002
26081
|
|
|
@@ -26282,7 +26361,7 @@ function checkForUpdates() {
|
|
|
26282
26361
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
26283
26362
|
if (process.env.CI) return;
|
|
26284
26363
|
if (!process.stdout.isTTY) return;
|
|
26285
|
-
const current = true ? "2.
|
|
26364
|
+
const current = true ? "2.35.0" : null;
|
|
26286
26365
|
if (!current) return;
|
|
26287
26366
|
const cache = readCache();
|
|
26288
26367
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.35.0",
|
|
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",
|