aiterm-mcp 0.29.26 → 0.29.28

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
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.29.28] - 2026-09-02
11
+
12
+ ### Fixed
13
+
14
+ - Cursorの長いpromptが矢印の次行へ折り返され、末尾が画面外にある場合もcomposerへの反映を確認してsubmitする。
15
+
16
+ ## [0.29.27] - 2026-09-02
17
+
18
+ ### Fixed
19
+
20
+ - Cursorが貼り付け反映後の最初のEnterを取り落とし、promptをcomposerへ残した場合だけEnterを一度再送してturnを開始する。
21
+
10
22
  ## [0.29.26] - 2026-09-02
11
23
 
12
24
  ### Fixed
@@ -1506,7 +1518,9 @@ prototype (preserved under `prototype/python/` as the porting source and referen
1506
1518
  `ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
1507
1519
  provenance.
1508
1520
 
1509
- [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.26...HEAD
1521
+ [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.28...HEAD
1522
+ [0.29.28]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.27...v0.29.28
1523
+ [0.29.27]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.26...v0.29.27
1510
1524
  [0.29.26]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.25...v0.29.26
1511
1525
  [0.29.25]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.24...v0.29.25
1512
1526
  [0.29.24]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.23...v0.29.24
package/README.ja.md CHANGED
@@ -153,7 +153,7 @@ runtime-error store は canonical dotagents config の `collection.enabled: true
153
153
  場合だけ収集し、既定OFF、network送信は行いません。tag起点CIのnpm provenance(OIDC Trusted
154
154
  Publishing)で公開し、GitHub Release が Official MCP Registry を再登録します。
155
155
 
156
- **状態:** 開発継続中 · 現行公開版 **v0.29.26** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
156
+ **状態:** 開発継続中 · 現行公開版 **v0.29.28** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
157
157
 
158
158
  ### 更新と巻き戻し
159
159
 
package/README.md CHANGED
@@ -169,7 +169,7 @@ collection is off by default and performs no network I/O. It ships via
169
169
  tag-triggered CI with npm provenance (OIDC Trusted Publishing); the GitHub
170
170
  Release re-registers the Official MCP Registry entry.
171
171
 
172
- **Status:** actively maintained · current public release **v0.29.26** · runs on Linux · WSL2 · macOS · native Windows (tmux on POSIX, the tmux-CLI-compatible [psmux](https://github.com/psmux/psmux) on native Windows — no WSL required) · MIT · see the [CHANGELOG](CHANGELOG.md).
172
+ **Status:** actively maintained · current public release **v0.29.28** · runs on Linux · WSL2 · macOS · native Windows (tmux on POSIX, the tmux-CLI-compatible [psmux](https://github.com/psmux/psmux) on native Windows — no WSL required) · MIT · see the [CHANGELOG](CHANGELOG.md).
173
173
 
174
174
  ### Update and rollback
175
175
 
package/dist/core.js CHANGED
@@ -2444,14 +2444,24 @@ function agentSubmitResidueOnScreen(kind, screen, tail) {
2444
2444
  if (markerIdx < 0)
2445
2445
  return null;
2446
2446
  if (kind === "cursor") {
2447
- // Cursorは長いpasteを入力欄の先頭側だけ表示することがあり、送信文の末尾一致では
2448
- // 座礁を検出できない。最新composerのmarkerと同じ行にplaceholder以外の本文が
2449
- // 残っていれば、その本文自体を未submitの陽性証拠とする。
2450
- const sameRowText = lines[markerIdx]
2451
- .replace(/^\s*(?:->|>|→)\s*/u, "")
2452
- .trim();
2453
- if (sameRowText.length > 0
2454
- && !/^(?:Add a follow-up|Plan,\s*search,\s*build anything)\b/iu.test(sameRowText))
2447
+ // Cursorは長いpasteを入力欄の先頭側だけ表示し、矢印の次行へ本文を折り返すことがある。
2448
+ // 最新composerから下部statusを除いた領域にplaceholder以外の本文が残っていれば、
2449
+ // 送信文の末尾が画面外でも未submitの陽性証拠とする。
2450
+ const composerLines = lines.slice(markerIdx);
2451
+ composerLines[0] = composerLines[0].replace(/^\s*(?:->|>|→)\s*/u, "");
2452
+ while (composerLines.at(-1)?.trim() === "")
2453
+ composerLines.pop();
2454
+ if (/^\s*\/\S.*\s·\s\S/u.test(composerLines.at(-1) ?? ""))
2455
+ composerLines.pop();
2456
+ while (composerLines.at(-1)?.trim() === "")
2457
+ composerLines.pop();
2458
+ if (/^\s*(?:Auto|Ask)(?:\s|·|$)/iu.test(composerLines.at(-1) ?? ""))
2459
+ composerLines.pop();
2460
+ while (composerLines.at(-1)?.trim() === "")
2461
+ composerLines.pop();
2462
+ const composerText = composerLines.join("\n").trim();
2463
+ if (composerText.length > 0
2464
+ && !/^(?:Add a follow-up|Plan,\s*search,\s*build anything)\b/iu.test(composerText))
2455
2465
  return true;
2456
2466
  }
2457
2467
  return normalizeResidueText(lines.slice(markerIdx).join("")).includes(tail);
@@ -2482,6 +2492,15 @@ async function detectAgentSubmitResidueImpl(kind, text, sample, sleepFn, opts =
2482
2492
  async function detectAgentSubmitResidue(name, kind, text) {
2483
2493
  return detectAgentSubmitResidueImpl(kind, text, () => captureScreen(name, AGENT_TUI_READY_LINES), sleep);
2484
2494
  }
2495
+ async function retryCursorSubmitIfResidueImpl(kind, residue, submit, inspect) {
2496
+ if (kind !== "cursor" || residue.residue !== true)
2497
+ return residue;
2498
+ submit();
2499
+ return inspect();
2500
+ }
2501
+ async function retryCursorSubmitIfResidue(name, kind, text, residue) {
2502
+ return retryCursorSubmitIfResidueImpl(kind, residue, () => sendKey(name, "Enter", { preserveAgentOperation: true }), () => detectAgentSubmitResidue(name, kind, text));
2503
+ }
2485
2504
  async function waitCursorPromptVisibleImpl(text, sample, sleepFn, opts = {}) {
2486
2505
  const tail = agentSubmitResidueTail(text) ?? normalizeResidueText(text);
2487
2506
  const pollMs = opts.pollMs ?? CURSOR_PROMPT_VISIBLE_POLL_MS;
@@ -2586,6 +2605,11 @@ export async function __testWaitCursorPromptVisible(text, samples, opts = {}) {
2586
2605
  }, opts);
2587
2606
  return { ...result, sleeps };
2588
2607
  }
2608
+ export async function __testRetryCursorSubmitIfResidue(kind, first, second) {
2609
+ let submits = 0;
2610
+ const result = await retryCursorSubmitIfResidueImpl(kind, first, () => { submits++; }, async () => second);
2611
+ return { result, submits };
2612
+ }
2589
2613
  export function __testSetAgentTuiReadyStableSamples(value) {
2590
2614
  if (value !== null && (!Number.isInteger(value) || value < 1 || value > 1000)) {
2591
2615
  throw new AitermError("test ready stable samplesが不正です", 2);
@@ -2946,7 +2970,10 @@ export async function dispatchAgentTurn(name, text, o = {}) {
2946
2970
  await sleep(AGENT_SUBMIT_DELAY_MS);
2947
2971
  }
2948
2972
  sendKey(name, "Enter", { preserveAgentOperation: meta.kind === "claude" });
2949
- const residue = await detectAgentSubmitResidue(name, meta.kind, dispatchText);
2973
+ let residue = await detectAgentSubmitResidue(name, meta.kind, dispatchText);
2974
+ // Cursorはcomposerへの貼付反映後でも最初のEnterを取り落とすことがある。本文残留を
2975
+ // 陽性観測した場合だけ同じEnterを一度再送し、再検査後も残る時は失敗として返す。
2976
+ residue = await retryCursorSubmitIfResidue(name, meta.kind, dispatchText, residue);
2950
2977
  assertAgentSubmitDelivered(name, meta.kind, residue);
2951
2978
  return {
2952
2979
  schema: "aiterm.agent-dispatch.v1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.29.26",
3
+ "version": "0.29.28",
4
4
  "mcpName": "io.github.kitepon/aiterm-mcp",
5
5
  "description": "Persistent terminal MCP with one harness-based launcher for Claude Code, Codex CLI, Grok CLI, and Cursor Agent CLI, plus durable PTYs for SSH, containers, and REPLs.",
6
6
  "keywords": [