codeam-cli 2.27.5 → 2.27.6
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 +6 -0
- package/dist/index.js +53 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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.27.5] — 2026-06-06
|
|
8
|
+
|
|
9
|
+
### Chore
|
|
10
|
+
|
|
11
|
+
- **cli:** Drop cursor-agent-acp — pulls deprecated SDK
|
|
12
|
+
|
|
7
13
|
## [2.27.4] — 2026-06-06
|
|
8
14
|
|
|
9
15
|
### Tests
|
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.27.
|
|
501
|
+
version: "2.27.6",
|
|
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",
|
|
@@ -5873,7 +5873,7 @@ function readAnonId() {
|
|
|
5873
5873
|
}
|
|
5874
5874
|
function superProperties() {
|
|
5875
5875
|
return {
|
|
5876
|
-
cliVersion: true ? "2.27.
|
|
5876
|
+
cliVersion: true ? "2.27.6" : "0.0.0-dev",
|
|
5877
5877
|
nodeVersion: process.version,
|
|
5878
5878
|
platform: process.platform,
|
|
5879
5879
|
arch: process.arch,
|
|
@@ -12324,6 +12324,21 @@ var AcpPublisher = class {
|
|
|
12324
12324
|
opts;
|
|
12325
12325
|
apiBase;
|
|
12326
12326
|
headers;
|
|
12327
|
+
/**
|
|
12328
|
+
* Wrap the event with `sessionId` + `pluginId` at the top level.
|
|
12329
|
+
* The backend's `PluginAuthGuard` reads both fields from the JSON
|
|
12330
|
+
* body even when `X-Plugin-Auth-Token` is set on the header and
|
|
12331
|
+
* `:sessionId` is on the URL path. Without the body fields it
|
|
12332
|
+
* rejects every POST with `PLUGIN_TOKEN_REQUIRED` — same shape the
|
|
12333
|
+
* legacy `streaming-emitter.service.ts` `postWithRetries` uses.
|
|
12334
|
+
*/
|
|
12335
|
+
envelope(event) {
|
|
12336
|
+
return JSON.stringify({
|
|
12337
|
+
sessionId: this.opts.sessionId,
|
|
12338
|
+
pluginId: this.opts.pluginId,
|
|
12339
|
+
...event
|
|
12340
|
+
});
|
|
12341
|
+
}
|
|
12327
12342
|
/**
|
|
12328
12343
|
* Fire-and-forget chunk POST. The backend's per-user SSE bus
|
|
12329
12344
|
* forwards each chunk to mobile/landing within ~20 ms (PRO) /
|
|
@@ -12336,7 +12351,7 @@ var AcpPublisher = class {
|
|
|
12336
12351
|
const { statusCode, body } = await _transport2.post(
|
|
12337
12352
|
url,
|
|
12338
12353
|
this.headers,
|
|
12339
|
-
|
|
12354
|
+
this.envelope(event)
|
|
12340
12355
|
);
|
|
12341
12356
|
if (statusCode < 200 || statusCode >= 300) {
|
|
12342
12357
|
log.warn("acpPublisher", `chunk status=${statusCode} body=${body.slice(0, 200)}`);
|
|
@@ -12357,7 +12372,7 @@ var AcpPublisher = class {
|
|
|
12357
12372
|
const { statusCode, body } = await _transport2.post(
|
|
12358
12373
|
url,
|
|
12359
12374
|
this.headers,
|
|
12360
|
-
|
|
12375
|
+
this.envelope(event)
|
|
12361
12376
|
);
|
|
12362
12377
|
if (statusCode < 200 || statusCode >= 300) {
|
|
12363
12378
|
log.warn("acpPublisher", `awaiting-answer status=${statusCode} body=${body.slice(0, 200)}`);
|
|
@@ -12599,10 +12614,13 @@ async function runAcpSession(opts) {
|
|
|
12599
12614
|
"acpRunner",
|
|
12600
12615
|
`adapter handshake ok protocolVersion=${initialize.protocolVersion} sessionId=${acpSessionId.slice(0, 8)}`
|
|
12601
12616
|
);
|
|
12617
|
+
showSuccess(`${opts.agent} online (ACP) \u2014 awaiting prompts from mobile.`);
|
|
12618
|
+
const runtime = createInteractiveAgentStrategy(opts.agent, createOsStrategy());
|
|
12619
|
+
const models = await runtime.listModels();
|
|
12602
12620
|
const relay = new CommandRelayService(
|
|
12603
12621
|
opts.pluginId,
|
|
12604
12622
|
async (cmd) => {
|
|
12605
|
-
await handleCommand(cmd, client2);
|
|
12623
|
+
await handleCommand(cmd, client2, relay, acpSessionId, models);
|
|
12606
12624
|
},
|
|
12607
12625
|
{ id: opts.agent, name: opts.agent, displayName: opts.agent }
|
|
12608
12626
|
);
|
|
@@ -12619,19 +12637,22 @@ async function runAcpSession(opts) {
|
|
|
12619
12637
|
await new Promise(() => {
|
|
12620
12638
|
});
|
|
12621
12639
|
}
|
|
12622
|
-
async function handleCommand(cmd, client2) {
|
|
12640
|
+
async function handleCommand(cmd, client2, relay, acpSessionId, models) {
|
|
12623
12641
|
switch (cmd.type) {
|
|
12624
12642
|
case "start_task": {
|
|
12625
12643
|
const payload = cmd.payload;
|
|
12626
12644
|
const prompt = payload?.prompt?.trim();
|
|
12627
12645
|
if (!prompt) {
|
|
12628
12646
|
log.warn("acpRunner", "start_task with empty prompt; ignoring");
|
|
12647
|
+
await relay.sendResult(cmd.id, "failed", { error: "empty prompt" });
|
|
12629
12648
|
return;
|
|
12630
12649
|
}
|
|
12631
12650
|
try {
|
|
12632
|
-
await client2.prompt(prompt);
|
|
12651
|
+
const reply = await client2.prompt(prompt);
|
|
12652
|
+
await relay.sendResult(cmd.id, "completed", { stopReason: reply.stopReason });
|
|
12633
12653
|
} catch (err) {
|
|
12634
12654
|
log.warn("acpRunner", `prompt failed: ${describeError(err)}`);
|
|
12655
|
+
await relay.sendResult(cmd.id, "failed", { error: describeError(err) });
|
|
12635
12656
|
}
|
|
12636
12657
|
return;
|
|
12637
12658
|
}
|
|
@@ -12639,13 +12660,31 @@ async function handleCommand(cmd, client2) {
|
|
|
12639
12660
|
case "escape_key": {
|
|
12640
12661
|
try {
|
|
12641
12662
|
await client2.cancel();
|
|
12663
|
+
await relay.sendResult(cmd.id, "completed", {});
|
|
12642
12664
|
} catch (err) {
|
|
12643
12665
|
log.warn("acpRunner", `cancel failed: ${describeError(err)}`);
|
|
12666
|
+
await relay.sendResult(cmd.id, "failed", { error: describeError(err) });
|
|
12644
12667
|
}
|
|
12645
12668
|
return;
|
|
12646
12669
|
}
|
|
12670
|
+
case "get_conversation": {
|
|
12671
|
+
await relay.sendResult(cmd.id, "completed", { conversationId: acpSessionId });
|
|
12672
|
+
return;
|
|
12673
|
+
}
|
|
12674
|
+
case "list_models": {
|
|
12675
|
+
await relay.sendResult(cmd.id, "completed", { models });
|
|
12676
|
+
return;
|
|
12677
|
+
}
|
|
12678
|
+
case "set_keep_alive":
|
|
12679
|
+
case "get_context": {
|
|
12680
|
+
await relay.sendResult(cmd.id, "completed", {});
|
|
12681
|
+
return;
|
|
12682
|
+
}
|
|
12647
12683
|
default:
|
|
12648
12684
|
log.trace("acpRunner", `command type "${cmd.type}" not supported in Phase 1 ACP mode`);
|
|
12685
|
+
await relay.sendResult(cmd.id, "failed", {
|
|
12686
|
+
error: `Command "${cmd.type}" is not supported in Phase 1 ACP mode.`
|
|
12687
|
+
});
|
|
12649
12688
|
return;
|
|
12650
12689
|
}
|
|
12651
12690
|
}
|
|
@@ -14816,7 +14855,7 @@ async function discoverRepos(workingDir, maxDepth = 4) {
|
|
|
14816
14855
|
// src/services/turn-files/files-outbox.ts
|
|
14817
14856
|
var fs24 = __toESM(require("fs/promises"));
|
|
14818
14857
|
var path29 = __toESM(require("path"));
|
|
14819
|
-
var
|
|
14858
|
+
var import_os8 = require("os");
|
|
14820
14859
|
var HOME_OUTBOX_DIR = ".codeam/outbox";
|
|
14821
14860
|
var MAX_AGE_MS = 24 * 60 * 60 * 1e3;
|
|
14822
14861
|
var BACKOFF_STEPS_MS = [
|
|
@@ -14983,7 +15022,7 @@ function applyJitter(ms) {
|
|
|
14983
15022
|
return Math.round(ms * factor);
|
|
14984
15023
|
}
|
|
14985
15024
|
function homeDir() {
|
|
14986
|
-
return process.env.HOME ?? process.env.USERPROFILE ?? (0,
|
|
15025
|
+
return process.env.HOME ?? process.env.USERPROFILE ?? (0, import_os8.tmpdir)();
|
|
14987
15026
|
}
|
|
14988
15027
|
|
|
14989
15028
|
// src/services/turn-files/turn-file-aggregator.ts
|
|
@@ -16932,11 +16971,11 @@ async function linkDryRunPreflight(ctx) {
|
|
|
16932
16971
|
var import_promises = require("dns/promises");
|
|
16933
16972
|
var import_fs = require("fs");
|
|
16934
16973
|
var import_promises2 = __toESM(require("fs/promises"));
|
|
16935
|
-
var
|
|
16974
|
+
var import_os9 = __toESM(require("os"));
|
|
16936
16975
|
var import_path4 = __toESM(require("path"));
|
|
16937
16976
|
var import_promises3 = require("stream/promises");
|
|
16938
16977
|
var import_which = __toESM(require("which"));
|
|
16939
|
-
var CACHED_BINARY = import_path4.default.join(
|
|
16978
|
+
var CACHED_BINARY = import_path4.default.join(import_os9.default.homedir(), ".codeam", "bin", "cloudflared");
|
|
16940
16979
|
async function waitForCloudflaredReady(url, timeoutMs = 6e4) {
|
|
16941
16980
|
const hostname3 = new URL(url).hostname;
|
|
16942
16981
|
const resolver = new import_promises.Resolver();
|
|
@@ -21132,7 +21171,7 @@ function checkChokidar() {
|
|
|
21132
21171
|
}
|
|
21133
21172
|
async function doctor(args2 = []) {
|
|
21134
21173
|
const json = args2.includes("--json");
|
|
21135
|
-
const cliVersion = true ? "2.27.
|
|
21174
|
+
const cliVersion = true ? "2.27.6" : "0.0.0-dev";
|
|
21136
21175
|
const apiBase = resolveApiBaseUrl();
|
|
21137
21176
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
21138
21177
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -21331,7 +21370,7 @@ async function completion(args2) {
|
|
|
21331
21370
|
// src/commands/version.ts
|
|
21332
21371
|
var import_picocolors13 = __toESM(require("picocolors"));
|
|
21333
21372
|
function version2() {
|
|
21334
|
-
const v = true ? "2.27.
|
|
21373
|
+
const v = true ? "2.27.6" : "unknown";
|
|
21335
21374
|
console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
|
|
21336
21375
|
}
|
|
21337
21376
|
|
|
@@ -21559,7 +21598,7 @@ function checkForUpdates() {
|
|
|
21559
21598
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
21560
21599
|
if (process.env.CI) return;
|
|
21561
21600
|
if (!process.stdout.isTTY) return;
|
|
21562
|
-
const current = true ? "2.27.
|
|
21601
|
+
const current = true ? "2.27.6" : null;
|
|
21563
21602
|
if (!current) return;
|
|
21564
21603
|
const cache = readCache();
|
|
21565
21604
|
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.27.
|
|
3
|
+
"version": "2.27.6",
|
|
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",
|