@adhisang/minecraft-modding-mcp 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.0.0] - 2026-03-09
11
+
12
+ ### Added
13
+ - v3 entry tools: `inspect-minecraft`, `analyze-symbol`, `compare-minecraft`, `analyze-mod`, `validate-project`, and `manage-cache` now provide summary-first starting points for the main Minecraft, symbol, mod, validation, and cache workflows while keeping expert tools available for follow-up work.
14
+ - The new v3 entry tools share `detail` / `include` response shaping and always return `result.summary` inside the standard `{ result?, error?, meta }` envelope, reducing default payload size and making next actions explicit.
15
+ - `analyze-mod` now exposes `executionMode="preview" | "apply"` for safe remap planning and execution, and `manage-cache` now exposes the same preview/apply model for cache deletion, pruning, and rebuild workflows.
16
+
17
+ ### Documentation
18
+ - Added v3 entry-tool usage guidance, shared response-shaping notes, and entry-tool-first migration guidance to both READMEs.
19
+
20
+ ### Fixed
21
+ - `inspect-minecraft` now routes `subject.kind="workspace"` requests with `focus.kind="class" | "file" | "search"` through the matching task for `task=auto`, while preserving workspace-aware artifact resolution for focused file and search follow-up flows.
22
+ - `inspect-minecraft task=class-overview | class-source | class-members` now accepts `subject.kind="workspace"` with `focus.kind="class"` even when the focus omits an explicit artifact reference, reusing workspace version detection to resolve artifact context first.
23
+ - `validate-project task=project-summary` now keeps per-config Mixin validation failures inside the summary result as warnings and invalid counts instead of aborting the whole workspace run on the first bad config.
24
+ - `compare-minecraft` now accepts `sourcePriority` for class-diff requests, and `registry-diff` degrades to `summary.status="partial"` with recovery actions when only one side of detailed registry data can be loaded.
25
+ - `compare-minecraft task=versions` now sets `meta.truncated` with recovery actions when summary-mode class or registry samples are clipped, including mixed `include=["classes"]` / `["registry"]` requests where the other summary-side group was truncated.
26
+ - `manage-cache` now applies `selector.olderThan`, `mapping`, `scope`, `projectPath`, and normalized `jarPath` matching, exposes real cache health states (`stale`, `orphaned`, `corrupt`, `in_use`), and advances `list` pagination through `meta.pagination.nextCursor`.
27
+
10
28
  ## [2.1.0] - 2026-03-08
11
29
 
12
30
  ### Added
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
  It lets you explore decompiled Minecraft source, convert symbol names across four naming namespaces (`obfuscated`, `mojang`, `intermediary`, `yarn`), analyze and decompile Fabric/Forge/NeoForge mod JARs, validate Mixin and Access Widener files, read and patch NBT data, and query generated registry snapshots — all through a structured tool and resource interface designed for Claude Desktop, VS Code, and other MCP-capable clients.
15
15
 
16
- **29 tools** | **7 resources** | **4 namespace mappings** | **SQLite-backed cache**
16
+ **35 tools** (6 entry + 29 expert) | **7 resources** | **4 namespace mappings** | **SQLite-backed cache**
17
17
 
18
18
  ## Features
19
19
 
@@ -172,6 +172,29 @@ Pass environment variables to override defaults:
172
172
 
173
173
  ## Tool Surface
174
174
 
