aiterm-mcp 0.70.68 → 0.70.69
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 +6 -1
- package/README.ja.md +1 -1
- package/README.md +1 -1
- package/dist/claude-plan-spec-hook.js +30 -24
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.70.69] - 2026-11-15
|
|
11
|
+
|
|
12
|
+
- The EnterPlanMode spec hook (0.70.67) no longer relies on the call's own transcript rows (Kiro's Z41 lab: a seat that wrote a 300-character spec in the same message was turned back at its first call, 3 of 3 runs). In the interactive Claude Code 2.1.325 the rows of the message that holds the call are often not in the transcript while the hook runs, however long the hook waits (measured up to 2.6 s; they appear after the hook returns), so the hook now counts the assistant text since the last real user prompt up to the call: an earlier message of the same prompt with 80+ characters lets the first call through. When the call's own message is not readable and nothing earlier was written, the first call of a prompt is turned back once (the instruction now says that a seat that has just written its spec only needs to call EnterPlanMode again), the second call always enters. The wait for the call's row is 600 ms instead of 1500 ms (harness-contracts.md "EnterPlanModeの前に仕様を書かせる").
|
|
13
|
+
|
|
10
14
|
## [0.70.68] - 2026-11-15
|
|
11
15
|
|
|
12
16
|
- `agent_configure` now changes the model or the effort (low to max) of a Claude seat whose turn is running, without ending the turn (b8, Kiro's request, Owner's order). Typing `/model` into a busy Claude seat only queues it as a user message (2.1.325), so the picker is opened with Alt+P (tmux/psmux key `M-p`, ESC and p in one write; a lone ESC would stop the turn) and the usual row match, `s` (this session only, never Enter), "Yes, switch" and refusal logic (`configureRefusal`, `aiterm/configure_error`) follow. The same turn's next request runs on the new model. Differences from an idle seat: no Esc is sent except to close the picker or the switch question while one is on screen, the result line is read without the `❯ /model` line above it, and no composer is waited for. Idle seats still use `/model`. `fast`, `opusplan`, `ultracode`, an effort outside low-max and a running Claude goal keep the refusal "入力待ちではありません" (nothing typed). A seat already in a running turn needs no relaunch; the change is on the seat's own session only (model-configuration.md).
|
|
@@ -3522,7 +3526,8 @@ prototype (preserved under `prototype/python/` as the porting source and referen
|
|
|
3522
3526
|
`ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
|
|
3523
3527
|
provenance.
|
|
3524
3528
|
|
|
3525
|
-
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.
|
|
3529
|
+
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.69...HEAD
|
|
3530
|
+
[0.70.69]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.68...v0.70.69
|
|
3526
3531
|
[0.70.68]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.67...v0.70.68
|
|
3527
3532
|
[0.70.67]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.66...v0.70.67
|
|
3528
3533
|
[0.70.66]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.65...v0.70.66
|
package/README.ja.md
CHANGED
|
@@ -215,7 +215,7 @@ runtime-error store は canonical dotagents config の `collection.enabled: true
|
|
|
215
215
|
場合だけ収集し、既定OFF、network送信は行いません。tag起点CIのnpm provenance(OIDC Trusted
|
|
216
216
|
Publishing)で公開し、GitHub Release が Official MCP Registry を再登録します。
|
|
217
217
|
|
|
218
|
-
**状態:** 開発継続中 · 現行公開版 **v0.70.
|
|
218
|
+
**状態:** 開発継続中 · 現行公開版 **v0.70.69** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
|
|
219
219
|
|
|
220
220
|
### 更新と巻き戻し
|
|
221
221
|
|
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.70.
|
|
230
|
+
**Status:** actively maintained · current public release **v0.70.69** · 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
|
|
|
@@ -9,12 +9,13 @@ import { currentUid, runtimeStateBase } from "./state-root.js";
|
|
|
9
9
|
const MAX_STDIN_BYTES = 8 * 1024 * 1024;
|
|
10
10
|
const TAIL_BYTES = 512 * 1024;
|
|
11
11
|
const POLL_MS = 50;
|
|
12
|
-
const WAIT_MS =
|
|
12
|
+
const WAIT_MS = 600; // rows that are readable at all show up within ~110 ms (measured); waiting longer never helped
|
|
13
13
|
// shortcut: a length floor, because the spec is the AI's own words and a tool cannot judge it; raise it if seats pass one-line stubs.
|
|
14
14
|
const SPEC_MIN_CHARS = 80;
|
|
15
15
|
const AITERM_ENV = ["AITERM_AGENT_KIND", "AITERM_SESSION_ID", "AITERM_AGENT_SESSION_ID", "AITERM_AGENT_LAUNCH_ID"];
|
|
16
16
|
const GUIDANCE = "プランモードに入る前に、プランを練りたい内容の詳細な仕様を、あなた自身の言葉で書いてください。"
|
|
17
|
-
+ "何を作る・直す・調べるのか、範囲、守る条件、終わりの形を書いたうえで、もう一度 EnterPlanMode を呼んでください。"
|
|
17
|
+
+ "何を作る・直す・調べるのか、範囲、守る条件、終わりの形を書いたうえで、もう一度 EnterPlanMode を呼んでください。"
|
|
18
|
+
+ "(この呼びの直前に書き終えている場合は、書き直さずにもう一度 EnterPlanMode を呼ぶだけで入れます。)";
|
|
18
19
|
async function readStdin() {
|
|
19
20
|
const chunks = [];
|
|
20
21
|
let total = 0;
|
|
@@ -51,10 +52,13 @@ function blocksOf(row) {
|
|
|
51
52
|
return Array.isArray(row.message?.content) ? row.message.content : [];
|
|
52
53
|
}
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
55
|
+
* What the transcript says about the spec of this EnterPlanMode call: the characters of assistant text written since the last
|
|
56
|
+
* real user prompt up to the call (earlier messages of the same prompt count; text in the call's own message counts up to the
|
|
57
|
+
* tool_use), and whether the call's tool_use row is in the file yet. In the interactive CLI (2.1.325) the rows of the message
|
|
58
|
+
* that holds the call are often not in the file while the hook runs, however long it waits (measured 2026-11-15, up to 2.6 s),
|
|
59
|
+
* so `visible: false` means "not readable", not "nothing written".
|
|
56
60
|
*/
|
|
57
|
-
export function
|
|
61
|
+
export function specEvidence(transcript, toolUseId) {
|
|
58
62
|
const rows = [];
|
|
59
63
|
for (const line of transcript.split("\n")) {
|
|
60
64
|
try {
|
|
@@ -62,23 +66,25 @@ export function specChars(transcript, toolUseId) {
|
|
|
62
66
|
}
|
|
63
67
|
catch { /* a half-written or foreign line */ }
|
|
64
68
|
}
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
const isCall = (block) => block?.type === "tool_use" && block.id === toolUseId;
|
|
70
|
+
const at = rows.findIndex(row => blocksOf(row).some(isCall));
|
|
71
|
+
const end = at < 0 ? rows.length : at + 1;
|
|
72
|
+
// A real prompt is a user row that holds text (a tool_result-only user row is the answer to a tool call).
|
|
73
|
+
let prompt = end - 1;
|
|
74
|
+
while (prompt >= 0 && !(rows[prompt].type === "user"
|
|
75
|
+
&& (typeof rows[prompt].message?.content === "string" || blocksOf(rows[prompt]).some(block => block?.type === "text"))))
|
|
76
|
+
prompt -= 1;
|
|
77
|
+
let chars = 0;
|
|
78
|
+
for (let i = prompt + 1; i < end; i += 1) {
|
|
79
|
+
if (rows[i].type !== "assistant")
|
|
80
|
+
continue;
|
|
81
|
+
const blocks = blocksOf(rows[i]);
|
|
82
|
+
for (const block of i === at ? blocks.slice(0, blocks.findIndex(isCall)) : blocks) {
|
|
83
|
+
if (block?.type === "text" && typeof block.text === "string")
|
|
84
|
+
chars += block.text.trim().length;
|
|
78
85
|
}
|
|
79
86
|
}
|
|
80
|
-
|
|
81
|
-
return texts.reduce((sum, block) => sum + block.text.trim().length, 0);
|
|
87
|
+
return { visible: at >= 0, chars };
|
|
82
88
|
}
|
|
83
89
|
function stateFile(env) {
|
|
84
90
|
const seat = env.AITERM_SESSION_ID;
|
|
@@ -103,17 +109,17 @@ export async function planSpecDecision(payload, env = process.env, timing = { wa
|
|
|
103
109
|
return null;
|
|
104
110
|
}
|
|
105
111
|
catch { /* nothing recorded yet */ }
|
|
106
|
-
let
|
|
112
|
+
let evidence = { visible: false, chars: 0 };
|
|
107
113
|
for (let waited = 0;; waited += timing.pollMs) {
|
|
108
114
|
const tail = readTail(input.transcript_path);
|
|
109
115
|
if (tail === null)
|
|
110
116
|
return null;
|
|
111
|
-
|
|
112
|
-
if (chars
|
|
117
|
+
evidence = specEvidence(tail, input.tool_use_id);
|
|
118
|
+
if (evidence.chars >= SPEC_MIN_CHARS || evidence.visible || waited >= timing.waitMs)
|
|
113
119
|
break;
|
|
114
120
|
await sleep(timing.pollMs);
|
|
115
121
|
}
|
|
116
|
-
if (chars
|
|
122
|
+
if (evidence.chars >= SPEC_MIN_CHARS)
|
|
117
123
|
return null;
|
|
118
124
|
// Record the turn-back first: if it cannot be recorded the second call could not be let through, so allow instead.
|
|
119
125
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiterm-mcp",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.69",
|
|
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, Cursor Agent CLI, and Antigravity CLI, plus durable PTYs for SSH, containers, and REPLs.",
|
|
6
6
|
"keywords": [
|