aiterm-mcp 0.70.46 → 0.70.48

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.70.48] - 2026-11-13
11
+
12
+ - seat-turns `own_work.oldest.{exe,args}` now name the oldest counted leaf process (the command, e.g. `sleep 150`), not the shell the harness wrapped it in (Claude's `bash -c … claude-<hex>-cwd`). `oldest.since` stays the start of the oldest counted process. Same fields and shape.
13
+
14
+ ## [0.70.47] - 2026-11-13
15
+
16
+ - An Antigravity seat's background command is now counted as own work (seat-turns `own_work.processes`, `pty_observe` `activity.post_startup_process_count`). agy runs each command on its own pty as a session leader (macOS, Linux) or in `pwsh -Command "try { $OutputEncoding = …"` (Windows); its MCP servers and hooks are still not counted (ADR 0141).
17
+ - While an Antigravity background task runs, the seat's turn reads running instead of unknown. agy keeps the turn open until the task ends and the model reports it; the footer's `N task(s)` count is that state.
18
+
10
19
  ## [0.70.46] - 2026-11-13
11
20
 
12
21
  - A Codex seat's own work (seat-turns `own_work.processes`, `pty_observe` `activity.post_startup_process_count`) now counts a lone command such as `sleep 300`. bash and zsh `-c` replace themselves with a single simple command, so the exec shell's shape was gone and the command was missed on Linux and macOS (a seat with one background command read 0 and could hibernate). Codex starts each exec in a new session, so a Codex child that is a session leader is now counted; MCP servers, hooks and the code-mode host stay in the seat's session and are still not counted (ADR 0141).
@@ -3409,7 +3418,9 @@ prototype (preserved under `prototype/python/` as the porting source and referen
3409
3418
  `ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
3410
3419
  provenance.
3411
3420
 
3412
- [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.46...HEAD
3421
+ [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.48...HEAD
3422
+ [0.70.48]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.47...v0.70.48
3423
+ [0.70.47]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.46...v0.70.47
3413
3424
  [0.70.46]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.45...v0.70.46
3414
3425
  [0.70.45]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.44...v0.70.45
3415
3426
  [0.70.44]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.43...v0.70.44
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.46** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
218
+ **状態:** 開発継続中 · 現行公開版 **v0.70.48** · 動作対象は 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.46** · 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.48** · 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
 
@@ -340,6 +340,9 @@ export function parentPaneEvidence(kind, screen) {
340
340
  start--;
341
341
  }
342
342
  const current = lines.slice(Math.max(0, start)).join("\n");
343
+ // Antigravity keeps the turn open while a background task runs: it reruns the model when the task ends, then sends Stop.
344
+ if (kind === "antigravity" && /·\s*[1-9]\d*\s+task\(s\)/u.test(lines.slice(marker + 1).join("\n")))
345
+ return "busy";
343
346
  if (kind === "grok" && grokPromptAwaitingAccept(current))
344
347
  return "unknown";
345
348
  if (kind === "cursor" && cursorPromptHooksRunning(screen))
package/dist/core.js CHANGED
@@ -167,8 +167,9 @@ const AGENT_EXEC_SHELLS = {
167
167
  // shortcut: a command run with the write-to-stdin tool also gets stdin and is not counted; read the script if that matters.
168
168
  cursor: command => /builtin eval "\$1"(?: 3<&- 4>&-)? < \/dev\/null/.test(command)
169
169
  || /-NonInteractive -File \S*ps-script-[0-9a-f-]+\.ps1/i.test(command),
170
- // shortcut: Antigravity's exec shape is not captured yet (quota), so its commands are not counted; add it from a real run.
171
- antigravity: () => false,
170
+ // POSIX: no shell marker; agy runs each command in its own pty session (session-leader rule in ownExecProcesses).
171
+ // Windows: pwsh -Command starting with its UTF-8 $OutputEncoding line; hooks are cmd /c "pwsh … -EncodedCommand".
172
+ antigravity: command => command.includes(" -Command \"try { $OutputEncoding = [System.Text.UTF8Encoding]::new($false);"),
172
173
  };
173
174
  const EXEC_SHELL_NAMES = new Set([...SHELLS, "pwsh", "powershell", "cmd"]);
174
175
  // Sandboxes a harness puts between itself and its exec shell.
@@ -1660,8 +1661,9 @@ export function ownExecProcesses(meta, agent, rows) {
1660
1661
  else if (SANDBOX_WRAPPERS.has(executable) || AGENT_COMMAND_PATTERNS[kind].test(executable)
1661
1662
  || (!EXEC_SHELL_NAMES.has(executable) && child.command.includes(meta.launch_id)))
1662
1663
  walk(child, false);
1663
- // A lone command its `-c` shell replaced itself with: Codex starts each exec with setsid, its servers and hooks stay in the seat's session.
1664
- else if (kind === "codex" && child.session_leader)
1664
+ // Codex (setsid) and Antigravity (a pty per command) start each exec in a new session; their servers and hooks stay in
1665
+ // the seat's session. This also catches a lone command its `-c` shell replaced itself with.
1666
+ else if ((kind === "codex" || kind === "antigravity") && child.session_leader)
1665
1667
  roots.push(child);
1666
1668
  }
1667
1669
  };
@@ -1819,8 +1821,11 @@ export async function seatOwnWork(names, requested) {
1819
1821
  const remaining = counted.filter(row => !excluded.has(row.pid));
1820
1822
  work.processes = remaining.length;
1821
1823
  work.excluded = excluded.size;
1822
- const oldest = remaining.reduce((first, row) => !first || Date.parse(row.started_identity) < Date.parse(first.started_identity) ? row : first, null);
1823
- work.oldest = oldest ? { ...descriptors.get(oldest.pid), since: new Date(oldest.started_identity).toISOString() } : null;
1824
+ const first = (rows) => rows.reduce((found, row) => !found || Date.parse(row.started_identity) < Date.parse(found.started_identity) ? row : found, null);
1825
+ // Names the command, not the shell around it: the oldest counted process with no counted child. Since = the wait's start.
1826
+ const parents = new Set(remaining.map(row => parentProcess(row, byPid)?.pid));
1827
+ const oldest = first(remaining), leaf = first(remaining.filter(row => !parents.has(row.pid)));
1828
+ work.oldest = oldest && leaf ? { ...descriptors.get(leaf.pid), since: new Date(oldest.started_identity).toISOString() } : null;
1824
1829
  }
1825
1830
  catch { /* this seat could not be read: nulls */ }
1826
1831
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.70.46",
3
+ "version": "0.70.48",
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": [