codeam-cli 2.43.1 → 2.43.3
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 +108 -45
- 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.43.2] — 2026-06-25
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Self-hosted credential cleanup on authType change (claude + codex)
|
|
12
|
+
- **cli:** Welcome CTA shows the repo name, not the session UUID
|
|
13
|
+
|
|
14
|
+
## [2.43.1] — 2026-06-24
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **cli:** 1M-context recovery must publish an awaiting-answer (the tappable button), not just a select_prompt chunk
|
|
19
|
+
|
|
7
20
|
## [2.43.0] — 2026-06-24
|
|
8
21
|
|
|
9
22
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -5397,7 +5397,7 @@ function readAnonId() {
|
|
|
5397
5397
|
}
|
|
5398
5398
|
function superProperties() {
|
|
5399
5399
|
return {
|
|
5400
|
-
cliVersion: true ? "2.43.
|
|
5400
|
+
cliVersion: true ? "2.43.3" : "0.0.0-dev",
|
|
5401
5401
|
nodeVersion: process.version,
|
|
5402
5402
|
platform: process.platform,
|
|
5403
5403
|
arch: process.arch,
|
|
@@ -5578,7 +5578,7 @@ var os4 = __toESM(require("os"));
|
|
|
5578
5578
|
// package.json
|
|
5579
5579
|
var package_default = {
|
|
5580
5580
|
name: "codeam-cli",
|
|
5581
|
-
version: "2.43.
|
|
5581
|
+
version: "2.43.3",
|
|
5582
5582
|
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.",
|
|
5583
5583
|
type: "commonjs",
|
|
5584
5584
|
main: "dist/index.js",
|
|
@@ -17361,15 +17361,25 @@ function writeFile0600(filePath, contents) {
|
|
|
17361
17361
|
fs37.writeFileSync(filePath, contents, { encoding: "utf8", mode: 384 });
|
|
17362
17362
|
fs37.chmodSync(filePath, 384);
|
|
17363
17363
|
}
|
|
17364
|
+
function rmIfExists(filePath) {
|
|
17365
|
+
try {
|
|
17366
|
+
fs37.rmSync(filePath, { force: true });
|
|
17367
|
+
} catch {
|
|
17368
|
+
}
|
|
17369
|
+
}
|
|
17364
17370
|
var claudeProvisioner = {
|
|
17365
17371
|
write(auth, home) {
|
|
17372
|
+
const credentialsJson = path43.join(home, ".claude", ".credentials.json");
|
|
17366
17373
|
if (auth.kind === "api_key") {
|
|
17374
|
+
rmIfExists(credentialsJson);
|
|
17367
17375
|
return { ANTHROPIC_API_KEY: auth.value };
|
|
17368
17376
|
}
|
|
17369
17377
|
const value = auth.value.trim();
|
|
17370
17378
|
const isJsonBlob = value.startsWith("{");
|
|
17371
17379
|
if (isJsonBlob) {
|
|
17372
|
-
writeFile0600(
|
|
17380
|
+
writeFile0600(credentialsJson, value);
|
|
17381
|
+
} else {
|
|
17382
|
+
rmIfExists(credentialsJson);
|
|
17373
17383
|
}
|
|
17374
17384
|
const claudeJson = path43.join(home, ".claude.json");
|
|
17375
17385
|
if (!fs37.existsSync(claudeJson)) {
|
|
@@ -17383,10 +17393,12 @@ var claudeProvisioner = {
|
|
|
17383
17393
|
};
|
|
17384
17394
|
var codexProvisioner = {
|
|
17385
17395
|
write(auth, home) {
|
|
17396
|
+
const authJson = path43.join(home, ".codex", "auth.json");
|
|
17386
17397
|
if (auth.kind === "api_key") {
|
|
17398
|
+
rmIfExists(authJson);
|
|
17387
17399
|
return { OPENAI_API_KEY: auth.value };
|
|
17388
17400
|
}
|
|
17389
|
-
writeFile0600(
|
|
17401
|
+
writeFile0600(authJson, auth.value);
|
|
17390
17402
|
return {};
|
|
17391
17403
|
}
|
|
17392
17404
|
};
|
|
@@ -17811,7 +17823,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
17811
17823
|
if (process.env.NODE_ENV === "test") return;
|
|
17812
17824
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17813
17825
|
if (process.env.CI) return;
|
|
17814
|
-
const current = true ? "2.43.
|
|
17826
|
+
const current = true ? "2.43.3" : null;
|
|
17815
17827
|
if (!current) return;
|
|
17816
17828
|
const cache = readCache();
|
|
17817
17829
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -17828,7 +17840,7 @@ function checkForUpdates() {
|
|
|
17828
17840
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17829
17841
|
if (process.env.CI) return;
|
|
17830
17842
|
if (!process.stdout.isTTY) return;
|
|
17831
|
-
const current = true ? "2.43.
|
|
17843
|
+
const current = true ? "2.43.3" : null;
|
|
17832
17844
|
if (!current) return;
|
|
17833
17845
|
const cache = readCache();
|
|
17834
17846
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -18266,7 +18278,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process14.s
|
|
|
18266
18278
|
detached: false
|
|
18267
18279
|
});
|
|
18268
18280
|
function currentCliVersion() {
|
|
18269
|
-
return true ? "2.43.
|
|
18281
|
+
return true ? "2.43.3" : null;
|
|
18270
18282
|
}
|
|
18271
18283
|
function runCmd(cmd, args2, timeoutMs) {
|
|
18272
18284
|
return new Promise((resolve7) => {
|
|
@@ -23511,6 +23523,7 @@ function reconcileCumulative(existing, incoming) {
|
|
|
23511
23523
|
}
|
|
23512
23524
|
|
|
23513
23525
|
// src/agents/acp/onboarding.ts
|
|
23526
|
+
var import_child_process22 = require("child_process");
|
|
23514
23527
|
var fs44 = __toESM(require("fs"));
|
|
23515
23528
|
var os37 = __toESM(require("os"));
|
|
23516
23529
|
var path51 = __toESM(require("path"));
|
|
@@ -23524,10 +23537,44 @@ var _onboardingSeam = {
|
|
|
23524
23537
|
disabled: () => {
|
|
23525
23538
|
const v = process.env.CODEAM_ONBOARDING_DISABLED;
|
|
23526
23539
|
return !!v && v !== "0" && v.toLowerCase() !== "false";
|
|
23540
|
+
},
|
|
23541
|
+
/**
|
|
23542
|
+
* The `origin` remote URL for `cwd`, or null when there's no git repo /
|
|
23543
|
+
* remote. Seam so tests drive `resolveRepoName` without a real checkout.
|
|
23544
|
+
*/
|
|
23545
|
+
gitRemoteUrl: (cwd) => {
|
|
23546
|
+
try {
|
|
23547
|
+
return (0, import_child_process22.execFileSync)("git", ["-C", cwd, "remote", "get-url", "origin"], {
|
|
23548
|
+
encoding: "utf8",
|
|
23549
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
23550
|
+
timeout: 2e3
|
|
23551
|
+
}).trim();
|
|
23552
|
+
} catch {
|
|
23553
|
+
return null;
|
|
23554
|
+
}
|
|
23527
23555
|
}
|
|
23528
23556
|
};
|
|
23557
|
+
function isUuid(s) {
|
|
23558
|
+
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s);
|
|
23559
|
+
}
|
|
23560
|
+
function repoNameFromRemoteUrl(url) {
|
|
23561
|
+
const m = url.trim().replace(/\.git$/, "").replace(/\/$/, "").match(/[/:]([^/]+)\/([^/]+)$/);
|
|
23562
|
+
return m ? m[2] : null;
|
|
23563
|
+
}
|
|
23564
|
+
function resolveRepoName(cwd) {
|
|
23565
|
+
if (cwd) {
|
|
23566
|
+
const url = _onboardingSeam.gitRemoteUrl(cwd);
|
|
23567
|
+
if (url) {
|
|
23568
|
+
const name = repoNameFromRemoteUrl(url);
|
|
23569
|
+
if (name) return name;
|
|
23570
|
+
}
|
|
23571
|
+
}
|
|
23572
|
+
const base = path51.basename(cwd || "");
|
|
23573
|
+
if (base && !isUuid(base)) return base;
|
|
23574
|
+
return "this project";
|
|
23575
|
+
}
|
|
23529
23576
|
function buildOnboardingWelcome(cwd) {
|
|
23530
|
-
const repo =
|
|
23577
|
+
const repo = resolveRepoName(cwd);
|
|
23531
23578
|
return [
|
|
23532
23579
|
`Welcome to CodeAgent Mobile! \u{1F44B} You're now driving this agent from your phone \u2014 and it comes fully wired, zero setup:`,
|
|
23533
23580
|
"",
|
|
@@ -23799,7 +23846,7 @@ function extractSelectPrompt(text) {
|
|
|
23799
23846
|
var import_crypto5 = require("crypto");
|
|
23800
23847
|
|
|
23801
23848
|
// src/services/turn-files/git-changeset.ts
|
|
23802
|
-
var
|
|
23849
|
+
var import_child_process23 = require("child_process");
|
|
23803
23850
|
var fs45 = __toESM(require("fs/promises"));
|
|
23804
23851
|
var path52 = __toESM(require("path"));
|
|
23805
23852
|
async function collectRepoChangeset(opts) {
|
|
@@ -23914,7 +23961,7 @@ function defaultRunGit(cwd, args2) {
|
|
|
23914
23961
|
return new Promise((resolve7) => {
|
|
23915
23962
|
let proc;
|
|
23916
23963
|
try {
|
|
23917
|
-
proc = (0,
|
|
23964
|
+
proc = (0, import_child_process23.spawn)("git", args2, { cwd, env: process.env });
|
|
23918
23965
|
} catch {
|
|
23919
23966
|
resolve7(null);
|
|
23920
23967
|
return;
|
|
@@ -24836,6 +24883,14 @@ async function handleGetConversation(args2) {
|
|
|
24836
24883
|
}
|
|
24837
24884
|
await relay.sendResult(commandId, "completed", { conversationId: acpSessionId });
|
|
24838
24885
|
}
|
|
24886
|
+
function computeAdapterExtraEnv(params) {
|
|
24887
|
+
const env = {};
|
|
24888
|
+
if (params.disable1mContext) env.CLAUDE_CODE_DISABLE_1M_CONTEXT = "1";
|
|
24889
|
+
if (params.agent === "codex" && params.autoApprovePermissions) {
|
|
24890
|
+
env.INITIAL_AGENT_MODE = "agent-full-access";
|
|
24891
|
+
}
|
|
24892
|
+
return env;
|
|
24893
|
+
}
|
|
24839
24894
|
async function runAcpSession(opts) {
|
|
24840
24895
|
const publisher = new AcpPublisher({
|
|
24841
24896
|
sessionId: opts.sessionId,
|
|
@@ -24865,10 +24920,15 @@ async function runAcpSession(opts) {
|
|
|
24865
24920
|
});
|
|
24866
24921
|
let updateCount = 0;
|
|
24867
24922
|
const disable1mContext = loadCliConfig().sessions.find((s) => s.pluginId === opts.pluginId)?.disable1mContext === true;
|
|
24923
|
+
const extraEnv = computeAdapterExtraEnv({
|
|
24924
|
+
agent: opts.agent,
|
|
24925
|
+
autoApprovePermissions: opts.autoApprovePermissions,
|
|
24926
|
+
disable1mContext
|
|
24927
|
+
});
|
|
24868
24928
|
const clientOptions = {
|
|
24869
24929
|
adapter: opts.adapter,
|
|
24870
24930
|
cwd: opts.cwd,
|
|
24871
|
-
extraEnv
|
|
24931
|
+
extraEnv,
|
|
24872
24932
|
onSessionUpdate: (notification) => {
|
|
24873
24933
|
updateCount += 1;
|
|
24874
24934
|
const variant = notification.update?.sessionUpdate ?? "unknown";
|
|
@@ -24941,7 +25001,10 @@ async function runAcpSession(opts) {
|
|
|
24941
25001
|
await client2.stop();
|
|
24942
25002
|
} catch {
|
|
24943
25003
|
}
|
|
24944
|
-
client2 = new AcpClient({
|
|
25004
|
+
client2 = new AcpClient({
|
|
25005
|
+
...clientOptions,
|
|
25006
|
+
extraEnv: { ...extraEnv, CLAUDE_CODE_DISABLE_1M_CONTEXT: "1" }
|
|
25007
|
+
});
|
|
24945
25008
|
await client2.start();
|
|
24946
25009
|
};
|
|
24947
25010
|
const oneMRecovery = createOneMRecovery({
|
|
@@ -27170,11 +27233,11 @@ async function logout() {
|
|
|
27170
27233
|
var import_picocolors11 = __toESM(require("picocolors"));
|
|
27171
27234
|
|
|
27172
27235
|
// src/services/providers/github-codespaces.ts
|
|
27173
|
-
var
|
|
27236
|
+
var import_child_process24 = require("child_process");
|
|
27174
27237
|
var import_util4 = require("util");
|
|
27175
27238
|
var import_picocolors9 = __toESM(require("picocolors"));
|
|
27176
27239
|
var path55 = __toESM(require("path"));
|
|
27177
|
-
var execFileP6 = (0, import_util4.promisify)(
|
|
27240
|
+
var execFileP6 = (0, import_util4.promisify)(import_child_process24.execFile);
|
|
27178
27241
|
var MAX_BUFFER = 8 * 1024 * 1024;
|
|
27179
27242
|
function resetStdinForChild() {
|
|
27180
27243
|
if (process.stdin.isTTY) {
|
|
@@ -27218,7 +27281,7 @@ var GitHubCodespacesProvider = class {
|
|
|
27218
27281
|
if (!isAuthed) {
|
|
27219
27282
|
resetStdinForChild();
|
|
27220
27283
|
await new Promise((resolve7, reject) => {
|
|
27221
|
-
const proc = (0,
|
|
27284
|
+
const proc = (0, import_child_process24.spawn)("gh", ["auth", "login", "-s", "codespace,repo,read:user"], {
|
|
27222
27285
|
stdio: "inherit"
|
|
27223
27286
|
});
|
|
27224
27287
|
proc.on("exit", (code) => {
|
|
@@ -27252,7 +27315,7 @@ var GitHubCodespacesProvider = class {
|
|
|
27252
27315
|
wt(noteLines.join("\n"), "One more permission needed");
|
|
27253
27316
|
resetStdinForChild();
|
|
27254
27317
|
const refreshCode = await new Promise((resolve7, reject) => {
|
|
27255
|
-
const proc = (0,
|
|
27318
|
+
const proc = (0, import_child_process24.spawn)(
|
|
27256
27319
|
"gh",
|
|
27257
27320
|
["auth", "refresh", "-h", "github.com", "-s", "codespace"],
|
|
27258
27321
|
{ stdio: "inherit" }
|
|
@@ -27402,7 +27465,7 @@ var GitHubCodespacesProvider = class {
|
|
|
27402
27465
|
O2.step(`Installing gh via ${installCmd.describe}\u2026`);
|
|
27403
27466
|
resetStdinForChild();
|
|
27404
27467
|
const ok = await new Promise((resolve7) => {
|
|
27405
|
-
const proc = (0,
|
|
27468
|
+
const proc = (0, import_child_process24.spawn)(installCmd.exe, installCmd.args, { stdio: "inherit" });
|
|
27406
27469
|
proc.on("exit", (code) => resolve7(code === 0));
|
|
27407
27470
|
proc.on("error", () => resolve7(false));
|
|
27408
27471
|
});
|
|
@@ -27429,7 +27492,7 @@ var GitHubCodespacesProvider = class {
|
|
|
27429
27492
|
);
|
|
27430
27493
|
resetStdinForChild();
|
|
27431
27494
|
await new Promise((resolve7, reject) => {
|
|
27432
|
-
const proc = (0,
|
|
27495
|
+
const proc = (0, import_child_process24.spawn)(
|
|
27433
27496
|
"gh",
|
|
27434
27497
|
["auth", "refresh", "-h", "github.com", "-s", "repo,read:org"],
|
|
27435
27498
|
{ stdio: "inherit" }
|
|
@@ -27607,7 +27670,7 @@ var GitHubCodespacesProvider = class {
|
|
|
27607
27670
|
async streamCommand(workspaceId, command2) {
|
|
27608
27671
|
resetStdinForChild();
|
|
27609
27672
|
return new Promise((resolve7, reject) => {
|
|
27610
|
-
const proc = (0,
|
|
27673
|
+
const proc = (0, import_child_process24.spawn)(
|
|
27611
27674
|
"gh",
|
|
27612
27675
|
["codespace", "ssh", "-c", workspaceId, "--", "-tt", command2],
|
|
27613
27676
|
{ stdio: "inherit" }
|
|
@@ -27634,11 +27697,11 @@ var GitHubCodespacesProvider = class {
|
|
|
27634
27697
|
`mkdir -p ${shellQuote(remoteDir)} && tar -xzf - -C ${shellQuote(remoteDir)}`
|
|
27635
27698
|
];
|
|
27636
27699
|
await new Promise((resolve7, reject) => {
|
|
27637
|
-
const tar = (0,
|
|
27700
|
+
const tar = (0, import_child_process24.spawn)("tar", tarArgs, {
|
|
27638
27701
|
stdio: ["ignore", "pipe", "pipe"],
|
|
27639
27702
|
env: tarEnv
|
|
27640
27703
|
});
|
|
27641
|
-
const ssh = (0,
|
|
27704
|
+
const ssh = (0, import_child_process24.spawn)("gh", sshArgs, {
|
|
27642
27705
|
stdio: [tar.stdout, "pipe", "pipe"]
|
|
27643
27706
|
});
|
|
27644
27707
|
let tarErr = "";
|
|
@@ -27672,7 +27735,7 @@ var GitHubCodespacesProvider = class {
|
|
|
27672
27735
|
}
|
|
27673
27736
|
const cmd = parts.join(" && ");
|
|
27674
27737
|
await new Promise((resolve7, reject) => {
|
|
27675
|
-
const proc = (0,
|
|
27738
|
+
const proc = (0, import_child_process24.spawn)(
|
|
27676
27739
|
"gh",
|
|
27677
27740
|
["codespace", "ssh", "-c", workspaceId, "--", cmd],
|
|
27678
27741
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -27730,11 +27793,11 @@ function shellQuote(s) {
|
|
|
27730
27793
|
}
|
|
27731
27794
|
|
|
27732
27795
|
// src/services/providers/gitpod.ts
|
|
27733
|
-
var
|
|
27796
|
+
var import_child_process25 = require("child_process");
|
|
27734
27797
|
var import_util5 = require("util");
|
|
27735
27798
|
var path56 = __toESM(require("path"));
|
|
27736
27799
|
var import_picocolors10 = __toESM(require("picocolors"));
|
|
27737
|
-
var execFileP7 = (0, import_util5.promisify)(
|
|
27800
|
+
var execFileP7 = (0, import_util5.promisify)(import_child_process25.execFile);
|
|
27738
27801
|
var MAX_BUFFER2 = 8 * 1024 * 1024;
|
|
27739
27802
|
function resetStdinForChild2() {
|
|
27740
27803
|
if (process.stdin.isTTY) {
|
|
@@ -27774,7 +27837,7 @@ var GitpodProvider = class {
|
|
|
27774
27837
|
);
|
|
27775
27838
|
resetStdinForChild2();
|
|
27776
27839
|
await new Promise((resolve7, reject) => {
|
|
27777
|
-
const proc = (0,
|
|
27840
|
+
const proc = (0, import_child_process25.spawn)("gitpod", ["login"], { stdio: "inherit" });
|
|
27778
27841
|
proc.on("exit", (code) => {
|
|
27779
27842
|
if (code === 0) resolve7();
|
|
27780
27843
|
else reject(new Error("gitpod login failed."));
|
|
@@ -27926,7 +27989,7 @@ var GitpodProvider = class {
|
|
|
27926
27989
|
async streamCommand(workspaceId, command2) {
|
|
27927
27990
|
resetStdinForChild2();
|
|
27928
27991
|
return new Promise((resolve7, reject) => {
|
|
27929
|
-
const proc = (0,
|
|
27992
|
+
const proc = (0, import_child_process25.spawn)(
|
|
27930
27993
|
"gitpod",
|
|
27931
27994
|
["workspace", "ssh", workspaceId, "--", "-tt", command2],
|
|
27932
27995
|
{ stdio: "inherit" }
|
|
@@ -27946,11 +28009,11 @@ var GitpodProvider = class {
|
|
|
27946
28009
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
27947
28010
|
const remoteCmd = `mkdir -p ${shellQuote2(remoteDir)} && tar -xzf - -C ${shellQuote2(remoteDir)}`;
|
|
27948
28011
|
await new Promise((resolve7, reject) => {
|
|
27949
|
-
const tar = (0,
|
|
28012
|
+
const tar = (0, import_child_process25.spawn)("tar", tarArgs, {
|
|
27950
28013
|
stdio: ["ignore", "pipe", "pipe"],
|
|
27951
28014
|
env: tarEnv
|
|
27952
28015
|
});
|
|
27953
|
-
const ssh = (0,
|
|
28016
|
+
const ssh = (0, import_child_process25.spawn)(
|
|
27954
28017
|
"gitpod",
|
|
27955
28018
|
["workspace", "ssh", workspaceId, "--", remoteCmd],
|
|
27956
28019
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -27982,7 +28045,7 @@ var GitpodProvider = class {
|
|
|
27982
28045
|
}
|
|
27983
28046
|
const cmd = parts.join(" && ");
|
|
27984
28047
|
await new Promise((resolve7, reject) => {
|
|
27985
|
-
const proc = (0,
|
|
28048
|
+
const proc = (0, import_child_process25.spawn)(
|
|
27986
28049
|
"gitpod",
|
|
27987
28050
|
["workspace", "ssh", workspaceId, "--", cmd],
|
|
27988
28051
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -28006,10 +28069,10 @@ function shellQuote2(s) {
|
|
|
28006
28069
|
}
|
|
28007
28070
|
|
|
28008
28071
|
// src/services/providers/gitlab-workspaces.ts
|
|
28009
|
-
var
|
|
28072
|
+
var import_child_process26 = require("child_process");
|
|
28010
28073
|
var import_util6 = require("util");
|
|
28011
28074
|
var path57 = __toESM(require("path"));
|
|
28012
|
-
var execFileP8 = (0, import_util6.promisify)(
|
|
28075
|
+
var execFileP8 = (0, import_util6.promisify)(import_child_process26.execFile);
|
|
28013
28076
|
var MAX_BUFFER3 = 8 * 1024 * 1024;
|
|
28014
28077
|
var GITLAB_API_BASE = process.env.CODEAM_GITLAB_API_URL ?? "https://gitlab.com/api/v4";
|
|
28015
28078
|
function resetStdinForChild3() {
|
|
@@ -28051,7 +28114,7 @@ var GitLabWorkspacesProvider = class {
|
|
|
28051
28114
|
);
|
|
28052
28115
|
resetStdinForChild3();
|
|
28053
28116
|
await new Promise((resolve7, reject) => {
|
|
28054
|
-
const proc = (0,
|
|
28117
|
+
const proc = (0, import_child_process26.spawn)(
|
|
28055
28118
|
"glab",
|
|
28056
28119
|
["auth", "login", "--scopes", "api,read_user,read_repository"],
|
|
28057
28120
|
{ stdio: "inherit" }
|
|
@@ -28223,7 +28286,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
28223
28286
|
const sshHost = process.env.CODEAM_GITLAB_SSH_HOST ?? "workspaces.gitlab.com";
|
|
28224
28287
|
resetStdinForChild3();
|
|
28225
28288
|
return new Promise((resolve7, reject) => {
|
|
28226
|
-
const proc = (0,
|
|
28289
|
+
const proc = (0, import_child_process26.spawn)(
|
|
28227
28290
|
"ssh",
|
|
28228
28291
|
["-tt", "-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, command2],
|
|
28229
28292
|
{ stdio: "inherit" }
|
|
@@ -28244,8 +28307,8 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
28244
28307
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
28245
28308
|
const remoteCmd = `mkdir -p ${shellQuote3(remoteDir)} && tar -xzf - -C ${shellQuote3(remoteDir)}`;
|
|
28246
28309
|
await new Promise((resolve7, reject) => {
|
|
28247
|
-
const tar = (0,
|
|
28248
|
-
const ssh = (0,
|
|
28310
|
+
const tar = (0, import_child_process26.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
28311
|
+
const ssh = (0, import_child_process26.spawn)(
|
|
28249
28312
|
"ssh",
|
|
28250
28313
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, remoteCmd],
|
|
28251
28314
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -28275,7 +28338,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
28275
28338
|
}
|
|
28276
28339
|
const cmd = parts.join(" && ");
|
|
28277
28340
|
await new Promise((resolve7, reject) => {
|
|
28278
|
-
const proc = (0,
|
|
28341
|
+
const proc = (0, import_child_process26.spawn)(
|
|
28279
28342
|
"ssh",
|
|
28280
28343
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, cmd],
|
|
28281
28344
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -28334,10 +28397,10 @@ function shellQuote3(s) {
|
|
|
28334
28397
|
}
|
|
28335
28398
|
|
|
28336
28399
|
// src/services/providers/railway.ts
|
|
28337
|
-
var
|
|
28400
|
+
var import_child_process27 = require("child_process");
|
|
28338
28401
|
var import_util7 = require("util");
|
|
28339
28402
|
var path58 = __toESM(require("path"));
|
|
28340
|
-
var execFileP9 = (0, import_util7.promisify)(
|
|
28403
|
+
var execFileP9 = (0, import_util7.promisify)(import_child_process27.execFile);
|
|
28341
28404
|
var MAX_BUFFER4 = 8 * 1024 * 1024;
|
|
28342
28405
|
function resetStdinForChild4() {
|
|
28343
28406
|
if (process.stdin.isTTY) {
|
|
@@ -28378,7 +28441,7 @@ var RailwayProvider = class {
|
|
|
28378
28441
|
);
|
|
28379
28442
|
resetStdinForChild4();
|
|
28380
28443
|
await new Promise((resolve7, reject) => {
|
|
28381
|
-
const proc = (0,
|
|
28444
|
+
const proc = (0, import_child_process27.spawn)("railway", ["login"], { stdio: "inherit" });
|
|
28382
28445
|
proc.on("exit", (code) => {
|
|
28383
28446
|
if (code === 0) resolve7();
|
|
28384
28447
|
else reject(new Error("railway login failed."));
|
|
@@ -28521,7 +28584,7 @@ var RailwayProvider = class {
|
|
|
28521
28584
|
}
|
|
28522
28585
|
resetStdinForChild4();
|
|
28523
28586
|
return new Promise((resolve7, reject) => {
|
|
28524
|
-
const proc = (0,
|
|
28587
|
+
const proc = (0, import_child_process27.spawn)(
|
|
28525
28588
|
"railway",
|
|
28526
28589
|
["shell", "--project", projectId, "--service", serviceId, "--command", command2],
|
|
28527
28590
|
{ stdio: "inherit" }
|
|
@@ -28545,8 +28608,8 @@ var RailwayProvider = class {
|
|
|
28545
28608
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
28546
28609
|
const remoteCmd = `mkdir -p ${shellQuote4(remoteDir)} && tar -xzf - -C ${shellQuote4(remoteDir)}`;
|
|
28547
28610
|
await new Promise((resolve7, reject) => {
|
|
28548
|
-
const tar = (0,
|
|
28549
|
-
const sh = (0,
|
|
28611
|
+
const tar = (0, import_child_process27.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
28612
|
+
const sh = (0, import_child_process27.spawn)(
|
|
28550
28613
|
"railway",
|
|
28551
28614
|
["shell", "--project", projectId, "--service", serviceId, "--command", remoteCmd],
|
|
28552
28615
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -28579,7 +28642,7 @@ var RailwayProvider = class {
|
|
|
28579
28642
|
}
|
|
28580
28643
|
const cmd = parts.join(" && ");
|
|
28581
28644
|
await new Promise((resolve7, reject) => {
|
|
28582
|
-
const proc = (0,
|
|
28645
|
+
const proc = (0, import_child_process27.spawn)(
|
|
28583
28646
|
"railway",
|
|
28584
28647
|
["shell", "--project", projectId, "--service", serviceId, "--command", cmd],
|
|
28585
28648
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -29329,7 +29392,7 @@ function checkChokidar() {
|
|
|
29329
29392
|
}
|
|
29330
29393
|
async function doctor(args2 = []) {
|
|
29331
29394
|
const json = args2.includes("--json");
|
|
29332
|
-
const cliVersion = true ? "2.43.
|
|
29395
|
+
const cliVersion = true ? "2.43.3" : "0.0.0-dev";
|
|
29333
29396
|
const apiBase2 = resolveApiBaseUrl();
|
|
29334
29397
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
29335
29398
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -29528,7 +29591,7 @@ async function completion(args2) {
|
|
|
29528
29591
|
// src/commands/version.ts
|
|
29529
29592
|
var import_picocolors14 = __toESM(require("picocolors"));
|
|
29530
29593
|
function version2() {
|
|
29531
|
-
const v = true ? "2.43.
|
|
29594
|
+
const v = true ? "2.43.3" : "unknown";
|
|
29532
29595
|
console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
|
|
29533
29596
|
}
|
|
29534
29597
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.3",
|
|
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",
|