feat(agent): MCP automation-state read tool (advances #784) - #851
Conversation
Phase 3 (#784) MCP slice: `gittensory_get_automation_state(owner, repo)` surfaces a repo's agent automation posture for a maintainer's harness — the per-action autonomy levels, kill-switch / dry-run mode, GitHub write-permission readiness, the acting action classes, and the COUNT of auto_with_approval actions awaiting a decision. Repo-access scoped (consistent with gittensory_get_repo_context). Deliberately read-only and count-only: the full approval queue + accept/reject stay behind the maintainer-authed REST API (#779) and the dashboard/CLI surfaces, so the MCP tool never leaks the queue's action details. Does NOT close #784 — the dashboard slice is in flight via a contributor PR (#831), and the CLI `maintain` slice + the MCP accept/reject write path remain. Tests: a configured repo (autonomy, dry-run mode, write-ready, pending count) and an unknown/un-onboarded repo (unconfigured, not_required, no installation). New code 100% covered; MCP discovery/output-schema meta-tests green; full suite green (2120).
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
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 #851 +/- ##
=======================================
Coverage 96.68% 96.68%
=======================================
Files 108 108
Lines 14609 14621 +12
Branches 5288 5290 +2
=======================================
+ Hits 14125 14137 +12
Misses 105 105
Partials 379 379 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
gittensory · advisory review Reviewed 2 changed file(s) — two independent AI reviewers. Changed files: Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
Advances #784 (does not close it).
What & why
Phase 3 (#784) — MCP control-surface slice (read side). New MCP tool
gittensory_get_automation_state(owner, repo)surfaces a repo's agent automation posture so a maintainer's harness can read it:ready/reconsent_required/not_required),auto_with_approvalactions awaiting a maintainer decision.Repo-access scoped (consistent with
gittensory_get_repo_context).Scope boundary (so it doesn't step on contributor work)
maintainslice and the MCP accept/reject write path remain. This is one clean increment toward feat(agent): automation controls surface (dashboard + CLI + MCP) #784's "MCP: read autonomy state" deliverable.Tests
A configured repo (autonomy + dry-run mode + write-ready + pending count) and an unknown/un-onboarded repo (unconfigured,
not_required, no installation). New code 100% covered; MCP discovery/output-schema meta-tests green; full suite green (2120 passed).