codeam-cli 2.61.38 → 2.61.40
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 +182 -136
- 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.39] — 2026-07-25
|
|
8
|
+
|
|
9
|
+
### Performance
|
|
10
|
+
|
|
11
|
+
- **cli:** Un-gate the agent spawn from beads provisioning (codespace)
|
|
12
|
+
|
|
13
|
+
## [2.61.38] — 2026-07-24
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **box:** Bake procps (`ps`) into the image — Beads/Dolt need it to manage the shared server
|
|
18
|
+
|
|
7
19
|
## [2.61.37] — 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.40" : "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.40",
|
|
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.40" ? { ideVersion: "2.61.40" } : {}
|
|
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.40" : 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.40" : 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.40" : null;
|
|
18732
18732
|
}
|
|
18733
18733
|
function runCmd(cmd, args2, timeoutMs) {
|
|
18734
18734
|
return new Promise((resolve8) => {
|
|
@@ -19812,6 +19812,13 @@ var HostAgentSupervisor = class {
|
|
|
19812
19812
|
report("failed", detail ? `agent exited (${code}): ${detail}` : `agent exited (${code})`);
|
|
19813
19813
|
}
|
|
19814
19814
|
});
|
|
19815
|
+
proc.once("error", (err) => {
|
|
19816
|
+
const tracked = this.children.get(payload.deployId)?.proc === proc;
|
|
19817
|
+
if (tracked) this.children.delete(payload.deployId);
|
|
19818
|
+
if (tracked) {
|
|
19819
|
+
report("failed", `agent failed to start: ${err instanceof Error ? err.message : String(err)}`);
|
|
19820
|
+
}
|
|
19821
|
+
});
|
|
19815
19822
|
} catch (err) {
|
|
19816
19823
|
const message = err instanceof Error ? err.message : String(err);
|
|
19817
19824
|
log.warn("host-agent", `deploy ${payload.deployId.slice(0, 8)} failed: ${message}`);
|
|
@@ -21730,11 +21737,11 @@ function resolveDoltInstallStrategy(platform3) {
|
|
|
21730
21737
|
}
|
|
21731
21738
|
var DOLT_RELEASE_BASE = "https://github.com/dolthub/dolt/releases/latest/download";
|
|
21732
21739
|
function doltPlatformTuple(platform3, arch2) {
|
|
21733
|
-
const
|
|
21740
|
+
const os59 = platform3 === "win32" ? "windows" : platform3 === "darwin" ? "darwin" : "linux";
|
|
21734
21741
|
const a = arch2 === "x64" ? "amd64" : arch2 === "arm64" ? "arm64" : null;
|
|
21735
21742
|
if (!a) return null;
|
|
21736
|
-
if (
|
|
21737
|
-
return `${
|
|
21743
|
+
if (os59 === "windows" && a !== "amd64") return null;
|
|
21744
|
+
return `${os59}-${a}`;
|
|
21738
21745
|
}
|
|
21739
21746
|
function resolveDoltTarballStrategy(targetDir, platform3, arch2) {
|
|
21740
21747
|
const tuple = doltPlatformTuple(platform3, arch2);
|
|
@@ -23459,7 +23466,7 @@ var vcsAgentReviewH = async (ctx, cmd, parsed) => {
|
|
|
23459
23466
|
});
|
|
23460
23467
|
const token = ctx.pluginAuthToken;
|
|
23461
23468
|
void (async () => {
|
|
23462
|
-
const
|
|
23469
|
+
const os59 = createOsStrategy();
|
|
23463
23470
|
try {
|
|
23464
23471
|
const report = await reviewPullRequest(
|
|
23465
23472
|
{
|
|
@@ -23468,7 +23475,7 @@ var vcsAgentReviewH = async (ctx, cmd, parsed) => {
|
|
|
23468
23475
|
baseBranch: parsed.baseBranch
|
|
23469
23476
|
},
|
|
23470
23477
|
{
|
|
23471
|
-
runReview: (input) => new CoderabbitRuntimeStrategy(
|
|
23478
|
+
runReview: (input) => new CoderabbitRuntimeStrategy(os59).runOneShot(input),
|
|
23472
23479
|
runGh: (args2) => defaultRunGh(args2),
|
|
23473
23480
|
postReport: async (r) => {
|
|
23474
23481
|
if (!token) return;
|
|
@@ -24494,11 +24501,11 @@ function resolveTokenValue(args2) {
|
|
|
24494
24501
|
}
|
|
24495
24502
|
const fileFlag = args2.find((a) => a.startsWith("--token-file="));
|
|
24496
24503
|
if (fileFlag) {
|
|
24497
|
-
const
|
|
24504
|
+
const path79 = fileFlag.slice("--token-file=".length);
|
|
24498
24505
|
try {
|
|
24499
|
-
const content = fs58.readFileSync(
|
|
24500
|
-
if (content.length === 0) fail(`--token-file ${
|
|
24501
|
-
rmIfExistsQuiet(
|
|
24506
|
+
const content = fs58.readFileSync(path79, "utf8").trim();
|
|
24507
|
+
if (content.length === 0) fail(`--token-file ${path79} is empty`);
|
|
24508
|
+
rmIfExistsQuiet(path79);
|
|
24502
24509
|
return content;
|
|
24503
24510
|
} catch (err) {
|
|
24504
24511
|
fail(`Could not read --token-file: ${err.message}`);
|
|
@@ -24688,7 +24695,7 @@ async function pairAuto(args2) {
|
|
|
24688
24695
|
`agent "${claimed.agent}" is not supported in this codeam-cli version. Upgrade with 'npm i -g codeam-cli@latest'.`
|
|
24689
24696
|
);
|
|
24690
24697
|
}
|
|
24691
|
-
|
|
24698
|
+
const claimedSession = {
|
|
24692
24699
|
id: claimed.sessionId,
|
|
24693
24700
|
pluginId,
|
|
24694
24701
|
userName: claimed.user.name,
|
|
@@ -24699,7 +24706,8 @@ async function pairAuto(args2) {
|
|
|
24699
24706
|
// SEC crit1 (#813): persist so boot-time /reconnect proves possession.
|
|
24700
24707
|
pollSecret,
|
|
24701
24708
|
agent: claimed.agent
|
|
24702
|
-
}
|
|
24709
|
+
};
|
|
24710
|
+
addSession(claimedSession);
|
|
24703
24711
|
identifyUser({
|
|
24704
24712
|
userId: claimed.user.email,
|
|
24705
24713
|
email: claimed.user.email,
|
|
@@ -24738,7 +24746,7 @@ async function pairAuto(args2) {
|
|
|
24738
24746
|
process.once("exit", () => {
|
|
24739
24747
|
headroomReporter?.stop();
|
|
24740
24748
|
});
|
|
24741
|
-
await start();
|
|
24749
|
+
await start(void 0, claimedSession);
|
|
24742
24750
|
}
|
|
24743
24751
|
|
|
24744
24752
|
// src/services/headroom/wrap-launch.ts
|
|
@@ -31989,7 +31997,7 @@ function defaultRunGit(cwd, args2) {
|
|
|
31989
31997
|
});
|
|
31990
31998
|
}
|
|
31991
31999
|
async function discoverRepos(workingDir, maxDepth = 4) {
|
|
31992
|
-
const
|
|
32000
|
+
const fs70 = await import("fs/promises");
|
|
31993
32001
|
const out2 = [];
|
|
31994
32002
|
await walk(workingDir, 0);
|
|
31995
32003
|
return out2;
|
|
@@ -31997,7 +32005,7 @@ async function discoverRepos(workingDir, maxDepth = 4) {
|
|
|
31997
32005
|
if (depth > maxDepth) return;
|
|
31998
32006
|
let entries = [];
|
|
31999
32007
|
try {
|
|
32000
|
-
const dirents = await
|
|
32008
|
+
const dirents = await fs70.readdir(dir, { withFileTypes: true });
|
|
32001
32009
|
entries = dirents.filter((d3) => !d3.name.startsWith(".") || d3.name === ".git").map((d3) => ({ name: d3.name, isDirectory: d3.isDirectory() }));
|
|
32002
32010
|
} catch {
|
|
32003
32011
|
return;
|
|
@@ -35099,6 +35107,43 @@ function fetchQuotaUsage(runtime, historySvc) {
|
|
|
35099
35107
|
});
|
|
35100
35108
|
}
|
|
35101
35109
|
|
|
35110
|
+
// src/beads/workflow-hint.ts
|
|
35111
|
+
var fs66 = __toESM(require("fs"));
|
|
35112
|
+
var path71 = __toESM(require("path"));
|
|
35113
|
+
var os54 = __toESM(require("os"));
|
|
35114
|
+
var BEADS_HINT_MARKER = "<!-- codeam:beads-workflow -->";
|
|
35115
|
+
var BEADS_HINT = `${BEADS_HINT_MARKER}
|
|
35116
|
+
# Beads (bd) \u2014 task tracking + persistent memory (ALWAYS use it)
|
|
35117
|
+
|
|
35118
|
+
This environment uses **bd (beads)** for issue/task tracking and persistent memory.
|
|
35119
|
+
|
|
35120
|
+
- Use \`bd\` for ALL task tracking \u2014 do NOT use TodoWrite or markdown TODO lists.
|
|
35121
|
+
- Run \`bd prime\` for the full workflow context + project memories. On a fresh
|
|
35122
|
+
session beads may still be provisioning for a few seconds \u2014 if \`bd prime\` comes
|
|
35123
|
+
back empty, retry it shortly; it works once the shared server is up.
|
|
35124
|
+
- \`bd ready\` (available work) \xB7 \`bd show <id>\` \xB7 \`bd update <id> --claim\` \xB7 \`bd close <id>\`.
|
|
35125
|
+
- Use \`bd remember "..."\` for persistent knowledge \u2014 do NOT use MEMORY.md files.
|
|
35126
|
+
${BEADS_HINT_MARKER}`;
|
|
35127
|
+
function ensureBeadsWorkflowHint(homeDir2 = os54.homedir()) {
|
|
35128
|
+
try {
|
|
35129
|
+
const file = path71.join(homeDir2, ".claude", "CLAUDE.md");
|
|
35130
|
+
let existing = "";
|
|
35131
|
+
try {
|
|
35132
|
+
existing = fs66.readFileSync(file, "utf8");
|
|
35133
|
+
} catch {
|
|
35134
|
+
}
|
|
35135
|
+
if (existing.includes(BEADS_HINT_MARKER)) return;
|
|
35136
|
+
fs66.mkdirSync(path71.dirname(file), { recursive: true });
|
|
35137
|
+
const next = existing.trim() ? `${existing.trimEnd()}
|
|
35138
|
+
|
|
35139
|
+
${BEADS_HINT}
|
|
35140
|
+
` : `${BEADS_HINT}
|
|
35141
|
+
`;
|
|
35142
|
+
fs66.writeFileSync(file, next);
|
|
35143
|
+
} catch {
|
|
35144
|
+
}
|
|
35145
|
+
}
|
|
35146
|
+
|
|
35102
35147
|
// src/integrations/provision.ts
|
|
35103
35148
|
function buildMcpServersForStart(ctx) {
|
|
35104
35149
|
const manifest = readIntegrationsManifest();
|
|
@@ -35503,7 +35548,7 @@ var AcpDriver = class {
|
|
|
35503
35548
|
};
|
|
35504
35549
|
|
|
35505
35550
|
// src/baton/transcript-mirror.ts
|
|
35506
|
-
var
|
|
35551
|
+
var fs67 = __toESM(require("fs"));
|
|
35507
35552
|
var TranscriptMirror = class {
|
|
35508
35553
|
constructor(deps) {
|
|
35509
35554
|
this.deps = deps;
|
|
@@ -35570,7 +35615,7 @@ var TranscriptMirror = class {
|
|
|
35570
35615
|
}
|
|
35571
35616
|
};
|
|
35572
35617
|
function defaultWatch(file, onChange) {
|
|
35573
|
-
const w3 =
|
|
35618
|
+
const w3 = fs67.watch(file, { persistent: false }, () => onChange());
|
|
35574
35619
|
return () => w3.close();
|
|
35575
35620
|
}
|
|
35576
35621
|
|
|
@@ -35832,16 +35877,16 @@ function toEpochMs(ts) {
|
|
|
35832
35877
|
}
|
|
35833
35878
|
|
|
35834
35879
|
// src/agents/claude/onboarding.ts
|
|
35835
|
-
var
|
|
35836
|
-
var
|
|
35837
|
-
var
|
|
35880
|
+
var fs68 = __toESM(require("fs"));
|
|
35881
|
+
var os56 = __toESM(require("os"));
|
|
35882
|
+
var path72 = __toESM(require("path"));
|
|
35838
35883
|
var ONBOARDING_VERSION_SENTINEL = "9999.0.0";
|
|
35839
35884
|
function ensureClaudeOnboarded(cwd) {
|
|
35840
35885
|
try {
|
|
35841
|
-
const file =
|
|
35886
|
+
const file = path72.join(os56.homedir(), ".claude.json");
|
|
35842
35887
|
let config = {};
|
|
35843
35888
|
try {
|
|
35844
|
-
config = JSON.parse(
|
|
35889
|
+
config = JSON.parse(fs68.readFileSync(file, "utf8"));
|
|
35845
35890
|
} catch {
|
|
35846
35891
|
}
|
|
35847
35892
|
let changed = false;
|
|
@@ -35866,8 +35911,8 @@ function ensureClaudeOnboarded(cwd) {
|
|
|
35866
35911
|
}
|
|
35867
35912
|
}
|
|
35868
35913
|
if (!changed) return;
|
|
35869
|
-
|
|
35870
|
-
|
|
35914
|
+
fs68.mkdirSync(path72.dirname(file), { recursive: true });
|
|
35915
|
+
fs68.writeFileSync(file, JSON.stringify(config, null, 2));
|
|
35871
35916
|
log.info(
|
|
35872
35917
|
"claude",
|
|
35873
35918
|
`pre-completed Claude onboarding${cwd ? ` + trusted workspace ${cwd}` : ""}`
|
|
@@ -35878,10 +35923,10 @@ function ensureClaudeOnboarded(cwd) {
|
|
|
35878
35923
|
}
|
|
35879
35924
|
|
|
35880
35925
|
// src/commands/start.ts
|
|
35881
|
-
async function start(requestedAgent) {
|
|
35926
|
+
async function start(requestedAgent, presetSession) {
|
|
35882
35927
|
installRelayCrashGuards();
|
|
35883
35928
|
showIntro();
|
|
35884
|
-
const session = requestedAgent ? getActiveSessionForAgent(requestedAgent) : getActiveSession();
|
|
35929
|
+
const session = presetSession ? presetSession : requestedAgent ? getActiveSessionForAgent(requestedAgent) : getActiveSession();
|
|
35885
35930
|
if (!session) {
|
|
35886
35931
|
if (requestedAgent) {
|
|
35887
35932
|
const displayName = AGENT_REGISTRY[requestedAgent]?.displayName ?? requestedAgent;
|
|
@@ -35960,6 +36005,7 @@ async function start(requestedAgent) {
|
|
|
35960
36005
|
if (!isLocalSession()) ensureClaudeOnboarded(cwd);
|
|
35961
36006
|
let beads = null;
|
|
35962
36007
|
const getBeads = () => beads;
|
|
36008
|
+
ensureBeadsWorkflowHint();
|
|
35963
36009
|
const beadsReady = provisionBeadsForStart({
|
|
35964
36010
|
sessionId: session.id,
|
|
35965
36011
|
pluginId,
|
|
@@ -35991,7 +36037,7 @@ async function start(requestedAgent) {
|
|
|
35991
36037
|
]) : Promise.resolve(true);
|
|
35992
36038
|
let gateTimer;
|
|
35993
36039
|
await Promise.race([
|
|
35994
|
-
Promise.all([
|
|
36040
|
+
Promise.all([depsReady, agentBinaryReady]),
|
|
35995
36041
|
new Promise((resolve8) => {
|
|
35996
36042
|
gateTimer = setTimeout(resolve8, GATE_TIMEOUT_MS);
|
|
35997
36043
|
})
|
|
@@ -35999,7 +36045,7 @@ async function start(requestedAgent) {
|
|
|
35999
36045
|
if (gateTimer) clearTimeout(gateTimer);
|
|
36000
36046
|
log.info(
|
|
36001
36047
|
"beads",
|
|
36002
|
-
`agent-spawn gate released
|
|
36048
|
+
`agent-spawn gate released (beads ungated, ${beads ? "already ready" : "still provisioning in background"}); project deps provisioned`
|
|
36003
36049
|
);
|
|
36004
36050
|
}
|
|
36005
36051
|
if (isLocalSession() && requiresAcp(session.agent)) {
|
|
@@ -36584,7 +36630,7 @@ var import_picocolors11 = __toESM(require("picocolors"));
|
|
|
36584
36630
|
var import_child_process29 = require("child_process");
|
|
36585
36631
|
var import_util4 = require("util");
|
|
36586
36632
|
var import_picocolors9 = __toESM(require("picocolors"));
|
|
36587
|
-
var
|
|
36633
|
+
var path73 = __toESM(require("path"));
|
|
36588
36634
|
var execFileP6 = (0, import_util4.promisify)(import_child_process29.execFile);
|
|
36589
36635
|
var MAX_BUFFER = 8 * 1024 * 1024;
|
|
36590
36636
|
function resetStdinForChild() {
|
|
@@ -37073,7 +37119,7 @@ var GitHubCodespacesProvider = class {
|
|
|
37073
37119
|
});
|
|
37074
37120
|
}
|
|
37075
37121
|
async uploadFile(workspaceId, remotePath, contents, options = {}) {
|
|
37076
|
-
const remoteDir =
|
|
37122
|
+
const remoteDir = path73.posix.dirname(remotePath);
|
|
37077
37123
|
const parts = [
|
|
37078
37124
|
`mkdir -p ${shellQuote(remoteDir)}`,
|
|
37079
37125
|
`cat > ${shellQuote(remotePath)}`
|
|
@@ -37143,7 +37189,7 @@ function shellQuote(s) {
|
|
|
37143
37189
|
// src/services/providers/gitpod.ts
|
|
37144
37190
|
var import_child_process30 = require("child_process");
|
|
37145
37191
|
var import_util5 = require("util");
|
|
37146
|
-
var
|
|
37192
|
+
var path74 = __toESM(require("path"));
|
|
37147
37193
|
var import_picocolors10 = __toESM(require("picocolors"));
|
|
37148
37194
|
var execFileP7 = (0, import_util5.promisify)(import_child_process30.execFile);
|
|
37149
37195
|
var MAX_BUFFER2 = 8 * 1024 * 1024;
|
|
@@ -37383,7 +37429,7 @@ var GitpodProvider = class {
|
|
|
37383
37429
|
});
|
|
37384
37430
|
}
|
|
37385
37431
|
async uploadFile(workspaceId, remotePath, contents, options = {}) {
|
|
37386
|
-
const remoteDir =
|
|
37432
|
+
const remoteDir = path74.posix.dirname(remotePath);
|
|
37387
37433
|
const parts = [
|
|
37388
37434
|
`mkdir -p ${shellQuote2(remoteDir)}`,
|
|
37389
37435
|
`cat > ${shellQuote2(remotePath)}`
|
|
@@ -37419,7 +37465,7 @@ function shellQuote2(s) {
|
|
|
37419
37465
|
// src/services/providers/gitlab-workspaces.ts
|
|
37420
37466
|
var import_child_process31 = require("child_process");
|
|
37421
37467
|
var import_util6 = require("util");
|
|
37422
|
-
var
|
|
37468
|
+
var path75 = __toESM(require("path"));
|
|
37423
37469
|
var execFileP8 = (0, import_util6.promisify)(import_child_process31.execFile);
|
|
37424
37470
|
var MAX_BUFFER3 = 8 * 1024 * 1024;
|
|
37425
37471
|
var GITLAB_API_BASE = process.env.CODEAM_GITLAB_API_URL ?? "https://gitlab.com/api/v4";
|
|
@@ -37679,7 +37725,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
37679
37725
|
}
|
|
37680
37726
|
async uploadFile(workspaceId, remotePath, contents, options = {}) {
|
|
37681
37727
|
const sshHost = process.env.CODEAM_GITLAB_SSH_HOST ?? "workspaces.gitlab.com";
|
|
37682
|
-
const remoteDir =
|
|
37728
|
+
const remoteDir = path75.posix.dirname(remotePath);
|
|
37683
37729
|
const parts = [`mkdir -p ${shellQuote3(remoteDir)}`, `cat > ${shellQuote3(remotePath)}`];
|
|
37684
37730
|
if (options.mode != null) {
|
|
37685
37731
|
parts.push(`chmod ${options.mode.toString(8)} ${shellQuote3(remotePath)}`);
|
|
@@ -37747,7 +37793,7 @@ function shellQuote3(s) {
|
|
|
37747
37793
|
// src/services/providers/railway.ts
|
|
37748
37794
|
var import_child_process32 = require("child_process");
|
|
37749
37795
|
var import_util7 = require("util");
|
|
37750
|
-
var
|
|
37796
|
+
var path76 = __toESM(require("path"));
|
|
37751
37797
|
var execFileP9 = (0, import_util7.promisify)(import_child_process32.execFile);
|
|
37752
37798
|
var MAX_BUFFER4 = 8 * 1024 * 1024;
|
|
37753
37799
|
function resetStdinForChild4() {
|
|
@@ -37983,7 +38029,7 @@ var RailwayProvider = class {
|
|
|
37983
38029
|
if (!projectId || !serviceId) {
|
|
37984
38030
|
throw new Error("Invalid Railway workspace id (expected projectId/serviceId).");
|
|
37985
38031
|
}
|
|
37986
|
-
const remoteDir =
|
|
38032
|
+
const remoteDir = path76.posix.dirname(remotePath);
|
|
37987
38033
|
const parts = [`mkdir -p ${shellQuote4(remoteDir)}`, `cat > ${shellQuote4(remotePath)}`];
|
|
37988
38034
|
if (options.mode != null) {
|
|
37989
38035
|
parts.push(`chmod ${options.mode.toString(8)} ${shellQuote4(remotePath)}`);
|
|
@@ -38629,8 +38675,8 @@ async function invite() {
|
|
|
38629
38675
|
var import_node_dns = require("dns");
|
|
38630
38676
|
var import_node_util5 = require("util");
|
|
38631
38677
|
var import_node_crypto13 = require("crypto");
|
|
38632
|
-
var
|
|
38633
|
-
var
|
|
38678
|
+
var fs69 = __toESM(require("fs"));
|
|
38679
|
+
var path77 = __toESM(require("path"));
|
|
38634
38680
|
var import_picocolors14 = __toESM(require("picocolors"));
|
|
38635
38681
|
var dnsResolveP = (0, import_node_util5.promisify)(import_node_dns.resolve);
|
|
38636
38682
|
async function checkDns(apiBase2) {
|
|
@@ -38686,13 +38732,13 @@ async function checkHealth(apiBase2) {
|
|
|
38686
38732
|
}
|
|
38687
38733
|
}
|
|
38688
38734
|
function checkConfigDir() {
|
|
38689
|
-
const dir =
|
|
38735
|
+
const dir = path77.join(require("os").homedir(), ".codeam");
|
|
38690
38736
|
try {
|
|
38691
|
-
|
|
38692
|
-
const probe =
|
|
38693
|
-
|
|
38694
|
-
const read2 =
|
|
38695
|
-
|
|
38737
|
+
fs69.mkdirSync(dir, { recursive: true, mode: 448 });
|
|
38738
|
+
const probe = path77.join(dir, ".doctor-probe");
|
|
38739
|
+
fs69.writeFileSync(probe, "ok", { mode: 384 });
|
|
38740
|
+
const read2 = fs69.readFileSync(probe, "utf8");
|
|
38741
|
+
fs69.unlinkSync(probe);
|
|
38696
38742
|
if (read2 !== "ok") throw new Error("write/read round-trip mismatch");
|
|
38697
38743
|
return {
|
|
38698
38744
|
id: "config-dir",
|
|
@@ -38732,9 +38778,9 @@ function checkSessions() {
|
|
|
38732
38778
|
}
|
|
38733
38779
|
}
|
|
38734
38780
|
function checkAgentBinaries() {
|
|
38735
|
-
const
|
|
38781
|
+
const os59 = createOsStrategy();
|
|
38736
38782
|
return getEnabledAgents().map((meta) => {
|
|
38737
|
-
const found =
|
|
38783
|
+
const found = os59.findInPath(meta.binaryName);
|
|
38738
38784
|
return {
|
|
38739
38785
|
id: `agent-${meta.id}`,
|
|
38740
38786
|
label: `Agent binary: ${meta.displayName} (${meta.binaryName})`,
|
|
@@ -38756,7 +38802,7 @@ function checkNodePty() {
|
|
|
38756
38802
|
detail: "not required on this platform"
|
|
38757
38803
|
};
|
|
38758
38804
|
}
|
|
38759
|
-
const vendoredPath =
|
|
38805
|
+
const vendoredPath = path77.join(__dirname, "vendor", "node-pty");
|
|
38760
38806
|
for (const target of [vendoredPath, "node-pty"]) {
|
|
38761
38807
|
try {
|
|
38762
38808
|
require(target);
|
|
@@ -38798,7 +38844,7 @@ function checkChokidar() {
|
|
|
38798
38844
|
}
|
|
38799
38845
|
async function doctor(args2 = []) {
|
|
38800
38846
|
const json = args2.includes("--json");
|
|
38801
|
-
const cliVersion = true ? "2.61.
|
|
38847
|
+
const cliVersion = true ? "2.61.40" : "0.0.0-dev";
|
|
38802
38848
|
const apiBase2 = resolveApiBaseUrl();
|
|
38803
38849
|
const diagnosticId = (0, import_node_crypto13.randomUUID)();
|
|
38804
38850
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -39309,7 +39355,7 @@ async function mcpRun(args2) {
|
|
|
39309
39355
|
// src/commands/version.ts
|
|
39310
39356
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
39311
39357
|
function version2() {
|
|
39312
|
-
const v = true ? "2.61.
|
|
39358
|
+
const v = true ? "2.61.40" : "unknown";
|
|
39313
39359
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
39314
39360
|
}
|
|
39315
39361
|
|
|
@@ -39458,10 +39504,10 @@ var EXIT_CODE_NAMES = {
|
|
|
39458
39504
|
};
|
|
39459
39505
|
|
|
39460
39506
|
// src/index.ts
|
|
39461
|
-
var
|
|
39507
|
+
var os58 = __toESM(require("os"));
|
|
39462
39508
|
if (!process.env.HOME) {
|
|
39463
39509
|
try {
|
|
39464
|
-
const home =
|
|
39510
|
+
const home = os58.homedir();
|
|
39465
39511
|
if (home) process.env.HOME = home;
|
|
39466
39512
|
} catch {
|
|
39467
39513
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.61.
|
|
3
|
+
"version": "2.61.40",
|
|
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",
|