feat(miner): expose the persisted plan store via read-only MCP tools#5371
Conversation
Add gittensory_miner_list_plans and gittensory_miner_get_plan to the gittensory-miner MCP server (scaffold JSONbored#5153): list_plans wraps plan-store.js's listPlans (optional status filter); get_plan wraps loadPlan by planId, returning the full record or an explicit { planId, found:false } for an unknown id. Both are strictly read-only (never savePlan) and are documented as the store-backed AMS plan store, distinct from ORB's stateless gittensory_plan_status. The opener is injectable for tests. Closes JSONbored#5161
|
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 #5371 +/- ##
=======================================
Coverage 94.41% 94.41%
=======================================
Files 551 551
Lines 44168 44168
Branches 14632 14632
=======================================
Hits 41702 41702
Misses 1791 1791
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 15:22:47 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 two read-only tools to the gittensory-miner MCP server (scaffold #5153) for the persisted plan store — net-new coverage, since AMS's plan store survives across CLI invocations (unlike ORB's stateless
gittensory_plan_status, which reads the caller's in-memory plan object).What this adds
gittensory_miner_list_plans— wrapsplan-store.js's existinglistPlans, with an optionalstatusfilter (z.enum(PLAN_STATUSES)— no invented statuses). Returns{ planId, plan, status, updatedAt }records.gittensory_miner_get_plan— wrapsloadPlan(planId), returning{ found: true, plan }for an existing id or an explicit{ planId, found: false }for an unknown one (never throws — requirement 6).gittensory_plan_status(requirement 5).listPlans/loadPlan; neversavePlanor any DAG/planning logic. The store opener is injectable (MinerMcpServerOptions.openPlanStore) for tests. Noplan-store.jschange, no new files or dependencies.Validation (local)
tsc --noEmit: 0 errors.viteston the three affected files: 33/33 pass — new plan cases cover list (all + status-filtered), get for an existing id, get for an unknown id (explicit not-found), and an invariant asserting neither tool reachessavePlan(onlylistPlans/loadPlanare called).check-miner-package,docs:drift-check,git diff --check: all clean. Rebased onto latest main; overlap-free (this wraps existing readers, so it does not touchplan-store.js, which feat(miner): add schema-version migration runner across local stores #5364 is editing).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 #5161