aiterm-mcp 0.70.23 → 0.70.24

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.24] - 2026-11-11
11
+
12
+ - Closing a seat now also ends its idle-clock worker. `pty_close`, killing all sessions, and a fresh launch under the same name removed the clock record but left the waiting `sh`/`sleep` (PowerShell on Windows) running until its wake time, so a deleted member's `agent-idle-cli --session <name>` stayed visible on the host. Before the record is removed, the worker is ended when its PID and start time still match the record: on Linux and macOS its own process group (the shell, its sleep, and a checker that is just waking), on Windows its PowerShell. A process never ends its own clock. If the worker cannot be ended, it still exits at wake on the missing token, as before. Live seats are unchanged.
13
+
10
14
  ## [0.70.23] - 2026-11-11
11
15
 
12
16
  - A Claude seat that is signed out now reports failure category `authentication`. The real signed-out API error record of Claude Code 2.1.310/2.1.319 carries `error: "authentication_failed"` and no `apiErrorStatus`; that record, a 401, or (for a record with neither) the CLI's login line is now `authentication`, and the parent-delivery record accepts the value.
@@ -3297,7 +3301,8 @@ prototype (preserved under `prototype/python/` as the porting source and referen
3297
3301
  `ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
3298
3302
  provenance.
3299
3303
 
3300
- [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.23...HEAD
3304
+ [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.24...HEAD
3305
+ [0.70.24]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.23...v0.70.24
3301
3306
  [0.70.23]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.22...v0.70.23
3302
3307
  [0.70.22]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.21...v0.70.22
3303
3308
  [0.70.21]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.20...v0.70.21
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.23** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
218
+ **状態:** 開発継続中 · 現行公開版 **v0.70.24** · 動作対象は 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.23** · 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.24** · 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
 
@@ -57,6 +57,16 @@ export function isAgentIdleClockOwner(clock) {
57
57
  return [process.pid, process.ppid].includes(clock.owner.pid) && readProcessIdentities([clock.owner.pid])
58
58
  .some(row => row.started_identity === clock.owner.started_identity);
59
59
  }
60
+ /** A closed seat's sleep worker ends with it; the caller's own clock (its checker or that checker's sh) is left alone. */
61
+ export function endAgentIdleClock(clock) {
62
+ const { pid, started_identity } = clock.owner;
63
+ if ([process.pid, process.ppid].includes(pid)
64
+ || !readProcessIdentities([pid]).some(row => row.started_identity === started_identity))
65
+ return;
66
+ // POSIX workers are spawned detached (setsid), so the owner leads a group holding its sleep and any waking checker.
67
+ const windows = process.platform === "win32";
68
+ signalRuntimeProcess({ pid, started_identity, process_group_id: pid, argv_digest: "" }, windows ? "SIGKILL" : "SIGTERM", !windows);
69
+ }
60
70
  /** Called under the existing seat send lock; the record is not an independent admission. */
61
71
  export async function armAgentIdleClock(meta, anchor, wakeAt, replaceToken) {
62
72
  const previous = readAgentIdleClock(meta);
package/dist/core.js CHANGED
@@ -38,7 +38,7 @@ import { withCodexGoal } from "./harnesses/codex-goal.js";
38
38
  import { configureWithPausedGoal } from "./configure-goal.js";
39
39
  import { initializeAgentActivity, recordAgentInput, recordAgentTurnEnd, readAgentActivity } from "./agent-activity.js";
40
40
  import { checkIdleSeat, decideIdleSeat, idleMinutes } from "./agent-idle.js";
41
- import { AGENT_IDLE_ENABLED, armAgentIdleClock, idleClockDeadline, isAgentIdleClockOwner, requestAgentIdleClock, requestAgentIdleClocks } from "./agent-idle-clock.js";
41
+ import { AGENT_IDLE_ENABLED, armAgentIdleClock, endAgentIdleClock, idleClockDeadline, isAgentIdleClockOwner, requestAgentIdleClock, requestAgentIdleClocks } from "./agent-idle-clock.js";
42
42
  import { stopProcessTree } from "./process-tree-stop.js";
43
43
  import { writeAgentResumeRecoveryOrigin, confirmedAgentResumeRecoveryOrigin, readAgentResumeResolution, writeAgentResumeResolution, agentResumeRecordDigest, captureAgentResumeTemplate, readAgentResumeTemplate, writeAgentResumeTemplate, finishAgentResumeConfiguration, refreshAgentResumeRecipe, readAgentIdleClock, retireAgentIdleClock, readAgentResumeRecipe, writeAgentResumeRecipe, agentResumeRecipeDigest, readAgentLifecycle, writeAgentLifecycle, cancelAgentStopping, readAgentResumeAttempt, writeAgentResumeAttempt, readAgentResumeNative, writeAgentResumeNative } from "./agent-lifecycle.js";
44
44
  import { createCodexGoalObjective, editCodexGoalObjective, submitCodexGoalCommand } from "./harnesses/codex-goal-editor.js";
@@ -369,6 +369,13 @@ function cleanupAgentState(name) {
369
369
  if (!f.startsWith(prefix))
370
370
  continue;
371
371
  const p = path.join(dir, f);
372
+ if (f.endsWith(".idle-clock.json"))
373
+ try {
374
+ const clock = readAgentIdleClock({ aiterm_session: name, launch_id: f.slice(prefix.length, -".idle-clock.json".length) });
375
+ if (clock)
376
+ endAgentIdleClock(clock);
377
+ }
378
+ catch { /* an unended worker still exits at wake: its token is gone with the record below */ }
372
379
  try {
373
380
  if (f.endsWith(".agent.json") ||
374
381
  f.endsWith(".active-launch.json") ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.70.23",
3
+ "version": "0.70.24",
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": [