@adhisang/minecraft-modding-mcp 2.0.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 +62 -0
- package/README.md +139 -30
- package/dist/cache-registry.d.ts +95 -0
- package/dist/cache-registry.js +541 -0
- package/dist/cli.js +31 -4
- package/dist/compat-stdio-transport.d.ts +2 -7
- package/dist/compat-stdio-transport.js +12 -154
- package/dist/entry-tools/analyze-mod-service.d.ts +207 -0
- package/dist/entry-tools/analyze-mod-service.js +253 -0
- package/dist/entry-tools/analyze-symbol-service.d.ts +209 -0
- package/dist/entry-tools/analyze-symbol-service.js +304 -0
- package/dist/entry-tools/compare-minecraft-service.d.ts +210 -0
- package/dist/entry-tools/compare-minecraft-service.js +397 -0
- package/dist/entry-tools/entry-tool-schema.d.ts +6 -0
- package/dist/entry-tools/entry-tool-schema.js +10 -0
- package/dist/entry-tools/inspect-minecraft-service.d.ts +1953 -0
- package/dist/entry-tools/inspect-minecraft-service.js +876 -0
- package/dist/entry-tools/manage-cache-service.d.ts +130 -0
- package/dist/entry-tools/manage-cache-service.js +229 -0
- package/dist/entry-tools/request-normalizers.d.ts +10 -0
- package/dist/entry-tools/request-normalizers.js +36 -0
- package/dist/entry-tools/response-contract.d.ts +44 -0
- package/dist/entry-tools/response-contract.js +96 -0
- package/dist/entry-tools/validate-project-service.d.ts +543 -0
- package/dist/entry-tools/validate-project-service.js +381 -0
- package/dist/index.js +495 -42
- package/dist/json-rpc-framing.d.ts +22 -0
- package/dist/json-rpc-framing.js +168 -0
- package/dist/mapping-pipeline-service.js +9 -1
- package/dist/mapping-service.d.ts +9 -0
- package/dist/mapping-service.js +183 -60
- package/dist/minecraft-explorer-service.d.ts +0 -1
- package/dist/minecraft-explorer-service.js +119 -23
- package/dist/mixin-validator.d.ts +24 -2
- package/dist/mixin-validator.js +223 -98
- package/dist/mod-decompile-service.d.ts +5 -0
- package/dist/mod-decompile-service.js +40 -5
- package/dist/mod-remap-service.js +142 -30
- package/dist/path-resolver.js +41 -4
- package/dist/registry-service.d.ts +10 -1
- package/dist/registry-service.js +154 -22
- package/dist/search-hit-accumulator.js +23 -2
- package/dist/source-jar-reader.js +16 -2
- package/dist/source-resolver.js +6 -7
- package/dist/source-service.d.ts +42 -4
- package/dist/source-service.js +781 -127
- package/dist/stdio-supervisor.d.ts +46 -0
- package/dist/stdio-supervisor.js +349 -0
- package/dist/storage/files-repo.d.ts +3 -9
- package/dist/storage/files-repo.js +66 -43
- package/dist/symbols/symbol-extractor.js +6 -4
- package/dist/tool-execution-gate.d.ts +15 -0
- package/dist/tool-execution-gate.js +58 -0
- package/dist/version-diff-service.js +10 -5
- package/dist/version-service.js +7 -2
- package/dist/workspace-mapping-service.js +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,68 @@ 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
|
+
|
|
28
|
+
## [2.1.0] - 2026-03-08
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- Source inspection tools now expose `artifactContents` so clients can tell whether a result came from a `source-jar` or `decompiled-binary`, whether non-Java resources are indexed, and whether source coverage is `full` or `partial`.
|
|
32
|
+
- `get-class-source`, `get-class-members`, `search-class-source`, and `get-artifact-file` now expose `returnedNamespace` to distinguish the namespace of returned content from the underlying artifact namespace (`mappingApplied`).
|
|
33
|
+
- Token-efficient response shaping options: `find-mapping`, `resolve-method-mapping-exact`, `resolve-workspace-symbol`, and `check-symbol-exists` now accept `maxCandidates`; `get-class-api-matrix` accepts `maxRows`; `diff-class-signatures` accepts `includeFullDiff`; `decompile-mod-jar` accepts `includeFiles` / `maxFiles`; `get-registry-data` accepts `includeData` / `maxEntriesPerRegistry`; `validate-mixin` accepts `includeIssues`.
|
|
34
|
+
- `validate-mixin` now reports per-result `validationStatus` (`full` / `partial` / `invalid`), member coverage counters (`summary.membersValidated` / `membersSkipped` / `membersMissing`), batch `summary.partial`, and scope/source-priority provenance fields (`requestedScope` / `appliedScope`, `requestedSourcePriority` / `appliedSourcePriority`) so partial validation is explicit.
|
|
35
|
+
- `validate-mixin` now supports `input.mode="project"` to recursively discover `*.mixins.json` under a workspace root and validate every referenced Mixin in one call.
|
|
36
|
+
- `validate-mixin` now adds `confidenceBreakdown` and `reportMode="summary-first"` so callers can see why confidence dropped and consume batch-oriented output without repeated per-result provenance/warning payloads.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
- `compare-versions` now applies `packageFilter` consistently to `classes.addedCount`, `removedCount`, and `unchanged`, so class summary counts reflect the same filtered package scope as the returned class lists.
|
|
40
|
+
- Heavy analysis tools are now serialized behind a bounded in-process queue, and queue overflow fails fast with `ERR_LIMIT_EXCEEDED` instead of amplifying concurrent load across the whole MCP transport.
|
|
41
|
+
- The stdio CLI entrypoint now supervises an internal worker process, automatically restarts it after an unexpected exit, replays MCP initialization for the live session, and turns in-flight crashes into retryable JSON-RPC request failures instead of a full transport disconnect.
|
|
42
|
+
- `trace-symbol-lifecycle` now uses strict method remapping when a descriptor is provided, falls back to name-only lookup when it is omitted, and surfaces real mapping input failures in warnings instead of collapsing them into generic lookup errors.
|
|
43
|
+
- `get-class-source` / `get-class-members` now infer a missing artifact version from `projectPath` when `preferProjectVersion=true`, making project-aware lookups more consistent for previously resolved artifacts.
|
|
44
|
+
- Error recovery payloads (`suggestedCall`) now use the current `target` object schema instead of deprecated `targetKind` / `targetValue` fields.
|
|
45
|
+
- `list-artifact-files` now warns when callers probe `assets/` or `data/` prefixes against the Java-source index, instead of silently returning an unexplained empty result.
|
|
46
|
+
- `artifactContents.sourceCoverage` now strictly reports `full` or `partial`, matching the documented contract instead of carrying an unreachable `unknown` branch in the exported type.
|
|
47
|
+
- `get-class-members` now rejects malformed field and method descriptors from corrupted bytecode with `ERR_INVALID_INPUT` instead of returning malformed Java signatures, and invalid `void` method arguments now report as method descriptor errors instead of misleading field descriptor errors.
|
|
48
|
+
- `resolve-artifact` now searches project-local and Gradle user-home Loom caches without auto-selecting unrelated mod/library source jars just because their filenames contain the requested Minecraft version.
|
|
49
|
+
- `resolve-artifact` and related version-target mapping failures now preserve `ERR_MAPPING_NOT_APPLIED` while adding `artifactOrigin` plus actionable recovery details for decompile-only artifacts.
|
|
50
|
+
- `remap-mod-jar` now detects Mojang-mapped Fabric/Quilt inputs, returns a copied output for `targetMapping="mojang"`, and fails fast with contextual diagnostics for unsupported Mojang-input `targetMapping="yarn"` requests.
|
|
51
|
+
- `resolve-workspace-symbol` now recognizes NeoForge ModDevGradle workspaces as `mojang` compile mappings instead of returning `mapping_unavailable`.
|
|
52
|
+
- `resolve-artifact`, `get-class-source`, and `get-class-members` now preserve `ERR_JAR_NOT_FOUND` for missing `target.kind=jar` paths instead of leaking raw filesystem `ENOENT` failures through the public contract.
|
|
53
|
+
- `get-registry-data` now invalidates corrupt cached `registries.json` snapshots, regenerates them on demand, and reports `ERR_REGISTRY_GENERATION_FAILED` when the regenerated snapshot is still unreadable.
|
|
54
|
+
- `validate-mixin` now retries with `sourcePriority="maven-first"` after a partial `loom-first` validation caused by mapping/signature resolution limits, reducing false warnings from Loom-only resolution paths.
|
|
55
|
+
- `validate-mixin` no longer emits schema-invalid `check-symbol-exists` recovery payloads in `suggestedCall`; unsupported parameters such as `scope` and `projectPath` are omitted from those calls.
|
|
56
|
+
- `validate-mixin` now lowers confidence for skipped member validation and exposes requested-vs-applied scope/source-priority details instead of making partial results look fully verified.
|
|
57
|
+
- `validate-mixin` now follows the resolved artifact namespace during bytecode lookup for non-vanilla scopes, so `scope="merged"` on Mojang-mapped Loom workspaces validates against merged class names instead of falling back to false partial results and retry-driven timeouts.
|
|
58
|
+
- Invalid `validate-mixin` requests now return the standard `ERR_INVALID_INPUT` envelope with `fieldErrors`, `hints`, and a mode-correct `suggestedCall` instead of the SDK's generic pre-validation text error.
|
|
59
|
+
- Bare string `target` inputs for `resolve-artifact`, `get-class-source`, and `get-class-members` now return `ERR_INVALID_INPUT` with schema-correct wrapper suggestions instead of generic object-schema failures.
|
|
60
|
+
- `validate-mixin` now classifies signature-loading/tool-limited target failures as `validation-incomplete` warnings instead of reporting them as missing classes.
|
|
61
|
+
- `check-symbol-exists` no longer repeats raw Loom tiny-cache miss warnings when Maven tiny mappings successfully satisfy the lookup; successful fallback now emits concise fallback context instead.
|
|
62
|
+
|
|
63
|
+
### Documentation
|
|
64
|
+
- Corrected the `compare-versions` README contract to document registry results under `result.registry`.
|
|
65
|
+
- Documented the new compact-response options, `summary-first` validate-mixin mode, bare-string `target` recovery guidance, and updated token-efficient examples in both READMEs.
|
|
66
|
+
|
|
67
|
+
### Performance
|
|
68
|
+
- `resolve-artifact`, `index-artifact`, and `get-runtime-metrics` now keep cache entry/byte accounting incrementally during ingest, reindex, cache hits, and eviction, avoiding repeated full-cache rescans after each artifact load.
|
|
69
|
+
- `find-mapping`, `get-class-api-matrix`, `resolve-workspace-symbol`, `check-symbol-exists`, and `validate-mixin` now reuse hot-path mapping graph paths, class remaps, and normalization work, reducing latency for repeated namespace lookups and large Mixin validation batches.
|
|
70
|
+
- Warm-cache source and mod workflows now avoid extra regex recompilation, statement-cache churn, and FIFO cache evictions across search, signature lookup, source resolution, and decompile paths.
|
|
71
|
+
|
|
10
72
|
## [2.0.0] - 2026-03-07
|
|
11
73
|
|
|
12
74
|
### Changed
|
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
|
-
**
|
|
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.
|
|
@@ -179,13 +202,13 @@ Tools for browsing Minecraft versions, resolving source artifacts, and reading/s
|
|
|
179
202
|
| Tool | Purpose | Key Inputs | Key Outputs |
|
|
180
203
|
| --- | --- | --- | --- |
|
|
181
204
|
| `list-versions` | List available Minecraft versions from Mojang manifest + local cache | `includeSnapshots?`, `limit?` | `result.latest`, `result.releases[]`, `meta.warnings[]` |
|
|
182
|
-
| `resolve-artifact` | Resolve source artifact from `version` / `jar` / `coordinate` | `target`, `mapping?`, `sourcePriority?`, `allowDecompile?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `strictVersion?` | `artifactId`, `origin`, `mappingApplied`, `qualityFlags[]`, `adjacentSourceCandidates?`, `sampleEntries?`, `warnings[]` |
|
|
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`, 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`, `warnings[]` |
|
|
186
|
-
| `search-class-source` | Search indexed class source for symbols/text/path | `artifactId`, `query`, `intent?`, `match?`, `packagePrefix?`, `fileGlob?`, `symbolKind?`, `queryMode?`, `limit?`, `cursor?` | `hits[]`, `nextCursor?`, `mappingApplied` |
|
|
187
|
-
| `get-artifact-file` | Read full source file with byte guard | `artifactId`, `filePath`, `maxBytes?` | `content`, `contentBytes`, `truncated`, `mappingApplied` |
|
|
188
|
-
| `list-artifact-files` | List indexed source file paths with cursor pagination | `artifactId`, `prefix?`, `limit?`, `cursor?` | `items[]`, `nextCursor?`, `mappingApplied` |
|
|
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[]` |
|
|
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` |
|
|
210
|
+
| `get-artifact-file` | Read full source file with byte guard | `artifactId`, `filePath`, `maxBytes?` | `content`, `contentBytes`, `truncated`, `mappingApplied`, `returnedNamespace`, `artifactContents` |
|
|
211
|
+
| `list-artifact-files` | List indexed source file paths with cursor pagination | `artifactId`, `prefix?`, `limit?`, `cursor?` | `items[]`, `nextCursor?`, `mappingApplied`, `artifactContents`, `warnings[]` |
|
|
189
212
|
| `index-artifact` | Rebuild index metadata for an existing artifact | `artifactId`, `force?` | `reindexed`, `reason`, `counts`, `indexedAt`, `durationMs` |
|
|
190
213
|
|
|
191
214
|
### Version Comparison & Symbol Tracking
|
|
@@ -194,9 +217,9 @@ 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 | `symbol`, `descriptor?`, `fromVersion?`, `toVersion?`, `mapping?`, `sourcePriority?`, `maxVersions?`, `includeTimeline?` | `presence.firstSeen`, `presence.lastSeen`, `presence.missingBetween[]`, `presence.existsNow`, `timeline?`, `warnings[]` |
|
|
198
|
-
| `diff-class-signatures` | Compare one class between two versions and return member deltas | `className`, `fromVersion`, `toVersion`, `mapping?`, `sourcePriority?` | `classChange`, `constructors/methods/fields.{added,removed,modified}`, `summary`, `warnings[]` |
|
|
199
|
-
| `compare-versions` | Compare class/registry changes between two versions | `fromVersion`, `toVersion`, `category?`, `packageFilter?`, `maxClassResults?` | `
|
|
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[]` |
|
|
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[]` |
|
|
222
|
+
| `compare-versions` | Compare class/registry changes between two versions | `fromVersion`, `toVersion`, `category?`, `packageFilter?`, `maxClassResults?` | `classes`, `registry`, `summary`, `warnings[]` |
|
|
200
223
|
|
|
201
224
|
### Mapping & Symbols
|
|
202
225
|
|
|
@@ -204,11 +227,11 @@ Tools for converting symbol names between namespaces and checking symbol existen
|
|
|
204
227
|
|
|
205
228
|
| Tool | Purpose | Key Inputs | Key Outputs |
|
|
206
229
|
| --- | --- | --- | --- |
|
|
207
|
-
| `find-mapping` | Find mapping candidates for class/field/method symbols between namespaces | `version`, `kind`, `name`, `owner?`, `descriptor?`, `sourceMapping`, `targetMapping`, `sourcePriority?`, `disambiguation?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `ambiguityReasons?`, `provenance?`, `meta.warnings[]` |
|
|
208
|
-
| `resolve-method-mapping-exact` | Resolve one method mapping with strict owner+name+descriptor matching | `version`, `name`, `owner`, `descriptor`, `sourceMapping`, `targetMapping`, `sourcePriority?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `provenance?`, `meta.warnings[]` |
|
|
209
|
-
| `get-class-api-matrix` | Show one class API as a mapping matrix (`obfuscated/mojang/intermediary/yarn`) | `version`, `className`, `classNameMapping`, `includeKinds?`, `sourcePriority?` | `classIdentity`, `rows[]`, `ambiguousRowCount?`, `meta.warnings[]` |
|
|
210
|
-
| `resolve-workspace-symbol` | Resolve compile-visible symbol names for a Gradle workspace (`build.gradle/.kts`) | `projectPath`, `version`, `kind`, `name`, `owner?`, `descriptor?`, `sourceMapping`, `sourcePriority?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `workspaceDetection`, `meta.warnings[]` |
|
|
211
|
-
| `check-symbol-exists` | Strict symbol presence check for class/field/method | `version`, `kind`, `name`, `owner?`, `descriptor?`, `sourceMapping`, `sourcePriority?`, `nameMode?`, `signatureMode?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `meta.warnings[]` |
|
|
230
|
+
| `find-mapping` | Find mapping candidates for class/field/method symbols between namespaces | `version`, `kind`, `name`, `owner?`, `descriptor?`, `sourceMapping`, `targetMapping`, `sourcePriority?`, `disambiguation?`, `maxCandidates?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `candidateCount`, `candidatesTruncated?`, `ambiguityReasons?`, `provenance?`, `meta.warnings[]` |
|
|
231
|
+
| `resolve-method-mapping-exact` | Resolve one method mapping with strict owner+name+descriptor matching | `version`, `name`, `owner`, `descriptor`, `sourceMapping`, `targetMapping`, `sourcePriority?`, `maxCandidates?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `candidateCount`, `candidatesTruncated?`, `provenance?`, `meta.warnings[]` |
|
|
232
|
+
| `get-class-api-matrix` | Show one class API as a mapping matrix (`obfuscated/mojang/intermediary/yarn`) | `version`, `className`, `classNameMapping`, `includeKinds?`, `sourcePriority?`, `maxRows?` | `classIdentity`, `rows[]`, `rowCount`, `rowsTruncated?`, `ambiguousRowCount?`, `meta.warnings[]` |
|
|
233
|
+
| `resolve-workspace-symbol` | Resolve compile-visible symbol names for a Gradle workspace (`build.gradle/.kts`) | `projectPath`, `version`, `kind`, `name`, `owner?`, `descriptor?`, `sourceMapping`, `sourcePriority?`, `maxCandidates?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `candidateCount`, `candidatesTruncated?`, `workspaceDetection`, `meta.warnings[]` |
|
|
234
|
+
| `check-symbol-exists` | Strict symbol presence check for class/field/method | `version`, `kind`, `name`, `owner?`, `descriptor?`, `sourceMapping`, `sourcePriority?`, `nameMode?`, `signatureMode?`, `maxCandidates?` | `querySymbol`, `mappingContext`, `resolved`, `status`, `resolvedSymbol?`, `candidates[]`, `candidateCount`, `candidatesTruncated?`, `meta.warnings[]` |
|
|
212
235
|
|
|
213
236
|
### NBT Utilities
|
|
214
237
|
|
|
@@ -227,10 +250,10 @@ Tools for extracting metadata from mod JARs, decompiling mod source, searching m
|
|
|
227
250
|
| Tool | Purpose | Key Inputs | Key Outputs |
|
|
228
251
|
| --- | --- | --- | --- |
|
|
229
252
|
| `analyze-mod-jar` | Extract mod metadata/dependencies/entrypoints from mod JAR | `jarPath`, `includeClasses?` | `modId`, `loader`, `jarKind`, `dependencies`, `entrypoints`, `mixinConfigs`, class stats |
|
|
230
|
-
| `decompile-mod-jar` | Decompile mod JAR and optionally return one class source | `jarPath`, `className?` | `outputDir`, `fileCount`, `files?`, `source?`, `warnings[]` |
|
|
253
|
+
| `decompile-mod-jar` | Decompile mod JAR and optionally return one class source | `jarPath`, `className?`, `includeFiles?`, `maxFiles?` | `outputDir`, `fileCount`, `files?`, `returnedFileCount?`, `filesTruncated?`, `filesOmitted?`, `source?`, `warnings[]` |
|
|
231
254
|
| `get-mod-class-source` | Read one class source from decompiled mod cache | `jarPath`, `className`, `maxLines?`, `maxChars?`, `outputFile?` | `className`, `content`, `totalLines`, `truncated?`, `charsTruncated?`, `outputFilePath?`, `warnings[]` |
|
|
232
255
|
| `search-mod-source` | Search decompiled mod source by class/method/field/content | `jarPath`, `query`, `searchType?`, `limit?` | `hits[]`, `totalHits`, `truncated`, `warnings[]` |
|
|
233
|
-
| `remap-mod-jar` | Remap a Fabric mod JAR
|
|
256
|
+
| `remap-mod-jar` | Remap a Fabric/Quilt mod JAR to yarn/mojang names; Mojang-mapped inputs are copied for `targetMapping="mojang"` | `inputJar`, `targetMapping`, `mcVersion?`, `outputJar?` | `outputJar`, `mcVersion`, `fromMapping`, `targetMapping`, `resolvedTargetNamespace`, `warnings[]` |
|
|
234
257
|
|
|
235
258
|
### Validation
|
|
236
259
|
|
|
@@ -238,7 +261,7 @@ Tools for validating Mixin source and Access Widener files against a target Mine
|
|
|
238
261
|
|
|
239
262
|
| Tool | Purpose | Key Inputs | Key Outputs |
|
|
240
263
|
| --- | --- | --- | --- |
|
|
241
|
-
| `validate-mixin` | Parse/validate Mixin source against target Minecraft version | `input`, `sourceRoots?`, `version`, `mapping?`, `sourcePriority?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `minSeverity?`, `hideUncertain?`, `warningMode?`, `preferProjectMapping?`, `reportMode?`, `warningCategoryFilter?`, `treatInfoAsWarning?`, `explain?` | `mode`, `results[]`, `summary`, `issueSummary?`, `toolHealth?`, `confidenceScore?` |
|
|
264
|
+
| `validate-mixin` | Parse/validate Mixin source against target Minecraft version | `input`, `sourceRoots?`, `version`, `mapping?`, `sourcePriority?`, `projectPath?`, `scope?`, `preferProjectVersion?`, `minSeverity?`, `hideUncertain?`, `warningMode?`, `preferProjectMapping?`, `reportMode?`, `warningCategoryFilter?`, `treatInfoAsWarning?`, `explain?`, `includeIssues?` | `mode`, `results[].validationStatus`, `summary.partial`, `issueSummary?`, `provenance?`, `incompleteReasons?`, `toolHealth?`, `confidenceScore?`, `confidenceBreakdown?` |
|
|
242
265
|
| `validate-access-widener` | Parse/validate Access Widener content against target version | `content`, `version`, `mapping?`, `sourcePriority?` | `valid`, `issues[]`, `warnings[]`, `summary` |
|
|
243
266
|
|
|
244
267
|
### Registry & Diagnostics
|
|
@@ -247,7 +270,7 @@ Tools for querying generated registry data and inspecting server runtime state.
|
|
|
247
270
|
|
|
248
271
|
| Tool | Purpose | Key Inputs | Key Outputs |
|
|
249
272
|
| --- | --- | --- | --- |
|
|
250
|
-
| `get-registry-data` | Get generated registry snapshots (blocks/items/entities etc.) | `version`, `registry?` | `registries`
|
|
273
|
+
| `get-registry-data` | Get generated registry snapshots (blocks/items/entities etc.) | `version`, `registry?`, `includeData?`, `maxEntriesPerRegistry?` | `registries`, `data?`, `entryCount`, `returnedEntryCount?`, `registryEntryCounts?`, `dataTruncated?`, `warnings[]` |
|
|
251
274
|
| `get-runtime-metrics` | Inspect runtime counters and latency snapshots | none | `result.*` runtime metrics, `meta` envelope |
|
|
252
275
|
|
|
253
276
|
### Tool Constraints
|
|
@@ -255,11 +278,33 @@ Tools for querying generated registry data and inspecting server runtime state.
|
|
|
255
278
|
`resolve-artifact` now takes `target: { kind, value }`.
|
|
256
279
|
`get-class-source` requires `target`, where `target.type="artifact"` selects a previously resolved `artifactId` and `target.type="resolve"` supplies `{ kind, value }` directly.
|
|
257
280
|
`get-class-members` requires the same `target` object shape and still needs a binary jar (`binaryJarPath`) to read `.class` entries.
|
|
281
|
+
`get-class-members` returns `ERR_INVALID_INPUT` when a classfile contains malformed field or method descriptors instead of emitting malformed Java signature text from corrupted bytecode.
|
|
282
|
+
Malformed `void` usage outside method return positions is rejected with descriptor-specific errors, so invalid method arguments now report as method descriptor failures instead of field descriptor failures.
|
|
283
|
+
Error `suggestedCall` payloads now use the same `target` object schema instead of legacy `targetKind` / `targetValue` fields.
|
|
258
284
|
Positive integer tool parameters accept numeric strings such as `"10"` in addition to JSON numbers.
|
|
259
285
|
This numeric-string coercion only applies to documented top-level tool arguments; nested `typedJson` payloads and JSON Patch `value` objects are preserved verbatim.
|
|
260
|
-
`
|
|
286
|
+
`resolve-artifact`, `get-class-source`, `get-class-members`, `search-class-source`, `get-artifact-file`, and `list-artifact-files` include `artifactContents` so clients can see whether the backing artifact is `source-jar` or `decompiled-binary`, whether resources are indexed (`resourcesIncluded=false` today), and whether source coverage is always `full` or `partial`.
|
|
287
|
+
`get-class-source`, `get-class-members`, `search-class-source`, and `get-artifact-file` include `returnedNamespace`; compare it with `mappingApplied` when a tool returns remapped symbols instead of raw indexed source text.
|
|
288
|
+
`list-artifact-files` warns when you probe `assets/` or `data/` prefixes because the current index stores Java source only, not non-Java resources.
|
|
289
|
+
`get-class-source` and `get-class-members` can infer a missing artifact version from `projectPath` when `preferProjectVersion=true` and artifact metadata does not already contain a version.
|
|
290
|
+
Heavy analysis tools (`trace-symbol-lifecycle`, `diff-class-signatures`, `compare-versions`, `find-mapping`, `resolve-method-mapping-exact`, `get-class-api-matrix`, `get-registry-data`) are serialized inside the server to protect stdio transport stability; when the queue is full they fail fast with `ERR_LIMIT_EXCEEDED`.
|
|
291
|
+
The CLI stdio entrypoint now runs a supervised worker process. If the worker exits unexpectedly, the wrapper restarts it, replays MCP initialization for the current session, and keeps the same stdio connection usable; any request that was already in flight fails with a retryable JSON-RPC internal error instead of tearing down the whole transport.
|
|
292
|
+
`find-mapping`, `resolve-method-mapping-exact`, `resolve-workspace-symbol`, and `check-symbol-exists` accept `maxCandidates` to cap `candidates[]`; `candidateCount` always reports the full pre-truncation candidate total and `candidatesTruncated=true` signals clipping.
|
|
293
|
+
`get-class-api-matrix` accepts `maxRows`; `rowCount` reports the full pre-truncation row total and `rowsTruncated=true` signals clipping.
|
|
294
|
+
`diff-class-signatures` supports `includeFullDiff=false` to omit `from`/`to` snapshots from `modified[]` entries and keep only `key` plus `changed`.
|
|
295
|
+
`validate-mixin` requires `input.mode` to be exactly one of `inline`, `path`, `paths`, `config`, or `project`. `input.path`/`input.paths[]` are normalized for host/WSL path formats before file reads. `input.configPaths[]` reads mixin config JSON files and auto-discovers source files for batch validation (`sourceRoots[]` override lookup roots; otherwise common roots like `src/main/java`, `src/client/java`, `common/src/{main,client}/java`, `fabric/src/{main,client}/java`, `neoforge/src/{main,client}/java`, `forge/src/{main,client}/java`, and `quilt/src/{main,client}/java` are auto-detected from configured mixin classes). `input.mode="project"` recursively discovers `**/*.mixins.json` under `input.path`, then runs the same config-driven batch validation with `projectPath` defaulting to that workspace root.
|
|
261
296
|
`validate-mixin` always returns `mode`, `results[]`, and `summary`; single-input modes still use a one-element `results[]` array.
|
|
297
|
+
`validate-mixin` supports `includeIssues=false` for summary-first workflows that do not need per-result `issues[]`; combine it with `reportMode=compact` and `warningMode=aggregated` to keep responses small.
|
|
298
|
+
`reportMode=summary-first` hoists shared provenance, warnings, and incomplete-reason summaries to the top level while trimming duplicate per-result metadata.
|
|
299
|
+
`validate-mixin` per-result responses now include `validationStatus` (`full`, `partial`, `invalid`) plus `summary.membersValidated`, `summary.membersSkipped`, and `summary.membersMissing`; `quickSummary` now includes member coverage counts instead of only issue counts.
|
|
300
|
+
`validate-mixin` batch `summary` now includes `partial` so callers can distinguish fully clean results from tool-limited-but-non-failing results.
|
|
301
|
+
`validate-mixin` now reports `validation-incomplete` when target metadata cannot be loaded reliably, instead of misclassifying those tool-limited cases as confirmed missing classes.
|
|
302
|
+
`validate-mixin` responses now include `confidenceBreakdown` alongside `confidenceScore`, exposing the base score plus the penalties that lowered confidence.
|
|
262
303
|
`validate-mixin` per-result responses include `provenance.resolutionNotes?` when mapping fallback occurs.
|
|
304
|
+
`validate-mixin` provenance now exposes `requestedScope` / `appliedScope` and `requestedSourcePriority` / `appliedSourcePriority` so fallback and retry behavior is explicit.
|
|
305
|
+
`scope="loader"` currently resolves the same artifact class as `scope="merged"`; keep using `scope` to declare intent, but expect the same underlying lookup path today.
|
|
306
|
+
For non-vanilla scopes such as `scope="merged"`, `validate-mixin` now performs bytecode lookup in the resolved artifact namespace before remapping members back to the requested namespace, so Mojang-mapped Loom workspaces validate against merged class names instead of reporting false partial results.
|
|
307
|
+
`validate-mixin` automatically retries with `sourcePriority="maven-first"` after a partial `loom-first` validation caused by mapping/signature resolution limits, and records that retry in warnings plus provenance notes.
|
|
263
308
|
`validate-mixin` validates `@Invoker` targets against methods only and `@Accessor` targets against fields only.
|
|
264
309
|
`validate-mixin` parser supports both `.class` literal targets and `targets = "..."` / `targets = {"a", "b"}` string forms.
|
|
265
310
|
`validate-mixin` parser handles multi-line annotations between `@Shadow`/`@Accessor` and declarations, and strips inline annotations from declaration lines.
|
|
@@ -267,13 +312,17 @@ This numeric-string coercion only applies to documented top-level tool arguments
|
|
|
267
312
|
`validate-mixin` issues and `structuredWarnings` include `category` (`mapping`, `configuration`, `validation`, `resolution`, or `parse`) to distinguish setup/tooling/parser limits from real validation errors.
|
|
268
313
|
`validate-mixin` supports post-filtering with `minSeverity`, `hideUncertain`, and `warningCategoryFilter`; `treatInfoAsWarning=false` suppresses info-level entries in `structuredWarnings`.
|
|
269
314
|
`validate-mixin` per-result responses include `resolvedMembers?` tracking each member's resolution status (`resolved` or `not-found`).
|
|
270
|
-
`validate-mixin` with `explain=true` enriches each issue with `explanation` and `suggestedCall` (tool + params) for agent-driven recovery.
|
|
315
|
+
`validate-mixin` with `explain=true` enriches each issue with `explanation` and `suggestedCall` (tool + params) for agent-driven recovery; generated `check-symbol-exists` recovery payloads now stay within that tool's public schema.
|
|
316
|
+
Schema validation failures now also return the standard `ERR_INVALID_INPUT` envelope with `fieldErrors`, `hints`, and a mode-correct `suggestedCall` for common `validate-mixin` mistakes such as passing raw source text directly as `input`.
|
|
317
|
+
Bare string `target` values now return `ERR_INVALID_INPUT` with a schema-correct `suggestedCall` wrapper for `resolve-artifact`, `get-class-source`, and `get-class-members`.
|
|
271
318
|
`validate-mixin` summary uses `processingErrors`, `totalValidationErrors`, and `totalValidationWarnings`; the deprecated `summary.errors` field was removed.
|
|
319
|
+
`check-symbol-exists` suppresses raw `No Loom tiny mapping files matched version ...` noise when Maven tiny mappings successfully satisfy the lookup; successful fallback now reports a single concise warning instead of repeating the Loom miss on every result.
|
|
272
320
|
`resolve-artifact` with `target.kind=version` uses Loom cache discovery from `projectPath` only when `mapping=mojang`; mapping failures include `searchedPaths`, `candidateArtifacts`, and `recommendedCommand` in error details.
|
|
273
321
|
`resolve-artifact` supports `scope` (`vanilla`/`merged`/`loader`) and optional `preferProjectVersion=true` to override `target.value` from `gradle.properties` (`minecraft_version`, `mc_version`, `minecraftVersion`) when `target.kind=version`.
|
|
274
322
|
`resolve-artifact` with `target.kind=coordinate` searches the local Maven repository, the local Gradle `modules-2` cache, and configured `MCP_SOURCE_REPOS` before reporting `ERR_SOURCE_NOT_FOUND`.
|
|
323
|
+
`resolve-artifact`, `get-class-source`, and `get-class-members` now preserve `ERR_JAR_NOT_FOUND` for missing or inaccessible `target.kind=jar` paths instead of surfacing raw filesystem exceptions.
|
|
275
324
|
`resolve-artifact` includes `sampleEntries` only when a source JAR is resolved; decompile-only paths leave it unset.
|
|
276
|
-
`resolve-artifact` adds `qualityFlags=["partial-source-no-net-minecraft"]` and a warning when a merged Loom source candidate does not contain `net.minecraft` sources; `get-class-source` now bypasses that sibling `*-sources.jar` during binary fallback so the fallback can actually reach the binary artifact.
|
|
325
|
+
`resolve-artifact` adds `qualityFlags=["partial-source-no-net-minecraft"]` and a warning when a merged Loom source candidate does not contain `net.minecraft` sources; only candidates that still look like Minecraft source artifacts are auto-selected, while version-matching mod/library source jars remain diagnostics only. `get-class-source` now bypasses that sibling `*-sources.jar` during binary fallback so the fallback can actually reach the binary artifact.
|
|
277
326
|
`find-class` returns type symbols (`class`/`interface`/`enum`/`record`) only; fully-qualified lookups are filtered by exact FQCN/file path to avoid false negatives when many classes share the same simple name.
|
|
278
327
|
`find-class` returns an explanatory warning when an `obfuscated` artifact is queried with names that look like deobfuscated Mojang classes.
|
|
279
328
|
`find-class` suppresses non-vanilla matches for vanilla-looking queries on artifacts flagged with `partial-source-no-net-minecraft`; in that situation it returns a warning instead of unrelated modded classes.
|
|
@@ -297,18 +346,28 @@ Mod tool `jarPath` inputs are normalized to a canonical local `.jar` file path b
|
|
|
297
346
|
`search-mod-source` enforces `query.length <= 200` and `limit <= 200`.
|
|
298
347
|
`search-mod-source` detects source-only jars and searches `.java` entries directly without decompilation.
|
|
299
348
|
`get-mod-class-source` supports `maxLines`, `maxChars`, and `outputFile` with truncation behavior aligned to `get-class-source`; when `outputFile` is set, the written file reflects applied truncation.
|
|
349
|
+
`decompile-mod-jar` supports `includeFiles=false` to skip the full class list and `maxFiles` to cap it when you only need counts or a sample. `returnedFileCount`, `filesTruncated`, and `filesOmitted` make the shaping explicit.
|
|
300
350
|
`find-mapping` returns `ambiguityReasons` when `status=ambiguous` to explain why candidates could not be uniquely resolved.
|
|
301
351
|
`get-class-api-matrix` returns `ambiguousRowCount` when one or more rows required ambiguity fallback.
|
|
302
352
|
`check-symbol-exists` defaults to strict FQCN class inputs; set `nameMode=auto` to allow short class names (ambiguous matches return `status=ambiguous`).
|
|
303
353
|
`check-symbol-exists` supports `signatureMode=name-only` to match methods by owner+name without requiring a descriptor. Single match returns `resolved`; multiple overloads return `ambiguous` with all candidates.
|
|
304
354
|
`check-symbol-exists` always validates input shape first and returns `ERR_INVALID_INPUT` for invalid symbol combinations, even when mapping data is unavailable.
|
|
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.
|
|
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`.
|
|
305
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"`.
|
|
306
364
|
- Replace `resolve-artifact` `targetKind` + `targetValue` with `target: { kind, value }`.
|
|
307
365
|
- Replace `get-class-source` / `get-class-members` top-level `artifactId` / `targetKind` / `targetValue` with `target: { type: "artifact", artifactId }` or `target: { type: "resolve", kind, value }`.
|
|
308
366
|
- `resolve-method-mapping-exact` is method-only and no longer accepts `kind`.
|
|
309
|
-
- Replace `validate-mixin` `source` / `sourcePath` / `sourcePaths` / `mixinConfigPath` / `sourceRoot` with `input.mode` plus `input.source` / `input.path` / `input.paths[]` / `input.configPaths[]` and `sourceRoots[]`. Use `summary.processingErrors` instead of `summary.errors`.
|
|
367
|
+
- Replace `validate-mixin` `source` / `sourcePath` / `sourcePaths` / `mixinConfigPath` / `sourceRoot` with `input.mode` plus `input.source` / `input.path` / `input.paths[]` / `input.configPaths[]` and `sourceRoots[]`. Use `input.mode="project"` when you want to discover `*.mixins.json` automatically from a workspace root. Use `summary.processingErrors` instead of `summary.errors`.
|
|
310
368
|
- `search-class-source` removed `snippetLines`, `includeDefinition`, and `includeOneHop`; responses now contain compact `hits[]` plus `nextCursor?` only, and `symbolKind` may only be used with `intent=symbol`.
|
|
311
369
|
`remap-mod-jar` requires Java to be installed and only supports Fabric/Quilt mods.
|
|
370
|
+
Mojang-mapped inputs can be returned as-is for `targetMapping="mojang"`. `targetMapping="yarn"` still expects an intermediary-built input jar.
|
|
312
371
|
|
|
313
372
|
## Resources
|
|
314
373
|
|
|
@@ -448,7 +507,8 @@ List source files under a specific package to understand project structure:
|
|
|
448
507
|
"className": "net.minecraft.server.Main",
|
|
449
508
|
"fromVersion": "1.20.1",
|
|
450
509
|
"toVersion": "1.21.10",
|
|
451
|
-
"mapping": "obfuscated"
|
|
510
|
+
"mapping": "obfuscated",
|
|
511
|
+
"includeFullDiff": false
|
|
452
512
|
}
|
|
453
513
|
}
|
|
454
514
|
```
|
|
@@ -470,6 +530,10 @@ Get a high-level summary of what changed between two releases, including class a
|
|
|
470
530
|
}
|
|
471
531
|
```
|
|
472
532
|
|
|
533
|
+
Registry deltas are returned under `result.registry` (not `registryDiff`).
|
|
534
|
+
When `packageFilter` is provided, `result.classes.addedCount`, `removedCount`, and `unchanged`
|
|
535
|
+
are all scoped to that filtered package set.
|
|
536
|
+
|
|
473
537
|
### Mapping & Symbols
|
|
474
538
|
|
|
475
539
|
#### Lookup mapping candidates
|
|
@@ -483,6 +547,7 @@ Get a high-level summary of what changed between two releases, including class a
|
|
|
483
547
|
"sourceMapping": "obfuscated",
|
|
484
548
|
"targetMapping": "mojang",
|
|
485
549
|
"sourcePriority": "loom-first",
|
|
550
|
+
"maxCandidates": 10,
|
|
486
551
|
"disambiguation": {
|
|
487
552
|
"ownerHint": "net.minecraft"
|
|
488
553
|
}
|
|
@@ -529,11 +594,14 @@ Get a high-level summary of what changed between two releases, including class a
|
|
|
529
594
|
"version": "1.21.10",
|
|
530
595
|
"className": "a.b.C",
|
|
531
596
|
"classNameMapping": "obfuscated",
|
|
532
|
-
"includeKinds": "class,field,method"
|
|
597
|
+
"includeKinds": "class,field,method",
|
|
598
|
+
"maxRows": 100
|
|
533
599
|
}
|
|
534
600
|
}
|
|
535
601
|
```
|
|
536
602
|
|
|
603
|
+
Add `maxCandidates` or `maxRows` when you only need the top matches or a bounded API slice.
|
|
604
|
+
|
|
537
605
|
#### Resolve workspace compile-visible symbol
|
|
538
606
|
```json
|
|
539
607
|
{
|
|
@@ -649,6 +717,7 @@ Decompile all classes and optionally retrieve a specific class inline:
|
|
|
649
717
|
"tool": "decompile-mod-jar",
|
|
650
718
|
"arguments": {
|
|
651
719
|
"jarPath": "/path/to/mymod-1.0.0.jar",
|
|
720
|
+
"includeFiles": false,
|
|
652
721
|
"className": "com.example.mymod.MyMod"
|
|
653
722
|
}
|
|
654
723
|
}
|
|
@@ -663,7 +732,8 @@ After decompilation, read any class without re-decompiling:
|
|
|
663
732
|
"tool": "get-mod-class-source",
|
|
664
733
|
"arguments": {
|
|
665
734
|
"jarPath": "/path/to/mymod-1.0.0.jar",
|
|
666
|
-
"className": "com.example.mymod.mixin.PlayerMixin"
|
|
735
|
+
"className": "com.example.mymod.mixin.PlayerMixin",
|
|
736
|
+
"maxLines": 120
|
|
667
737
|
}
|
|
668
738
|
}
|
|
669
739
|
```
|
|
@@ -699,6 +769,8 @@ Remap a Fabric mod from `intermediary` to `yarn` names for easier reading:
|
|
|
699
769
|
}
|
|
700
770
|
```
|
|
701
771
|
|
|
772
|
+
If the input jar was already built with Mojang mappings, use `targetMapping: "mojang"` to get a copied output jar and a `fromMapping: "mojang"` result.
|
|
773
|
+
|
|
702
774
|
### Validation
|
|
703
775
|
|
|
704
776
|
#### Validate Mixin source
|
|
@@ -714,7 +786,33 @@ Check a Mixin class source for correctness against a target Minecraft version:
|
|
|
714
786
|
"source": "@Mixin(PlayerEntity.class)\npublic abstract class PlayerMixin {\n @Inject(method = \"tick\", at = @At(\"HEAD\"))\n private void onTick(CallbackInfo ci) {}\n}"
|
|
715
787
|
},
|
|
716
788
|
"version": "1.21.10",
|
|
717
|
-
"mapping": "yarn"
|
|
789
|
+
"mapping": "yarn",
|
|
790
|
+
"reportMode": "compact",
|
|
791
|
+
"warningMode": "aggregated",
|
|
792
|
+
"includeIssues": false
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
```
|
|
796
|
+
|
|
797
|
+
#### Validate all Mixins in a project
|
|
798
|
+
|
|
799
|
+
Discover `*.mixins.json` files from a workspace root and validate every referenced Mixin in one call:
|
|
800
|
+
|
|
801
|
+
```json
|
|
802
|
+
{
|
|
803
|
+
"tool": "validate-mixin",
|
|
804
|
+
"arguments": {
|
|
805
|
+
"input": {
|
|
806
|
+
"mode": "project",
|
|
807
|
+
"path": "/workspace/modid"
|
|
808
|
+
},
|
|
809
|
+
"version": "1.21.10",
|
|
810
|
+
"projectPath": "/workspace/modid",
|
|
811
|
+
"preferProjectVersion": true,
|
|
812
|
+
"preferProjectMapping": true,
|
|
813
|
+
"reportMode": "compact",
|
|
814
|
+
"warningMode": "aggregated",
|
|
815
|
+
"includeIssues": false
|
|
718
816
|
}
|
|
719
817
|
}
|
|
720
818
|
```
|
|
@@ -735,7 +833,10 @@ Run the same validation settings against multiple Mixin source files:
|
|
|
735
833
|
]
|
|
736
834
|
},
|
|
737
835
|
"version": "1.21.10",
|
|
738
|
-
"mapping": "yarn"
|
|
836
|
+
"mapping": "yarn",
|
|
837
|
+
"reportMode": "compact",
|
|
838
|
+
"warningMode": "aggregated",
|
|
839
|
+
"includeIssues": false
|
|
739
840
|
}
|
|
740
841
|
}
|
|
741
842
|
```
|
|
@@ -765,7 +866,8 @@ Retrieve the full set of generated registries (blocks, items, entities, etc.) fo
|
|
|
765
866
|
{
|
|
766
867
|
"tool": "get-registry-data",
|
|
767
868
|
"arguments": {
|
|
768
|
-
"version": "1.21.10"
|
|
869
|
+
"version": "1.21.10",
|
|
870
|
+
"includeData": false
|
|
769
871
|
}
|
|
770
872
|
}
|
|
771
873
|
```
|
|
@@ -779,7 +881,8 @@ Fetch only a specific registry type:
|
|
|
779
881
|
"tool": "get-registry-data",
|
|
780
882
|
"arguments": {
|
|
781
883
|
"version": "1.21.10",
|
|
782
|
-
"registry": "minecraft:block"
|
|
884
|
+
"registry": "minecraft:block",
|
|
885
|
+
"maxEntriesPerRegistry": 50
|
|
783
886
|
}
|
|
784
887
|
}
|
|
785
888
|
```
|
|
@@ -809,6 +912,9 @@ Check server performance counters, cache sizes, and latency snapshots:
|
|
|
809
912
|
}
|
|
810
913
|
```
|
|
811
914
|
|
|
915
|
+
Cache entry counts and byte accounting are maintained incrementally during `resolve-artifact`, `index-artifact`, cache hits, and eviction, so `get-runtime-metrics` remains cheap even after repeated artifact loads.
|
|
916
|
+
Repeated mapping-heavy workflows such as `find-mapping`, `get-class-api-matrix`, `resolve-workspace-symbol`, `check-symbol-exists`, and `validate-mixin` also reuse hot-path resolution work to keep large batches responsive.
|
|
917
|
+
|
|
812
918
|
## Mapping Policy
|
|
813
919
|
|
|
814
920
|
### Namespace Definitions
|
|
@@ -838,6 +944,9 @@ Symbol query inputs use `kind` + `name` + optional `owner`/`descriptor`:
|
|
|
838
944
|
- for unobfuscated versions (for example 26.1+), requesting `intermediary` / `yarn` falls back to `obfuscated` with a warning.
|
|
839
945
|
- `mojang` requires source-backed artifacts; decompile-only paths are rejected with `ERR_MAPPING_NOT_APPLIED`.
|
|
840
946
|
|
|
947
|
+
When `trace-symbol-lifecycle` omits `descriptor`, the server resolves methods by owner+name and warns if overload ambiguity prevents a unique answer.
|
|
948
|
+
For decompile-only `ERR_MAPPING_NOT_APPLIED` failures, error details include `artifactOrigin`, `nextAction`, and `suggestedCall` so clients can recover without guessing.
|
|
949
|
+
|
|
841
950
|
If `find-class` or `get-class-source` returns no hit on an `obfuscated` artifact for names like `net.minecraft.world.item.Item`, the tool now warns that `obfuscated` means Mojang's obfuscated runtime names and recommends retrying with `mapping="mojang"` or translating via `find-mapping`.
|
|
842
951
|
|
|
843
952
|
Method descriptor precision is best on Tiny-backed paths (`intermediary`/`yarn`). For `obfuscated <-> mojang`, Mojang `client_mappings` do not carry JVM descriptors, so descriptor queries may fallback to name matching and emit a warning.
|
|
@@ -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 {};
|