feat(miner): scaffold the gittensory-miner MCP stdio server#5254
Conversation
Add a second bin entry, gittensory-miner-mcp, mirroring the packages/gittensory-mcp
harness (MCP SDK server + stdio transport). It ships exactly one trivial health-check
tool, gittensory_miner_ping, returning a static {status,tool} object -- no AMS state
read, no arguments -- so future AMS-state-reading tools (status/doctor, portfolio
dashboard, claim-ledger listing) have a real server to be added to.
- new bin/gittensory-miner-mcp.js (executable; exported factory for in-process tests)
- register the bin + @modelcontextprotocol/sdk dependency in package.json (+ lockfile)
- smoke test drives the server over an in-memory transport, asserting the ping response,
the single-tool listing, and the static invariant with no on-disk AMS state
- README pointer for the new entry point and its current single-tool scope
Closes JSONbored#5153
|
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 #5254 +/- ##
=======================================
Coverage 94.27% 94.27%
=======================================
Files 474 474
Lines 40078 40078
Branches 14612 14612
=======================================
Hits 37782 37782
Misses 1609 1609
Partials 687 687
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-12 12:07:55 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
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.
|
Scaffolds the first MCP entry point under
packages/gittensory-miner, mirroring thepackages/gittensory-mcp/bin/gittensory-mcp.jsharness (MCP SDK server + stdio transport). Independently shippable; unblocks the other MCP-exposure issues in this batch (status/doctor diagnostics, portfolio dashboard, claim-ledger listing).(Resubmit of #5232, which auto-closed on two CI-only failures now fixed: a missing
.d.tsdeclaration for the new bin (TS7016 typecheck) and thecheck-miner-packageallowlist rejecting the new bin. Both resolved and verified locally — see Validation.)What this adds
bin/gittensory-miner-mcp.js— new executable booting anMcpServeroverStdioServerTransport. Exports acreateMinerMcpServer()factory so tests drive it in-process; the transport only starts when run directly as the bin (realpath-matched for npm/npx symlinks).bin/gittensory-miner-mcp.d.ts— hand-written declarations (per the package's.d.tsconvention) forcreateMinerMcpServer()andMINER_PING_STATUS.gittensory_miner_ping— health check returning a static{ "status": "ok", "tool": "gittensory_miner_ping" }, empty input schema, no AMS-state reads. No status/doctor, portfolio, or claim tools here — those are explicit follow-ups.package.json— registers thegittensory-miner-mcpbin, adds@modelcontextprotocol/sdk@1.29.0(pinned to matchgittensory-mcp), node---checks the new bin inbuild. Lockfile updated.scripts/check-miner-package.mjs— broadened the bin allowlist from the exactgittensory-miner.jstogittensory-miner*.{js,d.ts}so the pack validator accepts the new flat bin + its declaration (still flat — no subdirectories, per the chore(miner): scaffold calibration module types (#2332) #3704 regression note).Validation (local)
tsc --noEmit: 0 errors (the.d.tscloses the TS7016 that sank feat(miner): scaffold the gittensory-miner MCP stdio server #5232).viteston the three affected files —miner-mcp-scaffold(in-memory-transport smoke: lists exactlygittensory_miner_ping, asserts the static response + invariant),miner-package-skeleton(updated exact-binassertion), andcheck-miner-package(the validator test that failed on feat(miner): scaffold the gittensory-miner MCP stdio server #5232): 16/16 pass.node scripts/check-miner-package.mjs,command-reference:check,docs:drift-check,engine-parity:drift-check,git diff --check: all clean.Note:
packages/gittensory-miner/**sits outside vitest'scoverage.include, socodecov/patchcannot measure it yet (closed separately by #4864/#4865); the tests above enforce full behavioral coverage regardless.Closes #5153