@adhisang/minecraft-modding-mcp 2.1.0 → 3.1.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/README.md +224 -802
  3. package/dist/cache-registry.d.ts +95 -0
  4. package/dist/cache-registry.js +541 -0
  5. package/dist/entry-tools/analyze-mod-service.d.ts +207 -0
  6. package/dist/entry-tools/analyze-mod-service.js +309 -0
  7. package/dist/entry-tools/analyze-symbol-service.d.ts +209 -0
  8. package/dist/entry-tools/analyze-symbol-service.js +359 -0
  9. package/dist/entry-tools/compare-minecraft-service.d.ts +210 -0
  10. package/dist/entry-tools/compare-minecraft-service.js +429 -0
  11. package/dist/entry-tools/entry-tool-schema.d.ts +6 -0
  12. package/dist/entry-tools/entry-tool-schema.js +10 -0
  13. package/dist/entry-tools/inspect-minecraft-service.d.ts +1954 -0
  14. package/dist/entry-tools/inspect-minecraft-service.js +1030 -0
  15. package/dist/entry-tools/manage-cache-service.d.ts +130 -0
  16. package/dist/entry-tools/manage-cache-service.js +264 -0
  17. package/dist/entry-tools/request-normalizers.d.ts +10 -0
  18. package/dist/entry-tools/request-normalizers.js +36 -0
  19. package/dist/entry-tools/response-contract.d.ts +45 -0
  20. package/dist/entry-tools/response-contract.js +99 -0
  21. package/dist/entry-tools/validate-project-service.d.ts +543 -0
  22. package/dist/entry-tools/validate-project-service.js +414 -0
  23. package/dist/index.js +183 -59
  24. package/dist/observability.d.ts +18 -2
  25. package/dist/observability.js +47 -10
  26. package/dist/source-service.d.ts +0 -1
  27. package/dist/source-service.js +44 -54
  28. package/dist/storage/files-repo.d.ts +1 -0
  29. package/dist/storage/files-repo.js +29 -5
  30. package/dist/tool-contract-manifest.d.ts +4 -0
  31. package/dist/tool-contract-manifest.js +139 -0
  32. package/package.json +1 -1
