mcdev-mcp 1.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/LICENSE +77 -0
- package/README.md +365 -0
- package/dist/callgraph/index.d.ts +14 -0
- package/dist/callgraph/index.d.ts.map +1 -0
- package/dist/callgraph/index.js +201 -0
- package/dist/callgraph/index.js.map +1 -0
- package/dist/callgraph/query.d.ts +20 -0
- package/dist/callgraph/query.d.ts.map +1 -0
- package/dist/callgraph/query.js +95 -0
- package/dist/callgraph/query.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +318 -0
- package/dist/cli.js.map +1 -0
- package/dist/decompiler/download.d.ts +31 -0
- package/dist/decompiler/download.d.ts.map +1 -0
- package/dist/decompiler/download.js +145 -0
- package/dist/decompiler/download.js.map +1 -0
- package/dist/decompiler/downloader.d.ts +7 -0
- package/dist/decompiler/downloader.d.ts.map +1 -0
- package/dist/decompiler/downloader.js +4 -0
- package/dist/decompiler/downloader.js.map +1 -0
- package/dist/decompiler/index.d.ts +16 -0
- package/dist/decompiler/index.d.ts.map +1 -0
- package/dist/decompiler/index.js +74 -0
- package/dist/decompiler/index.js.map +1 -0
- package/dist/decompiler/remapper.d.ts +9 -0
- package/dist/decompiler/remapper.d.ts.map +1 -0
- package/dist/decompiler/remapper.js +174 -0
- package/dist/decompiler/remapper.js.map +1 -0
- package/dist/decompiler/tools.d.ts +3 -0
- package/dist/decompiler/tools.d.ts.map +1 -0
- package/dist/decompiler/tools.js +79 -0
- package/dist/decompiler/tools.js.map +1 -0
- package/dist/decompiler/vineflower.d.ts +3 -0
- package/dist/decompiler/vineflower.d.ts.map +1 -0
- package/dist/decompiler/vineflower.js +37 -0
- package/dist/decompiler/vineflower.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/indexer/index.d.ts +17 -0
- package/dist/indexer/index.d.ts.map +1 -0
- package/dist/indexer/index.js +134 -0
- package/dist/indexer/index.js.map +1 -0
- package/dist/indexer/parser.d.ts +11 -0
- package/dist/indexer/parser.d.ts.map +1 -0
- package/dist/indexer/parser.js +188 -0
- package/dist/indexer/parser.js.map +1 -0
- package/dist/indexer/types.d.ts +14 -0
- package/dist/indexer/types.d.ts.map +1 -0
- package/dist/indexer/types.js +2 -0
- package/dist/indexer/types.js.map +1 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +2 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/source-store.d.ts +43 -0
- package/dist/storage/source-store.d.ts.map +1 -0
- package/dist/storage/source-store.js +279 -0
- package/dist/storage/source-store.js.map +1 -0
- package/dist/tools/index.d.ts +503 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +535 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/utils/config.d.ts +13 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +12 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/paths.d.ts +30 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +131 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/types.d.ts +79 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +2 -0
- package/dist/utils/types.js.map +1 -0
- package/dist/utils/version-manifest.d.ts +10 -0
- package/dist/utils/version-manifest.d.ts.map +1 -0
- package/dist/utils/version-manifest.js +64 -0
- package/dist/utils/version-manifest.js.map +1 -0
- package/dist/version-manager.d.ts +11 -0
- package/dist/version-manager.d.ts.map +1 -0
- package/dist/version-manager.js +29 -0
- package/dist/version-manager.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
import { sourceStore } from '../storage/index.js';
|
|
2
|
+
import { versionManager } from '../version-manager.js';
|
|
3
|
+
import { findCallers, findCallees } from '../callgraph/query.js';
|
|
4
|
+
import { hasCallgraphDb } from '../callgraph/index.js';
|
|
5
|
+
import { getAvailableMinecraftVersions, getIndexedVersions, isVersionIndexed, getMinecraftSourceDir } from '../utils/paths.js';
|
|
6
|
+
import * as fs from 'fs';
|
|
7
|
+
function getEffectiveVersion(explicitVersion) {
|
|
8
|
+
if (explicitVersion) {
|
|
9
|
+
const sourceDir = getMinecraftSourceDir(explicitVersion);
|
|
10
|
+
if (!fs.existsSync(sourceDir)) {
|
|
11
|
+
return {
|
|
12
|
+
version: '',
|
|
13
|
+
error: `Version ${explicitVersion} not initialized. STOP and ask the USER to run this command in their terminal:\n node dist/cli.js init -v ${explicitVersion}\n\nThis will download, decompile, and index Minecraft ${explicitVersion} sources (including callgraph).`
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (!isVersionIndexed(explicitVersion)) {
|
|
17
|
+
return {
|
|
18
|
+
version: '',
|
|
19
|
+
error: `Version ${explicitVersion} not indexed. STOP and ask the USER to run this command in their terminal:\n node dist/cli.js init -v ${explicitVersion}\n\nThis will index Minecraft ${explicitVersion} sources (including callgraph).`
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return { version: explicitVersion };
|
|
23
|
+
}
|
|
24
|
+
const activeVersion = versionManager.getVersion();
|
|
25
|
+
if (!activeVersion) {
|
|
26
|
+
return {
|
|
27
|
+
version: '',
|
|
28
|
+
error: `No Minecraft version is currently set.
|
|
29
|
+
|
|
30
|
+
STOP and ask the USER which version they want to use, then call mc_set_version.
|
|
31
|
+
Or, provide a 'version' parameter in your tool call.
|
|
32
|
+
|
|
33
|
+
To see available versions, use mc_list_versions.`
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return { version: activeVersion };
|
|
37
|
+
}
|
|
38
|
+
function ensureVersionSet() {
|
|
39
|
+
const activeVersion = versionManager.getVersion();
|
|
40
|
+
if (!activeVersion) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
if (!sourceStore.getVersion() || sourceStore.getVersion() !== activeVersion) {
|
|
44
|
+
sourceStore.setVersion(activeVersion);
|
|
45
|
+
}
|
|
46
|
+
return activeVersion;
|
|
47
|
+
}
|
|
48
|
+
export const mcSetVersionTool = {
|
|
49
|
+
name: 'mc_set_version',
|
|
50
|
+
description: 'Set the active Minecraft version for subsequent operations. Must be called before using other tools, or provide a version parameter to each tool call.',
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
version: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Minecraft version (e.g., "1.21.1")',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
required: ['version'],
|
|
60
|
+
},
|
|
61
|
+
handler: async (args) => {
|
|
62
|
+
const sourceDir = getMinecraftSourceDir(args.version);
|
|
63
|
+
if (!fs.existsSync(sourceDir)) {
|
|
64
|
+
return {
|
|
65
|
+
content: [{
|
|
66
|
+
type: 'text',
|
|
67
|
+
text: `Version ${args.version} not initialized.
|
|
68
|
+
|
|
69
|
+
STOP and ask the USER to run this command in their terminal:
|
|
70
|
+
node dist/cli.js init -v ${args.version}
|
|
71
|
+
|
|
72
|
+
This will download, decompile, and index Minecraft ${args.version} sources (including callgraph).`,
|
|
73
|
+
}],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (!isVersionIndexed(args.version)) {
|
|
77
|
+
return {
|
|
78
|
+
content: [{
|
|
79
|
+
type: 'text',
|
|
80
|
+
text: `Version ${args.version} not indexed.
|
|
81
|
+
|
|
82
|
+
STOP and ask the USER to run this command in their terminal:
|
|
83
|
+
node dist/cli.js init -v ${args.version}
|
|
84
|
+
|
|
85
|
+
This will index Minecraft ${args.version} sources (including callgraph).`,
|
|
86
|
+
}],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
versionManager.setVersion(args.version);
|
|
90
|
+
sourceStore.setVersion(args.version);
|
|
91
|
+
const hasCallgraph = hasCallgraphDb(args.version);
|
|
92
|
+
return {
|
|
93
|
+
content: [{
|
|
94
|
+
type: 'text',
|
|
95
|
+
text: `Active version set to ${args.version}.\nIndexed: yes\nCallgraph: ${hasCallgraph ? 'yes' : 'no'}`,
|
|
96
|
+
}],
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
export const mcListVersionsTool = {
|
|
101
|
+
name: 'mc_list_versions',
|
|
102
|
+
description: 'List all available Minecraft versions and their initialization status. Use this to see which versions are ready to use.',
|
|
103
|
+
inputSchema: {
|
|
104
|
+
type: 'object',
|
|
105
|
+
properties: {},
|
|
106
|
+
required: [],
|
|
107
|
+
},
|
|
108
|
+
handler: async () => {
|
|
109
|
+
const cachedVersions = getAvailableMinecraftVersions();
|
|
110
|
+
const indexedVersions = getIndexedVersions();
|
|
111
|
+
if (cachedVersions.length === 0) {
|
|
112
|
+
return {
|
|
113
|
+
content: [{
|
|
114
|
+
type: 'text',
|
|
115
|
+
text: `No Minecraft versions found.
|
|
116
|
+
|
|
117
|
+
Run this command to initialize a version:
|
|
118
|
+
node dist/cli.js init -v <version>
|
|
119
|
+
|
|
120
|
+
Example:
|
|
121
|
+
node dist/cli.js init -v 1.21.1`,
|
|
122
|
+
}],
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const versions = cachedVersions.map(v => ({
|
|
126
|
+
version: v,
|
|
127
|
+
decompiled: true,
|
|
128
|
+
indexed: indexedVersions.includes(v),
|
|
129
|
+
callgraph: hasCallgraphDb(v),
|
|
130
|
+
}));
|
|
131
|
+
const output = versions.map(v => {
|
|
132
|
+
const status = [];
|
|
133
|
+
status.push(v.decompiled ? 'decompiled' : 'not decompiled');
|
|
134
|
+
status.push(v.indexed ? 'indexed' : 'not indexed');
|
|
135
|
+
status.push(v.callgraph ? 'callgraph' : 'no callgraph');
|
|
136
|
+
return `${v.version}: ${status.join(', ')}`;
|
|
137
|
+
}).join('\n');
|
|
138
|
+
const activeVersion = versionManager.getVersion();
|
|
139
|
+
return {
|
|
140
|
+
content: [{
|
|
141
|
+
type: 'text',
|
|
142
|
+
text: `Available Minecraft versions:\n${output}${activeVersion ? `\n\nActive version: ${activeVersion}` : '\n\nNo active version set. Use mc_set_version to set one.'}`,
|
|
143
|
+
}],
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
export const mcSearchTool = {
|
|
148
|
+
name: 'mc_search',
|
|
149
|
+
description: 'Search for Minecraft or Fabric API classes, methods, or fields by name pattern. Returns matching results with their full names and source locations.',
|
|
150
|
+
inputSchema: {
|
|
151
|
+
type: 'object',
|
|
152
|
+
properties: {
|
|
153
|
+
query: {
|
|
154
|
+
type: 'string',
|
|
155
|
+
description: 'The search query - class, method, or field name (or partial name)',
|
|
156
|
+
},
|
|
157
|
+
type: {
|
|
158
|
+
type: 'string',
|
|
159
|
+
enum: ['class', 'method', 'field'],
|
|
160
|
+
description: 'Optional: filter by type (class, method, or field)',
|
|
161
|
+
},
|
|
162
|
+
version: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
description: 'Optional: Minecraft version to use (e.g., "1.21.1"). If not provided, uses the active version set by mc_set_version.',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
required: ['query'],
|
|
168
|
+
},
|
|
169
|
+
handler: async (args) => {
|
|
170
|
+
const { version, error } = getEffectiveVersion(args.version);
|
|
171
|
+
if (error) {
|
|
172
|
+
return { content: [{ type: 'text', text: error }] };
|
|
173
|
+
}
|
|
174
|
+
if (!sourceStore.getVersion() || sourceStore.getVersion() !== version) {
|
|
175
|
+
sourceStore.setVersion(version);
|
|
176
|
+
}
|
|
177
|
+
const results = sourceStore.search(args.query, args.type);
|
|
178
|
+
if (results.length === 0) {
|
|
179
|
+
return {
|
|
180
|
+
content: [{
|
|
181
|
+
type: 'text',
|
|
182
|
+
text: `No results found for "${args.query}"${args.type ? ` (type: ${args.type})` : ''}`,
|
|
183
|
+
}],
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
const output = results.map(r => {
|
|
187
|
+
if (r.type === 'class') {
|
|
188
|
+
return `[class] ${r.className}`;
|
|
189
|
+
}
|
|
190
|
+
else if (r.type === 'method') {
|
|
191
|
+
return `[method] ${r.className}#${r.name}${r.signature ? `: ${r.signature}` : ''} (line ${r.lineStart})`;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
return `[field] ${r.className}#${r.name}${r.signature ? `: ${r.signature}` : ''}`;
|
|
195
|
+
}
|
|
196
|
+
}).join('\n');
|
|
197
|
+
return {
|
|
198
|
+
content: [{
|
|
199
|
+
type: 'text',
|
|
200
|
+
text: `Found ${results.length} result(s):\n${output}`,
|
|
201
|
+
}],
|
|
202
|
+
};
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
export const mcGetClassTool = {
|
|
206
|
+
name: 'mc_get_class',
|
|
207
|
+
description: 'Get the full decompiled source code for a Minecraft or Fabric API class. Also returns class hierarchy (extends, implements) and field/method signatures.',
|
|
208
|
+
inputSchema: {
|
|
209
|
+
type: 'object',
|
|
210
|
+
properties: {
|
|
211
|
+
className: {
|
|
212
|
+
type: 'string',
|
|
213
|
+
description: 'Fully qualified class name (e.g., "net.minecraft.client.MinecraftClient")',
|
|
214
|
+
},
|
|
215
|
+
version: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
description: 'Optional: Minecraft version to use (e.g., "1.21.1"). If not provided, uses the active version set by mc_set_version.',
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
required: ['className'],
|
|
221
|
+
},
|
|
222
|
+
handler: async (args) => {
|
|
223
|
+
const { version, error } = getEffectiveVersion(args.version);
|
|
224
|
+
if (error) {
|
|
225
|
+
return { content: [{ type: 'text', text: error }] };
|
|
226
|
+
}
|
|
227
|
+
if (!sourceStore.getVersion() || sourceStore.getVersion() !== version) {
|
|
228
|
+
sourceStore.setVersion(version);
|
|
229
|
+
}
|
|
230
|
+
const result = sourceStore.getClass(args.className);
|
|
231
|
+
if (!result) {
|
|
232
|
+
return {
|
|
233
|
+
content: [{
|
|
234
|
+
type: 'text',
|
|
235
|
+
text: `Class not found: ${args.className}`,
|
|
236
|
+
}],
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
const { info, source } = result;
|
|
240
|
+
let header = `// Class: ${args.className}\n`;
|
|
241
|
+
if (info.super) {
|
|
242
|
+
header += `// Extends: ${info.super}\n`;
|
|
243
|
+
}
|
|
244
|
+
if (info.interfaces && info.interfaces.length > 0) {
|
|
245
|
+
header += `// Implements: ${info.interfaces.join(', ')}\n`;
|
|
246
|
+
}
|
|
247
|
+
header += `// Fields: ${info.fields.length}\n`;
|
|
248
|
+
header += `// Methods: ${info.methods.length}\n\n`;
|
|
249
|
+
return {
|
|
250
|
+
content: [{
|
|
251
|
+
type: 'text',
|
|
252
|
+
text: header + source,
|
|
253
|
+
}],
|
|
254
|
+
};
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
export const mcGetMethodTool = {
|
|
258
|
+
name: 'mc_get_method',
|
|
259
|
+
description: 'Get the source code for a specific method in a class, with surrounding context. Useful for understanding method implementation details.',
|
|
260
|
+
inputSchema: {
|
|
261
|
+
type: 'object',
|
|
262
|
+
properties: {
|
|
263
|
+
className: {
|
|
264
|
+
type: 'string',
|
|
265
|
+
description: 'Fully qualified class name (e.g., "net.minecraft.client.MinecraftClient")',
|
|
266
|
+
},
|
|
267
|
+
methodName: {
|
|
268
|
+
type: 'string',
|
|
269
|
+
description: 'Method name (e.g., "tick", "render", "onUse")',
|
|
270
|
+
},
|
|
271
|
+
version: {
|
|
272
|
+
type: 'string',
|
|
273
|
+
description: 'Optional: Minecraft version to use (e.g., "1.21.1"). If not provided, uses the active version set by mc_set_version.',
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
required: ['className', 'methodName'],
|
|
277
|
+
},
|
|
278
|
+
handler: async (args) => {
|
|
279
|
+
const { version, error } = getEffectiveVersion(args.version);
|
|
280
|
+
if (error) {
|
|
281
|
+
return { content: [{ type: 'text', text: error }] };
|
|
282
|
+
}
|
|
283
|
+
if (!sourceStore.getVersion() || sourceStore.getVersion() !== version) {
|
|
284
|
+
sourceStore.setVersion(version);
|
|
285
|
+
}
|
|
286
|
+
const result = sourceStore.getMethod(args.className, args.methodName);
|
|
287
|
+
if (!result) {
|
|
288
|
+
return {
|
|
289
|
+
content: [{
|
|
290
|
+
type: 'text',
|
|
291
|
+
text: `Method "${args.methodName}" not found in class ${args.className}`,
|
|
292
|
+
}],
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
const { method, source, classInfo } = result;
|
|
296
|
+
let header = `// Method: ${args.className}#${method.name}\n`;
|
|
297
|
+
header += `// Signature: ${method.returnType} ${method.name}(${method.params.map(p => `${p.type} ${p.name}`).join(', ')})\n`;
|
|
298
|
+
header += `// Modifiers: ${method.modifiers.join(' ')}\n`;
|
|
299
|
+
header += `// Lines: ${method.lineStart}-${method.lineEnd}\n\n`;
|
|
300
|
+
if (classInfo.super) {
|
|
301
|
+
header += `// Class extends: ${classInfo.super}\n\n`;
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
content: [{
|
|
305
|
+
type: 'text',
|
|
306
|
+
text: header + source,
|
|
307
|
+
}],
|
|
308
|
+
};
|
|
309
|
+
},
|
|
310
|
+
};
|
|
311
|
+
export const mcListClassesTool = {
|
|
312
|
+
name: 'mc_list_classes',
|
|
313
|
+
description: 'List all classes under a specific package path. Returns class names and their source locations. Use this to discover classes in a package hierarchy.',
|
|
314
|
+
inputSchema: {
|
|
315
|
+
type: 'object',
|
|
316
|
+
properties: {
|
|
317
|
+
packagePath: {
|
|
318
|
+
type: 'string',
|
|
319
|
+
description: 'Package path to list classes from (e.g., "net.minecraft.client", "net.minecraft.world.entity"). Matches exact package and all subpackages.',
|
|
320
|
+
},
|
|
321
|
+
version: {
|
|
322
|
+
type: 'string',
|
|
323
|
+
description: 'Optional: Minecraft version to use (e.g., "1.21.1"). If not provided, uses the active version set by mc_set_version.',
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
required: ['packagePath'],
|
|
327
|
+
},
|
|
328
|
+
handler: async (args) => {
|
|
329
|
+
const { version, error } = getEffectiveVersion(args.version);
|
|
330
|
+
if (error) {
|
|
331
|
+
return { content: [{ type: 'text', text: error }] };
|
|
332
|
+
}
|
|
333
|
+
if (!sourceStore.getVersion() || sourceStore.getVersion() !== version) {
|
|
334
|
+
sourceStore.setVersion(version);
|
|
335
|
+
}
|
|
336
|
+
const results = sourceStore.listClasses(args.packagePath);
|
|
337
|
+
if (results.length === 0) {
|
|
338
|
+
return {
|
|
339
|
+
content: [{
|
|
340
|
+
type: 'text',
|
|
341
|
+
text: `No classes found under package "${args.packagePath}"`,
|
|
342
|
+
}],
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
const summary = results.length > 200
|
|
346
|
+
? `\n... and ${results.length - 200} more (total: ${results.length})`
|
|
347
|
+
: `\nTotal: ${results.length} class(es)`;
|
|
348
|
+
return {
|
|
349
|
+
content: [{
|
|
350
|
+
type: 'text',
|
|
351
|
+
text: `Classes under "${args.packagePath}":\n${results.slice(0, 200).map(r => r.className).join('\n')}${summary}`,
|
|
352
|
+
}],
|
|
353
|
+
};
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
export const mcListPackagesTool = {
|
|
357
|
+
name: 'mc_list_packages',
|
|
358
|
+
description: 'List all available packages. Optionally filter by namespace (minecraft or fabric). Use this to discover package structure.',
|
|
359
|
+
inputSchema: {
|
|
360
|
+
type: 'object',
|
|
361
|
+
properties: {
|
|
362
|
+
namespace: {
|
|
363
|
+
type: 'string',
|
|
364
|
+
enum: ['minecraft', 'fabric'],
|
|
365
|
+
description: 'Optional: filter by namespace (minecraft or fabric)',
|
|
366
|
+
},
|
|
367
|
+
version: {
|
|
368
|
+
type: 'string',
|
|
369
|
+
description: 'Optional: Minecraft version to use (e.g., "1.21.1"). If not provided, uses the active version set by mc_set_version.',
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
required: [],
|
|
373
|
+
},
|
|
374
|
+
handler: async (args) => {
|
|
375
|
+
const { version, error } = getEffectiveVersion(args.version);
|
|
376
|
+
if (error) {
|
|
377
|
+
return { content: [{ type: 'text', text: error }] };
|
|
378
|
+
}
|
|
379
|
+
if (!sourceStore.getVersion() || sourceStore.getVersion() !== version) {
|
|
380
|
+
sourceStore.setVersion(version);
|
|
381
|
+
}
|
|
382
|
+
const results = sourceStore.listPackages(args.namespace);
|
|
383
|
+
if (results.length === 0) {
|
|
384
|
+
return {
|
|
385
|
+
content: [{
|
|
386
|
+
type: 'text',
|
|
387
|
+
text: 'No packages found',
|
|
388
|
+
}],
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
return {
|
|
392
|
+
content: [{
|
|
393
|
+
type: 'text',
|
|
394
|
+
text: `Found ${results.length} package(s):\n${results.join('\n')}`,
|
|
395
|
+
}],
|
|
396
|
+
};
|
|
397
|
+
},
|
|
398
|
+
};
|
|
399
|
+
export const mcFindHierarchyTool = {
|
|
400
|
+
name: 'mc_find_hierarchy',
|
|
401
|
+
description: 'Find classes that extend (subclasses) or implement (implementors) a given class or interface. Useful for understanding class inheritance relationships.',
|
|
402
|
+
inputSchema: {
|
|
403
|
+
type: 'object',
|
|
404
|
+
properties: {
|
|
405
|
+
className: {
|
|
406
|
+
type: 'string',
|
|
407
|
+
description: 'Fully qualified class or interface name (e.g., "net.minecraft.world.entity.Entity", "net.minecraft.world.item.Item")',
|
|
408
|
+
},
|
|
409
|
+
direction: {
|
|
410
|
+
type: 'string',
|
|
411
|
+
enum: ['subclasses', 'implementors'],
|
|
412
|
+
description: 'subclasses = classes that extend this class, implementors = classes that implement this interface',
|
|
413
|
+
},
|
|
414
|
+
version: {
|
|
415
|
+
type: 'string',
|
|
416
|
+
description: 'Optional: Minecraft version to use (e.g., "1.21.1"). If not provided, uses the active version set by mc_set_version.',
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
required: ['className', 'direction'],
|
|
420
|
+
},
|
|
421
|
+
handler: async (args) => {
|
|
422
|
+
const { version, error } = getEffectiveVersion(args.version);
|
|
423
|
+
if (error) {
|
|
424
|
+
return { content: [{ type: 'text', text: error }] };
|
|
425
|
+
}
|
|
426
|
+
if (!sourceStore.getVersion() || sourceStore.getVersion() !== version) {
|
|
427
|
+
sourceStore.setVersion(version);
|
|
428
|
+
}
|
|
429
|
+
const results = sourceStore.findHierarchy(args.className, args.direction);
|
|
430
|
+
if (results.length === 0) {
|
|
431
|
+
return {
|
|
432
|
+
content: [{
|
|
433
|
+
type: 'text',
|
|
434
|
+
text: `No ${args.direction} found for ${args.className}`,
|
|
435
|
+
}],
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
const output = results
|
|
439
|
+
.slice(0, 200)
|
|
440
|
+
.map(r => r.className)
|
|
441
|
+
.join('\n');
|
|
442
|
+
const summary = results.length > 200
|
|
443
|
+
? `\n... and ${results.length - 200} more (total: ${results.length})`
|
|
444
|
+
: `\nTotal: ${results.length} ${args.direction}`;
|
|
445
|
+
return {
|
|
446
|
+
content: [{
|
|
447
|
+
type: 'text',
|
|
448
|
+
text: `${args.direction === 'subclasses' ? 'Subclasses' : 'Implementors'} of ${args.className}:\n${output}${summary}`,
|
|
449
|
+
}],
|
|
450
|
+
};
|
|
451
|
+
},
|
|
452
|
+
};
|
|
453
|
+
export const mcFindRefsTool = {
|
|
454
|
+
name: 'mc_find_refs',
|
|
455
|
+
description: 'Find callers (who calls this method) or callees (what this method calls) using the callgraph database. Useful for understanding code dependencies.',
|
|
456
|
+
inputSchema: {
|
|
457
|
+
type: 'object',
|
|
458
|
+
properties: {
|
|
459
|
+
className: {
|
|
460
|
+
type: 'string',
|
|
461
|
+
description: 'Fully qualified class name (e.g., "net.minecraft.client.MinecraftClient")',
|
|
462
|
+
},
|
|
463
|
+
methodName: {
|
|
464
|
+
type: 'string',
|
|
465
|
+
description: 'Method name to find references for',
|
|
466
|
+
},
|
|
467
|
+
direction: {
|
|
468
|
+
type: 'string',
|
|
469
|
+
enum: ['callers', 'callees'],
|
|
470
|
+
description: 'callers = who calls this method, callees = what this method calls',
|
|
471
|
+
},
|
|
472
|
+
version: {
|
|
473
|
+
type: 'string',
|
|
474
|
+
description: 'Optional: Minecraft version to use (e.g., "1.21.1"). If not provided, uses the active version set by mc_set_version.',
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
required: ['className', 'methodName', 'direction'],
|
|
478
|
+
},
|
|
479
|
+
handler: async (args) => {
|
|
480
|
+
const { version, error } = getEffectiveVersion(args.version);
|
|
481
|
+
if (error) {
|
|
482
|
+
return { content: [{ type: 'text', text: error }] };
|
|
483
|
+
}
|
|
484
|
+
if (!hasCallgraphDb(version)) {
|
|
485
|
+
return {
|
|
486
|
+
content: [{
|
|
487
|
+
type: 'text',
|
|
488
|
+
text: `Version ${version} does not have callgraph data.
|
|
489
|
+
|
|
490
|
+
STOP and ask the USER to run this command in their terminal:
|
|
491
|
+
node dist/cli.js callgraph -v ${version}
|
|
492
|
+
|
|
493
|
+
Or for full reinitialization:
|
|
494
|
+
node dist/cli.js init -v ${version}`,
|
|
495
|
+
}],
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
const results = args.direction === 'callers'
|
|
499
|
+
? findCallers(version, args.className, args.methodName)
|
|
500
|
+
: findCallees(version, args.className, args.methodName);
|
|
501
|
+
if (results.length === 0) {
|
|
502
|
+
return {
|
|
503
|
+
content: [{
|
|
504
|
+
type: 'text',
|
|
505
|
+
text: `No ${args.direction} found for ${args.className}#${args.methodName}`,
|
|
506
|
+
}],
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
const output = results
|
|
510
|
+
.slice(0, 100)
|
|
511
|
+
.map(r => `${r.fullName}${r.lineNumber ? ` (line ${r.lineNumber})` : ''}`)
|
|
512
|
+
.join('\n');
|
|
513
|
+
const summary = results.length > 100
|
|
514
|
+
? `\n... and ${results.length - 100} more`
|
|
515
|
+
: '';
|
|
516
|
+
return {
|
|
517
|
+
content: [{
|
|
518
|
+
type: 'text',
|
|
519
|
+
text: `Found ${results.length} ${args.direction}:\n${output}${summary}`,
|
|
520
|
+
}],
|
|
521
|
+
};
|
|
522
|
+
},
|
|
523
|
+
};
|
|
524
|
+
export const allTools = [
|
|
525
|
+
mcSetVersionTool,
|
|
526
|
+
mcListVersionsTool,
|
|
527
|
+
mcSearchTool,
|
|
528
|
+
mcGetClassTool,
|
|
529
|
+
mcGetMethodTool,
|
|
530
|
+
mcFindRefsTool,
|
|
531
|
+
mcListClassesTool,
|
|
532
|
+
mcListPackagesTool,
|
|
533
|
+
mcFindHierarchyTool,
|
|
534
|
+
];
|
|
535
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACL,6BAA6B,EAC7B,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,SAAS,mBAAmB,CAAC,eAAwB;IACnD,IAAI,eAAe,EAAE,CAAC;QACpB,MAAM,SAAS,GAAG,qBAAqB,CAAC,eAAe,CAAC,CAAC;QACzD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9B,OAAO;gBACL,OAAO,EAAE,EAAE;gBACX,KAAK,EAAE,WAAW,eAAe,8GAA8G,eAAe,0DAA0D,eAAe,iCAAiC;aACzQ,CAAC;QACJ,CAAC;QACD,IAAI,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CAAC,UAAU,EAAE;qBAC5E,CAAC;aACH,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,OAAO;aACnB,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;aACb,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;aACzE,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,GAAG;YAClC,CAAC,CAAC,aAAa,OAAO,CAAC,MAAM,GAAG,GAAG,OAAO;YAC1C,CAAC,CAAC,EAAE,CAAC;QAEP,OAAO;YACL,OAAO,EAAE,CAAC;oBACR,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,SAAS,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,MAAM,MAAM,GAAG,OAAO,EAAE;iBACxE,CAAC;SACH,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,gBAAgB;IAChB,kBAAkB;IAClB,YAAY;IACZ,cAAc;IACd,eAAe;IACf,cAAc;IACd,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;CACpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface Config {
|
|
2
|
+
minecraftVersion: string;
|
|
3
|
+
fabricApiVersion: string | null;
|
|
4
|
+
cacheDir: string;
|
|
5
|
+
indexDir: string;
|
|
6
|
+
toolsDir: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const DEFAULT_CONFIG: Config;
|
|
9
|
+
export declare const VINEFLOWER_VERSION = "1.11.2";
|
|
10
|
+
export declare const VINEFLOWER_URL = "https://github.com/Vineflower/vineflower/releases/download/1.11.2/vineflower-1.11.2.jar";
|
|
11
|
+
export declare const MOJANG_VERSION_MANIFEST_URL = "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json";
|
|
12
|
+
export declare const FABRIC_MAVEN_URL = "https://maven.fabricmc.net";
|
|
13
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,EAAE,MAM5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,cAAc,4FAA0H,CAAC;AAEtJ,eAAO,MAAM,2BAA2B,oEAAoE,CAAC;AAC7G,eAAO,MAAM,gBAAgB,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const DEFAULT_CONFIG = {
|
|
2
|
+
minecraftVersion: '1.21.11',
|
|
3
|
+
fabricApiVersion: null,
|
|
4
|
+
cacheDir: '',
|
|
5
|
+
indexDir: '',
|
|
6
|
+
toolsDir: '',
|
|
7
|
+
};
|
|
8
|
+
export const VINEFLOWER_VERSION = '1.11.2';
|
|
9
|
+
export const VINEFLOWER_URL = `https://github.com/Vineflower/vineflower/releases/download/${VINEFLOWER_VERSION}/vineflower-${VINEFLOWER_VERSION}.jar`;
|
|
10
|
+
export const MOJANG_VERSION_MANIFEST_URL = 'https://piston-meta.mojang.com/mc/game/version_manifest_v2.json';
|
|
11
|
+
export const FABRIC_MAVEN_URL = 'https://maven.fabricmc.net';
|
|
12
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAW;IACpC,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,IAAI;IACtB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAC3C,MAAM,CAAC,MAAM,cAAc,GAAG,8DAA8D,kBAAkB,eAAe,kBAAkB,MAAM,CAAC;AAEtJ,MAAM,CAAC,MAAM,2BAA2B,GAAG,iEAAiE,CAAC;AAC7G,MAAM,CAAC,MAAM,gBAAgB,GAAG,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Config } from './config.js';
|
|
2
|
+
export declare function getHomeDir(): string;
|
|
3
|
+
export declare function getCacheDir(): string;
|
|
4
|
+
export declare function getIndexDir(): string;
|
|
5
|
+
export declare function getToolsDir(): string;
|
|
6
|
+
export declare function getDecompilerMcDir(): string;
|
|
7
|
+
export declare function getMinecraftCacheDir(version: string): string;
|
|
8
|
+
export declare function getMinecraftSourceDir(version: string): string;
|
|
9
|
+
export declare function getMinecraftJarPath(version: string): string;
|
|
10
|
+
export declare function getObfuscatedJarPath(version: string): string;
|
|
11
|
+
export declare function getFabricApiCacheDir(version: string): string;
|
|
12
|
+
export declare function getVineflowerPath(): string;
|
|
13
|
+
export declare function getTmpDir(version: string): string;
|
|
14
|
+
export declare function getIndexManifestPath(): string;
|
|
15
|
+
export declare function getMinecraftIndexPath(): string;
|
|
16
|
+
export declare function getFabricIndexPath(): string;
|
|
17
|
+
export declare function getPackageIndexPath(namespace: 'minecraft' | 'fabric', packageName: string): string;
|
|
18
|
+
export declare function getConfig(): Config;
|
|
19
|
+
export declare function ensureDir(dir: string): void;
|
|
20
|
+
export declare function ensureHomeDirs(): void;
|
|
21
|
+
export declare function getAvailableMinecraftVersions(): string[];
|
|
22
|
+
export declare function getVersionedIndexDir(version: string): string;
|
|
23
|
+
export declare function getVersionedIndexManifestPath(version: string): string;
|
|
24
|
+
export declare function getVersionedMinecraftIndexPath(version: string): string;
|
|
25
|
+
export declare function getVersionedFabricIndexPath(version: string): string;
|
|
26
|
+
export declare function getVersionedPackageIndexPath(namespace: 'minecraft' | 'fabric', packageName: string, version: string): string;
|
|
27
|
+
export declare function isVersionIndexed(version: string): boolean;
|
|
28
|
+
export declare function getIndexedVersions(): string[];
|
|
29
|
+
export declare function ensureVersionedIndexDirs(version: string): void;
|
|
30
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAkB,MAAM,aAAa,CAAC;AAIrD,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CA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