feat(mcp): register loopover_get_automation_state as a local stdio tool (#7752) - #7866
feat(mcp): register loopover_get_automation_state as a local stdio tool (#7752)#7866galuis116 wants to merge 1 commit into
Conversation
…ol (JSONbored#7752) loopover_get_automation_state has been a remote MCP tool since JSONbored#784 and gained a `maintain automation-state` CLI mirror in JSONbored#6742, but it was never registered on the local stdio server. JSONbored#6382 registered five sibling maintain tools; this one landed after that batch, so an agent on the stdio server had to shell out to the CLI to reach it. Mirrors the existing JSONbored#6152 registrations exactly: - Adds the STDIO_TOOL_DESCRIPTORS entry (category "agent", matching the remote server's category for the same name), so the description flows through the shared stdioToolDescription lookup and `loopover-mcp tools` rather than being hardcoded at the registration. - Registers the tool next to its maintain-family siblings, reusing ownerRepoShape and reaching the same endpoint the CLI subcommand already calls (GET /v1/repos/:owner/:repo/automation-state) through the same apiGet client -- no duplicated HTTP logic and no new paths. Extends test/unit/mcp-cli-maintain-tools.test.ts, the suite covering the five siblings: the tool is added to MAINTAIN_TOOLS so it inherits the registration, `tools --json` descriptor, REST-proxy, and API-failure cases, and the request capture filter now also records automation-state calls.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #7866 +/- ##
===========================================
- Coverage 91.40% 80.69% -10.71%
===========================================
Files 730 89 -641
Lines 74763 23357 -51406
Branches 22815 4506 -18309
===========================================
- Hits 68335 18849 -49486
+ Misses 5385 4330 -1055
+ Partials 1043 178 -865
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:43:33 UTC
Review summary Nits — 4 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, validate, validate-tests-merge)). 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 #7752.
loopover_get_automation_statehas been a remote MCP tool since #784 and gained amaintain automation-stateCLI mirror in #6742, but it was never registered on the local stdio server. #6382 registered five siblingmaintain-family tools as stdio tools; this one landed after that batch, so an agent on the stdio server had to shell out to the CLI to reach it.This mirrors the existing #6152 registrations exactly, per the issue's required pattern:
STDIO_TOOL_DESCRIPTORSentry withcategory: "agent", matching the remote server's own category for the same name (src/mcp/server.ts), so both surfaces group consistently. The description therefore flows through the sharedstdioToolDescriptionlookup (andloopover-mcp tools) rather than being hardcoded at the registration -stdioToolDescriptionthrows on an unknown name, so this entry is required, not optional.ownerRepoShapeandtoolRepoBasehelpers and calling the same endpoint the CLI subcommand already calls (GET /v1/repos/:owner/:repo/automation-state) through the sameapiGetclient. No duplicated HTTP logic, no new paths, and no behaviour the CLI does not already have.The endpoint is
requireRepoMaintainer-gated (src/api/routes.ts), so the description carries the same "Maintainer access required." note as its siblings.Tests
Extends
test/unit/mcp-cli-maintain-tools.test.ts- the suite that already covers the five siblings - rather than adding a parallel file. Adding the tool toMAINTAIN_TOOLSmakes it inherit all four existing parametrized cases:listTools()outputloopover-mcp tools --jsonwith a non-empty descriptionpermissionReadiness)The request-capture filter now also records
automation-statecalls, so the proxy assertion has traffic to inspect. The shared fixture already serves this endpoint, so no harness change was needed. Suite goes 15 -> 17 passing.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #7752).Validation
git diff --checknpm run actionlint- no workflow files touched.npm run typechecknpm run build:mcpnpx vitest run test/unit/mcp-cli-maintain-tools.test.ts- 17 passing (was 15).mcp-cli-maintain,mcp-cli-basics,mcp-cli-completion-spec) - 74 passing, no regressions.npm run docs:drift-check,npm run manifest:drift-check,npm run branding-drift:check- all pass.npm run test:mcp-pack- fails identically on unmodifiedmainin this Windows checkout (npm packlimitation), so it is not a signal for this diff; verified by stashing the change and re-running.npm run test:coverage/test:workers/ui:*- not run: this touchespackages/loopover-mcp/and onetest/file only, with no backendsrc/**, worker, or UI surface.npm audit --audit-level=moderate- no dependency changes.If any required check was skipped, explain why:
src/**lines are modified, socodecov/patchhas no changed lines to score.npm run command-reference:checkreports stale on this Windows checkout, but regenerating it produces zero content change (git diffis empty) - it is acore.autocrlfline-ending artifact, not real staleness. This change adds an MCP tool, not a CLI command, and the generator's counts are unchanged (11 public + 9 maintainer-only + 8 action). No regenerated file is included, deliberately.Safety
requireRepoMaintainergate, and the API-failure case is covered by a negative test.UI Evidencesection - n/a: no UI/frontend/docs/extension change.toolslisting and help text derive fromSTDIO_TOOL_DESCRIPTORSautomatically.Notes
pause/resumeandset-levelwrites already registered above it.