From f53f9aabb40ede019d299b71ab4d628e33d04b22 Mon Sep 17 00:00:00 2001 From: philluiz2323 Date: Fri, 17 Jul 2026 15:55:37 -0300 Subject: [PATCH] fix(mcp): list maintain and contributor-profile in --help printHelp() listed ~30 real top-level commands but omitted two dispatched ones: maintain (13-plus subcommands, its own printMaintainHelp()) and contributor-profile (added by #6737). A user running loopover-mcp --help had no way to discover either command exists. Added a usage line for each, following the existing entries' formatting; maintain's line points to loopover-mcp maintain --help for the full subcommand list rather than duplicating it. --- packages/loopover-mcp/bin/loopover-mcp.js | 2 ++ test/unit/mcp-cli-help.test.ts | 25 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 test/unit/mcp-cli-help.test.ts diff --git a/packages/loopover-mcp/bin/loopover-mcp.js b/packages/loopover-mcp/bin/loopover-mcp.js index 1d240c8b8..27b5c8a43 100644 --- a/packages/loopover-mcp/bin/loopover-mcp.js +++ b/packages/loopover-mcp/bin/loopover-mcp.js @@ -4535,8 +4535,10 @@ function printHelp() { loopover-mcp doctor [--profile name] [--cwd path] [--exit-code] [--json] loopover-mcp cache status|list|clear [--json] loopover-mcp init-client --print codex|claude|cursor|mcp|vscode [--agent-profile miner-planner|maintainer-triage|repo-owner-intake] [--json] + loopover-mcp maintain status|queue|approve|reject|pause|resume|set-level|precision|outcome-calibration|onboarding-pack|audit-feed|automation-state|refresh-docs|generate-issue-drafts --repo owner/repo [--json] (see \`loopover-mcp maintain --help\`) loopover-mcp decision-pack --login [--json] loopover-mcp repo-decision --login --repo owner/repo [--json] + loopover-mcp contributor-profile [--login ] [--json] loopover-mcp monitor-open-prs --login [--json] loopover-mcp pr-outcomes --login [--limit N] [--json] loopover-mcp explain-review-risk --repo owner/repo --title [--login ] [--body ] [--json] diff --git a/test/unit/mcp-cli-help.test.ts b/test/unit/mcp-cli-help.test.ts new file mode 100644 index 000000000..7d3b120ff --- /dev/null +++ b/test/unit/mcp-cli-help.test.ts @@ -0,0 +1,25 @@ +import { describe, expect, it } from "vitest"; +import { run } from "./support/mcp-cli-harness"; + +// #6991: printHelp() listed ~30 real top-level commands but omitted two dispatched ones: `maintain` +// (packages/loopover-mcp/bin/loopover-mcp.js's maintainCli) and `contributor-profile` +// (contributorProfileCli, added by #6737). A user running `loopover-mcp --help` had no way to +// discover either command exists. +describe("loopover-mcp --help lists every real top-level command (#6991)", () => { + it("lists maintain, pointing to its own --help for the full subcommand list", () => { + const output = run(["--help"]); + expect(output).toMatch(/loopover-mcp maintain .*--repo owner\/repo/); + expect(output).toMatch(/loopover-mcp maintain --help/); + }); + + it("lists contributor-profile", () => { + const output = run(["--help"]); + expect(output).toMatch(/loopover-mcp contributor-profile/); + }); + + it("also responds to the bare `help` command with the same usage banner", () => { + const output = run(["help"]); + expect(output).toMatch(/loopover-mcp maintain/); + expect(output).toMatch(/loopover-mcp contributor-profile/); + }); +});