mergestorm-mcp 0.2.27 → 0.2.29

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 (39) hide show
  1. package/README.md +7 -3
  2. package/dist/index.js +651 -254
  3. package/dist/lib/hosted.d.ts +1 -1
  4. package/dist/lib/hosted.js +1 -1
  5. package/dist/lib/pr-loop-instructions.d.ts +1 -0
  6. package/dist/lib/pr-loop-instructions.js +13 -2
  7. package/dist/lib/server.d.ts +6 -4
  8. package/dist/lib/server.js +149 -28
  9. package/dist/lib/tools/chat-task.d.ts +18 -0
  10. package/dist/lib/tools/chat-task.js +28 -0
  11. package/dist/lib/tools/cyclone-job.d.ts +0 -4
  12. package/dist/lib/tools/cyclone-job.js +6 -5
  13. package/dist/lib/tools/issue-create.js +1 -1
  14. package/dist/lib/tools/issue-review-wait.d.ts +37 -0
  15. package/dist/lib/tools/issue-review-wait.js +57 -0
  16. package/dist/lib/tools/memory.d.ts +70 -0
  17. package/dist/lib/tools/memory.js +74 -0
  18. package/dist/lib/tools/repo-settings.d.ts +1 -2
  19. package/dist/lib/tools/repo-settings.js +27 -2
  20. package/dist/lib/tools/review-dismiss.d.ts +1 -2
  21. package/dist/lib/tools/review-dismiss.js +1 -1
  22. package/dist/lib/tools/review-start.js +3 -2
  23. package/dist/lib/tools/review-submit.d.ts +0 -7
  24. package/dist/lib/tools/review-submit.js +2 -2
  25. package/dist/lib/tools/review-wait-pr.js +5 -13
  26. package/dist/lib/tools/settings-set.d.ts +1 -9
  27. package/dist/lib/tools/settings-set.js +4 -4
  28. package/dist/lib/tools/stack-actions.js +4 -4
  29. package/dist/lib/tools/stack-adopt.js +2 -1
  30. package/dist/lib/tools/stack-publish.d.ts +2 -2
  31. package/dist/lib/tools/stack-publish.js +2 -1
  32. package/dist/lib/tools/stack-wait.d.ts +19 -1
  33. package/dist/lib/tools/stack-wait.js +72 -10
  34. package/dist/lib/tools/web.d.ts +27 -0
  35. package/dist/lib/tools/web.js +36 -0
  36. package/dist/lib/tools/whoami.js +6 -2
  37. package/package.json +4 -2
  38. package/dist/lib/tools/chat-wake.d.ts +0 -21
  39. package/dist/lib/tools/chat-wake.js +0 -26
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # mergestorm-mcp
2
2
 
3
- Stdio MCP server for Mergestorm. Tools: `whoami`, `credits`, `review_list`, `review_submit`, `review_wait`, `review_wait_pr`, `review_dismiss`, `review_start_pr`, `review_stop_pr`, `cyclone_start`, `cyclone_job`, `issue_create`, `stack_adopt`, `stack_enqueue`, `stack_list`, `stack_publish`, `stack_publish_status`, `stack_restack`, `stack_set`, `stack_status`, `stack_wait`, `queue_status`, `settings_get`, `settings_set`, `repo_settings_get`, `repo_settings_set`, `surge_setup`.
3
+ Stdio MCP server for Mergestorm. Tools: `whoami`, `credits`, `review_list`, `review_submit`, `review_wait`, `review_wait_pr`, `review_dismiss`, `review_start_pr`, `review_stop_pr`, `cyclone_start`, `cyclone_job`, `issue_create`, `issue_review_wait`, `stack_adopt`, `stack_enqueue`, `stack_list`, `stack_publish`, `stack_publish_status`, `stack_restack`, `stack_set`, `stack_status`, `stack_wait`, `queue_status`, `settings_get`, `settings_set`, `repo_settings_get`, `repo_settings_set`, `surge_setup`, `list_memories`, `search_memory`, `remember`, `update_memory`, `forget_memory`, `get_memory_mode`, `set_memory_mode`, `web_search`, `read_web_page`.
4
4
 
5
5
  Every tool declares MCP `annotations` for read-only access, destructive changes, idempotence, and external systems. Reads are read-only; submission, adoption, dismissal, and policy changes are writes. Tools that can change existing policy, topology, or review gates are marked potentially destructive even when some inputs only preview or read. Annotations describe effects; the client still controls approval and authorization.
