aiterm-mcp 0.70.62 → 0.70.64
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 +11 -1
- package/README.ja.md +1 -1
- package/README.md +1 -1
- package/dist/core.js +52 -1
- package/dist/harnesses/claude.js +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.70.64] - 2026-11-15
|
|
11
|
+
|
|
12
|
+
- `agent_configure model: "opusplan"` no longer hangs on a seat whose conversation is cached for its current model (Z27 lab). Claude Code asks "Switch model? … ❯ 1. Yes, switch" after `/model opusplan`; Aiterm now reads that question (with or without a model name) and answers Yes once, as the picker path does. If no result line comes within 20 seconds, Aiterm closes what is open with Escape (at most 3 times) and refuses with `CLAUDE_MODEL_SWITCH_UNCONFIRMED` (with `configureRefusal`), without waiting for the composer. The root's `settings.json` still goes back to its exact prior bytes.
|
|
13
|
+
|
|
14
|
+
## [0.70.63] - 2026-11-15
|
|
15
|
+
|
|
16
|
+
- Claude seats can use `opusplan` (Opus Plan Mode), a141. `agent_models` for claude-code now lists it on both login paths: the catalog asks `initialize` with `--model opusplan`, and Claude Code 2.1.325 adds that row only while the session runs it. `agent_configure` with `model: "opusplan"` first sends `/model opusplan`, because the picker has no such row until the seat runs it. Claude Code saves that as the user's default; the root's `settings.json` `model` goes back to its value before, the same way as for fast. The picker step then selects the row for this session only, with the requested effort. Launches already passed `--model opusplan` unchanged.
|
|
17
|
+
|
|
10
18
|
## [0.70.62] - 2026-11-15
|
|
11
19
|
|
|
12
20
|
- A caller MCP server (`mcp_config`) no longer replaces a server the seat's own harness config already defines under the same name. Without a flag the caller entry is dropped and the seat still launches. A server entry may say `"replace": true` (a boolean) to replace that server knowingly. The launch receipt carries `caller_mcp: {dropped, replaced}` whenever `mcp_config` is given. The own config is read on the machine that runs the seat: Claude user, local and project scope; Codex and Grok `config.toml`; Antigravity `~/.gemini/config/mcp_config.json` and `<cwd>/.agents/mcp_config.json`. Cursor already ran caller servers beside its own. A resume keeps its launch's dropped names. A terminal below 0.70.62 gets the config without `replace` keys and keeps its old precedence (launch-identity-input.md "Caller name precedence", a138).
|
|
@@ -3498,7 +3506,9 @@ prototype (preserved under `prototype/python/` as the porting source and referen
|
|
|
3498
3506
|
`ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
|
|
3499
3507
|
provenance.
|
|
3500
3508
|
|
|
3501
|
-
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.
|
|
3509
|
+
[Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.64...HEAD
|
|
3510
|
+
[0.70.64]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.63...v0.70.64
|
|
3511
|
+
[0.70.63]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.62...v0.70.63
|
|
3502
3512
|
[0.70.62]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.61...v0.70.62
|
|
3503
3513
|
[0.70.61]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.60...v0.70.61
|
|
3504
3514
|
[0.70.60]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.59...v0.70.60
|
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.64** · 動作対象は 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.64** · 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
|
|
package/dist/core.js
CHANGED
|
@@ -70,7 +70,7 @@ import { readFileOrNull, restoreJsonSetting, withUserConfigLock, restoreUserDefa
|
|
|
70
70
|
import { isDeepStrictEqual } from "node:util";
|
|
71
71
|
import { grokAuthPlan, grokAuthStatus, grokAuthPane, GROK_MODEL_DEFAULTS, realGrokHome, resolveAndValidateGrokAuth, assertGrokModelAvailable, grokModelChoices, grokModelFromFooter, grokFooterModelName, grokModelDefaultsFromBody, restoreGrokModelDefaults, grokEventsTranscript, grokSessionDirectory, latestGrokCompletion, grokTurnSettled, observeGrokDone, buildGrokAgentCmd, grokAgentArgv, writeGrokCallerFiles, checkGrokCallerInput, grokLaunchNote, grokEnvTokens, grokEnvEntries, grokTuiReady, grokPaneObservation, GROK_INTERRUPT_KEY, grokRateLimitDialog, grokPromptAwaitingAccept, grokUnacceptedPromptRestored, grokStartupAction, grokFooterHasConfiguration, grokTranscriptText, createGrokAgentMetadata, } from "./harnesses/grok.js";
|
|
72
72
|
import { codexAuthPlan, codexAuthStatus, codexAuthPane, realCodexHome, readCodexConfigPins, bindCodexTranscriptSession, latestCodexCompletion, codexTurnSettled, codexCompletedTurnId, codexWorkingResumeConfiguration, captureCodexRecoveryProof, captureCodexResumeProof, readCodexResumeProof, codexResumeProofDigest, codexRootTranscript, codexRolloutSessionId, codexRunningTurn, codexInterruptionRecord, observeCodexDone, buildCodexAgentCmd, codexAgentArgv, codexResumeArgv, writeCodexCallerFiles, refuseCodexCallerInput, codexLaunchNote, codexPaneObservation, CODEX_INTERRUPT_KEY, codexHelperProcess, codexRateLimitModelSwitchDialog, codexApprovalDialog, codexStartupAction, codexModelChoice, codexEffortChoice, codexMoreReasoningChoice, codexTranscriptText, createCodexAgentMetadata, codexModelChoices, codexFastCommandOffered, codexFooterShowsFast, codexServiceTierNotices, restoreCodexDefaults, restoreCodexDefaultInFile, } from "./harnesses/codex.js";
|
|
73
|
-
import { claudeAuthPlan, claudeAuthStatus, claudeAuthPane, claudeOauthTokenFile, claudeSetupTokenPlan, claudeOauthToken, claudeOauthTokenPresent, writeClaudeOauthToken, OPERATION_ID_RE, CLAUDE_RESULT_MAX_BYTES, CLAUDE_EFFORTS, agentClaudeOperationPath, agentClaudeApprovalReceiptPath, agentClaudeDispatchReceiptPath, validateOperationId, readClaudeResultText, claudeModelChoices, claudeConfigDir, claudeProjectSlug, claudeFastIndicatorShown, claudeFastResult, buildClaudeAgentCmd, claudeAgentArgv, claudeResumeArgv, claudeLaunchNote, claudePaneObservation, CLAUDE_INTERRUPT_KEY, claudeUsageLimit, claudeLiveSelectMenu, claudeStartupAction, createClaudeAgentMetadata, writeClaudeCallerFiles, claudeSessionTranscriptPath, claudeApiErrorFromLine, claudeApiErrorAfter, claudeLimitEnd, claudeInterruptedAfter, claudeLimitResetAt, claudeApiErrorEndingTurn, claudeFailureCategory, claudeOwnMcpNames, } from "./harnesses/claude.js";
|
|
73
|
+
import { claudeAuthPlan, claudeAuthStatus, claudeAuthPane, claudeOauthTokenFile, claudeSetupTokenPlan, claudeOauthToken, claudeOauthTokenPresent, writeClaudeOauthToken, OPERATION_ID_RE, CLAUDE_RESULT_MAX_BYTES, CLAUDE_EFFORTS, agentClaudeOperationPath, agentClaudeApprovalReceiptPath, agentClaudeDispatchReceiptPath, validateOperationId, readClaudeResultText, claudeModelChoices, claudeConfigDir, claudeProjectSlug, claudeFastIndicatorShown, claudeFastResult, buildClaudeAgentCmd, claudeAgentArgv, claudeResumeArgv, claudeLaunchNote, claudePaneObservation, CLAUDE_INTERRUPT_KEY, claudeUsageLimit, claudeLiveSelectMenu, claudeModelPicker, claudeStartupAction, createClaudeAgentMetadata, writeClaudeCallerFiles, claudeSessionTranscriptPath, claudeApiErrorFromLine, claudeApiErrorAfter, claudeLimitEnd, claudeInterruptedAfter, claudeLimitResetAt, claudeApiErrorEndingTurn, claudeFailureCategory, claudeOwnMcpNames, claudeModelSwitchResult, claudeModelSwitchConfirm, } from "./harnesses/claude.js";
|
|
74
74
|
import { cursorAuthPlan, cursorAuthStatus, cursorAuthPane, bindCursorTranscriptSession, cursorTurnBoundary, latestCursorCompletion, cursorTranscript, cursorTranscriptSessionId, observeCursorDone, cursorTranscriptText, assertCursorAuthenticationReady, assertCursorModelAvailable, cursorModelChoices, cursorModelIsFastVariant, cursorFastParameter, cursorHeaderShowsFast, cursorPickerView, cursorEffortSelected, cursorParameterRows, cursorUserConfigPath, CURSOR_DEFAULT_MODEL_KEYS, realCursorHome, buildCursorAgentCmd, cursorAgentArgv, cursorPromptWithLineage, cursorLineagePreface, writeCursorCallerFiles, checkCursorCallerInput, createCursorAgentMetadata, cursorLaunchNote, cursorEffortNavigation, cursorTuiReady, cursorPaneObservation, CURSOR_INTERRUPT_KEY, cursorPromptHooksRunning, cursorUsageLimit, CURSOR_SUBMIT_SEQUENCE, validateCursorModelEffort, } from "./harnesses/cursor.js";
|
|
75
75
|
import { interimFromNow, interimFromToken, readInterimWords, recordInterimBoundary } from "./interim-words.js";
|
|
76
76
|
import { codexSeatAwaitingRollout, codexSeatTurn, grokSteerAcceptance, observeSteerDone, readSteerEntry, recordSteer } from "./steer-follow.js";
|
|
@@ -5946,6 +5946,55 @@ async function switchAgentFast(name, meta, target, verified = false) {
|
|
|
5946
5946
|
recordAgentFast(meta, state);
|
|
5947
5947
|
return state;
|
|
5948
5948
|
}
|
|
5949
|
+
/**
|
|
5950
|
+
* opusplan is in Claude Code's /model picker only while the seat already runs it (2.1.325), so `/model opusplan` switches
|
|
5951
|
+
* first. Claude Code also saves it as the user's default; the root's `model` goes back to its value before, as for fast
|
|
5952
|
+
* (model-configuration.md). The picker step after this selects the now-shown row for this session only.
|
|
5953
|
+
*/
|
|
5954
|
+
async function switchClaudeOpusPlan(name, meta, beforeChange) {
|
|
5955
|
+
const settings = path.join(meta.claude_home ?? claudeConfigDir(), "settings.json");
|
|
5956
|
+
beforeChange();
|
|
5957
|
+
const ui = agentModelUi(name);
|
|
5958
|
+
const seen = await keepingUserDefaults(settings, (before) => { restoreJsonSetting(settings, before, "model"); }, async () => {
|
|
5959
|
+
await sendAgentPromptText(name, "/model opusplan");
|
|
5960
|
+
const deadline = performance.now() + CLAUDE_FAST_RESULT_TIMEOUT_MS;
|
|
5961
|
+
let answered = false;
|
|
5962
|
+
do {
|
|
5963
|
+
await sleep(150);
|
|
5964
|
+
const screen = ui.screen();
|
|
5965
|
+
const confirm = claudeModelSwitchConfirm(screen);
|
|
5966
|
+
// A seat with a cached conversation asks "Switch model?" first: answer Yes once, as the picker path does.
|
|
5967
|
+
if (confirm === "yes_selected" && !answered) {
|
|
5968
|
+
answered = true;
|
|
5969
|
+
ui.key("Enter");
|
|
5970
|
+
}
|
|
5971
|
+
if (confirm)
|
|
5972
|
+
continue;
|
|
5973
|
+
const result = claudeModelSwitchResult(screen);
|
|
5974
|
+
if (result)
|
|
5975
|
+
return result;
|
|
5976
|
+
} while (performance.now() < deadline);
|
|
5977
|
+
return null;
|
|
5978
|
+
});
|
|
5979
|
+
if (!seen) {
|
|
5980
|
+
// Close what is still open (the switch question, or a screen Aiterm cannot read) so the seat takes the next input.
|
|
5981
|
+
for (let i = 0; i < 3; i++) {
|
|
5982
|
+
const screen = ui.screen();
|
|
5983
|
+
if (!claudeModelSwitchConfirm(screen) && !claudeModelPicker(screen) && claudePaneObservation(screen).state !== "unknown")
|
|
5984
|
+
break;
|
|
5985
|
+
ui.key("Escape");
|
|
5986
|
+
await sleep(300);
|
|
5987
|
+
}
|
|
5988
|
+
const error = new AitermError(`CLAUDE_MODEL_SWITCH_UNCONFIRMED vendor=claude session=${name}\nClaude Codeへ /model opusplan を送りましたが、結果の行を確かめられません。modelは変わった可能性があります。再送しないでください。`, 2);
|
|
5989
|
+
error.configureRefusal = { code: "CLAUDE_MODEL_SWITCH_UNCONFIRMED", relaunch: false, selection_excluded: false };
|
|
5990
|
+
throw error;
|
|
5991
|
+
}
|
|
5992
|
+
const ready = await waitAgentTuiReady(name, meta, AGENT_TUI_READY_TIMEOUT_MS);
|
|
5993
|
+
if (seen.scope !== "saved_as_default" && seen.scope !== "session_only")
|
|
5994
|
+
throw new AitermError(`CLAUDE_MODEL_SWITCH_REFUSED vendor=claude session=${name}\nClaude Codeがmodelを切り替えませんでした(${seen.line})。`, 2);
|
|
5995
|
+
if (!ready.ready)
|
|
5996
|
+
throw new AitermError("Claudeのmodel変更完了を確認できません", 2);
|
|
5997
|
+
}
|
|
5949
5998
|
async function switchClaudeFast(name, meta, target, verified = false) {
|
|
5950
5999
|
// もう通常の速度なら何も打たない(/fast off は、もう off でも利用者の設定を書き直す)。
|
|
5951
6000
|
if (!target && meta.fast !== true && !claudeFastIndicatorShown(captureScreen(name, AGENT_TUI_READY_LINES)))
|
|
@@ -6776,6 +6825,8 @@ async function configureAgentInLock(name, model, effort, fast, beforeChange) {
|
|
|
6776
6825
|
if (effort && !level && effort !== "ultracode") {
|
|
6777
6826
|
throw new AitermError("Claude Code の reasoning_effort は low/medium/high/xhigh/max/ultracode のいずれかです。設定は変えていません。", 2);
|
|
6778
6827
|
}
|
|
6828
|
+
if (model?.toLowerCase() === "opusplan")
|
|
6829
|
+
await switchClaudeOpusPlan(name, meta, beforeChange);
|
|
6779
6830
|
if (model || level)
|
|
6780
6831
|
await configureClaudeForSessionOnly(name, meta, model, level, beforeChange, { ...agentModelUi(name), ready: () => waitAgentTuiReady(name, meta, AGENT_TUI_READY_TIMEOUT_MS) }, claudeSeatEnv() ?? process.env);
|
|
6781
6832
|
if (effort && !level) {
|
package/dist/harnesses/claude.js
CHANGED
|
@@ -215,6 +215,8 @@ async function claudeModelChoicesOnce(bin, cwd, env) {
|
|
|
215
215
|
const result = await runAgentProtocolCommand(bin, [
|
|
216
216
|
"-p", "--output-format", "stream-json", "--verbose", "--input-format", "stream-json",
|
|
217
217
|
"--no-session-persistence", "--strict-mcp-config", "--settings", settings,
|
|
218
|
+
// The list adds opusplan (Opus Plan Mode) only while the session runs it; the other rows stay the same (2.1.325).
|
|
219
|
+
"--model", "opusplan",
|
|
218
220
|
], {
|
|
219
221
|
cwd,
|
|
220
222
|
env,
|
|
@@ -600,19 +602,20 @@ export function claudePickerRowByName(rows, name) {
|
|
|
600
602
|
// Your next response will be slower and use more tokens
|
|
601
603
|
// ❯ 1. Yes, switch to Opus 5.5
|
|
602
604
|
// 2. No, go back
|
|
605
|
+
// `/model opusplan` (2.1.325) asks the same with "❯ 1. Yes, switch" and no model name (Z27 lab).
|
|
603
606
|
export function claudeModelSwitchConfirm(screen) {
|
|
604
607
|
const lines = screen.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "").split(/\r?\n/u);
|
|
605
608
|
const head = lastLineIndex(lines, /^\s*Switch model\?\s*$/u);
|
|
606
609
|
if (head < 0)
|
|
607
610
|
return null;
|
|
608
611
|
const body = lines.slice(head + 1);
|
|
609
|
-
if (!body.some((line) => /^\s*(?:❯\s*)?1\.\s*Yes, switch
|
|
612
|
+
if (!body.some((line) => /^\s*(?:❯\s*)?1\.\s*Yes, switch\b/u.test(line)))
|
|
610
613
|
return null;
|
|
611
|
-
return body.some((line) => /^\s*❯\s*1\.\s*Yes, switch
|
|
614
|
+
return body.some((line) => /^\s*❯\s*1\.\s*Yes, switch\b/u.test(line)) ? "yes_selected" : "other_selected";
|
|
612
615
|
}
|
|
613
616
|
export function claudeModelSwitchResult(screen) {
|
|
614
617
|
const lines = screen.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "").split(/\r?\n/u);
|
|
615
|
-
const command = lastLineIndex(lines, /^\s*❯\s*\/model
|
|
618
|
+
const command = lastLineIndex(lines, /^\s*❯\s*\/model(?:\s+\S+)?\s*$/u);
|
|
616
619
|
if (command < 0)
|
|
617
620
|
return null;
|
|
618
621
|
const start = lines.findIndex((line, i) => i > command && /^\s*⎿\s+\S/u.test(line));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aiterm-mcp",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.64",
|
|
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": [
|