@adhisang/minecraft-modding-mcp 3.1.1 → 3.2.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 (41) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +20 -8
  3. package/dist/access-transformer-parser.d.ts +17 -0
  4. package/dist/access-transformer-parser.js +97 -0
  5. package/dist/concurrency.d.ts +1 -0
  6. package/dist/concurrency.js +24 -0
  7. package/dist/decompiler/vineflower.js +22 -21
  8. package/dist/entry-tools/analyze-mod-service.d.ts +4 -4
  9. package/dist/entry-tools/analyze-symbol-service.d.ts +20 -20
  10. package/dist/entry-tools/inspect-minecraft-service.d.ts +148 -148
  11. package/dist/entry-tools/validate-project-service.d.ts +153 -16
  12. package/dist/entry-tools/validate-project-service.js +360 -23
  13. package/dist/gradle-paths.d.ts +4 -0
  14. package/dist/gradle-paths.js +57 -0
  15. package/dist/index.js +65 -13
  16. package/dist/mapping-pipeline-service.d.ts +3 -1
  17. package/dist/mapping-pipeline-service.js +16 -1
  18. package/dist/mapping-service.d.ts +4 -0
  19. package/dist/mapping-service.js +155 -60
  20. package/dist/minecraft-explorer-service.d.ts +13 -0
  21. package/dist/minecraft-explorer-service.js +8 -4
  22. package/dist/mixin-validator.d.ts +33 -2
  23. package/dist/mixin-validator.js +197 -11
  24. package/dist/mod-analyzer.d.ts +1 -0
  25. package/dist/mod-analyzer.js +17 -1
  26. package/dist/mod-decompile-service.js +4 -4
  27. package/dist/mod-remap-service.js +1 -54
  28. package/dist/mod-search-service.d.ts +1 -0
  29. package/dist/mod-search-service.js +84 -51
  30. package/dist/response-utils.d.ts +35 -0
  31. package/dist/response-utils.js +113 -0
  32. package/dist/source-jar-reader.d.ts +16 -0
  33. package/dist/source-jar-reader.js +103 -1
  34. package/dist/source-resolver.js +9 -10
  35. package/dist/source-service.d.ts +22 -2
  36. package/dist/source-service.js +914 -105
  37. package/dist/tool-contract-manifest.js +8 -6
  38. package/dist/types.d.ts +17 -0
  39. package/dist/workspace-mapping-service.d.ts +13 -0
  40. package/dist/workspace-mapping-service.js +146 -14
  41. package/package.json +1 -1
@@ -1,18 +1,18 @@
1
1
  import { z } from "zod";
2
2
  export declare const validateProjectShape: {
3
- task: z.ZodEnum<["project-summary", "mixin", "access-widener"]>;
3
+ task: z.ZodEnum<["project-summary", "mixin", "access-widener", "access-transformer"]>;
4
4
  subject: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
5
5
  kind: z.ZodLiteral<"workspace">;
6
6
  projectPath: z.ZodString;
7
- discover: z.ZodOptional<z.ZodArray<z.ZodEnum<["mixins", "access-wideners"]>, "many">>;
7
+ discover: z.ZodOptional<z.ZodArray<z.ZodEnum<["mixins", "access-wideners", "access-transformers"]>, "many">>;
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  kind: "workspace";
10
10
  projectPath: string;
11
- discover?: ("mixins" | "access-wideners")[] | undefined;
11
+ discover?: ("mixins" | "access-wideners" | "access-transformers")[] | undefined;
12
12
  }, {
13
13
  kind: "workspace";
14
14
  projectPath: string;
15
- discover?: ("mixins" | "access-wideners")[] | undefined;
15
+ discover?: ("mixins" | "access-wideners" | "access-transformers")[] | undefined;
16
16
  }>, z.ZodObject<{
17
17
  kind: z.ZodLiteral<"mixin">;
18
18
  input: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
@@ -136,9 +136,49 @@ export declare const validateProjectShape: {
136
136
  path: string;
137
137
  mode: "path";
138
138
  };
139
+ }>, z.ZodObject<{
140
+ kind: z.ZodLiteral<"access-transformer">;
141
+ input: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
142
+ mode: z.ZodLiteral<"inline">;
143
+ content: z.ZodString;
144
+ }, "strip", z.ZodTypeAny, {
145
+ content: string;
146
+ mode: "inline";
147
+ }, {
148
+ content: string;
149
+ mode: "inline";
150
+ }>, z.ZodObject<{
151
+ mode: z.ZodLiteral<"path">;
152
+ path: z.ZodString;
153
+ }, "strip", z.ZodTypeAny, {
154
+ path: string;
155
+ mode: "path";
156
+ }, {
157
+ path: string;
158
+ mode: "path";
159
+ }>]>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ kind: "access-transformer";
162
+ input: {
163
+ content: string;
164
+ mode: "inline";
165
+ } | {
166
+ path: string;
167
+ mode: "path";
168
+ };
169
+ }, {
170
+ kind: "access-transformer";
171
+ input: {
172
+ content: string;
173
+ mode: "inline";
174
+ } | {
175
+ path: string;
176
+ mode: "path";
177
+ };
139
178
  }>]>;