175
+ ### v3 Entry Tools
176
+
177
+ These are the default starting points for v3 workflows. They keep the public `{ result?, error?, meta }` envelope, always return `result.summary`, and share `detail: "summary" | "standard" | "full"` plus opt-in `include[]` groups. Mutating entry tools use `executionMode: "preview" | "apply"` so preview is explicit in the public contract.
178
+
179
+ | Tool | Purpose | Key Inputs | Key Outputs |
180
+ | --- | --- | --- | --- |
181
+ | `inspect-minecraft` | Start from a version, artifact, class, file, search query, or workspace and route to the most relevant Minecraft inspection flow | `task?`, `subject?`, `detail?`, `include?`, `limit?`, `cursor?`, `includeSnapshots?` | `result.summary`, `subject`, `artifact?`, `class?`, `search?`, `file?`, `files?` |
182
+ | `analyze-symbol` | One entry point for symbol existence checks, namespace mapping, lifecycle tracing, workspace symbol analysis, and API overview | `task`, `subject`, `version?`, `sourceMapping?`, `targetMapping?`, `projectPath?`, `classNameMapping?`, `signatureMode?`, `nameMode?`, `includeKinds?`, `maxRows?`, `maxCandidates?`, `detail?`, `include?` | `result.summary`, `match?`, `candidates?`, `ambiguity?`, `matrix?`, `workspace?` |
183
+ | `compare-minecraft` | Compare version pairs, class signatures, registries, or produce a migration-oriented overview | `task?`, `subject`, `detail?`, `include?`, `sourcePriority?`, `maxClassResults?`, `maxEntriesPerRegistry?`, `includeFullDiff?`, `limit?` | `result.summary`, `comparison`, `classes?`, `classDiff?`, `registry?`, `migration?` |
184
+ | `analyze-mod` | Metadata-first entry point for mod summary, decompile/search flows, class source, and safe remap previews/applies | `task`, `subject`, `query?`, `searchType?`, `targetMapping?`, `outputJar?`, `executionMode?`, `includeFiles?`, `maxFiles?`, `maxLines?`, `maxChars?`, `limit?`, `detail?`, `include?` | `result.summary`, `metadata?`, `decompile?`, `hits?`, `source?`, `operation?` |
185
+ | `validate-project` | Project-level validation entry for workspace summaries plus direct Mixin and Access Widener validation | `task`, `subject`, `version?`, `mapping?`, `sourcePriority?`, `scope?`, `preferProjectVersion?`, `preferProjectMapping?`, `sourceRoots?`, `configPaths?`, `minSeverity?`, `hideUncertain?`, `explain?`, `warningMode?`, `warningCategoryFilter?`, `treatInfoAsWarning?`, `includeIssues?`, `detail?`, `include?` | `result.summary`, `project`, `workspace?`, `issues?`, `recovery?` |
186
+ | `manage-cache` | User-facing cache summary, listing, verification, previewed deletion/pruning/rebuild, and explicit apply operations | `action`, `cacheKinds?`, `selector?`, `executionMode?`, `detail?`, `include?`, `limit?`, `cursor?` | `result.summary`, `stats?`, `cacheEntries?`, `operation?`, `meta.pagination.nextCursor?` |
187
+
188
+ `compare-minecraft` forwards `sourcePriority` for class-diff flows, matching `diff-class-signatures`.
189
+ `inspect-minecraft` also accepts `subject.kind="workspace"` with `focus.kind="class"` for `task="class-overview" | "class-source" | "class-members"` without requiring an explicit `artifact`; it resolves the artifact from the workspace version first.
190
+ `compare-minecraft` summary-mode version comparisons now expose clipped class and registry samples through `meta.truncated`, including mixed `include=["classes"]` / `["registry"]` requests where the other summary-side group was clipped.
191
+ When `registry-diff` can only load one side of detailed registry data, it returns `summary.status="partial"` plus recovery-oriented `nextActions` instead of failing the whole call.
192
+
193
+ `manage-cache` list pagination returns `meta.pagination.nextCursor`.
194
+ `selector.olderThan` accepts ISO-8601 durations such as `P30D`, `selector.status` uses the shared `healthy | partial | stale | orphaned | corrupt | in_use` vocabulary, and `jarPath` / `projectPath` matching normalizes WSL and Windows path forms before filtering.
195
+
196
+ If you already know the exact low-level operation you want, the retained expert tools below are still available and remain the fastest way to do narrow follow-up work.
197
+
175
198
  ### Source Exploration
