aiterm-mcp 0.70.12 → 0.70.14

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,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.14] - 2026-11-11
11
+
12
+ - An antigravity-cli seat can start without a prompt while `append_system_prompt` is set, as a wake-first caller (BellTeam) launches every seat. Aiterm keeps the text with the seat and puts it, exactly once, in front of the first input sent to the seat before agy binds a conversation, the same rule Cursor uses for a promptless seat. A restart is a new launch and its own first input carries the text again. Before, such a launch was refused (`AGENT_LAUNCH_NOT_STARTED: append_system_prompt needs a prompt for antigravity-cli`), so a remote agy seat could never start.
13
+
14
+ ## [0.70.13] - 2026-11-10
15
+
16
+ - A terminal's seat MCP route (the R12 reverse forward) starts seconds after credential-load instead of at the next 60 s check. Every active Aiterm process now watches the credentials directory, and a newly written `<ref>.json` runs the forward check at once. After an execution restart, seats on keyless terminals were without BellTeam MCP for up to a minute after the key arrived. The 60 s check stays as the fallback.
17
+
10
18
  ## [0.70.12] - 2026-11-10
11
19
 
12
20
  - Terminal seats' MCP route back (the R12 reverse forward) comes back after an execution restart. When the keeper first ran before the terminal's credential was loaded, its shell probe refused at once with `CREDENTIAL_NOT_LOADED` and left the keeper marked as starting, so that process never held the forward again. Every seat on the terminal then reached a closed port (the binding still named it, so a launch was handed the dead port without a wait). The keeper now releases its lock on that refusal, and the next 60 s check after credential-load starts the forward on the same port.
@@ -3243,7 +3251,9 @@ prototype (preserved under `prototype/python/` as the porting source and referen
3243
3251
  `ubuntu-latest` for Node 18/20/22, publishing to npm on `v*` tags with
3244
3252
  provenance.
3245
3253
 
3246
- [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.12...HEAD
3254
+ [Unreleased]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.14...HEAD
3255
+ [0.70.14]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.13...v0.70.14
3256
+ [0.70.13]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.12...v0.70.13
3247
3257
  [0.70.12]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.11...v0.70.12
3248
3258
  [0.70.11]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.10...v0.70.11
3249
3259
  [0.70.10]: https://github.com/kitepon/aiterm-mcp/compare/v0.70.9...v0.70.10
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.12** · 動作対象は Linux · WSL2 · macOS · Windows ネイティブ · MIT · [変更履歴](CHANGELOG.md)。
218
+ **状態:** 開発継続中 · 現行公開版 **v0.70.14** · 動作対象は 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.12** · 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.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).
231
231
 
232
232
  ### Update and rollback
233
233
 
package/dist/core.js CHANGED
@@ -6998,6 +6998,17 @@ export async function dispatchAgentTurn(name, text, o = {}) {
6998
6998
  return withAgentResumeTarget(meta, () => dispatchAgentTurnInLock(name, text, o));
6999
6999
  });
7000
7000
  }
