codeam-cli 2.23.18 → 2.23.19
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 +91 -21
- 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.23.18] — 2026-05-28
|
|
8
|
+
|
|
9
|
+
### CI
|
|
10
|
+
|
|
11
|
+
- **release:** Fix JetBrains preflight URL + 404000 status-code bug
|
|
12
|
+
|
|
7
13
|
## [2.23.14] — 2026-05-28
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -441,7 +441,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
|
|
|
441
441
|
// package.json
|
|
442
442
|
var package_default = {
|
|
443
443
|
name: "codeam-cli",
|
|
444
|
-
version: "2.23.
|
|
444
|
+
version: "2.23.19",
|
|
445
445
|
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.",
|
|
446
446
|
type: "commonjs",
|
|
447
447
|
main: "dist/index.js",
|
|
@@ -5774,7 +5774,7 @@ function readAnonId() {
|
|
|
5774
5774
|
}
|
|
5775
5775
|
function superProperties() {
|
|
5776
5776
|
return {
|
|
5777
|
-
cliVersion: true ? "2.23.
|
|
5777
|
+
cliVersion: true ? "2.23.19" : "0.0.0-dev",
|
|
5778
5778
|
nodeVersion: process.version,
|
|
5779
5779
|
platform: process.platform,
|
|
5780
5780
|
arch: process.arch,
|
|
@@ -6190,7 +6190,7 @@ var CommandRelayService = class {
|
|
|
6190
6190
|
};
|
|
6191
6191
|
|
|
6192
6192
|
// src/services/agent.service.ts
|
|
6193
|
-
var AgentService = class {
|
|
6193
|
+
var AgentService = class _AgentService {
|
|
6194
6194
|
constructor(runtime, opts) {
|
|
6195
6195
|
this.runtime = runtime;
|
|
6196
6196
|
this.opts = opts;
|
|
@@ -6200,6 +6200,10 @@ var AgentService = class {
|
|
|
6200
6200
|
this.agentReady = true;
|
|
6201
6201
|
setTimeout(() => this.drainPending(), 250);
|
|
6202
6202
|
}
|
|
6203
|
+
if (d3.length > 0) {
|
|
6204
|
+
this.lastAgentDataAt = Date.now();
|
|
6205
|
+
this.scheduleQuietCheck();
|
|
6206
|
+
}
|
|
6203
6207
|
(opts.onData ?? (() => {
|
|
6204
6208
|
}))(d3);
|
|
6205
6209
|
},
|
|
@@ -6226,6 +6230,34 @@ var AgentService = class {
|
|
|
6226
6230
|
*/
|
|
6227
6231
|
agentReady = false;
|
|
6228
6232
|
pendingInputs = [];
|
|
6233
|
+
/**
|
|
6234
|
+
* Serialised-submission state. Without this, a second `sendCommand`
|
|
6235
|
+
* arriving while the agent is still rendering its response to the
|
|
6236
|
+
* first lands in Claude Code's input field as a `[Pasted text #N]`
|
|
6237
|
+
* marker (bracketed-paste mode kicks in for multi-line writes). The
|
|
6238
|
+
* `\r` we schedule 50 ms later is consumed as paste content, not
|
|
6239
|
+
* submission, so the prompt sits in the input forever — the user
|
|
6240
|
+
* reported "se queda bloqueado en la terminal".
|
|
6241
|
+
*
|
|
6242
|
+
* The fix is agent-agnostic: track when the PTY last emitted bytes
|
|
6243
|
+
* (see `lastAgentDataAt`); after `QUIET_MS` of silence we consider
|
|
6244
|
+
* the agent idle and drain the next queued prompt. Works for any
|
|
6245
|
+
* PTY-spawned runtime (Claude Code, Codex, future agents) because
|
|
6246
|
+
* "no output in N ms" is a universal idle signal — we don't depend
|
|
6247
|
+
* on Claude's `❯` prompt or Codex's input-box rendering.
|
|
6248
|
+
*/
|
|
6249
|
+
agentBusy = false;
|
|
6250
|
+
lastAgentDataAt = 0;
|
|
6251
|
+
quietTimer = null;
|
|
6252
|
+
/**
|
|
6253
|
+
* How long the PTY must be silent before we consider the agent
|
|
6254
|
+
* idle and submit the next queued prompt. 1500 ms is generous
|
|
6255
|
+
* enough that a streamed response with brief mid-token pauses
|
|
6256
|
+
* (tool calls, model latency hiccups) doesn't get cut off, but
|
|
6257
|
+
* short enough that the user doesn't perceive lag between a
|
|
6258
|
+
* normal turn finishing and the next queued comment firing.
|
|
6259
|
+
*/
|
|
6260
|
+
static QUIET_MS = 1500;
|
|
6229
6261
|
/**
|
|
6230
6262
|
* Cached spawn() result so `restart()` can reuse the resolved
|
|
6231
6263
|
* binary path without re-running the strategy's install path. The
|
|
@@ -6234,17 +6266,55 @@ var AgentService = class {
|
|
|
6234
6266
|
* the SAME binary with new resume args.
|
|
6235
6267
|
*/
|
|
6236
6268
|
initialLaunch = null;
|
|
6269
|
+
/**
|
|
6270
|
+
* Debounced "agent went idle" check. Re-arms itself as long as
|
|
6271
|
+
* fresh PTY output keeps arriving. When the gap since the last
|
|
6272
|
+
* byte exceeds `QUIET_MS`, flip `agentBusy=false` and drain the
|
|
6273
|
+
* next queued prompt (if any). Idempotent — a no-op when the
|
|
6274
|
+
* timer is already pending.
|
|
6275
|
+
*
|
|
6276
|
+
* Re-arm uses the REMAINING wait (QUIET_MS - sinceLast), not a
|
|
6277
|
+
* full QUIET_MS — otherwise a single late data byte resets the
|
|
6278
|
+
* waiter to a fresh 1.5 s timer and the queue never drains.
|
|
6279
|
+
*/
|
|
6280
|
+
scheduleQuietCheck() {
|
|
6281
|
+
if (this.quietTimer) return;
|
|
6282
|
+
const tick = () => {
|
|
6283
|
+
this.quietTimer = null;
|
|
6284
|
+
const sinceLast = Date.now() - this.lastAgentDataAt;
|
|
6285
|
+
if (sinceLast >= _AgentService.QUIET_MS) {
|
|
6286
|
+
if (this.agentBusy) {
|
|
6287
|
+
this.agentBusy = false;
|
|
6288
|
+
log.trace("agent", "agent went idle \u2014 draining next pending");
|
|
6289
|
+
}
|
|
6290
|
+
this.drainPending();
|
|
6291
|
+
return;
|
|
6292
|
+
}
|
|
6293
|
+
this.quietTimer = setTimeout(tick, _AgentService.QUIET_MS - sinceLast);
|
|
6294
|
+
};
|
|
6295
|
+
this.quietTimer = setTimeout(tick, _AgentService.QUIET_MS);
|
|
6296
|
+
}
|
|
6297
|
+
/**
|
|
6298
|
+
* Write one prompt to the PTY using the existing pacing (text →
|
|
6299
|
+
* 50–300 ms → `\r` submit). Marks the agent busy so subsequent
|
|
6300
|
+
* `sendCommand` calls queue instead of stacking pastes.
|
|
6301
|
+
*/
|
|
6302
|
+
submitToPty(text) {
|
|
6303
|
+
if (!this.strategy) return;
|
|
6304
|
+
const s = this.strategy;
|
|
6305
|
+
this.agentBusy = true;
|
|
6306
|
+
log.trace("agent", `submit text=${text.length}B (queued=${this.pendingInputs.length})`);
|
|
6307
|
+
s.write(text);
|
|
6308
|
+
const lineCount = text.split("\n").length;
|
|
6309
|
+
const delay = Math.min(300, 50 + (lineCount - 1) * 40);
|
|
6310
|
+
setTimeout(() => s.write("\r"), delay);
|
|
6311
|
+
}
|
|
6237
6312
|
drainPending() {
|
|
6238
6313
|
if (!this.strategy || this.pendingInputs.length === 0) return;
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
setTimeout(() => s.write(text), offset);
|
|
6244
|
-
setTimeout(() => s.write("\r"), offset + 50);
|
|
6245
|
-
offset += 200;
|
|
6246
|
-
}
|
|
6247
|
-
this.pendingInputs.length = 0;
|
|
6314
|
+
if (this.agentBusy) return;
|
|
6315
|
+
const next = this.pendingInputs.shift();
|
|
6316
|
+
if (next === void 0) return;
|
|
6317
|
+
this.submitToPty(next);
|
|
6248
6318
|
}
|
|
6249
6319
|
async spawn() {
|
|
6250
6320
|
let launch;
|
|
@@ -6332,12 +6402,12 @@ var AgentService = class {
|
|
|
6332
6402
|
this.pendingInputs.push(text);
|
|
6333
6403
|
return;
|
|
6334
6404
|
}
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6405
|
+
if (this.agentBusy) {
|
|
6406
|
+
log.trace("claude", `sendCommand queued (agent busy) text=${text.length}B`);
|
|
6407
|
+
this.pendingInputs.push(text);
|
|
6408
|
+
return;
|
|
6409
|
+
}
|
|
6410
|
+
this.submitToPty(text);
|
|
6341
6411
|
}
|
|
6342
6412
|
/**
|
|
6343
6413
|
* Navigate a React Ink selector to the given 0-based target index and confirm.
|
|
@@ -18733,7 +18803,7 @@ function checkChokidar() {
|
|
|
18733
18803
|
}
|
|
18734
18804
|
async function doctor(args2 = []) {
|
|
18735
18805
|
const json = args2.includes("--json");
|
|
18736
|
-
const cliVersion = true ? "2.23.
|
|
18806
|
+
const cliVersion = true ? "2.23.19" : "0.0.0-dev";
|
|
18737
18807
|
const apiBase = resolveApiBaseUrl();
|
|
18738
18808
|
const diagnosticId = (0, import_node_crypto5.randomUUID)();
|
|
18739
18809
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -18932,7 +19002,7 @@ async function completion(args2) {
|
|
|
18932
19002
|
// src/commands/version.ts
|
|
18933
19003
|
var import_picocolors13 = __toESM(require("picocolors"));
|
|
18934
19004
|
function version2() {
|
|
18935
|
-
const v = true ? "2.23.
|
|
19005
|
+
const v = true ? "2.23.19" : "unknown";
|
|
18936
19006
|
console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
|
|
18937
19007
|
}
|
|
18938
19008
|
|
|
@@ -19160,7 +19230,7 @@ function checkForUpdates() {
|
|
|
19160
19230
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
19161
19231
|
if (process.env.CI) return;
|
|
19162
19232
|
if (!process.stdout.isTTY) return;
|
|
19163
|
-
const current = true ? "2.23.
|
|
19233
|
+
const current = true ? "2.23.19" : null;
|
|
19164
19234
|
if (!current) return;
|
|
19165
19235
|
const cache = readCache();
|
|
19166
19236
|
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.23.
|
|
3
|
+
"version": "2.23.19",
|
|
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",
|