codeam-cli 2.52.7 → 2.52.9
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 +150 -98
- 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.52.8] — 2026-07-03
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **cli:** Each ACP agent owns its launch-binary readiness check
|
|
12
|
+
|
|
13
|
+
## [2.52.7] — 2026-07-03
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **cli:** Wait for Claude native binary before spawning the agent in codespaces
|
|
18
|
+
|
|
7
19
|
## [2.52.6] — 2026-07-03
|
|
8
20
|
|
|
9
21
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -5397,7 +5397,7 @@ function readAnonId() {
|
|
|
5397
5397
|
}
|
|
5398
5398
|
function superProperties() {
|
|
5399
5399
|
return {
|
|
5400
|
-
cliVersion: true ? "2.52.
|
|
5400
|
+
cliVersion: true ? "2.52.9" : "0.0.0-dev",
|
|
5401
5401
|
nodeVersion: process.version,
|
|
5402
5402
|
platform: process.platform,
|
|
5403
5403
|
arch: process.arch,
|
|
@@ -5578,7 +5578,7 @@ var os4 = __toESM(require("os"));
|
|
|
5578
5578
|
// package.json
|
|
5579
5579
|
var package_default = {
|
|
5580
5580
|
name: "codeam-cli",
|
|
5581
|
-
version: "2.52.
|
|
5581
|
+
version: "2.52.9",
|
|
5582
5582
|
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.",
|
|
5583
5583
|
type: "commonjs",
|
|
5584
5584
|
main: "dist/index.js",
|
|
@@ -14928,7 +14928,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
14928
14928
|
if (process.env.NODE_ENV === "test") return;
|
|
14929
14929
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
14930
14930
|
if (process.env.CI) return;
|
|
14931
|
-
const current = true ? "2.52.
|
|
14931
|
+
const current = true ? "2.52.9" : null;
|
|
14932
14932
|
if (!current) return;
|
|
14933
14933
|
const cache = readCache();
|
|
14934
14934
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -14945,7 +14945,7 @@ function checkForUpdates() {
|
|
|
14945
14945
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
14946
14946
|
if (process.env.CI) return;
|
|
14947
14947
|
if (!process.stdout.isTTY) return;
|
|
14948
|
-
const current = true ? "2.52.
|
|
14948
|
+
const current = true ? "2.52.9" : null;
|
|
14949
14949
|
if (!current) return;
|
|
14950
14950
|
const cache = readCache();
|
|
14951
14951
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -15647,7 +15647,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process15.s
|
|
|
15647
15647
|
detached: false
|
|
15648
15648
|
});
|
|
15649
15649
|
function currentCliVersion() {
|
|
15650
|
-
return true ? "2.52.
|
|
15650
|
+
return true ? "2.52.9" : null;
|
|
15651
15651
|
}
|
|
15652
15652
|
function runCmd(cmd, args2, timeoutMs) {
|
|
15653
15653
|
return new Promise((resolve7) => {
|
|
@@ -20997,19 +20997,112 @@ var AgentService = class _AgentService {
|
|
|
20997
20997
|
};
|
|
20998
20998
|
|
|
20999
20999
|
// src/agents/acp/adapters.ts
|
|
21000
|
-
var
|
|
21000
|
+
var path51 = __toESM(require("path"));
|
|
21001
|
+
|
|
21002
|
+
// src/agents/acp/agent-binary.ts
|
|
21003
|
+
var import_fs4 = __toESM(require("fs"));
|
|
21004
|
+
var import_path8 = __toESM(require("path"));
|
|
21005
|
+
var import_child_process23 = require("child_process");
|
|
21006
|
+
function currentPlatformKey() {
|
|
21007
|
+
return `${process.platform}-${process.arch}`;
|
|
21008
|
+
}
|
|
21009
|
+
var SDK_PKG = "@anthropic-ai/claude-agent-sdk";
|
|
21010
|
+
function resolveSdkDirViaRequire(req = require) {
|
|
21011
|
+
try {
|
|
21012
|
+
return import_path8.default.dirname(req.resolve(`${SDK_PKG}/package.json`));
|
|
21013
|
+
} catch {
|
|
21014
|
+
}
|
|
21015
|
+
try {
|
|
21016
|
+
let dir = import_path8.default.dirname(req.resolve(SDK_PKG));
|
|
21017
|
+
for (let i = 0; i < 5; i++) {
|
|
21018
|
+
if (import_path8.default.basename(dir) === "claude-agent-sdk") return dir;
|
|
21019
|
+
const parent = import_path8.default.dirname(dir);
|
|
21020
|
+
if (parent === dir) break;
|
|
21021
|
+
dir = parent;
|
|
21022
|
+
}
|
|
21023
|
+
return null;
|
|
21024
|
+
} catch {
|
|
21025
|
+
return null;
|
|
21026
|
+
}
|
|
21027
|
+
}
|
|
21028
|
+
function defaultSdkDir() {
|
|
21029
|
+
return resolveSdkDirViaRequire();
|
|
21030
|
+
}
|
|
21031
|
+
function resolveClaudeNativeBinary(deps = {}) {
|
|
21032
|
+
const existsSync21 = deps.existsSync ?? import_fs4.default.existsSync;
|
|
21033
|
+
const platformKey = deps.platformKey ?? currentPlatformKey();
|
|
21034
|
+
const sdkDir = deps.sdkDir !== void 0 ? deps.sdkDir : defaultSdkDir();
|
|
21035
|
+
if (!sdkDir) return null;
|
|
21036
|
+
const scopeDir = import_path8.default.dirname(sdkDir);
|
|
21037
|
+
const binName = process.platform === "win32" ? "claude.exe" : "claude";
|
|
21038
|
+
const candidate = import_path8.default.join(scopeDir, `claude-agent-sdk-${platformKey}`, binName);
|
|
21039
|
+
return existsSync21(candidate) ? candidate : null;
|
|
21040
|
+
}
|
|
21041
|
+
var realSleep = (ms) => new Promise((resolve7) => setTimeout(resolve7, ms));
|
|
21042
|
+
async function waitForClaudeNativeBinary(opts = {}) {
|
|
21043
|
+
const timeoutMs = opts.timeoutMs ?? 18e4;
|
|
21044
|
+
const pollMs = opts.pollMs ?? 500;
|
|
21045
|
+
const now = opts.now ?? Date.now;
|
|
21046
|
+
const sleep3 = opts.sleep ?? realSleep;
|
|
21047
|
+
const deps = {
|
|
21048
|
+
sdkDir: opts.sdkDir,
|
|
21049
|
+
platformKey: opts.platformKey,
|
|
21050
|
+
existsSync: opts.existsSync
|
|
21051
|
+
};
|
|
21052
|
+
const deadline = now() + timeoutMs;
|
|
21053
|
+
let found = resolveClaudeNativeBinary(deps);
|
|
21054
|
+
if (found) return found;
|
|
21055
|
+
while (now() < deadline) {
|
|
21056
|
+
await sleep3(pollMs);
|
|
21057
|
+
found = resolveClaudeNativeBinary(deps);
|
|
21058
|
+
if (found) return found;
|
|
21059
|
+
}
|
|
21060
|
+
return resolveClaudeNativeBinary(deps);
|
|
21061
|
+
}
|
|
21062
|
+
function isCommandOnPath(cmd, probe = defaultWhich) {
|
|
21063
|
+
return probe(cmd);
|
|
21064
|
+
}
|
|
21065
|
+
function defaultWhich(cmd) {
|
|
21066
|
+
const finder = process.platform === "win32" ? "where" : "which";
|
|
21067
|
+
try {
|
|
21068
|
+
const res = (0, import_child_process23.spawnSync)(finder, [cmd], { stdio: "ignore" });
|
|
21069
|
+
return res.status === 0;
|
|
21070
|
+
} catch {
|
|
21071
|
+
return false;
|
|
21072
|
+
}
|
|
21073
|
+
}
|
|
21074
|
+
async function waitForCommandOnPath(cmd, opts = {}) {
|
|
21075
|
+
const timeoutMs = opts.timeoutMs ?? 18e4;
|
|
21076
|
+
const pollMs = opts.pollMs ?? 500;
|
|
21077
|
+
const now = opts.now ?? Date.now;
|
|
21078
|
+
const sleep3 = opts.sleep ?? realSleep;
|
|
21079
|
+
const probe = opts.probe;
|
|
21080
|
+
const check = () => isCommandOnPath(cmd, probe);
|
|
21081
|
+
const deadline = now() + timeoutMs;
|
|
21082
|
+
if (check()) return true;
|
|
21083
|
+
while (now() < deadline) {
|
|
21084
|
+
await sleep3(pollMs);
|
|
21085
|
+
if (check()) return true;
|
|
21086
|
+
}
|
|
21087
|
+
return check();
|
|
21088
|
+
}
|
|
21089
|
+
|
|
21090
|
+
// src/agents/acp/adapters.ts
|
|
21001
21091
|
var require_ = require;
|
|
21092
|
+
function claudeBinaryWaiter(opts = {}) {
|
|
21093
|
+
return waitForClaudeNativeBinary(opts).then((p2) => p2 !== null);
|
|
21094
|
+
}
|
|
21002
21095
|
function resolveBin(pkgName, binName) {
|
|
21003
21096
|
try {
|
|
21004
21097
|
const manifestPath = require_.resolve(`${pkgName}/package.json`);
|
|
21005
21098
|
const manifest = require_(`${pkgName}/package.json`);
|
|
21006
|
-
const pkgDir =
|
|
21099
|
+
const pkgDir = path51.dirname(manifestPath);
|
|
21007
21100
|
const bin = manifest.bin;
|
|
21008
21101
|
if (!bin) return null;
|
|
21009
|
-
if (typeof bin === "string") return
|
|
21102
|
+
if (typeof bin === "string") return path51.resolve(pkgDir, bin);
|
|
21010
21103
|
const target = binName ?? Object.keys(bin)[0];
|
|
21011
21104
|
if (!target || !bin[target]) return null;
|
|
21012
|
-
return
|
|
21105
|
+
return path51.resolve(pkgDir, bin[target]);
|
|
21013
21106
|
} catch {
|
|
21014
21107
|
return null;
|
|
21015
21108
|
}
|
|
@@ -21021,7 +21114,8 @@ var REGISTRY = {
|
|
|
21021
21114
|
return {
|
|
21022
21115
|
command: process.execPath,
|
|
21023
21116
|
args: [bin],
|
|
21024
|
-
requiresAgentBinary: "claude"
|
|
21117
|
+
requiresAgentBinary: "claude",
|
|
21118
|
+
waitForBinary: claudeBinaryWaiter
|
|
21025
21119
|
};
|
|
21026
21120
|
},
|
|
21027
21121
|
codex: () => {
|
|
@@ -21030,7 +21124,9 @@ var REGISTRY = {
|
|
|
21030
21124
|
return {
|
|
21031
21125
|
command: process.execPath,
|
|
21032
21126
|
args: [bin],
|
|
21033
|
-
requiresAgentBinary: "codex"
|
|
21127
|
+
requiresAgentBinary: "codex",
|
|
21128
|
+
// codex ships via `npm install -g @openai/codex` → PATH binary.
|
|
21129
|
+
waitForBinary: (o) => waitForCommandOnPath("codex", o)
|
|
21034
21130
|
};
|
|
21035
21131
|
},
|
|
21036
21132
|
// Cursor speaks ACP NATIVELY via `cursor-agent acp` ("Start the Cursor
|
|
@@ -21047,7 +21143,8 @@ var REGISTRY = {
|
|
|
21047
21143
|
cursor: () => ({
|
|
21048
21144
|
command: "cursor-agent",
|
|
21049
21145
|
args: ["acp"],
|
|
21050
|
-
requiresAgentBinary: "cursor-agent"
|
|
21146
|
+
requiresAgentBinary: "cursor-agent",
|
|
21147
|
+
waitForBinary: (o) => waitForCommandOnPath("cursor-agent", o)
|
|
21051
21148
|
}),
|
|
21052
21149
|
// Gemini speaks ACP natively via `gemini --acp` — no npm adapter
|
|
21053
21150
|
// package, just the user-installed `gemini` binary on PATH. Same
|
|
@@ -21064,7 +21161,8 @@ var REGISTRY = {
|
|
|
21064
21161
|
// cleaner because it survives whatever shell env the parent
|
|
21065
21162
|
// codeam was launched from.
|
|
21066
21163
|
args: ["--skip-trust", "--acp"],
|
|
21067
|
-
requiresAgentBinary: "gemini"
|
|
21164
|
+
requiresAgentBinary: "gemini",
|
|
21165
|
+
waitForBinary: (o) => waitForCommandOnPath("gemini", o)
|
|
21068
21166
|
})
|
|
21069
21167
|
};
|
|
21070
21168
|
function getAcpAdapter(agent) {
|
|
@@ -21075,52 +21173,6 @@ function requiresAcp(agent) {
|
|
|
21075
21173
|
return getAcpAdapter(agent) !== null;
|
|
21076
21174
|
}
|
|
21077
21175
|
|
|
21078
|
-
// src/agents/acp/claude-binary.ts
|
|
21079
|
-
var import_fs4 = __toESM(require("fs"));
|
|
21080
|
-
var import_path8 = __toESM(require("path"));
|
|
21081
|
-
function currentPlatformKey() {
|
|
21082
|
-
return `${process.platform}-${process.arch}`;
|
|
21083
|
-
}
|
|
21084
|
-
function defaultSdkDir() {
|
|
21085
|
-
try {
|
|
21086
|
-
const manifest = require.resolve("@anthropic-ai/claude-agent-sdk/package.json");
|
|
21087
|
-
return import_path8.default.dirname(manifest);
|
|
21088
|
-
} catch {
|
|
21089
|
-
return null;
|
|
21090
|
-
}
|
|
21091
|
-
}
|
|
21092
|
-
function resolveClaudeNativeBinary(deps = {}) {
|
|
21093
|
-
const existsSync21 = deps.existsSync ?? import_fs4.default.existsSync;
|
|
21094
|
-
const platformKey = deps.platformKey ?? currentPlatformKey();
|
|
21095
|
-
const sdkDir = deps.sdkDir !== void 0 ? deps.sdkDir : defaultSdkDir();
|
|
21096
|
-
if (!sdkDir) return null;
|
|
21097
|
-
const scopeDir = import_path8.default.dirname(sdkDir);
|
|
21098
|
-
const binName = process.platform === "win32" ? "claude.exe" : "claude";
|
|
21099
|
-
const candidate = import_path8.default.join(scopeDir, `claude-agent-sdk-${platformKey}`, binName);
|
|
21100
|
-
return existsSync21(candidate) ? candidate : null;
|
|
21101
|
-
}
|
|
21102
|
-
var realSleep = (ms) => new Promise((resolve7) => setTimeout(resolve7, ms));
|
|
21103
|
-
async function waitForClaudeNativeBinary(opts = {}) {
|
|
21104
|
-
const timeoutMs = opts.timeoutMs ?? 18e4;
|
|
21105
|
-
const pollMs = opts.pollMs ?? 500;
|
|
21106
|
-
const now = opts.now ?? Date.now;
|
|
21107
|
-
const sleep3 = opts.sleep ?? realSleep;
|
|
21108
|
-
const deps = {
|
|
21109
|
-
sdkDir: opts.sdkDir,
|
|
21110
|
-
platformKey: opts.platformKey,
|
|
21111
|
-
existsSync: opts.existsSync
|
|
21112
|
-
};
|
|
21113
|
-
const deadline = now() + timeoutMs;
|
|
21114
|
-
let found = resolveClaudeNativeBinary(deps);
|
|
21115
|
-
if (found) return found;
|
|
21116
|
-
while (now() < deadline) {
|
|
21117
|
-
await sleep3(pollMs);
|
|
21118
|
-
found = resolveClaudeNativeBinary(deps);
|
|
21119
|
-
if (found) return found;
|
|
21120
|
-
}
|
|
21121
|
-
return resolveClaudeNativeBinary(deps);
|
|
21122
|
-
}
|
|
21123
|
-
|
|
21124
21176
|
// src/agents/acp/runner.ts
|
|
21125
21177
|
var import_node_crypto7 = require("crypto");
|
|
21126
21178
|
|
|
@@ -25160,7 +25212,7 @@ function commonPrefixLength(a, b) {
|
|
|
25160
25212
|
}
|
|
25161
25213
|
|
|
25162
25214
|
// src/agents/acp/onboarding.ts
|
|
25163
|
-
var
|
|
25215
|
+
var import_child_process24 = require("child_process");
|
|
25164
25216
|
var fs48 = __toESM(require("fs"));
|
|
25165
25217
|
var os40 = __toESM(require("os"));
|
|
25166
25218
|
var path54 = __toESM(require("path"));
|
|
@@ -25181,7 +25233,7 @@ var _onboardingSeam = {
|
|
|
25181
25233
|
*/
|
|
25182
25234
|
gitRemoteUrl: (cwd) => {
|
|
25183
25235
|
try {
|
|
25184
|
-
return (0,
|
|
25236
|
+
return (0, import_child_process24.execFileSync)("git", ["-C", cwd, "remote", "get-url", "origin"], {
|
|
25185
25237
|
encoding: "utf8",
|
|
25186
25238
|
stdio: ["ignore", "pipe", "ignore"],
|
|
25187
25239
|
timeout: 2e3
|
|
@@ -25483,7 +25535,7 @@ function extractSelectPrompt(text) {
|
|
|
25483
25535
|
var import_crypto5 = require("crypto");
|
|
25484
25536
|
|
|
25485
25537
|
// src/services/turn-files/git-changeset.ts
|
|
25486
|
-
var
|
|
25538
|
+
var import_child_process25 = require("child_process");
|
|
25487
25539
|
var fs49 = __toESM(require("fs/promises"));
|
|
25488
25540
|
var path55 = __toESM(require("path"));
|
|
25489
25541
|
async function collectRepoChangeset(opts) {
|
|
@@ -25598,7 +25650,7 @@ function defaultRunGit(cwd, args2) {
|
|
|
25598
25650
|
return new Promise((resolve7) => {
|
|
25599
25651
|
let proc;
|
|
25600
25652
|
try {
|
|
25601
|
-
proc = (0,
|
|
25653
|
+
proc = (0, import_child_process25.spawn)("git", args2, { cwd, env: process.env });
|
|
25602
25654
|
} catch {
|
|
25603
25655
|
resolve7(null);
|
|
25604
25656
|
return;
|
|
@@ -28574,10 +28626,10 @@ async function start(requestedAgent) {
|
|
|
28574
28626
|
const depsReady = process.env.CODESPACES === "true" ? provisionProjectDependencies(cwd).catch(() => void 0) : Promise.resolve();
|
|
28575
28627
|
if (process.env.CODESPACES === "true") {
|
|
28576
28628
|
const GATE_TIMEOUT_MS = 24e4;
|
|
28577
|
-
const
|
|
28629
|
+
const agentBinaryReady = getAcpAdapter(session.agent)?.waitForBinary({ timeoutMs: GATE_TIMEOUT_MS }).catch(() => false) ?? Promise.resolve(true);
|
|
28578
28630
|
let gateTimer;
|
|
28579
28631
|
await Promise.race([
|
|
28580
|
-
Promise.all([beadsReady.catch(() => null), depsReady,
|
|
28632
|
+
Promise.all([beadsReady.catch(() => null), depsReady, agentBinaryReady]),
|
|
28581
28633
|
new Promise((resolve7) => {
|
|
28582
28634
|
gateTimer = setTimeout(resolve7, GATE_TIMEOUT_MS);
|
|
28583
28635
|
})
|
|
@@ -29118,11 +29170,11 @@ async function logout() {
|
|
|
29118
29170
|
var import_picocolors11 = __toESM(require("picocolors"));
|
|
29119
29171
|
|
|
29120
29172
|
// src/services/providers/github-codespaces.ts
|
|
29121
|
-
var
|
|
29173
|
+
var import_child_process26 = require("child_process");
|
|
29122
29174
|
var import_util4 = require("util");
|
|
29123
29175
|
var import_picocolors9 = __toESM(require("picocolors"));
|
|
29124
29176
|
var path58 = __toESM(require("path"));
|
|
29125
|
-
var execFileP6 = (0, import_util4.promisify)(
|
|
29177
|
+
var execFileP6 = (0, import_util4.promisify)(import_child_process26.execFile);
|
|
29126
29178
|
var MAX_BUFFER = 8 * 1024 * 1024;
|
|
29127
29179
|
function resetStdinForChild() {
|
|
29128
29180
|
if (process.stdin.isTTY) {
|
|
@@ -29166,7 +29218,7 @@ var GitHubCodespacesProvider = class {
|
|
|
29166
29218
|
if (!isAuthed) {
|
|
29167
29219
|
resetStdinForChild();
|
|
29168
29220
|
await new Promise((resolve7, reject) => {
|
|
29169
|
-
const proc = (0,
|
|
29221
|
+
const proc = (0, import_child_process26.spawn)("gh", ["auth", "login", "-s", "codespace,repo,read:user"], {
|
|
29170
29222
|
stdio: "inherit"
|
|
29171
29223
|
});
|
|
29172
29224
|
proc.on("exit", (code) => {
|
|
@@ -29200,7 +29252,7 @@ var GitHubCodespacesProvider = class {
|
|
|
29200
29252
|
wt(noteLines.join("\n"), "One more permission needed");
|
|
29201
29253
|
resetStdinForChild();
|
|
29202
29254
|
const refreshCode = await new Promise((resolve7, reject) => {
|
|
29203
|
-
const proc = (0,
|
|
29255
|
+
const proc = (0, import_child_process26.spawn)(
|
|
29204
29256
|
"gh",
|
|
29205
29257
|
["auth", "refresh", "-h", "github.com", "-s", "codespace"],
|
|
29206
29258
|
{ stdio: "inherit" }
|
|
@@ -29350,7 +29402,7 @@ var GitHubCodespacesProvider = class {
|
|
|
29350
29402
|
O2.step(`Installing gh via ${installCmd.describe}\u2026`);
|
|
29351
29403
|
resetStdinForChild();
|
|
29352
29404
|
const ok = await new Promise((resolve7) => {
|
|
29353
|
-
const proc = (0,
|
|
29405
|
+
const proc = (0, import_child_process26.spawn)(installCmd.exe, installCmd.args, { stdio: "inherit" });
|
|
29354
29406
|
proc.on("exit", (code) => resolve7(code === 0));
|
|
29355
29407
|
proc.on("error", () => resolve7(false));
|
|
29356
29408
|
});
|
|
@@ -29377,7 +29429,7 @@ var GitHubCodespacesProvider = class {
|
|
|
29377
29429
|
);
|
|
29378
29430
|
resetStdinForChild();
|
|
29379
29431
|
await new Promise((resolve7, reject) => {
|
|
29380
|
-
const proc = (0,
|
|
29432
|
+
const proc = (0, import_child_process26.spawn)(
|
|
29381
29433
|
"gh",
|
|
29382
29434
|
["auth", "refresh", "-h", "github.com", "-s", "repo,read:org"],
|
|
29383
29435
|
{ stdio: "inherit" }
|
|
@@ -29555,7 +29607,7 @@ var GitHubCodespacesProvider = class {
|
|
|
29555
29607
|
async streamCommand(workspaceId, command2) {
|
|
29556
29608
|
resetStdinForChild();
|
|
29557
29609
|
return new Promise((resolve7, reject) => {
|
|
29558
|
-
const proc = (0,
|
|
29610
|
+
const proc = (0, import_child_process26.spawn)(
|
|
29559
29611
|
"gh",
|
|
29560
29612
|
["codespace", "ssh", "-c", workspaceId, "--", "-tt", command2],
|
|
29561
29613
|
{ stdio: "inherit" }
|
|
@@ -29582,11 +29634,11 @@ var GitHubCodespacesProvider = class {
|
|
|
29582
29634
|
`mkdir -p ${shellQuote(remoteDir)} && tar -xzf - -C ${shellQuote(remoteDir)}`
|
|
29583
29635
|
];
|
|
29584
29636
|
await new Promise((resolve7, reject) => {
|
|
29585
|
-
const tar = (0,
|
|
29637
|
+
const tar = (0, import_child_process26.spawn)("tar", tarArgs, {
|
|
29586
29638
|
stdio: ["ignore", "pipe", "pipe"],
|
|
29587
29639
|
env: tarEnv
|
|
29588
29640
|
});
|
|
29589
|
-
const ssh = (0,
|
|
29641
|
+
const ssh = (0, import_child_process26.spawn)("gh", sshArgs, {
|
|
29590
29642
|
stdio: [tar.stdout, "pipe", "pipe"]
|
|
29591
29643
|
});
|
|
29592
29644
|
let tarErr = "";
|
|
@@ -29620,7 +29672,7 @@ var GitHubCodespacesProvider = class {
|
|
|
29620
29672
|
}
|
|
29621
29673
|
const cmd = parts.join(" && ");
|
|
29622
29674
|
await new Promise((resolve7, reject) => {
|
|
29623
|
-
const proc = (0,
|
|
29675
|
+
const proc = (0, import_child_process26.spawn)(
|
|
29624
29676
|
"gh",
|
|
29625
29677
|
["codespace", "ssh", "-c", workspaceId, "--", cmd],
|
|
29626
29678
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -29678,11 +29730,11 @@ function shellQuote(s) {
|
|
|
29678
29730
|
}
|
|
29679
29731
|
|
|
29680
29732
|
// src/services/providers/gitpod.ts
|
|
29681
|
-
var
|
|
29733
|
+
var import_child_process27 = require("child_process");
|
|
29682
29734
|
var import_util5 = require("util");
|
|
29683
29735
|
var path59 = __toESM(require("path"));
|
|
29684
29736
|
var import_picocolors10 = __toESM(require("picocolors"));
|
|
29685
|
-
var execFileP7 = (0, import_util5.promisify)(
|
|
29737
|
+
var execFileP7 = (0, import_util5.promisify)(import_child_process27.execFile);
|
|
29686
29738
|
var MAX_BUFFER2 = 8 * 1024 * 1024;
|
|
29687
29739
|
function resetStdinForChild2() {
|
|
29688
29740
|
if (process.stdin.isTTY) {
|
|
@@ -29722,7 +29774,7 @@ var GitpodProvider = class {
|
|
|
29722
29774
|
);
|
|
29723
29775
|
resetStdinForChild2();
|
|
29724
29776
|
await new Promise((resolve7, reject) => {
|
|
29725
|
-
const proc = (0,
|
|
29777
|
+
const proc = (0, import_child_process27.spawn)("gitpod", ["login"], { stdio: "inherit" });
|
|
29726
29778
|
proc.on("exit", (code) => {
|
|
29727
29779
|
if (code === 0) resolve7();
|
|
29728
29780
|
else reject(new Error("gitpod login failed."));
|
|
@@ -29874,7 +29926,7 @@ var GitpodProvider = class {
|
|
|
29874
29926
|
async streamCommand(workspaceId, command2) {
|
|
29875
29927
|
resetStdinForChild2();
|
|
29876
29928
|
return new Promise((resolve7, reject) => {
|
|
29877
|
-
const proc = (0,
|
|
29929
|
+
const proc = (0, import_child_process27.spawn)(
|
|
29878
29930
|
"gitpod",
|
|
29879
29931
|
["workspace", "ssh", workspaceId, "--", "-tt", command2],
|
|
29880
29932
|
{ stdio: "inherit" }
|
|
@@ -29894,11 +29946,11 @@ var GitpodProvider = class {
|
|
|
29894
29946
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
29895
29947
|
const remoteCmd = `mkdir -p ${shellQuote2(remoteDir)} && tar -xzf - -C ${shellQuote2(remoteDir)}`;
|
|
29896
29948
|
await new Promise((resolve7, reject) => {
|
|
29897
|
-
const tar = (0,
|
|
29949
|
+
const tar = (0, import_child_process27.spawn)("tar", tarArgs, {
|
|
29898
29950
|
stdio: ["ignore", "pipe", "pipe"],
|
|
29899
29951
|
env: tarEnv
|
|
29900
29952
|
});
|
|
29901
|
-
const ssh = (0,
|
|
29953
|
+
const ssh = (0, import_child_process27.spawn)(
|
|
29902
29954
|
"gitpod",
|
|
29903
29955
|
["workspace", "ssh", workspaceId, "--", remoteCmd],
|
|
29904
29956
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -29930,7 +29982,7 @@ var GitpodProvider = class {
|
|
|
29930
29982
|
}
|
|
29931
29983
|
const cmd = parts.join(" && ");
|
|
29932
29984
|
await new Promise((resolve7, reject) => {
|
|
29933
|
-
const proc = (0,
|
|
29985
|
+
const proc = (0, import_child_process27.spawn)(
|
|
29934
29986
|
"gitpod",
|
|
29935
29987
|
["workspace", "ssh", workspaceId, "--", cmd],
|
|
29936
29988
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -29954,10 +30006,10 @@ function shellQuote2(s) {
|
|
|
29954
30006
|
}
|
|
29955
30007
|
|
|
29956
30008
|
// src/services/providers/gitlab-workspaces.ts
|
|
29957
|
-
var
|
|
30009
|
+
var import_child_process28 = require("child_process");
|
|
29958
30010
|
var import_util6 = require("util");
|
|
29959
30011
|
var path60 = __toESM(require("path"));
|
|
29960
|
-
var execFileP8 = (0, import_util6.promisify)(
|
|
30012
|
+
var execFileP8 = (0, import_util6.promisify)(import_child_process28.execFile);
|
|
29961
30013
|
var MAX_BUFFER3 = 8 * 1024 * 1024;
|
|
29962
30014
|
var GITLAB_API_BASE = process.env.CODEAM_GITLAB_API_URL ?? "https://gitlab.com/api/v4";
|
|
29963
30015
|
function resetStdinForChild3() {
|
|
@@ -29999,7 +30051,7 @@ var GitLabWorkspacesProvider = class {
|
|
|
29999
30051
|
);
|
|
30000
30052
|
resetStdinForChild3();
|
|
30001
30053
|
await new Promise((resolve7, reject) => {
|
|
30002
|
-
const proc = (0,
|
|
30054
|
+
const proc = (0, import_child_process28.spawn)(
|
|
30003
30055
|
"glab",
|
|
30004
30056
|
["auth", "login", "--scopes", "api,read_user,read_repository"],
|
|
30005
30057
|
{ stdio: "inherit" }
|
|
@@ -30171,7 +30223,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
30171
30223
|
const sshHost = process.env.CODEAM_GITLAB_SSH_HOST ?? "workspaces.gitlab.com";
|
|
30172
30224
|
resetStdinForChild3();
|
|
30173
30225
|
return new Promise((resolve7, reject) => {
|
|
30174
|
-
const proc = (0,
|
|
30226
|
+
const proc = (0, import_child_process28.spawn)(
|
|
30175
30227
|
"ssh",
|
|
30176
30228
|
["-tt", "-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, command2],
|
|
30177
30229
|
{ stdio: "inherit" }
|
|
@@ -30192,8 +30244,8 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
30192
30244
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
30193
30245
|
const remoteCmd = `mkdir -p ${shellQuote3(remoteDir)} && tar -xzf - -C ${shellQuote3(remoteDir)}`;
|
|
30194
30246
|
await new Promise((resolve7, reject) => {
|
|
30195
|
-
const tar = (0,
|
|
30196
|
-
const ssh = (0,
|
|
30247
|
+
const tar = (0, import_child_process28.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
30248
|
+
const ssh = (0, import_child_process28.spawn)(
|
|
30197
30249
|
"ssh",
|
|
30198
30250
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, remoteCmd],
|
|
30199
30251
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -30223,7 +30275,7 @@ Docs: https://docs.gitlab.com/ee/user/workspace/configuration.html`
|
|
|
30223
30275
|
}
|
|
30224
30276
|
const cmd = parts.join(" && ");
|
|
30225
30277
|
await new Promise((resolve7, reject) => {
|
|
30226
|
-
const proc = (0,
|
|
30278
|
+
const proc = (0, import_child_process28.spawn)(
|
|
30227
30279
|
"ssh",
|
|
30228
30280
|
["-o", "StrictHostKeyChecking=accept-new", `${workspaceId}@${sshHost}`, cmd],
|
|
30229
30281
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -30282,10 +30334,10 @@ function shellQuote3(s) {
|
|
|
30282
30334
|
}
|
|
30283
30335
|
|
|
30284
30336
|
// src/services/providers/railway.ts
|
|
30285
|
-
var
|
|
30337
|
+
var import_child_process29 = require("child_process");
|
|
30286
30338
|
var import_util7 = require("util");
|
|
30287
30339
|
var path61 = __toESM(require("path"));
|
|
30288
|
-
var execFileP9 = (0, import_util7.promisify)(
|
|
30340
|
+
var execFileP9 = (0, import_util7.promisify)(import_child_process29.execFile);
|
|
30289
30341
|
var MAX_BUFFER4 = 8 * 1024 * 1024;
|
|
30290
30342
|
function resetStdinForChild4() {
|
|
30291
30343
|
if (process.stdin.isTTY) {
|
|
@@ -30326,7 +30378,7 @@ var RailwayProvider = class {
|
|
|
30326
30378
|
);
|
|
30327
30379
|
resetStdinForChild4();
|
|
30328
30380
|
await new Promise((resolve7, reject) => {
|
|
30329
|
-
const proc = (0,
|
|
30381
|
+
const proc = (0, import_child_process29.spawn)("railway", ["login"], { stdio: "inherit" });
|
|
30330
30382
|
proc.on("exit", (code) => {
|
|
30331
30383
|
if (code === 0) resolve7();
|
|
30332
30384
|
else reject(new Error("railway login failed."));
|
|
@@ -30469,7 +30521,7 @@ var RailwayProvider = class {
|
|
|
30469
30521
|
}
|
|
30470
30522
|
resetStdinForChild4();
|
|
30471
30523
|
return new Promise((resolve7, reject) => {
|
|
30472
|
-
const proc = (0,
|
|
30524
|
+
const proc = (0, import_child_process29.spawn)(
|
|
30473
30525
|
"railway",
|
|
30474
30526
|
["shell", "--project", projectId, "--service", serviceId, "--command", command2],
|
|
30475
30527
|
{ stdio: "inherit" }
|
|
@@ -30493,8 +30545,8 @@ var RailwayProvider = class {
|
|
|
30493
30545
|
const tarEnv = { ...process.env, COPYFILE_DISABLE: "1" };
|
|
30494
30546
|
const remoteCmd = `mkdir -p ${shellQuote4(remoteDir)} && tar -xzf - -C ${shellQuote4(remoteDir)}`;
|
|
30495
30547
|
await new Promise((resolve7, reject) => {
|
|
30496
|
-
const tar = (0,
|
|
30497
|
-
const sh = (0,
|
|
30548
|
+
const tar = (0, import_child_process29.spawn)("tar", tarArgs, { stdio: ["ignore", "pipe", "pipe"], env: tarEnv });
|
|
30549
|
+
const sh = (0, import_child_process29.spawn)(
|
|
30498
30550
|
"railway",
|
|
30499
30551
|
["shell", "--project", projectId, "--service", serviceId, "--command", remoteCmd],
|
|
30500
30552
|
{ stdio: [tar.stdout, "pipe", "pipe"] }
|
|
@@ -30527,7 +30579,7 @@ var RailwayProvider = class {
|
|
|
30527
30579
|
}
|
|
30528
30580
|
const cmd = parts.join(" && ");
|
|
30529
30581
|
await new Promise((resolve7, reject) => {
|
|
30530
|
-
const proc = (0,
|
|
30582
|
+
const proc = (0, import_child_process29.spawn)(
|
|
30531
30583
|
"railway",
|
|
30532
30584
|
["shell", "--project", projectId, "--service", serviceId, "--command", cmd],
|
|
30533
30585
|
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -31335,7 +31387,7 @@ function checkChokidar() {
|
|
|
31335
31387
|
}
|
|
31336
31388
|
async function doctor(args2 = []) {
|
|
31337
31389
|
const json = args2.includes("--json");
|
|
31338
|
-
const cliVersion = true ? "2.52.
|
|
31390
|
+
const cliVersion = true ? "2.52.9" : "0.0.0-dev";
|
|
31339
31391
|
const apiBase2 = resolveApiBaseUrl();
|
|
31340
31392
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
31341
31393
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -31534,7 +31586,7 @@ async function completion(args2) {
|
|
|
31534
31586
|
// src/commands/version.ts
|
|
31535
31587
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
31536
31588
|
function version2() {
|
|
31537
|
-
const v = true ? "2.52.
|
|
31589
|
+
const v = true ? "2.52.9" : "unknown";
|
|
31538
31590
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
31539
31591
|
}
|
|
31540
31592
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.52.
|
|
3
|
+
"version": "2.52.9",
|
|
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",
|