140
179
  version: z.ZodOptional<z.ZodString>;
141
180
  mapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
181
+ atNamespace: z.ZodOptional<z.ZodEnum<["srg", "mojang", "obfuscated"]>>;
142
182
  sourcePriority: z.ZodOptional<z.ZodEnum<["loom-first", "maven-first"]>>;
143
183
  scope: z.ZodOptional<z.ZodEnum<["vanilla", "merged", "loader"]>>;
144
184
  preferProjectVersion: z.ZodOptional<z.ZodBoolean>;
@@ -156,19 +196,19 @@ export declare const validateProjectShape: {
156
196
  includeIssues: z.ZodDefault<z.ZodBoolean>;
157
197
  };
158
198
  export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
159
- task: z.ZodEnum<["project-summary", "mixin", "access-widener"]>;
199
+ task: z.ZodEnum<["project-summary", "mixin", "access-widener", "access-transformer"]>;
160
200
  subject: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
161
201
  kind: z.ZodLiteral<"workspace">;
162
202
  projectPath: z.ZodString;
163
- discover: z.ZodOptional<z.ZodArray<z.ZodEnum<["mixins", "access-wideners"]>, "many">>;
203
+ discover: z.ZodOptional<z.ZodArray<z.ZodEnum<["mixins", "access-wideners", "access-transformers"]>, "many">>;
164
204
  }, "strip", z.ZodTypeAny, {
165
205
  kind: "workspace";
166
206
  projectPath: string;
167
- discover?: ("mixins" | "access-wideners")[] | undefined;
207
+ discover?: ("mixins" | "access-wideners" | "access-transformers")[] | undefined;
168
208
  }, {
169
209
  kind: "workspace";
170
210
  projectPath: string;
171
- discover?: ("mixins" | "access-wideners")[] | undefined;
211
+ discover?: ("mixins" | "access-wideners" | "access-transformers")[] | undefined;
172
212
  }>, z.ZodObject<{
173
213
  kind: z.ZodLiteral<"mixin">;
174
214
  input: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
@@ -292,9 +332,49 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
292
332
  path: string;
293
333
  mode: "path";
294
334
  };
335
+ }>, z.ZodObject<{
336
+ kind: z.ZodLiteral<"access-transformer">;
337
+ input: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
338
+ mode: z.ZodLiteral<"inline">;
339
+ content: z.ZodString;
340
+ }, "strip", z.ZodTypeAny, {
341
+ content: string;
342
+ mode: "inline";
343
+ }, {
344
+ content: string;
345
+ mode: "inline";
346
+ }>, z.ZodObject<{
347
+ mode: z.ZodLiteral<"path">;
348
+ path: z.ZodString;
349
+ }, "strip", z.ZodTypeAny, {
350
+ path: string;
351
+ mode: "path";
352
+ }, {
353
+ path: string;
354
+ mode: "path";
355
+ }>]>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ kind: "access-transformer";
358
+ input: {
359
+ content: string;
360
+ mode: "inline";
361
+ } | {
362
+ path: string;
363
+ mode: "path";
364
+ };
365
+ }, {
366
+ kind: "access-transformer";
367
+ input: {
368
+ content: string;
369
+ mode: "inline";
370
+ } | {
371
+ path: string;
372
+ mode: "path";
373
+ };
295
374
  }>]>;
