feat(mcp): register loopover_watch_issues as a local stdio tool - #7959
feat(mcp): register loopover_watch_issues as a local stdio tool#7959real-venus wants to merge 1 commit into
Conversation
loopover_watch_issues has a remote MCP tool (src/mcp/server.ts) and a `watch` CLI command, but no local stdio MCP tool registration. JSONbored#6746 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. Extracts the /v1/contributors/:login/watches dispatch (list=GET, watch=POST, unwatch=DELETE) into a shared watchIssuesRequest helper reused by BOTH the `watch` CLI and the new stdio tool -- no duplicated HTTP logic. login resolves from arg / active session / LOOPOVER_LOGIN like the CLI; action defaults to list. test/unit/mcp-cli-watch-issues.test.ts drives it in-process (JSONbored#7764 entrypoint guard) so the registration + helper get real Codecov coverage, including all three actions, the with/without-labels POST bodies, and both throw branches. Existing mcp-cli-watch.test.ts still passes against the refactored CLI. Count 89 -> 90. Closes JSONbored#7763
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7959 +/- ##
===========================================
+ Coverage 67.32% 81.97% +14.64%
===========================================
Files 735 91 -644
Lines 75458 23703 -51755
Branches 22954 4551 -18403
===========================================
- Hits 50803 19430 -31373
+ Misses 20857 4062 -16795
+ Partials 3798 211 -3587
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-21 23:40:50 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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (conflicts with the base branch — resolve and open a fresh PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
JSONbored
left a comment
There was a problem hiding this comment.
Merge conflicts, a PR before yours touched the same file:
This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/loopover/pull/7959/conflicts) or the command line to resolve conflicts before continuing.
test/unit/mcp-tool-rename-aliases.test.ts
Summary
Closes #7763 —
loopover_watch_issueshas a remote MCP tool (src/mcp/server.ts) and awatchCLI command, but no local stdio MCP tool registration. #6746 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)/v1/contributors/:login/watchesdispatch into a sharedwatchIssuesRequesthelper (list=GET,watch=POST,unwatch=DELETE) and reuses it in both thewatchCLI and the new stdio tool — so there's no duplicated HTTP logic (the CLI previously inlined the three calls).registerStdioTool("loopover_watch_issues", …)block next to the other contributor-scoped tools, mirroring the sibling pattern.loginresolves from arg / active session /LOOPOVER_LOGIN(same as the CLI);actiondefaults tolist;watch/unwatchrequirerepoFullName.stdioToolDescription(...)+ aSTDIO_TOOL_DESCRIPTORSentry (category: "utility", matching the remote tool).watchCliis nowexported (exactly likemaintainCli, loopover_plan_repo_issues has no REST route, CLI command, or local stdio MCP tool #7764) purely so a test can drive it in-process.Testing / coverage
test/unit/mcp-cli-watch-issues.test.tsruns everything in-process (the loopover_plan_repo_issues has no REST route, CLI command, or local stdio MCP tool #7764isProcessEntrypointguard +InMemoryTransport) so the registration, the shared helper, and the refactored CLI call sites all get real Codecov-measured coverage — a subprocess spawn can't be v8-instrumented:labelsPOST bodies (the helper omits an empty labels key), and both throw branches (no login; watch/unwatch missingrepoFullName).watchCLI driven in-process (list/add/remove) so the shared-helper call sites are covered — not just via the subprocessmcp-cli-watch.test.ts, which v8 can't instrument.test/unit/mcp-cli-watch.test.ts(8 subprocess CLI tests) still passes unchanged — the helper preserves the exact request bodies it asserts.test/unit/mcp-tool-rename-aliases.test.tsbumped to 91.No REST/OpenAPI/CLI-surface change (the route and
watchCLI already exist) —ui:openapi:check,command-reference:check,docs/manifestdrift all clean;build:mcpclean.(Supersedes #7957, which was closed on a codecov/patch gap: the CLI's refactored call sites were only exercised by the un-instrumentable subprocess test. This adds the in-process CLI coverage that closes it.)