aiterm-mcp 0.61.14 → 0.61.15

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 CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.61.15] - 2026-10-24
11
+
12
+ ### Fixed
13
+
14
+ - Completion checks observe the original request boundary outside the shared metadata mutex, then revalidate the unchanged original record and all uncertainty/slot gates before committing. Slow transcript/native completion observation no longer blocks unrelated admission; unknown sends are never reconciled or replayed.
15
+
10
16
  ## [0.61.14] - 2026-10-24
11
17
 
12
18
  ### Fixed
@@ -2842,7 +2848,8 @@ prototype (preserved under `prototype/python/` as the porting source and referen
2842
2848
  `ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
2843
2849
  provenance.
2844
2850
 
2845
- [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.61.14...HEAD
2851
+ [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.61.15...HEAD
2852
+ [0.61.15]: https://github.com/kitepon/aiterm-mcp/compare/v0.61.14...v0.61.15
2846
2853
  [0.61.14]: https://github.com/kitepon/aiterm-mcp/compare/v0.61.13...v0.61.14
2847
2854
  [0.61.13]: https://github.com/kitepon/aiterm-mcp/compare/v0.61.12...v0.61.13
2848
2855
  [0.61.12]: https://github.com/kitepon/aiterm-mcp/compare/v0.61.11...v0.61.12
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.61.14** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
212
+ **状態:** 開発継続中 · 現行公開版 **v0.61.15** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
213
213
 
214
214
  ### 更新と巻き戻し
215
215
 
package/README.md CHANGED
@@ -227,7 +227,7 @@ collection is off by default and performs no network I/O. It ships via
227
227
  tag-triggered CI with npm provenance (OIDC Trusted Publishing); the GitHub
228
228
  Release re-registers the Official MCP Registry entry.
229
229
 
230
- **Status:** actively maintained · current public release **v0.61.14** · 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).
230
+ **Status:** actively maintained · current public release **v0.61.15** · 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).
231
231
 
232
232
  ### Update and rollback
233
233
 
@@ -1113,6 +1113,8 @@ export class ExecutionService {
1113
1113
  });
1114
1114
  }
1115
1115
  async finish(args) {
1116
+ if (args.evidence.kind === "completion")
1117
+ return this.finishCompletion(args.request, args.evidence.target);
1116
1118
  return this.store.transaction(async (state) => {
1117
1119
  const record = find(state, args.request);
1118
1120
  if (record.operations.launch === "issued" || record.operations.send === "issued"
@@ -1134,34 +1136,63 @@ export class ExecutionService {
1134
1136
  const target = record.relation.target;
1135
1137
  if (!target)
1136
1138
  throw new ExecutionError("EXECUTION_CONFLICT");
1137
- if (args.evidence.kind === "completion") {
1138
- if (!target.boundary || !same(target, args.evidence.target))
1139
- throw new ExecutionError("EXECUTION_CONFLICT", "possible");
1140
- if (record.relation.completion === "completed" && record.relation.target_fence === "closed")
1141
- return view(state, record);
1142
- const observed = await this.runtime.completion(target);
1143
- if (observed.state === "unknown")
1144
- throw new ExecutionError("EXECUTION_UNCONFIRMED", "possible");
1145
- record.relation.completion = observed.state;
1146
- record.relation.target_fence = pendingParentReturn(state, args.request) ? "unknown"
1147
- : observed.state === "completed" ? "closed" : observed.fence;
1148
- }
1149
- else {
1150
- if (!same(target.launch, args.evidence.target))
1151
- throw new ExecutionError("EXECUTION_CONFLICT", "possible");
1152
- if (record.relation.completion === "interrupted" && record.relation.target_fence === "closed")
1153
- return view(state, record);
1154
- const observed = await this.runtime.observe(target.launch.session_id);
1155
- if (observed.state !== "absent" || state.slots.some(slot => slot.session_id === target.launch.session_id))
1156
- throw new ExecutionError("EXECUTION_UNCONFIRMED", "possible");
1157
- record.relation.completion = "interrupted";
1158
- record.relation.target_fence = "closed";
1159
- }
1139
+ if (!same(target.launch, args.evidence.target))
1140
+ throw new ExecutionError("EXECUTION_CONFLICT", "possible");
1141
+ if (record.relation.completion === "interrupted" && record.relation.target_fence === "closed")
1142
+ return view(state, record);
1143
+ const observed = await this.runtime.observe(target.launch.session_id);
1144
+ if (observed.state !== "absent" || state.slots.some(slot => slot.session_id === target.launch.session_id))
1145
+ throw new ExecutionError("EXECUTION_UNCONFIRMED", "possible");
1146
+ record.relation.completion = "interrupted";
1147
+ record.relation.target_fence = "closed";
1160
1148
  }
1161
1149
  retireSettledBranches(state);
1162
1150
  return view(state, record);
1163
1151
  });
1164
1152
  }
1153
+ /** Completion evidence is for one fixed historical request/Point. Native
1154
+ * transcript/generation observation must not hold the global writer mutex.
1155
+ * Commit only if the original record and all uncertainty gates still match;
1156
+ * an unrelated writer is allowed to progress while evidence is observed.
1157
+ */
1158
+ async finishCompletion(request, target) {
1159
+ const eligible = (state) => {
1160
+ const record = find(state, request);
1161
+ if ([record.operations.launch, record.operations.send].some(stage => stage === "issued" || stage === "unknown")
1162
+ || state.slots.some(slot => slot.request && same(slot.request, request))
1163
+ || openParentEffect(state, request))
1164
+ throw new ExecutionError("EXECUTION_UNCONFIRMED", "possible");
1165
+ if (!record.relation.target)
1166
+ throw new ExecutionError("EXECUTION_CONFLICT");
1167
+ if (!record.relation.target.boundary || !same(record.relation.target, target))
1168
+ throw new ExecutionError("EXECUTION_CONFLICT", "possible");
1169
+ return record;
1170
+ };
1171
+ const settled = (record) => record.relation.completion === "completed" && record.relation.target_fence === "closed";
1172
+ const initial = await this.store.transaction(state => {
1173
+ const record = eligible(state);
1174
+ return { record, result: view(state, record) };
1175
+ }, { readOnly: true });
1176
+ if (settled(initial.record))
1177
+ return initial.result;
1178
+ const observed = { ...await this.runtime.completion(executionPointSchema.parse(target)) };
1179
+ if (observed.state === "unknown")
1180
+ throw new ExecutionError("EXECUTION_UNCONFIRMED", "possible");
1181
+ return this.store.transaction(state => {
1182
+ const record = eligible(state);
1183
+ if (settled(record))
1184
+ return view(state, record);
1185
+ // Do not overwrite a concurrent cancellation, target rebinding, phase
1186
+ // change or interruption with an earlier read's completion evidence.
1187
+ if (!same(record, initial.record))
1188
+ throw new ExecutionError("EXECUTION_UNCONFIRMED", "possible");
1189
+ record.relation.completion = observed.state;
1190
+ record.relation.target_fence = pendingParentReturn(state, request) ? "unknown"
1191
+ : observed.state === "completed" ? "closed" : observed.fence;
1192
+ retireSettledBranches(state);
1193
+ return view(state, record);
1194
+ });
1195
+ }
1165
1196
  /** Adapter for existing restart/configuration/close paths. It shares the
1166
1197
  * same per-seat issuance slots as dispatch and stop, without creating a job ID.
1167
1198
  * Callers must not wrap a multi-step restart in one unobserved callback:
package/docs/DESIGN.md CHANGED
@@ -62,6 +62,9 @@ source/target世代の観測は保持せず、従来どおり各受付で再照
62
62
  実killの直前にもruntimeの同期世代読取を通し、scope/actor/期待launchの交代を拒否する。
63
63
  注入runtimeのclose欠測をcore既定処理で補わず、作用後の応答欠測は消失観測があってもunknown slotを保持する。
64
64
  完了の照会点は固定し、終了fenceの非同期応答後にも現在世代を確認する。実受取番/終了fenceの証拠adapterは未了。
65
+ 通常のcompletion終了確認は元request/Pointを共有lock内で固定し、native/transcript観測をlock外で行う。
66
+ 反映時に同じrecord全体・issued/unknown・元slot・親作用を再照合し、途中変更があれば反映しない。
67
+ 親返却のpending判定は反映時のstateで行い、元unknownの解除や送信の再実行には使わない。
65
68
  private producer/worker factoryを構築したprocessではnative effect scopeを必須にする。
66
69
  coreの公開変更入口も、打鍵や設定・認証・lock/metadata準備に入る前に対象のrequest contextを要求する。
67
70
  この入口確認はissuedへの昇格ではない。実作用時には既存の同期受付を別に通す。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.61.14",
3
+ "version": "0.61.15",
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": [