codeam-cli 2.61.37 → 2.61.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +169 -131
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to `codeam-cli` are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.61.38] — 2026-07-24
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **box:** Bake procps (`ps`) into the image — Beads/Dolt need it to manage the shared server
|
|
12
|
+
|
|
13
|
+
## [2.61.37] — 2026-07-24
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **box:** Agent pre-install verification is non-fatal — a flaky curl installer must not fail the build
|
|
18
|
+
|
|
7
19
|
## [2.61.35] — 2026-07-24
|
|
8
20
|
|
|
9
21
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -1453,11 +1453,11 @@ function quiet(fn) {
|
|
|
1453
1453
|
log.debug(TAG, "ignored sync error", err);
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
|
-
function rmIfExistsQuiet(
|
|
1456
|
+
function rmIfExistsQuiet(path79) {
|
|
1457
1457
|
try {
|
|
1458
|
-
fs2.rmSync(
|
|
1458
|
+
fs2.rmSync(path79, { force: true });
|
|
1459
1459
|
} catch (err) {
|
|
1460
|
-
log.debug(TAG, `rmIfExists failed for ${
|
|
1460
|
+
log.debug(TAG, `rmIfExists failed for ${path79}`, err);
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
1463
|
function killQuiet(target, signal = "SIGTERM") {
|
|
@@ -1641,8 +1641,8 @@ function createGetModuleFromFilename(basePath = process.argv[1] ? (0, import_pat
|
|
|
1641
1641
|
return decodedFile;
|
|
1642
1642
|
};
|
|
1643
1643
|
}
|
|
1644
|
-
function normalizeWindowsPath(
|
|
1645
|
-
return
|
|
1644
|
+
function normalizeWindowsPath(path79) {
|
|
1645
|
+
return path79.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
1646
1646
|
}
|
|
1647
1647
|
|
|
1648
1648
|
// ../../node_modules/@posthog/core/dist/featureFlagUtils.mjs
|
|
@@ -4122,9 +4122,9 @@ async function addSourceContext(frames) {
|
|
|
4122
4122
|
LRU_FILE_CONTENTS_CACHE.reduce();
|
|
4123
4123
|
return frames;
|
|
4124
4124
|
}
|
|
4125
|
-
function getContextLinesFromFile(
|
|
4125
|
+
function getContextLinesFromFile(path79, ranges, output) {
|
|
4126
4126
|
return new Promise((resolve8) => {
|
|
4127
|
-
const stream = (0, import_node_fs.createReadStream)(
|
|
4127
|
+
const stream = (0, import_node_fs.createReadStream)(path79);
|
|
4128
4128
|
const lineReaded = (0, import_node_readline.createInterface)({
|
|
4129
4129
|
input: stream
|
|
4130
4130
|
});
|
|
@@ -4139,7 +4139,7 @@ function getContextLinesFromFile(path78, ranges, output) {
|
|
|
4139
4139
|
let rangeStart = range[0];
|
|
4140
4140
|
let rangeEnd = range[1];
|
|
4141
4141
|
function onStreamError() {
|
|
4142
|
-
LRU_FILE_CONTENTS_FS_READ_FAILED.set(
|
|
4142
|
+
LRU_FILE_CONTENTS_FS_READ_FAILED.set(path79, 1);
|
|
4143
4143
|
lineReaded.close();
|
|
4144
4144
|
lineReaded.removeAllListeners();
|
|
4145
4145
|
destroyStreamAndResolve();
|
|
@@ -4200,8 +4200,8 @@ function clearLineContext(frame) {
|
|
|
4200
4200
|
delete frame.context_line;
|
|
4201
4201
|
delete frame.post_context;
|
|
4202
4202
|
}
|
|
4203
|
-
function shouldSkipContextLinesForFile(
|
|
4204
|
-
return
|
|
4203
|
+
function shouldSkipContextLinesForFile(path79) {
|
|
4204
|
+
return path79.startsWith("node:") || path79.endsWith(".min.js") || path79.endsWith(".min.cjs") || path79.endsWith(".min.mjs") || path79.startsWith("data:");
|
|
4205
4205
|
}
|
|
4206
4206
|
function shouldSkipContextLinesForFrame(frame) {
|
|
4207
4207
|
if (void 0 !== frame.lineno && frame.lineno > MAX_CONTEXTLINES_LINENO) return true;
|
|
@@ -6355,7 +6355,7 @@ function readAnonId() {
|
|
|
6355
6355
|
}
|
|
6356
6356
|
function superProperties() {
|
|
6357
6357
|
return {
|
|
6358
|
-
cliVersion: true ? "2.61.
|
|
6358
|
+
cliVersion: true ? "2.61.39" : "0.0.0-dev",
|
|
6359
6359
|
nodeVersion: process.version,
|
|
6360
6360
|
platform: process.platform,
|
|
6361
6361
|
arch: process.arch,
|
|
@@ -6536,7 +6536,7 @@ var os4 = __toESM(require("os"));
|
|
|
6536
6536
|
// package.json
|
|
6537
6537
|
var package_default = {
|
|
6538
6538
|
name: "codeam-cli",
|
|
6539
|
-
version: "2.61.
|
|
6539
|
+
version: "2.61.39",
|
|
6540
6540
|
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.",
|
|
6541
6541
|
type: "commonjs",
|
|
6542
6542
|
main: "dist/index.js",
|
|
@@ -7707,7 +7707,7 @@ var CommandRelayService = class _CommandRelayService {
|
|
|
7707
7707
|
// fresh + clear the "CLI update available" banner after a self-update
|
|
7708
7708
|
// (a codespace that reinstalls @latest reconnects via heartbeat, not
|
|
7709
7709
|
// pair/reconnect). Older backends ignore the extra field.
|
|
7710
|
-
..."2.61.
|
|
7710
|
+
..."2.61.39" ? { ideVersion: "2.61.39" } : {}
|
|
7711
7711
|
}).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
|
|
7712
7712
|
}
|
|
7713
7713
|
/**
|
|
@@ -7934,10 +7934,10 @@ var WINDOWS_LEGACY_JUNCTIONS = [
|
|
|
7934
7934
|
/[\\/]Start Menu([\\/]|$)/i,
|
|
7935
7935
|
/[\\/]Templates([\\/]|$)/i
|
|
7936
7936
|
];
|
|
7937
|
-
function isUnsafeWindowsWatchRoot(dir,
|
|
7937
|
+
function isUnsafeWindowsWatchRoot(dir, homedir46) {
|
|
7938
7938
|
const norm = (p2) => p2.replace(/\//g, "\\").replace(/\\+$/, "").toLowerCase();
|
|
7939
7939
|
const cwd = norm(dir);
|
|
7940
|
-
const home = norm(
|
|
7940
|
+
const home = norm(homedir46);
|
|
7941
7941
|
if (cwd === home) return true;
|
|
7942
7942
|
if (/^[a-z]:$/.test(cwd)) return true;
|
|
7943
7943
|
const sysRoots = [
|
|
@@ -12563,10 +12563,10 @@ function buildForPlatform(platform3) {
|
|
|
12563
12563
|
var import_node_crypto4 = require("crypto");
|
|
12564
12564
|
|
|
12565
12565
|
// src/agents/claude/resolver.ts
|
|
12566
|
-
function buildClaudeLaunch(extraArgs = [],
|
|
12567
|
-
const found =
|
|
12566
|
+
function buildClaudeLaunch(extraArgs = [], os59 = createOsStrategy()) {
|
|
12567
|
+
const found = os59.findInPath("claude") ?? os59.findInPath("claude-code");
|
|
12568
12568
|
if (!found) return null;
|
|
12569
|
-
return
|
|
12569
|
+
return os59.buildLaunch(found, extraArgs);
|
|
12570
12570
|
}
|
|
12571
12571
|
|
|
12572
12572
|
// src/agents/claude/installer.ts
|
|
@@ -13156,8 +13156,8 @@ var ClaudeRuntimeStrategy = class {
|
|
|
13156
13156
|
meta = getAgent("claude");
|
|
13157
13157
|
mode = "interactive";
|
|
13158
13158
|
os;
|
|
13159
|
-
constructor(
|
|
13160
|
-
this.os =
|
|
13159
|
+
constructor(os59) {
|
|
13160
|
+
this.os = os59;
|
|
13161
13161
|
}
|
|
13162
13162
|
/**
|
|
13163
13163
|
* Claude Code's react-ink TUI enables bracketed-paste mode at
|
|
@@ -13937,8 +13937,8 @@ function codexCredentialLocator() {
|
|
|
13937
13937
|
function codexLoginLauncher() {
|
|
13938
13938
|
return {
|
|
13939
13939
|
async ensureInstalled() {
|
|
13940
|
-
const
|
|
13941
|
-
return
|
|
13940
|
+
const os59 = createOsStrategy();
|
|
13941
|
+
return os59.findInPath("codex") !== null;
|
|
13942
13942
|
},
|
|
13943
13943
|
launch() {
|
|
13944
13944
|
return (0, import_node_child_process4.spawn)("codex", ["login"], { stdio: "inherit" });
|
|
@@ -13961,8 +13961,8 @@ var CodexRuntimeStrategy = class {
|
|
|
13961
13961
|
meta = getAgent("codex");
|
|
13962
13962
|
mode = "interactive";
|
|
13963
13963
|
os;
|
|
13964
|
-
constructor(
|
|
13965
|
-
this.os =
|
|
13964
|
+
constructor(os59) {
|
|
13965
|
+
this.os = os59;
|
|
13966
13966
|
}
|
|
13967
13967
|
async prepareLaunch() {
|
|
13968
13968
|
let binary = this.os.findInPath("codex");
|
|
@@ -14071,12 +14071,12 @@ var CodexRuntimeStrategy = class {
|
|
|
14071
14071
|
});
|
|
14072
14072
|
}
|
|
14073
14073
|
};
|
|
14074
|
-
function resolveNpm(
|
|
14075
|
-
return
|
|
14074
|
+
function resolveNpm(os59) {
|
|
14075
|
+
return os59.id === "win32" ? "npm.cmd" : "npm";
|
|
14076
14076
|
}
|
|
14077
|
-
async function installCodexViaNpm(
|
|
14077
|
+
async function installCodexViaNpm(os59) {
|
|
14078
14078
|
return new Promise((resolve8, reject) => {
|
|
14079
|
-
const proc = (0, import_node_child_process5.spawn)(resolveNpm(
|
|
14079
|
+
const proc = (0, import_node_child_process5.spawn)(resolveNpm(os59), ["install", "-g", "@openai/codex"], {
|
|
14080
14080
|
stdio: "inherit"
|
|
14081
14081
|
});
|
|
14082
14082
|
proc.on("close", (code) => {
|
|
@@ -14093,16 +14093,16 @@ async function installCodexViaNpm(os58) {
|
|
|
14093
14093
|
});
|
|
14094
14094
|
});
|
|
14095
14095
|
}
|
|
14096
|
-
function augmentNpmGlobalBin(
|
|
14096
|
+
function augmentNpmGlobalBin(os59) {
|
|
14097
14097
|
try {
|
|
14098
|
-
const result = (0, import_node_child_process5.spawnSync)(resolveNpm(
|
|
14098
|
+
const result = (0, import_node_child_process5.spawnSync)(resolveNpm(os59), ["prefix", "-g"], {
|
|
14099
14099
|
stdio: ["ignore", "pipe", "ignore"]
|
|
14100
14100
|
});
|
|
14101
14101
|
if (result.status !== 0) return;
|
|
14102
14102
|
const prefix = result.stdout.toString().trim();
|
|
14103
14103
|
if (!prefix) return;
|
|
14104
|
-
const binDir =
|
|
14105
|
-
|
|
14104
|
+
const binDir = os59.id === "win32" ? prefix : path24.join(prefix, "bin");
|
|
14105
|
+
os59.augmentPath([binDir]);
|
|
14106
14106
|
} catch {
|
|
14107
14107
|
}
|
|
14108
14108
|
}
|
|
@@ -14186,9 +14186,9 @@ var import_node_child_process8 = require("child_process");
|
|
|
14186
14186
|
// src/agents/coderabbit/installer.ts
|
|
14187
14187
|
var import_node_child_process6 = require("child_process");
|
|
14188
14188
|
var INSTALL_URL = "https://cli.coderabbit.ai/install.sh";
|
|
14189
|
-
async function ensureCoderabbitInstalled(
|
|
14190
|
-
if (
|
|
14191
|
-
if (
|
|
14189
|
+
async function ensureCoderabbitInstalled(os59) {
|
|
14190
|
+
if (os59.findInPath("coderabbit")) return true;
|
|
14191
|
+
if (os59.id === "win32") {
|
|
14192
14192
|
console.error(
|
|
14193
14193
|
"\n \u2717 CodeRabbit on Windows requires WSL.\n Install the CLI inside your WSL distribution\n (curl -fsSL https://cli.coderabbit.ai/install.sh | sh)\n then re-run `codeam link coderabbit` from WSL.\n"
|
|
14194
14194
|
);
|
|
@@ -14221,8 +14221,8 @@ async function ensureCoderabbitInstalled(os58) {
|
|
|
14221
14221
|
proc.on("error", () => finish(false));
|
|
14222
14222
|
});
|
|
14223
14223
|
if (!ok) return false;
|
|
14224
|
-
|
|
14225
|
-
return
|
|
14224
|
+
os59.augmentPath([`${os59.homeDir()}/.local/bin`, "/opt/homebrew/bin"]);
|
|
14225
|
+
return os59.findInPath("coderabbit") !== null;
|
|
14226
14226
|
}
|
|
14227
14227
|
|
|
14228
14228
|
// src/agents/coderabbit/link.ts
|
|
@@ -14257,10 +14257,10 @@ function coderabbitCredentialLocator() {
|
|
|
14257
14257
|
validate: validateNonEmptyCredential
|
|
14258
14258
|
};
|
|
14259
14259
|
}
|
|
14260
|
-
function coderabbitLoginLauncher(
|
|
14260
|
+
function coderabbitLoginLauncher(os59) {
|
|
14261
14261
|
return {
|
|
14262
14262
|
async ensureInstalled() {
|
|
14263
|
-
return ensureCoderabbitInstalled(
|
|
14263
|
+
return ensureCoderabbitInstalled(os59);
|
|
14264
14264
|
},
|
|
14265
14265
|
launch() {
|
|
14266
14266
|
return (0, import_node_child_process7.spawn)("coderabbit", ["auth", "login"], { stdio: "inherit" });
|
|
@@ -14316,8 +14316,8 @@ function pickLine(obj) {
|
|
|
14316
14316
|
function toHunk(raw, groupSeverity) {
|
|
14317
14317
|
if (!raw || typeof raw !== "object") return null;
|
|
14318
14318
|
const o = raw;
|
|
14319
|
-
const
|
|
14320
|
-
if (!
|
|
14319
|
+
const path79 = asString(pick(o, ["file_path", "filePath", "file", "path", "filename", "fileName"])) ?? asString(pick(o, ["location"])?.path);
|
|
14320
|
+
if (!path79) return null;
|
|
14321
14321
|
const message = asString(
|
|
14322
14322
|
pick(o, [
|
|
14323
14323
|
"comment",
|
|
@@ -14334,7 +14334,7 @@ function toHunk(raw, groupSeverity) {
|
|
|
14334
14334
|
const severity = normSeverity(pick(o, ["severity", "level", "priority", "impact"])) ?? normSeverity(groupSeverity);
|
|
14335
14335
|
const locObj = pick(o, ["location"]) ?? o;
|
|
14336
14336
|
return {
|
|
14337
|
-
path:
|
|
14337
|
+
path: path79.trim(),
|
|
14338
14338
|
line: pickLine(o) ?? pickLine(locObj),
|
|
14339
14339
|
severity,
|
|
14340
14340
|
message: (title && message ? `${title}: ${message}` : title || message).trim() || "(no message)"
|
|
@@ -14417,10 +14417,10 @@ function parsePlain(stdout) {
|
|
|
14417
14417
|
for (const line of stdout.split(/\r?\n/)) {
|
|
14418
14418
|
const m = line.match(HUNK_LINE_RE);
|
|
14419
14419
|
if (!m) continue;
|
|
14420
|
-
const [,
|
|
14421
|
-
if (!
|
|
14420
|
+
const [, path79, lineNo, sevToken, message] = m;
|
|
14421
|
+
if (!path79 || !lineNo || !message) continue;
|
|
14422
14422
|
hunks.push({
|
|
14423
|
-
path:
|
|
14423
|
+
path: path79.trim(),
|
|
14424
14424
|
line: Number(lineNo),
|
|
14425
14425
|
severity: sevToken ? SEVERITY_MAP[sevToken.toLowerCase()] : void 0,
|
|
14426
14426
|
message: message.trim().replace(/^[*-]\s+/, "")
|
|
@@ -14480,8 +14480,8 @@ var CoderabbitRuntimeStrategy = class {
|
|
|
14480
14480
|
meta = getAgent("coderabbit");
|
|
14481
14481
|
mode = "batch";
|
|
14482
14482
|
os;
|
|
14483
|
-
constructor(
|
|
14484
|
-
this.os =
|
|
14483
|
+
constructor(os59) {
|
|
14484
|
+
this.os = os59;
|
|
14485
14485
|
}
|
|
14486
14486
|
getDefaultArgs() {
|
|
14487
14487
|
return ["review", "--agent"];
|
|
@@ -14752,10 +14752,10 @@ function cursorCredentialLocator() {
|
|
|
14752
14752
|
validate: validateNonEmptyCredential
|
|
14753
14753
|
};
|
|
14754
14754
|
}
|
|
14755
|
-
function cursorLoginLauncher(
|
|
14755
|
+
function cursorLoginLauncher(os59) {
|
|
14756
14756
|
return {
|
|
14757
14757
|
async ensureInstalled() {
|
|
14758
|
-
if (
|
|
14758
|
+
if (os59.findInPath("cursor-agent")) return true;
|
|
14759
14759
|
console.error(
|
|
14760
14760
|
"\n \u2717 cursor-agent binary not on PATH.\n Install Cursor (https://cursor.com/) and ensure the CLI\n plugin is enabled, then re-run `codeam link cursor`.\n"
|
|
14761
14761
|
);
|
|
@@ -14819,8 +14819,8 @@ var CursorRuntimeStrategy = class {
|
|
|
14819
14819
|
meta = getAgent("cursor");
|
|
14820
14820
|
mode = "interactive";
|
|
14821
14821
|
os;
|
|
14822
|
-
constructor(
|
|
14823
|
-
this.os =
|
|
14822
|
+
constructor(os59) {
|
|
14823
|
+
this.os = os59;
|
|
14824
14824
|
}
|
|
14825
14825
|
async prepareLaunch() {
|
|
14826
14826
|
const binary = this.os.findInPath("cursor-agent");
|
|
@@ -15036,10 +15036,10 @@ function aiderCredentialLocator() {
|
|
|
15036
15036
|
validate: validateNonEmptyCredential
|
|
15037
15037
|
};
|
|
15038
15038
|
}
|
|
15039
|
-
function aiderLoginLauncher(
|
|
15039
|
+
function aiderLoginLauncher(os59) {
|
|
15040
15040
|
return {
|
|
15041
15041
|
async ensureInstalled() {
|
|
15042
|
-
if (
|
|
15042
|
+
if (os59.findInPath("aider")) return true;
|
|
15043
15043
|
console.error(
|
|
15044
15044
|
"\n \u2717 aider binary not on PATH.\n Install Aider:\n pip install aider-chat\n then re-run `codeam link aider`.\n"
|
|
15045
15045
|
);
|
|
@@ -15049,7 +15049,7 @@ function aiderLoginLauncher(os58) {
|
|
|
15049
15049
|
console.error(
|
|
15050
15050
|
"\n Aider has no interactive login flow.\n Set ANTHROPIC_API_KEY or OPENAI_API_KEY in your shell,\n or re-run `codeam link aider --api-key=<your-key>`.\n"
|
|
15051
15051
|
);
|
|
15052
|
-
return (0, import_node_child_process11.spawn)(
|
|
15052
|
+
return (0, import_node_child_process11.spawn)(os59.id === "win32" ? "cmd.exe" : "sh", os59.id === "win32" ? ["/c", "exit", "0"] : ["-c", "exit 0"], {
|
|
15053
15053
|
stdio: "ignore"
|
|
15054
15054
|
});
|
|
15055
15055
|
}
|
|
@@ -15121,8 +15121,8 @@ var AiderRuntimeStrategy = class {
|
|
|
15121
15121
|
meta = getAgent("aider");
|
|
15122
15122
|
mode = "interactive";
|
|
15123
15123
|
os;
|
|
15124
|
-
constructor(
|
|
15125
|
-
this.os =
|
|
15124
|
+
constructor(os59) {
|
|
15125
|
+
this.os = os59;
|
|
15126
15126
|
}
|
|
15127
15127
|
async prepareLaunch() {
|
|
15128
15128
|
const binary = this.os.findInPath("aider");
|
|
@@ -15254,8 +15254,8 @@ function geminiCredentialLocator() {
|
|
|
15254
15254
|
function geminiLoginLauncher() {
|
|
15255
15255
|
return {
|
|
15256
15256
|
async ensureInstalled() {
|
|
15257
|
-
const
|
|
15258
|
-
return
|
|
15257
|
+
const os59 = createOsStrategy();
|
|
15258
|
+
return os59.findInPath("gemini") !== null;
|
|
15259
15259
|
},
|
|
15260
15260
|
launch() {
|
|
15261
15261
|
return (0, import_node_child_process12.spawn)("gemini", ["auth", "login"], { stdio: "inherit" });
|
|
@@ -15445,8 +15445,8 @@ var GeminiRuntimeStrategy = class {
|
|
|
15445
15445
|
meta = getAgent("gemini");
|
|
15446
15446
|
mode = "interactive";
|
|
15447
15447
|
os;
|
|
15448
|
-
constructor(
|
|
15449
|
-
this.os =
|
|
15448
|
+
constructor(os59) {
|
|
15449
|
+
this.os = os59;
|
|
15450
15450
|
}
|
|
15451
15451
|
async prepareLaunch() {
|
|
15452
15452
|
const binary = this.os.findInPath("gemini");
|
|
@@ -15737,8 +15737,8 @@ var KimiRuntimeStrategy = class {
|
|
|
15737
15737
|
meta = getAgent("kimi");
|
|
15738
15738
|
mode = "interactive";
|
|
15739
15739
|
os;
|
|
15740
|
-
constructor(
|
|
15741
|
-
this.os =
|
|
15740
|
+
constructor(os59) {
|
|
15741
|
+
this.os = os59;
|
|
15742
15742
|
}
|
|
15743
15743
|
async prepareLaunch() {
|
|
15744
15744
|
const binary = this.os.findInPath("kimi");
|
|
@@ -15851,19 +15851,19 @@ var KimiRuntimeStrategy = class {
|
|
|
15851
15851
|
|
|
15852
15852
|
// src/agents/registry.ts
|
|
15853
15853
|
var runtimeBuilders = {
|
|
15854
|
-
claude: (
|
|
15855
|
-
codex: (
|
|
15856
|
-
coderabbit: (
|
|
15857
|
-
cursor: (
|
|
15858
|
-
aider: (
|
|
15859
|
-
gemini: (
|
|
15860
|
-
kimi: (
|
|
15854
|
+
claude: (os59) => new ClaudeRuntimeStrategy(os59),
|
|
15855
|
+
codex: (os59) => new CodexRuntimeStrategy(os59),
|
|
15856
|
+
coderabbit: (os59) => new CoderabbitRuntimeStrategy(os59),
|
|
15857
|
+
cursor: (os59) => new CursorRuntimeStrategy(os59),
|
|
15858
|
+
aider: (os59) => new AiderRuntimeStrategy(os59),
|
|
15859
|
+
gemini: (os59) => new GeminiRuntimeStrategy(os59),
|
|
15860
|
+
kimi: (os59) => new KimiRuntimeStrategy(os59)
|
|
15861
15861
|
};
|
|
15862
15862
|
var deployBuilders = {
|
|
15863
15863
|
claude: () => new ClaudeDeployStrategy(),
|
|
15864
15864
|
codex: () => new CodexDeployStrategy()
|
|
15865
15865
|
};
|
|
15866
|
-
function createAgentStrategy(agent,
|
|
15866
|
+
function createAgentStrategy(agent, os59 = createOsStrategy()) {
|
|
15867
15867
|
if (!AGENT_REGISTRY[agent]?.enabled) {
|
|
15868
15868
|
throw new Error(
|
|
15869
15869
|
`Agent "${agent}" is not supported in this codeam-cli version. Upgrade with 'npm i -g codeam-cli@latest'.`
|
|
@@ -15873,10 +15873,10 @@ function createAgentStrategy(agent, os58 = createOsStrategy()) {
|
|
|
15873
15873
|
if (!build) {
|
|
15874
15874
|
throw new Error(`No runtime strategy registered for agent "${agent}"`);
|
|
15875
15875
|
}
|
|
15876
|
-
return build(
|
|
15876
|
+
return build(os59);
|
|
15877
15877
|
}
|
|
15878
|
-
function createInteractiveAgentStrategy(agent,
|
|
15879
|
-
const s = createAgentStrategy(agent,
|
|
15878
|
+
function createInteractiveAgentStrategy(agent, os59 = createOsStrategy()) {
|
|
15879
|
+
const s = createAgentStrategy(agent, os59);
|
|
15880
15880
|
if (s.mode !== "interactive") {
|
|
15881
15881
|
throw new Error(
|
|
15882
15882
|
`Agent "${agent}" is a batch agent; use createAgentStrategy + .runOneShot for one-shot reviews.`
|
|
@@ -16573,26 +16573,26 @@ function restoreCoderabbitOauthBlob(value) {
|
|
|
16573
16573
|
(0, import_node_fs5.writeFileSync)(path36.join(dir, file), contents, { mode: 384 });
|
|
16574
16574
|
}
|
|
16575
16575
|
async function configureCoderabbit(input, deps = {}) {
|
|
16576
|
-
const
|
|
16576
|
+
const os59 = deps.os ?? createOsStrategy();
|
|
16577
16577
|
const ensureInstalled = deps.ensureInstalled ?? ensureCoderabbitInstalled;
|
|
16578
16578
|
const isLoggedIn = deps.isLoggedIn ?? defaultIsLoggedIn;
|
|
16579
16579
|
const runOAuth = deps.runOAuthLogin ?? runCoderabbitOAuthLogin;
|
|
16580
16580
|
const snapshot = deps.snapshotDir ?? (() => snapshotCredentialDir());
|
|
16581
16581
|
const capture2 = deps.captureCredential ?? ((b) => diffCapturedCredential(b));
|
|
16582
16582
|
const loginWithApiKey = deps.loginWithApiKey ?? defaultLoginWithApiKey;
|
|
16583
|
-
const home =
|
|
16584
|
-
|
|
16585
|
-
|
|
16583
|
+
const home = os59.homeDir();
|
|
16584
|
+
os59.augmentPath(
|
|
16585
|
+
os59.id === "win32" ? [
|
|
16586
16586
|
path36.join(home, ".local", "bin"),
|
|
16587
16587
|
path36.join(process.env.APPDATA ?? path36.join(home, "AppData", "Roaming"), "npm"),
|
|
16588
16588
|
path36.join(home, "scoop", "shims")
|
|
16589
16589
|
] : [path36.join(home, ".local", "bin"), "/opt/homebrew/bin", "/usr/local/bin"]
|
|
16590
16590
|
);
|
|
16591
|
-
const installed2 =
|
|
16591
|
+
const installed2 = os59.findInPath("coderabbit") !== null;
|
|
16592
16592
|
const base = () => ({
|
|
16593
16593
|
action: input.action,
|
|
16594
16594
|
supported: true,
|
|
16595
|
-
installed:
|
|
16595
|
+
installed: os59.findInPath("coderabbit") !== null,
|
|
16596
16596
|
loggedIn: false
|
|
16597
16597
|
});
|
|
16598
16598
|
if (input.action === "status") {
|
|
@@ -16606,7 +16606,7 @@ async function configureCoderabbit(input, deps = {}) {
|
|
|
16606
16606
|
const key = (input.apiKey ?? "").trim();
|
|
16607
16607
|
if (!key) return { ...res2, error: "No API key provided" };
|
|
16608
16608
|
if (!res2.installed) {
|
|
16609
|
-
const ok = await ensureInstalled(
|
|
16609
|
+
const ok = await ensureInstalled(os59);
|
|
16610
16610
|
res2.installed = ok;
|
|
16611
16611
|
if (!ok) return { ...res2, error: "CodeRabbit CLI could not be installed" };
|
|
16612
16612
|
}
|
|
@@ -16630,7 +16630,7 @@ async function configureCoderabbit(input, deps = {}) {
|
|
|
16630
16630
|
}
|
|
16631
16631
|
if (!res2.installed) {
|
|
16632
16632
|
deps.onEvent?.({ kind: "installing" });
|
|
16633
|
-
const ok = await ensureInstalled(
|
|
16633
|
+
const ok = await ensureInstalled(os59);
|
|
16634
16634
|
res2.installed = ok;
|
|
16635
16635
|
if (!ok) return { ...res2, error: "CodeRabbit CLI could not be installed" };
|
|
16636
16636
|
}
|
|
@@ -16660,7 +16660,7 @@ async function configureCoderabbit(input, deps = {}) {
|
|
|
16660
16660
|
const res2 = base();
|
|
16661
16661
|
if (!installed2) {
|
|
16662
16662
|
deps.onEvent?.({ kind: "installing" });
|
|
16663
|
-
const ok = await ensureInstalled(
|
|
16663
|
+
const ok = await ensureInstalled(os59);
|
|
16664
16664
|
res2.installed = ok;
|
|
16665
16665
|
if (!ok) return { ...res2, error: "CodeRabbit CLI could not be installed" };
|
|
16666
16666
|
}
|
|
@@ -16700,7 +16700,7 @@ async function configureCoderabbit(input, deps = {}) {
|
|
|
16700
16700
|
}
|
|
16701
16701
|
const res = base();
|
|
16702
16702
|
if (!res.installed) {
|
|
16703
|
-
const ok = await ensureInstalled(
|
|
16703
|
+
const ok = await ensureInstalled(os59);
|
|
16704
16704
|
res.installed = ok;
|
|
16705
16705
|
if (!ok) return { ...res, error: "CodeRabbit CLI is not installed" };
|
|
16706
16706
|
}
|
|
@@ -18691,7 +18691,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
18691
18691
|
if (process.env.NODE_ENV === "test") return;
|
|
18692
18692
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
18693
18693
|
if (process.env.CI) return;
|
|
18694
|
-
const current = true ? "2.61.
|
|
18694
|
+
const current = true ? "2.61.39" : null;
|
|
18695
18695
|
if (!current) return;
|
|
18696
18696
|
const cache = readCache();
|
|
18697
18697
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -18708,7 +18708,7 @@ function checkForUpdates() {
|
|
|
18708
18708
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
18709
18709
|
if (process.env.CI) return;
|
|
18710
18710
|
if (!process.stdout.isTTY) return;
|
|
18711
|
-
const current = true ? "2.61.
|
|
18711
|
+
const current = true ? "2.61.39" : null;
|
|
18712
18712
|
if (!current) return;
|
|
18713
18713
|
const cache = readCache();
|
|
18714
18714
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -18728,7 +18728,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
|
|
|
18728
18728
|
var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
|
|
18729
18729
|
var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
|
|
18730
18730
|
function currentCliVersion() {
|
|
18731
|
-
return true ? "2.61.
|
|
18731
|
+
return true ? "2.61.39" : null;
|
|
18732
18732
|
}
|
|
18733
18733
|
function runCmd(cmd, args2, timeoutMs) {
|
|
18734
18734
|
return new Promise((resolve8) => {
|
|
@@ -21730,11 +21730,11 @@ function resolveDoltInstallStrategy(platform3) {
|
|
|
21730
21730
|
}
|
|
21731
21731
|
var DOLT_RELEASE_BASE = "https://github.com/dolthub/dolt/releases/latest/download";
|
|
21732
21732
|
function doltPlatformTuple(platform3, arch2) {
|
|
21733
|
-
const
|
|
21733
|
+
const os59 = platform3 === "win32" ? "windows" : platform3 === "darwin" ? "darwin" : "linux";
|
|
21734
21734
|
const a = arch2 === "x64" ? "amd64" : arch2 === "arm64" ? "arm64" : null;
|
|
21735
21735
|
if (!a) return null;
|
|
21736
|
-
if (
|
|
21737
|
-
return `${
|
|
21736
|
+
if (os59 === "windows" && a !== "amd64") return null;
|
|
21737
|
+
return `${os59}-${a}`;
|
|
21738
21738
|
}
|
|
21739
21739
|
function resolveDoltTarballStrategy(targetDir, platform3, arch2) {
|
|
21740
21740
|
const tuple = doltPlatformTuple(platform3, arch2);
|
|
@@ -23459,7 +23459,7 @@ var vcsAgentReviewH = async (ctx, cmd, parsed) => {
|
|
|
23459
23459
|
});
|
|
23460
23460
|
const token = ctx.pluginAuthToken;
|
|
23461
23461
|
void (async () => {
|
|
23462
|
-
const
|
|
23462
|
+
const os59 = createOsStrategy();
|
|
23463
23463
|
try {
|
|
23464
23464
|
const report = await reviewPullRequest(
|
|
23465
23465
|
{
|
|
@@ -23468,7 +23468,7 @@ var vcsAgentReviewH = async (ctx, cmd, parsed) => {
|
|
|
23468
23468
|
baseBranch: parsed.baseBranch
|
|
23469
23469
|
},
|
|
23470
23470
|
{
|
|
23471
|
-
runReview: (input) => new CoderabbitRuntimeStrategy(
|
|
23471
|
+
runReview: (input) => new CoderabbitRuntimeStrategy(os59).runOneShot(input),
|
|
23472
23472
|
runGh: (args2) => defaultRunGh(args2),
|
|
23473
23473
|
postReport: async (r) => {
|
|
23474
23474
|
if (!token) return;
|
|
@@ -24494,11 +24494,11 @@ function resolveTokenValue(args2) {
|
|
|
24494
24494
|
}
|
|
24495
24495
|
const fileFlag = args2.find((a) => a.startsWith("--token-file="));
|
|
24496
24496
|
if (fileFlag) {
|
|
24497
|
-
const
|
|
24497
|
+
const path79 = fileFlag.slice("--token-file=".length);
|
|
24498
24498
|
try {
|
|
24499
|
-
const content = fs58.readFileSync(
|
|
24500
|
-
if (content.length === 0) fail(`--token-file ${
|
|
24501
|
-
rmIfExistsQuiet(
|
|
24499
|
+
const content = fs58.readFileSync(path79, "utf8").trim();
|
|
24500
|
+
if (content.length === 0) fail(`--token-file ${path79} is empty`);
|
|
24501
|
+
rmIfExistsQuiet(path79);
|
|
24502
24502
|
return content;
|
|
24503
24503
|
} catch (err) {
|
|
24504
24504
|
fail(`Could not read --token-file: ${err.message}`);
|
|
@@ -31989,7 +31989,7 @@ function defaultRunGit(cwd, args2) {
|
|
|
31989
31989
|
});
|
|
31990
31990
|
}
|
|
31991
31991
|
async function discoverRepos(workingDir, maxDepth = 4) {
|
|
31992
|
-
const
|
|
31992
|
+
const fs70 = await import("fs/promises");
|
|
31993
31993
|
const out2 = [];
|
|
31994
31994
|
await walk(workingDir, 0);
|
|
31995
31995
|
return out2;
|
|
@@ -31997,7 +31997,7 @@ async function discoverRepos(workingDir, maxDepth = 4) {
|
|
|
31997
31997
|
if (depth > maxDepth) return;
|
|
31998
31998
|
let entries = [];
|
|
31999
31999
|
try {
|
|
32000
|
-
const dirents = await
|
|
32000
|
+
const dirents = await fs70.readdir(dir, { withFileTypes: true });
|
|
32001
32001
|
entries = dirents.filter((d3) => !d3.name.startsWith(".") || d3.name === ".git").map((d3) => ({ name: d3.name, isDirectory: d3.isDirectory() }));
|
|
32002
32002
|
} catch {
|
|
32003
32003
|
return;
|
|
@@ -35099,6 +35099,43 @@ function fetchQuotaUsage(runtime, historySvc) {
|
|
|
35099
35099
|
});
|
|
35100
35100
|
}
|
|
35101
35101
|
|
|
35102
|
+
// src/beads/workflow-hint.ts
|
|
35103
|
+
var fs66 = __toESM(require("fs"));
|
|
35104
|
+
var path71 = __toESM(require("path"));
|
|
35105
|
+
var os54 = __toESM(require("os"));
|
|
35106
|
+
var BEADS_HINT_MARKER = "<!-- codeam:beads-workflow -->";
|
|
35107
|
+
var BEADS_HINT = `${BEADS_HINT_MARKER}
|
|
35108
|
+
# Beads (bd) \u2014 task tracking + persistent memory (ALWAYS use it)
|
|
35109
|
+
|
|
35110
|
+
This environment uses **bd (beads)** for issue/task tracking and persistent memory.
|
|
35111
|
+
|
|
35112
|
+
- Use \`bd\` for ALL task tracking \u2014 do NOT use TodoWrite or markdown TODO lists.
|
|
35113
|
+
- Run \`bd prime\` for the full workflow context + project memories. On a fresh
|
|
35114
|
+
session beads may still be provisioning for a few seconds \u2014 if \`bd prime\` comes
|
|
35115
|
+
back empty, retry it shortly; it works once the shared server is up.
|
|
35116
|
+
- \`bd ready\` (available work) \xB7 \`bd show <id>\` \xB7 \`bd update <id> --claim\` \xB7 \`bd close <id>\`.
|
|
35117
|
+
- Use \`bd remember "..."\` for persistent knowledge \u2014 do NOT use MEMORY.md files.
|
|
35118
|
+
${BEADS_HINT_MARKER}`;
|
|
35119
|
+
function ensureBeadsWorkflowHint(homeDir2 = os54.homedir()) {
|
|
35120
|
+
try {
|
|
35121
|
+
const file = path71.join(homeDir2, ".claude", "CLAUDE.md");
|
|
35122
|
+
let existing = "";
|
|
35123
|
+
try {
|
|
35124
|
+
existing = fs66.readFileSync(file, "utf8");
|
|
35125
|
+
} catch {
|
|
35126
|
+
}
|
|
35127
|
+
if (existing.includes(BEADS_HINT_MARKER)) return;
|
|
35128
|
+
fs66.mkdirSync(path71.dirname(file), { recursive: true });
|
|
35129
|
+
const next = existing.trim() ? `${existing.trimEnd()}
|
|
35130
|
+
|
|
35131
|
+
${BEADS_HINT}
|
|
35132
|
+
` : `${BEADS_HINT}
|
|
35133
|
+
`;
|
|
35134
|
+
fs66.writeFileSync(file, next);
|
|
35135
|
+
} catch {
|
|
35136
|
+
}
|
|
35137
|
+
}
|
|
35138
|
+
|
|
35102
35139
|
// src/integrations/provision.ts
|
|
35103
35140
|
function buildMcpServersForStart(ctx) {
|
|
35104
35141
|
const manifest = readIntegrationsManifest();
|
|
@@ -35503,7 +35540,7 @@ var AcpDriver = class {
|
|
|
35503
35540
|
};
|
|
35504
35541
|
|
|
35505
35542
|
// src/baton/transcript-mirror.ts
|
|
35506
|
-
var
|
|
35543
|
+
var fs67 = __toESM(require("fs"));
|
|
35507
35544
|
var TranscriptMirror = class {
|
|
35508
35545
|
constructor(deps) {
|
|
35509
35546
|
this.deps = deps;
|
|
@@ -35570,7 +35607,7 @@ var TranscriptMirror = class {
|
|
|
35570
35607
|
}
|
|
35571
35608
|
};
|
|
35572
35609
|
function defaultWatch(file, onChange) {
|
|
35573
|
-
const w3 =
|
|
35610
|
+
const w3 = fs67.watch(file, { persistent: false }, () => onChange());
|
|
35574
35611
|
return () => w3.close();
|
|
35575
35612
|
}
|
|
35576
35613
|
|
|
@@ -35832,16 +35869,16 @@ function toEpochMs(ts) {
|
|
|
35832
35869
|
}
|
|
35833
35870
|
|
|
35834
35871
|
// src/agents/claude/onboarding.ts
|
|
35835
|
-
var
|
|
35836
|
-
var
|
|
35837
|
-
var
|
|
35872
|
+
var fs68 = __toESM(require("fs"));
|
|
35873
|
+
var os56 = __toESM(require("os"));
|
|
35874
|
+
var path72 = __toESM(require("path"));
|
|
35838
35875
|
var ONBOARDING_VERSION_SENTINEL = "9999.0.0";
|
|
35839
35876
|
function ensureClaudeOnboarded(cwd) {
|
|
35840
35877
|
try {
|
|
35841
|
-
const file =
|
|
35878
|
+
const file = path72.join(os56.homedir(), ".claude.json");
|
|
35842
35879
|
let config = {};
|
|
35843
35880
|
try {
|
|
35844
|
-
config = JSON.parse(
|
|
35881
|
+
config = JSON.parse(fs68.readFileSync(file, "utf8"));
|
|
35845
35882
|
} catch {
|
|
35846
35883
|
}
|
|
35847
35884
|
let changed = false;
|
|
@@ -35866,8 +35903,8 @@ function ensureClaudeOnboarded(cwd) {
|
|
|
35866
35903
|
}
|
|
35867
35904
|
}
|
|
35868
35905
|
if (!changed) return;
|
|
35869
|
-
|
|
35870
|
-
|
|
35906
|
+
fs68.mkdirSync(path72.dirname(file), { recursive: true });
|
|
35907
|
+
fs68.writeFileSync(file, JSON.stringify(config, null, 2));
|
|
35871
35908
|
log.info(
|
|
35872
35909
|
"claude",
|
|
35873
35910
|
`pre-completed Claude onboarding${cwd ? ` + trusted workspace ${cwd}` : ""}`
|
|
@@ -35960,6 +35997,7 @@ async function start(requestedAgent) {
|
|
|
35960
35997
|
if (!isLocalSession()) ensureClaudeOnboarded(cwd);
|
|
35961
35998
|
let beads = null;
|
|
35962
35999
|
const getBeads = () => beads;
|
|
36000
|
+
ensureBeadsWorkflowHint();
|
|
35963
36001
|
const beadsReady = provisionBeadsForStart({
|
|
35964
36002
|
sessionId: session.id,
|
|
35965
36003
|
pluginId,
|
|
@@ -35991,7 +36029,7 @@ async function start(requestedAgent) {
|
|
|
35991
36029
|
]) : Promise.resolve(true);
|
|
35992
36030
|
let gateTimer;
|
|
35993
36031
|
await Promise.race([
|
|
35994
|
-
Promise.all([
|
|
36032
|
+
Promise.all([depsReady, agentBinaryReady]),
|
|
35995
36033
|
new Promise((resolve8) => {
|
|
35996
36034
|
gateTimer = setTimeout(resolve8, GATE_TIMEOUT_MS);
|
|
35997
36035
|
})
|
|
@@ -35999,7 +36037,7 @@ async function start(requestedAgent) {
|
|
|
35999
36037
|
if (gateTimer) clearTimeout(gateTimer);
|
|
36000
36038
|
log.info(
|
|
36001
36039
|
"beads",
|
|
36002
|
-
`agent-spawn gate released
|
|
36040
|
+
`agent-spawn gate released (beads ungated, ${beads ? "already ready" : "still provisioning in background"}); project deps provisioned`
|
|
36003
36041
|
);
|
|
36004
36042
|
}
|
|
36005
36043
|
if (isLocalSession() && requiresAcp(session.agent)) {
|
|
@@ -36584,7 +36622,7 @@ var import_picocolors11 = __toESM(require("picocolors"));
|
|
|
36584
36622
|
var import_child_process29 = require("child_process");
|
|
36585
36623
|
var import_util4 = require("util");
|
|
36586
36624
|
var import_picocolors9 = __toESM(require("picocolors"));
|
|
36587
|
-
var
|
|
36625
|
+
var path73 = __toESM(require("path"));
|
|
36588
36626
|
var execFileP6 = (0, import_util4.promisify)(import_child_process29.execFile);
|
|
36589
36627
|
var MAX_BUFFER = 8 * 1024 * 1024;
|
|
36590
36628
|
function resetStdinForChild() {
|
|
@@ -37073,7 +37111,7 @@ var GitHubCodespacesProvider = class {
|
|
|
37073
37111
|
});
|
|
37074
37112
|
}
|
|
37075
37113
|
async uploadFile(workspaceId, remotePath, contents, options = {}) {
|
|
37076
|
-
const remoteDir =
|
|
37114
|
+
const remoteDir = path73.posix.dirname(remotePath);
|
|
37077
37115
|
const parts = [
|
|
37078
37116
|
`mkdir -p ${shellQuote(remoteDir)}`,
|
|
37079
37117
|
`cat > ${shellQuote(remotePath)}`
|
|
@@ -37143,7 +37181,7 @@ function shellQuote(s) {
|
|
|
37143
37181
|
// src/services/providers/gitpod.ts
|
|
37144
37182
|
var import_child_process30 = require("child_process");
|
|
37145
37183
|
var import_util5 = require("util");
|
|
37146
|
-
var
|
|
37184
|
+
var path74 = __toESM(require("path"));
|
|
37147
37185
|
var import_picocolors10 = __toESM(require("picocolors"));
|
|
37148
37186
|
var execFileP7 = (0, import_util5.promisify)(import_child_process30.execFile);
|
|
37149
37187
|
var MAX_BUFFER2 = 8 * 1024 * 1024;
|
|
@@ -37383,7 +37421,7 @@ var GitpodProvider = class {
|
|
|
37383
37421
|
});
|
|
37384
37422
|
}
|
|
37385
37423
|
async uploadFile(workspaceId, remotePath, contents, options = {}) {
|
|
37386
|
-
const remoteDir =
|
|
37424
|
+
const remoteDir = path74.posix.dirname(remotePath);
|
|
37387
37425
|
const parts = [
|
|
37388
37426
|
`mkdir -p ${shellQuote2(remoteDir)}`,
|
|
37389
37427
|
`cat > ${shellQuote2(remotePath)}`
|
|
@@ -37419,7 +37457,7 @@ function shellQuote2(s) {
|
|
|
37419
37457
|
// src/services/providers/gitlab-workspaces.ts
|
|
37420
37458
|
var import_child_process31 = require("child_process");
|
|
37421
37459
|
var import_util6 = require("util");
|
|
37422
|
-
var
|
|
37460
|
+
var path75 = __toESM(require("path"));
|
|
37423
37461
|
var execFileP8 = (0, import_util6.promisify)(import_child_process31.execFile);
|
|
37424
37462
|
var MAX_BUFFER3 = 8 * 1024 * 1024;
|
|
37425
37463
|
var GITLAB_API_BASE = process.env.CODEAM_GITLAB_API_URL ?? "https://gitlab.com/api/v4";
|
|
@@ -37679,7 +37717,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
37679
37717
|
}
|
|
37680
37718
|
async uploadFile(workspaceId, remotePath, contents, options = {}) {
|
|
37681
37719
|
const sshHost = process.env.CODEAM_GITLAB_SSH_HOST ?? "workspaces.gitlab.com";
|
|
37682
|
-
const remoteDir =
|
|
37720
|
+
const remoteDir = path75.posix.dirname(remotePath);
|
|
37683
37721
|
const parts = [`mkdir -p ${shellQuote3(remoteDir)}`, `cat > ${shellQuote3(remotePath)}`];
|
|
37684
37722
|
if (options.mode != null) {
|
|
37685
37723
|
parts.push(`chmod ${options.mode.toString(8)} ${shellQuote3(remotePath)}`);
|
|
@@ -37747,7 +37785,7 @@ function shellQuote3(s) {
|
|
|
37747
37785
|
// src/services/providers/railway.ts
|
|
37748
37786
|
var import_child_process32 = require("child_process");
|
|
37749
37787
|
var import_util7 = require("util");
|
|
37750
|
-
var
|
|
37788
|
+
var path76 = __toESM(require("path"));
|
|
37751
37789
|
var execFileP9 = (0, import_util7.promisify)(import_child_process32.execFile);
|
|
37752
37790
|
var MAX_BUFFER4 = 8 * 1024 * 1024;
|
|
37753
37791
|
function resetStdinForChild4() {
|
|
@@ -37983,7 +38021,7 @@ var RailwayProvider = class {
|
|
|
37983
38021
|
if (!projectId || !serviceId) {
|
|
37984
38022
|
throw new Error("Invalid Railway workspace id (expected projectId/serviceId).");
|
|
37985
38023
|
}
|
|
37986
|
-
const remoteDir =
|
|
38024
|
+
const remoteDir = path76.posix.dirname(remotePath);
|
|
37987
38025
|
const parts = [`mkdir -p ${shellQuote4(remoteDir)}`, `cat > ${shellQuote4(remotePath)}`];
|
|
37988
38026
|
if (options.mode != null) {
|
|
37989
38027
|
parts.push(`chmod ${options.mode.toString(8)} ${shellQuote4(remotePath)}`);
|
|
@@ -38629,8 +38667,8 @@ async function invite() {
|
|
|
38629
38667
|
var import_node_dns = require("dns");
|
|
38630
38668
|
var import_node_util5 = require("util");
|
|
38631
38669
|
var import_node_crypto13 = require("crypto");
|
|
38632
|
-
var
|
|
38633
|
-
var
|
|
38670
|
+
var fs69 = __toESM(require("fs"));
|
|
38671
|
+
var path77 = __toESM(require("path"));
|
|
38634
38672
|
var import_picocolors14 = __toESM(require("picocolors"));
|
|
38635
38673
|
var dnsResolveP = (0, import_node_util5.promisify)(import_node_dns.resolve);
|
|
38636
38674
|
async function checkDns(apiBase2) {
|
|
@@ -38686,13 +38724,13 @@ async function checkHealth(apiBase2) {
|
|
|
38686
38724
|
}
|
|
38687
38725
|
}
|
|
38688
38726
|
function checkConfigDir() {
|
|
38689
|
-
const dir =
|
|
38727
|
+
const dir = path77.join(require("os").homedir(), ".codeam");
|
|
38690
38728
|
try {
|
|
38691
|
-
|
|
38692
|
-
const probe =
|
|
38693
|
-
|
|
38694
|
-
const read2 =
|
|
38695
|
-
|
|
38729
|
+
fs69.mkdirSync(dir, { recursive: true, mode: 448 });
|
|
38730
|
+
const probe = path77.join(dir, ".doctor-probe");
|
|
38731
|
+
fs69.writeFileSync(probe, "ok", { mode: 384 });
|
|
38732
|
+
const read2 = fs69.readFileSync(probe, "utf8");
|
|
38733
|
+
fs69.unlinkSync(probe);
|
|
38696
38734
|
if (read2 !== "ok") throw new Error("write/read round-trip mismatch");
|
|
38697
38735
|
return {
|
|
38698
38736
|
id: "config-dir",
|
|
@@ -38732,9 +38770,9 @@ function checkSessions() {
|
|
|
38732
38770
|
}
|
|
38733
38771
|
}
|
|
38734
38772
|
function checkAgentBinaries() {
|
|
38735
|
-
const
|
|
38773
|
+
const os59 = createOsStrategy();
|
|
38736
38774
|
return getEnabledAgents().map((meta) => {
|
|
38737
|
-
const found =
|
|
38775
|
+
const found = os59.findInPath(meta.binaryName);
|
|
38738
38776
|
return {
|
|
38739
38777
|
id: `agent-${meta.id}`,
|
|
38740
38778
|
label: `Agent binary: ${meta.displayName} (${meta.binaryName})`,
|
|
@@ -38756,7 +38794,7 @@ function checkNodePty() {
|
|
|
38756
38794
|
detail: "not required on this platform"
|
|
38757
38795
|
};
|
|
38758
38796
|
}
|
|
38759
|
-
const vendoredPath =
|
|
38797
|
+
const vendoredPath = path77.join(__dirname, "vendor", "node-pty");
|
|
38760
38798
|
for (const target of [vendoredPath, "node-pty"]) {
|
|
38761
38799
|
try {
|
|
38762
38800
|
require(target);
|
|
@@ -38798,7 +38836,7 @@ function checkChokidar() {
|
|
|
38798
38836
|
}
|
|
38799
38837
|
async function doctor(args2 = []) {
|
|
38800
38838
|
const json = args2.includes("--json");
|
|
38801
|
-
const cliVersion = true ? "2.61.
|
|
38839
|
+
const cliVersion = true ? "2.61.39" : "0.0.0-dev";
|
|
38802
38840
|
const apiBase2 = resolveApiBaseUrl();
|
|
38803
38841
|
const diagnosticId = (0, import_node_crypto13.randomUUID)();
|
|
38804
38842
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -39309,7 +39347,7 @@ async function mcpRun(args2) {
|
|
|
39309
39347
|
// src/commands/version.ts
|
|
39310
39348
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
39311
39349
|
function version2() {
|
|
39312
|
-
const v = true ? "2.61.
|
|
39350
|
+
const v = true ? "2.61.39" : "unknown";
|
|
39313
39351
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
39314
39352
|
}
|
|
39315
39353
|
|
|
@@ -39458,10 +39496,10 @@ var EXIT_CODE_NAMES = {
|
|
|
39458
39496
|
};
|
|
39459
39497
|
|
|
39460
39498
|
// src/index.ts
|
|
39461
|
-
var
|
|
39499
|
+
var os58 = __toESM(require("os"));
|
|
39462
39500
|
if (!process.env.HOME) {
|
|
39463
39501
|
try {
|
|
39464
|
-
const home =
|
|
39502
|
+
const home = os58.homedir();
|
|
39465
39503
|
if (home) process.env.HOME = home;
|
|
39466
39504
|
} catch {
|
|
39467
39505
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.61.
|
|
3
|
+
"version": "2.61.39",
|
|
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",
|