codeam-cli 2.36.1 → 2.36.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.js +101 -84
- 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.36.2] — 2026-06-11
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Drop BEADS_DIR so shared-server resolves the workspace from cwd
|
|
12
|
+
|
|
13
|
+
## [2.36.1] — 2026-06-11
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **cli:** Init beads workspace before starting dolt server + harden installer
|
|
18
|
+
|
|
7
19
|
## [2.36.0] — 2026-06-11
|
|
8
20
|
|
|
9
21
|
### Added
|
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.3",
|
|
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.3" : "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;
|
|
@@ -18007,7 +18006,7 @@ var _provisionSeam = {
|
|
|
18007
18006
|
};
|
|
18008
18007
|
var _linkSeam = {
|
|
18009
18008
|
platform: () => process.platform,
|
|
18010
|
-
homedir: () =>
|
|
18009
|
+
homedir: () => os25.homedir(),
|
|
18011
18010
|
isWritableDir: (dir) => {
|
|
18012
18011
|
try {
|
|
18013
18012
|
fs32.accessSync(dir, fs32.constants.W_OK);
|
|
@@ -18294,7 +18293,7 @@ var BeadsWatcher = class {
|
|
|
18294
18293
|
constructor(opts) {
|
|
18295
18294
|
this.opts = opts;
|
|
18296
18295
|
this.bd = opts.adapter ?? new BdAdapter({ cwd: opts.cwd, beadsDir: opts.beadsDir });
|
|
18297
|
-
this.feedPath = opts.feedPath ?? path39.join(
|
|
18296
|
+
this.feedPath = opts.feedPath ?? path39.join(opts.cwd ?? process.cwd(), ".beads", "issues.jsonl");
|
|
18298
18297
|
this.apiBase = opts.apiBaseUrl ?? API_BASE4;
|
|
18299
18298
|
}
|
|
18300
18299
|
opts;
|
|
@@ -18507,7 +18506,7 @@ async function provisionBeadsForStart(ctx) {
|
|
|
18507
18506
|
log.trace("beads", "CODEAM_BEADS_DISABLED set \u2014 beads off this run");
|
|
18508
18507
|
return null;
|
|
18509
18508
|
}
|
|
18510
|
-
process.env.BEADS_DIR
|
|
18509
|
+
delete process.env.BEADS_DIR;
|
|
18511
18510
|
process.env.BEADS_DOLT_SHARED_SERVER = "1";
|
|
18512
18511
|
if (!ctx.pluginAuthToken) {
|
|
18513
18512
|
log.trace("beads", "no pluginAuthToken \u2014 beads off");
|
|
@@ -18581,7 +18580,7 @@ function cleanupAttachmentTempFiles() {
|
|
|
18581
18580
|
function saveFilesTemp(files) {
|
|
18582
18581
|
return files.filter(({ base64 }) => base64 && base64.length > 0).map(({ filename, base64 }) => {
|
|
18583
18582
|
const safeName = filename.replace(/[^a-zA-Z0-9._-]/g, "_").slice(0, 80);
|
|
18584
|
-
const tmpPath = path40.join(
|
|
18583
|
+
const tmpPath = path40.join(os26.tmpdir(), `codeam-${(0, import_crypto3.randomUUID)()}-${safeName}`);
|
|
18585
18584
|
fs33.writeFileSync(tmpPath, Buffer.from(base64, "base64"));
|
|
18586
18585
|
pendingAttachmentFiles.add(tmpPath);
|
|
18587
18586
|
return tmpPath;
|
|
@@ -19617,7 +19616,7 @@ async function dispatchCommand(ctx, cmd) {
|
|
|
19617
19616
|
// src/services/file-watcher.service.ts
|
|
19618
19617
|
var import_child_process19 = require("child_process");
|
|
19619
19618
|
var fs34 = __toESM(require("fs"));
|
|
19620
|
-
var
|
|
19619
|
+
var os27 = __toESM(require("os"));
|
|
19621
19620
|
var path41 = __toESM(require("path"));
|
|
19622
19621
|
var import_ignore = __toESM(require("ignore"));
|
|
19623
19622
|
|
|
@@ -19728,10 +19727,10 @@ var WINDOWS_LEGACY_JUNCTIONS = [
|
|
|
19728
19727
|
/[\\/]Start Menu([\\/]|$)/i,
|
|
19729
19728
|
/[\\/]Templates([\\/]|$)/i
|
|
19730
19729
|
];
|
|
19731
|
-
function isUnsafeWindowsWatchRoot(dir,
|
|
19730
|
+
function isUnsafeWindowsWatchRoot(dir, homedir23) {
|
|
19732
19731
|
const norm = (p2) => p2.replace(/\//g, "\\").replace(/\\+$/, "").toLowerCase();
|
|
19733
19732
|
const cwd = norm(dir);
|
|
19734
|
-
const home = norm(
|
|
19733
|
+
const home = norm(homedir23);
|
|
19735
19734
|
if (cwd === home) return true;
|
|
19736
19735
|
if (/^[a-z]:$/.test(cwd)) return true;
|
|
19737
19736
|
const sysRoots = [
|
|
@@ -19830,7 +19829,7 @@ var FileWatcherService = class {
|
|
|
19830
19829
|
throw new Error("FileWatcherService has already been stopped \u2014 re-instantiate to restart.");
|
|
19831
19830
|
}
|
|
19832
19831
|
const isWin = process.platform === "win32";
|
|
19833
|
-
if (isWin && isUnsafeWindowsWatchRoot(this.opts.workingDir,
|
|
19832
|
+
if (isWin && isUnsafeWindowsWatchRoot(this.opts.workingDir, os27.homedir())) {
|
|
19834
19833
|
log.warn(
|
|
19835
19834
|
"fileWatcher",
|
|
19836
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.`
|
|
@@ -21144,6 +21143,9 @@ var StreamingState = class {
|
|
|
21144
21143
|
}
|
|
21145
21144
|
};
|
|
21146
21145
|
var PERMISSION_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
21146
|
+
function pickAllowOption(options) {
|
|
21147
|
+
return options.find((o) => o.kind === "allow_always") ?? options.find((o) => o.kind === "allow_once") ?? null;
|
|
21148
|
+
}
|
|
21147
21149
|
var AcpHistory = class {
|
|
21148
21150
|
constructor(publisher, opts) {
|
|
21149
21151
|
this.publisher = publisher;
|
|
@@ -21253,6 +21255,17 @@ async function runAcpSession(opts) {
|
|
|
21253
21255
|
}
|
|
21254
21256
|
},
|
|
21255
21257
|
onRequestPermission: async (request) => {
|
|
21258
|
+
if (opts.autoApprovePermissions) {
|
|
21259
|
+
const allow = pickAllowOption(request.options);
|
|
21260
|
+
if (allow) {
|
|
21261
|
+
log.info(
|
|
21262
|
+
"acpRunner",
|
|
21263
|
+
`AUTO mode \u2014 auto-approving permission (${allow.kind}) optionId=${allow.optionId}`
|
|
21264
|
+
);
|
|
21265
|
+
return { outcome: { outcome: "selected", optionId: allow.optionId } };
|
|
21266
|
+
}
|
|
21267
|
+
log.warn("acpRunner", "AUTO mode \u2014 no allow option offered; falling back to interactive");
|
|
21268
|
+
}
|
|
21256
21269
|
const { event, optionIdByLabel } = mapPermissionRequest(request);
|
|
21257
21270
|
await publisher.publishAwaitingAnswer(event);
|
|
21258
21271
|
return streaming.registerPermission({
|
|
@@ -22529,7 +22542,7 @@ var OutputService = class _OutputService {
|
|
|
22529
22542
|
// src/services/history.service.ts
|
|
22530
22543
|
var fs36 = __toESM(require("fs"));
|
|
22531
22544
|
var path44 = __toESM(require("path"));
|
|
22532
|
-
var
|
|
22545
|
+
var os28 = __toESM(require("os"));
|
|
22533
22546
|
var https7 = __toESM(require("https"));
|
|
22534
22547
|
var http7 = __toESM(require("http"));
|
|
22535
22548
|
var import_zod2 = require("zod");
|
|
@@ -22691,7 +22704,7 @@ var HistoryService = class _HistoryService {
|
|
|
22691
22704
|
return this._quotaPercent === null || Date.now() - this._quotaFetchedAt > ttlMs;
|
|
22692
22705
|
}
|
|
22693
22706
|
get projectDir() {
|
|
22694
|
-
return this.runtime.resolveHistoryDir(this.cwd) ?? path44.join(
|
|
22707
|
+
return this.runtime.resolveHistoryDir(this.cwd) ?? path44.join(os28.homedir(), ".claude", "projects", encodeCwd(this.cwd));
|
|
22695
22708
|
}
|
|
22696
22709
|
/** Set the current Claude conversation ID (extracted from /cost command or session start) */
|
|
22697
22710
|
setCurrentConversationId(id) {
|
|
@@ -23526,7 +23539,11 @@ async function start(requestedAgent) {
|
|
|
23526
23539
|
pluginAuthToken: session.pluginAuthToken,
|
|
23527
23540
|
adapter,
|
|
23528
23541
|
cwd,
|
|
23529
|
-
getBeads
|
|
23542
|
+
getBeads,
|
|
23543
|
+
// AUTO mode in a headless GitHub Codespace: no human at the phone to
|
|
23544
|
+
// answer permission prompts, so auto-approve them rather than stall the
|
|
23545
|
+
// turn (the agent-agnostic equivalent of --dangerously-skip-permissions).
|
|
23546
|
+
autoApprovePermissions: process.env.CODESPACES === "true"
|
|
23530
23547
|
});
|
|
23531
23548
|
return;
|
|
23532
23549
|
}
|
|
@@ -23897,7 +23914,7 @@ async function autoLinkAfterPair(opts) {
|
|
|
23897
23914
|
|
|
23898
23915
|
// src/commands/pair-auto.ts
|
|
23899
23916
|
var fs37 = __toESM(require("fs"));
|
|
23900
|
-
var
|
|
23917
|
+
var os29 = __toESM(require("os"));
|
|
23901
23918
|
var import_crypto7 = require("crypto");
|
|
23902
23919
|
|
|
23903
23920
|
// src/commands/start-infra-only.ts
|
|
@@ -24123,7 +24140,7 @@ async function claimOnce(token, pluginId) {
|
|
|
24123
24140
|
pluginId,
|
|
24124
24141
|
ideName: "codeam-cli (codespace)",
|
|
24125
24142
|
ideVersion: process.env.npm_package_version ?? "unknown",
|
|
24126
|
-
hostname:
|
|
24143
|
+
hostname: os29.hostname(),
|
|
24127
24144
|
codespaceName: process.env.CODESPACE_NAME ?? "",
|
|
24128
24145
|
// Current git branch of the codespace's working directory, so the
|
|
24129
24146
|
// backend can populate `PairedSession.branch` for the codespace pair.
|
|
@@ -26408,9 +26425,9 @@ function checkSessions() {
|
|
|
26408
26425
|
}
|
|
26409
26426
|
}
|
|
26410
26427
|
function checkAgentBinaries() {
|
|
26411
|
-
const
|
|
26428
|
+
const os31 = createOsStrategy();
|
|
26412
26429
|
return getEnabledAgents().map((meta) => {
|
|
26413
|
-
const found =
|
|
26430
|
+
const found = os31.findInPath(meta.binaryName);
|
|
26414
26431
|
return {
|
|
26415
26432
|
id: `agent-${meta.id}`,
|
|
26416
26433
|
label: `Agent binary: ${meta.displayName} (${meta.binaryName})`,
|
|
@@ -26474,7 +26491,7 @@ function checkChokidar() {
|
|
|
26474
26491
|
}
|
|
26475
26492
|
async function doctor(args2 = []) {
|
|
26476
26493
|
const json = args2.includes("--json");
|
|
26477
|
-
const cliVersion = true ? "2.36.
|
|
26494
|
+
const cliVersion = true ? "2.36.3" : "0.0.0-dev";
|
|
26478
26495
|
const apiBase = resolveApiBaseUrl();
|
|
26479
26496
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
26480
26497
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -26673,7 +26690,7 @@ async function completion(args2) {
|
|
|
26673
26690
|
// src/commands/version.ts
|
|
26674
26691
|
var import_picocolors13 = __toESM(require("picocolors"));
|
|
26675
26692
|
function version2() {
|
|
26676
|
-
const v = true ? "2.36.
|
|
26693
|
+
const v = true ? "2.36.3" : "unknown";
|
|
26677
26694
|
console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
|
|
26678
26695
|
}
|
|
26679
26696
|
|
|
@@ -26802,7 +26819,7 @@ var _subcommandHelpKeys = Object.keys(HELPS);
|
|
|
26802
26819
|
|
|
26803
26820
|
// src/lib/updateNotifier.ts
|
|
26804
26821
|
var fs39 = __toESM(require("fs"));
|
|
26805
|
-
var
|
|
26822
|
+
var os30 = __toESM(require("os"));
|
|
26806
26823
|
var path50 = __toESM(require("path"));
|
|
26807
26824
|
var https8 = __toESM(require("https"));
|
|
26808
26825
|
var import_node_child_process12 = require("child_process");
|
|
@@ -26812,7 +26829,7 @@ var REGISTRY_URL = `https://registry.npmjs.org/${PKG_NAME}/latest`;
|
|
|
26812
26829
|
var TTL_MS = 24 * 60 * 60 * 1e3;
|
|
26813
26830
|
var REQUEST_TIMEOUT_MS = 1500;
|
|
26814
26831
|
function cachePath() {
|
|
26815
|
-
const dir = path50.join(
|
|
26832
|
+
const dir = path50.join(os30.homedir(), ".codeam");
|
|
26816
26833
|
return path50.join(dir, "update-check.json");
|
|
26817
26834
|
}
|
|
26818
26835
|
function readCache() {
|
|
@@ -26959,7 +26976,7 @@ function checkForUpdates() {
|
|
|
26959
26976
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
26960
26977
|
if (process.env.CI) return;
|
|
26961
26978
|
if (!process.stdout.isTTY) return;
|
|
26962
|
-
const current = true ? "2.36.
|
|
26979
|
+
const current = true ? "2.36.3" : null;
|
|
26963
26980
|
if (!current) return;
|
|
26964
26981
|
const cache = readCache();
|
|
26965
26982
|
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.3",
|
|
4
4
|
"description": "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device — async. The terminal companion for CodeAgent Mobile.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|