feat(api): add GET /v1/repos/:owner/:repo/automation-state + CLI mirror - #6967
Closed
galuis116 wants to merge 1 commit into
Closed
feat(api): add GET /v1/repos/:owner/:repo/automation-state + CLI mirror#6967galuis116 wants to merge 1 commit into
galuis116 wants to merge 1 commit into
Conversation
loopover_get_automation_state (src/mcp/server.ts) had no REST or CLI-accessible mirror, unlike its write-side counterparts (loopover_set_agent_paused, loopover_set_action_autonomy) which are reachable via PUT /settings and loopover-mcp maintain pause|resume|set-level. Extracted the tool's response-building logic into a shared buildAutomationStateResponse (src/automation-state.ts) so the MCP tool and the new REST route can never drift, added the REST route with the same session/static-mcp repo-access gate as the sibling issue-quality route, and registered the CLI's stdio mirror tool.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This was referenced Jul 17, 2026
JSONbored
reviewed
Jul 17, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
Merge conflicts:
This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/loopover/pull/6967/conflicts) or the command line to resolve conflicts before continuing.
src/mcp/server.ts
test/unit/mcp-tool-rename-aliases.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
loopover_get_automation_state(an MCP tool insrc/mcp/server.ts) had no REST or CLI-accessible mirror, unlike its write-side counterpartsloopover_set_agent_paused/loopover_set_action_autonomy, which are reachable viaPUT /settingsandloopover-mcp maintain pause|resume|set-level.buildAutomationStateResponse(newsrc/automation-state.ts) so the MCP tool and the new REST route can never drift on the data they return.GET /v1/repos/:owner/:repo/automation-state, gated with the same session/static-mcp repo-access check as the siblingissue-qualityroute (requireSessionRepoAccess+ the coarse path-allowlist), and registered it in the CLI's stdio mirror asloopover_get_automation_state.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #6742
Validation
git diff --checknpm run actionlint(no workflow changes in this PR)npm run typechecknpm run test:coveragelocally (targeted: the new/changed test files plus the existingmcp-automation-state.test.tsandmcp-tool-rename-aliases.test.tsall pass;mcp-cli-lint-pr-text.test.ts/mcp-cli-slop-risk.test.ts's pre-existing "non-regular file" symlink tests fail locally only because Windows requires elevated privileges to create symlinks -- unrelated to this diff and not exercised by it)npm run test:workers(not applicable to this change)npm run build:mcp(not applicable to this change)npm run test:mcp-pack(not applicable to this change)npm run ui:openapi:check(this route is not part of the curated public OpenAPI surface, same as its siblingmaintainer-noiseroute; regeneration produced no diff)npm run ui:lint(no UI changes in this PR)npm run ui:typecheck(no UI changes in this PR)npm run ui:build(no UI changes in this PR)npm audit --audit-level=moderate(no dependency changes in this PR)If any required check was skipped, explain why:
npm run docs:drift-checkandnpm run manifest:drift-checkwere also run locally and pass.Safety
forbidden_repo), and a successful owner-session read.UI Evidencesection below with JPG/JPEG or PNG screenshots. (N/A -- this PR has no UI/visual surface; it adds a backend REST route + CLI/MCP mirror only.)Notes
test/unit/mcp-tool-rename-aliases.test.tsfrom 75 to 76 to account for the newly registeredloopover_get_automation_stateCLI tool, following that file's existing per-PR pin-bump convention.