@adhisang/minecraft-modding-mcp 3.1.1 → 4.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +37 -18
  3. package/dist/access-transformer-parser.d.ts +17 -0
  4. package/dist/access-transformer-parser.js +97 -0
  5. package/dist/cache-registry.d.ts +1 -1
  6. package/dist/cache-registry.js +10 -2
  7. package/dist/concurrency.d.ts +1 -0
  8. package/dist/concurrency.js +24 -0
  9. package/dist/config.d.ts +10 -1
  10. package/dist/config.js +52 -1
  11. package/dist/decompiler/vineflower.js +22 -21
  12. package/dist/entry-tools/analyze-mod-service.d.ts +4 -4
  13. package/dist/entry-tools/analyze-symbol-service.d.ts +22 -22
  14. package/dist/entry-tools/analyze-symbol-service.js +13 -2
  15. package/dist/entry-tools/inspect-minecraft-service.d.ts +168 -168
  16. package/dist/entry-tools/inspect-minecraft-service.js +8 -2
  17. package/dist/entry-tools/manage-cache-service.d.ts +4 -4
  18. package/dist/entry-tools/validate-project-service.d.ts +153 -16
  19. package/dist/entry-tools/validate-project-service.js +442 -25
  20. package/dist/gradle-paths.d.ts +4 -0
  21. package/dist/gradle-paths.js +57 -0
  22. package/dist/index.js +148 -30
  23. package/dist/lru-list.d.ts +31 -0
  24. package/dist/lru-list.js +102 -0
  25. package/dist/mapping-pipeline-service.d.ts +12 -1
  26. package/dist/mapping-pipeline-service.js +28 -1
  27. package/dist/mapping-service.d.ts +16 -0
  28. package/dist/mapping-service.js +405 -68
  29. package/dist/minecraft-explorer-service.d.ts +13 -0
  30. package/dist/minecraft-explorer-service.js +8 -4
  31. package/dist/mixin-validator.d.ts +33 -2
  32. package/dist/mixin-validator.js +218 -17
  33. package/dist/mod-analyzer.d.ts +1 -0
  34. package/dist/mod-analyzer.js +17 -1
  35. package/dist/mod-decompile-service.js +4 -4
  36. package/dist/mod-remap-service.js +1 -54
  37. package/dist/mod-search-service.d.ts +1 -0
  38. package/dist/mod-search-service.js +84 -51
  39. package/dist/observability.d.ts +18 -1
  40. package/dist/observability.js +44 -1
  41. package/dist/response-utils.d.ts +69 -0
  42. package/dist/response-utils.js +227 -0
  43. package/dist/source-jar-reader.d.ts +16 -0
  44. package/dist/source-jar-reader.js +103 -1
  45. package/dist/source-resolver.d.ts +9 -1
  46. package/dist/source-resolver.js +23 -16
  47. package/dist/source-service.d.ts +119 -3
  48. package/dist/source-service.js +1836 -218
  49. package/dist/storage/artifacts-repo.d.ts +4 -1
  50. package/dist/storage/artifacts-repo.js +33 -5
  51. package/dist/storage/files-repo.d.ts +0 -2
  52. package/dist/storage/files-repo.js +0 -11
  53. package/dist/storage/migrations.d.ts +1 -1
  54. package/dist/storage/migrations.js +10 -2
  55. package/dist/storage/schema.d.ts +2 -0
  56. package/dist/storage/schema.js +25 -0
  57. package/dist/tool-contract-manifest.js +8 -6
  58. package/dist/types.d.ts +20 -0
  59. package/dist/workspace-mapping-service.d.ts +13 -0
  60. package/dist/workspace-mapping-service.js +146 -14
  61. package/package.json +3 -1
@@ -6,17 +6,17 @@ export declare const analyzeSymbolShape: {
6
6
  kind: z.ZodEnum<["class", "method", "field", "symbol"]>;
7
7
  name: z.ZodString;
8
8
  owner: z.ZodOptional<z.ZodString>;
9
- descriptor: z.ZodOptional<z.ZodString>;
9
+ descriptor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- kind: "symbol" | "class" | "method" | "field";
12
11
  name: string;
13
- owner?: string | undefined;
12
+ kind: "symbol" | "class" | "field" | "method";
14
13
  descriptor?: string | undefined;
14
+ owner?: string | undefined;
15
15
  }, {
16
- kind: "symbol" | "class" | "method" | "field";
17
16
  name: string;
18
- owner?: string | undefined;
17
+ kind: "symbol" | "class" | "field" | "method";
19
18
  descriptor?: string | undefined;
19
+ owner?: string | undefined;
20
20
  }>;
