aiterm-mcp 0.29.19 → 0.29.21
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 +6 -6
- package/README.md +7 -6
- package/dist/core.js +19 -2
- package/dist/harnesses/cursor.js +3 -0
- package/docs/RELEASE.md +5 -5
- 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.29.21] - 2026-09-02
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Detect Cursor prompts left in the composer when the arrow and first prompt line share one row, and fail dispatch instead of returning a successful receipt for text that was not submitted.
|
|
15
|
+
|
|
16
|
+
## [0.29.20] - 2026-09-01
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- 変更した実装の依存関係から必要なテストと工場環境を選び、依存を確定できない変更だけ全件へ広げ、選択jobのskip・cancel・failureを最終gateで拒否する製品所有CIへ更新した。
|
|
21
|
+
- release tagでは同じcommitのmain CI成功を再利用し、同一の3環境フル試験を二重実行しないようにした。
|
|
22
|
+
|
|
10
23
|
## [0.29.19] - 2026-09-01
|
|
11
24
|
|
|
12
25
|
### Fixed
|
|
@@ -1462,7 +1475,9 @@ prototype (preserved under `prototype/python/` as the porting source and referen
|
|
|
1462
1475
|
`ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
|
|
1463
1476
|
provenance.
|
|
1464
1477
|
|
|
1465
|
-
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.
|
|
1478
|
+
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.21...HEAD
|
|
1479
|
+
[0.29.21]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.20...v0.29.21
|
|
1480
|
+
[0.29.20]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.19...v0.29.20
|
|
1466
1481
|
[0.29.19]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.18...v0.29.19
|
|
1467
1482
|
[0.29.18]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.17...v0.29.18
|
|
1468
1483
|
[0.29.17]: https://github.com/kitepon/aiterm-mcp/compare/v0.29.16...v0.29.17
|
package/README.ja.md
CHANGED
|
@@ -153,7 +153,7 @@ runtime-error store は canonical dotagents config の `collection.enabled: true
|
|
|
153
153
|
場合だけ収集し、既定OFF、network送信は行いません。tag起点CIのnpm provenance(OIDC Trusted
|
|
154
154
|
Publishing)で公開し、GitHub Release が Official MCP Registry を再登録します。
|
|
155
155
|
|
|
156
|
-
**状態:** 開発継続中 · 現行公開版 **v0.29.
|
|
156
|
+
**状態:** 開発継続中 · 現行公開版 **v0.29.21** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
|
|
157
157
|
|
|
158
158
|
### 更新と巻き戻し
|
|
159
159
|
|
|
@@ -187,7 +187,7 @@ pty_read(id, { wait: true }) → 削減済みの出力を読む(完了
|
|
|
187
187
|
|
|
188
188
|
同じprimitiveが別エージェントのTUIを宿す。`agent_launch`の`harness`はagent loop・認証・hook・session・transcriptを所有する実行基盤、`model`は独立した選択。起動processは直接CLIと同じproject/user環境を使い、通常config、MCP、plugin、skill、permission、trust、memory、historyをcopy・filter・置換しない。
|
|
189
189
|
|
|
190
|
-
`aiterm.agent-launch-result.v1`は正規`harness`を返し、旧`provider`は互換fieldとして残す。同じ`harness`はagent dispatch、`aiterm-wait`、`agent_configure`、`pty_list`のagent行にも載り、旧vendor/provider/agent fieldは互換用に残る。Codexは通常rollout、Grok CLIは通常session event、Claudeはlaunch固有Stop hook、Cursorは通常agent transcript末尾の`turn_ended`を完了正本に使う。`pty_send`は非ブロックdispatchで、vendor別完了境界を表すopaqueな整数`event_cursor`を返し、完了通知は`aiterm-wait`を親のターンを塞がない別process
|
|
190
|
+
`aiterm.agent-launch-result.v1`は正規`harness`を返し、旧`provider`は互換fieldとして残す。同じ`harness`はagent dispatch、`aiterm-wait`、`agent_configure`、`pty_list`のagent行にも載り、旧vendor/provider/agent fieldは互換用に残る。Codexは通常rollout、Grok CLIは通常session event、Claudeはlaunch固有Stop hook、Cursorは通常agent transcript末尾の`turn_ended`を完了正本に使う。`pty_send`は非ブロックdispatchで、vendor別完了境界を表すopaqueな整数`event_cursor`を返し、完了通知は`aiterm-wait`を親のターンを塞がない別processで受ける。送信textがCursorのcomposerへ残った場合は成功receiptを返さず失敗する。
|
|
191
191
|
|
|
192
192
|
`agent_launch`は任意の`write_scope`も受ける。Codex/Grokのread-onlyは`--sandbox read-only`、Cursorは公式`--mode ask`で実効化する。path説明は同等CLI引数がないためdeclaration-only。
|
|
193
193
|
|
|
@@ -496,10 +496,10 @@ npm test # build してから node:test 回帰スイート(tmux ま
|
|
|
496
496
|
npm link # ローカルで `aiterm-mcp` を PATH に
|
|
497
497
|
```
|
|
498
498
|
|
|
499
|
-
開発中は変更に直結するfocused testを先にローカルで実行します。GitHub Actions
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
499
|
+
開発中は変更に直結するfocused testを先にローカルで実行します。GitHub Actionsは実装の依存関係から
|
|
500
|
+
必要なテストを選び、依存を確定できない変更とrelease変更だけ3環境の全テストへ広げます。
|
|
501
|
+
tag起点のnpm公開は、同じcommitのmain CIが3環境greenであり、tagged commitが`origin/main`の
|
|
502
|
+
祖先であることを確認した後だけ実行します。tag側で同じ3環境試験は繰り返しません。
|
|
503
503
|
|
|
504
504
|
共通進行は`src/core.ts`、harness固有は`src/harnesses/`、OS差は`src/tmux-runtime.ts`/`src/agent-resolver.ts`、reducerは`src/rtk.ts`、公開面は`src/index.ts`が所有する。現行設計は[`docs/DESIGN.md`](docs/DESIGN.md)、release手順は[`docs/RELEASE.md`](docs/RELEASE.md)を正とする。`prototype/python/`はreducerの歴史的移植元であり、pytest reducerは本家rtk 0.42.0と一致する(上記の`FAILED`行の差異だけは意図的・回帰テストで固定)。
|
|
505
505
|
|
package/README.md
CHANGED
|
@@ -169,7 +169,7 @@ collection is off by default and performs no network I/O. It ships via
|
|
|
169
169
|
tag-triggered CI with npm provenance (OIDC Trusted Publishing); the GitHub
|
|
170
170
|
Release re-registers the Official MCP Registry entry.
|
|
171
171
|
|
|
172
|
-
**Status:** actively maintained · current public release **v0.29.
|
|
172
|
+
**Status:** actively maintained · current public release **v0.29.21** · 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).
|
|
173
173
|
|
|
174
174
|
### Update and rollback
|
|
175
175
|
|
|
@@ -209,7 +209,7 @@ pty_read(id, { wait: true }) → read the token-reduced output, completion
|
|
|
209
209
|
|
|
210
210
|
The same primitive hosts another agent's TUI. `agent_launch` starts a selected execution harness inside a fresh persistent terminal and returns a `session_id`. `harness` names the component that owns the agent loop, authentication, hooks, session, and transcript; `model` remains an independent choice. The launched process sees the same project and user environment as a direct CLI invocation: normal configuration, MCPs, plugins, skills, permissions, trust decisions, memory, and history are not copied, filtered, or replaced. Aiterm adds only completion correlation and a non-user sub-agent context containing `role=subagent`, the parent session, delegation depth, lineage, and `delegation_allowed=true`.
|
|
211
211
|
|
|
212
|
-
The human-readable launch text is accompanied by an `aiterm.agent-launch-result.v1` structured receipt containing the canonical `harness`; the old `provider` field remains for compatibility. The same `harness` is carried by agent dispatch, `aiterm-wait`, `agent_configure`, and agent rows in `pty_list`, while their old vendor/provider/agent fields remain compatibility fields. Codex completion comes from its normal durable rollout transcript, Grok CLI from its normal session events, Claude Code from a launch-specific Stop hook settings addition, and Cursor from its normal agent transcript's terminal `turn_ended` record. Sending to any agent session is a non-blocking **dispatch** — the call returns immediately with an opaque, harness-specific integer `event_cursor`, and completion arrives via [`aiterm-wait`](#completion-push-for-parent-agents-aiterm-wait).
|
|
212
|
+
The human-readable launch text is accompanied by an `aiterm.agent-launch-result.v1` structured receipt containing the canonical `harness`; the old `provider` field remains for compatibility. The same `harness` is carried by agent dispatch, `aiterm-wait`, `agent_configure`, and agent rows in `pty_list`, while their old vendor/provider/agent fields remain compatibility fields. Codex completion comes from its normal durable rollout transcript, Grok CLI from its normal session events, Claude Code from a launch-specific Stop hook settings addition, and Cursor from its normal agent transcript's terminal `turn_ended` record. Sending to any agent session is a non-blocking **dispatch** — the call returns immediately with an opaque, harness-specific integer `event_cursor`, and completion arrives via [`aiterm-wait`](#completion-push-for-parent-agents-aiterm-wait). If submitted text remains in Cursor's composer, its dispatch fails instead of returning a successful receipt.
|
|
213
213
|
|
|
214
214
|
`agent_launch` accepts an optional `write_scope`: either `"read-only"` or a human-readable description of writable paths. Codex/Grok use `--sandbox read-only`; Cursor uses its official read-only `--mode ask`. A path description remains declaration-only because these CLI launch surfaces provide no equivalent path allowlist flag.
|
|
215
215
|
|
|
@@ -542,10 +542,11 @@ npm test # build, then the node:test regression suite (requires tmux o
|
|
|
542
542
|
npm link # put `aiterm-mcp` on PATH locally
|
|
543
543
|
```
|
|
544
544
|
|
|
545
|
-
Development uses focused local tests first.
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
545
|
+
Development uses focused local tests first. GitHub Actions selects tests from the changed implementation's
|
|
546
|
+
dependency graph and expands unknown or release changes to the full suite on the self-hosted
|
|
547
|
+
`macos-native`, `linux-workstation`, and `windows-native` runners. Tag-triggered npm publishing reuses
|
|
548
|
+
the successful main CI for the same commit instead of repeating it, and runs only after the tagged commit
|
|
549
|
+
is confirmed on `origin/main`. The native
|
|
549
550
|
Windows runner needs psmux ≥ 3.3.8 and Git for Windows on its PATH, and must run as an
|
|
550
551
|
interactive Windows user; `NETWORK SERVICE` lacks the per-user environment the pane shell and
|
|
551
552
|
harness CLIs rely on and is not a valid runner identity.
|
package/dist/core.js
CHANGED
|
@@ -19,7 +19,7 @@ import { sleep, currentUid, runtimeStateBase, safeStatSize, readFileRange, write
|
|
|
19
19
|
import { GROK_MODEL_DEFAULTS, realGrokHome, resolveAndValidateGrokAuth, assertGrokModelAvailable, grokEventsTranscript, latestGrokCompletion, observeGrokDone, buildGrokAgentCmd, grokLaunchNote, grokEnvTokens, grokTuiReady, GROK_COMPOSER_MARKER_RE, grokFooterHasConfiguration, grokTranscriptText, createGrokAgentMetadata, } from "./harnesses/grok.js";
|
|
20
20
|
import { bindCodexTranscriptSession, latestCodexCompletion, observeCodexDone, buildCodexAgentCmd, codexLaunchNote, codexTuiReady, codexLaunchBlockingDialog, CODEX_COMPOSER_MARKER_RE, codexModelChoice, codexEffortChoice, codexMoreReasoningChoice, codexTranscriptText, createCodexAgentMetadata, } from "./harnesses/codex.js";
|
|
21
21
|
import { OPERATION_ID_RE, CLAUDE_RESULT_MAX_BYTES, CLAUDE_EFFORTS, agentManagedClaudeSettingsPath, agentClaudeResultPath, agentClaudeOperationPath, agentClaudeApprovalReceiptPath, agentClaudeDispatchReceiptPath, validateOperationId, readClaudeResultText, assertClaudeAuthenticationReady, buildClaudeAgentCmd, claudeLaunchNote, claudeTuiReady, CLAUDE_COMPOSER_MARKER_RE, createClaudeAgentMetadata, } from "./harnesses/claude.js";
|
|
22
|
-
import { bindCursorTranscriptSession, cursorTurnBoundary, latestCursorCompletion, observeCursorDone, cursorTranscriptText, assertCursorAuthenticationReady, assertCursorModelAvailable, buildCursorAgentCmd, cursorPromptWithLineage, createCursorAgentMetadata, cursorLaunchNote, cursorEffortNavigation, cursorTuiReady,
|
|
22
|
+
import { bindCursorTranscriptSession, cursorTurnBoundary, latestCursorCompletion, observeCursorDone, cursorTranscriptText, assertCursorAuthenticationReady, assertCursorModelAvailable, buildCursorAgentCmd, cursorPromptWithLineage, createCursorAgentMetadata, cursorLaunchNote, cursorEffortNavigation, cursorTuiReady, CURSOR_COMPOSER_CONTENT_MARKER_RE, validateCursorModelEffort, } from "./harnesses/cursor.js";
|
|
23
23
|
import { resolveAgentBin, resolveThroughlineBin, runThroughlineHandoffContext, isWindowsNativeExecutable, agentBinForPaneShell, resolveWinPaneShell } from "./agent-resolver.js";
|
|
24
24
|
export { AitermError } from "./errors.js";
|
|
25
25
|
export { tmuxSpawnEnv } from "./tmux-runtime.js";
|
|
@@ -2417,7 +2417,7 @@ function agentSubmitResidueOnScreen(kind, screen, tail) {
|
|
|
2417
2417
|
: kind === "claude"
|
|
2418
2418
|
? CLAUDE_COMPOSER_MARKER_RE
|
|
2419
2419
|
: kind === "cursor"
|
|
2420
|
-
?
|
|
2420
|
+
? CURSOR_COMPOSER_CONTENT_MARKER_RE
|
|
2421
2421
|
: GROK_COMPOSER_MARKER_RE;
|
|
2422
2422
|
let markerIdx = -1;
|
|
2423
2423
|
for (let i = lines.length - 1; i >= 0; i--) {
|
|
@@ -2464,6 +2464,15 @@ export function agentSubmitResidueWarning(name, residue) {
|
|
|
2464
2464
|
`pty_read(${name}, screen:true) で状態を確認してから、座礁していれば pty_key(${name}, "Enter") で再 submit、` +
|
|
2465
2465
|
`破棄するなら pty_key(${name}, "Escape") を使う。盲目的に Enter を送らない(queued だった場合の二重 submit 防止)。`);
|
|
2466
2466
|
}
|
|
2467
|
+
function assertAgentSubmitDelivered(name, kind, residue) {
|
|
2468
|
+
if (kind !== "cursor" || residue.residue !== true)
|
|
2469
|
+
return;
|
|
2470
|
+
throw new AitermError(`submit_residue=true vendor=${kind} session=${name}\n` +
|
|
2471
|
+
"送信 text がcomposerへ残っており、turnを開始できませんでした。", 2);
|
|
2472
|
+
}
|
|
2473
|
+
export function __testAssertAgentSubmitDelivered(name, kind, residue) {
|
|
2474
|
+
assertAgentSubmitDelivered(name, kind, residue);
|
|
2475
|
+
}
|
|
2467
2476
|
async function settleAgentDoneScreenImpl(sample, sleepFn, opts = {}) {
|
|
2468
2477
|
const minDelayMs = opts.minDelayMs ?? AGENT_DONE_SETTLE_MIN_MS;
|
|
2469
2478
|
const pollMs = opts.pollMs ?? AGENT_DONE_SCREEN_SETTLE_POLL_MS;
|
|
@@ -2592,6 +2601,13 @@ export async function sendInitialAgentPrompt(name, text, o = {}) {
|
|
|
2592
2601
|
`起動時promptがCursorのcomposerへ残り、Enter再送後もturnを開始できませんでした。`, 2);
|
|
2593
2602
|
}
|
|
2594
2603
|
}
|
|
2604
|
+
try {
|
|
2605
|
+
assertAgentSubmitDelivered(name, meta.kind, residue);
|
|
2606
|
+
}
|
|
2607
|
+
catch (e) {
|
|
2608
|
+
setInitialPromptState(meta, "failed");
|
|
2609
|
+
throw e;
|
|
2610
|
+
}
|
|
2595
2611
|
return {
|
|
2596
2612
|
text: `initial_prompt=pending vendor=${meta.kind} event_cursor=${startOffset} harness=${agentHarness(meta.kind)}\n` +
|
|
2597
2613
|
`起動時 prompt を送信した。${agentDispatchGuide(name, startOffset)}` +
|
|
@@ -2850,6 +2866,7 @@ export async function dispatchAgentTurn(name, text, o = {}) {
|
|
|
2850
2866
|
await sleep(AGENT_SUBMIT_DELAY_MS);
|
|
2851
2867
|
sendKey(name, "Enter", { preserveAgentOperation: meta.kind === "claude" });
|
|
2852
2868
|
const residue = await detectAgentSubmitResidue(name, meta.kind, dispatchText);
|
|
2869
|
+
assertAgentSubmitDelivered(name, meta.kind, residue);
|
|
2853
2870
|
return {
|
|
2854
2871
|
schema: "aiterm.agent-dispatch.v1",
|
|
2855
2872
|
session_id: meta.aiterm_session,
|
package/dist/harnesses/cursor.js
CHANGED
|
@@ -392,6 +392,9 @@ export function cursorLaunchNote(model, effort, meta) {
|
|
|
392
392
|
return `${modelNote}${writeScopeLaunchNote("cursor", meta?.write_scope)}`;
|
|
393
393
|
}
|
|
394
394
|
export const CURSOR_COMPOSER_MARKER_RE = /(?:^|\n)\s*(?:>|→|->)\s*(?:\n|$)/m;
|
|
395
|
+
// 送信後の残留検出では、本文が矢印と同じ行に残る現行UIもcomposerとして扱う。
|
|
396
|
+
// ready判定には使わない。本文入りcomposerを入力待ちと誤認させないため。
|
|
397
|
+
export const CURSOR_COMPOSER_CONTENT_MARKER_RE = /^\s*(?:->|>|→)(?:\s|$)/;
|
|
395
398
|
const CURSOR_FOLLOWUP_MARKER_RE = /(?:^|\n)\s*(?:→|->)\s*Add a follow-up\b/im;
|
|
396
399
|
const CURSOR_START_PROMPT_MARKER_RE = /(?:^|\n)\s*(?:→|->)\s*Plan,\s*search,\s*build anything\s*(?:\n|$)/im;
|
|
397
400
|
export function cursorTuiReady(screen) {
|
package/docs/RELEASE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Release
|
|
2
2
|
|
|
3
|
-
Aitermのreleaseはこのrepositoryが所有する。`.github/workflows/product-full-ci.yml
|
|
3
|
+
Aitermのreleaseはこのrepositoryが所有する。`.github/workflows/product-full-ci.yml`が変更影響選択、3環境runnerと
|
|
4
4
|
製品gateの正本であり、dotagentsの工場CIは横断受入のconsumerであってreleaseを制御しない。
|
|
5
5
|
|
|
6
6
|
## Version同期
|
|
@@ -30,14 +30,14 @@ MCPBのstaged serverでversion、16 tools、stderr 0、必要なruntime JavaScri
|
|
|
30
30
|
|
|
31
31
|
## Mainと公開
|
|
32
32
|
|
|
33
|
-
1. release commitを`main`へpush
|
|
33
|
+
1. release commitを`main`へpushする。version・manifest・workflowを含むrelease変更は未分類変更として`macos-native`、`linux-workstation`、`windows-native`の全テストへ広がり、3環境をgreenにする。
|
|
34
34
|
2. `npm run verify:release-commit`で対象commitが`origin/main`の祖先かつworktree cleanであることを確認する。
|
|
35
|
-
3. 同じcommitへ`v<version>` tagを付けてpushする。tag CI
|
|
35
|
+
3. 同じcommitへ`v<version>` tagを付けてpushする。tag CIは同じcommitのmain CI成功を確認し、3環境試験を再実行せずnpmへprovenance付きでpublishする。
|
|
36
36
|
4. build済みMCPBを添付したGitHub Releaseを公開する。release eventがOfficial MCP Registry登録を起動する。
|
|
37
37
|
5. npm、GitHub Release、Official Registryが同じversionを返すまで確認する。
|
|
38
38
|
|
|
39
|
-
CI callerは同じrepositoryの`./.github/workflows/product-full-ci.yml
|
|
40
|
-
3環境runner、release gateを外部repositoryへ移さず、dotagentsの変更や停止からAitermの受入を独立させる。
|
|
39
|
+
CI callerは同じrepositoryの`./.github/workflows/product-full-ci.yml`だけを呼ぶ。製品側の変更影響選択、
|
|
40
|
+
全テストへの明示的な拡張、3環境runner、release gateを外部repositoryへ移さず、dotagentsの変更や停止からAitermの受入を独立させる。
|
|
41
41
|
|
|
42
42
|
## 公開後smoke
|
|
43
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiterm-mcp",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.21",
|
|
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": [
|