Context
gittensory-miner status / gittensory-miner doctor already compute and print state-dir paths, engine-version skew, Docker/Claude-CLI/Codex-CLI presence, and config validity, but none of this is reachable over MCP today. A companion status --json driver-info section (resolved MINER_CODING_AGENT_PROVIDER, the relevant model-env-var name, and CLI-presence booleans) is landing separately. This is distinct from the rate-limit telemetry (#4837) and event-ledger scrape (#4841) issues, which are metrics/observability feeds — this is specifically the human-facing status/doctor output made available to an MCP-connected agent.
Dependencies
Requires the MCP scaffold issue in this same batch (gittensory-miner-mcp bin entry) to land first — this tool is added onto that server. It also benefits from the companion status --json driver-info section (MINER_CODING_AGENT_PROVIDER resolution, model-env-var name, CLI-presence booleans): if that piece is still in flight when this issue is picked up, ship the state-dir/version-skew/Docker-CLI-presence/config-validity portion first and add the driver-info fields in a fast-follow once available — do not guess at driver-info field names or values.
Requirements
- Add a new tool (e.g.
gittensory_miner_status) to the AMS MCP server scaffolded in the companion scaffold issue.
- The tool must return the same fields
gittensory-miner status/doctor already compute: state-dir paths, engine-version skew, Docker presence (boolean), Claude-CLI presence (boolean), Codex-CLI presence (boolean), and config validity.
- Once the companion
status --json driver section is available, additionally return: the resolved MINER_CODING_AGENT_PROVIDER value, the name (never the value) of the relevant model env var, and CLI-presence booleans for that provider.
- The tool must never return secret values — only names of env vars and booleans indicating presence/validity; never the contents of any env var, token, key, or credential.
- The tool must be strictly read-only: no writes to any state file, config file, or ledger, and no side effects beyond reading and reporting already-computed status.
- Reuse the existing status/doctor computation logic rather than duplicating it — call into whatever function(s) the CLI commands already use, so the MCP tool and the CLI output can never drift apart.
Deliverables / Acceptance Criteria
Test Coverage Requirements
This PR must ship with full test coverage for every changed line and branch — the repo's Codecov patch gate requires 99%+ coverage and the house standard is to aim for 100%, including both sides of every conditional/nullish-coalescing branch introduced. Add: (1) unit tests covering the tool's success path (all fields present, CLI tools detected/not detected) and failure paths (missing state dir, invalid config), (2) an invariant test asserting the tool's output never contains a value matching a secret-shaped pattern (env var contents, tokens, keys) — only names and booleans, and (3) no regression test is needed since this is new functionality, not a bug fix.
Codecov visibility note: packages/gittensory-miner/**, apps/gittensory-miner-ui/**, and apps/gittensory-miner-extension/** currently sit entirely outside vitest's coverage.include glob, so codecov/patch cannot measure changes there yet — closing that gap is exactly what #4864 and #4865 (in this same milestone) do. Any part of this change under packages/gittensory-engine/src/** or the repo's own src/** remains fully Codecov-instrumented as usual. Either way, this does not lower the bar: treat the 100%-including-invariants-and-regression target above as the enforced house standard regardless of what Codecov can currently see, and it becomes gate-enforced for real once #4864/#4865 ship.
Expected Outcome
An operator or an MCP-connected agent can query miner health/diagnostics remotely, seeing the same status/doctor data available locally today, without shelling into the machine.
Links & Resources
Context
gittensory-miner status/gittensory-miner doctoralready compute and print state-dir paths, engine-version skew, Docker/Claude-CLI/Codex-CLI presence, and config validity, but none of this is reachable over MCP today. A companionstatus --jsondriver-info section (resolvedMINER_CODING_AGENT_PROVIDER, the relevant model-env-var name, and CLI-presence booleans) is landing separately. This is distinct from the rate-limit telemetry (#4837) and event-ledger scrape (#4841) issues, which are metrics/observability feeds — this is specifically the human-facing status/doctor output made available to an MCP-connected agent.Dependencies
Requires the MCP scaffold issue in this same batch (
gittensory-miner-mcpbin entry) to land first — this tool is added onto that server. It also benefits from the companionstatus --jsondriver-info section (MINER_CODING_AGENT_PROVIDER resolution, model-env-var name, CLI-presence booleans): if that piece is still in flight when this issue is picked up, ship the state-dir/version-skew/Docker-CLI-presence/config-validity portion first and add the driver-info fields in a fast-follow once available — do not guess at driver-info field names or values.Requirements
gittensory_miner_status) to the AMS MCP server scaffolded in the companion scaffold issue.gittensory-miner status/doctoralready compute: state-dir paths, engine-version skew, Docker presence (boolean), Claude-CLI presence (boolean), Codex-CLI presence (boolean), and config validity.status --jsondriver section is available, additionally return: the resolvedMINER_CODING_AGENT_PROVIDERvalue, the name (never the value) of the relevant model env var, and CLI-presence booleans for that provider.Deliverables / Acceptance Criteria
Test Coverage Requirements
This PR must ship with full test coverage for every changed line and branch — the repo's Codecov patch gate requires 99%+ coverage and the house standard is to aim for 100%, including both sides of every conditional/nullish-coalescing branch introduced. Add: (1) unit tests covering the tool's success path (all fields present, CLI tools detected/not detected) and failure paths (missing state dir, invalid config), (2) an invariant test asserting the tool's output never contains a value matching a secret-shaped pattern (env var contents, tokens, keys) — only names and booleans, and (3) no regression test is needed since this is new functionality, not a bug fix.
Codecov visibility note:
packages/gittensory-miner/**,apps/gittensory-miner-ui/**, andapps/gittensory-miner-extension/**currently sit entirely outside vitest'scoverage.includeglob, socodecov/patchcannot measure changes there yet — closing that gap is exactly what #4864 and #4865 (in this same milestone) do. Any part of this change underpackages/gittensory-engine/src/**or the repo's ownsrc/**remains fully Codecov-instrumented as usual. Either way, this does not lower the bar: treat the 100%-including-invariants-and-regression target above as the enforced house standard regardless of what Codecov can currently see, and it becomes gate-enforced for real once #4864/#4865 ship.Expected Outcome
An operator or an MCP-connected agent can query miner health/diagnostics remotely, seeing the same status/doctor data available locally today, without shelling into the machine.
Links & Resources
discover#4837 (rate-limit telemetry) and Add a push/scrape surface for the event ledger #4841 (event-ledger scrape) — related but distinct observability surfaces