codeam-cli 2.61.33 → 2.61.35
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 +149 -129
- 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.34] — 2026-07-24
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **box:** Pre-install every agent + gh/glab + beads/dolt/headroom in the fleet image
|
|
12
|
+
|
|
13
|
+
## [2.61.33] — 2026-07-24
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **cli:** GitLab deploy support on the box — glab + gitlab.com clone
|
|
18
|
+
|
|
7
19
|
## [2.61.32] — 2026-07-24
|
|
8
20
|
|
|
9
21
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -1604,7 +1604,7 @@ var { getConfig, ensurePluginId, addSession, removeSession, setActiveSession, ge
|
|
|
1604
1604
|
|
|
1605
1605
|
// src/commands/pair-auto.ts
|
|
1606
1606
|
var fs58 = __toESM(require("fs"));
|
|
1607
|
-
var
|
|
1607
|
+
var os49 = __toESM(require("os"));
|
|
1608
1608
|
var path62 = __toESM(require("path"));
|
|
1609
1609
|
var import_crypto4 = require("crypto");
|
|
1610
1610
|
|
|
@@ -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.35" : "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.35",
|
|
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.35" ? { ideVersion: "2.61.35" } : {}
|
|
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, homedir45) {
|
|
7938
7938
|
const norm = (p2) => p2.replace(/\//g, "\\").replace(/\\+$/, "").toLowerCase();
|
|
7939
7939
|
const cwd = norm(dir);
|
|
7940
|
-
const home = norm(
|
|
7940
|
+
const home = norm(homedir45);
|
|
7941
7941
|
if (cwd === home) return true;
|
|
7942
7942
|
if (/^[a-z]:$/.test(cwd)) return true;
|
|
7943
7943
|
const sysRoots = [
|
|
@@ -9082,7 +9082,7 @@ function closeAllTerminals() {
|
|
|
9082
9082
|
|
|
9083
9083
|
// src/commands/start/handlers.ts
|
|
9084
9084
|
var fs57 = __toESM(require("fs"));
|
|
9085
|
-
var
|
|
9085
|
+
var os48 = __toESM(require("os"));
|
|
9086
9086
|
var path61 = __toESM(require("path"));
|
|
9087
9087
|
var import_crypto3 = require("crypto");
|
|
9088
9088
|
var import_child_process24 = require("child_process");
|
|
@@ -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 = [], os58 = createOsStrategy()) {
|
|
12567
|
+
const found = os58.findInPath("claude") ?? os58.findInPath("claude-code");
|
|
12568
12568
|
if (!found) return null;
|
|
12569
|
-
return
|
|
12569
|
+
return os58.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(os58) {
|
|
13160
|
+
this.os = os58;
|
|
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 os58 = createOsStrategy();
|
|
13941
|
+
return os58.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(os58) {
|
|
13965
|
+
this.os = os58;
|
|
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(os58) {
|
|
14075
|
+
return os58.id === "win32" ? "npm.cmd" : "npm";
|
|
14076
14076
|
}
|
|
14077
|
-
async function installCodexViaNpm(
|
|
14077
|
+
async function installCodexViaNpm(os58) {
|
|
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(os58), ["install", "-g", "@openai/codex"], {
|
|
14080
14080
|
stdio: "inherit"
|
|
14081
14081
|
});
|
|
14082
14082
|
proc.on("close", (code) => {
|
|
@@ -14093,16 +14093,16 @@ async function installCodexViaNpm(os57) {
|
|
|
14093
14093
|
});
|
|
14094
14094
|
});
|
|
14095
14095
|
}
|
|
14096
|
-
function augmentNpmGlobalBin(
|
|
14096
|
+
function augmentNpmGlobalBin(os58) {
|
|
14097
14097
|
try {
|
|
14098
|
-
const result = (0, import_node_child_process5.spawnSync)(resolveNpm(
|
|
14098
|
+
const result = (0, import_node_child_process5.spawnSync)(resolveNpm(os58), ["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 = os58.id === "win32" ? prefix : path24.join(prefix, "bin");
|
|
14105
|
+
os58.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(os58) {
|
|
14190
|
+
if (os58.findInPath("coderabbit")) return true;
|
|
14191
|
+
if (os58.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(os57) {
|
|
|
14221
14221
|
proc.on("error", () => finish(false));
|
|
14222
14222
|
});
|
|
14223
14223
|
if (!ok) return false;
|
|
14224
|
-
|
|
14225
|
-
return
|
|
14224
|
+
os58.augmentPath([`${os58.homeDir()}/.local/bin`, "/opt/homebrew/bin"]);
|
|
14225
|
+
return os58.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(os58) {
|
|
14261
14261
|
return {
|
|
14262
14262
|
async ensureInstalled() {
|
|
14263
|
-
return ensureCoderabbitInstalled(
|
|
14263
|
+
return ensureCoderabbitInstalled(os58);
|
|
14264
14264
|
},
|
|
14265
14265
|
launch() {
|
|
14266
14266
|
return (0, import_node_child_process7.spawn)("coderabbit", ["auth", "login"], { stdio: "inherit" });
|
|
@@ -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(os58) {
|
|
14484
|
+
this.os = os58;
|
|
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(os58) {
|
|
14756
14756
|
return {
|
|
14757
14757
|
async ensureInstalled() {
|
|
14758
|
-
if (
|
|
14758
|
+
if (os58.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(os58) {
|
|
14823
|
+
this.os = os58;
|
|
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(os58) {
|
|
15040
15040
|
return {
|
|
15041
15041
|
async ensureInstalled() {
|
|
15042
|
-
if (
|
|
15042
|
+
if (os58.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(os57) {
|
|
|
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)(os58.id === "win32" ? "cmd.exe" : "sh", os58.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(os58) {
|
|
15125
|
+
this.os = os58;
|
|
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 os58 = createOsStrategy();
|
|
15258
|
+
return os58.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(os58) {
|
|
15449
|
+
this.os = os58;
|
|
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(os58) {
|
|
15741
|
+
this.os = os58;
|
|
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: (os58) => new ClaudeRuntimeStrategy(os58),
|
|
15855
|
+
codex: (os58) => new CodexRuntimeStrategy(os58),
|
|
15856
|
+
coderabbit: (os58) => new CoderabbitRuntimeStrategy(os58),
|
|
15857
|
+
cursor: (os58) => new CursorRuntimeStrategy(os58),
|
|
15858
|
+
aider: (os58) => new AiderRuntimeStrategy(os58),
|
|
15859
|
+
gemini: (os58) => new GeminiRuntimeStrategy(os58),
|
|
15860
|
+
kimi: (os58) => new KimiRuntimeStrategy(os58)
|
|
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, os58 = 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, os57 = 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(os58);
|
|
15877
15877
|
}
|
|
15878
|
-
function createInteractiveAgentStrategy(agent,
|
|
15879
|
-
const s = createAgentStrategy(agent,
|
|
15878
|
+
function createInteractiveAgentStrategy(agent, os58 = createOsStrategy()) {
|
|
15879
|
+
const s = createAgentStrategy(agent, os58);
|
|
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 os58 = 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 = os58.homeDir();
|
|
16584
|
+
os58.augmentPath(
|
|
16585
|
+
os58.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 = os58.findInPath("coderabbit") !== null;
|
|
16592
16592
|
const base = () => ({
|
|
16593
16593
|
action: input.action,
|
|
16594
16594
|
supported: true,
|
|
16595
|
-
installed:
|
|
16595
|
+
installed: os58.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(os58);
|
|
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(os58);
|
|
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(os58);
|
|
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(os58);
|
|
16704
16704
|
res.installed = ok;
|
|
16705
16705
|
if (!ok) return { ...res, error: "CodeRabbit CLI is not installed" };
|
|
16706
16706
|
}
|
|
@@ -16884,7 +16884,7 @@ function defaultRunGh(args2) {
|
|
|
16884
16884
|
|
|
16885
16885
|
// src/commands/host-agent.ts
|
|
16886
16886
|
var import_node_child_process24 = require("child_process");
|
|
16887
|
-
var
|
|
16887
|
+
var os38 = __toESM(require("os"));
|
|
16888
16888
|
var fs43 = __toESM(require("fs"));
|
|
16889
16889
|
var path46 = __toESM(require("path"));
|
|
16890
16890
|
|
|
@@ -18283,6 +18283,7 @@ async function ensureModernPython(runner) {
|
|
|
18283
18283
|
// src/commands/host/headroom-bootstrap.ts
|
|
18284
18284
|
var fs40 = __toESM(require("fs"));
|
|
18285
18285
|
var path44 = __toESM(require("path"));
|
|
18286
|
+
var os36 = __toESM(require("os"));
|
|
18286
18287
|
|
|
18287
18288
|
// src/commands/host/headroom-config.ts
|
|
18288
18289
|
var fs39 = __toESM(require("fs"));
|
|
@@ -18423,6 +18424,15 @@ async function getFreeDiskBytes(dir) {
|
|
|
18423
18424
|
return null;
|
|
18424
18425
|
}
|
|
18425
18426
|
}
|
|
18427
|
+
function headroomModelsCached() {
|
|
18428
|
+
const hubDir = process.env.HUGGINGFACE_HUB_CACHE || path44.join(
|
|
18429
|
+
process.env.HF_HOME || path44.join(os36.homedir(), ".cache", "huggingface"),
|
|
18430
|
+
"hub"
|
|
18431
|
+
);
|
|
18432
|
+
return HEADROOM_MODELS.every(
|
|
18433
|
+
(m) => fs40.existsSync(path44.join(hubDir, `models--${m.repo.replace("/", "--")}`))
|
|
18434
|
+
);
|
|
18435
|
+
}
|
|
18426
18436
|
async function setupHeadroomForSelfHosted(agent, runner = defaultHeadroomRunner, opts = {}) {
|
|
18427
18437
|
const extras = opts.extras ?? [...HEADROOM_EXTRAS_BY_SURFACE.selfHosted];
|
|
18428
18438
|
const onProgress = opts.onProgress ?? (() => {
|
|
@@ -18451,23 +18461,33 @@ async function setupHeadroomForSelfHosted(agent, runner = defaultHeadroomRunner,
|
|
|
18451
18461
|
}
|
|
18452
18462
|
return false;
|
|
18453
18463
|
};
|
|
18454
|
-
|
|
18455
|
-
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
|
|
18459
|
-
|
|
18464
|
+
const modelsCached = opts.modelsCached ?? headroomModelsCached;
|
|
18465
|
+
if (runner.which("headroom") !== null && modelsCached()) {
|
|
18466
|
+
log.info(
|
|
18467
|
+
"host-agent",
|
|
18468
|
+
"headroom + Kompress model already present (baked image) \u2014 skipping pip install + model download"
|
|
18469
|
+
);
|
|
18470
|
+
onProgress("pip");
|
|
18471
|
+
onProgress("model");
|
|
18472
|
+
} else {
|
|
18473
|
+
onProgress("pip");
|
|
18474
|
+
const headroomPkg = headroomPipPackage(extras);
|
|
18475
|
+
const installOk = await pipInstall([headroomPkg, ...SERVER_DEPS], [], ENGINE_INSTALL_TIMEOUT_MS);
|
|
18476
|
+
if (!installOk) {
|
|
18477
|
+
log.warn("host-agent", `headroom engine install failed (${headroomPkg}) \u2014 skipping Headroom`);
|
|
18478
|
+
return false;
|
|
18479
|
+
}
|
|
18480
|
+
log.info("host-agent", `headroom + ONNX engines installed (${headroomPkg})`);
|
|
18481
|
+
onProgress("model");
|
|
18482
|
+
const predownloadPy = headroomModelPredownloadScript();
|
|
18483
|
+
const dl = await runner.run(py, ["-c", predownloadPy], {
|
|
18484
|
+
timeoutMs: ENGINE_INSTALL_TIMEOUT_MS
|
|
18485
|
+
});
|
|
18486
|
+
log.info(
|
|
18487
|
+
"host-agent",
|
|
18488
|
+
dl.code === 0 ? "Kompress model pre-downloaded \u2014 first prompt will be fast" : "Kompress model pre-download failed (best-effort) \u2014 first prompt may be slow"
|
|
18489
|
+
);
|
|
18460
18490
|
}
|
|
18461
|
-
log.info("host-agent", `headroom + ONNX engines installed (${headroomPkg})`);
|
|
18462
|
-
onProgress("model");
|
|
18463
|
-
const predownloadPy = headroomModelPredownloadScript();
|
|
18464
|
-
const dl = await runner.run(py, ["-c", predownloadPy], {
|
|
18465
|
-
timeoutMs: ENGINE_INSTALL_TIMEOUT_MS
|
|
18466
|
-
});
|
|
18467
|
-
log.info(
|
|
18468
|
-
"host-agent",
|
|
18469
|
-
dl.code === 0 ? "Kompress model pre-downloaded \u2014 first prompt will be fast" : "Kompress model pre-download failed (best-effort) \u2014 first prompt may be slow"
|
|
18470
|
-
);
|
|
18471
18491
|
if (!runner.which("headroom")) {
|
|
18472
18492
|
log.warn("host-agent", "headroom not found on PATH after install \u2014 skipping init");
|
|
18473
18493
|
return false;
|
|
@@ -18515,7 +18535,7 @@ var import_node_child_process22 = require("child_process");
|
|
|
18515
18535
|
|
|
18516
18536
|
// src/lib/updateNotifier.ts
|
|
18517
18537
|
var fs41 = __toESM(require("fs"));
|
|
18518
|
-
var
|
|
18538
|
+
var os37 = __toESM(require("os"));
|
|
18519
18539
|
var path45 = __toESM(require("path"));
|
|
18520
18540
|
var https6 = __toESM(require("https"));
|
|
18521
18541
|
var import_node_child_process21 = require("child_process");
|
|
@@ -18525,7 +18545,7 @@ var REGISTRY_URL = `https://registry.npmjs.org/${PKG_NAME}/latest`;
|
|
|
18525
18545
|
var TTL_MS = 24 * 60 * 60 * 1e3;
|
|
18526
18546
|
var REQUEST_TIMEOUT_MS = 1500;
|
|
18527
18547
|
function cachePath() {
|
|
18528
|
-
const dir = path45.join(
|
|
18548
|
+
const dir = path45.join(os37.homedir(), ".codeam");
|
|
18529
18549
|
return path45.join(dir, "update-check.json");
|
|
18530
18550
|
}
|
|
18531
18551
|
function readCache() {
|
|
@@ -18671,7 +18691,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
18671
18691
|
if (process.env.NODE_ENV === "test") return;
|
|
18672
18692
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
18673
18693
|
if (process.env.CI) return;
|
|
18674
|
-
const current = true ? "2.61.
|
|
18694
|
+
const current = true ? "2.61.35" : null;
|
|
18675
18695
|
if (!current) return;
|
|
18676
18696
|
const cache = readCache();
|
|
18677
18697
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -18688,7 +18708,7 @@ function checkForUpdates() {
|
|
|
18688
18708
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
18689
18709
|
if (process.env.CI) return;
|
|
18690
18710
|
if (!process.stdout.isTTY) return;
|
|
18691
|
-
const current = true ? "2.61.
|
|
18711
|
+
const current = true ? "2.61.35" : null;
|
|
18692
18712
|
if (!current) return;
|
|
18693
18713
|
const cache = readCache();
|
|
18694
18714
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -18708,7 +18728,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
|
|
|
18708
18728
|
var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
|
|
18709
18729
|
var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
|
|
18710
18730
|
function currentCliVersion() {
|
|
18711
|
-
return true ? "2.61.
|
|
18731
|
+
return true ? "2.61.35" : null;
|
|
18712
18732
|
}
|
|
18713
18733
|
function runCmd(cmd, args2, timeoutMs) {
|
|
18714
18734
|
return new Promise((resolve8) => {
|
|
@@ -19362,7 +19382,7 @@ var HostAgentSupervisor = class {
|
|
|
19362
19382
|
const relay = this.relay;
|
|
19363
19383
|
if (!relay) return;
|
|
19364
19384
|
const raw = cmd.payload?.path;
|
|
19365
|
-
const target = typeof raw === "string" && raw.trim() ? path46.resolve(raw.trim()) :
|
|
19385
|
+
const target = typeof raw === "string" && raw.trim() ? path46.resolve(raw.trim()) : os38.homedir();
|
|
19366
19386
|
try {
|
|
19367
19387
|
const dirents = await fs43.promises.readdir(target, { withFileTypes: true });
|
|
19368
19388
|
const entries = dirents.filter((d3) => !d3.name.startsWith(".")).map((d3) => ({ name: d3.name, isDir: d3.isDirectory() })).sort(
|
|
@@ -19589,7 +19609,7 @@ var HostAgentSupervisor = class {
|
|
|
19589
19609
|
API_TIMEOUT_MS: "3000000",
|
|
19590
19610
|
CODEAM_AUTO_TOKEN: payload.autoPairToken
|
|
19591
19611
|
};
|
|
19592
|
-
const houseConfigDir = path46.join(
|
|
19612
|
+
const houseConfigDir = path46.join(os38.homedir(), ".codeam", "house-claude");
|
|
19593
19613
|
try {
|
|
19594
19614
|
fs43.mkdirSync(houseConfigDir, { recursive: true, mode: 448 });
|
|
19595
19615
|
} catch {
|
|
@@ -19609,7 +19629,7 @@ var HostAgentSupervisor = class {
|
|
|
19609
19629
|
report("installing", "installing agent CLI");
|
|
19610
19630
|
await this.runAgentInstall(payload.agentInstallScript);
|
|
19611
19631
|
}
|
|
19612
|
-
const home = process.env.HOME ||
|
|
19632
|
+
const home = process.env.HOME || os38.homedir();
|
|
19613
19633
|
childEnv.PATH = `${home}/.local/bin:${process.env.PATH ?? ""}`;
|
|
19614
19634
|
if (payload.cloneToken) {
|
|
19615
19635
|
try {
|
|
@@ -19640,7 +19660,7 @@ var HostAgentSupervisor = class {
|
|
|
19640
19660
|
}
|
|
19641
19661
|
if (payload.headroomEnabled && payload.headroomAgent && payload.headroomSavingsIngestUrl && isHeadroomSupportedAgent(payload.headroomAgent)) {
|
|
19642
19662
|
report("headroom", "setting up Headroom proxy");
|
|
19643
|
-
const freeBytes = await this.getFreeDisk(
|
|
19663
|
+
const freeBytes = await this.getFreeDisk(os38.homedir());
|
|
19644
19664
|
const alreadyInstalled = this.isHeadroomInstalled();
|
|
19645
19665
|
if (!alreadyInstalled && freeBytes !== null && freeBytes < HEADROOM_MIN_FREE_DISK_BYTES) {
|
|
19646
19666
|
const freeGb = (freeBytes / 1e9).toFixed(1);
|
|
@@ -19824,7 +19844,7 @@ var HostAgentSupervisor = class {
|
|
|
19824
19844
|
*/
|
|
19825
19845
|
runAgentInstall(script) {
|
|
19826
19846
|
return new Promise((resolve8) => {
|
|
19827
|
-
const home = process.env.HOME ||
|
|
19847
|
+
const home = process.env.HOME || os38.homedir();
|
|
19828
19848
|
const child = (0, import_node_child_process24.spawn)("sh", ["-c", script], {
|
|
19829
19849
|
env: { ...process.env, HOME: home },
|
|
19830
19850
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -20017,7 +20037,7 @@ async function configureHeadroom(action, ctx, deps) {
|
|
|
20017
20037
|
|
|
20018
20038
|
// src/services/headroom/budget-relaunch.ts
|
|
20019
20039
|
var fs44 = __toESM(require("fs"));
|
|
20020
|
-
var
|
|
20040
|
+
var os39 = __toESM(require("os"));
|
|
20021
20041
|
var path47 = __toESM(require("path"));
|
|
20022
20042
|
var import_child_process13 = require("child_process");
|
|
20023
20043
|
function amendDeploymentManifestBudget(manifest, budget) {
|
|
@@ -20124,7 +20144,7 @@ function spawnProxyReal2(_budget) {
|
|
|
20124
20144
|
});
|
|
20125
20145
|
}
|
|
20126
20146
|
function makeRealApplyBudgetDeps() {
|
|
20127
|
-
const homeDir2 =
|
|
20147
|
+
const homeDir2 = os39.homedir();
|
|
20128
20148
|
return {
|
|
20129
20149
|
findDeployments: () => findHeadroomDeployments(homeDir2, {
|
|
20130
20150
|
readDir: (dir) => fs44.readdirSync(dir),
|
|
@@ -20139,11 +20159,11 @@ function makeRealApplyBudgetDeps() {
|
|
|
20139
20159
|
|
|
20140
20160
|
// src/services/preview/port-registry.ts
|
|
20141
20161
|
var fs45 = __toESM(require("fs"));
|
|
20142
|
-
var
|
|
20162
|
+
var os40 = __toESM(require("os"));
|
|
20143
20163
|
var path48 = __toESM(require("path"));
|
|
20144
20164
|
var import_child_process14 = require("child_process");
|
|
20145
20165
|
function registryPath() {
|
|
20146
|
-
return path48.join(
|
|
20166
|
+
return path48.join(os40.homedir(), ".codeam", "preview-ports.json");
|
|
20147
20167
|
}
|
|
20148
20168
|
function readRegistry() {
|
|
20149
20169
|
try {
|
|
@@ -21330,7 +21350,7 @@ async function establishTunnel(ctx, dev) {
|
|
|
21330
21350
|
// src/beads/bd-adapter.ts
|
|
21331
21351
|
var import_child_process19 = require("child_process");
|
|
21332
21352
|
var fs51 = __toESM(require("fs"));
|
|
21333
|
-
var
|
|
21353
|
+
var os42 = __toESM(require("os"));
|
|
21334
21354
|
var path54 = __toESM(require("path"));
|
|
21335
21355
|
var BD_PACKAGE = "@beads/bd";
|
|
21336
21356
|
function resolveBundledBdBinary() {
|
|
@@ -21448,7 +21468,7 @@ var BdAdapter = class {
|
|
|
21448
21468
|
const env = { ...process.env };
|
|
21449
21469
|
if (!env.HOME) {
|
|
21450
21470
|
try {
|
|
21451
|
-
const home =
|
|
21471
|
+
const home = os42.homedir();
|
|
21452
21472
|
if (home) env.HOME = home;
|
|
21453
21473
|
} catch {
|
|
21454
21474
|
}
|
|
@@ -21541,7 +21561,7 @@ function coerceIssue(row, projectKey) {
|
|
|
21541
21561
|
// src/beads/provisioner.ts
|
|
21542
21562
|
var import_child_process23 = require("child_process");
|
|
21543
21563
|
var fs54 = __toESM(require("fs"));
|
|
21544
|
-
var
|
|
21564
|
+
var os44 = __toESM(require("os"));
|
|
21545
21565
|
var path57 = __toESM(require("path"));
|
|
21546
21566
|
|
|
21547
21567
|
// src/beads/install-bd.ts
|
|
@@ -21608,7 +21628,7 @@ async function installBd(platform3 = process.platform) {
|
|
|
21608
21628
|
// src/beads/install-dolt.ts
|
|
21609
21629
|
var import_child_process21 = require("child_process");
|
|
21610
21630
|
var fs52 = __toESM(require("fs"));
|
|
21611
|
-
var
|
|
21631
|
+
var os43 = __toESM(require("os"));
|
|
21612
21632
|
var path55 = __toESM(require("path"));
|
|
21613
21633
|
var DOLT_INSTALL_SH_URL = "https://github.com/dolthub/dolt/releases/latest/download/install.sh";
|
|
21614
21634
|
var DOLT_MSI_URL = "https://github.com/dolthub/dolt/releases/latest/download/dolt-windows-amd64.msi";
|
|
@@ -21649,11 +21669,11 @@ function resolveDoltInstallStrategy(platform3) {
|
|
|
21649
21669
|
}
|
|
21650
21670
|
var DOLT_RELEASE_BASE = "https://github.com/dolthub/dolt/releases/latest/download";
|
|
21651
21671
|
function doltPlatformTuple(platform3, arch2) {
|
|
21652
|
-
const
|
|
21672
|
+
const os58 = platform3 === "win32" ? "windows" : platform3 === "darwin" ? "darwin" : "linux";
|
|
21653
21673
|
const a = arch2 === "x64" ? "amd64" : arch2 === "arm64" ? "arm64" : null;
|
|
21654
21674
|
if (!a) return null;
|
|
21655
|
-
if (
|
|
21656
|
-
return `${
|
|
21675
|
+
if (os58 === "windows" && a !== "amd64") return null;
|
|
21676
|
+
return `${os58}-${a}`;
|
|
21657
21677
|
}
|
|
21658
21678
|
function resolveDoltTarballStrategy(targetDir, platform3, arch2) {
|
|
21659
21679
|
const tuple = doltPlatformTuple(platform3, arch2);
|
|
@@ -21698,7 +21718,7 @@ async function installDoltToDir(targetDir, platform3 = process.platform, arch2 =
|
|
|
21698
21718
|
return result;
|
|
21699
21719
|
}
|
|
21700
21720
|
var _doltPathSeam = {
|
|
21701
|
-
homedir: () =>
|
|
21721
|
+
homedir: () => os43.homedir(),
|
|
21702
21722
|
getPath: () => process.env.PATH ?? "",
|
|
21703
21723
|
setPath: (p2) => {
|
|
21704
21724
|
process.env.PATH = p2;
|
|
@@ -21990,7 +22010,7 @@ var _provisionSeam = {
|
|
|
21990
22010
|
};
|
|
21991
22011
|
var _linkSeam = {
|
|
21992
22012
|
platform: () => process.platform,
|
|
21993
|
-
homedir: () =>
|
|
22013
|
+
homedir: () => os44.homedir(),
|
|
21994
22014
|
isWritableDir: (dir) => {
|
|
21995
22015
|
try {
|
|
21996
22016
|
fs54.accessSync(dir, fs54.constants.W_OK);
|
|
@@ -22785,7 +22805,7 @@ function cleanupAttachmentTempFiles() {
|
|
|
22785
22805
|
function saveFilesTemp(files) {
|
|
22786
22806
|
return files.filter(({ base64 }) => base64 && base64.length > 0).map(({ filename, base64 }) => {
|
|
22787
22807
|
const safeName = filename.replace(/[^a-zA-Z0-9._-]/g, "_").slice(0, 80);
|
|
22788
|
-
const tmpPath = path61.join(
|
|
22808
|
+
const tmpPath = path61.join(os48.tmpdir(), `codeam-${(0, import_crypto3.randomUUID)()}-${safeName}`);
|
|
22789
22809
|
fs57.writeFileSync(tmpPath, Buffer.from(base64, "base64"));
|
|
22790
22810
|
pendingAttachmentFiles.add(tmpPath);
|
|
22791
22811
|
return tmpPath;
|
|
@@ -23378,7 +23398,7 @@ var vcsAgentReviewH = async (ctx, cmd, parsed) => {
|
|
|
23378
23398
|
});
|
|
23379
23399
|
const token = ctx.pluginAuthToken;
|
|
23380
23400
|
void (async () => {
|
|
23381
|
-
const
|
|
23401
|
+
const os58 = createOsStrategy();
|
|
23382
23402
|
try {
|
|
23383
23403
|
const report = await reviewPullRequest(
|
|
23384
23404
|
{
|
|
@@ -23387,7 +23407,7 @@ var vcsAgentReviewH = async (ctx, cmd, parsed) => {
|
|
|
23387
23407
|
baseBranch: parsed.baseBranch
|
|
23388
23408
|
},
|
|
23389
23409
|
{
|
|
23390
|
-
runReview: (input) => new CoderabbitRuntimeStrategy(
|
|
23410
|
+
runReview: (input) => new CoderabbitRuntimeStrategy(os58).runOneShot(input),
|
|
23391
23411
|
runGh: (args2) => defaultRunGh(args2),
|
|
23392
23412
|
postReport: async (r) => {
|
|
23393
23413
|
if (!token) return;
|
|
@@ -24446,7 +24466,7 @@ async function claimOnce(token, pluginId, pluginSecretHash) {
|
|
|
24446
24466
|
pluginId,
|
|
24447
24467
|
ideName: "codeam-cli (codespace)",
|
|
24448
24468
|
ideVersion: process.env.npm_package_version ?? "unknown",
|
|
24449
|
-
hostname:
|
|
24469
|
+
hostname: os49.hostname(),
|
|
24450
24470
|
codespaceName: process.env.CODESPACE_NAME ?? "",
|
|
24451
24471
|
// Current git branch of the codespace's working directory, so the
|
|
24452
24472
|
// backend can populate `PairedSession.branch` for the codespace pair.
|
|
@@ -24507,7 +24527,7 @@ async function claim(token, pluginId, pluginSecretHash) {
|
|
|
24507
24527
|
}
|
|
24508
24528
|
}
|
|
24509
24529
|
function pairAutoLockPath() {
|
|
24510
|
-
return path62.join(
|
|
24530
|
+
return path62.join(os49.homedir(), ".codeam", "pair-auto.lock");
|
|
24511
24531
|
}
|
|
24512
24532
|
function isLivePairAuto(pid) {
|
|
24513
24533
|
if (!Number.isInteger(pid) || pid <= 0 || pid === process.pid) return false;
|
|
@@ -24527,7 +24547,7 @@ function isLiveCodeam(pid) {
|
|
|
24527
24547
|
}
|
|
24528
24548
|
function daemonLockPath(sessionId) {
|
|
24529
24549
|
const safe = sessionId.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
24530
|
-
return path62.join(
|
|
24550
|
+
return path62.join(os49.homedir(), ".codeam", `daemon-${safe}.lock`);
|
|
24531
24551
|
}
|
|
24532
24552
|
function acquireDaemonLock(sessionId) {
|
|
24533
24553
|
const lockPath = daemonLockPath(sessionId);
|
|
@@ -25410,7 +25430,7 @@ var import_node_crypto11 = require("crypto");
|
|
|
25410
25430
|
// src/services/history.service.ts
|
|
25411
25431
|
var fs60 = __toESM(require("fs"));
|
|
25412
25432
|
var path65 = __toESM(require("path"));
|
|
25413
|
-
var
|
|
25433
|
+
var os51 = __toESM(require("os"));
|
|
25414
25434
|
var https7 = __toESM(require("https"));
|
|
25415
25435
|
var http6 = __toESM(require("http"));
|
|
25416
25436
|
var import_zod2 = require("zod");
|
|
@@ -25578,7 +25598,7 @@ var HistoryService = class _HistoryService {
|
|
|
25578
25598
|
return this._quotaPercent === null || Date.now() - this._quotaFetchedAt > ttlMs;
|
|
25579
25599
|
}
|
|
25580
25600
|
get projectDir() {
|
|
25581
|
-
return this.runtime.resolveHistoryDir(this.cwd) ?? path65.join(
|
|
25601
|
+
return this.runtime.resolveHistoryDir(this.cwd) ?? path65.join(os51.homedir(), ".claude", "projects", encodeCwd(this.cwd));
|
|
25582
25602
|
}
|
|
25583
25603
|
/** Set the current Claude conversation ID (extracted from /cost command or session start) */
|
|
25584
25604
|
setCurrentConversationId(id) {
|
|
@@ -26006,7 +26026,7 @@ var HistoryService = class _HistoryService {
|
|
|
26006
26026
|
var import_node_child_process27 = require("child_process");
|
|
26007
26027
|
var fs61 = __toESM(require("fs/promises"));
|
|
26008
26028
|
var fsSync = __toESM(require("fs"));
|
|
26009
|
-
var
|
|
26029
|
+
var os52 = __toESM(require("os"));
|
|
26010
26030
|
var path66 = __toESM(require("path"));
|
|
26011
26031
|
var import_node_stream = require("stream");
|
|
26012
26032
|
|
|
@@ -30872,7 +30892,7 @@ function applyLineRange(content, line, limit) {
|
|
|
30872
30892
|
return { content: lines.slice(start2, end).join("\n") };
|
|
30873
30893
|
}
|
|
30874
30894
|
function knownAgentBinaryDirs() {
|
|
30875
|
-
const home =
|
|
30895
|
+
const home = os52.homedir();
|
|
30876
30896
|
const out2 = [];
|
|
30877
30897
|
out2.push("/tmp/codeam-node20/bin");
|
|
30878
30898
|
for (const root of [
|
|
@@ -31399,10 +31419,10 @@ function commonPrefixLength(a, b) {
|
|
|
31399
31419
|
// src/agents/acp/onboarding.ts
|
|
31400
31420
|
var import_child_process27 = require("child_process");
|
|
31401
31421
|
var fs62 = __toESM(require("fs"));
|
|
31402
|
-
var
|
|
31422
|
+
var os53 = __toESM(require("os"));
|
|
31403
31423
|
var path67 = __toESM(require("path"));
|
|
31404
31424
|
var _onboardingSeam = {
|
|
31405
|
-
markerPath: (sessionId) => path67.join(
|
|
31425
|
+
markerPath: (sessionId) => path67.join(os53.homedir(), ".codeam", "welcomed", `${sessionId}.done`),
|
|
31406
31426
|
exists: (p2) => fs62.existsSync(p2),
|
|
31407
31427
|
write: (p2) => {
|
|
31408
31428
|
fs62.mkdirSync(path67.dirname(p2), { recursive: true });
|
|
@@ -35752,12 +35772,12 @@ function toEpochMs(ts) {
|
|
|
35752
35772
|
|
|
35753
35773
|
// src/agents/claude/onboarding.ts
|
|
35754
35774
|
var fs67 = __toESM(require("fs"));
|
|
35755
|
-
var
|
|
35775
|
+
var os55 = __toESM(require("os"));
|
|
35756
35776
|
var path71 = __toESM(require("path"));
|
|
35757
35777
|
var ONBOARDING_VERSION_SENTINEL = "9999.0.0";
|
|
35758
35778
|
function ensureClaudeOnboarded(cwd) {
|
|
35759
35779
|
try {
|
|
35760
|
-
const file = path71.join(
|
|
35780
|
+
const file = path71.join(os55.homedir(), ".claude.json");
|
|
35761
35781
|
let config = {};
|
|
35762
35782
|
try {
|
|
35763
35783
|
config = JSON.parse(fs67.readFileSync(file, "utf8"));
|
|
@@ -38651,9 +38671,9 @@ function checkSessions() {
|
|
|
38651
38671
|
}
|
|
38652
38672
|
}
|
|
38653
38673
|
function checkAgentBinaries() {
|
|
38654
|
-
const
|
|
38674
|
+
const os58 = createOsStrategy();
|
|
38655
38675
|
return getEnabledAgents().map((meta) => {
|
|
38656
|
-
const found =
|
|
38676
|
+
const found = os58.findInPath(meta.binaryName);
|
|
38657
38677
|
return {
|
|
38658
38678
|
id: `agent-${meta.id}`,
|
|
38659
38679
|
label: `Agent binary: ${meta.displayName} (${meta.binaryName})`,
|
|
@@ -38717,7 +38737,7 @@ function checkChokidar() {
|
|
|
38717
38737
|
}
|
|
38718
38738
|
async function doctor(args2 = []) {
|
|
38719
38739
|
const json = args2.includes("--json");
|
|
38720
|
-
const cliVersion = true ? "2.61.
|
|
38740
|
+
const cliVersion = true ? "2.61.35" : "0.0.0-dev";
|
|
38721
38741
|
const apiBase2 = resolveApiBaseUrl();
|
|
38722
38742
|
const diagnosticId = (0, import_node_crypto13.randomUUID)();
|
|
38723
38743
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -39228,7 +39248,7 @@ async function mcpRun(args2) {
|
|
|
39228
39248
|
// src/commands/version.ts
|
|
39229
39249
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
39230
39250
|
function version2() {
|
|
39231
|
-
const v = true ? "2.61.
|
|
39251
|
+
const v = true ? "2.61.35" : "unknown";
|
|
39232
39252
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
39233
39253
|
}
|
|
39234
39254
|
|
|
@@ -39377,10 +39397,10 @@ var EXIT_CODE_NAMES = {
|
|
|
39377
39397
|
};
|
|
39378
39398
|
|
|
39379
39399
|
// src/index.ts
|
|
39380
|
-
var
|
|
39400
|
+
var os57 = __toESM(require("os"));
|
|
39381
39401
|
if (!process.env.HOME) {
|
|
39382
39402
|
try {
|
|
39383
|
-
const home =
|
|
39403
|
+
const home = os57.homedir();
|
|
39384
39404
|
if (home) process.env.HOME = home;
|
|
39385
39405
|
} catch {
|
|
39386
39406
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.61.
|
|
3
|
+
"version": "2.61.35",
|
|
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",
|