aiterm-mcp 0.52.2 → 0.52.3
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 +24 -1
- package/README.ja.md +2 -2
- package/README.md +2 -2
- package/dist/core.js +0 -3
- package/dist/parent-hook-diagnostic.js +5 -11
- package/docs/DESIGN.md +5 -0
- package/docs/RELEASE.md +3 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.52.3] - 2026-10-05
|
|
11
|
+
|
|
12
|
+
### 修正
|
|
13
|
+
|
|
14
|
+
- Claude Code親の配送hookの登録を、`args`を使わずshellを通す1行で書く(aiterm-steer-delivery 0.2.0、ADR 0089)。
|
|
15
|
+
Grokは共有の`~/.claude/settings.json`のhookも動かすが、`args`を落として`command`だけを動かす。
|
|
16
|
+
0.52.2までの`command=node, args=[claude-parent-hook.js]`の形では、Grokがnodeだけを起こし、nodeがhookの入力を
|
|
17
|
+
scriptとして読んで、会話の終わりのたびに`[stdin]:1`で失敗の記録を残していた(Grok 1.0.46、LinuxとWindowsで再現)。
|
|
18
|
+
POSIXは`exec '<node>' '<hook>'`、Windowsは`& '<node>' '<hook>'; exit (Get-Variable LASTEXITCODE -ValueOnly)`と
|
|
19
|
+
`shell: "powershell"`。`aiterm-setup`(`--hooks-only`も)を流すと、0.52.2までの登録をこの形へ置き換える。
|
|
20
|
+
Grokから起こされたhookは何もせず0で終わる。PreToolUseのhookは、間に挟まるshellではなくClaude Code本体を
|
|
21
|
+
依頼元として記録する。
|
|
22
|
+
- Windowsで、Claude Code親へ子の回答が届いているのに、配送が`CLAUDE_PARENT_HOOK_CLOSED`(結果不明)で終わる事があった。
|
|
23
|
+
process表を読む間(約1秒)に受信hookが本文を出し終えて終わると、出し終えた後のhookを「途中で終わった」と数えていた。
|
|
24
|
+
- `diagnostics`の親配送hookの状態は、0.52.2までの登録と新しい登録のどちらも「登録済み」と読む。
|
|
25
|
+
|
|
26
|
+
### 注意
|
|
27
|
+
|
|
28
|
+
- 0.52.2以前へ戻す時は、旧版のinstall前に`aiterm-setup --remove-claude-parent-hooks`を実行する。
|
|
29
|
+
0.52.2以前は新しい形の登録を自分の物と数えず、もう1組を足す。
|
|
30
|
+
- Windowsでは、子の回答を待っているhook1つにつき、Claude Codeが起こすPowerShellのprocessが1つ残る。
|
|
31
|
+
|
|
10
32
|
## [0.52.2] - 2026-10-05
|
|
11
33
|
|
|
12
34
|
### 修正
|
|
@@ -2135,7 +2157,8 @@ prototype (preserved under `prototype/python/` as the porting source and referen
|
|
|
2135
2157
|
`ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
|
|
2136
2158
|
provenance.
|
|
2137
2159
|
|
|
2138
|
-
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.52.
|
|
2160
|
+
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.52.3...HEAD
|
|
2161
|
+
[0.52.3]: https://github.com/kitepon/aiterm-mcp/compare/v0.52.2...v0.52.3
|
|
2139
2162
|
[0.52.2]: https://github.com/kitepon/aiterm-mcp/compare/v0.52.1...v0.52.2
|
|
2140
2163
|
[0.52.1]: https://github.com/kitepon/aiterm-mcp/compare/v0.52.0...v0.52.1
|
|
2141
2164
|
[0.52.0]: https://github.com/kitepon/aiterm-mcp/compare/v0.51.3...v0.52.0
|
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.52.
|
|
212
|
+
**状態:** 開発継続中 · 現行公開版 **v0.52.3** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
|
|
213
213
|
|
|
214
214
|
### 更新と巻き戻し
|
|
215
215
|
|
|
@@ -655,7 +655,7 @@ Claude Codeは2.1.259以上の対話sessionに対応する。`aiterm-setup`が
|
|
|
655
655
|
|
|
656
656
|
`/clear`などで会話を終了すると未送信の旧回答の配送を止め、本文は保存する。受信hookの上限は24時間で、終了や出力失敗を成功扱いしない。hookが無効な場合は送信前に明示errorにし、waiterへ黙って切り替えない。Claude Desktopのチャット、Web、`agent_id`付きの会話(`--agent`起動とnative subagent)はこの受信契約に含めない。
|
|
657
657
|
|
|
658
|
-
hook
|
|
658
|
+
hookを持たない旧版、または0.52.2以前へ戻す時は、install前に`aiterm-setup --remove-claude-parent-hooks`を実行する。Aiterm専用hookだけを解除し、他製品のhookと設定は保持する。
|
|
659
659
|
|
|
660
660
|
Cursor親(`clientInfo.name`が`cursor-vscode`)も同じ完了観測と本文保存を使う。`aiterm-setup`が`~/.cursor/hooks.json`へ`afterMCPExecution`と`postToolUse`を追加し、他製品のhookと順序は保持する。hookが無い場合は子への送信前に`CURSOR_PARENT_HOOK_UNAVAILABLE`で止める。作業を続けていれば次のツール返りへ`additional_context`で本文が差し込まれ、ターンを終える前にreceiptの`wait_process`を背景で起動しておけばidle中の完了でも起きられる。`wait_command`はnull。`submitted`はhookまたは受け口が本文を受け取った状態であり、modelの読了ではない。24時間以内に受け取りが無ければ`failed`とし、本文は残して自動再送しない。解除は`aiterm-setup --remove-cursor-parent-hooks`。Cursor Cloud Agent/Background Agentはこの受信契約に含めない。
|
|
661
661
|
|
package/README.md
CHANGED
|
@@ -223,7 +223,7 @@ collection is off by default and performs no network I/O. It ships via
|
|
|
223
223
|
tag-triggered CI with npm provenance (OIDC Trusted Publishing); the GitHub
|
|
224
224
|
Release re-registers the Official MCP Registry entry.
|
|
225
225
|
|
|
226
|
-
**Status:** actively maintained · current public release **v0.52.
|
|
226
|
+
**Status:** actively maintained · current public release **v0.52.3** · 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).
|
|
227
227
|
|
|
228
228
|
### Update and rollback
|
|
229
229
|
|
|
@@ -696,7 +696,7 @@ Claude Codeは2.1.259以上の対話sessionに対応する。`aiterm-setup`が
|
|
|
696
696
|
|
|
697
697
|
`/clear`等の会話終了後は未送信の旧回答を送らず、本文を保存する。受信hookの上限は24時間。hookの終了・出力失敗・無効化を成功扱いせず、別の待機経路へ黙って切り替えない。Claude Desktopのチャット、Web、`agent_id`付きの会話(`--agent`起動とnative subagent)はこの受信契約に含めない。
|
|
698
698
|
|
|
699
|
-
hook
|
|
699
|
+
hookを持たない旧版、または0.52.2以前へ戻す時は、install前に`aiterm-setup --remove-claude-parent-hooks`を実行する。Aiterm専用hookだけを解除し、他製品のhookと設定は保持する。
|
|
700
700
|
|
|
701
701
|
Cursor parents (`clientInfo.name` of `cursor-vscode`) use the same completion capture. `aiterm-setup` adds `afterMCPExecution` and `postToolUse` to `~/.cursor/hooks.json` and keeps every other hook and its position. A missing registration fails the dispatch with `CURSOR_PARENT_HOOK_UNAVAILABLE` before the child is sent. While the parent keeps calling tools, the answer is injected through `additional_context` on the next tool result. If the parent ends the turn, start the receipt `wait_process` in the background first; that receiver exits when the answer arrives. `wait_command` is null. `submitted` means the hook or the receiver claimed the text, not that the model has read it. No claim within 24 hours is `failed`, the text is kept, and nothing is resent. Remove only Aiterm's entries with `aiterm-setup --remove-cursor-parent-hooks`. Cursor Cloud Agents and Background Agents are outside this contract.
|
|
702
702
|
|
package/dist/core.js
CHANGED
|
@@ -2125,9 +2125,6 @@ async function acquireAgentSendFileLock(name, deadline, waitMs) {
|
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
2127
|
if (dead && reapDeadAgentSendLock(name, replacedToken) === "stuck") {
|
|
2128
|
-
// BellTeamのため: 先頭の「agent session '<名前>' に、終了した送信のlockを片付ける途中で残った印があります。」と、
|
|
2129
|
-
// 文中の「文字列は送信していません。」で見分け、pty_close→起動し直しへ回している(2026-10-05)。
|
|
2130
|
-
// この文面と、pty_closeがこの印を片付ける事を変える時は、変える前に知らせる。
|
|
2131
2128
|
throw new AitermError(`agent session '${name}' に、終了した送信のlockを片付ける途中で残った印があります。` +
|
|
2132
2129
|
`自動回収は並行送信の混線を招くため行いません。文字列は送信していません。` +
|
|
2133
2130
|
`pty_listで対象を確認し、pty_closeでsessionを閉じてから同じIDで再作成してください`, 2);
|
|
@@ -40,21 +40,15 @@ export function claudeParentHookDiagnostic(file) {
|
|
|
40
40
|
return unreadable;
|
|
41
41
|
if (settings.disableAllHooks === true)
|
|
42
42
|
return required("hooks_disabled");
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
const scripts = [];
|
|
46
|
-
for (const event of Object.keys(steer.claudeParentHookEntries(AITERM_PROFILE, { command: "", script: entry }))) {
|
|
43
|
+
// 登録の形(0.52.2までの`args`形式と、今のshellを通す1行)は配送ライブラリが読む。ここで`args`を直接読まない。
|
|
44
|
+
for (const event of Object.keys(steer.claudeParentHookEntries(AITERM_PROFILE, { command: "", script: AITERM_PROFILE.hooks.claude }))) {
|
|
47
45
|
const groups = settings.hooks[event];
|
|
48
46
|
if (groups !== undefined && !Array.isArray(groups))
|
|
49
47
|
return unreadable;
|
|
50
|
-
const found = (groups ?? []).flatMap(group => record(group) && Array.isArray(group.hooks) ? group.hooks : [])
|
|
51
|
-
.filter(hook => record(hook) && hook.type === "command" && Array.isArray(hook.args) && typeof hook.args[0] === "string" && owned(hook.args[0]))
|
|
52
|
-
.map(hook => hook.args[0]);
|
|
53
|
-
if (found.length === 0)
|
|
54
|
-
return required("hooks_not_registered");
|
|
55
|
-
scripts.push(...found);
|
|
56
48
|
}
|
|
57
|
-
|
|
49
|
+
if (!steer.claudeParentHooksRegistered(AITERM_PROFILE, settings))
|
|
50
|
+
return required("hooks_not_registered");
|
|
51
|
+
return steer.claudeParentHookScripts(AITERM_PROFILE, settings).every(script => existsSync(script)) ? ready : required("hook_script_missing");
|
|
58
52
|
}
|
|
59
53
|
export function cursorParentHookDiagnostic(file) {
|
|
60
54
|
const document = readSettings(file);
|
package/docs/DESIGN.md
CHANGED
|
@@ -186,6 +186,11 @@ hookはNodeの実行ファイルと引数配列で直接起動し、shellやWind
|
|
|
186
186
|
子の予約は既存の`parent-deliveries/claims`で共有し、親の種類をまたぐ並行送信を防ぐ。
|
|
187
187
|
hookとの受け渡しはAiterm stateの`claude-parent-hooks`へ置く。
|
|
188
188
|
|
|
189
|
+
hookの登録は、`args`を使わずshellを通す1行で書く(ADR 0089)。POSIXは`exec '<node>' '<hook>'`、Windowsは
|
|
190
|
+
`& '<node>' '<hook>'; exit (Get-Variable LASTEXITCODE -ValueOnly)`と`shell: "powershell"`。同じ設定をGrokも読み、
|
|
191
|
+
`args`を落として`command`だけを動かすためである。Grokから起こされたhookは何もせず0で終わる。
|
|
192
|
+
PreToolUseのhookは、間に挟まるshellを飛ばして、Claude Code本体を依頼元のprocessとして記録する。
|
|
193
|
+
|
|
189
194
|
`PostToolUse`は`asyncRewake:true`で待機し、保存済み本文をstderrへ出してexit 2を返す。
|
|
190
195
|
exit 2はClaudeが規定する再開信号であり、子の成功・失敗は本文の`outcome`で区別する。
|
|
191
196
|
親は待機中も別作業や次のturnへ進める。Claudeの画面では`Stop hook feedback`として届く。
|
package/docs/RELEASE.md
CHANGED
|
@@ -83,8 +83,9 @@ aiterm-setup --json
|
|
|
83
83
|
互換launcherを共有していた場合はAitermのSteer選択だけを解除し、所有外の起動設定を保持する。
|
|
84
84
|
回答record schemaは従来と共通であり、新方式のSteer相当配送も`queued_submission_id`を保持する。
|
|
85
85
|
|
|
86
|
-
Claude親配送hook
|
|
87
|
-
実行する。Aiterm専用の3 hookだけを解除し、他製品のhookと設定を保持する。
|
|
86
|
+
Claude親配送hookのない旧版、または0.52.2以前へ戻す場合は、旧版のinstall前に`aiterm-setup --remove-claude-parent-hooks`を
|
|
87
|
+
実行する。Aiterm専用の3 hookだけを解除し、他製品のhookと設定を保持する。0.52.2以前は、shellを通す1行の登録(ADR 0089)を
|
|
88
|
+
自分の物と数えず、もう1組を足す。
|
|
88
89
|
|
|
89
90
|
```bash
|
|
90
91
|
npm install -g "aiterm-mcp@<known-good-version>"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiterm-mcp",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.3",
|
|
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": [
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
74
|
-
"aiterm-steer-delivery": "^0.
|
|
74
|
+
"aiterm-steer-delivery": "^0.2.0",
|
|
75
75
|
"ws": "8.21.3",
|
|
76
76
|
"zod": "^4.4.3"
|
|
77
77
|
},
|