codeam-cli 2.34.0 → 2.35.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 +22 -0
- package/dist/index.js +147 -53
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ 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.35.0] — 2026-06-10
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **shared:** Rename BeadsIngestPayload.deps to required dependencies
|
|
12
|
+
- **cli:** Symlink bd onto PATH + set git beads.role during provisioning
|
|
13
|
+
- **cli:** Set BEADS_DIR pre-spawn so the agent inherits the home brain
|
|
14
|
+
- **cli:** Always send dependencies + summary in beads ingest payload
|
|
15
|
+
|
|
16
|
+
## [2.34.0] — 2026-06-10
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **cli:** Beads home-brain provisioner (idempotent init, no bd setup)
|
|
21
|
+
- **cli:** Composition-root beads orchestrator + provisioning SSE signal
|
|
22
|
+
- **cli:** Run bd setup <recipe> --global so the agent uses bd natively (revert D12)
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **cli:** Address beads home brain via BEADS_DIR, drop broken --global
|
|
27
|
+
- **cli:** Move beads provisioning to the composition root (SRP / D10)
|
|
28
|
+
|
|
7
29
|
## [2.33.0] — 2026-06-09
|
|
8
30
|
|
|
9
31
|
### 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.1",
|
|
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.1" : "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,73 @@ 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
|
|
17477
|
+
};
|
|
17478
|
+
var _linkSeam = {
|
|
17479
|
+
platform: () => process.platform,
|
|
17480
|
+
/**
|
|
17481
|
+
* A directory ON PATH to symlink `bd` into, so the AGENT's shell + the
|
|
17482
|
+
* SessionStart `bd prime` hook resolve `bd` by name.
|
|
17483
|
+
*
|
|
17484
|
+
* Earlier this used `dirname(realpath(process.argv[1]))` — but for a GLOBAL
|
|
17485
|
+
* npm install that resolves to the package's own `dist/` dir (e.g.
|
|
17486
|
+
* `…/node_modules/codeam-cli/dist`), which is NOT on PATH. The symlink landed
|
|
17487
|
+
* somewhere nothing sees, so `which bd` and the hook still failed (observed
|
|
17488
|
+
* live in a codespace). `dirname(process.execPath)` is the dir the `node`
|
|
17489
|
+
* binary lives in — for a global install that's the npm prefix `bin/` where
|
|
17490
|
+
* the `codeam` launcher also lives, and IS on PATH. We prefer the first
|
|
17491
|
+
* candidate that actually appears in `$PATH`, falling back to node's bin dir.
|
|
17492
|
+
*/
|
|
17493
|
+
cliBinDir: () => {
|
|
17494
|
+
const pathDirs = (process.env.PATH ?? "").split(path36.delimiter).filter(Boolean);
|
|
17495
|
+
const candidates = [];
|
|
17496
|
+
try {
|
|
17497
|
+
candidates.push(path36.dirname(process.execPath));
|
|
17498
|
+
} catch {
|
|
17499
|
+
}
|
|
17500
|
+
const entry = process.argv[1];
|
|
17501
|
+
if (entry) {
|
|
17502
|
+
try {
|
|
17503
|
+
candidates.push(path36.dirname(fs30.realpathSync(entry)));
|
|
17504
|
+
} catch {
|
|
17505
|
+
candidates.push(path36.dirname(entry));
|
|
17506
|
+
}
|
|
17507
|
+
}
|
|
17508
|
+
if (candidates.length === 0) return null;
|
|
17509
|
+
return candidates.find((d3) => pathDirs.includes(d3)) ?? candidates[0];
|
|
17510
|
+
},
|
|
17511
|
+
/** Current symlink target at `linkPath`, or null when absent / not a link. */
|
|
17512
|
+
readlink: (linkPath) => {
|
|
17513
|
+
try {
|
|
17514
|
+
return fs30.readlinkSync(linkPath);
|
|
17515
|
+
} catch {
|
|
17516
|
+
return null;
|
|
17517
|
+
}
|
|
17518
|
+
},
|
|
17519
|
+
unlink: (linkPath) => fs30.unlinkSync(linkPath),
|
|
17520
|
+
symlink: (target, linkPath) => fs30.symlinkSync(target, linkPath)
|
|
17472
17521
|
};
|
|
17522
|
+
function linkBdOntoPath(binaryPath) {
|
|
17523
|
+
if (_linkSeam.platform() === "win32") return;
|
|
17524
|
+
const binDir = _linkSeam.cliBinDir();
|
|
17525
|
+
if (!binDir) return;
|
|
17526
|
+
const linkPath = path36.join(binDir, "bd");
|
|
17527
|
+
if (linkPath === binaryPath) return;
|
|
17528
|
+
const current = _linkSeam.readlink(linkPath);
|
|
17529
|
+
if (current === binaryPath) return;
|
|
17530
|
+
if (current !== null) _linkSeam.unlink(linkPath);
|
|
17531
|
+
_linkSeam.symlink(binaryPath, linkPath);
|
|
17532
|
+
log.info("beads", `linked bd onto PATH: ${linkPath} -> ${binaryPath}`);
|
|
17533
|
+
}
|
|
17534
|
+
function setGitBeadsRole() {
|
|
17535
|
+
(0, import_child_process14.execFileSync)("git", ["config", "--global", "beads.role", "contributor"], {
|
|
17536
|
+
stdio: "ignore"
|
|
17537
|
+
});
|
|
17538
|
+
}
|
|
17473
17539
|
function homeBrainInitialized(beadsDir) {
|
|
17474
17540
|
try {
|
|
17475
17541
|
return fs30.statSync(path36.join(beadsDir, "embeddeddolt")).isDirectory();
|
|
@@ -17499,6 +17565,19 @@ async function provisionBeads(opts = {}) {
|
|
|
17499
17565
|
return result;
|
|
17500
17566
|
}
|
|
17501
17567
|
result.bdAvailable = true;
|
|
17568
|
+
const binaryPath = bd.resolveBinary();
|
|
17569
|
+
if (binaryPath) {
|
|
17570
|
+
try {
|
|
17571
|
+
_provisionSeam.linkBdOntoPath(binaryPath);
|
|
17572
|
+
} catch (err) {
|
|
17573
|
+
log.warn("beads", "linking bd onto PATH failed (non-fatal)", err);
|
|
17574
|
+
}
|
|
17575
|
+
}
|
|
17576
|
+
try {
|
|
17577
|
+
_provisionSeam.setGitBeadsRole();
|
|
17578
|
+
} catch (err) {
|
|
17579
|
+
log.trace("beads", `git config beads.role failed (non-fatal): ${err.message}`);
|
|
17580
|
+
}
|
|
17502
17581
|
if (_provisionSeam.homeBrainInitialized(beadsDir)) {
|
|
17503
17582
|
log.trace("beads", `home brain already initialized at ${beadsDir}`);
|
|
17504
17583
|
result.initialized = true;
|
|
@@ -17560,7 +17639,7 @@ var crypto3 = __toESM(require("crypto"));
|
|
|
17560
17639
|
var path38 = __toESM(require("path"));
|
|
17561
17640
|
|
|
17562
17641
|
// src/beads/project-key.ts
|
|
17563
|
-
var
|
|
17642
|
+
var import_child_process15 = require("child_process");
|
|
17564
17643
|
var crypto2 = __toESM(require("crypto"));
|
|
17565
17644
|
var fs31 = __toESM(require("fs"));
|
|
17566
17645
|
var path37 = __toESM(require("path"));
|
|
@@ -17607,7 +17686,7 @@ function findRepoRoot(cwd) {
|
|
|
17607
17686
|
}
|
|
17608
17687
|
var _execSeam2 = {
|
|
17609
17688
|
exec: (file, args2, opts) => {
|
|
17610
|
-
const out2 = (0,
|
|
17689
|
+
const out2 = (0, import_child_process15.execFileSync)(file, args2, opts);
|
|
17611
17690
|
return typeof out2 === "string" ? out2 : out2.toString("utf8");
|
|
17612
17691
|
},
|
|
17613
17692
|
realpath: (p2) => fs31.realpathSync(p2)
|
|
@@ -17694,6 +17773,14 @@ function _post2(url, headers, payload) {
|
|
|
17694
17773
|
// src/beads/watcher.ts
|
|
17695
17774
|
var API_BASE4 = resolveApiBaseUrl();
|
|
17696
17775
|
var DEBOUNCE_MS = 400;
|
|
17776
|
+
var ZERO_SUMMARY = {
|
|
17777
|
+
open_issues: 0,
|
|
17778
|
+
ready_issues: 0,
|
|
17779
|
+
blocked_issues: 0,
|
|
17780
|
+
in_progress_issues: 0,
|
|
17781
|
+
closed_issues: 0,
|
|
17782
|
+
total_issues: 0
|
|
17783
|
+
};
|
|
17697
17784
|
var _chokidarSeam = {
|
|
17698
17785
|
load: () => {
|
|
17699
17786
|
try {
|
|
@@ -17793,8 +17880,14 @@ var BeadsWatcher = class {
|
|
|
17793
17880
|
projectLabel,
|
|
17794
17881
|
fullSnapshot: true,
|
|
17795
17882
|
issues,
|
|
17883
|
+
// The backend DTO requires `dependencies` (not `deps`). We don't track
|
|
17884
|
+
// edges in the P0 snapshot yet, so always send an empty array rather than
|
|
17885
|
+
// omitting the field (an omitted/conditional field 400s the ingest).
|
|
17886
|
+
dependencies: [],
|
|
17796
17887
|
memories: [],
|
|
17797
|
-
|
|
17888
|
+
// Always send a summary — a null `bd status` yields a zeroed block rather
|
|
17889
|
+
// than an omitted field, so the backend never has to special-case it.
|
|
17890
|
+
summary: summary ?? ZERO_SUMMARY
|
|
17798
17891
|
};
|
|
17799
17892
|
const body = JSON.stringify(payload);
|
|
17800
17893
|
const hash = crypto3.createHash("sha256").update(body).digest("hex");
|
|
@@ -17914,6 +18007,7 @@ async function provisionBeadsForStart(ctx) {
|
|
|
17914
18007
|
log.trace("beads", "CODEAM_BEADS_DISABLED set \u2014 beads off this run");
|
|
17915
18008
|
return null;
|
|
17916
18009
|
}
|
|
18010
|
+
process.env.BEADS_DIR = defaultBeadsHomeDir();
|
|
17917
18011
|
if (!ctx.pluginAuthToken) {
|
|
17918
18012
|
log.trace("beads", "no pluginAuthToken \u2014 beads off");
|
|
17919
18013
|
return null;
|
|
@@ -18132,7 +18226,7 @@ var sessionTerminated = async (ctx, cmd) => {
|
|
|
18132
18226
|
} catch {
|
|
18133
18227
|
}
|
|
18134
18228
|
try {
|
|
18135
|
-
const proc = (0,
|
|
18229
|
+
const proc = (0, import_child_process16.spawn)("bash", ["-lc", "pm2 delete codeam-pair >/dev/null 2>&1 || true"], {
|
|
18136
18230
|
detached: true,
|
|
18137
18231
|
stdio: "ignore"
|
|
18138
18232
|
});
|
|
@@ -18154,7 +18248,7 @@ var shutdownSession = async (ctx, cmd) => {
|
|
|
18154
18248
|
}
|
|
18155
18249
|
if (ctx.keepAliveCtx.inCodespace && ctx.keepAliveCtx.codespaceName) {
|
|
18156
18250
|
try {
|
|
18157
|
-
const stopProc = (0,
|
|
18251
|
+
const stopProc = (0, import_child_process16.spawn)(
|
|
18158
18252
|
"bash",
|
|
18159
18253
|
["-lc", `sleep 1; gh codespace stop -c ${JSON.stringify(ctx.keepAliveCtx.codespaceName)} >/dev/null 2>&1 || true`],
|
|
18160
18254
|
{ detached: true, stdio: "ignore" }
|
|
@@ -18164,7 +18258,7 @@ var shutdownSession = async (ctx, cmd) => {
|
|
|
18164
18258
|
}
|
|
18165
18259
|
}
|
|
18166
18260
|
try {
|
|
18167
|
-
const proc = (0,
|
|
18261
|
+
const proc = (0, import_child_process16.spawn)("bash", ["-lc", "pm2 delete codeam-pair >/dev/null 2>&1 || true"], {
|
|
18168
18262
|
detached: true,
|
|
18169
18263
|
stdio: "ignore"
|
|
18170
18264
|
});
|
|
@@ -18671,7 +18765,7 @@ var previewStartH = (ctx, _cmd, parsed) => {
|
|
|
18671
18765
|
"BOOT_SEQUENCE",
|
|
18672
18766
|
`${spawnable.command} ${spawnable.args.join(" ")}`
|
|
18673
18767
|
);
|
|
18674
|
-
const devServer = (0,
|
|
18768
|
+
const devServer = (0, import_child_process16.spawn)(spawnable.command, spawnable.args, {
|
|
18675
18769
|
cwd: process.cwd(),
|
|
18676
18770
|
env: { ...process.env, ...spawnable.env ?? {} },
|
|
18677
18771
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -18797,7 +18891,7 @@ var previewStartH = (ctx, _cmd, parsed) => {
|
|
|
18797
18891
|
});
|
|
18798
18892
|
return;
|
|
18799
18893
|
}
|
|
18800
|
-
tunnel = (0,
|
|
18894
|
+
tunnel = (0, import_child_process16.spawn)(bin, ["tunnel", "--url", `http://localhost:${detection.port}`], {
|
|
18801
18895
|
stdio: ["ignore", "pipe", "pipe"]
|
|
18802
18896
|
});
|
|
18803
18897
|
let parsedUrl = null;
|
|
@@ -18895,7 +18989,7 @@ var previewStopH = (ctx) => {
|
|
|
18895
18989
|
};
|
|
18896
18990
|
function runOnce(cmd, args2, cwd, env) {
|
|
18897
18991
|
return new Promise((resolve7) => {
|
|
18898
|
-
const child = (0,
|
|
18992
|
+
const child = (0, import_child_process16.spawn)(cmd, args2, {
|
|
18899
18993
|
cwd,
|
|
18900
18994
|
env: { ...process.env, ...env ?? {} },
|
|
18901
18995
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -18991,7 +19085,7 @@ async function dispatchCommand(ctx, cmd) {
|
|
|
18991
19085
|
}
|
|
18992
19086
|
|
|
18993
19087
|
// src/services/file-watcher.service.ts
|
|
18994
|
-
var
|
|
19088
|
+
var import_child_process17 = require("child_process");
|
|
18995
19089
|
var fs33 = __toESM(require("fs"));
|
|
18996
19090
|
var os26 = __toESM(require("os"));
|
|
18997
19091
|
var path40 = __toESM(require("path"));
|
|
@@ -19757,7 +19851,7 @@ async function _runGitImpl(cwd, args2, opts = {}) {
|
|
|
19757
19851
|
return new Promise((resolve7) => {
|
|
19758
19852
|
let proc;
|
|
19759
19853
|
try {
|
|
19760
|
-
proc = (0,
|
|
19854
|
+
proc = (0, import_child_process17.spawn)("git", args2, { cwd, env: process.env });
|
|
19761
19855
|
} catch {
|
|
19762
19856
|
resolve7(null);
|
|
19763
19857
|
return;
|
|
@@ -19789,7 +19883,7 @@ function _runGit(cwd, args2, opts = {}) {
|
|
|
19789
19883
|
var import_crypto4 = require("crypto");
|
|
19790
19884
|
|
|
19791
19885
|
// src/services/turn-files/git-changeset.ts
|
|
19792
|
-
var
|
|
19886
|
+
var import_child_process18 = require("child_process");
|
|
19793
19887
|
var path41 = __toESM(require("path"));
|
|
19794
19888
|
async function collectRepoChangeset(opts) {
|
|
19795
19889
|
const status2 = await runGit3(opts.repoRoot, ["status", "--porcelain=v1", "-z"]);
|
|
@@ -19873,7 +19967,7 @@ function defaultRunGit(cwd, args2) {
|
|
|
19873
19967
|
return new Promise((resolve7) => {
|
|
19874
19968
|
let proc;
|
|
19875
19969
|
try {
|
|
19876
|
-
proc = (0,
|
|
19970
|
+
proc = (0, import_child_process18.spawn)("git", args2, { cwd, env: process.env });
|
|
19877
19971
|
} catch {
|
|
19878
19972
|
resolve7(null);
|
|
19879
19973
|
return;
|
|
@@ -22728,13 +22822,13 @@ function fetchQuotaUsage(runtime, historySvc) {
|
|
|
22728
22822
|
}
|
|
22729
22823
|
|
|
22730
22824
|
// src/commands/start/keep-alive.ts
|
|
22731
|
-
var
|
|
22825
|
+
var import_child_process19 = require("child_process");
|
|
22732
22826
|
function buildKeepAlive(ctx) {
|
|
22733
22827
|
let timer = null;
|
|
22734
22828
|
async function setIdleTimeout(minutes) {
|
|
22735
22829
|
if (!ctx.inCodespace || !ctx.codespaceName) return;
|
|
22736
22830
|
await new Promise((resolve7) => {
|
|
22737
|
-
const proc = (0,
|
|
22831
|
+
const proc = (0, import_child_process19.spawn)(
|
|
22738
22832
|
"gh",
|
|
22739
22833
|
[
|
|
22740
22834
|
"api",
|
|
@@ -23683,11 +23777,11 @@ async function logout() {
|
|
|
23683
23777
|
var import_picocolors10 = __toESM(require("picocolors"));
|
|
23684
23778
|
|
|
23685
23779
|
// src/services/providers/github-codespaces.ts
|
|
23686
|
-
var
|
|
23780
|
+
var import_child_process20 = require("child_process");
|
|
23687
23781
|
var import_util4 = require("util");
|
|
23688
23782
|
var import_picocolors8 = __toESM(require("picocolors"));
|
|
23689
23783
|
var path44 = __toESM(require("path"));
|
|
23690
|
-
var execFileP5 = (0, import_util4.promisify)(
|
|
23784
|
+
var execFileP5 = (0, import_util4.promisify)(import_child_process20.execFile);
|
|
23691
23785
|
var MAX_BUFFER = 8 * 1024 * 1024;
|
|
23692
23786
|
function resetStdinForChild() {
|
|
23693
23787
|
if (process.stdin.isTTY) {
|
|
@@ -23731,7 +23825,7 @@ var GitHubCodespacesProvider = class {
|
|
|
23731
23825
|
if (!isAuthed) {
|
|
23732
23826
|
resetStdinForChild();
|
|
23733
23827
|
await new Promise((resolve7, reject) => {
|
|
23734
|
-
const proc = (0,
|
|
23828
|
+
const proc = (0, import_child_process20.spawn)("gh", ["auth", "login", "-s", "codespace,repo,read:user"], {
|
|
23735
23829
|
stdio: "inherit"
|
|
23736
23830
|
});
|
|
23737
23831
|
proc.on("exit", (code) => {
|
|
@@ -23765,7 +23859,7 @@ var GitHubCodespacesProvider = class {
|
|
|
23765
23859
|
wt(noteLines.join("\n"), "One more permission needed");
|
|
23766
23860
|
resetStdinForChild();
|
|
23767
23861
|
const refreshCode = await new Promise((resolve7, reject) => {
|
|
23768
|
-
const proc = (0,
|
|
23862
|
+
const proc = (0, import_child_process20.spawn)(
|
|
23769
23863
|
"gh",
|
|
23770
23864
|
["auth", "refresh", "-h", "github.com", "-s", "codespace"],
|
|
23771
23865
|
{ stdio: "inherit" }
|
|
@@ -23915,7 +24009,7 @@ var GitHubCodespacesProvider = class {
|
|
|
23915
24009
|
O2.step(`Installing gh via ${installCmd.describe}\u2026`);
|
|
23916
24010
|
resetStdinForChild();
|
|
23917
24011
|
const ok = await new Promise((resolve7) => {
|
|
23918
|
-
const proc = (0,
|
|
24012
|
+
const proc = (0, import_child_process20.spawn)(installCmd.exe, installCmd.args, { stdio: "inherit" });
|
|
23919
24013
|
proc.on("exit", (code) => resolve7(code === 0));
|
|
23920
24014
|
proc.on("error", () => resolve7(false));
|
|
23921
24015
|
});
|
|
@@ -23942,7 +24036,7 @@ var GitHubCodespacesProvider = class {
|
|
|
23942
24036
|
);
|
|
23943
24037
|
resetStdinForChild();
|
|
23944
24038
|
await new Promise((resolve7, reject) => {
|
|
23945
|
-
const proc = (0,
|
|
24039
|
+
const proc = (0, import_child_process20.spawn)(
|
|
23946
24040
|
"gh",
|
|
23947
24041
|
["auth", "refresh", "-h", "github.com", "-s", "repo,read:org"],
|
|
23948
24042
|
{ stdio: "inherit" }
|
|
@@ -24120,7 +24214,7 @@ var GitHubCodespacesProvider = class {
|
|
|
24120
24214
|
async streamCommand(workspaceId, command2) {
|
|
24121
24215
|
resetStdinForChild();
|
|
24122
24216
|
return new Promise((resolve7, reject) => {
|
|
24123
|
-
const proc = (0,
|
|
24217
|
+
const proc = (0, import_child_process20.spawn)(
|
|
24124
24218
|
"gh",
|
|
24125
24219
|
["codespace", "ssh", "-c", workspaceId, "--", "-tt", command2],
|
|
24126
24220
|
{ stdio: "inherit" }
|
|
@@ -24147,11 +24241,11 @@ var GitHubCodespacesProvider = class {
|
|
|
24147
24241
|
`mkdir -p ${shellQuote(remoteDir)} && tar -xzf - -C ${shellQuote(remoteDir)}`
|
|
24148
24242
|
];
|
|
24149
24243
|
await new Promise((resolve7, reject) => {
|
|
24150
|
-
const tar = (0,
|
|
24244
|
+
const tar = (0, import_child_process20.spawn)("tar", tarArgs, {
|
|
24151
24245
|
stdio: ["ignore", "pipe", "pipe"],
|
|
24152
24246
|
env: tarEnv
|
|
24153
24247
|
});
|
|
24154
|
-
const ssh = (0,
|
|
24248
|
+
const ssh = (0, import_child_process20.spawn)("gh", sshArgs, {
|
|
24155
24249
|
stdio: [tar.stdout, "pipe", "pipe"]
|
|
24156
24250
|
});
|
|
24157
24251
|
let tarErr = "";
|
|
@@ -24185,7 +24279,7 @@ var GitHubCodespacesProvider = class {
|
|
|
24185
24279
|
}
|
|
24186
24280
|
const cmd = parts.join(" && ");
|
|
24187
24281
|
await new Promise((resolve7, reject) => {
|
|
24188
|
-
const proc = (0,
|
|
24282
|
+
const proc = (0, import_child_process20.spawn)(
|
|
24189
24283
|
"gh",
|
|
24190
24284
|
["codespace", "ssh", "-c", workspaceId, "--", cmd],
|
|
24191
24285
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -24243,11 +24337,11 @@ function shellQuote(s) {
|
|
|
24243
24337
|
}
|
|
24244
24338
|
|
|
24245
24339
|
// src/services/providers/gitpod.ts
|
|
24246
|
-
var
|
|
24340
|
+
var import_child_process21 = require("child_process");
|
|
24247
24341
|
var import_util5 = require("util");
|
|
24248
24342
|
var path45 = __toESM(require("path"));
|
|
24249
24343
|
var import_picocolors9 = __toESM(require("picocolors"));
|
|
24250
|
-
var execFileP6 = (0, import_util5.promisify)(
|
|
24344
|
+
var execFileP6 = (0, import_util5.promisify)(import_child_process21.execFile);
|
|
24251
24345
|
var MAX_BUFFER2 = 8 * 1024 * 1024;
|
|
24252
24346
|
function resetStdinForChild2() {
|
|
24253
24347
|
if (process.stdin.isTTY) {
|
|
@@ -24287,7 +24381,7 @@ var GitpodProvider = class {
|
|
|
24287
24381
|
);
|
|
24288
24382
|
resetStdinForChild2();
|
|
24289
24383
|
await new Promise((resolve7, reject) => {
|
|
24290
|
-
const proc = (0,
|
|
24384
|
+
const proc = (0, import_child_process21.spawn)("gitpod", ["login"], { stdio: "inherit" });
|
|
24291
24385
|
proc.on("exit", (code) => {
|
|
24292
24386
|
if (code === 0) resolve7();
|
|
24293
24387
|
else reject(new Error("gitpod login failed."));
|
|
@@ -24439,7 +24533,7 @@ var GitpodProvider = class {
|
|
|
24439
24533
|
async streamCommand(workspaceId, command2) {
|
|
24440
24534
|
resetStdinForChild2();
|
|
24441
24535
|
return new Promise((resolve7, reject) => {
|
|
24442
|
-
const proc = (0,
|
|
24536
|
+
const proc = (0, import_child_process21.spawn)(
|
|
24443
24537
|
"gitpod",
|
|
24444
24538
|
["workspace", "ssh", workspaceId, "--", "-tt", command2],
|
|
24445
24539
|
{ stdio: "inherit" }
|
|
@@ -24459,11 +24553,11 @@ var GitpodProvider = class {
|
|
|
24459
24553
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
24460
24554
|
const remoteCmd = `mkdir -p ${shellQuote2(remoteDir)} && tar -xzf - -C ${shellQuote2(remoteDir)}`;
|
|
24461
24555
|
await new Promise((resolve7, reject) => {
|
|
24462
|
-
const tar = (0,
|
|
24556
|
+
const tar = (0, import_child_process21.spawn)("tar", tarArgs, {
|
|
24463
24557
|
stdio: ["ignore", "pipe", "pipe"],
|
|
24464
24558
|
env: tarEnv
|
|
24465
24559
|
});
|
|
24466
|
-
const ssh = (0,
|
|
24560
|
+
const ssh = (0, import_child_process21.spawn)(
|
|
24467
24561
|
"gitpod",
|
|
24468
24562
|
["workspace", "ssh", workspaceId, "--", remoteCmd],
|
|
24469
24563
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -24495,7 +24589,7 @@ var GitpodProvider = class {
|
|
|
24495
24589
|
}
|
|
24496
24590
|
const cmd = parts.join(" && ");
|
|
24497
24591
|
await new Promise((resolve7, reject) => {
|
|
24498
|
-
const proc = (0,
|
|
24592
|
+
const proc = (0, import_child_process21.spawn)(
|
|
24499
24593
|
"gitpod",
|
|
24500
24594
|
["workspace", "ssh", workspaceId, "--", cmd],
|
|
24501
24595
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -24519,10 +24613,10 @@ function shellQuote2(s) {
|
|
|
24519
24613
|
}
|
|
24520
24614
|
|
|
24521
24615
|
// src/services/providers/gitlab-workspaces.ts
|
|
24522
|
-
var
|
|
24616
|
+
var import_child_process22 = require("child_process");
|
|
24523
24617
|
var import_util6 = require("util");
|
|
24524
24618
|
var path46 = __toESM(require("path"));
|
|
24525
|
-
var execFileP7 = (0, import_util6.promisify)(
|
|
24619
|
+
var execFileP7 = (0, import_util6.promisify)(import_child_process22.execFile);
|
|
24526
24620
|
var MAX_BUFFER3 = 8 * 1024 * 1024;
|
|
24527
24621
|
var GITLAB_API_BASE = process.env.CODEAM_GITLAB_API_URL ?? "https://gitlab.com/api/v4";
|
|
24528
24622
|
function resetStdinForChild3() {
|
|
@@ -24564,7 +24658,7 @@ var GitLabWorkspacesProvider = class {
|
|
|
24564
24658
|
);
|
|
24565
24659
|
resetStdinForChild3();
|
|
24566
24660
|
await new Promise((resolve7, reject) => {
|
|
24567
|
-
const proc = (0,
|
|
24661
|
+
const proc = (0, import_child_process22.spawn)(
|
|
24568
24662
|
"glab",
|
|
24569
24663
|
["auth", "login", "--scopes", "api,read_user,read_repository"],
|
|
24570
24664
|
{ stdio: "inherit" }
|
|
@@ -24736,7 +24830,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
24736
24830
|
const sshHost = process.env.CODEAM_GITLAB_SSH_HOST ?? "workspaces.gitlab.com";
|
|
24737
24831
|
resetStdinForChild3();
|
|
24738
24832
|
return new Promise((resolve7, reject) => {
|
|
24739
|
-
const proc = (0,
|
|
24833
|
+
const proc = (0, import_child_process22.spawn)(
|
|
24740
24834
|
"ssh",
|
|
24741
24835
|
["-tt", "-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, command2],
|
|
24742
24836
|
{ stdio: "inherit" }
|
|
@@ -24757,8 +24851,8 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
24757
24851
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
24758
24852
|
const remoteCmd = `mkdir -p ${shellQuote3(remoteDir)} && tar -xzf - -C ${shellQuote3(remoteDir)}`;
|
|
24759
24853
|
await new Promise((resolve7, reject) => {
|
|
24760
|
-
const tar = (0,
|
|
24761
|
-
const ssh = (0,
|
|
24854
|
+
const tar = (0, import_child_process22.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
24855
|
+
const ssh = (0, import_child_process22.spawn)(
|
|
24762
24856
|
"ssh",
|
|
24763
24857
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, remoteCmd],
|
|
24764
24858
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -24788,7 +24882,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
24788
24882
|
}
|
|
24789
24883
|
const cmd = parts.join(" && ");
|
|
24790
24884
|
await new Promise((resolve7, reject) => {
|
|
24791
|
-
const proc = (0,
|
|
24885
|
+
const proc = (0, import_child_process22.spawn)(
|
|
24792
24886
|
"ssh",
|
|
24793
24887
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, cmd],
|
|
24794
24888
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -24847,10 +24941,10 @@ function shellQuote3(s) {
|
|
|
24847
24941
|
}
|
|
24848
24942
|
|
|
24849
24943
|
// src/services/providers/railway.ts
|
|
24850
|
-
var
|
|
24944
|
+
var import_child_process23 = require("child_process");
|
|
24851
24945
|
var import_util7 = require("util");
|
|
24852
24946
|
var path47 = __toESM(require("path"));
|
|
24853
|
-
var execFileP8 = (0, import_util7.promisify)(
|
|
24947
|
+
var execFileP8 = (0, import_util7.promisify)(import_child_process23.execFile);
|
|
24854
24948
|
var MAX_BUFFER4 = 8 * 1024 * 1024;
|
|
24855
24949
|
function resetStdinForChild4() {
|
|
24856
24950
|
if (process.stdin.isTTY) {
|
|
@@ -24891,7 +24985,7 @@ var RailwayProvider = class {
|
|
|
24891
24985
|
);
|
|
24892
24986
|
resetStdinForChild4();
|
|
24893
24987
|
await new Promise((resolve7, reject) => {
|
|
24894
|
-
const proc = (0,
|
|
24988
|
+
const proc = (0, import_child_process23.spawn)("railway", ["login"], { stdio: "inherit" });
|
|
24895
24989
|
proc.on("exit", (code) => {
|
|
24896
24990
|
if (code === 0) resolve7();
|
|
24897
24991
|
else reject(new Error("railway login failed."));
|
|
@@ -25034,7 +25128,7 @@ var RailwayProvider = class {
|
|
|
25034
25128
|
}
|
|
25035
25129
|
resetStdinForChild4();
|
|
25036
25130
|
return new Promise((resolve7, reject) => {
|
|
25037
|
-
const proc = (0,
|
|
25131
|
+
const proc = (0, import_child_process23.spawn)(
|
|
25038
25132
|
"railway",
|
|
25039
25133
|
["shell", "--project", projectId, "--service", serviceId, "--command", command2],
|
|
25040
25134
|
{ stdio: "inherit" }
|
|
@@ -25058,8 +25152,8 @@ var RailwayProvider = class {
|
|
|
25058
25152
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
25059
25153
|
const remoteCmd = `mkdir -p ${shellQuote4(remoteDir)} && tar -xzf - -C ${shellQuote4(remoteDir)}`;
|
|
25060
25154
|
await new Promise((resolve7, reject) => {
|
|
25061
|
-
const tar = (0,
|
|
25062
|
-
const sh = (0,
|
|
25155
|
+
const tar = (0, import_child_process23.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
25156
|
+
const sh = (0, import_child_process23.spawn)(
|
|
25063
25157
|
"railway",
|
|
25064
25158
|
["shell", "--project", projectId, "--service", serviceId, "--command", remoteCmd],
|
|
25065
25159
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -25092,7 +25186,7 @@ var RailwayProvider = class {
|
|
|
25092
25186
|
}
|
|
25093
25187
|
const cmd = parts.join(" && ");
|
|
25094
25188
|
await new Promise((resolve7, reject) => {
|
|
25095
|
-
const proc = (0,
|
|
25189
|
+
const proc = (0, import_child_process23.spawn)(
|
|
25096
25190
|
"railway",
|
|
25097
25191
|
["shell", "--project", projectId, "--service", serviceId, "--command", cmd],
|
|
25098
25192
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -25797,7 +25891,7 @@ function checkChokidar() {
|
|
|
25797
25891
|
}
|
|
25798
25892
|
async function doctor(args2 = []) {
|
|
25799
25893
|
const json = args2.includes("--json");
|
|
25800
|
-
const cliVersion = true ? "2.
|
|
25894
|
+
const cliVersion = true ? "2.35.1" : "0.0.0-dev";
|
|
25801
25895
|
const apiBase = resolveApiBaseUrl();
|
|
25802
25896
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
25803
25897
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -25996,7 +26090,7 @@ async function completion(args2) {
|
|
|
25996
26090
|
// src/commands/version.ts
|
|
25997
26091
|
var import_picocolors13 = __toESM(require("picocolors"));
|
|
25998
26092
|
function version2() {
|
|
25999
|
-
const v = true ? "2.
|
|
26093
|
+
const v = true ? "2.35.1" : "unknown";
|
|
26000
26094
|
console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
|
|
26001
26095
|
}
|
|
26002
26096
|
|
|
@@ -26282,7 +26376,7 @@ function checkForUpdates() {
|
|
|
26282
26376
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
26283
26377
|
if (process.env.CI) return;
|
|
26284
26378
|
if (!process.stdout.isTTY) return;
|
|
26285
|
-
const current = true ? "2.
|
|
26379
|
+
const current = true ? "2.35.1" : null;
|
|
26286
26380
|
if (!current) return;
|
|
26287
26381
|
const cache = readCache();
|
|
26288
26382
|
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.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",
|