aiterm-mcp 0.37.2 → 0.37.4
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 +16 -1
- package/README.ja.md +3 -1
- package/README.md +3 -1
- package/dist/setup-codex-relay.js +3 -0
- package/dist/setup-node.js +16 -0
- package/dist/setup.js +2 -1
- package/dist/windows-codex-launcher.js +2 -1
- package/dist/windows-codex-relay.js +4 -2
- package/docs/DESIGN.md +7 -0
- package/docs/RELEASE.md +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.37.4] - 2026-09-19
|
|
11
|
+
|
|
12
|
+
### 修正
|
|
13
|
+
|
|
14
|
+
- HomebrewのNode更新後にCodex Desktopの中継起動が終了コード127で失敗する問題を修正した。MCP登録と中継launcherは、削除されるCellarの版別実体ではなく、同じformulaの`opt`経由でNodeを起動する。`node@22`等の選択を維持し、GUIのPATHへ依存しない。
|
|
15
|
+
- 既存の登録とlauncherは、更新後の`aiterm-setup --json`で修復できる。
|
|
16
|
+
|
|
17
|
+
## [0.37.3] - 2026-09-13
|
|
18
|
+
|
|
19
|
+
### 修正
|
|
20
|
+
|
|
21
|
+
- WindowsのMSIX仮想AppDataにAitermがある場合、Codex Desktopの中継起動が`MODULE_NOT_FOUND`で失敗する問題を修正した。起動済みの中継が自身の実体パスを後続processへ渡す。
|
|
22
|
+
|
|
10
23
|
## [0.37.2] - 2026-09-13
|
|
11
24
|
|
|
12
25
|
### 修正
|
|
@@ -1679,7 +1692,9 @@ prototype (preserved under `prototype/python/` as the porting source and referen
|
|
|
1679
1692
|
`ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
|
|
1680
1693
|
provenance.
|
|
1681
1694
|
|
|
1682
|
-
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.37.
|
|
1695
|
+
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.37.4...HEAD
|
|
1696
|
+
[0.37.4]: https://github.com/kitepon/aiterm-mcp/compare/v0.37.3...v0.37.4
|
|
1697
|
+
[0.37.3]: https://github.com/kitepon/aiterm-mcp/compare/v0.37.2...v0.37.3
|
|
1683
1698
|
[0.37.2]: https://github.com/kitepon/aiterm-mcp/compare/v0.37.1...v0.37.2
|
|
1684
1699
|
[0.37.1]: https://github.com/kitepon/aiterm-mcp/compare/v0.37.0...v0.37.1
|
|
1685
1700
|
[0.37.0]: https://github.com/kitepon/aiterm-mcp/compare/v0.36.0...v0.37.0
|
package/README.ja.md
CHANGED
|
@@ -42,6 +42,7 @@ Ubuntu/Debianはsudoとaptでtmuxを準備する。必要な公式package mana
|
|
|
42
42
|
既存設定の他サーバーを保持し、JSON設定は変更前の`.aiterm-backup`を残す。
|
|
43
43
|
結果の`status`は`ready`/`unsupported`/`failed`/`restart_required`。未検出のAIは`not_detected`とし、全AI未検出は成功にしない。
|
|
44
44
|
登録先はglobal packageのNodeとMCP入口の絶対パスで、npm一時cacheやsource checkoutは登録しない。
|
|
45
|
+
HomebrewのNodeは更新後も有効な`opt`のパスをMCP登録とCodex中継に使う。旧版の登録でNode更新後に起動できなくなった場合も、更新後の`aiterm-setup --json`で修復できる。
|
|
45
46
|
更新後も同じ入口を実行し、MCP clientを再起動する。npm install自体はユーザー設定を変更しない。
|
|
46
47
|
公開JSONは`schema: "aiterm.setup-result.v1"`、全体の`status`、端末の`backend`、
|
|
47
48
|
AI別の`integrations`と選択機能の`codex_steer`を持つ。失敗時は`reason_code`を付け、終了コードはreadyなら0、再起動待ちは3、それ以外は2となる。
|
|
@@ -65,6 +66,7 @@ Windowsはユーザー環境変数`CODEX_CLI_PATH`で起動設定を維持しま
|
|
|
65
66
|
解除・旧版への巻き戻し前は`aiterm-setup --codex-steer disable`を実行してCodexを再起動してください。
|
|
66
67
|
SteerはmacOS・Windowsの公式Codex Desktopと同梱CLI 0.154以上に対応します。Steer有効時の宛先は中継で起動したDesktopに限ります。
|
|
67
68
|
Windowsでは公式Desktopが展開した実行ファイルを照合し、認証付きのローカル接続へ中継します。
|
|
69
|
+
Windowsの仮想AppDataからの起動にも対応し、中継へ実際の保存先を引き継ぎます。
|
|
68
70
|
Aitermのpackageがlauncher・中継・設定・親への配送を含み、gpt-connectorやdotagentsの導入は不要です。
|
|
69
71
|
両OSで公式CodexをDesktopの直接の子として保ち、中継は公式Codexの子として動きます。
|
|
70
72
|
有効化時は元の起動設定を保存してAitermのlauncherを設定し、解除時に元へ戻します。選択後に他から変更された値は上書きしません。
|
|
@@ -196,7 +198,7 @@ runtime-error store は canonical dotagents config の `collection.enabled: true
|
|
|
196
198
|
場合だけ収集し、既定OFF、network送信は行いません。tag起点CIのnpm provenance(OIDC Trusted
|
|
197
199
|
Publishing)で公開し、GitHub Release が Official MCP Registry を再登録します。
|
|
198
200
|
|
|
199
|
-
**状態:** 開発継続中 · 現行公開版 **v0.37.
|
|
201
|
+
**状態:** 開発継続中 · 現行公開版 **v0.37.4** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
|
|
200
202
|
|
|
201
203
|
### 更新と巻き戻し
|
|
202
204
|
|
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ Ubuntu/Debianはsudoとaptでtmuxを準備する。必要な公式package mana
|
|
|
42
42
|
既存設定の他サーバーを保持し、JSON設定は変更前の`.aiterm-backup`を残す。
|
|
43
43
|
結果の`status`は`ready`/`unsupported`/`failed`/`restart_required`。未検出のAIは`not_detected`とし、全AI未検出は成功にしない。
|
|
44
44
|
登録先はglobal packageのNodeとMCP入口の絶対パスで、npm一時cacheやsource checkoutは登録しない。
|
|
45
|
+
HomebrewのNodeは更新後も有効な`opt`のパスをMCP登録とCodex中継に使う。旧版の登録でNode更新後に起動できなくなった場合も、更新後の`aiterm-setup --json`で修復できる。
|
|
45
46
|
更新後も同じ入口を実行し、MCP clientを再起動する。npm install自体はユーザー設定を変更しない。
|
|
46
47
|
公開JSONは`schema: "aiterm.setup-result.v1"`、全体の`status`、端末の`backend`、
|
|
47
48
|
AI別の`integrations`と選択機能の`codex_steer`を持つ。失敗時は`reason_code`を付け、終了コードはreadyなら0、再起動待ちは3、それ以外は2となる。
|
|
@@ -65,6 +66,7 @@ Windowsはユーザー環境変数`CODEX_CLI_PATH`で起動設定を維持しま
|
|
|
65
66
|
解除・旧版への巻き戻し前は`aiterm-setup --codex-steer disable`を実行してCodexを再起動してください。
|
|
66
67
|
SteerはmacOS・Windowsの公式Codex Desktopと同梱CLI 0.154以上に対応します。Steer有効時の宛先は中継で起動したDesktopに限ります。
|
|
67
68
|
Windowsでは公式Desktopが展開した実行ファイルを照合し、認証付きのローカル接続へ中継します。
|
|
69
|
+
Windowsの仮想AppDataからの起動にも対応し、中継へ実際の保存先を引き継ぎます。
|
|
68
70
|
Aitermのpackageがlauncher・中継・設定・親への配送を含み、gpt-connectorやdotagentsの導入は不要です。
|
|
69
71
|
両OSで公式CodexをDesktopの直接の子として保ち、中継は公式Codexの子として動きます。
|
|
70
72
|
有効化時は元の起動設定を保存してAitermのlauncherを設定し、解除時に元へ戻します。選択後に他から変更された値は上書きしません。
|
|
@@ -210,7 +212,7 @@ collection is off by default and performs no network I/O. It ships via
|
|
|
210
212
|
tag-triggered CI with npm provenance (OIDC Trusted Publishing); the GitHub
|
|
211
213
|
Release re-registers the Official MCP Registry entry.
|
|
212
214
|
|
|
213
|
-
**Status:** actively maintained · current public release **v0.37.
|
|
215
|
+
**Status:** actively maintained · current public release **v0.37.4** · 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).
|
|
214
216
|
|
|
215
217
|
### Update and rollback
|
|
216
218
|
|
|
@@ -14,6 +14,7 @@ import { readRuntimeProcesses } from "./process-runtime.js";
|
|
|
14
14
|
import { installRelayLogin, removeRelayLogin } from "./codex-relay-login.js";
|
|
15
15
|
import { windowsCodexRuntime } from "./windows-codex-setup.js";
|
|
16
16
|
import { configureRelay } from "./codex-relay-setup.js";
|
|
17
|
+
import { setupNodeExecutable } from "./setup-node.js";
|
|
17
18
|
function command(executable, args) {
|
|
18
19
|
const result = spawnSync(executable, args, { encoding: "utf8", timeout: 15_000 });
|
|
19
20
|
if (result.error || result.status !== 0)
|
|
@@ -150,5 +151,7 @@ export async function configureCodexSteer(action = "status", overrides = {}) {
|
|
|
150
151
|
if (runtime.platform !== "darwin") {
|
|
151
152
|
return action === "enable" ? { status: "unsupported", reason_code: "codex_steer_platform_unsupported" } : { status: "disabled" };
|
|
152
153
|
}
|
|
154
|
+
if (action === "enable")
|
|
155
|
+
runtime.node = setupNodeExecutable(runtime.node);
|
|
153
156
|
return configureRelay(action, runtime);
|
|
154
157
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { accessSync, constants } from "node:fs";
|
|
2
|
+
import { SetupError } from "./setup-platform.js";
|
|
3
|
+
// HomebrewのCellar実体は更新で消える。保存する起動先には同じformulaのoptを使う。
|
|
4
|
+
export function setupNodeExecutable(executable = process.execPath) {
|
|
5
|
+
const brew = /^(.*)\/Cellar\/(node(?:@\d+)?)\/[^/]+\/bin\/node$/.exec(executable);
|
|
6
|
+
if (!brew)
|
|
7
|
+
return executable;
|
|
8
|
+
const node = `${brew[1]}/opt/${brew[2]}/bin/node`;
|
|
9
|
+
try {
|
|
10
|
+
accessSync(node, constants.X_OK);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
throw new SetupError("node_runtime_unavailable", "HomebrewのNode起動先を実行できません。Nodeの導入状態を確認してください");
|
|
14
|
+
}
|
|
15
|
+
return node;
|
|
16
|
+
}
|
package/dist/setup.js
CHANGED
|
@@ -10,6 +10,7 @@ import { prepareBackend, runSetupCommand, SetupError } from "./setup-platform.js
|
|
|
10
10
|
import { configureIntegrations } from "./setup-integrations.js";
|
|
11
11
|
import { configureCodexSteer } from "./setup-codex-relay.js";
|
|
12
12
|
import { readRelayConfig } from "./codex-relay-config.js";
|
|
13
|
+
import { setupNodeExecutable } from "./setup-node.js";
|
|
13
14
|
export function globalRegistration(run = runSetupCommand) {
|
|
14
15
|
const root = run(process.platform === "win32" ? "npm.cmd" : "npm", ["root", "-g"]).trim();
|
|
15
16
|
if (!isAbsolute(root) || /[\r\n]/u.test(root))
|
|
@@ -19,7 +20,7 @@ export function globalRegistration(run = runSetupCommand) {
|
|
|
19
20
|
if (realpathSync(installedRoot) !== realpathSync(packageRoot)) {
|
|
20
21
|
throw new SetupError("global_package_required", "npm install -g aiterm-mcp後にaiterm-setupを実行してください。一時npm cacheやsource checkoutは登録しません");
|
|
21
22
|
}
|
|
22
|
-
return { command:
|
|
23
|
+
return { command: setupNodeExecutable(), args: [join(installedRoot, "dist", "index.js")] };
|
|
23
24
|
}
|
|
24
25
|
export async function verifySetupRuntime(registration) {
|
|
25
26
|
const client = new Client({ name: "aiterm-setup", version: "1.0.0" });
|
|
@@ -14,6 +14,7 @@ ${windowsNativeProcessSource}
|
|
|
14
14
|
[DataContract] public sealed class LaunchPlan {
|
|
15
15
|
[DataMember] public string directory;
|
|
16
16
|
[DataMember] public string endpoint;
|
|
17
|
+
[DataMember] public string relay;
|
|
17
18
|
[DataMember] public string[] arguments;
|
|
18
19
|
}
|
|
19
20
|
public static class AitermLauncher {
|
|
@@ -45,7 +46,7 @@ public static class AitermLauncher {
|
|
|
45
46
|
if(plan.directory==null) return server.Wait();
|
|
46
47
|
// 中継は公式CLIのjobを継承する。launcherは終了監視だけを担い、JSON-RPCを通さない。
|
|
47
48
|
using(var bridge=AitermNativeProcess.Start(server.Pid,${literal(node)},new string[] {
|
|
48
|
-
|
|
49
|
+
plan.relay,"--serve",${literal(binary)},plan.directory,plan.endpoint,server.Pid.ToString()
|
|
49
50
|
},false,null)) {
|
|
50
51
|
int code=bridge.Wait();
|
|
51
52
|
lifetime.Dispose();
|
|
@@ -4,7 +4,7 @@ import { once } from "node:events";
|
|
|
4
4
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
-
import { writeFileSync, rmSync } from "node:fs";
|
|
7
|
+
import { writeFileSync, rmSync, realpathSync } from "node:fs";
|
|
8
8
|
import WebSocket from "ws";
|
|
9
9
|
import { ensurePrivateDirectory, makeFilePrivate } from "./windows-codex-state.js";
|
|
10
10
|
import { readWindowsProcesses } from "./windows-codex-connection.js";
|
|
@@ -15,6 +15,8 @@ export async function prepareWindowsRelay(root, args) {
|
|
|
15
15
|
const serverArgs = codexServerArguments(args);
|
|
16
16
|
if (!serverArgs)
|
|
17
17
|
return { directory: null, endpoint: null, arguments: args };
|
|
18
|
+
// MSIXの仮想AppData名はnative子から見えないため、起動済みの自身の実体を渡す。
|
|
19
|
+
const relay = realpathSync.native(fileURLToPath(import.meta.url));
|
|
18
20
|
const directory = join(root, randomUUID());
|
|
19
21
|
ensurePrivateDirectory(directory);
|
|
20
22
|
try {
|
|
@@ -28,7 +30,7 @@ export async function prepareWindowsRelay(root, args) {
|
|
|
28
30
|
const port = reservation.address().port;
|
|
29
31
|
await new Promise((resolve, reject) => reservation.close(error => error ? reject(error) : resolve()));
|
|
30
32
|
const endpoint = "ws://127.0.0.1:" + port;
|
|
31
|
-
return { directory, endpoint, arguments: [...serverArgs, "--listen", endpoint, "--ws-auth", "capability-token", "--ws-token-file", tokenFile] };
|
|
33
|
+
return { directory, endpoint, relay, arguments: [...serverArgs, "--listen", endpoint, "--ws-auth", "capability-token", "--ws-token-file", tokenFile] };
|
|
32
34
|
}
|
|
33
35
|
catch (error) {
|
|
34
36
|
rmSync(directory, { recursive: true, force: true });
|
package/docs/DESIGN.md
CHANGED
|
@@ -76,6 +76,10 @@ Steerを選択したmacOS・Windows Desktopでは、MCP processの祖先にあ
|
|
|
76
76
|
Steer設定がある場合にqueueへ自動退避することはない。
|
|
77
77
|
|
|
78
78
|
`aiterm-setup`の`--codex-steer enable|disable|status`が選択導入を所有する。
|
|
79
|
+
MCP登録とmacOSの中継launcherへ保存するNodeの起動先は`src/setup-node.ts`が決める。
|
|
80
|
+
HomebrewのCellar実体は同じformulaの`opt/<formula>/bin/node`へ変換し、実行できることを確認する。
|
|
81
|
+
`node@22`等のformulaを維持し、GUIのPATH探索や別のNodeへの自動切替は行わない。
|
|
82
|
+
Homebrew以外の起動先は変更しない。既存の版別パスは`aiterm-setup --json`で再生成する。
|
|
79
83
|
設定とPOSIX launcherは`~/.config/aiterm-mcp/codex-relay/`、一時socketは`/tmp/aiterm-codex-<uid>/`へ置く。
|
|
80
84
|
launcherはNodeのstdio中継を起動してから公式CLIへ同じPIDでexecし、Desktopとの親子関係・署名・通常環境を保つ。
|
|
81
85
|
Python・独自App Server・認証情報のコピーは使わない。中継はRPCと承認応答を透過搬送し、追加clientは承認へ応答しない。
|
|
@@ -89,6 +93,9 @@ Windows標準の.NET Frameworkでlauncherを作り、`CreateProcessW`の親proce
|
|
|
89
93
|
公式CLIをDesktopの直接の子、中継Nodeを公式CLIの直接の子として起動する。
|
|
90
94
|
launcherは終了監視だけを担い、JSON-RPCを通さない。Windowsには同一PIDでのexecがないためPIDは変わるが、
|
|
91
95
|
公式binary、起動元との直接の親子関係、通常の環境とstdioは維持する。
|
|
96
|
+
MSIXの仮想AppDataはnative子へ同じ論理パスを渡しても見えない場合があるため、準備processが
|
|
97
|
+
自身の`realpathSync.native`を起動計画へ返し、後続の中継Nodeはその実体を起動する。
|
|
98
|
+
解決は起動時に行い、設定時の保存先で固定しない。
|
|
92
99
|
公式Desktopが展開した4実行ファイルを配布元のSHA-256と照合し、AitermがCodexをコピー・再配布しない。
|
|
93
100
|
公式CLIの認証付きloopback WebSocketを使い、本人専用ACLのtokenと接続記録をAitermのsessions下へ置く。
|
|
94
101
|
Windowsのprocess情報はprocess-runtimeが所有し、接続はPID・開始時刻・実行ファイル・token引数で照合する。
|
package/docs/RELEASE.md
CHANGED
|
@@ -43,6 +43,10 @@ Codex Steerを変更した場合は、公式バイナリを指定した`test/cod
|
|
|
43
43
|
Windowsは`AITERM_TEST_CODEX_BINARY`に公式Desktopの実行fileを指定し、
|
|
44
44
|
`test/windows-codex.test.mjs`で単独launcher、ACL、親識別、元の起動設定の保存と解除も確認する。
|
|
45
45
|
同じ環境変数で`test/codex-relay-official.test.mjs`の実行中Steer・終了後再開・承認中継・EOFを確認できる。
|
|
46
|
+
Windowsの中継起動を変更した場合は、公式Desktopが入った端末で`AITERM_TEST_CODEX_PACKAGE`に
|
|
47
|
+
そのpackage family名を指定し、`test/windows-codex-msix.test.mjs`も実行する。公式の
|
|
48
|
+
`Invoke-CommandInDesktopPackage`で仮想AppDataからのinitialize・EOFを確認し、稼働中Desktopや
|
|
49
|
+
ユーザー設定は変更しない。packageと公式binaryを指定しないCIではこの実機試験をskipする。
|
|
46
50
|
Linuxの未対応Steer選択が理由付きで停止することもCIで確認する。
|
|
47
51
|
|
|
48
52
|
setupを変更した場合は、公開packageのglobal install後に`aiterm-setup --json`を実行し、
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiterm-mcp",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.4",
|
|
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": [
|