feat(mcp): register loopover_watch_issues as a local stdio tool - #7957
feat(mcp): register loopover_watch_issues as a local stdio tool#7957real-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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7957 +/- ##
==========================================
- Coverage 89.00% 81.85% -7.16%
==========================================
Files 90 91 +1
Lines 21504 23703 +2199
Branches 3707 4551 +844
==========================================
+ Hits 19139 19401 +262
- Misses 2187 4106 +1919
- Partials 178 196 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-21 23:00:08 UTC
Review summary Nits — 6 non-blocking
CI checks failing
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 (CI is failing (codecov/patch)). 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. |
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), not hardcoded inline.Testing / coverage
test/unit/mcp-cli-watch-issues.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) for real Codecov coverage. Exercises all three actions (list/watch/unwatch → GET/POST/DELETE), the with/without-labelsPOST bodies (the helper omits an empty labels key), and both throw branches (no login; watch/unwatch missingrepoFullName).test/unit/mcp-cli-watch.test.ts(8 CLI tests) still passes unchanged against the refactored CLI — 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.