aiterm-mcp 0.63.0 → 0.63.1

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,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.63.1] - 2026-11-02
11
+
12
+ ### Added
13
+ - Add `npm run test:dev` and a Testgate wrapper declaration for development test selection while preserving the Windows test runner and the full `npm test` entry.
14
+
15
+ ### Fixed
16
+ - Preserve printed output and correlated completion marks when ConPTY emits carriage return followed by cursor visibility controls.
17
+ - Keep native Windows Codex catalog fixtures until the test run ends so per-test cleanup does not race executable handle release after session shutdown.
18
+
10
19
  ## [0.63.0] - 2026-11-01
11
20
 
12
21
  - Preserve Windows registry protection before native identity checks, batch exact process births, and confirm native shutdown before cleaning a closed seat.
@@ -2989,7 +2998,8 @@ prototype (preserved under `prototype/python/` as the porting source and referen
2989
2998
  `ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
2990
2999
  provenance.
2991
3000
 
2992
- [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.63.0...HEAD
3001
+ [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.63.1...HEAD
3002
+ [0.63.1]: https://github.com/kitepon/aiterm-mcp/compare/v0.63.0...v0.63.1
2993
3003
  [0.63.0]: https://github.com/kitepon/aiterm-mcp/compare/v0.62.6...v0.63.0
2994
3004
  [0.62.6]: https://github.com/kitepon/aiterm-mcp/compare/v0.62.5...v0.62.6
2995
3005
  [0.62.5]: https://github.com/kitepon/aiterm-mcp/compare/v0.62.4...v0.62.5
package/README.ja.md CHANGED
@@ -209,7 +209,7 @@ runtime-error store は canonical dotagents config の `collection.enabled: true
209
209
  場合だけ収集し、既定OFF、network送信は行いません。tag起点CIのnpm provenance(OIDC Trusted
210
210
  Publishing)で公開し、GitHub Release が Official MCP Registry を再登録します。
211
211
 
212
- **状態:** 開発継続中 · 現行公開版 **v0.63.0** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
212
+ **状態:** 開発継続中 · 現行公開版 **v0.63.1** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
213
213
 
214
214
  ### 更新と巻き戻し
215
215
 
@@ -765,6 +765,7 @@ agent_launch({ "harness": "codex-cli", "remote": { "host": "rabbit" }, "cwd": "/
765
765
  ### トークン削減
766
766
 
767
767
  - `pty_read` は既定で制御文字除去・連続重複圧縮・head+tail 折りたたみ(+復元ヒント・メタ併記)をかける。
768
+ - 復帰文字の後ろにカーソル表示の制御だけが続く場合も、既に印字された出力と完了印を保持する。
768
769
  - `pty_read({ rtk: true })` は直前に送ったコマンド別の reducer(`git status`/`git log`/`grep`/`pytest` ほか)で観測出力をさらに縮約する(rtk バイナリ非依存・自前実装)。
769
770
  - `pty_send({ rtk: true })` は既知コマンドを `rtk` 形に書き換えて送り、実行先に `rtk` があればソースで削減を効かせる(無ければ素通し)。
770
771
 
package/README.md CHANGED
@@ -227,7 +227,7 @@ collection is off by default and performs no network I/O. It ships via
227
227
  tag-triggered CI with npm provenance (OIDC Trusted Publishing); the GitHub
228
228
  Release re-registers the Official MCP Registry entry.
229
229
 
230
- **Status:** actively maintained · current public release **v0.63.0** · 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).
230
+ **Status:** actively maintained · current public release **v0.63.1** · 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).
231
231
 
232
232
  ### Update and rollback
233
233
 
@@ -823,6 +823,7 @@ agent_launch({ "harness": "codex-cli", "remote": { "host": "rabbit" }, "cwd": "/
823
823
  ### Token reduction
824
824
 
825
825
  - `pty_read` by default strips control characters, collapses repeated lines, and folds long output into head+tail (with a restore hint and a meta line).
826
+ - Carriage returns followed only by cursor visibility controls preserve printed output and completion marks.
826
827
  - `pty_read({ rtk: true })` further shrinks the observed output with a per-command reducer (`git status`/`git log`/`grep`/`pytest` and more) — a self-contained reimplementation that needs no `rtk` binary.
827
828
  - `pty_send({ rtk: true })` rewrites a known command into `rtk` form before sending, so reduction happens at the source if `rtk` exists there (passthrough otherwise).
828
829
 
package/dist/core.js CHANGED
@@ -472,15 +472,19 @@ function estimateTokens(s) {
472
472
  return Math.ceil(s.length / 4.0);
473
473
  }
474
474
  export function stripControl(text) {
475
+ // OSC/DCS等の本文内のCRを、印字された進捗断片として扱わない。
476
+ text = text.replace(ANSI_RE, sequence => sequence.startsWith("\x1b[") ? sequence : "");
475
477
  text = text.replace(/\r\n/g, "\n"); // CRLF 正規化
476
478
  const out = [];
477
- for (let line of text.split("\n")) {
478
- if (line.includes("\r")) {
479
- const parts = line.split("\r");
480
- line = parts[parts.length - 1]; // 行中の\rは進捗上書き=最終状態だけ残す
481
- }
482
- line = line.replace(ANSI_RE, "").replace(CTRL_RE, "");
483
- out.push(line.replace(/\s+$/, "")); // rstrip
479
+ for (const line of text.split("\n")) {
480
+ let visibleLine = "";
481
+ for (const part of line.split("\r")) {
482
+ const visible = part.replace(ANSI_RE, "").replace(CTRL_RE, "");
483
+ // CRとcursor表示切替だけでは、既に印字した結果や完了印を消さない。
484
+ if (visible !== "" || /\x1b\[[0-2]?K/.test(part))
485
+ visibleLine = visible;
486
+ }
487
+ out.push(visibleLine.replace(/\s+$/, "")); // rstrip
484
488
  }
485
489
  return out.join("\n");
486
490
  }
package/docs/DESIGN.md CHANGED
@@ -85,6 +85,7 @@ coreの観測(`pty_observe`)・起動準備・送信口・停止は`kind`を
85
85
  agent入力欄への`bracketedPaste`は、制御文字の除去後も本文のまま渡す。nativeの前面process名が起動shellを報告していてもshell実行文へ変換しない。shell用のUTF-8初期化・複数行適合はshell送信(利用者のshell送信と、Aiterm自身のbash起動command)だけに適用する。
86
86
 
87
87
  `pty_read`は制御文字除去、反復圧縮、head+tail、command別reducerでcontext量を減らす。
88
+ CR後の表示制御だけの断片は既印字内容を消さず、文字による進捗上書きと明示的な行消去は維持する。同じ整形を使うmark検出でも結果と相関IDを保持する。
88
89
  完了はprocess exit、shell sentinel、literal/regex `until`、shell復帰を伴うquiescence、timeoutを区別する。
89
90
  新しいmarkは送信IDを完了印と待機fileへ結び、旧commandの印を次の完了へ使わない。旧producerのpending flagは読取り互換を保ち、旧readの完了で新しい待機fileを消さない。ID保存失敗は入力前拒否。
90
91
  要求されたsentinel/untilを静止判定より優先し、nested shellで証拠がない状態を完了へ丸めない。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.63.0",
3
+ "version": "0.63.1",
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, Cursor Agent CLI, and Antigravity CLI, plus durable PTYs for SSH, containers, and REPLs.",
6
6
  "keywords": [
@@ -62,12 +62,18 @@
62
62
  "engines": {
63
63
  "node": ">=18"
64
64
  },
65
+ "testgate": {
66
+ "wrappers": {
67
+ "scripts/run-seat-tests.mjs": {}
68
+ }
69
+ },
65
70
  "scripts": {
66
71
  "build": "node scripts/clean-build.mjs && tsc",
67
72
  "mcpb:build": "npm run build && node scripts/build-mcpb.mjs && npm ci --omit=dev --ignore-scripts --no-audit --no-fund --prefix dist/mcpb-stage/server && npx --yes @anthropic-ai/mcpb@2.1.2 validate dist/mcpb-stage/manifest.json && npx --yes @anthropic-ai/mcpb@2.1.2 pack dist/mcpb-stage dist/aiterm-mcp.mcpb",
68
73
  "verify:release-commit": "node scripts/verify-release-commit.mjs",
69
74
  "release": "node scripts/release.mjs",
70
75
  "test:docs": "node scripts/run-seat-tests.mjs --test test/repository-contract.test.mjs",
76
+ "test:dev": "node scripts/run-seat-tests.mjs --test scripts/verify-release-commit.test.mjs test/*.test.mjs",
71
77
  "prepublishOnly": "npm run verify:release-commit && npm run build",
72
78
  "start": "node dist/index.js",
73
79
  "test": "npm run build && node scripts/run-seat-tests.mjs --test test/seat-env.test.mjs && node scripts/run-seat-tests.mjs --test scripts/verify-release-commit.test.mjs test/*.test.mjs",