feat(mcp): register loopover_mark_notifications_read as a local stdio tool - #7950
Conversation
… tool loopover_mark_notifications_read has a remote MCP tool (src/mcp/server.ts) and a notifications-read CLI command, but no local stdio MCP tool registration. JSONbored#6745 added the REST route + CLI but never the matching stdio tool, so a self-host operator using the local MCP server couldn't call it. Adds the registerStdioTool block following the existing sibling pattern, reusing the same postMarkNotificationsRead helper (POST /v1/contributors/:login/ notifications/read) the notifications-read CLI already calls — no duplicated HTTP logic. login resolves from arg / active session / LOOPOVER_LOGIN like the CLI; ids is optional (omit to mark every delivered notification read). test/unit/mcp-cli-mark-notifications-read.test.ts drives it in-process (the JSONbored#7764 entrypoint-guard pattern) so the registration + handler get real Codecov coverage, including the no-login throw branch. Tool-count invariant bumped 89 -> 90. Closes JSONbored#7762
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-21 21:24:16 UTC
Review summary Nits — 6 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7950 +/- ##
==========================================
+ Coverage 79.50% 81.84% +2.34%
==========================================
Files 735 91 -644
Lines 75452 23694 -51758
Branches 22952 4547 -18405
==========================================
- Hits 59986 19393 -40593
+ Misses 12710 4105 -8605
+ Partials 2756 196 -2560
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
@JSONbored |
Summary
Closes #7762 —
loopover_mark_notifications_readhas a remote MCP tool (src/mcp/server.ts) and anotifications-readCLI command, but no local stdio MCP tool registration. #6745 added the REST route + CLI but never the matching stdio tool, so a self-host operator using the local MCP server (not the CLI or remote MCP) couldn't call it.What changed (
packages/loopover-mcp/bin/loopover-mcp.ts)registerStdioTool("loopover_mark_notifications_read", …)block, placed next to the other contributor-scoped tools, following the existing sibling pattern exactly.postMarkNotificationsReadhelper (POST /v1/contributors/:login/notifications/read) thenotifications-readCLI already calls — no duplicated HTTP logic.loginresolves from the arg / active session /LOOPOVER_LOGIN(same as the CLI and theloopover_get_pr_ai_review_findingssibling);idsis optional (omit to mark every delivered notification read).stdioToolDescription(...)+ aSTDIO_TOOL_DESCRIPTORSentry (category: "utility", matching the remote tool), not hardcoded inline.Testing / coverage
test/unit/mcp-cli-mark-notifications-read.test.ts: drives the tool in-process (the loopover_plan_repo_issues has no REST route, CLI command, or local stdio MCP tool #7764isProcessEntrypointguard +InMemoryTransport, mirroringmcp-cli-repo-focus-manifest.test.ts) so the registration + handler get real Codecov-measured coverage — a subprocess spawn can't be v8-instrumented. Covers mark-all (empty body), explicitidsforwarding, and the no-login throw branch (so thelogin ?? …fallback chain and the guard are fully branch-covered).test/unit/mcp-tool-rename-aliases.test.tsbumped 89 → 90.No REST/OpenAPI/CLI-surface change (the route and
notifications-readCLI already exist) —ui:openapi:check,command-reference:check,docs/manifestdrift all clean;build:mcpclean.