codeam-cli 2.23.34 → 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.34",
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.34" : "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,
@@ -6307,21 +6307,13 @@ var AgentService = class _AgentService {
6307
6307
  /**
6308
6308
  * Write one prompt to the PTY and submit it.
6309
6309
  *
6310
- * For multi-line text (or any text > 1 line), Claude Code's TUI
6311
- * triggers bracketed-paste mode and treats the write as a paste:
6312
- * a `[Pasted text #N]` marker lands in the input field, and any
6313
- * `\r` we send while the paste boundary is still open is swallowed
6314
- * as part of the paste content never reaching the submit
6315
- * handler. The result is the prompt sitting in the input forever
6316
- * (the user reported stacking `[Pasted text #N]` markers with no
6317
- * agent reply).
6318
- *
6319
- * Fix: explicitly bracket the paste ourselves (`ESC[200~ <text>
6320
- * ESC[201~`) so the end marker closes the paste deterministically.
6321
- * A short delay later we send `\r` — now OUTSIDE the bracket — so
6322
- * Claude's input handler treats it as Submit, not paste content.
6323
- * Single-line text doesn't trigger paste mode, so we keep the
6324
- * legacy `text + \r` path for that case (cheaper, no markers).
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).
6325
6317
  *
6326
6318
  * Marks the agent busy so subsequent `sendCommand` calls queue
6327
6319
  * instead of stacking pastes.
@@ -6331,14 +6323,12 @@ var AgentService = class _AgentService {
6331
6323
  const s = this.strategy;
6332
6324
  this.agentBusy = true;
6333
6325
  log.trace("agent", `submit text=${text.length}B (queued=${this.pendingInputs.length})`);
6334
- const isMultiline = text.includes("\n");
6335
- if (isMultiline) {
6336
- s.write(`\x1B[200~${text}\x1B[201~`);
6337
- setTimeout(() => s.write("\r"), 80);
6338
- } else {
6339
- s.write(text);
6340
- setTimeout(() => s.write("\r"), 50);
6341
- }
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);
6342
6332
  }
6343
6333
  drainPending() {
6344
6334
  if (!this.strategy || this.pendingInputs.length === 0) return;
@@ -9831,6 +9821,31 @@ var ClaudeRuntimeStrategy = class {
9831
9821
  constructor(os26) {
9832
9822
  this.os = os26;
9833
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
+ }
9834
9849
  async prepareLaunch() {
9835
9850
  const sessionId = (0, import_node_crypto4.randomUUID)();
9836
9851
  const sessionArgs = ["--session-id", sessionId];
@@ -19192,7 +19207,7 @@ function checkChokidar() {
19192
19207
  }
19193
19208
  async function doctor(args2 = []) {
19194
19209
  const json = args2.includes("--json");
19195
- const cliVersion = true ? "2.23.34" : "0.0.0-dev";
19210
+ const cliVersion = true ? "2.23.35" : "0.0.0-dev";
19196
19211
  const apiBase = resolveApiBaseUrl();
19197
19212
  const diagnosticId = (0, import_node_crypto6.randomUUID)();
19198
19213
  log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
@@ -19391,7 +19406,7 @@ async function completion(args2) {
19391
19406
  // src/commands/version.ts
19392
19407
  var import_picocolors13 = __toESM(require("picocolors"));
19393
19408
  function version2() {
19394
- const v = true ? "2.23.34" : "unknown";
19409
+ const v = true ? "2.23.35" : "unknown";
19395
19410
  console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
19396
19411
  }
19397
19412
 
@@ -19619,7 +19634,7 @@ function checkForUpdates() {
19619
19634
  if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
19620
19635
  if (process.env.CI) return;
19621
19636
  if (!process.stdout.isTTY) return;
19622
- const current = true ? "2.23.34" : null;
19637
+ const current = true ? "2.23.35" : null;
19623
19638
  if (!current) return;
19624
19639
  const cache = readCache();
19625
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.34",
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",