feat(miner): expose the claim ledger as a read-only MCP tool#5326
Conversation
Add gittensory_miner_list_claims to the gittensory-miner MCP server (scaffold JSONbored#5153): a read-only listing of the local claim ledger (repo, issue number, status, claimed-at, note) via the existing listClaims query, with optional repoFullName/status filters passed through. Exposes no claim/release mutation and no conflict-resolution logic. Opens the ledger only when invoked and closes any it opened; the opener is injectable for tests. Adds zod (matching the mcp package) for the tool's optional-filter input schema. Closes JSONbored#5156
|
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 #5326 +/- ##
=======================================
Coverage 94.40% 94.40%
=======================================
Files 550 550
Lines 44106 44116 +10
Branches 14631 14631
=======================================
+ Hits 41639 41649 +10
Misses 1792 1792
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 14:14:20 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_list_claimsto the gittensory-miner MCP server (scaffold #5153, extended by #5155 in #5298) — remote/agent-facing, read-only visibility into which issues this miner currently holds, without shelling into the machine.What this adds
listClaims()query (packages/gittensory-miner/lib/claim-ledger.js) — no new query/filter logic added to claim-ledger.js. Returns each entry verbatim: repo, issue number, status, claimed-at, note.repoFullName/statuspass straight through tolistClaims; omitted → the full unfiltered list.listClaims; noclaim/release/expiremutation and no conflict-resolution logic (that stays Wire claim-conflict resolution end-to-end #4848's maintainer-only domain). Opens the ledger only when invoked and closes any store it opened; the opener is injectable (MinerMcpServerOptions.openClaimLedger) so tests need no on-disk state.zod(matching the mcp package) is added for the optional-filter input schema.Validation (local)
tsc --noEmit: 0 errors.viteston the three affected files (miner-mcp-scaffold,miner-package-skeleton,check-miner-package): 24/24 pass — new claim cases cover the full list, filter-by-repo, filter-by-status, the empty ledger, and an invariant asserting the tool never reaches a mutating ledger method (recordClaim/claimIssue/releaseClaim/expireClaim).node scripts/check-miner-package.mjs,docs: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 #5156