aiterm-mcp 0.18.0 → 0.18.2
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/README.ja.md +1 -1
- package/README.md +4 -1
- package/dist/core.js +36 -1
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
12 ツール: 6 つの **PTY ツール**(`pty_open` / `pty_send` / `pty_read` / `pty_key` / `pty_close` / `pty_list`)で 1 本の永続端末を開き・操作し・読む。加えて 4 つの **エージェント起動ツール**(`claude_agent` / `codex_agent` / `grok_agent` / `composer_agent`)が別のコーディングエージェントの TUI を新しい端末の中に起動し、`claude_turn`がdurable caller向けの構造化issue/recoveryを、`diagnostics`が安全なfactory readinessを返す。バックエンドは **tmux** なので、MCP サーバや AI クライアントが再起動してもセッションは生き残る。
|
|
26
26
|
|
|
27
|
-
**v0.18.
|
|
27
|
+
**v0.18.1 を 2026-07-18 に公開**(0.18.0+stale案内文言の修理1件)。実運用障害の還流による agent dispatch の hardening:
|
|
28
28
|
全 dispatch/launch receipt に **submit 座礁観測** `submit_residue` を追加
|
|
29
29
|
(送信 prompt が vendor TUI の composer に未 submit のまま残存していないかを有界に観測して報告する。
|
|
30
30
|
陽性証拠のみ・auto-retry なし)。agent への prompt paste は tmux **bracketed paste**(pane ごとの
|
package/README.md
CHANGED
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
Twelve tools: six **PTY tools** — `pty_open` / `pty_send` / `pty_read` / `pty_key` / `pty_close` / `pty_list` — to open, drive, and read one persistent terminal, four **agent launchers** — `claude_agent` / `codex_agent` / `grok_agent` / `composer_agent` — that each start another coding agent's TUI inside a fresh one, `claude_turn` for durable structured issue/recovery, and `diagnostics` for safe factory readiness. The backend is **tmux**, so sessions survive even if the MCP server or the AI client restarts.
|
|
26
26
|
|
|
27
|
-
**v0.18.
|
|
27
|
+
**v0.18.1 was published on 2026-07-18** (v0.18.0 plus one stale-guidance
|
|
28
|
+
message fix). Field-failure hardening for agent
|
|
28
29
|
dispatch: every dispatch/launch receipt now carries a **submit-strand
|
|
29
30
|
observation** `submit_residue` (a bounded screen poll that reports when the
|
|
30
31
|
sent prompt is still sitting unsubmitted in the vendor TUI's composer —
|
|
@@ -96,6 +97,8 @@ One call per model, so the tool name itself tells you which model you get:
|
|
|
96
97
|
|
|
97
98
|
The vendor CLI must be installed and authenticated (`claude` for `claude_agent`; `codex` for `codex_agent`; `grok` for both Grok tools). aiterm resolves the binary via `CLAUDE_BIN` / `CODEX_BIN` / `GROK_BIN`, then `~/.local/bin/claude` / `~/.local/bin/codex` / `~/.grok/bin/grok`, then `PATH`. Prerequisites are checked **before** a session exists: empty `model` values and unsupported effort values are rejected up front; a missing CLI binary or a nonexistent `cwd` fails for all four. A rejected launch leaves **zero leftover session** behind. Claude and Codex launchers forward `model` and `reasoning_effort` through their vendor CLI's public flags; Grok/Composer reject `reasoning_effort` because it is headless-only. Pass an absolute path for `cwd` — `~` is not expanded. Durable callers can make a promptless Claude launch exactly replayable by passing an explicit `session_name` and a `launch_operation_id` formatted as `sha256:<64 lowercase hex>`. Repeating the identical launch returns the same structured session receipt without starting the CLI twice; a different correlation ID or launch argument for that session fails explicitly. Claude uses launch-local managed settings containing only aiterm's Stop hook: normal user/project/local hooks are not inherited, the hook event contains no answer body, and the bounded owner-only result is returned by `pty_read({ agent_transcript:true })` without reading Claude's private transcript. A late result remains recoverable from the same session without re-sending the prompt. Non-interrupt keys are rejected on the managed Claude route; use dispatch, `pty_key("C-c")`, and `pty_close` (`force:true` on `pty_send` is the manual-intervention escape). For unconstrained manual key-by-key driving, open a plain `pty_open` session and start the vendor CLI yourself. Codex uses a managed `CODEX_HOME`; Grok/Composer isolate their managed homes and pass validated OAuth state through `GROK_AUTH_PATH`. Before the first unbound dispatch, aiterm waits for the vendor TUI's input prompt and fails before sending if it is not ready. Managed completion requires POSIX filesystem semantics (Linux, WSL2, macOS).
|
|
98
99
|
|
|
100
|
+
The managed Codex home links authentication, privately snapshots `config.toml` and `agents/*.toml` custom-role definitions, and keeps sessions/caches isolated. A symlinked role definition is resolved into a regular-file snapshot rather than shared with the source home.
|
|
101
|
+
|
|
99
102
|
There is no hidden protocol between agents: a launched Claude, Codex, Grok, or Composer is another user-visible persistent terminal session. The MCP client drives that TUI with ordinary PTY operations, and a human can attach to watch or take over.
|
|
100
103
|
|
|
101
104
|
## Demo
|
package/dist/core.js
CHANGED
|
@@ -1505,6 +1505,40 @@ function managedCodexConfigSummary(configPath, hookTrustBypass) {
|
|
|
1505
1505
|
bits.push("hook trust bypass 有効");
|
|
1506
1506
|
return `managed config: ${bits.join(" / ")}`;
|
|
1507
1507
|
}
|
|
1508
|
+
// Custom agent definitions are configuration, not mutable Codex state. Copy only direct
|
|
1509
|
+
// agents/*.toml entries into the per-launch home so role discovery matches the source home while
|
|
1510
|
+
// sessions/cache remain isolated. Source symlinks are resolved and their contents are snapshotted;
|
|
1511
|
+
// the managed home never points back to the source definition.
|
|
1512
|
+
function snapshotCodexAgentDefinitions(srcHome, managedHome) {
|
|
1513
|
+
const srcDir = path.join(srcHome, "agents");
|
|
1514
|
+
let srcDirSt;
|
|
1515
|
+
try {
|
|
1516
|
+
srcDirSt = fs.statSync(srcDir);
|
|
1517
|
+
}
|
|
1518
|
+
catch (e) {
|
|
1519
|
+
if (e.code === "ENOENT")
|
|
1520
|
+
return;
|
|
1521
|
+
throw e;
|
|
1522
|
+
}
|
|
1523
|
+
if (!srcDirSt.isDirectory()) {
|
|
1524
|
+
throw new AitermError(`Codex agents が directory ではありません: ${srcDir}`, 2);
|
|
1525
|
+
}
|
|
1526
|
+
const names = fs.readdirSync(srcDir).filter((name) => name.endsWith(".toml")).sort();
|
|
1527
|
+
if (!names.length)
|
|
1528
|
+
return;
|
|
1529
|
+
const dstDir = path.join(managedHome, "agents");
|
|
1530
|
+
fs.mkdirSync(dstDir, { mode: 0o700 });
|
|
1531
|
+
fs.chmodSync(dstDir, 0o700);
|
|
1532
|
+
for (const name of names) {
|
|
1533
|
+
const src = path.join(srcDir, name);
|
|
1534
|
+
const resolved = fs.realpathSync(src);
|
|
1535
|
+
const st = fs.statSync(resolved);
|
|
1536
|
+
if (!st.isFile()) {
|
|
1537
|
+
throw new AitermError(`Codex agent definition が通常ファイルではありません: ${src}`, 2);
|
|
1538
|
+
}
|
|
1539
|
+
writeText0600(path.join(dstDir, name), fs.readFileSync(resolved, "utf8"));
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1508
1542
|
function createManagedCodexHome(name, launchId, overrides = {}) {
|
|
1509
1543
|
const srcHome = realCodexHome();
|
|
1510
1544
|
let srcSt;
|
|
@@ -1549,6 +1583,7 @@ function createManagedCodexHome(name, launchId, overrides = {}) {
|
|
|
1549
1583
|
fs.writeFileSync(configDst, configOut, { mode: 0o600 });
|
|
1550
1584
|
fs.chmodSync(configDst, 0o600);
|
|
1551
1585
|
}
|
|
1586
|
+
snapshotCodexAgentDefinitions(srcHome, managedHome);
|
|
1552
1587
|
const hookScript = codexHookScriptPath();
|
|
1553
1588
|
if (!fs.existsSync(hookScript)) {
|
|
1554
1589
|
throw new AitermError(`Codex Stop hook wrapper が見つかりません。npm run build を実行してください: ${hookScript}`, 2);
|
|
@@ -2108,7 +2143,7 @@ function loadAgentMetadata(name) {
|
|
|
2108
2143
|
.readdirSync(dir)
|
|
2109
2144
|
.filter((f) => f.startsWith(`${name}.`) && f.endsWith(".agent.json"));
|
|
2110
2145
|
if (files.length === 0) {
|
|
2111
|
-
throw new AitermError(`session '${name}' は agent_done 管理セッションではありません。codex_agent
|
|
2146
|
+
throw new AitermError(`session '${name}' は agent_done 管理セッションではありません。claude_agent/codex_agent 等の launcher で起動してください(launcher は常に managed)。`, 2);
|
|
2112
2147
|
}
|
|
2113
2148
|
if (files.length !== 1) {
|
|
2114
2149
|
throw new AitermError(`session '${name}' の agent metadata が複数あります。閉じて起動し直してください。`, 2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiterm-mcp",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"mcpName": "io.github.kitepon-rgb/aiterm-mcp",
|
|
5
5
|
"description": "AI-driven persistent terminal as a local stdio MCP server (tmux-backed). Holds one local PTY; SSH and containers are just commands you send into it. Also launches interactive Claude/Codex/Grok/Composer agent TUIs in a persistent terminal. Token-reducing reads.",
|
|
6
6
|
"keywords": [
|