aiterm-mcp 0.29.0 → 0.29.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.
Files changed (2) hide show
  1. package/dist/core.js +19 -0
  2. package/package.json +1 -1
package/dist/core.js CHANGED
@@ -2309,6 +2309,23 @@ function isAgentTuiIdleReady(kind, screen) {
2309
2309
  return false;
2310
2310
  return !isAgentTuiBusy(kind, screen);
2311
2311
  }
2312
+ // 起動側が明示応答すべき既知UI。ここで自動承認せず、ready timeoutを待たずに
2313
+ // `initial_prompt=not_sent`を返してsessionを生かしたままcallerへ制御を戻す。
2314
+ function isAgentTuiActionRequired(kind, screen) {
2315
+ if (kind === "codex") {
2316
+ return screen.includes("Update available!")
2317
+ || screen.includes("Do you trust the contents of this directory?")
2318
+ || screen.includes("Hooks need review")
2319
+ || screen.includes("Allow the room MCP server to run tool")
2320
+ || screen.includes("Would you like to run the following command?");
2321
+ }
2322
+ if (kind === "claude") {
2323
+ return /new MCP servers? found in this project/iu.test(screen)
2324
+ || screen.includes("Is this a project you created or one you trust")
2325
+ || screen.includes("trust this folder");
2326
+ }
2327
+ return false;
2328
+ }
2312
2329
  async function waitAgentTuiReadyImpl(kind, sample, sleepFn, opts = {}) {
2313
2330
  const timeoutMs = opts.timeoutMs ?? AGENT_TUI_READY_TIMEOUT_MS;
2314
2331
  const pollMs = opts.pollMs ?? AGENT_TUI_READY_POLL_MS;
@@ -2327,6 +2344,8 @@ async function waitAgentTuiReadyImpl(kind, sample, sleepFn, opts = {}) {
2327
2344
  }
2328
2345
  else {
2329
2346
  readyStreak = 0;
2347
+ if (isAgentTuiActionRequired(kind, lastScreen))
2348
+ return { ready: false, samples, lastScreen };
2330
2349
  }
2331
2350
  if (performance.now() >= deadline)
2332
2351
  return { ready: false, samples, lastScreen };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.29.0",
3
+ "version": "0.29.2",
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": [