feat(miner): expose status/doctor diagnostics via a read-only MCP tool - #5415
Conversation
Add gittensory_miner_status to the gittensory-miner MCP server (scaffold JSONbored#5153): returns { status, doctor } by reusing status.js's existing collectStatus (package/engine versions + skew, node, state-dir/config paths, and the resolved coding-agent driver -- provider name, model ENV-VAR NAME never its value, CLI-present boolean) and runDoctorChecks (Docker/CLI presence, config validity, ... as { name, ok, detail }). Reuses the same functions the CLI uses so the two can't drift. Returns only names/booleans/paths -- never any env-var value, token, key, or credential. Read-only; the readers are injectable for tests. Completes the read-only AMS MCP tool surface. Closes JSONbored#5154
|
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 #5415 +/- ##
=======================================
Coverage 94.45% 94.45%
=======================================
Files 553 553
Lines 44357 44357
Branches 14659 14659
=======================================
Hits 41898 41898
Misses 1784 1784
Partials 675 675
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-12 17:43:21 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory 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/gittensory-commands 🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Adds
gittensory_miner_statusto the gittensory-miner MCP server (scaffold #5153) — remote/agent-facing, read-only status + doctor diagnostics. This completes the read-only AMS MCP tool surface (status, portfolio, claims, event-ledger, governor-ledger, run-state, plan-store).What this adds
A single tool returning
{ status, doctor }, reusing the exact functions the CLI uses (requirement 6 — so the MCP output andgittensory-miner status/doctorcan never drift):status=collectStatus(): package/engine versions (and skew), node version, state-dir path, config-file path, and the resolved coding-agent driver — provider name, the model ENV-VAR NAME (never its value), and a CLI-present boolean (requirement 3).doctor=runDoctorChecks(): the same checksgittensory-miner doctorruns (Docker presence, CLI presence, config validity, …) as{ name, ok, detail }(requirement 2).Strictly read-only and secret-safe: only names / booleans / paths — never any env-var value, token, key, or credential (requirements 4, 5). The
status.jsreaders are unchanged (wrapped, not modified); the readers are injectable (options.collectStatus/options.runDoctorChecks) so tests are deterministic.Validation (local)
tsc --noEmit: 0 errors.vitestacross the affected files: 35/35 pass — new status cases assert the{ status, doctor }passthrough, the driver's env-var-NAME/CLI-boolean shape, and that no token/key-shaped secret appears anywhere in the serialized response.check-miner-package,docs:drift-check,git diff --check: clean. Rebased onto latest main; overlap-free at open time.Note: this change touches only
bin/+ tests + README (nolib/*.js), so it's outside vitest'scoverage.include; the tests above enforce full behavioral coverage regardless.Closes #5154