176
199
 
177
200
  Tools for browsing Minecraft versions, resolving source artifacts, and reading/searching decompiled source code.
@@ -181,8 +204,8 @@ Tools for browsing Minecraft versions, resolving source artifacts, and reading/s
181
204
  | `list-versions` | List available Minecraft versions from Mojang manifest + local cache | `includeSnapshots?`, `limit?` | `result.latest`, `result.releases[]`, `meta.warnings[]` |
182
205
  | `resolve-artifact` | Resolve source artifact from `version` / `jar` / `coordinate` | `target`, `mapping?`, `sourcePriority?`, `allowDecompile?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `strictVersion?` | `artifactId`, `origin`, `mappingApplied`, `qualityFlags[]`, `artifactContents`, `adjacentSourceCandidates?`, `sampleEntries?`, `warnings[]` |
183
206
  | `find-class` | Resolve simple or fully-qualified class names inside an artifact | `className`, `artifactId`, `limit?` | `matches[]`, `total`, `warnings[]` |
184
- | `get-class-source` | Get class source by artifact target or resolve target on demand (`mode=metadata` by default) | `className`, `target`, `mode?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `strictVersion?`, `startLine?`, `endLine?`, `maxLines?`, `maxChars?`, `outputFile?` | `mode`, `sourceText`, `returnedRange`, `truncated`, `charsTruncated?`, `outputFile?`, `artifactId`, `returnedNamespace`, `artifactContents`, mapping/provenance metadata |
185
- | `get-class-members` | Get class fields/methods/constructors from bytecode | `className`, `target`, `mapping?`, `access?`, `includeInherited?`, `maxMembers?`, `strictVersion?` | `members.{constructors,fields,methods}`, `counts`, `truncated`, `context`, `returnedNamespace`, `artifactContents`, `warnings[]` |
207
+ | `get-class-source` | Get class source by artifact target or resolve target on demand (`mode=metadata` by default) | `className`, `target`, `mode?`, `mapping?`, `sourcePriority?`, `allowDecompile?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `strictVersion?`, `startLine?`, `endLine?`, `maxLines?`, `maxChars?`, `outputFile?` | `mode`, `sourceText`, `returnedRange`, `truncated`, `charsTruncated?`, `outputFile?`, `artifactId`, `returnedNamespace`, `artifactContents`, mapping/provenance metadata |
208
+ | `get-class-members` | Get class fields/methods/constructors from bytecode | `className`, `target`, `mapping?`, `sourcePriority?`, `allowDecompile?`, `access?`, `includeSynthetic?`, `includeInherited?`, `memberPattern?`, `maxMembers?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `strictVersion?` | `members.{constructors,fields,methods}`, `counts`, `truncated`, `context`, `returnedNamespace`, `artifactContents`, `warnings[]` |
186
209
  | `search-class-source` | Search indexed class source for symbols/text/path | `artifactId`, `query`, `intent?`, `match?`, `packagePrefix?`, `fileGlob?`, `symbolKind?`, `queryMode?`, `limit?`, `cursor?` | `hits[]`, `nextCursor?`, `mappingApplied`, `returnedNamespace`, `artifactContents` |
187
210
  | `get-artifact-file` | Read full source file with byte guard | `artifactId`, `filePath`, `maxBytes?` | `content`, `contentBytes`, `truncated`, `mappingApplied`, `returnedNamespace`, `artifactContents` |
188
211
  | `list-artifact-files` | List indexed source file paths with cursor pagination | `artifactId`, `prefix?`, `limit?`, `cursor?` | `items[]`, `nextCursor?`, `mappingApplied`, `artifactContents`, `warnings[]` |
@@ -194,7 +217,7 @@ Tools for comparing class/registry changes across Minecraft versions and tracing
194
217
 
195
218
  | Tool | Purpose | Key Inputs | Key Outputs |
196
219
  | --- | --- | --- | --- |
