aiterm-mcp 0.70.55 → 0.70.57

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,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.70.57] - 2026-11-14
11
+
12
+ - Withdrawn at the requester's ask (Kiro 2026-11-14): the `refusal` field of `aiterm.agent-configure-request-result.v1` and the `AGENT_CONFIGURE_NOT_READY` code added in 0.70.56. A not-ready (turn running) configure refusal again carries no `_meta["aiterm/configure_error"]`; only Claude picker refusals do, which is how a caller tells them apart.
13
+ - Diagrams: startup screen states S0-S6 of `prepareAgentInput` (launch-identity-input.md / .dot) and the Claude alias rule (model-configuration.md / .dot).
14
+
15
+ ## [0.70.56] - 2026-11-14
16
+
17
+ - Claude `agent_configure` with an alias (`fable`, `opus`) selects the family's newest row on both picker layouts when the seat's catalog names the alias without a version (`Fable`). It refused on versioned rows (`Fable 5.2`) with `CLAUDE_MODEL_NOT_IN_PICKER` (Kiro 2026-11-14). An alias the catalog names with a version still means that version only.
18
+ - `aiterm.agent-configure-request-result.v1` gains `refusal: {code, kind} | null` for `not_applied` (`turn_running` / `not_offered` / `other`), so a caller can retry a turn refusal at the next boundary and surface a picker refusal. The not-ready refusal now has the code `AGENT_CONFIGURE_NOT_READY` (configure_error `_meta` too).
19
+
20
+ - A launch no longer refuses the moment a startup screen it already answered is still on screen: the frame right after the key can be the old one. It waits that screen out like an unanswered one, and answers Antigravity's `esc to dismiss` notice again (at most once a second) while it stays (Kiro rabbit-linux: agy's notice on its first start after a self-update, one Escape, `AGENT_STARTUP_BLOCKED reason=vendor_notice` 0.84 s later).
21
+
22
+ - Antigravity seats get `append_system_prompt` as an always-on rule (`.agents/rules/aiterm.md` with `trigger: always_on`) in the seat's own `--add-dir` folder, so it is in every turn from the start. The first prompt, or a promptless seat's first input, is sent as given (lab: agy 1.5.8 loads that rule; without the frontmatter it skips the file).
23
+
24
+ - Antigravity's Linux exec shape is captured (1.5.8, container): `bash -c <cmd>` as a session leader on its own pty, counted by the existing session-leader rule since 0.70.47. Fixture and ADR 0141 table only; no runtime change.
25
+
10
26
  ## [0.70.55] - 2026-11-13
11
27
 
12
28
  - Antigravity seats whose turn is over while a background task runs read idle in seat-turns, so the seat's reason is the background task, not the turn (a68, Centi train W). A spinner over `esc to cancel` still reads a running turn.
