codeam-cli 2.36.0 → 2.36.2
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 +23 -0
- package/dist/index.js +117 -95
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ 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.36.1] — 2026-06-11
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Init beads workspace before starting dolt server + harden installer
|
|
12
|
+
|
|
13
|
+
## [2.36.0] — 2026-06-11
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **cli:** Per-OS dolt installer (install-dolt.ts)
|
|
18
|
+
- **cli:** Stable bd-safe prefix from projectKey (D16)
|
|
19
|
+
- **cli:** Shared dolt sql-server lifecycle (ensureSharedServer, D8)
|
|
20
|
+
- **cli:** Adapter runs in shared-server mode; correct stale embedded doc
|
|
21
|
+
- **cli:** Provision dolt + shared-server + per-prefix DB (D15-D17)
|
|
22
|
+
- **cli:** Export BEADS_DOLT_SHARED_SERVER to the agent (GAP 2, D15)
|
|
23
|
+
- **cli:** Harden dolt PATH resolution for codespaces
|
|
24
|
+
- **cli:** No-sudo dolt fallback (tarball -> ~/.local/bin) for locked-down containers
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **cli:** Make dolt PATH resolution host-independent (Windows CI)
|
|
29
|
+
|
|
7
30
|
## [2.35.9] — 2026-06-10
|
|
8
31
|
|
|
9
32
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -498,7 +498,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
|
|
|
498
498
|
// package.json
|
|
499
499
|
var package_default = {
|
|
500
500
|
name: "codeam-cli",
|
|
501
|
-
version: "2.36.
|
|
501
|
+
version: "2.36.2",
|
|
502
502
|
description: "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device \u2014 async. The terminal companion for CodeAgent Mobile.",
|
|
503
503
|
type: "commonjs",
|
|
504
504
|
main: "dist/index.js",
|
|
@@ -5900,7 +5900,7 @@ function readAnonId() {
|
|
|
5900
5900
|
}
|
|
5901
5901
|
function superProperties() {
|
|
5902
5902
|
return {
|
|
5903
|
-
cliVersion: true ? "2.36.
|
|
5903
|
+
cliVersion: true ? "2.36.2" : "0.0.0-dev",
|
|
5904
5904
|
nodeVersion: process.version,
|
|
5905
5905
|
platform: process.platform,
|
|
5906
5906
|
arch: process.arch,
|
|
@@ -7248,10 +7248,10 @@ function buildForPlatform(platform2) {
|
|
|
7248
7248
|
var import_node_crypto4 = require("crypto");
|
|
7249
7249
|
|
|
7250
7250
|
// src/agents/claude/resolver.ts
|
|
7251
|
-
function buildClaudeLaunch(extraArgs = [],
|
|
7252
|
-
const found =
|
|
7251
|
+
function buildClaudeLaunch(extraArgs = [], os31 = createOsStrategy()) {
|
|
7252
|
+
const found = os31.findInPath("claude") ?? os31.findInPath("claude-code");
|
|
7253
7253
|
if (!found) return null;
|
|
7254
|
-
return
|
|
7254
|
+
return os31.buildLaunch(found, extraArgs);
|
|
7255
7255
|
}
|
|
7256
7256
|
|
|
7257
7257
|
// src/agents/claude/installer.ts
|
|
@@ -9994,8 +9994,8 @@ var ClaudeRuntimeStrategy = class {
|
|
|
9994
9994
|
meta = getAgent("claude");
|
|
9995
9995
|
mode = "interactive";
|
|
9996
9996
|
os;
|
|
9997
|
-
constructor(
|
|
9998
|
-
this.os =
|
|
9997
|
+
constructor(os31) {
|
|
9998
|
+
this.os = os31;
|
|
9999
9999
|
}
|
|
10000
10000
|
/**
|
|
10001
10001
|
* Claude Code's react-ink TUI enables bracketed-paste mode at
|
|
@@ -11025,8 +11025,8 @@ function codexCredentialLocator() {
|
|
|
11025
11025
|
function codexLoginLauncher() {
|
|
11026
11026
|
return {
|
|
11027
11027
|
async ensureInstalled() {
|
|
11028
|
-
const
|
|
11029
|
-
return
|
|
11028
|
+
const os31 = createOsStrategy();
|
|
11029
|
+
return os31.findInPath("codex") !== null;
|
|
11030
11030
|
},
|
|
11031
11031
|
launch() {
|
|
11032
11032
|
return (0, import_node_child_process3.spawn)("codex", ["login"], { stdio: "inherit" });
|
|
@@ -11049,8 +11049,8 @@ var CodexRuntimeStrategy = class {
|
|
|
11049
11049
|
meta = getAgent("codex");
|
|
11050
11050
|
mode = "interactive";
|
|
11051
11051
|
os;
|
|
11052
|
-
constructor(
|
|
11053
|
-
this.os =
|
|
11052
|
+
constructor(os31) {
|
|
11053
|
+
this.os = os31;
|
|
11054
11054
|
}
|
|
11055
11055
|
async prepareLaunch() {
|
|
11056
11056
|
let binary = this.os.findInPath("codex");
|
|
@@ -11156,12 +11156,12 @@ var CodexRuntimeStrategy = class {
|
|
|
11156
11156
|
});
|
|
11157
11157
|
}
|
|
11158
11158
|
};
|
|
11159
|
-
function resolveNpm(
|
|
11160
|
-
return
|
|
11159
|
+
function resolveNpm(os31) {
|
|
11160
|
+
return os31.id === "win32" ? "npm.cmd" : "npm";
|
|
11161
11161
|
}
|
|
11162
|
-
async function installCodexViaNpm(
|
|
11162
|
+
async function installCodexViaNpm(os31) {
|
|
11163
11163
|
return new Promise((resolve7, reject) => {
|
|
11164
|
-
const proc = (0, import_node_child_process4.spawn)(resolveNpm(
|
|
11164
|
+
const proc = (0, import_node_child_process4.spawn)(resolveNpm(os31), ["install", "-g", "@openai/codex"], {
|
|
11165
11165
|
stdio: "inherit"
|
|
11166
11166
|
});
|
|
11167
11167
|
proc.on("close", (code) => {
|
|
@@ -11178,16 +11178,16 @@ async function installCodexViaNpm(os32) {
|
|
|
11178
11178
|
});
|
|
11179
11179
|
});
|
|
11180
11180
|
}
|
|
11181
|
-
function augmentNpmGlobalBin(
|
|
11181
|
+
function augmentNpmGlobalBin(os31) {
|
|
11182
11182
|
try {
|
|
11183
|
-
const result = (0, import_node_child_process4.spawnSync)(resolveNpm(
|
|
11183
|
+
const result = (0, import_node_child_process4.spawnSync)(resolveNpm(os31), ["prefix", "-g"], {
|
|
11184
11184
|
stdio: ["ignore", "pipe", "ignore"]
|
|
11185
11185
|
});
|
|
11186
11186
|
if (result.status !== 0) return;
|
|
11187
11187
|
const prefix = result.stdout.toString().trim();
|
|
11188
11188
|
if (!prefix) return;
|
|
11189
|
-
const binDir =
|
|
11190
|
-
|
|
11189
|
+
const binDir = os31.id === "win32" ? prefix : path17.join(prefix, "bin");
|
|
11190
|
+
os31.augmentPath([binDir]);
|
|
11191
11191
|
} catch {
|
|
11192
11192
|
}
|
|
11193
11193
|
}
|
|
@@ -11271,9 +11271,9 @@ var import_node_child_process7 = require("child_process");
|
|
|
11271
11271
|
// src/agents/coderabbit/installer.ts
|
|
11272
11272
|
var import_node_child_process5 = require("child_process");
|
|
11273
11273
|
var INSTALL_URL = "https://cli.coderabbit.ai/install.sh";
|
|
11274
|
-
async function ensureCoderabbitInstalled(
|
|
11275
|
-
if (
|
|
11276
|
-
if (
|
|
11274
|
+
async function ensureCoderabbitInstalled(os31) {
|
|
11275
|
+
if (os31.findInPath("coderabbit")) return true;
|
|
11276
|
+
if (os31.id === "win32") {
|
|
11277
11277
|
console.error(
|
|
11278
11278
|
"\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"
|
|
11279
11279
|
);
|
|
@@ -11288,8 +11288,8 @@ async function ensureCoderabbitInstalled(os32) {
|
|
|
11288
11288
|
proc.on("error", () => resolve7(false));
|
|
11289
11289
|
});
|
|
11290
11290
|
if (!ok) return false;
|
|
11291
|
-
|
|
11292
|
-
return
|
|
11291
|
+
os31.augmentPath([`${os31.homeDir()}/.local/bin`, "/opt/homebrew/bin"]);
|
|
11292
|
+
return os31.findInPath("coderabbit") !== null;
|
|
11293
11293
|
}
|
|
11294
11294
|
|
|
11295
11295
|
// src/agents/coderabbit/link.ts
|
|
@@ -11316,10 +11316,10 @@ function coderabbitCredentialLocator() {
|
|
|
11316
11316
|
extract: extractLocalCoderabbitToken
|
|
11317
11317
|
};
|
|
11318
11318
|
}
|
|
11319
|
-
function coderabbitLoginLauncher(
|
|
11319
|
+
function coderabbitLoginLauncher(os31) {
|
|
11320
11320
|
return {
|
|
11321
11321
|
async ensureInstalled() {
|
|
11322
|
-
return ensureCoderabbitInstalled(
|
|
11322
|
+
return ensureCoderabbitInstalled(os31);
|
|
11323
11323
|
},
|
|
11324
11324
|
launch() {
|
|
11325
11325
|
return (0, import_node_child_process6.spawn)("coderabbit", ["login"], { stdio: "inherit" });
|
|
@@ -11365,8 +11365,8 @@ var CoderabbitRuntimeStrategy = class {
|
|
|
11365
11365
|
meta = getAgent("coderabbit");
|
|
11366
11366
|
mode = "batch";
|
|
11367
11367
|
os;
|
|
11368
|
-
constructor(
|
|
11369
|
-
this.os =
|
|
11368
|
+
constructor(os31) {
|
|
11369
|
+
this.os = os31;
|
|
11370
11370
|
}
|
|
11371
11371
|
getDefaultArgs() {
|
|
11372
11372
|
return ["review"];
|
|
@@ -11481,10 +11481,10 @@ function cursorCredentialLocator() {
|
|
|
11481
11481
|
extract: extractLocalCursorToken
|
|
11482
11482
|
};
|
|
11483
11483
|
}
|
|
11484
|
-
function cursorLoginLauncher(
|
|
11484
|
+
function cursorLoginLauncher(os31) {
|
|
11485
11485
|
return {
|
|
11486
11486
|
async ensureInstalled() {
|
|
11487
|
-
if (
|
|
11487
|
+
if (os31.findInPath("cursor-agent")) return true;
|
|
11488
11488
|
console.error(
|
|
11489
11489
|
"\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"
|
|
11490
11490
|
);
|
|
@@ -11546,8 +11546,8 @@ var CursorRuntimeStrategy = class {
|
|
|
11546
11546
|
meta = getAgent("cursor");
|
|
11547
11547
|
mode = "interactive";
|
|
11548
11548
|
os;
|
|
11549
|
-
constructor(
|
|
11550
|
-
this.os =
|
|
11549
|
+
constructor(os31) {
|
|
11550
|
+
this.os = os31;
|
|
11551
11551
|
}
|
|
11552
11552
|
async prepareLaunch() {
|
|
11553
11553
|
const binary = this.os.findInPath("cursor-agent");
|
|
@@ -11667,10 +11667,10 @@ function aiderCredentialLocator() {
|
|
|
11667
11667
|
extract: extractLocalAiderToken
|
|
11668
11668
|
};
|
|
11669
11669
|
}
|
|
11670
|
-
function aiderLoginLauncher(
|
|
11670
|
+
function aiderLoginLauncher(os31) {
|
|
11671
11671
|
return {
|
|
11672
11672
|
async ensureInstalled() {
|
|
11673
|
-
if (
|
|
11673
|
+
if (os31.findInPath("aider")) return true;
|
|
11674
11674
|
console.error(
|
|
11675
11675
|
"\n \u2717 aider binary not on PATH.\n Install Aider:\n pip install aider-chat\n then re-run `codeam link aider`.\n"
|
|
11676
11676
|
);
|
|
@@ -11680,7 +11680,7 @@ function aiderLoginLauncher(os32) {
|
|
|
11680
11680
|
console.error(
|
|
11681
11681
|
"\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"
|
|
11682
11682
|
);
|
|
11683
|
-
return (0, import_node_child_process9.spawn)(
|
|
11683
|
+
return (0, import_node_child_process9.spawn)(os31.id === "win32" ? "cmd.exe" : "sh", os31.id === "win32" ? ["/c", "exit", "0"] : ["-c", "exit 0"], {
|
|
11684
11684
|
stdio: "ignore"
|
|
11685
11685
|
});
|
|
11686
11686
|
}
|
|
@@ -11752,8 +11752,8 @@ var AiderRuntimeStrategy = class {
|
|
|
11752
11752
|
meta = getAgent("aider");
|
|
11753
11753
|
mode = "interactive";
|
|
11754
11754
|
os;
|
|
11755
|
-
constructor(
|
|
11756
|
-
this.os =
|
|
11755
|
+
constructor(os31) {
|
|
11756
|
+
this.os = os31;
|
|
11757
11757
|
}
|
|
11758
11758
|
async prepareLaunch() {
|
|
11759
11759
|
const binary = this.os.findInPath("aider");
|
|
@@ -11882,8 +11882,8 @@ function geminiCredentialLocator() {
|
|
|
11882
11882
|
function geminiLoginLauncher() {
|
|
11883
11883
|
return {
|
|
11884
11884
|
async ensureInstalled() {
|
|
11885
|
-
const
|
|
11886
|
-
return
|
|
11885
|
+
const os31 = createOsStrategy();
|
|
11886
|
+
return os31.findInPath("gemini") !== null;
|
|
11887
11887
|
},
|
|
11888
11888
|
launch() {
|
|
11889
11889
|
return (0, import_node_child_process10.spawn)("gemini", ["auth", "login"], { stdio: "inherit" });
|
|
@@ -11916,8 +11916,8 @@ var GeminiRuntimeStrategy = class {
|
|
|
11916
11916
|
meta = getAgent("gemini");
|
|
11917
11917
|
mode = "interactive";
|
|
11918
11918
|
os;
|
|
11919
|
-
constructor(
|
|
11920
|
-
this.os =
|
|
11919
|
+
constructor(os31) {
|
|
11920
|
+
this.os = os31;
|
|
11921
11921
|
}
|
|
11922
11922
|
async prepareLaunch() {
|
|
11923
11923
|
const binary = this.os.findInPath("gemini");
|
|
@@ -12017,18 +12017,18 @@ var GeminiRuntimeStrategy = class {
|
|
|
12017
12017
|
|
|
12018
12018
|
// src/agents/registry.ts
|
|
12019
12019
|
var runtimeBuilders = {
|
|
12020
|
-
claude: (
|
|
12021
|
-
codex: (
|
|
12022
|
-
coderabbit: (
|
|
12023
|
-
cursor: (
|
|
12024
|
-
aider: (
|
|
12025
|
-
gemini: (
|
|
12020
|
+
claude: (os31) => new ClaudeRuntimeStrategy(os31),
|
|
12021
|
+
codex: (os31) => new CodexRuntimeStrategy(os31),
|
|
12022
|
+
coderabbit: (os31) => new CoderabbitRuntimeStrategy(os31),
|
|
12023
|
+
cursor: (os31) => new CursorRuntimeStrategy(os31),
|
|
12024
|
+
aider: (os31) => new AiderRuntimeStrategy(os31),
|
|
12025
|
+
gemini: (os31) => new GeminiRuntimeStrategy(os31)
|
|
12026
12026
|
};
|
|
12027
12027
|
var deployBuilders = {
|
|
12028
12028
|
claude: () => new ClaudeDeployStrategy(),
|
|
12029
12029
|
codex: () => new CodexDeployStrategy()
|
|
12030
12030
|
};
|
|
12031
|
-
function createAgentStrategy(agent,
|
|
12031
|
+
function createAgentStrategy(agent, os31 = createOsStrategy()) {
|
|
12032
12032
|
if (!AGENT_REGISTRY[agent]?.enabled) {
|
|
12033
12033
|
throw new Error(
|
|
12034
12034
|
`Agent "${agent}" is not supported in this codeam-cli version. Upgrade with 'npm i -g codeam-cli@latest'.`
|
|
@@ -12038,10 +12038,10 @@ function createAgentStrategy(agent, os32 = createOsStrategy()) {
|
|
|
12038
12038
|
if (!build) {
|
|
12039
12039
|
throw new Error(`No runtime strategy registered for agent "${agent}"`);
|
|
12040
12040
|
}
|
|
12041
|
-
return build(
|
|
12041
|
+
return build(os31);
|
|
12042
12042
|
}
|
|
12043
|
-
function createInteractiveAgentStrategy(agent,
|
|
12044
|
-
const s = createAgentStrategy(agent,
|
|
12043
|
+
function createInteractiveAgentStrategy(agent, os31 = createOsStrategy()) {
|
|
12044
|
+
const s = createAgentStrategy(agent, os31);
|
|
12045
12045
|
if (s.mode !== "interactive") {
|
|
12046
12046
|
throw new Error(
|
|
12047
12047
|
`Agent "${agent}" is a batch agent; use createAgentStrategy + .runOneShot for one-shot reviews.`
|
|
@@ -15831,7 +15831,7 @@ function extractSelectPrompt(text) {
|
|
|
15831
15831
|
|
|
15832
15832
|
// src/commands/start/handlers.ts
|
|
15833
15833
|
var fs33 = __toESM(require("fs"));
|
|
15834
|
-
var
|
|
15834
|
+
var os26 = __toESM(require("os"));
|
|
15835
15835
|
var path40 = __toESM(require("path"));
|
|
15836
15836
|
var import_crypto3 = require("crypto");
|
|
15837
15837
|
var import_child_process18 = require("child_process");
|
|
@@ -17395,7 +17395,6 @@ function activePreviewSessionIds() {
|
|
|
17395
17395
|
// src/beads/bd-adapter.ts
|
|
17396
17396
|
var import_child_process13 = require("child_process");
|
|
17397
17397
|
var fs29 = __toESM(require("fs"));
|
|
17398
|
-
var os24 = __toESM(require("os"));
|
|
17399
17398
|
var path35 = __toESM(require("path"));
|
|
17400
17399
|
var BD_PACKAGE = "@beads/bd";
|
|
17401
17400
|
function resolveBundledBdBinary() {
|
|
@@ -17508,9 +17507,12 @@ var BdAdapter = class {
|
|
|
17508
17507
|
return { code: -1, stdout: "", stderr: "bd binary not resolved" };
|
|
17509
17508
|
}
|
|
17510
17509
|
const env = { ...process.env };
|
|
17511
|
-
env.BEADS_DIR = this.opts.beadsDir ?? defaultBeadsHomeDir();
|
|
17512
17510
|
env.BEADS_DOLT_SHARED_SERVER = "1";
|
|
17513
|
-
|
|
17511
|
+
delete env.BEADS_DIR;
|
|
17512
|
+
log.trace(
|
|
17513
|
+
"beads",
|
|
17514
|
+
`bd ${args2.join(" ")} (cwd=${this.opts.cwd ?? process.cwd()}, shared-server)`
|
|
17515
|
+
);
|
|
17514
17516
|
return _spawnSeam.run(binary, args2, { cwd: this.opts.cwd, env });
|
|
17515
17517
|
}
|
|
17516
17518
|
/**
|
|
@@ -17579,14 +17581,11 @@ function coerceIssue(row, projectKey) {
|
|
|
17579
17581
|
projectKey
|
|
17580
17582
|
};
|
|
17581
17583
|
}
|
|
17582
|
-
function defaultBeadsHomeDir() {
|
|
17583
|
-
return path35.join(os24.homedir(), ".beads");
|
|
17584
|
-
}
|
|
17585
17584
|
|
|
17586
17585
|
// src/beads/provisioner.ts
|
|
17587
17586
|
var import_child_process17 = require("child_process");
|
|
17588
17587
|
var fs32 = __toESM(require("fs"));
|
|
17589
|
-
var
|
|
17588
|
+
var os25 = __toESM(require("os"));
|
|
17590
17589
|
var path38 = __toESM(require("path"));
|
|
17591
17590
|
|
|
17592
17591
|
// src/beads/install-bd.ts
|
|
@@ -17653,7 +17652,7 @@ async function installBd(platform2 = process.platform) {
|
|
|
17653
17652
|
// src/beads/install-dolt.ts
|
|
17654
17653
|
var import_child_process15 = require("child_process");
|
|
17655
17654
|
var fs30 = __toESM(require("fs"));
|
|
17656
|
-
var
|
|
17655
|
+
var os24 = __toESM(require("os"));
|
|
17657
17656
|
var path36 = __toESM(require("path"));
|
|
17658
17657
|
var DOLT_INSTALL_SH_URL = "https://github.com/dolthub/dolt/releases/latest/download/install.sh";
|
|
17659
17658
|
var DOLT_MSI_URL = "https://github.com/dolthub/dolt/releases/latest/download/dolt-windows-amd64.msi";
|
|
@@ -17694,11 +17693,11 @@ function resolveDoltInstallStrategy(platform2) {
|
|
|
17694
17693
|
}
|
|
17695
17694
|
var DOLT_RELEASE_BASE = "https://github.com/dolthub/dolt/releases/latest/download";
|
|
17696
17695
|
function doltPlatformTuple(platform2, arch) {
|
|
17697
|
-
const
|
|
17696
|
+
const os31 = platform2 === "win32" ? "windows" : platform2 === "darwin" ? "darwin" : "linux";
|
|
17698
17697
|
const a = arch === "x64" ? "amd64" : arch === "arm64" ? "arm64" : null;
|
|
17699
17698
|
if (!a) return null;
|
|
17700
|
-
if (
|
|
17701
|
-
return `${
|
|
17699
|
+
if (os31 === "windows" && a !== "amd64") return null;
|
|
17700
|
+
return `${os31}-${a}`;
|
|
17702
17701
|
}
|
|
17703
17702
|
function resolveDoltTarballStrategy(targetDir, platform2, arch) {
|
|
17704
17703
|
const tuple = doltPlatformTuple(platform2, arch);
|
|
@@ -17743,7 +17742,7 @@ async function installDoltToDir(targetDir, platform2 = process.platform, arch =
|
|
|
17743
17742
|
return result;
|
|
17744
17743
|
}
|
|
17745
17744
|
var _doltPathSeam = {
|
|
17746
|
-
homedir: () =>
|
|
17745
|
+
homedir: () => os24.homedir(),
|
|
17747
17746
|
getPath: () => process.env.PATH ?? "",
|
|
17748
17747
|
setPath: (p2) => {
|
|
17749
17748
|
process.env.PATH = p2;
|
|
@@ -17800,21 +17799,44 @@ function ensureDoltResolvable(platform2 = process.platform) {
|
|
|
17800
17799
|
var _doltInstallSpawnSeam = {
|
|
17801
17800
|
run: _defaultDoltInstallSpawn
|
|
17802
17801
|
};
|
|
17802
|
+
var DOLT_INSTALL_TIMEOUT_MS = 12e4;
|
|
17803
17803
|
function _defaultDoltInstallSpawn(strategy) {
|
|
17804
17804
|
return new Promise((resolve7) => {
|
|
17805
|
+
let settled = false;
|
|
17806
|
+
let timer;
|
|
17807
|
+
const finish = (r) => {
|
|
17808
|
+
if (settled) return;
|
|
17809
|
+
settled = true;
|
|
17810
|
+
if (timer) clearTimeout(timer);
|
|
17811
|
+
resolve7(r);
|
|
17812
|
+
};
|
|
17805
17813
|
let proc;
|
|
17806
17814
|
try {
|
|
17807
|
-
proc = (0, import_child_process15.spawn)(strategy.command, strategy.args, {
|
|
17815
|
+
proc = (0, import_child_process15.spawn)(strategy.command, strategy.args, {
|
|
17816
|
+
env: process.env,
|
|
17817
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
17818
|
+
});
|
|
17808
17819
|
} catch (err) {
|
|
17809
|
-
|
|
17820
|
+
finish({ ok: false, code: -1, stderr: err.message });
|
|
17810
17821
|
return;
|
|
17811
17822
|
}
|
|
17823
|
+
timer = setTimeout(() => {
|
|
17824
|
+
try {
|
|
17825
|
+
proc.kill("SIGKILL");
|
|
17826
|
+
} catch {
|
|
17827
|
+
}
|
|
17828
|
+
finish({
|
|
17829
|
+
ok: false,
|
|
17830
|
+
code: -1,
|
|
17831
|
+
stderr: `dolt install timed out after ${DOLT_INSTALL_TIMEOUT_MS}ms`
|
|
17832
|
+
});
|
|
17833
|
+
}, DOLT_INSTALL_TIMEOUT_MS);
|
|
17812
17834
|
let stderr = "";
|
|
17813
17835
|
proc.stderr?.on("data", (c2) => {
|
|
17814
17836
|
stderr += c2.toString();
|
|
17815
17837
|
});
|
|
17816
|
-
proc.on("error", (err) =>
|
|
17817
|
-
proc.on("close", (code) =>
|
|
17838
|
+
proc.on("error", (err) => finish({ ok: false, code: -1, stderr: err.message }));
|
|
17839
|
+
proc.on("close", (code) => finish({ ok: code === 0, code: code ?? -1, stderr }));
|
|
17818
17840
|
});
|
|
17819
17841
|
}
|
|
17820
17842
|
async function installDolt(platform2 = process.platform) {
|
|
@@ -17984,7 +18006,7 @@ var _provisionSeam = {
|
|
|
17984
18006
|
};
|
|
17985
18007
|
var _linkSeam = {
|
|
17986
18008
|
platform: () => process.platform,
|
|
17987
|
-
homedir: () =>
|
|
18009
|
+
homedir: () => os25.homedir(),
|
|
17988
18010
|
isWritableDir: (dir) => {
|
|
17989
18011
|
try {
|
|
17990
18012
|
fs32.accessSync(dir, fs32.constants.W_OK);
|
|
@@ -18125,12 +18147,6 @@ async function provisionBeads(opts = {}) {
|
|
|
18125
18147
|
return result;
|
|
18126
18148
|
}
|
|
18127
18149
|
result.doltAvailable = true;
|
|
18128
|
-
const server = await _provisionSeam.ensureSharedServer(bd);
|
|
18129
|
-
result.serverUp = server.up;
|
|
18130
|
-
if (!server.up) {
|
|
18131
|
-
log.warn("beads", "shared dolt sql-server not up \u2014 beads disabled this run");
|
|
18132
|
-
return result;
|
|
18133
|
-
}
|
|
18134
18150
|
const { projectKey } = _provisionSeam.deriveProjectIdentity(opts.cwd);
|
|
18135
18151
|
const prefix = prefixForProjectKey(projectKey);
|
|
18136
18152
|
result.prefix = prefix;
|
|
@@ -18150,6 +18166,12 @@ async function provisionBeads(opts = {}) {
|
|
|
18150
18166
|
return result;
|
|
18151
18167
|
}
|
|
18152
18168
|
result.initialized = true;
|
|
18169
|
+
const server = await _provisionSeam.ensureSharedServer(bd);
|
|
18170
|
+
result.serverUp = server.up;
|
|
18171
|
+
if (!server.up) {
|
|
18172
|
+
log.warn("beads", "shared dolt sql-server not up \u2014 beads disabled this run");
|
|
18173
|
+
return result;
|
|
18174
|
+
}
|
|
18153
18175
|
const exp = await bd.run(["config", "set", "export.auto", "true"]);
|
|
18154
18176
|
result.exportEnabled = exp.code === 0;
|
|
18155
18177
|
result.agentsWired = await setupAgents(bd, opts.agents ?? []);
|
|
@@ -18271,7 +18293,7 @@ var BeadsWatcher = class {
|
|
|
18271
18293
|
constructor(opts) {
|
|
18272
18294
|
this.opts = opts;
|
|
18273
18295
|
this.bd = opts.adapter ?? new BdAdapter({ cwd: opts.cwd, beadsDir: opts.beadsDir });
|
|
18274
|
-
this.feedPath = opts.feedPath ?? path39.join(
|
|
18296
|
+
this.feedPath = opts.feedPath ?? path39.join(opts.cwd ?? process.cwd(), ".beads", "issues.jsonl");
|
|
18275
18297
|
this.apiBase = opts.apiBaseUrl ?? API_BASE4;
|
|
18276
18298
|
}
|
|
18277
18299
|
opts;
|
|
@@ -18452,8 +18474,8 @@ async function applyBeadsAction(action, deps) {
|
|
|
18452
18474
|
async function startBeads(opts) {
|
|
18453
18475
|
const adapter = new BdAdapter({ cwd: opts.cwd });
|
|
18454
18476
|
const provision = await provisionBeads({ cwd: opts.cwd, adapter, agents: opts.agents });
|
|
18455
|
-
if (!provision.bdAvailable || !provision.initialized) {
|
|
18456
|
-
log.warn("beads", "
|
|
18477
|
+
if (!provision.bdAvailable || !provision.initialized || !provision.serverUp) {
|
|
18478
|
+
log.warn("beads", "beads not fully provisioned \u2014 watcher not started this run");
|
|
18457
18479
|
return null;
|
|
18458
18480
|
}
|
|
18459
18481
|
const watcher = new BeadsWatcher({
|
|
@@ -18484,7 +18506,7 @@ async function provisionBeadsForStart(ctx) {
|
|
|
18484
18506
|
log.trace("beads", "CODEAM_BEADS_DISABLED set \u2014 beads off this run");
|
|
18485
18507
|
return null;
|
|
18486
18508
|
}
|
|
18487
|
-
process.env.BEADS_DIR
|
|
18509
|
+
delete process.env.BEADS_DIR;
|
|
18488
18510
|
process.env.BEADS_DOLT_SHARED_SERVER = "1";
|
|
18489
18511
|
if (!ctx.pluginAuthToken) {
|
|
18490
18512
|
log.trace("beads", "no pluginAuthToken \u2014 beads off");
|
|
@@ -18558,7 +18580,7 @@ function cleanupAttachmentTempFiles() {
|
|
|
18558
18580
|
function saveFilesTemp(files) {
|
|
18559
18581
|
return files.filter(({ base64 }) => base64 && base64.length > 0).map(({ filename, base64 }) => {
|
|
18560
18582
|
const safeName = filename.replace(/[^a-zA-Z0-9._-]/g, "_").slice(0, 80);
|
|
18561
|
-
const tmpPath = path40.join(
|
|
18583
|
+
const tmpPath = path40.join(os26.tmpdir(), `codeam-${(0, import_crypto3.randomUUID)()}-${safeName}`);
|
|
18562
18584
|
fs33.writeFileSync(tmpPath, Buffer.from(base64, "base64"));
|
|
18563
18585
|
pendingAttachmentFiles.add(tmpPath);
|
|
18564
18586
|
return tmpPath;
|
|
@@ -19594,7 +19616,7 @@ async function dispatchCommand(ctx, cmd) {
|
|
|
19594
19616
|
// src/services/file-watcher.service.ts
|
|
19595
19617
|
var import_child_process19 = require("child_process");
|
|
19596
19618
|
var fs34 = __toESM(require("fs"));
|
|
19597
|
-
var
|
|
19619
|
+
var os27 = __toESM(require("os"));
|
|
19598
19620
|
var path41 = __toESM(require("path"));
|
|
19599
19621
|
var import_ignore = __toESM(require("ignore"));
|
|
19600
19622
|
|
|
@@ -19705,10 +19727,10 @@ var WINDOWS_LEGACY_JUNCTIONS = [
|
|
|
19705
19727
|
/[\\/]Start Menu([\\/]|$)/i,
|
|
19706
19728
|
/[\\/]Templates([\\/]|$)/i
|
|
19707
19729
|
];
|
|
19708
|
-
function isUnsafeWindowsWatchRoot(dir,
|
|
19730
|
+
function isUnsafeWindowsWatchRoot(dir, homedir23) {
|
|
19709
19731
|
const norm = (p2) => p2.replace(/\//g, "\\").replace(/\\+$/, "").toLowerCase();
|
|
19710
19732
|
const cwd = norm(dir);
|
|
19711
|
-
const home = norm(
|
|
19733
|
+
const home = norm(homedir23);
|
|
19712
19734
|
if (cwd === home) return true;
|
|
19713
19735
|
if (/^[a-z]:$/.test(cwd)) return true;
|
|
19714
19736
|
const sysRoots = [
|
|
@@ -19807,7 +19829,7 @@ var FileWatcherService = class {
|
|
|
19807
19829
|
throw new Error("FileWatcherService has already been stopped \u2014 re-instantiate to restart.");
|
|
19808
19830
|
}
|
|
19809
19831
|
const isWin = process.platform === "win32";
|
|
19810
|
-
if (isWin && isUnsafeWindowsWatchRoot(this.opts.workingDir,
|
|
19832
|
+
if (isWin && isUnsafeWindowsWatchRoot(this.opts.workingDir, os27.homedir())) {
|
|
19811
19833
|
log.warn(
|
|
19812
19834
|
"fileWatcher",
|
|
19813
19835
|
`refusing to watch ${this.opts.workingDir} \u2014 looks like a Windows user-profile or system path. Run codeam from your project folder to enable file change emission.`
|
|
@@ -22506,7 +22528,7 @@ var OutputService = class _OutputService {
|
|
|
22506
22528
|
// src/services/history.service.ts
|
|
22507
22529
|
var fs36 = __toESM(require("fs"));
|
|
22508
22530
|
var path44 = __toESM(require("path"));
|
|
22509
|
-
var
|
|
22531
|
+
var os28 = __toESM(require("os"));
|
|
22510
22532
|
var https7 = __toESM(require("https"));
|
|
22511
22533
|
var http7 = __toESM(require("http"));
|
|
22512
22534
|
var import_zod2 = require("zod");
|
|
@@ -22668,7 +22690,7 @@ var HistoryService = class _HistoryService {
|
|
|
22668
22690
|
return this._quotaPercent === null || Date.now() - this._quotaFetchedAt > ttlMs;
|
|
22669
22691
|
}
|
|
22670
22692
|
get projectDir() {
|
|
22671
|
-
return this.runtime.resolveHistoryDir(this.cwd) ?? path44.join(
|
|
22693
|
+
return this.runtime.resolveHistoryDir(this.cwd) ?? path44.join(os28.homedir(), ".claude", "projects", encodeCwd(this.cwd));
|
|
22672
22694
|
}
|
|
22673
22695
|
/** Set the current Claude conversation ID (extracted from /cost command or session start) */
|
|
22674
22696
|
setCurrentConversationId(id) {
|
|
@@ -23874,7 +23896,7 @@ async function autoLinkAfterPair(opts) {
|
|
|
23874
23896
|
|
|
23875
23897
|
// src/commands/pair-auto.ts
|
|
23876
23898
|
var fs37 = __toESM(require("fs"));
|
|
23877
|
-
var
|
|
23899
|
+
var os29 = __toESM(require("os"));
|
|
23878
23900
|
var import_crypto7 = require("crypto");
|
|
23879
23901
|
|
|
23880
23902
|
// src/commands/start-infra-only.ts
|
|
@@ -24100,7 +24122,7 @@ async function claimOnce(token, pluginId) {
|
|
|
24100
24122
|
pluginId,
|
|
24101
24123
|
ideName: "codeam-cli (codespace)",
|
|
24102
24124
|
ideVersion: process.env.npm_package_version ?? "unknown",
|
|
24103
|
-
hostname:
|
|
24125
|
+
hostname: os29.hostname(),
|
|
24104
24126
|
codespaceName: process.env.CODESPACE_NAME ?? "",
|
|
24105
24127
|
// Current git branch of the codespace's working directory, so the
|
|
24106
24128
|
// backend can populate `PairedSession.branch` for the codespace pair.
|
|
@@ -26385,9 +26407,9 @@ function checkSessions() {
|
|
|
26385
26407
|
}
|
|
26386
26408
|
}
|
|
26387
26409
|
function checkAgentBinaries() {
|
|
26388
|
-
const
|
|
26410
|
+
const os31 = createOsStrategy();
|
|
26389
26411
|
return getEnabledAgents().map((meta) => {
|
|
26390
|
-
const found =
|
|
26412
|
+
const found = os31.findInPath(meta.binaryName);
|
|
26391
26413
|
return {
|
|
26392
26414
|
id: `agent-${meta.id}`,
|
|
26393
26415
|
label: `Agent binary: ${meta.displayName} (${meta.binaryName})`,
|
|
@@ -26451,7 +26473,7 @@ function checkChokidar() {
|
|
|
26451
26473
|
}
|
|
26452
26474
|
async function doctor(args2 = []) {
|
|
26453
26475
|
const json = args2.includes("--json");
|
|
26454
|
-
const cliVersion = true ? "2.36.
|
|
26476
|
+
const cliVersion = true ? "2.36.2" : "0.0.0-dev";
|
|
26455
26477
|
const apiBase = resolveApiBaseUrl();
|
|
26456
26478
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
26457
26479
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -26650,7 +26672,7 @@ async function completion(args2) {
|
|
|
26650
26672
|
// src/commands/version.ts
|
|
26651
26673
|
var import_picocolors13 = __toESM(require("picocolors"));
|
|
26652
26674
|
function version2() {
|
|
26653
|
-
const v = true ? "2.36.
|
|
26675
|
+
const v = true ? "2.36.2" : "unknown";
|
|
26654
26676
|
console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
|
|
26655
26677
|
}
|
|
26656
26678
|
|
|
@@ -26779,7 +26801,7 @@ var _subcommandHelpKeys = Object.keys(HELPS);
|
|
|
26779
26801
|
|
|
26780
26802
|
// src/lib/updateNotifier.ts
|
|
26781
26803
|
var fs39 = __toESM(require("fs"));
|
|
26782
|
-
var
|
|
26804
|
+
var os30 = __toESM(require("os"));
|
|
26783
26805
|
var path50 = __toESM(require("path"));
|
|
26784
26806
|
var https8 = __toESM(require("https"));
|
|
26785
26807
|
var import_node_child_process12 = require("child_process");
|
|
@@ -26789,7 +26811,7 @@ var REGISTRY_URL = `https://registry.npmjs.org/${PKG_NAME}/latest`;
|
|
|
26789
26811
|
var TTL_MS = 24 * 60 * 60 * 1e3;
|
|
26790
26812
|
var REQUEST_TIMEOUT_MS = 1500;
|
|
26791
26813
|
function cachePath() {
|
|
26792
|
-
const dir = path50.join(
|
|
26814
|
+
const dir = path50.join(os30.homedir(), ".codeam");
|
|
26793
26815
|
return path50.join(dir, "update-check.json");
|
|
26794
26816
|
}
|
|
26795
26817
|
function readCache() {
|
|
@@ -26936,7 +26958,7 @@ function checkForUpdates() {
|
|
|
26936
26958
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
26937
26959
|
if (process.env.CI) return;
|
|
26938
26960
|
if (!process.stdout.isTTY) return;
|
|
26939
|
-
const current = true ? "2.36.
|
|
26961
|
+
const current = true ? "2.36.2" : null;
|
|
26940
26962
|
if (!current) return;
|
|
26941
26963
|
const cache = readCache();
|
|
26942
26964
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.36.
|
|
3
|
+
"version": "2.36.2",
|
|
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",
|