feat(mcp): add REST + CLI + stdio surfaces for loopover_plan_repo_issues - #7856
feat(mcp): add REST + CLI + stdio surfaces for loopover_plan_repo_issues#7856xfodev wants to merge 1 commit into
Conversation
…lan_repo_issues loopover_plan_repo_issues (generateIssuePlanDrafts) shipped only as a remote MCP tool and never got the REST + CLI + local-stdio mirror surfaces its repo-scoped, requireRepoManageAccess-gated siblings all have. Mirrors loopover_generate_contributor_issue_drafts exactly: a POST /v1/repos/:owner/:repo/issue-plan-drafts/generate route (same gate), a maintain plan-issues CLI command calling it, and a loopover_plan_repo_issues stdio tool. generateIssuePlanDrafts and the remote tool are unchanged. Closes JSONbored#7764
|
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 #7856 +/- ##
==========================================
- Coverage 91.40% 83.25% -8.15%
==========================================
Files 730 91 -639
Lines 74763 26027 -48736
Branches 22815 5325 -17490
==========================================
- Hits 68335 21669 -46666
+ Misses 5385 4051 -1334
+ Partials 1043 307 -736
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 15:24: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. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy · Diff highlights exactly what changed. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 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.
|
|
This pull request changes UI/visual code but its screenshot evidence is incomplete. Every required viewport × theme combination needs its own before/after image pair in a labeled table row (e.g. "Desktop · Light | before | after"). Still missing: Desktop · Dark, Tablet · Dark, Mobile · Dark. Please resubmit with the remaining rows filled in. See https://github.com/JSONbored/loopover/blob/main/.claude/skills/contributing-to-loopover/SKILL.md for the exact format and examples. This is an automated maintenance action. |



Summary
loopover_plan_repo_issues(backed bygenerateIssuePlanDrafts) shipped only as a remote MCP tool (via Epic #7424, after the MCP-parity milestone closed), so it never got the REST + CLI + local-stdio mirror every other repo-scoped tool has. This adds all three:POST /v1/repos/:owner/:repo/issue-plan-drafts/generate(src/api/routes.ts+src/openapi/spec.ts), gated byrequireAppRole+requireSessionRepoAccess, with theexplicit_create_requires_dry_run_falsecreate-safety guard (a barecreateis rejected; only{create:true, dryRun:false}reaches the write path).loopover-mcp maintain plan-issues --goal "..."(dry-run by default;--create/--limit/--json).loopover_plan_repo_issues, proxying the REST mirror.Coverage / testability
packages/loopover-mcp/bin/loopover-mcp.tsis a CLI dispatcher otherwise only exercised via subprocess spawn (which v8 can't instrument). It adds anisProcessEntrypoint()guard +runAsCliEntrypointflag so a unit test can import the module and driverunCli/maintainCliin-process without hijacking argv or binding stdin (the untestableserver.connect(new StdioServerTransport())carries a/* v8 ignore */).test/unit/mcp-cli-plan-issues.test.tsdrives both themaintain plan-issuesCLI (incl.--help) and the stdio tool in-process against both the built.jsand.ts;test/unit/routes-issue-plan-draft.test.tscovers the REST route (session + static-token, cross-repo rejection, create-safety); andtest/unit/mcp-tool-rename-aliases.test.ts's tool-count invariant is bumped 79 → 80.Verified on latest
main: mcp-cli + routes + openapi + tool-count tests pass,tsc --noEmitclean,ui:openapi:check/command-reference:check/test:mcp-packclean,git diff --checkclean, and every changed line inroutes.ts/spec.ts/loopover-mcp.tsis Codecov-covered.Closes #7764
(Supersedes #7834 and #7846. #7834 was gate-closed on a base conflict — the bin migration removed the committed
loopover-mcp.jsfrommain, making its.jsedit a modify/delete conflict; this branch is.ts-only. #7846 was gate-closed because the new tool takes the registered count 79 → 80, which themcp-tool-rename-aliasesinvariant asserts — now updated.)