mergestorm-mcp 0.1.8 → 0.1.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 +13 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -923,6 +923,13 @@ var MCP_PR_LOOP_INSTRUCTIONS = [
923
923
  `- If you skip a finding (not reproducible, policy fork, or needs a human), post a public GitHub PR comment before you stop. First line must be: ${MCP_FINDING_DISMISS_MARKER}. Then one line per skipped finding (path, severity, why).`,
924
924
  "- Do not prefix that comment with cyclone-outcome: (reserved)."
925
925
  ].join("\n");
926
+ var MCP_STACK_BASE_INSTRUCTIONS = [
927
+ "Stack PR bases (Mergestorm sets these; leave them):",
928
+ "- Stack of 2+ PRs: after adopt (stack_adopt, mg stack adopt, or mg stack submit) the bottom PR's GitHub base is the owned trunk mg-stack-<n>, not main. That is correct. Layer 2 is based on layer 1; layer 3+ on the mg-park-* freeze; the git parent of layer 2+ is still the layer below. A 1-PR stack stays on main and gets no mg-stack-<n>.",
929
+ "- Never retarget a stack PR's GitHub base (gh pr edit --base, a REST base change, or the UI). Moving the bottom to main makes Mergestorm abandon the stack's review unit; setting mg-stack-<n> again does not restore it. If a base was already moved, stop and tell the human; do not run stack land or re-adopt to repair it.",
930
+ "- mg-stack-<n> is the bottom PR's live parent: merging it into the bottom branch is that PR's conflict repair (bounce-watch rules). Never push to mg-stack-<n>, and never rebase or merge layer 2+ onto it or onto main. mg-park-* is never a merge or rebase target.",
931
+ "- mg stack submit prints the base each PR opened with; the bottom moves to mg-stack-<n> right after. stack_status trunkBranch is the current trunk."
932
+ ].join("\n");
926
933
  var MCP_STACK_WATCH_INSTRUCTIONS = [
927
934
  "Stack-watch facts (mergestorm.stack_watch/v1):",
928
935
  "- waiting with nonempty issues[] is not idle; in_progress can also carry issues[].",
@@ -936,7 +943,7 @@ var MCP_STACK_WATCH_INSTRUCTIONS = [
936
943
 
937
944
  // src/server.ts
938
945
  var MCP_SERVER_NAME = "mergestorm";
939
- var MCP_SERVER_VERSION = "0.1.8";
946
+ var MCP_SERVER_VERSION = "0.1.9";
940
947
  function stripNulls(value) {
941
948
  if (Array.isArray(value)) {
942
949
  return value.map((item) => stripNulls(item));
@@ -972,6 +979,8 @@ function createMergestormMcpServer() {
972
979
  },
973
980
  { instructions: `${MCP_PR_LOOP_INSTRUCTIONS}
974
981
 
982
+ ${MCP_STACK_BASE_INSTRUCTIONS}
983
+
975
984
  ${MCP_STACK_WATCH_INSTRUCTIONS}` }
976
985
  );
977
986
  const addTool = server2.registerTool.bind(server2);
@@ -1148,7 +1157,7 @@ ${MCP_STACK_WATCH_INSTRUCTIONS}` }
1148
1157
  "stack_adopt",
1149
1158
  {
1150
1159
  title: "Adopt PR stack",
1151
- description: "Adopt an open GitHub PR chain into a Mergestorm stack. auto_land is boolean; auto_review and auto_patch accept true, false, or null, where null clears the override. Omitted auto_land seeds from auto_land_default; omitted auto_review and auto_patch overrides are not seeded. Never changes account settings. Adoption requires a Cyclone GitHub App install; without it the API returns cyclone_not_connected \u2014 do not retry, tell the human. Read stack_status with result.stack.id afterward to verify policy and Cyclone ownership.",
1160
+ description: "Adopt an open GitHub PR chain into a Mergestorm stack. auto_land is boolean; auto_review and auto_patch accept true, false, or null, where null clears the override. Omitted auto_land seeds from auto_land_default; omitted auto_review and auto_patch overrides are not seeded. Never changes account settings. Adoption requires a Cyclone GitHub App install; without it the API returns cyclone_not_connected \u2014 do not retry, tell the human. Read stack_status with result.stack.id afterward to verify policy and Cyclone ownership. With 2+ PRs, adopt moves the bottom PR's GitHub base to mg-stack-<n> and parks PR3+ on an mg-park-* freeze; a 1-PR stack stays on main. Leave those bases. Never retarget the bottom back to main.",
1152
1161
  inputSchema: stackAdoptSchema
1153
1162
  },
1154
1163
  async (args) => {
@@ -1203,7 +1212,7 @@ ${MCP_STACK_WATCH_INSTRUCTIONS}` }
1203
1212
  "stack_status",
1204
1213
  {
1205
1214
  title: "Get stack status",
1206
- description: "Fetch one owned Mergestorm stack with enriched checks and agent state, plus attention, issues, and currentCandidate from the same blocker rules as stack_wait, read against that stack's own merge queue. This tool is read-only.",
1215
+ description: "Fetch one owned Mergestorm stack with enriched checks and agent state, plus attention, issues, and currentCandidate from the same blocker rules as stack_wait, read against that stack's own merge queue. This tool is read-only. trunkBranch is mg-stack-<n> for an adopted 2+ PR stack and matches the bottom open PR's GitHub base; an mg-park-* parentBranch is a freeze. Neither is drift to fix.",
1207
1216
  inputSchema: {
1208
1217
  stack_id: z3.string().min(1)
1209
1218
  }
@@ -1220,7 +1229,7 @@ ${MCP_STACK_WATCH_INSTRUCTIONS}` }
1220
1229
  "stack_wait",
1221
1230
  {
1222
1231
  title: "Wait for stack attention",
1223
- description: "Wait for a stack to need attention. Returns a mergestorm.stack_watch/v1 envelope; timeout_s: 0 returns one snapshot and timeout_s: 1-45 waits up to that many seconds, returning the current status (waiting or in_progress) if a snapshot was read and no attention is found. A timeout with either of those statuses is not a failure. A timeout of failed means no assessment was produced. This tool is read-only.",
1232
+ description: "Wait for a stack to need attention. Returns a mergestorm.stack_watch/v1 envelope; timeout_s: 0 returns one snapshot and timeout_s: 1-45 waits up to that many seconds, returning the current status (waiting or in_progress) if a snapshot was read and no attention is found. A timeout with either of those statuses is not a failure. A timeout of failed means no assessment was produced. This tool is read-only. Attention never calls for changing a PR's GitHub base.",
1224
1233
  inputSchema: stackWaitSchema
1225
1234
  },
1226
1235
  async (args, extra) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mergestorm-mcp",
3
- "version": "0.1.8",
3
+ "version": "0.1.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.22",
32
+ "mergestorm": "0.3.23",
33
33
  "zod": "^3.24.2"
34
34
  },
35
35
  "devDependencies": {