feat(mcp): add REST + CLI + stdio surfaces for loopover_plan_repo_issues - #7846
feat(mcp): add REST + CLI + stdio surfaces for loopover_plan_repo_issues#7846xfodev 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. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-21 15:09:44 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. 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.
|
❌ 2 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
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 surfaces: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). To get real Codecov-measured coverage on the new lines, 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())line carries a/* v8 ignore */).test/unit/mcp-cli-plan-issues.test.tsdrives both themaintain plan-issuesCLI and the stdio tool in-process (against both the built.jsand.ts), andtest/unit/routes-issue-plan-draft.test.tscovers the REST route (session + static-token auth, cross-repo rejection, create-safety).Verified locally on latest
main: the affected mcp-cli + routes + openapi tests pass,tsc --noEmitclean,ui:openapi:check/command-reference:check/test:mcp-packall clean (no drift),git diff --checkclean, and every changed line inroutes.ts/spec.ts/loopover-mcp.tsis covered.Closes #7764
(Supersedes #7834, which the gate auto-closed on a base conflict: the miner/mcp bin migration removed the committed
loopover-mcp.jsfrommain, so the old PR's.jsedit became a modify/delete conflict. This branch is.ts-only, rebased onto currentmain, with a maintain---helpcoverage test added.)