aiterm-mcp 0.70.34 → 0.70.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
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.70.35] - 2026-11-12
11
+
12
+ - Writes that one Aiterm process forwards to the same terminal seat now leave it one at a time: `pty_send`, `agent_configure` and `agent_goal` other than `inspect`, keyed by terminal and session. The next one starts when the previous forward has returned, success or failure. A local seat already had this inside one process (`withAgentSendLock`); a terminal seat did not, because each forward runs its own `aiterm-mcp` on the terminal. Reads are not queued, other seats are not queued, and a `pty_send` holds the order only for its forward, not for the steer `wait_process` relay that may follow. Two Aiterm processes forwarding to one seat are still not ordered by Aiterm (0.63.12).
13
+
10
14
  ## [0.70.34] - 2026-11-12
11
15
 
12
16
  - `agent_goal` `inspect` on a Claude Code seat no longer types anything into the seat. It used to paste `/goal` into the composer, press Enter, read the dialog and press Escape, so a plain read depended on an empty composer, the turn state, the TTY owner, the screen layout of one Claude Code version and on being the only writer to that composer. Every goal-read failure of 2026-11-12 came from one of those conditions; the last one left `/goal/goal` in a Mac seat's composer when two SSH-forwarded reads (one `aiterm-mcp` process each) pasted at the same time, and every later read was refused. The read now takes the last `goal_status` row of the seat's own session transcript, which is the record Claude Code itself restores the goal from on resume and carries across compaction (2.1.322). It takes no send lock, works while a turn runs or the composer holds a draft, reads a seat that has not had its first turn as "no goal", and does not check the Claude Code version. Result schema and reasons are unchanged, except that the dialog-only reasons (`native_goal_fresh_dialog_unavailable`, `native_goal_dialog_changed`, `goal_input_not_empty_or_ready` on inspect) no longer occur and an unknown row shape reports `native_status_format_unavailable`. Measured on a live seat mid-turn: 64 ms instead of 0.7 s (17 s on Windows).
@@ -3349,7 +3353,8 @@ prototype (preserved under `prototype/python/` as the porting source and referen
3349
3353
  `ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
3350
3354
  provenance.
3351
3355
 
3352
- [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.34...HEAD
3356
+ [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.35...HEAD
3357
+ [0.70.35]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.34...v0.70.35
3353
3358
  [0.70.34]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.33...v0.70.34
3354
3359
  [0.70.33]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.32...v0.70.33
3355
3360
  [0.70.32]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.31...v0.70.32
package/README.ja.md CHANGED
@@ -215,7 +215,7 @@ runtime-error store は canonical dotagents config の `collection.enabled: true
215
215
  場合だけ収集し、既定OFF、network送信は行いません。tag起点CIのnpm provenance(OIDC Trusted
216
216
  Publishing)で公開し、GitHub Release が Official MCP Registry を再登録します。
217
217
 
218
- **状態:** 開発継続中 · 現行公開版 **v0.70.34** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
218
+ **状態:** 開発継続中 · 現行公開版 **v0.70.35** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
219
219
 
220
220
  ### 更新と巻き戻し
221
221
 
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.70.34** · 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.70.35** · 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
 
package/dist/index.js CHANGED
@@ -326,6 +326,18 @@ export function createAitermServer(options = {}) {
326
326
  ...(result._meta ? { _meta: result._meta } : {}),
327
327
  };
328
328
  }
329
+ // Writes forwarded to one terminal seat leave this process one at a time, as local seats do under withAgentSendLock.
330
+ // Process-local only: other processes forwarding to the same seat are the caller's to order (0.63.12).
331
+ const remoteSeatOrder = new Map();
332
+ function inRemoteSeatOrder(target, session, run) {
333
+ const key = `${remoteLabel(target)}\0${String(session)}`;
334
+ const mine = (remoteSeatOrder.get(key) ?? Promise.resolve()).then(run);
335
+ const tail = mine.then(() => { }, () => { });
336
+ remoteSeatOrder.set(key, tail);
337
+ void tail.then(() => { if (remoteSeatOrder.get(key) === tail)
338
+ remoteSeatOrder.delete(key); });
339
+ return mine;
340
+ }
329
341
  async function forwardRemote(target, name, args, extra) {
330
342
  return remoteResult(target, await callRemoteTool(target, name, args, undefined, undefined, extra?._meta));
331
343
  }
@@ -353,7 +365,7 @@ export function createAitermServer(options = {}) {
353
365
  // Older remote servers strip unknown input fields and could apply without tracking.
354
366
  if (args.request || args.action === "reconcile")
355
367
  throw new Error("REMOTE_UNSUPPORTED: tracked configuration requires the exact local connection; not issued");
356
- return forwardRemote(target, name, args, extra);
368
+ return inRemoteSeatOrder(target, args.session_id, () => forwardRemote(target, name, args, extra));
357
369
  };
358
370
  case "pty_send": return sendRemote;
359
371
  case "pty_close": return async (target, args, extra) => {
@@ -385,7 +397,7 @@ export function createAitermServer(options = {}) {
385
397
  // 終わった依頼の回答は送る前に保存する。実行中の依頼は残る。現地が差し込みを選べばその依頼が回答を受け取る。
386
398
  if (delivery)
387
399
  await remoteParentDelivery.beforeChange(key);
388
- const result = await callRemoteTool(target, "pty_send", args, undefined, undefined, extra?._meta);
400
+ const result = await inRemoteSeatOrder(target, args.session_id, () => callRemoteTool(target, "pty_send", args, undefined, undefined, extra?._meta));
389
401
  const structured = result.structuredContent;
390
402
  if (structured?.wait_process && (structured.mode === "agent_steer" || result.isError))
391
403
  return relaySteerWait(target, result);
@@ -1136,7 +1148,9 @@ export function createAitermServer(options = {}) {
1136
1148
  const terminal = boundTerminalTarget(args.session_id);
1137
1149
  if (terminal) {
1138
1150
  try {
1139
- const remote = await callRemoteTool(terminal, "agent_goal", args, undefined, origin === "user" ? { [GOAL_ORIGIN_PRIVATE_ENV]: "user" } : undefined, extra?._meta);
1151
+ const call = () => callRemoteTool(terminal, "agent_goal", args, undefined, origin === "user" ? { [GOAL_ORIGIN_PRIVATE_ENV]: "user" } : undefined, extra?._meta);
1152
+ // A read writes nothing and is not queued behind writes.
1153
+ const remote = await (args.action === "inspect" ? call() : inRemoteSeatOrder(terminal, args.session_id, call));
1140
1154
  return withErrorCode(remoteResult(terminal, remote));
1141
1155
  }
1142
1156
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.70.34",
3
+ "version": "0.70.35",
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": [