6
6
 
@@ -16,16 +16,20 @@ Every tool declares MCP `annotations` for read-only access, destructive changes,
16
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
- `issue_create({ title, body?, labels?, owner?, repo?, cwd? })` opens a GitHub issue through Mergestorm with no GitHub credentials: the Surge App creates it and names the caller in the body. It defaults to the origin repository of `cwd`. Labels must already exist on the repository. The same title again returns the open issue it already made (`created: false`), so a retry does not duplicate it. Put `Fixes #<number>` in the commit or pull request body.
19
+ `issue_create({ title, body?, labels?, owner?, repo?, cwd? })` opens a GitHub issue through Mergestorm with no GitHub credentials: the Surge App creates it and names the caller in the body. It defaults to the origin repository of `cwd`. Labels must already exist on the repository. The same title again returns the open issue it already made (`created: false`), so a retry does not duplicate it. Then call `issue_review_wait` and open the pull request, with `Fixes #<number>` in the commit or pull request body, only once the issue is approved.
20
+
21
+ `issue_review_wait({ owner, repo, number, timeout_s? })` reads the Vortex review of an issue: `state` (`approved`, `needs_answers`, `pending`, `unreviewed`, `capped` or `off`), the round, the verdict, up to 8 points, the review comment link and `next`, one sentence saying what to do. `timeout_s: 0` reads it once; otherwise it waits while the review is pending, for up to 45s (the default), and returns `pending` when the slice ends. On `needs_answers` or `unreviewed`, answer the points in a comment on the issue and call it again; Vortex reviews each reply. On `capped`, a person approves with an issue comment whose first line is `mergestorm-issue: approve`. `stack_adopt` and `stack_publish` refuse a pull request whose linked issue is not approved with `issue_not_approved`, naming each issue's state and points.
20
22
 
21
23
  The agent tools start work on the user's own pull requests and repositories (`POST /api/v1/agents/...`):
22
24
 
23
25
  - `review_start_pr({ owner, repo, pr_number, head_sha? })` starts a Vortex review at the pull request's current head (one standard credit). With `head_sha`, nothing starts unless that is still the head. `review_stop_pr({ owner, repo, pr_number })` cancels a running review.
24
26
  - `cyclone_start({ task, owner, repo, pr_number?, failing_check?, brief? })` has Cyclone `fix_findings`, `fix_ci` or `resolve_conflicts` on a pull request and push the result, or `build` a first version of a new project from `brief` into an empty repository. A pull request with nothing to do (CI green, no conflicts, no open findings) is refused with the reason. `cyclone_job({ dispatch_id, timeout_s? })` waits up to `timeout_s` seconds (default 45, max 100, 0 reads once) until the job is pushed, completed or failed, and returns its state, outcome, pushed commit and changed files; call it again while the job is queued or running.
25
27
  - `stack_restack({ stack_id })` rebases a stack's layers onto their parents; `stack_enqueue({ stack_id })` sends it to the merge queue. Restarting a failed land is a restack, then an enqueue. Neither lands or promotes anything by itself.
28
+ - `list_memories`, `search_memory`, `remember`, `update_memory`, `forget_memory`, `get_memory_mode` and `set_memory_mode` manage what Mergestorm remembers about you, through `/api/v1/memories`. Inside a Breeze chat, `remember` and `search_memory` follow that chat's memory setting.
29
+ - `web_search` and `read_web_page` search the public web and read one page, through `/api/v1/web`, with a budget of 30 calls per key per hour.
26
30
  - `surge_setup({ owner, repo })` serves a repository on Surge when it is not served yet and opens the pull request that moves its CI to Surge runners.
27
31
 
28
- When the server serves a Breeze chat (`MERGESTORM_CHAT_ID`, or the hosted endpoint's chat header), `review_start_pr`, `cyclone_start` and `stack_enqueue` also register a wake, so the chat gets the result when the work finishes.
32
+ When the server serves a Breeze chat (`MERGESTORM_CHAT_ID`, or the hosted endpoint's chat header), `cyclone_start`, `review_start_pr`, `stack_enqueue`, and a `review_wait_pr` or `stack_wait` that times out record the work as a background task of that chat, so the chat gets the result when the work finishes.
29
33
 
30
34
  The stack tools expose reads, one scoped policy write, and publication of your own branch:
31
35