@@ -3458,7 +3474,9 @@ prototype (preserved under `prototype/python/` as the porting source and referen
3458
3474
  `ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
3459
3475
  provenance.
3460
3476
 
3461
- [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.55...HEAD
3477
+ [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.57...HEAD
3478
+ [0.70.57]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.56...v0.70.57
3479
+ [0.70.56]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.55...v0.70.56
3462
3480
  [0.70.55]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.54...v0.70.55
3463
3481
  [0.70.54]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.53...v0.70.54
3464
3482
  [0.70.53]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.52...v0.70.53
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.55** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
218
+ **状態:** 開発継続中 · 現行公開版 **v0.70.57** · 動作対象は 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.55** · 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.70.57** · 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
 
@@ -7,7 +7,7 @@ import { OPERATION_ID_RE, agentManagedClaudeSettingsPath, agentClaudeResultPath,
7
7
  import { agentCodexCallerPromptPath, agentCodexCallerMcpPath } from "./harnesses/codex.js";
8
8
  import { resolveAndValidateGrokAuth, agentGrokCallerPromptPath, agentGrokCallerAgentPath } from "./harnesses/grok.js";
9
9
  import { agentCursorCallerPromptPath, agentCursorCallerPluginDir } from "./harnesses/cursor.js";
10
- import { agentAntigravityCallerPromptPath, agentAntigravityCallerDir } from "./harnesses/antigravity.js";
10
+ import { agentAntigravityCallerDir } from "./harnesses/antigravity.js";
11
11
  import { assertSessionName, agentsDir, readAgentGeneration, selectAgentMetadataFile, agentEventPath, agentLineageFields, LAUNCH_ID_RE, AGENT_LINEAGE_RE } from "./agent-shared.js";
12
12
  const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
13
13
  function normalizeInitialPromptState(v) {
@@ -136,7 +136,6 @@ export function loadAgentMetadata(name) {
136
136
  vendor_session_id: m.vendor_session_id ?? null, initial_prompt: normalizeInitialPromptState(m.initial_prompt),
137
137
  hook_route: "shared_antigravity_home", antigravity_home: m.antigravity_home, node_platform: process.platform,
138
138
  ...(typeof m.write_scope === "string" ? { write_scope: m.write_scope } : {}),
139
- ...(m.antigravity_caller_prompt_file === agentAntigravityCallerPromptPath(name) ? { antigravity_caller_prompt_file: m.antigravity_caller_prompt_file } : {}),
140
139
  ...(m.antigravity_caller_mcp_dir === agentAntigravityCallerDir(name) ? { antigravity_caller_mcp_dir: m.antigravity_caller_mcp_dir } : {}),
141
140
  ...deliveryFields, ...executableFields, ...fastFields, ...startupFields, ...loadAgentLineageFields(m, true) };
142
141
  }
package/dist/core.js CHANGED
@@ -50,7 +50,7 @@ import { withExecutionInterruptEffectScope, bindExecutionNativeTarget, beforeExe
50
50
  import { ExecutionError } from "./execution-wire.js";
51
51
  import { readExecutionParentProcess } from "./execution-parent-process.js";
52
52
  import { isCursorMcpClient } from "aiterm-steer-delivery";
53
- import { antigravityBinding, antigravityAuthChoiceKey, antigravityCurrentModel, antigravityStartupAction, antigravityAgentArgv, writeAntigravityCallerFiles, checkAntigravityCallerInput, antigravityPromptWithCaller, antigravityQuotaLimit, antigravityModelChoices, antigravityAuthStatus, antigravityAuthPane, antigravityTranscriptText, bindAntigravitySession, createAntigravityAgentMetadata, mergeAntigravityHooks } from "./harnesses/antigravity.js";
53
+ import { antigravityBinding, antigravityAuthChoiceKey, antigravityCurrentModel, antigravityStartupAction, antigravityAgentArgv, writeAntigravityCallerFiles, checkAntigravityCallerInput, antigravityQuotaLimit, antigravityModelChoices, antigravityAuthStatus, antigravityAuthPane, antigravityTranscriptText, bindAntigravitySession, createAntigravityAgentMetadata, mergeAntigravityHooks } from "./harnesses/antigravity.js";
54
54
  import { paneTokenHint } from "./harnesses/pane-tokens.js";
55
55
  import { pendingChildResultsFor } from "./parent-delivery-owners.js";
56
56
  import { readLinuxProcessRegistrationIdentity, readClaudeRegistrationIdentity, readProcessEnvironment, readRuntimeProcesses, readRuntimeProcessesShared, readProcessIdentities, processSubtree, parentProcess, processIdentity, signalRuntimeProcess, backgroundProcesses, processElapsedSeconds } from "./process-runtime.js";
@@ -180,7 +180,8 @@ const AGENT_EXEC_SHELLS = {
180
180
  // shortcut: a command run with the write-to-stdin tool also gets stdin and is not counted; read the script if that matters.
181
181
  cursor: command => /builtin eval "\$1"(?: 3<&- 4>&-)? < \/dev\/null/.test(command)
182
182
  || /-NonInteractive -File \S*ps-script-[0-9a-f-]+\.ps1/i.test(command),
183
- // POSIX: no shell marker; agy runs each command in its own pty session (session-leader rule in ownExecProcesses).
183
+ // POSIX: no shell marker (`bash -c <cmd>` on Linux, `zsh -c <cmd>` or the bare command on macOS, like its `sh -c` hooks);
184
+ // agy runs each command in its own pty session (session-leader rule in ownExecProcesses).
184
185
  // Windows: pwsh -Command starting with its UTF-8 $OutputEncoding line; hooks are cmd /c "pwsh … -EncodedCommand".
185
186
  antigravity: command => command.includes(" -Command \"try { $OutputEncoding = [System.Text.UTF8Encoding]::new($false);"),
186
187
  };
@@ -4969,6 +4970,8 @@ function setInitialDelivery(meta, value, cursor) {
4969
4970
  writeAgentMetadata(meta);
4970
4971
  }
4971
4972
  const STARTUP_SELECTION_POLL_MS = 100;
4973
+ // agy's dismissible startup notice is answered again (Escape) at most this often while it stays on screen.
4974
+ const AGENT_STARTUP_NOTICE_RESEND_MS = 1_000;
4972
4975
  const STARTUP_SELECTION_MAX_SAMPLES = 30;
4973
4976
  /** 起動時の確認画面で、選択中(❯)の行が目的の選択肢へ移ったことを確かめる。 */
4974
4977
  async function waitStartupSelection(name, selected) {
@@ -4989,12 +4992,17 @@ async function prepareAgentInput(name, meta, options, acceptRunningCodex = false
4989
4992
  const budget = options.ready_timeout ?? AGENT_TUI_READY_TIMEOUT_MS, deadline = performance.now() + budget;
4990
4993
  const wait = (ms = budget) => waitAgentTuiReady(name, meta, ms, { selectSteer: running });
4991
4994
  let ready = await wait();
4992
- const handled = new Set();
4995
+ const answeredAt = new Map();
4993
4996
  while (!ready.ready && !ready.steer) {
4994
- const action = meta.kind === "codex" ? codexStartupAction(ready.lastScreen, options.trust_project === true)
4997
+ const found = meta.kind === "codex" ? codexStartupAction(ready.lastScreen, options.trust_project === true)
4995
4998
  : meta.kind === "claude" ? claudeStartupAction(ready.lastScreen, options.trust_project === true)
4996
4999
  : meta.kind === "grok" ? grokStartupAction(ready.lastScreen, options.trust_project === true)
4997
5000
  : meta.kind === "antigravity" ? antigravityStartupAction(ready.lastScreen, options.trust_project === true, meta.cwd) : null;
5001
+ // A screen already answered is waited out like an unanswered one: the sample right after the key can still be the old
5002
+ // frame (Kiro rabbit-linux: agy's notice, one Escape, refused 0.84 s later). agy's notice is answered again while it stays.
5003
+ const last = found ? answeredAt.get(found.kind) : undefined;
5004
+ const action = found && (last === undefined
5005
+ || (found.kind === "antigravity_notice" && performance.now() - last >= AGENT_STARTUP_NOTICE_RESEND_MS)) ? found : null;
4998
5006
  // A screen Aiterm does not answer can leave by itself: agy drew its login screen for 3 s right after a login, then went on
4999
5007
  // (Centi train W F2). Look until the ready budget ends; only a screen that stays refuses. Claude's first-run steps never
5000
5008
  // leave without the account owner, so they refuse at once.
@@ -5005,9 +5013,9 @@ async function prepareAgentInput(name, meta, options, acceptRunningCodex = false
5005
5013
  ready = await wait(Math.max(1, deadline - performance.now()));
5006
5014
  continue;
5007
5015
  }
5008
- if (!action || handled.has(action.kind))
5016
+ if (!action)
5009
5017
  break;
5010
- handled.add(action.kind);
5018
+ answeredAt.set(action.kind, performance.now());
5011
5019
  const keys = action.selected ? action.keys.slice(0, -1) : action.keys;
5012
5020
  for (const key of keys) {
5013
5021
  await withExecutionNativeAdmission(name, () => sendKey(name, key, { preserveAgentOperation: true }));
@@ -5063,7 +5071,7 @@ async function sendInitialAgentPromptInLock(name, text, o) {
5063
5071
  startupBlockedHint(startup.reason), 2), { startupBlocked: startup.reason });
5064
5072
  }
5065
5073
  await o.after_ready?.(name, meta);
5066
- const promptText = meta.kind === "cursor" ? cursorPromptWithLineage(meta, text) : meta.kind === "antigravity" ? antigravityPromptWithCaller(meta, text) : text;
5074
+ const promptText = meta.kind === "cursor" ? cursorPromptWithLineage(meta, text) : text;
5067
5075
  const startOffset = agentCompletionCursor(meta);
5068
5076
  const inputId = meta.kind === "claude" ? randomBytes(16).toString("hex") : undefined;
5069
5077
  try {
@@ -7540,14 +7548,13 @@ export async function dispatchAgentTurn(name, text, o = {}) {
7540
7548
  }
7541
7549
  /**
7542
7550
  * A seat launched without a prompt has no conversation yet at its first dispatch. Cursor gets Aiterm's launch context and the
7543
- * caller text there, Antigravity the caller text (neither has an instruction channel); later dispatches go to the bound
7544
- * conversation as plain text. A new launch (restart) starts unbound again, so its own first dispatch carries them.
7551
+ * caller text there (it has no instruction channel); later dispatches go to the bound conversation as plain text. A new launch
7552
+ * (restart) starts unbound again, so its own first dispatch carries them. Antigravity has its caller text as a rule instead.
7545
7553
  */
7546
7554
  export function firstDispatchText(meta, body) {
7547
7555
  if (meta.vendor_session_id)
7548
7556
  return body;
7549
- return meta.kind === "cursor" ? `${cursorLineagePreface(meta)}\n\n${body}`
7550
- : meta.kind === "antigravity" ? antigravityPromptWithCaller(meta, body) : body;
7557
+ return meta.kind === "cursor" ? `${cursorLineagePreface(meta)}\n\n${body}` : body;
7551
7558
  }
7552
7559
  async function dispatchAgentTurnInLock(name, text, o, pendingSend) {
7553
7560
  const meta = loadAgentMetadata(name);
@@ -11,7 +11,7 @@ import { spawnAgentControlCommand } from "../agent-resolver.js";
11
11
  import { liveNodeExecutable } from "../live-node.js";
12
12
  import { powershellInvocation } from "../windows-powershell.js";
13
13
  import { agentEventPath, agentLineageFields, agentsDir, assertSessionName, createEmpty0600, writeText0600, readFileRange, safeStatSize, shq, writeAgentMetadata, writeJson0600 } from "../agent-shared.js";
14
- import { assertCallerEnv, checkCallerInput, readCallerText, resolveCallerHeader, writeCallerJson } from "./caller-mcp.js";
14
+ import { assertCallerEnv, checkCallerInput, resolveCallerHeader, writeCallerJson } from "./caller-mcp.js";
15
15
  import { authUrl } from "../agent-auth.js";
16
16
  // agy 1.4.10 exposes effort-specific IDs; overriding an ID's effort is rejected by the CLI.
17
17
  export function antigravityCatalog(stdout, selected) {
@@ -203,13 +203,9 @@ export function createAntigravityAgentMetadata(name, cwd, initial, writeScope, l
203
203
  writeAgentMetadata(meta);
204
204
  return meta;
205
205
  }
206
- // ---- Caller launch fields (launch-identity-input.md "Caller launch fields"). agy has no per-run instruction channel Aiterm could
207
- // prove (the .agents/rules route was not confirmed), so the text prefixes the first prompt; the servers are .agents/mcp_config.json
208
- // in a per-seat folder passed as --add-dir. Both live in Aiterm state (0600 files), never in ~/.gemini or the project.
209
- export function agentAntigravityCallerPromptPath(name) {
210
- assertSessionName(name);
211
- return path.join(agentsDir(), `${name}.antigravity-caller-prompt.md`);
212
- }
206
+ // ---- Caller launch fields (launch-identity-input.md "Caller launch fields"). A per-seat folder passed as --add-dir holds the
207
+ // servers (.agents/mcp_config.json) and the text as an always-on rule (.agents/rules/aiterm.md; agy skips a rule without the
208
+ // trigger frontmatter). Both live in Aiterm state (0600 files), never in ~/.gemini or the project.
213
209
  export function agentAntigravityCallerDir(name) {
214
210
  assertSessionName(name);
215
211
  return path.join(agentsDir(), `${name}.antigravity-caller`);
@@ -227,16 +223,17 @@ export function checkAntigravityCallerInput(prompt, mcp) {
227
223
  export function writeAntigravityCallerFiles(meta, prompt, mcp, valueOf) {
228
224
  const servers = checkAntigravityCallerInput(prompt, mcp);
229
225
  assertCallerEnv("ANTIGRAVITY", servers, valueOf);
226
+ if (prompt === null && mcp === null)
227
+ return;
228
+ const dir = agentAntigravityCallerDir(meta.aiterm_session);
230
229
  if (prompt !== null) {
231
- const file = agentAntigravityCallerPromptPath(meta.aiterm_session);
232
- writeText0600(file, prompt);
233
- meta.antigravity_caller_prompt_file = file;
230
+ const rule = path.join(dir, ".agents", "rules", "aiterm.md");
231
+ fs.mkdirSync(path.dirname(rule), { recursive: true, mode: 0o700 });
232
+ writeText0600(rule, `---\ntrigger: always_on\n---\n\n${prompt}`);
234
233
  }
235
- if (mcp !== null) {
236
- const dir = agentAntigravityCallerDir(meta.aiterm_session);
234
+ if (mcp !== null)
237
235
  writeCallerJson(path.join(dir, ".agents", "mcp_config.json"), antigravityCallerMcpJson(servers, valueOf));
238
- meta.antigravity_caller_mcp_dir = dir;
239
- }
236
+ meta.antigravity_caller_mcp_dir = dir;
240
237
  }
241
238
  /**
242
239
  * The limit line of a quota-stopped turn, from agy's Stop `error` (agy 1.5.5:
@@ -246,11 +243,6 @@ export function antigravityQuotaLimit(error) {
246
243
  const m = error ? /\bRESOURCE_EXHAUSTED\b[^:]*:\s*([\s\S]+)|\(code 429\):\s*([\s\S]+)/.exec(error) : null;
247
244
  return m ? (m[1] ?? m[2]).trim() : null;
248
245
  }
249
- /** The first prompt with the caller's text in front (the seat's only instruction channel here). */
250
- export function antigravityPromptWithCaller(meta, prompt) {
251
- const caller = readCallerText(meta.antigravity_caller_prompt_file);
252
- return caller === null ? prompt : `${caller}\n\n${prompt}`;
253
- }
254
246
  export function antigravityAgentArgv(bin, model, effort, prompt, meta) {
255
247
  // The seat folder and the cwd are trusted by --settings, or agy asks and then writes settings.json in ~/.gemini.
256
248
  const folder = meta?.antigravity_caller_mcp_dir;
@@ -92,7 +92,8 @@ export async function configureClaudeForSessionOnly(name, meta, model, effort, b
92
92
  const rows = [...known.values()].sort((a, b) => a.index - b.index);
93
93
  let target = claudeModelPickerRow(rows, model);
94
94
  let offered = false; // native catalogにある(起こし直せば使える見込み)
95
- if (!target || /^[a-z]+$/iu.test(model)) {
95
+ const alias = /^[a-z]+$/iu.test(model) && model.toLowerCase() !== "default";
96
+ if (!target || alias) {
96
97
  const bin = meta.agent_executable ?? resolveAgentBin("claude");
97
98
  if (!bin)
98
99
  return refuse("CLAUDE_MODEL_CATALOG_UNAVAILABLE", "Claude CodeのCLIが見つかりません");
@@ -104,11 +105,13 @@ export async function configureClaudeForSessionOnly(name, meta, model, effort, b
104
105
  return refuse("CLAUDE_MODEL_CATALOG_UNAVAILABLE", error instanceof Error ? error.message : String(error));
105
106
  }
106
107
  const native = catalog.models.find(item => item.id.toLowerCase() === model.toLowerCase());
107
- // The native alias can resolve to an older model; picker order and the picker's alias rows are not alias authority.
108
108
  const label = native?.display_name ?? native?.id ?? model;
109
109
  const shown = claudeModelDisplayName(model);
110
110
  offered = !!native || catalog.models.some(item => item.display_name?.toLowerCase() === shown);
111
- target = claudePickerRowByName(rows, label);
111
+ // An alias the CLI resolves to a named version means that version, even an older one; an alias it names without a
112
+ // version (`Fable`, both picker layouts; Kiro 2026-11-14) or not at all keeps the family's newest row.
113
+ if (!target || (alias && /\d/u.test(label)))
114
+ target = claudePickerRowByName(rows, label);
112
115
  }
113
116
  if (!target) {
114
117
  const names = rows.map((row) => row.resolved && row.resolved !== row.label && !/^default\b/iu.test(row.label)
@@ -561,15 +561,23 @@ export function claudeModelPicker(screen) {
561
561
  }
562
562
  /**
563
563
  * 指定されたmodel(catalogのID・別名・表示名)が、選ぶ画面のどの行かを決める。
564
- * `claude-opus-5-5` は「Opus 5.5」、別名の `opus` はその系統で番号が一番若い行(catalogの並びで最新)。
564
+ * `claude-opus-5-5` は「Opus 5.5」の行だけ。別名の `opus` は、その系統の行のうち版が一番新しい行(版は1列目か、別名の行の
565
+ * 2列目から読む。版つきの画面 `Opus 5.5` でも別名の画面 `Opus` → `Opus 5.5` でも同じ。同じ版なら上の行、版の読めない行は最後)。
565
566
  */
566
567
  export function claudeModelPickerRow(rows, model) {
567
568
  const want = model.trim().toLowerCase();
568
569
  const sorted = [...rows].sort((a, b) => a.index - b.index);
569
- return claudePickerRowByName(sorted, claudeModelDisplayName(want))
570
- ?? (want === "default" ? sorted.find((row) => /^default\b/iu.test(row.label)) : undefined)
571
- ?? (/^[a-z]+$/u.test(want) ? sorted.find((row) => row.label.toLowerCase().startsWith(`${want} `) && /^\S+ \d/u.test(row.label)) : undefined)
572
- ?? null;
570
+ if (want === "default")
571
+ return sorted.find((row) => /^default\b/iu.test(row.label)) ?? null;
572
+ if (!/^[a-z]+$/u.test(want))
573
+ return claudePickerRowByName(sorted, claudeModelDisplayName(want));
574
+ const names = (row) => [row.label, row.resolved].map((name) => name?.toLowerCase() ?? "");
575
+ const version = (row) => names(row).map((name) => /^\S+ (\d+(?:\.\d+)?)/u.exec(name)?.[1])
576
+ .find((v) => v !== undefined)?.split(".").map(Number) ?? [-1];
577
+ const newer = (a, b) => (a[0] - b[0]) || ((a[1] ?? 0) - (b[1] ?? 0));
578
+ return sorted.filter((row) => !/^default\b/iu.test(row.label)
579
+ && names(row).some((name) => name === want || name.startsWith(`${want} `)))
580
+ .reduce((best, row) => !best || newer(version(row), version(best)) > 0 ? row : best, null);
573
581
  }
574
582
  /** `claude-fable-5-2` → `fable 5.2`。IDの形でなければ小文字にしただけの物。 */
575
583
  export function claudeModelDisplayName(model) {
package/dist/index.js CHANGED
@@ -1634,7 +1634,7 @@ export function createAitermServer(options = {}) {
1634
1634
  launch_operation_id: z.string().regex(/^sha256:[0-9a-f]{64}$/).optional().describe("Claude Codeのpromptなしexact replay相関だけで使用"),
1635
1635
  remote: remoteInputField,
1636
1636
  terminal: terminalArgumentSchema.optional().describe(terminalArgumentDescription),
1637
- append_system_prompt: z.string().min(1).optional().describe("Launch instructions added to the system prompt; kept in Aiterm state, not in the project or home. Never put secrets here. Codex: appended to developer_instructions after Aiterm's marker; Grok: appended to --rules; at most 64 KiB for both. Cursor and Antigravity have no system-prompt channel: the text goes in front of the first prompt, or of the first input sent to a promptless seat (at most 64 KiB)"),
1637
+ append_system_prompt: z.string().min(1).optional().describe("Launch instructions added to the system prompt; kept in Aiterm state, not in the project or home. Never put secrets here. Codex: appended to developer_instructions after Aiterm's marker; Grok: appended to --rules; Antigravity: an always-on rule in the seat's own --add-dir folder; at most 64 KiB for these. Cursor has no system-prompt channel: the text goes in front of the first prompt, or of the first input sent to a promptless seat (at most 64 KiB)"),
1638
1638
  mcp_config: z.object({ mcpServers: z.record(z.string(), z.unknown()) }).strict().optional().describe("Extra MCP servers for this seat. Secret header values: write ${NAME} and list NAME in env_vars. Codex, Grok, Cursor and Antigravity take only http servers {type?: \"http\", url, headers}: a literal header, 'Authorization: Bearer ${NAME}' or a header whose whole value is ${NAME}; other shapes, and a ${NAME} with no value at launch, are refused before the seat starts. Cursor runs a server as plugin-aiterm-caller-<name> beside a same-name user server; Codex, Grok and Antigravity replace a same-name user server for this seat (Codex: a user stdio server of that name runs Aiterm's relay to the given url instead)"),
1639
1639
  fork_from: z.object({
1640
1640
  session_id: z.string().regex(/^[A-Za-z0-9_-]{1,64}$/).describe("The main Aiterm seat on the same machine (the terminal or remote when given)"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.70.55",
3
+ "version": "0.70.57",
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": [