@@ -0,0 +1,543 @@
1
+ import { z } from "zod";
2
+ export declare const validateProjectShape: {
3
+ task: z.ZodEnum<["project-summary", "mixin", "access-widener"]>;
4
+ subject: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
5
+ kind: z.ZodLiteral<"workspace">;
6
+ projectPath: z.ZodString;
7
+ discover: z.ZodOptional<z.ZodArray<z.ZodEnum<["mixins", "access-wideners"]>, "many">>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ kind: "workspace";
10
+ projectPath: string;
11
+ discover?: ("mixins" | "access-wideners")[] | undefined;
12
+ }, {
13
+ kind: "workspace";
14
+ projectPath: string;
15
+ discover?: ("mixins" | "access-wideners")[] | undefined;
16
+ }>, z.ZodObject<{
17
+ kind: z.ZodLiteral<"mixin">;
18
+ input: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
19
+ mode: z.ZodLiteral<"inline">;
20
+ source: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ source: string;
23
+ mode: "inline";
24
+ }, {
25
+ source: string;
26
+ mode: "inline";
27
+ }>, z.ZodObject<{
28
+ mode: z.ZodLiteral<"path">;
29
+ path: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ path: string;
32
+ mode: "path";
33
+ }, {
34
+ path: string;
35
+ mode: "path";
36
+ }>, z.ZodObject<{
37
+ mode: z.ZodLiteral<"paths">;
38
+ paths: z.ZodArray<z.ZodString, "many">;
39
+ }, "strip", z.ZodTypeAny, {
40
+ mode: "paths";
41
+ paths: string[];
42
+ }, {
43
+ mode: "paths";
44
+ paths: string[];
45
+ }>, z.ZodObject<{
46
+ mode: z.ZodLiteral<"config">;
47
+ configPaths: z.ZodArray<z.ZodString, "many">;
48
+ }, "strip", z.ZodTypeAny, {
49
+ mode: "config";
50
+ configPaths: string[];
51
+ }, {
52
+ mode: "config";
53
+ configPaths: string[];
54
+ }>, z.ZodObject<{
55
+ mode: z.ZodLiteral<"project">;
56
+ path: z.ZodString;
57
+ }, "strip", z.ZodTypeAny, {
58
+ path: string;
59
+ mode: "project";
60
+ }, {
61
+ path: string;
62
+ mode: "project";
63
+ }>]>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ kind: "mixin";
66
+ input: {
67
+ source: string;
68
+ mode: "inline";
69
+ } | {
70
+ path: string;
71
+ mode: "path";
72
+ } | {
73
+ mode: "paths";
74
+ paths: string[];
75
+ } | {
76
+ mode: "config";
77
+ configPaths: string[];
78
+ } | {
79
+ path: string;
80
+ mode: "project";
81
+ };
82
+ }, {
83
+ kind: "mixin";
84
+ input: {
85
+ source: string;
86
+ mode: "inline";
87
+ } | {
88
+ path: string;
89
+ mode: "path";
90
+ } | {
91
+ mode: "paths";
92
+ paths: string[];
93
+ } | {
94
+ mode: "config";
95
+ configPaths: string[];
96
+ } | {
97
+ path: string;
98
+ mode: "project";
99
+ };
100
+ }>, z.ZodObject<{
101
+ kind: z.ZodLiteral<"access-widener">;
102
+ input: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
103
+ mode: z.ZodLiteral<"inline">;
104
+ content: z.ZodString;
105
+ }, "strip", z.ZodTypeAny, {
106
+ content: string;
107
+ mode: "inline";
108
+ }, {
109
+ content: string;
110
+ mode: "inline";
111
+ }>, z.ZodObject<{
112
+ mode: z.ZodLiteral<"path">;
113
+ path: z.ZodString;
114
+ }, "strip", z.ZodTypeAny, {
115
+ path: string;
116
+ mode: "path";
117
+ }, {
118
+ path: string;
119
+ mode: "path";
120
+ }>]>;
121
+ }, "strip", z.ZodTypeAny, {
122
+ kind: "access-widener";
123
+ input: {
124
+ content: string;
125
+ mode: "inline";
126
+ } | {
127
+ path: string;
128
+ mode: "path";
129
+ };
130
+ }, {
131
+ kind: "access-widener";
132
+ input: {
133
+ content: string;
134
+ mode: "inline";
135
+ } | {
136
+ path: string;
137
+ mode: "path";
138
+ };
139
+ }>]>;
140
+ version: z.ZodOptional<z.ZodString>;
141
+ mapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
142
+ sourcePriority: z.ZodOptional<z.ZodEnum<["loom-first", "maven-first"]>>;
143
+ scope: z.ZodOptional<z.ZodEnum<["vanilla", "merged", "loader"]>>;
144
+ preferProjectVersion: z.ZodOptional<z.ZodBoolean>;
145
+ preferProjectMapping: z.ZodDefault<z.ZodBoolean>;
146
+ detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
147
+ include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
148
+ sourceRoots: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
149
+ configPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
150
+ minSeverity: z.ZodDefault<z.ZodEnum<["error", "warning", "all"]>>;
151
+ hideUncertain: z.ZodDefault<z.ZodBoolean>;
152
+ explain: z.ZodDefault<z.ZodBoolean>;
153
+ warningMode: z.ZodOptional<z.ZodEnum<["full", "aggregated"]>>;
154
+ warningCategoryFilter: z.ZodOptional<z.ZodArray<z.ZodEnum<["mapping", "configuration", "validation", "resolution", "parse"]>, "many">>;
155
+ treatInfoAsWarning: z.ZodDefault<z.ZodBoolean>;
156
+ includeIssues: z.ZodDefault<z.ZodBoolean>;
157
+ };
158
+ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
159
+ task: z.ZodEnum<["project-summary", "mixin", "access-widener"]>;
160
+ subject: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
161
+ kind: z.ZodLiteral<"workspace">;
162
+ projectPath: z.ZodString;
163
+ discover: z.ZodOptional<z.ZodArray<z.ZodEnum<["mixins", "access-wideners"]>, "many">>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ kind: "workspace";
166
+ projectPath: string;
167
+ discover?: ("mixins" | "access-wideners")[] | undefined;
168
+ }, {
169
+ kind: "workspace";
170
+ projectPath: string;
171
+ discover?: ("mixins" | "access-wideners")[] | undefined;
172
+ }>, z.ZodObject<{
173
+ kind: z.ZodLiteral<"mixin">;
174
+ input: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
175
+ mode: z.ZodLiteral<"inline">;
176
+ source: z.ZodString;
177
+ }, "strip", z.ZodTypeAny, {
178
+ source: string;
179
+ mode: "inline";
180
+ }, {
181
+ source: string;
182
+ mode: "inline";
183
+ }>, z.ZodObject<{
184
+ mode: z.ZodLiteral<"path">;
185
+ path: z.ZodString;
186
+ }, "strip", z.ZodTypeAny, {
187
+ path: string;
188
+ mode: "path";
189
+ }, {
190
+ path: string;
191
+ mode: "path";
192
+ }>, z.ZodObject<{
193
+ mode: z.ZodLiteral<"paths">;
194
+ paths: z.ZodArray<z.ZodString, "many">;
195
+ }, "strip", z.ZodTypeAny, {
196
+ mode: "paths";
197
+ paths: string[];
198
+ }, {
199
+ mode: "paths";
200
+ paths: string[];
201
+ }>, z.ZodObject<{
202
+ mode: z.ZodLiteral<"config">;
203
+ configPaths: z.ZodArray<z.ZodString, "many">;
204
+ }, "strip", z.ZodTypeAny, {
205
+ mode: "config";
206
+ configPaths: string[];
207
+ }, {
208
+ mode: "config";
209
+ configPaths: string[];
210
+ }>, z.ZodObject<{
211
+ mode: z.ZodLiteral<"project">;
212
+ path: z.ZodString;
213
+ }, "strip", z.ZodTypeAny, {
214
+ path: string;
215
+ mode: "project";
216
+ }, {
217
+ path: string;
218
+ mode: "project";
219
+ }>]>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ kind: "mixin";
222
+ input: {
223
+ source: string;
224
+ mode: "inline";
225
+ } | {
226
+ path: string;
227
+ mode: "path";
228
+ } | {
229
+ mode: "paths";
230
+ paths: string[];
231
+ } | {
232
+ mode: "config";
233
+ configPaths: string[];
234
+ } | {
235
+ path: string;
236
+ mode: "project";
237
+ };
238
+ }, {
239
+ kind: "mixin";
240
+ input: {
241
+ source: string;
242
+ mode: "inline";
243
+ } | {
244
+ path: string;
245
+ mode: "path";
246
+ } | {
247
+ mode: "paths";
248
+ paths: string[];
249
+ } | {
250
+ mode: "config";
251
+ configPaths: string[];
252
+ } | {
253
+ path: string;
254
+ mode: "project";
255
+ };
256
+ }>, z.ZodObject<{
257
+ kind: z.ZodLiteral<"access-widener">;
258
+ input: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
259
+ mode: z.ZodLiteral<"inline">;
260
+ content: z.ZodString;
261
+ }, "strip", z.ZodTypeAny, {
262
+ content: string;
263
+ mode: "inline";
264
+ }, {
265
+ content: string;
266
+ mode: "inline";
267
+ }>, z.ZodObject<{
268
+ mode: z.ZodLiteral<"path">;
269
+ path: z.ZodString;
270
+ }, "strip", z.ZodTypeAny, {
271
+ path: string;
272
+ mode: "path";
273
+ }, {
274
+ path: string;
275
+ mode: "path";
276
+ }>]>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ kind: "access-widener";
279
+ input: {
280
+ content: string;
281
+ mode: "inline";
282
+ } | {
283
+ path: string;
284
+ mode: "path";
285
+ };
286
+ }, {
287
+ kind: "access-widener";
288
+ input: {
289
+ content: string;
290
+ mode: "inline";
291
+ } | {
292
+ path: string;
293
+ mode: "path";
294
+ };
295
+ }>]>;
296
+ version: z.ZodOptional<z.ZodString>;
297
+ mapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
298
+ sourcePriority: z.ZodOptional<z.ZodEnum<["loom-first", "maven-first"]>>;
299
+ scope: z.ZodOptional<z.ZodEnum<["vanilla", "merged", "loader"]>>;
300
+ preferProjectVersion: z.ZodOptional<z.ZodBoolean>;
301
+ preferProjectMapping: z.ZodDefault<z.ZodBoolean>;
302
+ detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
303
+ include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
304
+ sourceRoots: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
305
+ configPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
306
+ minSeverity: z.ZodDefault<z.ZodEnum<["error", "warning", "all"]>>;
307
+ hideUncertain: z.ZodDefault<z.ZodBoolean>;
308
+ explain: z.ZodDefault<z.ZodBoolean>;
309
+ warningMode: z.ZodOptional<z.ZodEnum<["full", "aggregated"]>>;
310
+ warningCategoryFilter: z.ZodOptional<z.ZodArray<z.ZodEnum<["mapping", "configuration", "validation", "resolution", "parse"]>, "many">>;
311
+ treatInfoAsWarning: z.ZodDefault<z.ZodBoolean>;
312
+ includeIssues: z.ZodDefault<z.ZodBoolean>;
313
+ }, "strip", z.ZodTypeAny, {
314
+ minSeverity: "all" | "error" | "warning";
315
+ hideUncertain: boolean;
316
+ explain: boolean;
317
+ preferProjectMapping: boolean;
318
+ treatInfoAsWarning: boolean;
319
+ includeIssues: boolean;
320
+ task: "mixin" | "access-widener" | "project-summary";
321
+ subject: {
322
+ kind: "workspace";
323
+ projectPath: string;
324
+ discover?: ("mixins" | "access-wideners")[] | undefined;
325
+ } | {
326
+ kind: "mixin";
327
+ input: {
328
+ source: string;
329
+ mode: "inline";
330
+ } | {
331
+ path: string;
332
+ mode: "path";
333
+ } | {
334
+ mode: "paths";
335
+ paths: string[];
336
+ } | {
337
+ mode: "config";
338
+ configPaths: string[];
339
+ } | {
340
+ path: string;
341
+ mode: "project";
342
+ };
343
+ } | {
344
+ kind: "access-widener";
345
+ input: {
346
+ content: string;
347
+ mode: "inline";
348
+ } | {
349
+ path: string;
350
+ mode: "path";
351
+ };
352
+ };
353
+ mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
354
+ version?: string | undefined;
355
+ scope?: "loader" | "merged" | "vanilla" | undefined;
356
+ sourcePriority?: "loom-first" | "maven-first" | undefined;
357
+ sourceRoots?: string[] | undefined;
358
+ preferProjectVersion?: boolean | undefined;
359
+ warningMode?: "full" | "aggregated" | undefined;
360
+ warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
361
+ configPaths?: string[] | undefined;
362
+ detail?: "full" | "summary" | "standard" | undefined;
363
+ include?: string[] | undefined;
364
+ }, {
365
+ task: "mixin" | "access-widener" | "project-summary";
366
+ subject: {
367
+ kind: "workspace";
368
+ projectPath: string;
369
+ discover?: ("mixins" | "access-wideners")[] | undefined;
370
+ } | {
371
+ kind: "mixin";
372
+ input: {
373
+ source: string;
374
+ mode: "inline";
375
+ } | {
376
+ path: string;
377
+ mode: "path";
378
+ } | {
379
+ mode: "paths";
380
+ paths: string[];
381
+ } | {
382
+ mode: "config";
383
+ configPaths: string[];
384
+ } | {
385
+ path: string;
386
+ mode: "project";
387
+ };
388
+ } | {
389
+ kind: "access-widener";
390
+ input: {
391
+ content: string;
392
+ mode: "inline";
393
+ } | {
394
+ path: string;
395
+ mode: "path";
396
+ };
397
+ };
398
+ mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
399
+ version?: string | undefined;
400
+ scope?: "loader" | "merged" | "vanilla" | undefined;
401
+ sourcePriority?: "loom-first" | "maven-first" | undefined;
402
+ sourceRoots?: string[] | undefined;
403
+ preferProjectVersion?: boolean | undefined;
404
+ minSeverity?: "all" | "error" | "warning" | undefined;
405
+ hideUncertain?: boolean | undefined;
406
+ explain?: boolean | undefined;
407
+ warningMode?: "full" | "aggregated" | undefined;
408
+ preferProjectMapping?: boolean | undefined;
409
+ warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
410
+ treatInfoAsWarning?: boolean | undefined;
411
+ includeIssues?: boolean | undefined;
412
+ configPaths?: string[] | undefined;
413
+ detail?: "full" | "summary" | "standard" | undefined;
414
+ include?: string[] | undefined;
415
+ }>, {
416
+ minSeverity: "all" | "error" | "warning";
417
+ hideUncertain: boolean;
418
+ explain: boolean;
419
+ preferProjectMapping: boolean;
420
+ treatInfoAsWarning: boolean;
421
+ includeIssues: boolean;
422
+ task: "mixin" | "access-widener" | "project-summary";
423
+ subject: {
424
+ kind: "workspace";
425
+ projectPath: string;
426
+ discover?: ("mixins" | "access-wideners")[] | undefined;
427
+ } | {
428
+ kind: "mixin";
429
+ input: {
430
+ source: string;
431
+ mode: "inline";
432
+ } | {
433
+ path: string;
434
+ mode: "path";
435
+ } | {
436
+ mode: "paths";
437
+ paths: string[];
438
+ } | {
439
+ mode: "config";
440
+ configPaths: string[];
441
+ } | {
442
+ path: string;
443
+ mode: "project";
444
+ };
445
+ } | {
446
+ kind: "access-widener";
447
+ input: {
448
+ content: string;
449
+ mode: "inline";
450
+ } | {
451
+ path: string;
452
+ mode: "path";
453
+ };
454
+ };
455
+ mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
456
+ version?: string | undefined;
457
+ scope?: "loader" | "merged" | "vanilla" | undefined;
458
+ sourcePriority?: "loom-first" | "maven-first" | undefined;
459
+ sourceRoots?: string[] | undefined;
460
+ preferProjectVersion?: boolean | undefined;
461
+ warningMode?: "full" | "aggregated" | undefined;
462
+ warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
463
+ configPaths?: string[] | undefined;
464
+ detail?: "full" | "summary" | "standard" | undefined;
465
+ include?: string[] | undefined;
466
+ }, {
467
+ task: "mixin" | "access-widener" | "project-summary";
468
+ subject: {
469
+ kind: "workspace";
470
+ projectPath: string;
471
+ discover?: ("mixins" | "access-wideners")[] | undefined;
472
+ } | {
473
+ kind: "mixin";
474
+ input: {
475
+ source: string;
476
+ mode: "inline";
477
+ } | {
478
+ path: string;
479
+ mode: "path";
480
+ } | {
481
+ mode: "paths";
482
+ paths: string[];
483
+ } | {
484
+ mode: "config";
485
+ configPaths: string[];
486
+ } | {
487
+ path: string;
488
+ mode: "project";
489
+ };
490
+ } | {
491
+ kind: "access-widener";
492
+ input: {
493
+ content: string;
494
+ mode: "inline";
495
+ } | {
496
+ path: string;
497
+ mode: "path";
498
+ };
499
+ };
500
+ mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
501
+ version?: string | undefined;
502
+ scope?: "loader" | "merged" | "vanilla" | undefined;
503
+ sourcePriority?: "loom-first" | "maven-first" | undefined;
504
+ sourceRoots?: string[] | undefined;
505
+ preferProjectVersion?: boolean | undefined;
506
+ minSeverity?: "all" | "error" | "warning" | undefined;
507
+ hideUncertain?: boolean | undefined;
508
+ explain?: boolean | undefined;
509
+ warningMode?: "full" | "aggregated" | undefined;
510
+ preferProjectMapping?: boolean | undefined;
511
+ warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
512
+ treatInfoAsWarning?: boolean | undefined;
513
+ includeIssues?: boolean | undefined;
514
+ configPaths?: string[] | undefined;
515
+ detail?: "full" | "summary" | "standard" | undefined;
516
+ include?: string[] | undefined;
517
+ }>;
518
+ export type ValidateProjectInput = z.infer<typeof validateProjectSchema>;
519
+ type ValidateProjectDeps = {
520
+ validateMixin: (input: Record<string, unknown>) => Promise<Record<string, unknown> & {
521
+ warnings?: string[];
522
+ }>;
523
+ validateAccessWidener: (input: {
524
+ content: string;
525
+ version: string;
526
+ mapping?: "obfuscated" | "mojang" | "intermediary" | "yarn";
527
+ sourcePriority?: "loom-first" | "maven-first";
528
+ }) => Promise<Record<string, unknown> & {
529
+ warnings?: string[];
530
+ }>;
531
+ discoverMixins: (projectPath: string, configPaths?: string[]) => Promise<string[]>;
532
+ discoverAccessWideners: (projectPath: string) => Promise<string[]>;
533
+ };
534
+ export declare function discoverWorkspaceMixins(projectPath: string, configPaths?: string[]): Promise<string[]>;
535
+ export declare function discoverWorkspaceAccessWideners(projectPath: string): Promise<string[]>;
536
+ export declare class ValidateProjectService {
537
+ private readonly deps;
538
+ constructor(deps: ValidateProjectDeps);
539
+ execute(input: ValidateProjectInput): Promise<Record<string, unknown> & {
540
+ warnings?: string[];
541
+ }>;
542
+ }
543
+ export {};