Skip to content

REST + CLI mirror for loopover_get_automation_state #6742

Description

@JSONbored

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

  • GET /v1/repos/:owner/:repo/automation-state route
  • maintain automation-state CLI subcommand
  • Regenerated OpenAPI spec
  • Unit test

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions