feat(mcp): add loopover-mcp agent start CLI subcommand#8443
Conversation
Closes JSONbored#8314. Adds a start branch to runAgentCli mirroring the loopover_agent_start_run stdio tool's POST /v1/agent/runs request shape (objective/actorLogin required, --repo/--pull/--issue optional target), with surface "cli" so the CLI and MCP entry points stay distinguishable. Registers start in CLI_COMMAND_SPEC.agent and printAgentHelp. Exports runAgentCli via a separate statement (an inline export prefix breaks the spec-parity boundary regex) for in-process test coverage; adds a captured POST /v1/agent/runs harness route and full-branch CLI tests.
|
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 #8443 +/- ##
==========================================
- Coverage 92.42% 83.20% -9.23%
==========================================
Files 791 98 -693
Lines 79294 24962 -54332
Branches 23950 4729 -19221
==========================================
- Hits 73291 20769 -52522
+ Misses 4866 3952 -914
+ Partials 1137 241 -896
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 13:47:32 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.
|
Summary
loopover-mcp agent startCLI subcommand mirroring the existing loopover_agent_start_run MCP tool #8314: adds theloopover-mcp agent startCLI subcommand — the human-typable counterpart to the existingloopover_agent_start_runstdio MCP tool, closing the one CLI/MCP parity gap the audit found.runAgentCligains astartbranch that POSTs the same/v1/agent/runsrequest shape the stdio tool sends:{ objective, actorLogin, surface, target: { repoFullName?, pullNumber?, issueNumber? } }.objectiveandactorLoginare non-optional inagentRunShape, so both are enforced (--loginresolved via the sameoptions.login ?? LOOPOVER_LOGIN ?? GITHUB_LOGINpattern asplan/packet;--objectiverequired), throwing a clear usage error when either is missing.--repo/--pull/--issuemap to the optional target fields. Output goes through the existingoutputAgentPayloadhelper (--jsonpassthrough vs. summary).surface: "cli"(not the stdio tool's"mcp"), per the issue: this keeps the two entry points distinguishable server-side — the stated goal — whereas reusing"mcp"would make them indistinguishable.startinCLI_COMMAND_SPEC.agent(so it tab-completes and passes the spec↔handler parity check) and documented it inprintAgentHelp.Tests
test/unit/mcp-cli-agent-start.test.ts— in-process coverage calling the exportedrunAgentClidirectly (a subprocess-spawned CLI run is invisible to v8/Codecov, so the existing subprocess-based agent tests can't cover a new branch): asserts the exactPOST /v1/agent/runsbody withsurface: "cli"and every target field; the empty-target case;--jsonpassthrough; missing---login, missing---objective, and valueless---objectiveusage errors; the non-start fall-through; and the help listing. 100% of the changed lines and branches, verified locally via lcov.runAgentCliis exported via a separateexport { runAgentCli }statement rather than an inlineexport async function, so the CLI_COMMAND_SPEC↔handler parity test's\n(?:async )?functionboundary regex still delimits the handler correctly (an inlineexportprefix broke that boundary and bled this handler's subcommands into the adjacentrunCacheCli's). Added a capturedPOST /v1/agent/runsroute to the CLI test harness.Scope
CONTRIBUTING.md; nosite//CNAME.Closes #8314).Validation
git diff --checknpm run typechecknpm run test:coveragelocally (100% patch coverage on the changed lines/branches, verified via lcov)npm run build:mcp,npm run test:mcp-packnpm run command-reference:check,npm run docs:drift-checktest/unit/mcp-*suite (861 tests) green, incl. the CLI_COMMAND_SPEC↔handler parity checkIf any required check was skipped, explain why:
packages/loopover-mcp/bin/loopover-mcp.tsplus test files (the CLI harness + the new in-process test). It touches no engine code, API/OpenAPI, migration, generated artifact, UI, or worker surface, so the remainingtest:cisteps (engine build/tests, workers, ui:build, db/drift checks) are unaffected. Engine was rebuilt (a stale dist otherwise breaks whole-repo typecheck), typecheck is clean, and the full mcp test surface + mcp-pack + command-reference + docs-drift all pass.Safety
printAgentHelp's existing copilot-only description.UI Evidence
Not applicable — a CLI subcommand with no visible UI, frontend, docs, or extension change.
Notes
plan/status/explain/packetsubcommands or the stdio MCP tool.surface: "cli"is the one deliberate divergence from the mirrored stdio tool, per the issue's distinguishability requirement.