feat(mcp): add loopover_set_agent_paused and loopover_set_action_autonomy tools - #6102
Conversation
|
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 #6102 +/- ##
=======================================
Coverage 95.24% 95.24%
=======================================
Files 595 595
Lines 47035 47067 +32
Branches 15015 15016 +1
=======================================
+ Hits 44797 44829 +32
Misses 1493 1493
Partials 745 745
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-15 09:33:14 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
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://gittensory.aethereal.dev/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
maintain pause/resume/set-level(the write-side kill-switch + per-action autonomy dial) had no MCP tool, even thoughmaintain status/queue/approve/rejectare already mirrored asloopover_get_automation_state/loopover_list_pending_actions/loopover_decide_pending_action. Addedloopover_set_agent_pausedandloopover_set_action_autonomyto close that gap.loopover_propose_action(requireRepoManageAccess) and read-merge-write over the reposettingsrow so unrelated fields (and, for autonomy, other action classes) are preserved — matching the CLI's own pattern.loopover_set_action_autonomy'sactionenum mirrors the CLI'sMAINTAIN_ACTION_CLASSESexactly. Itslevelenum intentionally validates against the liveAUTONOMY_LEVELS(src/settings/autonomy.ts) rather than the CLI's ownMAINTAIN_AUTONOMY_LEVELS, which still listssuggest/propose— both removed server-side by Resolve dead config branches (wire or remove) #4620 and silently dropped bynormalizeAutonomyPolicyon persist. Accepting them here would report a successful write that never actually took effect.Closes #6087
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
ui:lint/ui:typecheck/ui:buildskipped: this PR only touchessrc/mcp/server.ts+ its unit test, noapps/loopover-ui/**files.npm run test:coverage(full unsharded run) fails 3 pre-existing test files in this sandbox (selfhost-ams-reporting.test.tsneeds asqlite3binary not installed here;miner-live-issue-snapshot.test.tspicks up a stray localGITHUB_TOKEN-shaped env var) — reproduced identically on a cleanmainstash, so unrelated to this diff.test/unit/mcp-automation-state.test.ts(this PR's tests) passes fully; verified viacoverage/lcov.infothat every changed line and branch insrc/mcp/server.tsis hit (100% line + branch on the diff).Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.Not applicable: this is a backend-only MCP tool addition with no UI/docs/changelog surface.
UI Evidence
Not applicable — no UI/frontend change.
Notes
test/unit/mcp-automation-state.test.ts(alongside the existingloopover_get_automation_state/loopover_propose_actioncoverage in the same file): successful pause/resume with unrelated-settings preservation, successful set-level confirming other action classes are untouched, schema rejection of an out-of-surface action class and of the CLI's stalesuggestlevel, and an unauthorized-caller (write-access + MCP actuation allowlist) rejection test mirroring the sibling write tools.