mergestorm-mcp 0.2.13 → 0.2.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/README.md +1 -1
- package/dist/index.js +16 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Every tool declares MCP `annotations` for read-only access, destructive changes,
|
|
|
13
13
|
- **Authorization.** The API key's account must monitor the repository or own the PR's stack, and its linked GitHub account needs write access to the repository.
|
|
14
14
|
- **Refusals.** A moved head (`stale_head`), another review (`review_mismatch`, `review_not_found`), an id outside that review (`unknown_finding`), a thin `reason` (`invalid_input`) or a missing permission (`forbidden`) is refused, and nothing is written.
|
|
15
15
|
- **Audit and retries.** Each finding is stored with the actor's GitHub login, the reason, `evidence_url`, the scope and the time. A retry reports the earlier record under `already_dismissed`.
|
|
16
|
-
- **Gates.** `gate.seam.cleared` is true only when every finding of that integration review is dismissed and it is still the member's current seam verdict.
|
|
16
|
+
- **Gates.** `gate.seam.cleared` is true only when every finding of that integration review is dismissed and it is still the member's current seam verdict. `gate.vortex.cleared` is true once every Vortex Blocker (error finding) at the live head is dismissed (every Core review merged into that head) and no Vortex review of the head is running or incomplete; with a warning still open the head reads `comment`, which Auto land accepts; otherwise `gate.vortex.reason` and `message` say what still holds it: that head's Vortex verdict becomes approve for Auto land, the stack watch, the dashboard and Cyclone. A partial dismissal clears nothing. CI and Auto land policy are unchanged (`gate.other_gates: "unchanged"`). For a stack PR the result carries `watch` with the next `stack_wait` call.
|
|
17
17
|
- **No resurfacing.** Vortex does not raise a dismissed finding again on the same diff: the same head, or a restack whose diff is unchanged.
|
|
18
18
|
|
|
19
19
|
The stack tools expose reads plus one scoped policy write:
|
package/dist/index.js
CHANGED
|
@@ -292,6 +292,12 @@ function reviewDismissSummary(result) {
|
|
|
292
292
|
seam.cleared ? "Seam gate cleared at this head. CI, other reviews and Auto land policy are unchanged." : seam.blocking ? `Seam gate still blocking (seam_state=${seam.state}).` : `Seam gate not blocking (seam_state=${seam.state}).`
|
|
293
293
|
);
|
|
294
294
|
}
|
|
295
|
+
const vortex = result.gate.vortex;
|
|
296
|
+
if (vortex?.cleared) {
|
|
297
|
+
lines.push("Vortex gate cleared at this head: every Vortex Blocker (error finding) at this head is dismissed. CI and Auto land policy are unchanged.");
|
|
298
|
+
} else if (vortex?.message && vortex.reason !== "review_findings_open") {
|
|
299
|
+
lines.push(`Vortex gate not cleared: ${vortex.message}`);
|
|
300
|
+
}
|
|
295
301
|
return lines.join("\n");
|
|
296
302
|
}
|
|
297
303
|
async function reviewDismiss(input, cfg) {
|
|
@@ -1076,7 +1082,7 @@ import {
|
|
|
1076
1082
|
loadConfig as loadConfig7,
|
|
1077
1083
|
resolveApiKey
|
|
1078
1084
|
} from "mergestorm/client";
|
|
1079
|
-
async function whoami(cfg) {
|
|
1085
|
+
async function whoami(cfg, serverVersion) {
|
|
1080
1086
|
const resolved = cfg ?? await loadConfig7();
|
|
1081
1087
|
const key = resolveApiKey(resolved);
|
|
1082
1088
|
if (!key) {
|
|
@@ -1097,11 +1103,12 @@ async function whoami(cfg) {
|
|
|
1097
1103
|
plan_label_key: me.plan_label_key ?? null,
|
|
1098
1104
|
api_base: apiBase(resolved),
|
|
1099
1105
|
config_path: configPath(),
|
|
1100
|
-
usage: me.usage ?? null
|
|
1106
|
+
usage: me.usage ?? null,
|
|
1107
|
+
mcp_server_version: serverVersion ?? null
|
|
1101
1108
|
};
|
|
1102
1109
|
const plan = data.plan_label_key ?? data.plan_key ?? "unknown plan";
|
|
1103
1110
|
return {
|
|
1104
|
-
summary: `${data.key_prefix} \xB7 ${plan}`,
|
|
1111
|
+
summary: `${data.key_prefix} \xB7 ${plan}${serverVersion ? ` \xB7 mergestorm-mcp ${serverVersion}` : ""}`,
|
|
1105
1112
|
data
|
|
1106
1113
|
};
|
|
1107
1114
|
}
|
|
@@ -1115,14 +1122,14 @@ var MCP_PR_LOOP_INSTRUCTIONS = [
|
|
|
1115
1122
|
"- Patch concrete bugs. A chat-only explanation is not a dismiss.",
|
|
1116
1123
|
`- 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).`,
|
|
1117
1124
|
"- Do not prefix that comment with cyclone-outcome: (reserved).",
|
|
1118
|
-
"- A finding you verified is wrong can be dismissed on the record with review_dismiss (or mg dismiss): pass the PR's live head_sha, the review_id, the finding_ids (preview: true lists them) and a reason. That is the only agent path that clears a seam gate, and only once every finding of that seam review is dismissed. The dismiss comment alone resumes the review but does not clear the seam gate.",
|
|
1125
|
+
"- A finding you verified is wrong can be dismissed on the record with review_dismiss (or mg dismiss): pass the PR's live head_sha, the review_id, the finding_ids (preview: true lists them) and a reason. That is the only agent path that clears a seam gate, and only once every finding of that seam review is dismissed. Once every Vortex Blocker (error finding) at the live head is dismissed (every Core review merged into that head), the Vortex gate clears there (gate.vortex.cleared); otherwise gate.vortex.message says what still holds it. The dismiss comment alone resumes the review but does not clear the seam gate.",
|
|
1119
1126
|
"- Never dismiss a finding you did not check, one a human must decide, or findings of a newer review."
|
|
1120
1127
|
].join("\n");
|
|
1121
1128
|
var MCP_STACK_DONE_INSTRUCTIONS = [
|
|
1122
1129
|
"When stack work is done:",
|
|
1123
1130
|
"- Stack work is done only when the stack is landed, or when the human takes it back (archives it or tells you to stop). A clean push, a submit, an adopt, or one merged layer is not done: merging a lower layer can break a layer above it.",
|
|
1124
1131
|
"- Every stack_wait, stack_status, stack_adopt, and stack_set result carries watch: {done, until, reason, next, message}. While watch.done is false, keep calling stack_wait with watch.next.args (the returned cursor), 45s at a time, or hand the waiting to the background watcher below, and do not end your task. Stop only when watch.done is true.",
|
|
1125
|
-
"- Only when your host has a confirmed notification that resumes this task, run `mg stack watch <stack-id>` as a background command with a notification on output matching `MS-WATCH (ATTENTION|LANDED)`, then end your turn. The watcher runs stack_wait against the Mergestorm API in slices of at most 300s, carries the cursor, stays silent while the stack is waiting or in_progress (busy[] holds and actAfter included), and costs no model tokens. It exits on attention (`MS-WATCH ATTENTION pr=<n> head=<sha> blocker=... repair=<kind>`, exit 3), on a read that failed twice (`MS-WATCH ATTENTION failed`, exit 3; tell the human the stack is no longer watched), on a closed, archived, or missing stack (`MS-WATCH ATTENTION stack=<id> reason=<reason>`, exit 3; verify missing stacks before reporting a landing), or on a confirmed landing (`MS-WATCH LANDED stack=<id> reason=landed`, exit 0). On an attention wake, read stack_status once, fix the blocker per mergestorm-bounce-watch, push, and start `mg stack watch <stack-id> --head <pushed-sha>` again. The command monitors the stack; it cannot wake an agent by itself. Without a confirmed notification, keep using stack_wait with watch.next.args, or report that automatic follow-up is unavailable before ending the turn. Ending your turn while the watcher runs is not ending the task. Do not subscribe to GitHub events to wait on a stack.",
|
|
1132
|
+
"- Only when your host has a confirmed notification that resumes this task, run `mg stack watch <stack-id>` as a background command with a notification on output matching `MS-WATCH (ATTENTION|LANDED)`, then end your turn. The watcher runs stack_wait against the Mergestorm API in slices of at most 300s, carries the cursor, stays silent while the stack is waiting or in_progress (busy[] holds and actAfter included), and costs no model tokens. It exits on attention (`MS-WATCH ATTENTION pr=<n> head=<sha> blocker=... repair=<kind>`, exit 3), on a read that failed twice (`MS-WATCH ATTENTION failed`, exit 3; tell the human the stack is no longer watched), on a closed, archived, or missing stack (`MS-WATCH ATTENTION stack=<id> reason=<reason>`, exit 3; verify missing stacks before reporting a landing), or on a confirmed landing (`MS-WATCH LANDED stack=<id> reason=landed`, exit 0). On an attention wake, read stack_status once, fix the blocker per mergestorm-bounce-watch, push, and start `mg stack watch <stack-id> --head <pushed-sha>` again. The command monitors the stack; it cannot wake an agent by itself. A confirmed notification is a host feature you can name that turns the command's exit or matching output into your next turn; a process left running, or output written to a log or terminal you do not read, is not one. Without a confirmed notification, keep using stack_wait with watch.next.args, or report that automatic follow-up is unavailable before ending the turn. Ending your turn while the watcher runs is not ending the task. Do not subscribe to GitHub events to wait on a stack.",
|
|
1126
1133
|
"- A layer PR shown as merged is merged into mg-stack-<n>, not main. The stack is landed only when the land PR (head mg-stack-<n>) merges into main or watch.done says landed. Never judge landing from GitHub PR state alone.",
|
|
1127
1134
|
"- attention means something for you to fix; repair, when present, names the concrete fix. A pending land gate (landGatePending: ci_pending) is a wait, not attention."
|
|
1128
1135
|
].join("\n");
|
|
@@ -1160,7 +1167,7 @@ var MCP_STACK_WATCH_INSTRUCTIONS = [
|
|
|
1160
1167
|
|
|
1161
1168
|
// src/server.ts
|
|
1162
1169
|
var MCP_SERVER_NAME = "mergestorm";
|
|
1163
|
-
var MCP_SERVER_VERSION = "0.2.
|
|
1170
|
+
var MCP_SERVER_VERSION = "0.2.14";
|
|
1164
1171
|
var MCP_SERVER_INSTRUCTIONS = [
|
|
1165
1172
|
MCP_STACK_DONE_INSTRUCTIONS,
|
|
1166
1173
|
MCP_PR_LOOP_INSTRUCTIONS,
|
|
@@ -1212,12 +1219,12 @@ function createMergestormMcpServer() {
|
|
|
1212
1219
|
"whoami",
|
|
1213
1220
|
{
|
|
1214
1221
|
title: "Who am I",
|
|
1215
|
-
description: "Current Mergestorm API key prefix, plan, and
|
|
1222
|
+
description: "Current Mergestorm API key prefix, plan, API base, and the version of this running mergestorm-mcp server.",
|
|
1216
1223
|
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }
|
|
1217
1224
|
},
|
|
1218
1225
|
async () => {
|
|
1219
1226
|
try {
|
|
1220
|
-
return ok(await whoami());
|
|
1227
|
+
return ok(await whoami(void 0, MCP_SERVER_VERSION));
|
|
1221
1228
|
} catch (err) {
|
|
1222
1229
|
return fail(err);
|
|
1223
1230
|
}
|
|
@@ -1342,7 +1349,7 @@ function createMergestormMcpServer() {
|
|
|
1342
1349
|
"review_dismiss",
|
|
1343
1350
|
{
|
|
1344
1351
|
title: "Dismiss Vortex findings",
|
|
1345
|
-
description: `Record an audited dismissal of Vortex findings you verified are wrong or not actionable on a GitHub PR. Identity is exact: head_sha must be the PR's live head, review_id a Vortex review (Core or seam) made at that head, and finding_ids the GitHub review comment ids of that review (offdiff-<n> for a body-only finding), or scope "review" with no finding_ids to dismiss every finding of that review. reason must say why (at least 20 characters); evidence_url is optional. Call with preview: true first to list the review's finding ids and the seam gate without writing. The caller's linked GitHub account needs write access to the repository. A moved head, another review, an unknown id or a missing permission is refused and nothing is written. Retries are idempotent. The seam gate clears only when every finding of that integration review is dismissed;
|
|
1352
|
+
description: `Record an audited dismissal of Vortex findings you verified are wrong or not actionable on a GitHub PR. Identity is exact: head_sha must be the PR's live head, review_id a Vortex review (Core or seam) made at that head, and finding_ids the GitHub review comment ids of that review (offdiff-<n> for a body-only finding), or scope "review" with no finding_ids to dismiss every finding of that review. reason must say why (at least 20 characters); evidence_url is optional. Call with preview: true first to list the review's finding ids and the seam gate without writing. The caller's linked GitHub account needs write access to the repository. A moved head, another review, an unknown id or a missing permission is refused and nothing is written. Retries are idempotent. The seam gate clears only when every finding of that integration review is dismissed; the Vortex gate at the head clears only once every Vortex Blocker (error finding) at that head is dismissed and no Vortex review of it is running (gate.vortex.cleared, else gate.vortex.message); CI and Auto land policy are unchanged. Vortex does not raise a dismissed finding again on the same diff. Never dismiss a finding you did not check.` + STACK_WATCH_RESULT_NOTE,
|
|
1346
1353
|
inputSchema: {
|
|
1347
1354
|
owner: z3.string().min(1),
|
|
1348
1355
|
repo: z3.string().min(1),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mergestorm-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
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.
|
|
32
|
+
"mergestorm": "0.3.42",
|
|
33
33
|
"zod": "^3.24.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|