296
375
  version: z.ZodOptional<z.ZodString>;
297
376
  mapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
377
+ atNamespace: z.ZodOptional<z.ZodEnum<["srg", "mojang", "obfuscated"]>>;
298
378
  sourcePriority: z.ZodOptional<z.ZodEnum<["loom-first", "maven-first"]>>;
299
379
  scope: z.ZodOptional<z.ZodEnum<["vanilla", "merged", "loader"]>>;
300
380
  preferProjectVersion: z.ZodOptional<z.ZodBoolean>;
@@ -317,11 +397,11 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
317
397
  preferProjectMapping: boolean;
318
398
  treatInfoAsWarning: boolean;
319
399
  includeIssues: boolean;
320
- task: "mixin" | "access-widener" | "project-summary";
400
+ task: "mixin" | "access-widener" | "access-transformer" | "project-summary";
321
401
  subject: {
322
402
  kind: "workspace";
323
403
  projectPath: string;
324
- discover?: ("mixins" | "access-wideners")[] | undefined;
404
+ discover?: ("mixins" | "access-wideners" | "access-transformers")[] | undefined;
325
405
  } | {
326
406
  kind: "mixin";
327
407
  input: {
@@ -349,6 +429,15 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
349
429
  path: string;
350
430
  mode: "path";
351
431
  };
432
+ } | {
433
+ kind: "access-transformer";
434
+ input: {
435
+ content: string;
436
+ mode: "inline";
437
+ } | {
438
+ path: string;
439
+ mode: "path";
440
+ };
352
441
  };
353
442
  mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
354
443
  version?: string | undefined;
@@ -358,15 +447,16 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
358
447
  preferProjectVersion?: boolean | undefined;
359
448
  warningMode?: "full" | "aggregated" | undefined;
360
449
  warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
450
+ atNamespace?: "mojang" | "obfuscated" | "srg" | undefined;
361
451
  configPaths?: string[] | undefined;
362
452
  detail?: "full" | "summary" | "standard" | undefined;
363
453
  include?: string[] | undefined;