21
21
  version: z.ZodOptional<z.ZodString>;
22
22
  sourceMapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
@@ -37,17 +37,17 @@ export declare const analyzeSymbolSchema: z.ZodEffects<z.ZodObject<{
37
37
  kind: z.ZodEnum<["class", "method", "field", "symbol"]>;
38
38
  name: z.ZodString;
39
39
  owner: z.ZodOptional<z.ZodString>;
40
- descriptor: z.ZodOptional<z.ZodString>;
40
+ descriptor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
41
41
  }, "strip", z.ZodTypeAny, {
42
- kind: "symbol" | "class" | "method" | "field";
43
42
  name: string;
44
- owner?: string | undefined;
43
+ kind: "symbol" | "class" | "field" | "method";
45
44
  descriptor?: string | undefined;
45
+ owner?: string | undefined;
46
46
  }, {
47
- kind: "symbol" | "class" | "method" | "field";
48
47
  name: string;
49
- owner?: string | undefined;
48
+ kind: "symbol" | "class" | "field" | "method";
50
49
  descriptor?: string | undefined;
50
+ owner?: string | undefined;
51
51
  }>;
52
52
  version: z.ZodOptional<z.ZodString>;
53
53
  sourceMapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
@@ -65,10 +65,10 @@ export declare const analyzeSymbolSchema: z.ZodEffects<z.ZodObject<{
65
65
  nameMode: "auto" | "fqcn";
66
66
  task: "map" | "workspace" | "exists" | "exact-map" | "lifecycle" | "api-overview";
67
67
  subject: {
68
- kind: "symbol" | "class" | "method" | "field";
69
68
  name: string;
70
- owner?: string | undefined;
69
+ kind: "symbol" | "class" | "field" | "method";
71
70
  descriptor?: string | undefined;
71
+ owner?: string | undefined;
72
72
  };
73
73
  signatureMode: "exact" | "name-only";
74
74
  maxCandidates: number;
@@ -79,15 +79,15 @@ export declare const analyzeSymbolSchema: z.ZodEffects<z.ZodObject<{
79
79
  classNameMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
80
80
  detail?: "full" | "summary" | "standard" | undefined;
81
81
  include?: string[] | undefined;
82
- includeKinds?: ("class" | "method" | "field")[] | undefined;
82
+ includeKinds?: ("class" | "field" | "method")[] | undefined;
83
83
  maxRows?: number | undefined;
84
84
  }, {
85
85
  task: "map" | "workspace" | "exists" | "exact-map" | "lifecycle" | "api-overview";
86
86
  subject: {
87
- kind: "symbol" | "class" | "method" | "field";
88
87
  name: string;
89
- owner?: string | undefined;
88
+ kind: "symbol" | "class" | "field" | "method";
90
89
  descriptor?: string | undefined;
90
+ owner?: string | undefined;
91
91
  };
92
92
  projectPath?: string | undefined;
93
93
  version?: string | undefined;
@@ -98,17 +98,17 @@ export declare const analyzeSymbolSchema: z.ZodEffects<z.ZodObject<{
98
98
  detail?: "full" | "summary" | "standard" | undefined;
99
99
  include?: string[] | undefined;
100
100
  signatureMode?: "exact" | "name-only" | undefined;
101
- includeKinds?: ("class" | "method" | "field")[] | undefined;
101
+ includeKinds?: ("class" | "field" | "method")[] | undefined;
102
102
  maxRows?: number | undefined;
103
103
  maxCandidates?: number | undefined;
104
104
  }>, {
105
105
  nameMode: "auto" | "fqcn";
106
106
  task: "map" | "workspace" | "exists" | "exact-map" | "lifecycle" | "api-overview";
107
107
  subject: {
108
- kind: "symbol" | "class" | "method" | "field";
109
108
  name: string;
110
- owner?: string | undefined;
109
+ kind: "symbol" | "class" | "field" | "method";
111
110
  descriptor?: string | undefined;
111
+ owner?: string | undefined;
112
112
  };
113
113
  signatureMode: "exact" | "name-only";
114
114
  maxCandidates: number;
@@ -119,15 +119,15 @@ export declare const analyzeSymbolSchema: z.ZodEffects<z.ZodObject<{
119
119
  classNameMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
120
120
  detail?: "full" | "summary" | "standard" | undefined;
121
121
  include?: string[] | undefined;
122
- includeKinds?: ("class" | "method" | "field")[] | undefined;
122
+ includeKinds?: ("class" | "field" | "method")[] | undefined;
123
123
  maxRows?: number | undefined;
124
124
  }, {
125
125
  task: "map" | "workspace" | "exists" | "exact-map" | "lifecycle" | "api-overview";
126
126
  subject: {
127
- kind: "symbol" | "class" | "method" | "field";
128
127
  name: string;
129
- owner?: string | undefined;
128
+ kind: "symbol" | "class" | "field" | "method";
130
129
  descriptor?: string | undefined;
130
+ owner?: string | undefined;
131
131
  };
132
132
  projectPath?: string | undefined;
133
133
  version?: string | undefined;
@@ -138,7 +138,7 @@ export declare const analyzeSymbolSchema: z.ZodEffects<z.ZodObject<{
138
138
  detail?: "full" | "summary" | "standard" | undefined;
139
139
  include?: string[] | undefined;
140
140
  signatureMode?: "exact" | "name-only" | undefined;
141
- includeKinds?: ("class" | "method" | "field")[] | undefined;
141
+ includeKinds?: ("class" | "field" | "method")[] | undefined;
142
142
  maxRows?: number | undefined;
143
143
  maxCandidates?: number | undefined;
144
144
  }>;
@@ -4,6 +4,17 @@ import { buildIncludeSchema, detailSchema, positiveIntSchema } from "./entry-too
4
4
  import { buildEntryToolResult, createSummarySubject } from "./response-contract.js";
5
5
  import { resolveDetail, resolveInclude } from "./request-normalizers.js";
6
6
  const nonEmptyString = z.string().trim().min(1);
7
+ // Descriptor field that treats empty/whitespace strings as omitted so callers can pass
8
+ // `descriptor: ""` interchangeably with omitting the field when signatureMode="name-only".
9
+ const optionalDescriptorString = z
10
+ .string()
11
+ .optional()
12
+ .transform((value) => {
13
+ if (value === undefined)
14
+ return undefined;
15
+ const trimmed = value.trim();
16
+ return trimmed.length === 0 ? undefined : trimmed;
17
+ });
7
18
  const INCLUDE_GROUPS = ["warnings", "candidates", "matrix", "workspace", "timings"];
8
19
  const TASKS = ["exists", "map", "exact-map", "lifecycle", "workspace", "api-overview"];
9
20
  export const analyzeSymbolShape = {
@@ -12,7 +23,7 @@ export const analyzeSymbolShape = {
12
23
  kind: z.enum(["class", "method", "field", "symbol"]),
13
24
  name: nonEmptyString,
14
25
  owner: nonEmptyString.optional(),
15
- descriptor: nonEmptyString.optional()
26
+ descriptor: optionalDescriptorString
16
27
  }),
17
28
  version: nonEmptyString.optional(),
18
29
  sourceMapping: z.enum(["obfuscated", "mojang", "intermediary", "yarn"]).optional(),
@@ -23,7 +34,7 @@ export const analyzeSymbolShape = {
23
34
  nameMode: z.enum(["fqcn", "auto"]).default("fqcn"),
24
35
  includeKinds: z.array(z.enum(["class", "field", "method"])).optional(),
25
36
  maxRows: positiveIntSchema.optional(),
26
- maxCandidates: positiveIntSchema.default(200),
37
+ maxCandidates: positiveIntSchema.default(5),
27
38
  detail: detailSchema.optional(),
28
39
  include: buildIncludeSchema(INCLUDE_GROUPS)
29
40
  };