codeam-cli 2.23.33 → 2.23.35

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 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.33] — 2026-05-31
8
+
9
+ ### Performance
10
+
11
+ - **cli:** Coalesce file-watcher emissions in a 250 ms window
12
+
7
13
  ## [2.23.32] — 2026-05-31
8
14
 
9
15
  ### Added
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.33",
444
+ version: "2.23.35",
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.33" : "0.0.0-dev",
5777
+ cliVersion: true ? "2.23.35" : "0.0.0-dev",
5778
5778
  nodeVersion: process.version,
5779
5779
  platform: process.platform,
5780
5780
  arch: process.arch,
@@ -6305,19 +6305,30 @@ var AgentService = class _AgentService {
6305
6305
  this.quietTimer = setTimeout(tick, _AgentService.QUIET_MS);
6306
6306
  }
6307
6307
  /**
6308
- * Write one prompt to the PTY using the existing pacing (text →
6309
- * 50–300 ms → `\r` submit). Marks the agent busy so subsequent
6310
- * `sendCommand` calls queue instead of stacking pastes.
6308
+ * Write one prompt to the PTY and submit it.
6309
+ *
6310
+ * Per-agent input wire formatting (e.g. Claude Code's bracketed-
6311
+ * paste markers) lives in the runtime strategy's
6312
+ * `prepareInputWrites(text)`. This method only knows the generic
6313
+ * contract: emit N writes in order, wait `submitDelayMs`, then
6314
+ * send `\r` to submit. The default (when the strategy doesn't
6315
+ * override) is one `s.write(text)` followed by `\r` after 50 ms,
6316
+ * which works for plain REPL agents (Aider).
6317
+ *
6318
+ * Marks the agent busy so subsequent `sendCommand` calls queue
6319
+ * instead of stacking pastes.
6311
6320
  */
6312
6321
  submitToPty(text) {
6313
6322
  if (!this.strategy) return;
6314
6323
  const s = this.strategy;
6315
6324
  this.agentBusy = true;
6316
6325
  log.trace("agent", `submit text=${text.length}B (queued=${this.pendingInputs.length})`);
6317
- s.write(text);
6318
- const lineCount = text.split("\n").length;
6319
- const delay = Math.min(300, 50 + (lineCount - 1) * 40);
6320
- setTimeout(() => s.write("\r"), delay);
6326
+ const prep = this.runtime.prepareInputWrites?.(text) ?? {
6327
+ writes: [text],
6328
+ submitDelayMs: 50
6329
+ };
6330
+ for (const w3 of prep.writes) s.write(w3);
6331
+ setTimeout(() => s.write("\r"), prep.submitDelayMs);
6321
6332
  }
6322
6333
  drainPending() {
6323
6334
  if (!this.strategy || this.pendingInputs.length === 0) return;
@@ -9810,6 +9821,31 @@ var ClaudeRuntimeStrategy = class {
9810
9821
  constructor(os26) {
9811
9822
  this.os = os26;
9812
9823
  }
9824
+ /**
9825
+ * Claude Code's react-ink TUI enables bracketed-paste mode at
9826
+ * boot (`ESC[?2004h`). When a multi-line write arrives, Claude
9827
+ * opens a paste boundary that stays open until it sees the
9828
+ * matching `ESC[201~` end marker. A naïve `text + \r` lands the
9829
+ * `\r` INSIDE the open bracket as paste CONTENT, and the prompt
9830
+ * sits in the input forever (the user's mobile COMMENT flow was
9831
+ * stacking `[Pasted text #N]` markers with no submit).
9832
+ *
9833
+ * Fix: wrap multi-line prompts in the bracket markers ourselves
9834
+ * so the end marker closes the paste deterministically. The
9835
+ * caller emits `\r` 80 ms later — now OUTSIDE the bracket — and
9836
+ * Claude's input handler treats it as a normal Submit. Single-
9837
+ * line prompts don't trigger paste mode so we keep the bare
9838
+ * `text + \r` path for that case.
9839
+ */
9840
+ prepareInputWrites(text) {
9841
+ if (text.includes("\n")) {
9842
+ return {
9843
+ writes: [`\x1B[200~${text}\x1B[201~`],
9844
+ submitDelayMs: 80
9845
+ };
9846
+ }
9847
+ return { writes: [text], submitDelayMs: 50 };
9848
+ }
9813
9849
  async prepareLaunch() {
9814
9850
  const sessionId = (0, import_node_crypto4.randomUUID)();
9815
9851
  const sessionArgs = ["--session-id", sessionId];
@@ -19171,7 +19207,7 @@ function checkChokidar() {
19171
19207
  }
19172
19208
  async function doctor(args2 = []) {
19173
19209
  const json = args2.includes("--json");
19174
- const cliVersion = true ? "2.23.33" : "0.0.0-dev";
19210
+ const cliVersion = true ? "2.23.35" : "0.0.0-dev";
19175
19211
  const apiBase = resolveApiBaseUrl();
19176
19212
  const diagnosticId = (0, import_node_crypto6.randomUUID)();
19177
19213
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -19370,7 +19406,7 @@ async function completion(args2) {
19370
19406
  // src/commands/version.ts
19371
19407
  var import_picocolors13 = __toESM(require("picocolors"));
19372
19408
  function version2() {
19373
- const v = true ? "2.23.33" : "unknown";
19409
+ const v = true ? "2.23.35" : "unknown";
19374
19410
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
19375
19411
  }
19376
19412
 
@@ -19598,7 +19634,7 @@ function checkForUpdates() {
19598
19634
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
19599
19635
  if (process.env.CI) return;
19600
19636
  if (!process.stdout.isTTY) return;
19601
- const current = true ? "2.23.33" : null;
19637
+ const current = true ? "2.23.35" : null;
19602
19638
  if (!current) return;
19603
19639
  const cache = readCache();
19604
19640
  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.33",
3
+ "version": "2.23.35",
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",