7001
+ /**
7002
+ * A seat launched without a prompt has no conversation yet at its first dispatch. Cursor gets Aiterm's launch context and the
7003
+ * caller text there, Antigravity the caller text (neither has an instruction channel); later dispatches go to the bound
7004
+ * conversation as plain text. A new launch (restart) starts unbound again, so its own first dispatch carries them.
7005
+ */
7006
+ export function firstDispatchText(meta, body) {
7007
+ if (meta.vendor_session_id)
7008
+ return body;
7009
+ return meta.kind === "cursor" ? `${cursorLineagePreface(meta)}\n\n${body}`
7010
+ : meta.kind === "antigravity" ? antigravityPromptWithCaller(meta, body) : body;
7011
+ }
7001
7012
  async function dispatchAgentTurnInLock(name, text, o, pendingSend) {
7002
7013
  const meta = loadAgentMetadata(name);
7003
7014
  const operationId = o.operation_id == null ? null : validateOperationId(o.operation_id);
@@ -7077,13 +7088,9 @@ async function dispatchAgentTurnInLock(name, text, o, pendingSend) {
7077
7088
  if (grokRestoredPromptCleared)
7078
7089
  paneInputRecovery.push("grok_unaccepted_prompt_cleared");
7079
7090
  const startOffset = agentCompletionCursor(meta);
7080
- // promptなしで起動したCursorは、最初のdispatch時点ではtranscriptとの相関markerをまだ持たない。
7081
- // その1回だけlaunch contextを加え、以後はbind済みconversationへ通常textだけを送る。
7082
7091
  // 画面の確かめを飛ばす送信(force)と、加工なしの送信(raw)には、既定の前置きを打たない(打った文は入力欄がそのまま読む)。
7083
7092
  const prefaced = splitAgentPreface(meta.kind, o.preface, text, { defaultForWrapped: !o.force && !o.raw });
7084
- const dispatchText = meta.kind === "cursor" && !meta.vendor_session_id
7085
- ? `${cursorLineagePreface(meta)}\n\n${prefaced.body}`
7086
- : prefaced.body;
7093
+ const dispatchText = firstDispatchText(meta, prefaced.body);
7087
7094
  prepareSendText(dispatchText, { raw: o.raw });
7088
7095
  const inputId = meta.kind === "claude" ? randomBytes(16).toString("hex") : undefined;
7089
7096
  await o.before_send?.({ session_id: name, launch_id: meta.launch_id, vendor: meta.kind,
@@ -8060,9 +8067,6 @@ function refuseCallerInput(kind, opts) {
8060
8067
  return;
8061
8068
  try {
8062
8069
  const servers = (kind === "grok" ? checkGrokCallerInput : kind === "cursor" ? checkCursorCallerInput : checkAntigravityCallerInput)(opts.append_system_prompt, opts.mcp_config);
8063
- // Cursor puts the text in the seat's first dispatch whatever it is; agy's only channel is the launch prompt itself.
8064
- if (kind === "antigravity" && opts.append_system_prompt != null && opts.prompt == null && opts.throughline_source_session == null)
8065
- throw new AitermError("append_system_prompt needs a prompt for antigravity-cli (agy has no instruction channel; the text prefixes the first prompt)", 2);
8066
8070
  const envVars = opts.env_vars ?? [];
8067
8071
  assertCallerEnv(kind.toUpperCase(), servers, name => envVars.includes(name) ? launchEnvValue(name) : undefined, true);
8068
8072
  }
package/dist/index.js CHANGED
@@ -1543,7 +1543,7 @@ export function createAitermServer(options = {}) {
1543
1543
  launch_operation_id: z.string().regex(/^sha256:[0-9a-f]{64}$/).optional().describe("Claude Codeのpromptなしexact replay相関だけで使用"),
1544
1544
  remote: remoteInputField,
1545
1545
  terminal: terminalArgumentSchema.optional().describe(terminalArgumentDescription),
1546
- 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 (Antigravity needs a prompt; at most 64 KiB)"),
1546
+ 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)"),
1547
1547
  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)"),
1548
1548
  fork_from: z.object({
1549
1549
  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)"),
@@ -801,6 +801,7 @@ export function extractMcpHeaders(config) {
801
801
  const FORWARD_RESTART_MS = 15_000, FORWARD_REFUSALS_BEFORE_NEW_PORT = 4, LAUNCH_GRACE_MS = 120_000;
802
802
  const keepers = new Map();
803
803
  let maintainTimer = null;
804
+ let credentialWatch = null;
804
805
  function writeBinding(ref, change) {
805
806
  const bindings = readStore().map(item => item.ref === ref ? { ...item, ...change } : item);
806
807
  writeJson0600(storePath(), { schema: "aiterm.remote-bindings.v1", bindings });
@@ -947,6 +948,17 @@ export function maintainSeatForwards() {
947
948
  maintainTimer = setInterval(maintainSeatForwards, 60_000);
948
949
  maintainTimer.unref();
949
950
  }
951
+ // credential-load is a one-shot in another process: start the forward when its <ref>.json lands, not at the next 60 s check.
952
+ if (!credentialWatch)
953
+ try {
954
+ credentialWatch = fs.watch(credentialDir(), (_event, name) => { if (!name || String(name).endsWith(".json"))
955
+ maintainSeatForwards(); });
956
+ credentialWatch.on("error", () => { credentialWatch?.close(); credentialWatch = null; });
957
+ credentialWatch.unref();
958
+ }
959
+ catch {
960
+ credentialWatch = null; /* the 60 s check still covers it */
961
+ }
950
962
  }
951
963
  /** The terminal-local port for seat URLs reaching container port `ingress`; starts the keeper if no process holds it yet. */
952
964
  export async function ensureSeatForward(ref, ingress, timeoutMs = 30_000) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-mcp",
3
- "version": "0.70.12",
3
+ "version": "0.70.14",
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": [