mergestorm-mcp 0.2.8 → 0.2.9

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -7
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -221,7 +221,7 @@ function stackWaitSummary(envelope) {
221
221
  return withWatchText(envelopeWatch(envelope), `${stackWaitStatusLine(envelope)}${repairSummary(envelope.repair)}`);
222
222
  }
223
223
  function stackWaitStatusLine(envelope) {
224
- const base = `Stack ${envelope.stackId} \xB7 ${envelope.status}${stackBlockersSummary(envelope.blocker && envelope.prNumber != null ? { prNumber: envelope.prNumber, blocker: envelope.blocker } : null, envelope.issues, envelope.busy, envelope.landGatePending, envelope.actAfter ?? null)}${envelope.assessment === "unavailable" ? " \xB7 assessment unavailable" : ""}`;
224
+ const base = `Stack ${envelope.stackId} \xB7 ${envelope.status}${stackBlockersSummary(envelope.blocker && envelope.prNumber != null ? { prNumber: envelope.prNumber, blocker: envelope.blocker } : null, envelope.issues, envelope.busy, envelope.landGatePending, envelope.actAfter ?? null, envelope.queueWait ?? null)}${envelope.assessment === "unavailable" ? " \xB7 assessment unavailable" : ""}`;
225
225
  if (envelopeWatch(envelope).done || envelope.status !== "waiting" && envelope.status !== "in_progress") return base;
226
226
  const selectors = [
227
227
  `stack_id ${JSON.stringify(envelope.cursor.stackId)}`,
@@ -962,8 +962,8 @@ function stackSummary(stack, entries = []) {
962
962
  if (stack.cycloneOwnerMatch) {
963
963
  overrides.push(`cyclone-owner ${stack.cycloneOwnerMatch}`);
964
964
  }
965
- const { attention, held, issues, busy, landGatePending } = stackBlockers(stack, entries);
966
- return `${stack.owner}/${stack.repo} \xB7 ${layerLabel} \xB7 ${currentState} \xB7 auto-land ${stack.autoEnqueueWhenReady ? "on" : "off"}${overrides.map((label) => ` \xB7 ${label}`).join("")}${stackBlockersSummary2(attention ?? held, issues, busy, landGatePending, held?.actAfter ?? null)}`;
965
+ const { attention, held, issues, busy, landGatePending, queueWait } = stackBlockers(stack, entries);
966
+ return `${stack.owner}/${stack.repo} \xB7 ${layerLabel} \xB7 ${currentState} \xB7 auto-land ${stack.autoEnqueueWhenReady ? "on" : "off"}${overrides.map((label) => ` \xB7 ${label}`).join("")}${stackBlockersSummary2(attention ?? held, issues, busy, landGatePending, held?.actAfter ?? null, queueWait)}`;
967
967
  }
968
968
 
969
969
  // src/tools/stack-list.ts
@@ -1022,7 +1022,7 @@ async function stackStatus(stackId, cfg) {
1022
1022
  };
1023
1023
  }
1024
1024
  const entries = await listMergeQueueEntries2(cfg, { stackId: stack.id });
1025
- const { attention, held, issues, currentCandidate, busy, agents, repair, landGatePending } = stackBlockers2(stack, entries);
1025
+ const { attention, held, issues, currentCandidate, busy, agents, repair, landGatePending, queueWait } = stackBlockers2(stack, entries);
1026
1026
  const watch = stackWatchObligation5({
1027
1027
  stackId: stack.id,
1028
1028
  terminal: stackTerminalReason(stack),
@@ -1032,7 +1032,7 @@ async function stackStatus(stackId, cfg) {
1032
1032
  });
1033
1033
  return {
1034
1034
  summary: withWatchText(watch, `${stackSummary(stack, entries)}${repairSummary(repair)}`),
1035
- data: { stack, attention, held, issues, currentCandidate, busy, agents, repair, landGatePending, watch }
1035
+ data: { stack, attention, held, issues, currentCandidate, busy, agents, repair, landGatePending, queueWait, watch }
1036
1036
  };
1037
1037
  } catch (err) {
1038
1038
  if (isCommandErrorCode5(err, "rate_limited")) {
@@ -1142,14 +1142,16 @@ var MCP_STACK_WATCH_INSTRUCTIONS = [
1142
1142
  '- While stack autoLandOff reads reason bounced, the watch returns attention: blocker "Auto land off after <kind> bounce", the bounce in issues[], repair kind auto_land_off.',
1143
1143
  '- A stack whose review unit was abandoned (a human moved its bottom PR off mg-stack-N) returns attention: blocker "Review unit abandoned: based on <base>", repair kind unit_abandoned. Do not patch or retarget; ask the human whether to re-root it. If at least two PRs remain open, tell them that mg stack adopt owner/repo#<bottom PR> re-roots it on a new review unit. With only one open PR, re-adopting will not create a review unit, so tell them to close and resubmit it to create a fresh stack.',
1144
1144
  '- Auto land records why it is waiting (stack autoLandWait: reason, prNumber, headSha, since). The watch returns attention on that PR when the wait cannot clear on its own: a failing check Auto land reads live on GitHub, even while the ledger shows CI green (blocker "CI failed \u2014 Auto land reads a failing check on GitHub at this head", repair kind ci_failure); a check pending for 45 minutes (repair kind ci_pending); no approving Vortex review for 30 minutes with no Vortex run working (repair kind vortex_not_green); and a promote GitHub refused 3 times with merge_failed, after which Auto land stops retrying that head (repair kind promote_failed). A more specific blocker on that PR is named first. A new head clears the wait.',
1145
+ `- While the stack has a live merge queue entry, stack_wait carries queueWait (the entry's wait reason, how long it has been held, and the stack queued ahead of it) and the status line names it. The watch returns attention, blocker "Merge queue stuck: ..." and repair kind queue_stalled, when the entry (or the entry ahead of it) has been held for 45 minutes without landing or bouncing.`,
1146
+ '- When no Vortex run works on the head and its review was skipped because auto-review is off (blocker "Vortex auto-review is off, so this head was not reviewed") or because billing could not be confirmed ("Vortex skipped this head: it could not confirm billing"), or it covered only part of the PR ("Vortex reviewed only part of this PR"), the watch returns attention at once with repair kind vortex_skipped. Do not patch for it; the repair names the mention or setting that gets the head reviewed.',
1145
1147
  '- A live-head Vortex request_changes handoff returns attention with blocker "Vortex findings need a person" and repair kind vortex_findings; verify the review and inline findings against the live head before repair.',
1146
- "- Tempest never patches. Cyclone patches a land PR when auto-patch is on for that stack (its override, else the account setting); otherwise the watching agent fixes tempest_findings on the land PR, and repair kind tempest_findings names it.",
1148
+ "- Tempest never patches. Cyclone patches a land PR when auto-patch is on for that stack (its override, else the account setting); otherwise the watching agent fixes tempest_findings on the land PR, and repair kind tempest_findings names it. A Tempest run that breaks without a result is re-run by Mergestorm at the same head a few times; after that the land gate reads tempest_failed with repair kind tempest_rerun: there is nothing to patch, so re-run Tempest with the comment the repair names. tempest_stopped (a person stopped the review) also carries repair kind tempest_rerun: ask the human before re-running it.",
1147
1149
  "- Use the mergestorm-bounce-watch skill for the fix-then-watch policy."
1148
1150
  ].join("\n");
1149
1151
 
1150
1152
  // src/server.ts
1151
1153
  var MCP_SERVER_NAME = "mergestorm";
1152
- var MCP_SERVER_VERSION = "0.2.8";
1154
+ var MCP_SERVER_VERSION = "0.2.9";
1153
1155
  var MCP_SERVER_INSTRUCTIONS = [
1154
1156
  MCP_STACK_DONE_INSTRUCTIONS,
1155
1157
  MCP_PR_LOOP_INSTRUCTIONS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mergestorm-mcp",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Mergestorm MCP server — identity, review, and read-only stack tools over stdio",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@modelcontextprotocol/sdk": "^1.30.0",
32
- "mergestorm": "0.3.35",
32
+ "mergestorm": "0.3.36",
33
33
  "zod": "^3.24.2"
34
34
  },
35
35
  "devDependencies": {