197
- | `trace-symbol-lifecycle` | Trace when `Class.method` exists across Minecraft versions (`descriptor` omitted = name-only lookup) | `symbol`, `descriptor?`, `fromVersion?`, `toVersion?`, `mapping?`, `sourcePriority?`, `maxVersions?`, `includeTimeline?` | `presence.firstSeen`, `presence.lastSeen`, `presence.missingBetween[]`, `presence.existsNow`, `timeline?`, `warnings[]` |
220
+ | `trace-symbol-lifecycle` | Trace when `Class.method` exists across Minecraft versions (`descriptor` omitted = name-only lookup) | `symbol`, `descriptor?`, `fromVersion?`, `toVersion?`, `mapping?`, `sourcePriority?`, `includeSnapshots?`, `maxVersions?`, `includeTimeline?` | `presence.firstSeen`, `presence.lastSeen`, `presence.missingBetween[]`, `presence.existsNow`, `timeline?`, `warnings[]` |
198
221
  | `diff-class-signatures` | Compare one class between two versions and return member deltas | `className`, `fromVersion`, `toVersion`, `mapping?`, `sourcePriority?`, `includeFullDiff?` | `classChange`, `constructors/methods/fields.{added,removed,modified}`, `modified`, `modified[].{key,changed,from?,to?}`, `summary`, `warnings[]` |
199
222
  | `compare-versions` | Compare class/registry changes between two versions | `fromVersion`, `toVersion`, `category?`, `packageFilter?`, `maxClassResults?` | `classes`, `registry`, `summary`, `warnings[]` |
200
223
 
@@ -332,6 +355,12 @@ Mod tool `jarPath` inputs are normalized to a canonical local `.jar` file path b
332
355
  `get-registry-data` now discards corrupt cached `registries.json` files, regenerates them when possible, and returns `ERR_REGISTRY_GENERATION_FAILED` if the regenerated snapshot is still unreadable.
333
356
  `get-registry-data` supports `includeData=false` to return registry names and counts without full entry bodies. `maxEntriesPerRegistry` caps returned entries per registry while preserving full `entryCount` and `registryEntryCounts`.
334
357
  Migration notes:
358
+ - Start with `inspect-minecraft` for version/artifact/class/file/search workflows before dropping to `list-versions`, `resolve-artifact`, `get-class-source`, `get-class-members`, `search-class-source`, `get-artifact-file`, or `list-artifact-files`.
359
+ - Start with `analyze-symbol` for symbol mapping/existence/lifecycle/workspace questions before using `find-mapping`, `resolve-method-mapping-exact`, `check-symbol-exists`, `trace-symbol-lifecycle`, `resolve-workspace-symbol`, or `get-class-api-matrix` directly.
360
+ - Start with `compare-minecraft` for version-pair, class diff, registry diff, and migration-summary flows before using `compare-versions`, `diff-class-signatures`, or `get-registry-data` directly.
361
+ - Start with `analyze-mod` for metadata-first mod inspection and safe remap previews/applies before using `analyze-mod-jar`, `decompile-mod-jar`, `get-mod-class-source`, `search-mod-source`, or `remap-mod-jar` directly.
362
+ - Start with `validate-project` for workspace summaries and direct Mixin / Access Widener validation before using `validate-mixin` or `validate-access-widener` directly.
363
+ - Start with `manage-cache` for cache inventory and safe cleanup; use `executionMode="preview"` to inspect deletion/prune/rebuild impact before `executionMode="apply"`.
335
364
  - Replace `resolve-artifact` `targetKind` + `targetValue` with `target: { kind, value }`.
336
365
  - Replace `get-class-source` / `get-class-members` top-level `artifactId` / `targetKind` / `targetValue` with `target: { type: "artifact", artifactId }` or `target: { type: "resolve", kind, value }`.
337
366
  - `resolve-method-mapping-exact` is method-only and no longer accepts `kind`.
