Context
The MCP tool loopover_get_automation_state (src/mcp/server.ts:2465, via getAutomationState at src/mcp/server.ts:4047-4075) computes a derived view (mode, agentPaused, autonomy, permissionReadiness, pendingActionCount) that GET /v1/repos/:owner/:repo/settings does not return (it returns only the raw/resolved settings row). The CLI already has WRITE-side mirrors for this same data (maintain pause/resume/set-level at loopover-mcp.js:2761-2778) but no read-side counterpart — the code comment at src/mcp/server.ts:4077-4080 explicitly calls setAgentPaused "the write-side counterpart to loopover_get_automation_state's read-only mode/agentPaused fields."
Requirements
- Add
GET /v1/repos/:owner/:repo/automation-state in src/api/routes.ts reusing the same computation getAutomationState performs, maintainer-gated like /settings.
- Add a
maintain automation-state CLI subcommand proxying it.
- Regenerate
npm run ui:openapi.
Deliverables
Test Coverage Requirements
99%+ Codecov patch coverage; note this includes an npm run ui:openapi regeneration which is itself a checked-in generated artifact (CI fails on drift).
Expected Outcome
The read-side automation state is available over REST/CLI, symmetric with the existing write-side maintain pause/resume/set-level.
Links & Resources
Precedent: maintain pause/resume/set-level (loopover-mcp.js:2761-2778) as the write-side CLI precedent for this exact settings row.
Context
The MCP tool
loopover_get_automation_state(src/mcp/server.ts:2465, viagetAutomationStateatsrc/mcp/server.ts:4047-4075) computes a derived view (mode,agentPaused,autonomy,permissionReadiness,pendingActionCount) thatGET /v1/repos/:owner/:repo/settingsdoes not return (it returns only the raw/resolved settings row). The CLI already has WRITE-side mirrors for this same data (maintain pause/resume/set-levelatloopover-mcp.js:2761-2778) but no read-side counterpart — the code comment atsrc/mcp/server.ts:4077-4080explicitly callssetAgentPaused"the write-side counterpart to loopover_get_automation_state's read-only mode/agentPaused fields."Requirements
GET /v1/repos/:owner/:repo/automation-stateinsrc/api/routes.tsreusing the same computationgetAutomationStateperforms, maintainer-gated like/settings.maintain automation-stateCLI subcommand proxying it.npm run ui:openapi.Deliverables
GET /v1/repos/:owner/:repo/automation-stateroutemaintain automation-stateCLI subcommandTest Coverage Requirements
99%+ Codecov patch coverage; note this includes an
npm run ui:openapiregeneration which is itself a checked-in generated artifact (CI fails on drift).Expected Outcome
The read-side automation state is available over REST/CLI, symmetric with the existing write-side
maintain pause/resume/set-level.Links & Resources
Precedent:
maintain pause/resume/set-level(loopover-mcp.js:2761-2778) as the write-side CLI precedent for this exact settings row.