codeam-cli 2.60.16 → 2.60.17
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/dist/index.js +83 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5680,7 +5680,7 @@ function readAnonId() {
|
|
|
5680
5680
|
}
|
|
5681
5681
|
function superProperties() {
|
|
5682
5682
|
return {
|
|
5683
|
-
cliVersion: true ? "2.60.
|
|
5683
|
+
cliVersion: true ? "2.60.17" : "0.0.0-dev",
|
|
5684
5684
|
nodeVersion: process.version,
|
|
5685
5685
|
platform: process.platform,
|
|
5686
5686
|
arch: process.arch,
|
|
@@ -5861,7 +5861,7 @@ var os4 = __toESM(require("os"));
|
|
|
5861
5861
|
// package.json
|
|
5862
5862
|
var package_default = {
|
|
5863
5863
|
name: "codeam-cli",
|
|
5864
|
-
version: "2.60.
|
|
5864
|
+
version: "2.60.17",
|
|
5865
5865
|
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.",
|
|
5866
5866
|
type: "commonjs",
|
|
5867
5867
|
main: "dist/index.js",
|
|
@@ -6932,7 +6932,7 @@ var CommandRelayService = class {
|
|
|
6932
6932
|
// fresh + clear the "CLI update available" banner after a self-update
|
|
6933
6933
|
// (a codespace that reinstalls @latest reconnects via heartbeat, not
|
|
6934
6934
|
// pair/reconnect). Older backends ignore the extra field.
|
|
6935
|
-
..."2.60.
|
|
6935
|
+
..."2.60.17" ? { ideVersion: "2.60.17" } : {}
|
|
6936
6936
|
}).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
|
|
6937
6937
|
}
|
|
6938
6938
|
/**
|
|
@@ -7159,10 +7159,10 @@ var WINDOWS_LEGACY_JUNCTIONS = [
|
|
|
7159
7159
|
/[\\/]Start Menu([\\/]|$)/i,
|
|
7160
7160
|
/[\\/]Templates([\\/]|$)/i
|
|
7161
7161
|
];
|
|
7162
|
-
function isUnsafeWindowsWatchRoot(dir,
|
|
7162
|
+
function isUnsafeWindowsWatchRoot(dir, homedir41) {
|
|
7163
7163
|
const norm = (p2) => p2.replace(/\//g, "\\").replace(/\\+$/, "").toLowerCase();
|
|
7164
7164
|
const cwd = norm(dir);
|
|
7165
|
-
const home = norm(
|
|
7165
|
+
const home = norm(homedir41);
|
|
7166
7166
|
if (cwd === home) return true;
|
|
7167
7167
|
if (/^[a-z]:$/.test(cwd)) return true;
|
|
7168
7168
|
const sysRoots = [
|
|
@@ -16465,7 +16465,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
16465
16465
|
if (process.env.NODE_ENV === "test") return;
|
|
16466
16466
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
16467
16467
|
if (process.env.CI) return;
|
|
16468
|
-
const current = true ? "2.60.
|
|
16468
|
+
const current = true ? "2.60.17" : null;
|
|
16469
16469
|
if (!current) return;
|
|
16470
16470
|
const cache = readCache();
|
|
16471
16471
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -16482,7 +16482,7 @@ function checkForUpdates() {
|
|
|
16482
16482
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
16483
16483
|
if (process.env.CI) return;
|
|
16484
16484
|
if (!process.stdout.isTTY) return;
|
|
16485
|
-
const current = true ? "2.60.
|
|
16485
|
+
const current = true ? "2.60.17" : null;
|
|
16486
16486
|
if (!current) return;
|
|
16487
16487
|
const cache = readCache();
|
|
16488
16488
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -16502,7 +16502,7 @@ var SELF_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
|
|
|
16502
16502
|
var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
|
|
16503
16503
|
var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
|
|
16504
16504
|
function currentCliVersion() {
|
|
16505
|
-
return true ? "2.60.
|
|
16505
|
+
return true ? "2.60.17" : null;
|
|
16506
16506
|
}
|
|
16507
16507
|
function runCmd(cmd, args2, timeoutMs) {
|
|
16508
16508
|
return new Promise((resolve7) => {
|
|
@@ -22160,6 +22160,66 @@ async function waitForAdapterModuleGraph(command2, args2, opts = {}) {
|
|
|
22160
22160
|
return false;
|
|
22161
22161
|
}
|
|
22162
22162
|
|
|
22163
|
+
// src/agents/kimi/installer.ts
|
|
22164
|
+
var import_node_child_process22 = require("child_process");
|
|
22165
|
+
var import_node_os6 = require("os");
|
|
22166
|
+
var import_node_path6 = require("path");
|
|
22167
|
+
var INSTALL_URL2 = "https://code.kimi.com/kimi-code/install.sh";
|
|
22168
|
+
function kimiBinDir() {
|
|
22169
|
+
return (0, import_node_path6.join)(process.env.KIMI_CODE_HOME || (0, import_node_path6.join)((0, import_node_os6.homedir)(), ".kimi-code"), "bin");
|
|
22170
|
+
}
|
|
22171
|
+
function kimiRuns() {
|
|
22172
|
+
const r = (0, import_node_child_process22.spawnSync)("kimi", ["--version"], { stdio: "ignore", timeout: 15e3 });
|
|
22173
|
+
return !r.error && r.status === 0;
|
|
22174
|
+
}
|
|
22175
|
+
function augmentPath2() {
|
|
22176
|
+
const dir = kimiBinDir();
|
|
22177
|
+
const parts = (process.env.PATH ?? "").split(":");
|
|
22178
|
+
if (!parts.includes(dir)) process.env.PATH = `${dir}:${process.env.PATH ?? ""}`;
|
|
22179
|
+
}
|
|
22180
|
+
async function runInstaller2() {
|
|
22181
|
+
return new Promise((resolve7) => {
|
|
22182
|
+
const proc = (0, import_node_child_process22.spawn)("sh", ["-c", `curl -fsSL ${INSTALL_URL2} | bash`], { stdio: "inherit" });
|
|
22183
|
+
proc.on("close", (code) => resolve7(code === 0));
|
|
22184
|
+
proc.on("error", () => resolve7(false));
|
|
22185
|
+
});
|
|
22186
|
+
}
|
|
22187
|
+
async function ensureKimiInstalled() {
|
|
22188
|
+
augmentPath2();
|
|
22189
|
+
if (kimiRuns()) return true;
|
|
22190
|
+
if (process.platform === "win32") {
|
|
22191
|
+
console.error(
|
|
22192
|
+
`
|
|
22193
|
+
\u2717 Kimi Code CLI on Windows requires WSL.
|
|
22194
|
+
Install it inside WSL (curl -fsSL ${INSTALL_URL2} | bash)
|
|
22195
|
+
then re-run \`codeam pair\`.
|
|
22196
|
+
`
|
|
22197
|
+
);
|
|
22198
|
+
return false;
|
|
22199
|
+
}
|
|
22200
|
+
console.log("\n Kimi Code CLI not found \u2014 installing via the official script\u2026\n");
|
|
22201
|
+
let ok = await runInstaller2();
|
|
22202
|
+
augmentPath2();
|
|
22203
|
+
if (ok && !kimiRuns()) {
|
|
22204
|
+
log.warn("kimi", "installed binary does not run (partial download?) \u2014 re-installing once");
|
|
22205
|
+
ok = await runInstaller2();
|
|
22206
|
+
augmentPath2();
|
|
22207
|
+
}
|
|
22208
|
+
if (!ok) {
|
|
22209
|
+
log.warn("kimi", "installer failed \u2014 Kimi will be reported as not installed");
|
|
22210
|
+
return false;
|
|
22211
|
+
}
|
|
22212
|
+
return kimiRuns();
|
|
22213
|
+
}
|
|
22214
|
+
|
|
22215
|
+
// src/baton/gate.ts
|
|
22216
|
+
function runtimeSupportsBaton(runtime) {
|
|
22217
|
+
return typeof runtime.resolveHistoryFile === "function";
|
|
22218
|
+
}
|
|
22219
|
+
function isLocalSession(env = process.env) {
|
|
22220
|
+
return env.CODESPACES !== "true" && env.CODEAM_AUTO_APPROVE !== "1" && env.HEADROOM_ENABLED !== "1" && !env.CODEAM_AUTO_TOKEN && !env.CODEAM_ENROLL_TOKEN;
|
|
22221
|
+
}
|
|
22222
|
+
|
|
22163
22223
|
// src/agents/acp/adapters.ts
|
|
22164
22224
|
var require_ = require;
|
|
22165
22225
|
function claudeBinaryWaiter(opts = {}) {
|
|
@@ -22256,7 +22316,15 @@ var REGISTRY = {
|
|
|
22256
22316
|
command: "kimi",
|
|
22257
22317
|
args: ["acp"],
|
|
22258
22318
|
requiresAgentBinary: "kimi",
|
|
22259
|
-
|
|
22319
|
+
// On a LOCAL `codeam pair` the CLI installs kimi ON DEMAND before spawning
|
|
22320
|
+
// (parity with the codespace bootstrap's KimiProvisioningStrategy) — so a
|
|
22321
|
+
// user who selected Kimi but hasn't installed the CLI doesn't hit a raw
|
|
22322
|
+
// `ENOENT — 'kimi' not found`. On a codespace/self-hosted box the backend
|
|
22323
|
+
// provisions it, so there we just wait for the binary to appear.
|
|
22324
|
+
waitForBinary: async (o) => {
|
|
22325
|
+
if (isLocalSession()) await ensureKimiInstalled();
|
|
22326
|
+
return waitForCommandOnPath("kimi", o);
|
|
22327
|
+
}
|
|
22260
22328
|
})
|
|
22261
22329
|
};
|
|
22262
22330
|
function getAcpAdapter(agent) {
|
|
@@ -22848,7 +22916,7 @@ var HistoryService = class _HistoryService {
|
|
|
22848
22916
|
};
|
|
22849
22917
|
|
|
22850
22918
|
// src/agents/acp/client.ts
|
|
22851
|
-
var
|
|
22919
|
+
var import_node_child_process23 = require("child_process");
|
|
22852
22920
|
var fs56 = __toESM(require("fs/promises"));
|
|
22853
22921
|
var fsSync = __toESM(require("fs"));
|
|
22854
22922
|
var os45 = __toESM(require("os"));
|
|
@@ -25452,7 +25520,7 @@ var AcpClient = class {
|
|
|
25452
25520
|
"acpClient",
|
|
25453
25521
|
`spawn cmd=${adapter.command} args=[${adapter.args.join(",")}] cwd=${cwd}`
|
|
25454
25522
|
);
|
|
25455
|
-
const child = (0,
|
|
25523
|
+
const child = (0, import_node_child_process23.spawn)(adapter.command, adapter.args, {
|
|
25456
25524
|
cwd,
|
|
25457
25525
|
// extraEnv (e.g. CLAUDE_CODE_DISABLE_1M_CONTEXT=1 on an on-demand
|
|
25458
25526
|
// re-spawn) layers over process.env; PATH stays last so the augmented
|
|
@@ -25890,12 +25958,12 @@ function buildRelaunchProxyEnv(baseEnv) {
|
|
|
25890
25958
|
return env;
|
|
25891
25959
|
}
|
|
25892
25960
|
var relaunchProxyWithoutBudget = async () => {
|
|
25893
|
-
const { spawn:
|
|
25961
|
+
const { spawn: spawn40 } = await import("child_process");
|
|
25894
25962
|
killHeadroomProxy();
|
|
25895
25963
|
await new Promise((r) => setTimeout(r, 500));
|
|
25896
25964
|
const proxyEnv = buildRelaunchProxyEnv(process.env);
|
|
25897
25965
|
try {
|
|
25898
|
-
const proxy =
|
|
25966
|
+
const proxy = spawn40(
|
|
25899
25967
|
"headroom",
|
|
25900
25968
|
["proxy", "--port", "8787"],
|
|
25901
25969
|
{ stdio: "ignore", detached: true, env: proxyEnv }
|
|
@@ -29751,14 +29819,6 @@ function fetchQuotaUsage(runtime, historySvc) {
|
|
|
29751
29819
|
});
|
|
29752
29820
|
}
|
|
29753
29821
|
|
|
29754
|
-
// src/baton/gate.ts
|
|
29755
|
-
function runtimeSupportsBaton(runtime) {
|
|
29756
|
-
return typeof runtime.resolveHistoryFile === "function";
|
|
29757
|
-
}
|
|
29758
|
-
function isLocalSession(env = process.env) {
|
|
29759
|
-
return env.CODESPACES !== "true" && env.CODEAM_AUTO_APPROVE !== "1" && env.HEADROOM_ENABLED !== "1" && !env.CODEAM_AUTO_TOKEN && !env.CODEAM_ENROLL_TOKEN;
|
|
29760
|
-
}
|
|
29761
|
-
|
|
29762
29822
|
// src/baton/baton-controller.ts
|
|
29763
29823
|
var BatonController = class {
|
|
29764
29824
|
constructor(deps) {
|
|
@@ -33297,7 +33357,7 @@ function checkChokidar() {
|
|
|
33297
33357
|
}
|
|
33298
33358
|
async function doctor(args2 = []) {
|
|
33299
33359
|
const json = args2.includes("--json");
|
|
33300
|
-
const cliVersion = true ? "2.60.
|
|
33360
|
+
const cliVersion = true ? "2.60.17" : "0.0.0-dev";
|
|
33301
33361
|
const apiBase2 = resolveApiBaseUrl();
|
|
33302
33362
|
const diagnosticId = (0, import_node_crypto11.randomUUID)();
|
|
33303
33363
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -33496,7 +33556,7 @@ async function completion(args2) {
|
|
|
33496
33556
|
// src/commands/version.ts
|
|
33497
33557
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
33498
33558
|
function version2() {
|
|
33499
|
-
const v = true ? "2.60.
|
|
33559
|
+
const v = true ? "2.60.17" : "unknown";
|
|
33500
33560
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
33501
33561
|
}
|
|
33502
33562
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.60.
|
|
3
|
+
"version": "2.60.17",
|
|
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",
|