@@ -0,0 +1,95 @@
1
+ import { type PathRuntimeInfo } from "./path-converter.js";
2
+ export declare const PUBLIC_CACHE_KINDS: readonly ["artifact-index", "downloads", "mapping", "registry", "decompiled-source", "mod-remap"];
3
+ export type PublicCacheKind = (typeof PUBLIC_CACHE_KINDS)[number];
4
+ export declare const CACHE_HEALTH_STATES: readonly ["healthy", "partial", "stale", "orphaned", "corrupt", "in_use"];
5
+ export type CacheHealthState = (typeof CACHE_HEALTH_STATES)[number];
6
+ export type CacheSelector = {
7
+ artifactId?: string;
8
+ version?: string;
9
+ jarPath?: string;
10
+ entryId?: string;
11
+ status?: CacheHealthState;
12
+ olderThan?: string;
13
+ mapping?: string;
14
+ scope?: string;
15
+ projectPath?: string;
16
+ };
17
+ export type CacheKindSummary = {
18
+ cacheKind: PublicCacheKind;
19
+ entryCount: number;
20
+ totalBytes: number;
21
+ status: CacheHealthState;
22
+ };
23
+ export type CacheEntry = {
24
+ cacheKind: PublicCacheKind;
25
+ entryId: string;
26
+ path: string;
27
+ sizeBytes: number;
28
+ status: CacheHealthState;
29
+ owner?: string;
30
+ meta?: Record<string, unknown>;
31
+ };
32
+ type CacheEntryPage = {
33
+ entries: CacheEntry[];
34
+ nextCursor?: string;
35
+ };
36
+ export type CacheRegistryConfig = {
37
+ cacheDir: string;
38
+ sqlitePath: string;
39
+ pathRuntimeInfo?: PathRuntimeInfo;
40
+ };
41
+ export interface CacheRegistry {
42
+ summarize(input: {
43
+ cacheKinds?: PublicCacheKind[];
44
+ selector?: CacheSelector;
45
+ }): Promise<{
46
+ kinds: Partial<Record<PublicCacheKind, CacheKindSummary>>;
47
+ }>;
48
+ listEntries(input: {
49
+ cacheKinds?: PublicCacheKind[];
50
+ selector?: CacheSelector;
51
+ limit?: number;
52
+ cursor?: string;
53
+ }): Promise<CacheEntryPage>;
54
+ inspectEntries(input: {
55
+ cacheKinds?: PublicCacheKind[];
56
+ selector?: CacheSelector;
57
+ limit?: number;
58
+ }): Promise<CacheEntry[]>;
59
+ verifyEntries(input: {
60
+ cacheKinds?: PublicCacheKind[];
61
+ selector?: CacheSelector;
62
+ }): Promise<{
63
+ checkedEntries: number;
64
+ unhealthyEntries: number;
65
+ warnings: string[];
66
+ }>;
67
+ deleteEntries(input: {
68
+ cacheKinds?: PublicCacheKind[];
69
+ selector?: CacheSelector;
70
+ executionMode: "preview" | "apply";
71
+ }): Promise<{
72
+ deletedEntries: number;
73
+ deletedBytes: number;
74
+ warnings: string[];
75
+ }>;
76
+ pruneEntries(input: {
77
+ cacheKinds?: PublicCacheKind[];
78
+ selector?: CacheSelector;
79
+ executionMode: "preview" | "apply";
80
+ }): Promise<{
81
+ deletedEntries: number;
82
+ deletedBytes: number;
83
+ warnings: string[];
84
+ }>;
85
+ rebuildEntries(input: {
86
+ cacheKinds?: PublicCacheKind[];
87
+ selector?: CacheSelector;
88
+ executionMode: "preview" | "apply";
89
+ }): Promise<{
90
+ rebuiltEntries: number;
91
+ warnings: string[];
92
+ }>;
93
+ }
94
+ export declare function createCacheRegistry(config: CacheRegistryConfig): CacheRegistry;
95
+ export {};