aiterm-mcp 0.29.10 → 0.29.12

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.12] - 2026-09-01
11
+
12
+ ### Changed
13
+
14
+ - Run the product-owned full CI on the current factory environments: `macos-native`, `linux-workstation`, and `windows-native`. Keep `linux-server` for operational workflows instead of duplicating the full product test there.
15
+
16
+ ## [0.29.11] - 2026-09-01
17
+
18
+ ### Added
19
+
20
+ - Add `agent_steer` to inject an additional message into a running Codex or Grok turn. Idle sessions return `delivery=idle` without sending text so callers can queue a new turn explicitly.
21
+
10
22
  ## [0.29.10] - 2026-08-31
11
23
 
12
24
  ### Fixed
@@ -1408,7 +1420,9 @@ prototype (preserved under `prototype/python/` as the porting source and referen
1408
1420
  `ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
1409
1421
  provenance.
1410
1422
 
1411
- [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.10...HEAD
1423
+ [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.12...HEAD
1424
+ [0.29.12]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.11...v0.29.12
1425
+ [0.29.11]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.10...v0.29.11
1412
1426
  [0.29.10]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.9...v0.29.10
1413
1427
  [0.29.9]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.8...v0.29.9
1414
1428
  [0.29.8]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.7...v0.29.8
package/README.ja.md CHANGED
@@ -94,7 +94,7 @@ diagnostics、recovery、update、releaseを所有します。このREADMEと[
94
94
 
95
95
  **言葉でなく実測で:** 記録済み203テストのベンチマークでは、`pty_read` はコンテキストに載るトークンを生ログの **約 7.1 分の 1** に減らす。しかも pass/fail の判定は畳んでも残る。→ [組み込みシェルツールとの使い分け](#組み込みシェルツールとの使い分け)
96
96
 
97
- 15ツール: 6つのPTYツール、正規のagent起動入口`agent_launch`、移行用の旧4alias、`agent_configure`、`claude_turn`、`claude_approval`、`diagnostics`。backendはPOSIXのtmux/Windows nativeのpsmuxなので、MCPサーバやAIクライアントが再起動してもsessionは生き残る。
97
+ 16ツール: 6つのPTYツール、正規のagent起動入口`agent_launch`、実行中のCodex/Grokを誘導する`agent_steer`、移行用の旧4alias、`agent_configure`、`claude_turn`、`claude_approval`、`diagnostics`。backendはPOSIXのtmux/Windows nativeのpsmuxなので、MCPサーバやAIクライアントが再起動してもsessionは生き残る。
98
98
 
99
99
  **v0.28.0では実行基盤harnessとmodelを分離した。** harnessはagent loop・認証・hook・session・transcriptを所有し、modelはその上で選ぶ。Cursor Agent CLIでGPT/Claude/Grokを選んでも完了契約はCursor方式のまま。Composerは別harnessではなく、`harness:"grok-cli", model:"grok-composer-2.5-fast"`で表す。旧4起動ツールは同じ実装へ流れる互換alias。
100
100
 
@@ -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.10** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
156
+ **状態:** 開発継続中 · 現行公開版 **v0.29.12** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
157
157
 
158
158
  ### 更新と巻き戻し
159
159
 
@@ -287,7 +287,7 @@ Throughline自体が不要である。
287
287
  Claude Code を再起動して、接続を確認:
288
288
 
289
289
  ```bash
290
- /mcp # aiterm が connected・15 ツール公開、と出る
290
+ /mcp # aiterm が connected・16 ツール公開、と出る
291
291
  ```
292
292
 
293
293
  最初のセッション——4 回の呼び出しで、1 個の永続端末:
@@ -328,7 +328,7 @@ MCP クライアントが aiterm を stdio 越しにプログラムから駆動
328
328
 
329
329
  ```mermaid
330
330
  flowchart LR
331
- AI["AI / MCP client<br/>(the orchestrator)"] -->|"pty_send · agent_launch · agent_configure · claude_turn · claude_approval<br/>旧launcher alias · diagnostics"| S["aiterm-mcp<br/>stdio MCP · 15 tools"]
331
+ AI["AI / MCP client<br/>(the orchestrator)"] -->|"pty_send · agent_launch · agent_steer · agent_configure · claude_turn · claude_approval<br/>旧launcher alias · diagnostics"| S["aiterm-mcp<br/>stdio MCP · 16 tools"]
332
332
  S -->|"pty_read<br/>token-reduced"| AI
333
333
  S -->|"tmux / psmux<br/>send · capture"| P["persistent PTYs<br/>再起動を跨ぐ"]
334
334
  P -->|"ssh · docker · repl"| R["nested<br/>remote · container · REPL"]
@@ -409,6 +409,7 @@ aiterm は同じ核心の洞察——端末を出会いの場にする——を
409
409
  | `pty_close` | 冪等に閉じ、`closed` / `already_closed`を返す | `session_id` |
410
410
  | `pty_list` | セッション一覧(agent行は正規`harness=<id>`と互換`agent=<kind>`を含む) | (なし) |
411
411
  | `agent_launch` | harnessとmodelを別軸で選ぶ正規agent起動入口 | `harness`, `prompt?`, `model?`, `reasoning_effort?`, `cwd?`, `write_scope?` |
412
+ | `agent_steer` | 実行中のCodex/Grok turnへtextを差し込む。idleなら送信せず`idle`を返す | `session_id`, `text` |
412
413
  | `claude_agent` / `codex_agent` / `grok_agent` / `composer_agent` | deprecated互換alias | 旧launcher引数 |
413
414
  | `agent_configure` | 起動中のClaude/Codex/Grok/Composer/Cursorを再起動せずmodel/effort変更 | `session_id`, `model?`, `reasoning_effort?` |
414
415
  | `claude_turn` | 相関済みClaude operationをdispatch(issue)または回収(recover) | `action`, `session_id`, `operation_id`, `text?` |
@@ -494,8 +495,8 @@ npm link # ローカルで `aiterm-mcp` を PATH に
494
495
  ```
495
496
 
496
497
  開発中は変更に直結するfocused testを先にローカルで実行します。GitHub Actionsの最終gateは
497
- self-hostedのmacOS native・Linux native・Windows native・WSL2で同じ`npm test`を同時実行し、
498
- OS別の縮小suiteで代用しません。tag起点のnpm公開は4環境greenとtagged commitの`origin/main`
498
+ self-hostedの`macos-native`・`linux-workstation`・`windows-native`で同じ`npm test`を同時実行し、
499
+ OS別の縮小suiteで代用しません。tag起点のnpm公開は3環境greenとtagged commitの`origin/main`
499
500
  祖先確認を通過した後だけ実行します。
500
501
 
501
502
  共通進行は`src/core.ts`、harness固有は`src/harnesses/`、OS差は`src/tmux-runtime.ts`/`src/agent-resolver.ts`、reducerは`src/rtk.ts`、公開面は`src/index.ts`が所有する。現行設計は[`docs/DESIGN.md`](docs/DESIGN.md)、release手順は[`docs/RELEASE.md`](docs/RELEASE.md)を正とする。`prototype/python/`はreducerの歴史的移植元であり、pytest reducerは本家rtk 0.42.0と一致する(上記の`FAILED`行の差異だけは意図的・回帰テストで固定)。
package/README.md CHANGED
@@ -96,7 +96,7 @@ Aiterm and is not a runtime dependency.
96
96
 
97
97
  **Measured, not claimed:** in the recorded 203-test benchmark, a `pty_read` puts **~7.1× fewer tokens** in your context than the raw log — and the pass/fail verdict survives the fold. → [When to reach for it vs. the built-in shell](#when-to-reach-for-it-vs-the-built-in-shell)
98
98
 
99
- Fifteen tools: six **PTY tools** — `pty_open` / `pty_send` / `pty_read` / `pty_key` / `pty_close` / `pty_list` — to open, drive, and read one persistent terminal; one canonical **agent launcher**, `agent_launch`, which selects `claude-code`, `codex-cli`, `grok-cli`, or `cursor-cli` as the execution harness; four deprecated launcher aliases kept for migration; `agent_configure`; `claude_turn`; `claude_approval`; and `diagnostics`. The backend is **tmux on POSIX and psmux on native Windows**, so sessions survive even if the MCP server or the AI client restarts.
99
+ Sixteen tools: six **PTY tools** — `pty_open` / `pty_send` / `pty_read` / `pty_key` / `pty_close` / `pty_list` — to open, drive, and read one persistent terminal; one canonical **agent launcher**, `agent_launch`, which selects `claude-code`, `codex-cli`, `grok-cli`, or `cursor-cli` as the execution harness; `agent_steer` for an active Codex or Grok turn; four deprecated launcher aliases kept for migration; `agent_configure`; `claude_turn`; `claude_approval`; and `diagnostics`. The backend is **tmux on POSIX and psmux on native Windows**, so sessions survive even if the MCP server or the AI client restarts.
100
100
 
101
101
  **v0.28.0 separates the execution harness from the model.** The harness owns the agent loop, authentication, hooks, session, and transcript; `model` is what that harness runs. Cursor Agent CLI can therefore select GPT, Claude, or Grok without changing the completion contract from Cursor hooks to another harness's. Grok Composer is a Grok CLI model preset, not another harness: use `harness: "grok-cli", model: "grok-composer-2.5-fast"`. The old four launcher tools are thin compatibility aliases over the same implementation.
102
102
 
@@ -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.10** · 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.12** · 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
 
@@ -316,7 +316,7 @@ The only edits to the captures above are the two `⋮` lines (a long head/tail r
316
316
  Restart Claude Code, then verify the connection:
317
317
 
318
318
  ```bash
319
- /mcp # aiterm should show as connected, exposing 15 tools
319
+ /mcp # aiterm should show as connected, exposing 16 tools
320
320
  ```
321
321
 
322
322
  Your first session — four calls, one persistent terminal:
@@ -357,7 +357,7 @@ The terminal is real and shared, so a human *can* jump in ([A human can watch](#
357
357
 
358
358
  ```mermaid
359
359
  flowchart LR
360
- AI["AI / MCP client<br/>(the orchestrator)"] -->|"pty_send · agent_launch · agent_configure · claude_turn · claude_approval<br/>legacy launcher aliases · diagnostics"| S["aiterm-mcp<br/>stdio MCP · 15 tools"]
360
+ AI["AI / MCP client<br/>(the orchestrator)"] -->|"pty_send · agent_launch · agent_steer · agent_configure · claude_turn · claude_approval<br/>legacy launcher aliases · diagnostics"| S["aiterm-mcp<br/>stdio MCP · 16 tools"]
361
361
  S -->|"pty_read<br/>token-reduced"| AI
362
362
  S -->|"tmux / psmux<br/>send · capture"| P["persistent PTYs<br/>survive restarts"]
363
363
  P -->|"ssh · docker · repl"| R["nested<br/>remote · container · REPL"]
@@ -440,6 +440,7 @@ On top of that sits a productized layer a raw tmux bridge doesn't have: **token-
440
440
  | `pty_close` | Close idempotently; return `closed` / `already_closed` | `session_id` |
441
441
  | `pty_list` | List sessions (agent rows carry canonical `harness=<id>` plus compatibility `agent=<kind>`) | (none) |
442
442
  | `agent_launch` | Canonical agent launch; harness and model are independent | `harness`, `prompt?`, `model?`, `reasoning_effort?`, `cwd?`, `write_scope?` |
443
+ | `agent_steer` | Inject text into the active Codex or Grok turn; return `idle` without sending when no turn is active | `session_id`, `text` |
443
444
  | `claude_agent` / `codex_agent` / `grok_agent` / `composer_agent` | Deprecated compatibility aliases | legacy launcher arguments |
444
445
  | `agent_configure` | Change model/effort in a running Claude, Codex, Grok, Composer, or Cursor session without restarting it | `session_id`, `model?`, `reasoning_effort?` |
445
446
  | `claude_turn` | Issue (dispatch-only) or recover one correlated Claude operation | `action`, `session_id`, `operation_id`, `text?` |
@@ -539,13 +540,12 @@ npm link # put `aiterm-mcp` on PATH locally
539
540
  ```
540
541
 
541
542
  Development uses focused local tests first. The final GitHub Actions gate starts the same full
542
- `npm test` concurrently on self-hosted macOS native, Linux native, Windows native, and WSL2
543
+ `npm test` concurrently on the self-hosted `macos-native`, `linux-workstation`, and `windows-native`
543
544
  runners; it does not replace any OS with a reduced suite. Tag-triggered npm publishing runs only
544
- after all four environments pass and the tagged commit is confirmed on `origin/main`. The native
545
+ after all three environments pass and the tagged commit is confirmed on `origin/main`. The native
545
546
  Windows runner needs psmux ≥ 3.3.8 and Git for Windows on its PATH, and must run as an
546
547
  interactive Windows user; `NETWORK SERVICE` lacks the per-user environment the pane shell and
547
- harness CLIs rely on and is not a valid runner identity (the separate WSL2 runner still owns the
548
- initialized WSL distro).
548
+ harness CLIs rely on and is not a valid runner identity.
549
549
 
550
550
  Logic lives in `src/core.ts` (tmux control, reduction, completion detection, safety, agent launch) and `src/rtk.ts` (per-command reducers); `src/index.ts` is the MCP surface. The current architecture is in [`docs/DESIGN.md`](docs/DESIGN.md), the release procedure is in [`docs/RELEASE.md`](docs/RELEASE.md), and `prototype/python/` remains the reducer's historical porting source (the pytest reducer is ported to match upstream rtk 0.42.0, except the deliberate `FAILED`-line difference noted above, and is locked by regression tests).
551
551
 
package/dist/core.js CHANGED
@@ -2848,6 +2848,33 @@ export async function dispatchAgentTurn(name, text, o = {}) {
2848
2848
  submit_residue: residue.residue,
2849
2849
  };
2850
2850
  }
2851
+ export async function steerAgentTurn(name, text) {
2852
+ assertSessionName(name);
2853
+ const meta = loadAgentMetadata(name);
2854
+ if (!["codex", "grok", "composer"].includes(meta.kind)) {
2855
+ throw new AitermError("agent_steer はCodex/Grok agent sessionだけで使用できます", 2);
2856
+ }
2857
+ const receipt = {
2858
+ schema: "aiterm.agent-steer.v1",
2859
+ session_id: meta.aiterm_session,
2860
+ launch_id: meta.launch_id,
2861
+ vendor: meta.kind,
2862
+ harness: agentHarness(meta.kind),
2863
+ };
2864
+ if (!isAgentTuiBusy(meta.kind, captureScreen(name, AGENT_TUI_READY_LINES)))
2865
+ return { ...receipt, delivery: "idle" };
2866
+ send(name, text, {
2867
+ enter: false,
2868
+ force: true,
2869
+ raw: false,
2870
+ mark: false,
2871
+ rtk: false,
2872
+ bracketedPaste: true,
2873
+ });
2874
+ await sleep(AGENT_SUBMIT_DELAY_MS);
2875
+ sendKey(name, "Enter");
2876
+ return { ...receipt, delivery: "steered" };
2877
+ }
2851
2878
  export async function runClaudeOperation({ session_id: name, action, operation_id: operationIdInput, text, }) {
2852
2879
  assertSessionName(name);
2853
2880
  if (action !== "issue" && action !== "recover") {
package/dist/index.js CHANGED
@@ -203,6 +203,33 @@ server.registerTool("pty_send", {
203
203
  return fail(e);
204
204
  }
205
205
  });
206
+ server.registerTool("agent_steer", {
207
+ description: "実行中のCodex/Grok agentへ追加メッセージを差し込み、現在のターンを誘導する。" +
208
+ "独立した次ターンを始める用途ではなく、idle時は文字を送らずdelivery=idleを返す。",
209
+ inputSchema: {
210
+ session_id: z.string(),
211
+ text: z.string().describe("現在のターンへ追加する文字列。UTF-8で最大64KiB"),
212
+ },
213
+ outputSchema: {
214
+ schema: z.literal("aiterm.agent-steer.v1"),
215
+ session_id: z.string(),
216
+ launch_id: z.string(),
217
+ vendor: z.enum(["codex", "grok", "composer"]),
218
+ harness: z.enum(["codex-cli", "grok-cli"]),
219
+ delivery: z.enum(["steered", "idle"]),
220
+ },
221
+ }, async ({ session_id, text }) => {
222
+ try {
223
+ const receipt = await core.steerAgentTurn(session_id, text);
224
+ return {
225
+ content: [{ type: "text", text: `${receipt.delivery} ${receipt.session_id}` }],
226
+ structuredContent: receipt,
227
+ };
228
+ }
229
+ catch (e) {
230
+ return fail(e);
231
+ }
232
+ });
206
233
  server.registerTool("pty_read", {
207
234
  description: "セッションの出力をトークン削減して読む(既定は前回読取位置からの増分)。" +
208
235
  "削減: 制御文字除去 / 反復圧縮 / head+tail 折りたたみ+復元ヒント+メタ併記。" +
package/docs/DESIGN.md CHANGED
@@ -25,6 +25,7 @@ project/user環境を置換せず、launch相関と完了回収に必要なsta
25
25
  agent turnは常に非ブロックdispatchである。receiptの`event_cursor`がturn境界、`wait_process`が
26
26
  platform nativeな別process起動情報を返す。waiterは純readerで、親のforeground turnを塞がない。
27
27
  回答はharness所有transcriptから同じturnへ相関して回収し、欠落・曖昧・timeout時にpromptを再送しない。
28
+ `agent_steer`は実行中のCodex/Grok turnへ追加textを差し込み、idleなら送信せず状態を返す。
28
29
 
29
30
  ## Layer ownership
30
31
 
package/docs/RELEASE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Release
2
2
 
3
- Aitermのreleaseはこのrepositoryが所有する。`.github/workflows/product-full-ci.yml`が4環境runnerと
3
+ Aitermのreleaseはこのrepositoryが所有する。`.github/workflows/product-full-ci.yml`が3環境runnerと
4
4
  製品gateの正本であり、dotagentsの工場CIは横断受入のconsumerであってreleaseを制御しない。
5
5
 
6
6
  ## Version同期
@@ -26,25 +26,25 @@ npm pack --dry-run
26
26
  npm run mcpb:build
27
27
  ```
28
28
 
29
- MCPBのstaged serverでversion、15 tools、stderr 0、必要なruntime JavaScriptの同梱を確認する。
29
+ MCPBのstaged serverでversion、16 tools、stderr 0、必要なruntime JavaScriptの同梱を確認する。
30
30
 
31
31
  ## Mainと公開
32
32
 
33
- 1. release commitを`main`へpushし、macOS native、Linux native、Windows native、WSL2の同一fullをgreenにする。
33
+ 1. release commitを`main`へpushし、`macos-native`、`linux-workstation`、`windows-native`の同一fullをgreenにする。
34
34
  2. `npm run verify:release-commit`で対象commitが`origin/main`の祖先かつworktree cleanであることを確認する。
35
- 3. 同じcommitへ`v<version>` tagを付けてpushする。tag CIが4環境green後にnpmへprovenance付きでpublishする。
35
+ 3. 同じcommitへ`v<version>` tagを付けてpushする。tag CIが3環境green後にnpmへprovenance付きでpublishする。
36
36
  4. build済みMCPBを添付したGitHub Releaseを公開する。release eventがOfficial MCP Registry登録を起動する。
37
37
  5. npm、GitHub Release、Official Registryが同じversionを返すまで確認する。
38
38
 
39
39
  CI callerは同じrepositoryの`./.github/workflows/product-full-ci.yml`だけを呼ぶ。製品側の`npm test`、
40
- 4環境runner、release gateを外部repositoryへ移さず、dotagentsの変更や停止からAitermの受入を独立させる。
40
+ 3環境runner、release gateを外部repositoryへ移さず、dotagentsの変更や停止からAitermの受入を独立させる。
41
41
 
42
42
  ## 公開後smoke
43
43
 
44
44
  公式npm packageを隔離またはglobal installし、次を確認する。
45
45
 
46
46
  - `aiterm-mcp`、`aiterm-wait`、`aiterm-runtime-errors`の3 bins。
47
- - MCP initializeのversion、15 tools、stderr 0。
47
+ - MCP initializeのversion、16 tools、stderr 0。
48
48
  - POSIXはtmux、Windows nativeはpsmux 3.3.8以上とPowerShell 7。
49
49
  - 変更に触れたharnessの起動、non-blocking dispatch、wait outcome、transcript回収、`pty_close`後の残骸ゼロ。
50
50
  - Official Registryが`io.github.kitepon/aiterm-mcp`の同じversionをactive/latestとして返す。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.29.10",
3
+ "version": "0.29.12",
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": [