364
454
  }, {
365
- task: "mixin" | "access-widener" | "project-summary";
455
+ task: "mixin" | "access-widener" | "access-transformer" | "project-summary";
366
456
  subject: {
367
457
  kind: "workspace";
368
458
  projectPath: string;
369
- discover?: ("mixins" | "access-wideners")[] | undefined;
459
+ discover?: ("mixins" | "access-wideners" | "access-transformers")[] | undefined;
370
460
  } | {
371
461
  kind: "mixin";
372
462
  input: {
@@ -394,6 +484,15 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
394
484
  path: string;
395
485
  mode: "path";
396
486
  };
487
+ } | {
488
+ kind: "access-transformer";
489
+ input: {
490
+ content: string;
491
+ mode: "inline";
492
+ } | {
493
+ path: string;
494
+ mode: "path";
495
+ };
397
496
  };
398
497
  mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
399
498
  version?: string | undefined;
@@ -409,6 +508,7 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
409
508
  warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
410
509
  treatInfoAsWarning?: boolean | undefined;
411
510
  includeIssues?: boolean | undefined;
511
+ atNamespace?: "mojang" | "obfuscated" | "srg" | undefined;
412
512
  configPaths?: string[] | undefined;
413
513
  detail?: "full" | "summary" | "standard" | undefined;
414
514
  include?: string[] | undefined;
@@ -419,11 +519,11 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
419
519
  preferProjectMapping: boolean;
420
520
  treatInfoAsWarning: boolean;
421
521
  includeIssues: boolean;
422
- task: "mixin" | "access-widener" | "project-summary";
522
+ task: "mixin" | "access-widener" | "access-transformer" | "project-summary";
423
523
  subject: {
424
524
  kind: "workspace";
425
525
  projectPath: string;
426
- discover?: ("mixins" | "access-wideners")[] | undefined;
526
+ discover?: ("mixins" | "access-wideners" | "access-transformers")[] | undefined;
427
527
  } | {
428
528
  kind: "mixin";
429
529
  input: {
@@ -451,6 +551,15 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
451
551
  path: string;
452
552
  mode: "path";
453
553
  };
554
+ } | {
555
+ kind: "access-transformer";
556
+ input: {
557
+ content: string;
558
+ mode: "inline";
559
+ } | {
560
+ path: string;
561
+ mode: "path";
562
+ };
454
563
  };
455
564
  mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
456
565
  version?: string | undefined;
@@ -460,15 +569,16 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
460
569
  preferProjectVersion?: boolean | undefined;
461
570
  warningMode?: "full" | "aggregated" | undefined;
462
571
  warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
572
+ atNamespace?: "mojang" | "obfuscated" | "srg" | undefined;
463
573
  configPaths?: string[] | undefined;
464
574
  detail?: "full" | "summary" | "standard" | undefined;
465
575
  include?: string[] | undefined;
466
576
  }, {
467
- task: "mixin" | "access-widener" | "project-summary";
577
+ task: "mixin" | "access-widener" | "access-transformer" | "project-summary";
468
578
  subject: {
469
579
  kind: "workspace";
470
580
  projectPath: string;
471
- discover?: ("mixins" | "access-wideners")[] | undefined;
581
+ discover?: ("mixins" | "access-wideners" | "access-transformers")[] | undefined;
472
582
  } | {
473
583
  kind: "mixin";
474
584
  input: {
@@ -496,6 +606,15 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
496
606
  path: string;
497
607
  mode: "path";
498
608
  };
609
+ } | {
610
+ kind: "access-transformer";
611
+ input: {
612
+ content: string;
613
+ mode: "inline";
614
+ } | {
615
+ path: string;
616
+ mode: "path";
617
+ };
499
618
  };
500
619
  mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
501
620
  version?: string | undefined;
@@ -511,6 +630,7 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
511
630
  warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
512
631
  treatInfoAsWarning?: boolean | undefined;
513
632
  includeIssues?: boolean | undefined;
633
+ atNamespace?: "mojang" | "obfuscated" | "srg" | undefined;
514
634
  configPaths?: string[] | undefined;
515
635
  detail?: "full" | "summary" | "standard" | undefined;
516
636
  include?: string[] | undefined;
@@ -525,14 +645,31 @@ type ValidateProjectDeps = {
525
645
  version: string;
526
646
  mapping?: "obfuscated" | "mojang" | "intermediary" | "yarn";
527
647
  sourcePriority?: "loom-first" | "maven-first";
648
+ projectPath?: string;
649
+ scope?: "vanilla" | "merged" | "loader";
650
+ preferProjectVersion?: boolean;
651
+ }) => Promise<Record<string, unknown> & {
652
+ warnings?: string[];
653
+ }>;
654
+ validateAccessTransformer?: (input: {
655
+ content: string;
656
+ version: string;
657
+ atNamespace?: "srg" | "mojang" | "obfuscated";
658
+ sourcePriority?: "loom-first" | "maven-first";
659
+ projectPath?: string;
660
+ scope?: "vanilla" | "merged" | "loader";
661
+ preferProjectVersion?: boolean;
528
662
  }) => Promise<Record<string, unknown> & {
529
663
  warnings?: string[];
530
664
  }>;
531
665
  discoverMixins: (projectPath: string, configPaths?: string[]) => Promise<string[]>;
532
666
  discoverAccessWideners: (projectPath: string) => Promise<string[]>;
667
+ discoverAccessTransformers?: (projectPath: string) => Promise<string[]>;
668
+ detectProjectMinecraftVersion?: (projectPath: string) => Promise<string | undefined>;
533
669
  };
534
670
  export declare function discoverWorkspaceMixins(projectPath: string, configPaths?: string[]): Promise<string[]>;
535
671
  export declare function discoverWorkspaceAccessWideners(projectPath: string): Promise<string[]>;
672
+ export declare function discoverWorkspaceAccessTransformers(projectPath: string): Promise<string[]>;
536
673
  export declare class ValidateProjectService {
537
674
  private readonly deps;
538
675
  constructor(deps: ValidateProjectDeps);