@adhisang/minecraft-modding-mcp 4.0.0 → 4.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 (174) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +36 -23
  3. package/dist/build-suggested-call.d.ts +29 -0
  4. package/dist/build-suggested-call.js +58 -0
  5. package/dist/cache-registry.d.ts +3 -1
  6. package/dist/cache-registry.js +50 -6
  7. package/dist/entry-tools/analyze-symbol-service.d.ts +16 -16
  8. package/dist/entry-tools/batch-class-members-service.d.ts +34 -0
  9. package/dist/entry-tools/batch-class-members-service.js +97 -0
  10. package/dist/entry-tools/batch-class-source-service.d.ts +37 -0
  11. package/dist/entry-tools/batch-class-source-service.js +100 -0
  12. package/dist/entry-tools/batch-mappings-service.d.ts +36 -0
  13. package/dist/entry-tools/batch-mappings-service.js +66 -0
  14. package/dist/entry-tools/batch-runner.d.ts +72 -0
  15. package/dist/entry-tools/batch-runner.js +90 -0
  16. package/dist/entry-tools/batch-symbol-exists-service.d.ts +46 -0
  17. package/dist/entry-tools/batch-symbol-exists-service.js +113 -0
  18. package/dist/entry-tools/compare-minecraft-service.d.ts +6 -6
  19. package/dist/entry-tools/inspect-minecraft/handlers/artifact.d.ts +5 -0
  20. package/dist/entry-tools/inspect-minecraft/handlers/artifact.js +83 -0
  21. package/dist/entry-tools/inspect-minecraft/handlers/class-members.d.ts +6 -0
  22. package/dist/entry-tools/inspect-minecraft/handlers/class-members.js +80 -0
  23. package/dist/entry-tools/inspect-minecraft/handlers/class-overview.d.ts +5 -0
  24. package/dist/entry-tools/inspect-minecraft/handlers/class-overview.js +248 -0
  25. package/dist/entry-tools/inspect-minecraft/handlers/class-source.d.ts +5 -0
  26. package/dist/entry-tools/inspect-minecraft/handlers/class-source.js +60 -0
  27. package/dist/entry-tools/inspect-minecraft/handlers/file.d.ts +5 -0
  28. package/dist/entry-tools/inspect-minecraft/handlers/file.js +54 -0
  29. package/dist/entry-tools/inspect-minecraft/handlers/list-files.d.ts +5 -0
  30. package/dist/entry-tools/inspect-minecraft/handlers/list-files.js +100 -0
  31. package/dist/entry-tools/inspect-minecraft/handlers/search.d.ts +5 -0
  32. package/dist/entry-tools/inspect-minecraft/handlers/search.js +155 -0
  33. package/dist/entry-tools/inspect-minecraft/handlers/versions.d.ts +6 -0
  34. package/dist/entry-tools/inspect-minecraft/handlers/versions.js +49 -0
  35. package/dist/entry-tools/inspect-minecraft/internal.d.ts +1042 -0
  36. package/dist/entry-tools/inspect-minecraft/internal.js +448 -0
  37. package/dist/entry-tools/inspect-minecraft-service.d.ts +193 -308
  38. package/dist/entry-tools/inspect-minecraft-service.js +20 -1244
  39. package/dist/entry-tools/manage-cache-service.d.ts +16 -16
  40. package/dist/entry-tools/validate-project/cases/access-transformer.d.ts +6 -0
  41. package/dist/entry-tools/validate-project/cases/access-transformer.js +106 -0
  42. package/dist/entry-tools/validate-project/cases/access-widener.d.ts +6 -0
  43. package/dist/entry-tools/validate-project/cases/access-widener.js +86 -0
  44. package/dist/entry-tools/validate-project/cases/mixin.d.ts +6 -0
  45. package/dist/entry-tools/validate-project/cases/mixin.js +90 -0
  46. package/dist/entry-tools/validate-project/cases/project-summary.d.ts +97 -0
  47. package/dist/entry-tools/validate-project/cases/project-summary.js +346 -0
  48. package/dist/entry-tools/validate-project/internal.d.ts +135 -0
  49. package/dist/entry-tools/validate-project/internal.js +287 -0
  50. package/dist/entry-tools/validate-project-service.d.ts +63 -47
  51. package/dist/entry-tools/validate-project-service.js +12 -562
  52. package/dist/entry-tools/verify-mixin-target-service.d.ts +133 -0
  53. package/dist/entry-tools/verify-mixin-target-service.js +323 -0
  54. package/dist/error-mapping.d.ts +40 -0
  55. package/dist/error-mapping.js +139 -0
  56. package/dist/errors.d.ts +6 -0
  57. package/dist/errors.js +6 -0
  58. package/dist/index.d.ts +2 -0
  59. package/dist/index.js +142 -1352
  60. package/dist/mapping/internal-types.d.ts +54 -0
  61. package/dist/mapping/internal-types.js +14 -0
  62. package/dist/mapping/loaders/mojang.d.ts +2 -0
  63. package/dist/mapping/loaders/mojang.js +64 -0
  64. package/dist/mapping/loaders/tiny-loom.d.ts +2 -0
  65. package/dist/mapping/loaders/tiny-loom.js +73 -0
  66. package/dist/mapping/loaders/tiny-maven.d.ts +2 -0
  67. package/dist/mapping/loaders/tiny-maven.js +104 -0
  68. package/dist/mapping/loaders/types.d.ts +14 -0
  69. package/dist/mapping/loaders/types.js +2 -0
  70. package/dist/mapping/lookup.d.ts +52 -0
  71. package/dist/mapping/lookup.js +496 -0
  72. package/dist/mapping/parsers/normalize.d.ts +10 -0
  73. package/dist/mapping/parsers/normalize.js +52 -0
  74. package/dist/mapping/parsers/proguard.d.ts +20 -0
  75. package/dist/mapping/parsers/proguard.js +138 -0
  76. package/dist/mapping/parsers/symbol-records.d.ts +27 -0
  77. package/dist/mapping/parsers/symbol-records.js +216 -0
  78. package/dist/mapping/parsers/tiny.d.ts +9 -0
  79. package/dist/mapping/parsers/tiny.js +96 -0
  80. package/dist/mapping/types.d.ts +147 -0
  81. package/dist/mapping/types.js +2 -0
  82. package/dist/mapping-pipeline-service.js +3 -2
  83. package/dist/mapping-service.d.ts +3 -144
  84. package/dist/mapping-service.js +19 -1201
  85. package/dist/mixin/access-validators.d.ts +9 -0
  86. package/dist/mixin/access-validators.js +257 -0
  87. package/dist/mixin/annotation-validators.d.ts +5 -0
  88. package/dist/mixin/annotation-validators.js +162 -0
  89. package/dist/mixin/helpers.d.ts +28 -0
  90. package/dist/mixin/helpers.js +315 -0
  91. package/dist/mixin/parsed-validator.d.ts +8 -0
  92. package/dist/mixin/parsed-validator.js +337 -0
  93. package/dist/mixin/types.d.ts +208 -0
  94. package/dist/mixin/types.js +28 -0
  95. package/dist/mixin-validator.d.ts +9 -201
  96. package/dist/mixin-validator.js +8 -1020
  97. package/dist/source/access-validate.d.ts +4 -0
  98. package/dist/source/access-validate.js +254 -0
  99. package/dist/source/artifact-resolver.d.ts +110 -0
  100. package/dist/source/artifact-resolver.js +1174 -0
  101. package/dist/source/cache-metrics.d.ts +26 -0
  102. package/dist/source/cache-metrics.js +172 -0
  103. package/dist/source/class-source/members-builder.d.ts +34 -0
  104. package/dist/source/class-source/members-builder.js +46 -0
  105. package/dist/source/class-source/snippet-builder.d.ts +19 -0
  106. package/dist/source/class-source/snippet-builder.js +46 -0
  107. package/dist/source/class-source-helpers.d.ts +34 -0
  108. package/dist/source/class-source-helpers.js +140 -0
  109. package/dist/source/class-source.d.ts +42 -0
  110. package/dist/source/class-source.js +883 -0
  111. package/dist/source/descriptor-utils.d.ts +6 -0
  112. package/dist/source/descriptor-utils.js +37 -0
  113. package/dist/source/file-access.d.ts +4 -0
  114. package/dist/source/file-access.js +102 -0
  115. package/dist/source/indexer.d.ts +82 -0
  116. package/dist/source/indexer.js +505 -0
  117. package/dist/source/lifecycle/diff-utils.d.ts +9 -0
  118. package/dist/source/lifecycle/diff-utils.js +107 -0
  119. package/dist/source/lifecycle/diff.d.ts +2 -0
  120. package/dist/source/lifecycle/diff.js +265 -0
  121. package/dist/source/lifecycle/mapping-helpers.d.ts +22 -0
  122. package/dist/source/lifecycle/mapping-helpers.js +327 -0
  123. package/dist/source/lifecycle/runtime-check.d.ts +2 -0
  124. package/dist/source/lifecycle/runtime-check.js +142 -0
  125. package/dist/source/lifecycle/trace.d.ts +2 -0
  126. package/dist/source/lifecycle/trace.js +231 -0
  127. package/dist/source/lifecycle.d.ts +4 -0
  128. package/dist/source/lifecycle.js +5 -0
  129. package/dist/source/search.d.ts +51 -0
  130. package/dist/source/search.js +676 -0
  131. package/dist/source/shared-utils.d.ts +6 -0
  132. package/dist/source/shared-utils.js +55 -0
  133. package/dist/source/state.d.ts +21 -0
  134. package/dist/source/state.js +19 -0
  135. package/dist/source/symbol-resolver.d.ts +3 -0
  136. package/dist/source/symbol-resolver.js +212 -0
  137. package/dist/source/validate-mixin/pipeline/mapping-health.d.ts +3 -0
  138. package/dist/source/validate-mixin/pipeline/mapping-health.js +41 -0
  139. package/dist/source/validate-mixin/pipeline/parse.d.ts +2 -0
  140. package/dist/source/validate-mixin/pipeline/parse.js +10 -0
  141. package/dist/source/validate-mixin/pipeline/resolve.d.ts +3 -0
  142. package/dist/source/validate-mixin/pipeline/resolve.js +78 -0
  143. package/dist/source/validate-mixin/pipeline/target-lookup.d.ts +6 -0
  144. package/dist/source/validate-mixin/pipeline/target-lookup.js +260 -0
  145. package/dist/source/validate-mixin/pipeline-context.d.ts +72 -0
  146. package/dist/source/validate-mixin/pipeline-context.js +93 -0
  147. package/dist/source/validate-mixin.d.ts +22 -0
  148. package/dist/source/validate-mixin.js +799 -0
  149. package/dist/source/workspace-target.d.ts +18 -0
  150. package/dist/source/workspace-target.js +305 -0
  151. package/dist/source-service.d.ts +147 -170
  152. package/dist/source-service.js +67 -6116
  153. package/dist/stage-emitter.d.ts +13 -0
  154. package/dist/stage-emitter.js +30 -0
  155. package/dist/stdio-supervisor.d.ts +61 -0
  156. package/dist/stdio-supervisor.js +326 -9
  157. package/dist/tool-contract-manifest.d.ts +1 -1
  158. package/dist/tool-contract-manifest.js +23 -6
  159. package/dist/tool-guidance.d.ts +82 -0
  160. package/dist/tool-guidance.js +734 -0
  161. package/dist/tool-schema-registry.d.ts +16 -0
  162. package/dist/tool-schema-registry.js +37 -0
  163. package/dist/tool-schemas.d.ts +3518 -0
  164. package/dist/tool-schemas.js +813 -0
  165. package/dist/types.d.ts +36 -0
  166. package/dist/version-service.js +7 -6
  167. package/dist/workspace-context-cache.d.ts +32 -0
  168. package/dist/workspace-context-cache.js +66 -0
  169. package/dist/workspace-mapping-service.d.ts +16 -0
  170. package/dist/workspace-mapping-service.js +173 -1
  171. package/docs/README-ja.md +414 -0
  172. package/docs/examples.md +483 -0
  173. package/docs/tool-reference.md +459 -0
  174. package/package.json +3 -2
@@ -0,0 +1,287 @@
1
+ import { stat, readFile } from "node:fs/promises";
2
+ import { resolve } from "node:path";
3
+ import { isAppError } from "../../errors.js";
4
+ import { buildVersionSourceSearchRoots } from "../../gradle-paths.js";
5
+ const VALIDATE_PROJECT_TASKS_OFF = process.env.VALIDATE_PROJECT_TASKS_OFF === "1";
6
+ const TASK_KEYS = [
7
+ "workspace.detected",
8
+ "gradle.readable",
9
+ "loom.cache.found",
10
+ "minecraft.artifact.resolved",
11
+ "mixins.validated",
12
+ "accessWideners.validated",
13
+ "accessTransformers.validated"
14
+ ];
15
+ // Helpers live as free functions so ValidateProjectService keeps its baseline
16
+ // declaration surface (constructor + execute only).
17
+ async function pathExists(target) {
18
+ try {
19
+ await stat(target);
20
+ return true;
21
+ }
22
+ catch {
23
+ return false;
24
+ }
25
+ }
26
+ async function probeWorkspaceDetected(projectPath) {
27
+ const startedAt = Date.now();
28
+ const candidates = [
29
+ "gradle.properties",
30
+ "settings.gradle",
31
+ "settings.gradle.kts",
32
+ "build.gradle",
33
+ "build.gradle.kts"
34
+ ];
35
+ try {
36
+ const evidence = [];
37
+ for (const candidate of candidates) {
38
+ if (await pathExists(resolve(projectPath, candidate))) {
39
+ evidence.push(candidate);
40
+ }
41
+ }
42
+ const durationMs = Date.now() - startedAt;
43
+ if (evidence.length === 0) {
44
+ return { status: "missing", durationMs };
45
+ }
46
+ return { status: "ok", durationMs, evidence };
47
+ }
48
+ catch (error) {
49
+ return {
50
+ status: "error",
51
+ durationMs: Date.now() - startedAt,
52
+ error: {
53
+ code: isAppError(error) ? error.code : "ERR_PROBE_FAILED",
54
+ detail: error instanceof Error ? error.message : String(error)
55
+ }
56
+ };
57
+ }
58
+ }
59
+ async function probeGradleReadable(projectPath) {
60
+ const startedAt = Date.now();
61
+ const propertiesPath = resolve(projectPath, "gradle.properties");
62
+ try {
63
+ const propsExists = await pathExists(propertiesPath);
64
+ let propsRead = false;
65
+ if (propsExists) {
66
+ await readFile(propertiesPath, "utf8");
67
+ propsRead = true;
68
+ }
69
+ const buildScriptCandidates = [
70
+ "build.gradle",
71
+ "build.gradle.kts",
72
+ "settings.gradle",
73
+ "settings.gradle.kts"
74
+ ];
75
+ const buildScripts = [];
76
+ for (const candidate of buildScriptCandidates) {
77
+ if (await pathExists(resolve(projectPath, candidate))) {
78
+ buildScripts.push(candidate);
79
+ }
80
+ }
81
+ const durationMs = Date.now() - startedAt;
82
+ if (!propsExists && buildScripts.length === 0) {
83
+ return { status: "missing", durationMs };
84
+ }
85
+ return {
86
+ status: "ok",
87
+ durationMs,
88
+ ...(propsRead ? { propertiesPath } : {}),
89
+ buildScripts
90
+ };
91
+ }
92
+ catch (error) {
93
+ return {
94
+ status: "error",
95
+ durationMs: Date.now() - startedAt,
96
+ error: {
97
+ code: isAppError(error) ? error.code : "ERR_GRADLE_READ_FAILED",
98
+ detail: error instanceof Error ? error.message : String(error)
99
+ }
100
+ };
101
+ }
102
+ }
103
+ async function probeLoomCacheFound(projectPath) {
104
+ const startedAt = Date.now();
105
+ try {
106
+ const roots = buildVersionSourceSearchRoots(projectPath);
107
+ for (const root of roots) {
108
+ if (await pathExists(root)) {
109
+ return {
110
+ status: "ok",
111
+ durationMs: Date.now() - startedAt,
112
+ cachePath: root
113
+ };
114
+ }
115
+ }
116
+ return { status: "missing", durationMs: Date.now() - startedAt };
117
+ }
118
+ catch (error) {
119
+ return {
120
+ status: "error",
121
+ durationMs: Date.now() - startedAt,
122
+ error: {
123
+ code: isAppError(error) ? error.code : "ERR_LOOM_PROBE_FAILED",
124
+ detail: error instanceof Error ? error.message : String(error)
125
+ }
126
+ };
127
+ }
128
+ }
129
+ async function probeMinecraftArtifactResolved(resolveArtifact, args) {
130
+ const startedAt = Date.now();
131
+ try {
132
+ const output = await resolveArtifact({
133
+ target: { kind: "version", value: args.version },
134
+ mapping: args.mapping,
135
+ sourcePriority: args.sourcePriority,
136
+ projectPath: args.projectPath,
137
+ scope: args.scope,
138
+ preferProjectVersion: args.preferProjectVersion
139
+ });
140
+ return {
141
+ status: "ok",
142
+ durationMs: Date.now() - startedAt,
143
+ artifactId: output.artifactId,
144
+ mapping: output.mappingApplied,
145
+ ...(Array.isArray(output.warnings) && output.warnings.length > 0
146
+ ? { warnings: output.warnings }
147
+ : {})
148
+ };
149
+ }
150
+ catch (error) {
151
+ return {
152
+ status: "error",
153
+ durationMs: Date.now() - startedAt,
154
+ error: {
155
+ code: isAppError(error) ? error.code : "ERR_ARTIFACT_PROBE_FAILED",
156
+ detail: error instanceof Error ? error.message : String(error)
157
+ }
158
+ };
159
+ }
160
+ }
161
+ function downstreamSkipReason(report, upstream) {
162
+ for (const key of upstream) {
163
+ const entry = report[key];
164
+ if (entry.status !== "ok") {
165
+ return { status: "skipped" };
166
+ }
167
+ }
168
+ return undefined;
169
+ }
170
+ function buildValidationEntryWithCounts(upstream, discoveredCount, errorCount, counts, durationMs) {
171
+ if (upstream) {
172
+ return upstream;
173
+ }
174
+ if (discoveredCount === 0) {
175
+ return { status: "missing", durationMs };
176
+ }
177
+ if (errorCount > 0) {
178
+ return { status: "error", durationMs, counts };
179
+ }
180
+ return { status: "ok", durationMs, counts };
181
+ }
182
+ function projectTaskEntry(entry, detail, include) {
183
+ const fullDetail = detail !== "summary" && include.includes("workspace");
184
+ if (fullDetail) {
185
+ return entry;
186
+ }
187
+ const slim = { status: entry.status };
188
+ if (entry.error) {
189
+ slim.error = entry.error;
190
+ }
191
+ if (entry.warnings && entry.warnings.length > 0) {
192
+ slim.warnings = entry.warnings;
193
+ }
194
+ return slim;
195
+ }
196
+ function projectTaskStatusReport(report, detail, include) {
197
+ const projected = {};
198
+ for (const key of TASK_KEYS) {
199
+ projected[key] = projectTaskEntry(report[key], detail, include);
200
+ }
201
+ return projected;
202
+ }
203
+ export async function runUpstreamProbes(projectPath) {
204
+ const workspace = await probeWorkspaceDetected(projectPath);
205
+ const loom = await probeLoomCacheFound(projectPath);
206
+ let gradle;
207
+ if (workspace.status !== "ok") {
208
+ gradle = { status: "skipped" };
209
+ }
210
+ else {
211
+ gradle = await probeGradleReadable(projectPath);
212
+ }
213
+ return { workspace, gradle, loom };
214
+ }
215
+ export async function buildEarlyTasksForBlocked(projectPath, detail, include, discovery) {
216
+ if (VALIDATE_PROJECT_TASKS_OFF) {
217
+ return undefined;
218
+ }
219
+ const { workspace, gradle, loom } = await runUpstreamProbes(projectPath);
220
+ const minecraftArtifactResolved = {
221
+ status: "skipped"
222
+ };
223
+ const validatedSkipped = { status: "skipped" };
224
+ const buildValidatorEntry = (discoveredCount) => {
225
+ if (workspace.status !== "ok" || gradle.status !== "ok") {
226
+ return validatedSkipped;
227
+ }
228
+ if (minecraftArtifactResolved.status !== "ok") {
229
+ return validatedSkipped;
230
+ }
231
+ return discoveredCount === 0 || discoveredCount === undefined
232
+ ? { status: "missing" }
233
+ : validatedSkipped;
234
+ };
235
+ const report = {
236
+ "workspace.detected": workspace,
237
+ "gradle.readable": gradle,
238
+ "loom.cache.found": loom,
239
+ "minecraft.artifact.resolved": minecraftArtifactResolved,
240
+ "mixins.validated": buildValidatorEntry(discovery?.mixinDiscoveryCount),
241
+ "accessWideners.validated": buildValidatorEntry(discovery?.awDiscoveryCount),
242
+ "accessTransformers.validated": buildValidatorEntry(discovery?.atDiscoveryCount)
243
+ };
244
+ return projectTaskStatusReport(report, detail, include);
245
+ }
246
+ export async function buildFullTaskStatusReport(deps, args) {
247
+ if (VALIDATE_PROJECT_TASKS_OFF) {
248
+ return undefined;
249
+ }
250
+ const { workspace, gradle, loom } = await runUpstreamProbes(args.projectPath);
251
+ let minecraftArtifactResolved;
252
+ if (workspace.status !== "ok" || gradle.status !== "ok") {
253
+ minecraftArtifactResolved = { status: "skipped" };
254
+ }
255
+ else if (deps.resolveArtifact) {
256
+ minecraftArtifactResolved = await probeMinecraftArtifactResolved(deps.resolveArtifact, {
257
+ version: args.resolvedVersion,
258
+ mapping: args.mapping,
259
+ sourcePriority: args.sourcePriority,
260
+ projectPath: args.projectPath,
261
+ scope: args.scope,
262
+ preferProjectVersion: args.preferProjectVersion
263
+ });
264
+ }
265
+ else {
266
+ minecraftArtifactResolved = { status: "skipped" };
267
+ }
268
+ const upstreamSkip = downstreamSkipReason({
269
+ "workspace.detected": workspace,
270
+ "gradle.readable": gradle,
271
+ "minecraft.artifact.resolved": minecraftArtifactResolved
272
+ }, ["workspace.detected", "gradle.readable", "minecraft.artifact.resolved"]);
273
+ const mixinsValidated = buildValidationEntryWithCounts(upstreamSkip, args.mixinDiscoveryCount, args.mixinCaughtErrors, args.mixinCounts, args.mixinDurationMs);
274
+ const accessWidenersValidated = buildValidationEntryWithCounts(upstreamSkip, args.awDiscoveryCount, args.awCaughtErrors, args.awCounts, args.awDurationMs);
275
+ const accessTransformersValidated = buildValidationEntryWithCounts(upstreamSkip, args.atDiscoveryCount, args.atCaughtErrors, args.atCounts, args.atDurationMs);
276
+ const report = {
277
+ "workspace.detected": workspace,
278
+ "gradle.readable": gradle,
279
+ "loom.cache.found": loom,
280
+ "minecraft.artifact.resolved": minecraftArtifactResolved,
281
+ "mixins.validated": mixinsValidated,
282
+ "accessWideners.validated": accessWidenersValidated,
283
+ "accessTransformers.validated": accessTransformersValidated
284
+ };
285
+ return projectTaskStatusReport(report, args.detail, args.include);
286
+ }
287
+ //# sourceMappingURL=internal.js.map
@@ -1,4 +1,51 @@
1
1
  import { z } from "zod";
2
+ import type { SourceMapping } from "../types.js";
3
+ import { type ValidateProjectDeps } from "./validate-project/internal.js";
4
+ export type TaskStatus = "ok" | "skipped" | "missing" | "error";
5
+ type TaskEntryBase = {
6
+ status: TaskStatus;
7
+ durationMs?: number;
8
+ error?: {
9
+ code: string;
10
+ detail: string;
11
+ };
12
+ warnings?: string[];
13
+ };
14
+ export type TaskStatusReport = {
15
+ "workspace.detected": TaskEntryBase & {
16
+ evidence?: string[];
17
+ };
18
+ "gradle.readable": TaskEntryBase & {
19
+ propertiesPath?: string;
20
+ buildScripts?: string[];
21
+ };
22
+ "loom.cache.found": TaskEntryBase & {
23
+ cachePath?: string;
24
+ };
25
+ "minecraft.artifact.resolved": TaskEntryBase & {
26
+ artifactId?: string;
27
+ mapping?: SourceMapping;
28
+ };
29
+ "mixins.validated": TaskEntryBase & {
30
+ counts?: {
31
+ ok: number;
32
+ partial: number;
33
+ invalid: number;
34
+ };
35
+ };
36
+ "accessWideners.validated": TaskEntryBase & {
37
+ counts?: {
38
+ ok: number;
39
+ invalid: number;
40
+ };
41
+ };
42
+ "accessTransformers.validated": TaskEntryBase & {
43
+ counts?: {
44
+ ok: number;
45
+ invalid: number;
46
+ };
47
+ };
48
+ };
2
49
  export declare const validateProjectShape: {
3
50
  task: z.ZodEnum<["project-summary", "mixin", "access-widener", "access-transformer"]>;
4
51
  subject: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -397,7 +444,7 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
397
444
  preferProjectMapping: boolean;
398
445
  treatInfoAsWarning: boolean;
399
446
  includeIssues: boolean;
400
- task: "mixin" | "access-widener" | "access-transformer" | "project-summary";
447
+ task: "mixin" | "project-summary" | "access-widener" | "access-transformer";
401
448
  subject: {
402
449
  kind: "workspace";
403
450
  projectPath: string;
@@ -439,20 +486,20 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
439
486
  mode: "path";
440
487
  };
441
488
  };
442
- mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
443
489
  version?: string | undefined;
444
- scope?: "loader" | "merged" | "vanilla" | undefined;
490
+ mapping?: "obfuscated" | "mojang" | "intermediary" | "yarn" | undefined;
491
+ scope?: "vanilla" | "merged" | "loader" | undefined;
445
492
  sourcePriority?: "loom-first" | "maven-first" | undefined;
446
493
  sourceRoots?: string[] | undefined;
447
494
  preferProjectVersion?: boolean | undefined;
448
495
  warningMode?: "full" | "aggregated" | undefined;
449
496
  warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
450
- atNamespace?: "mojang" | "obfuscated" | "srg" | undefined;
451
497
  configPaths?: string[] | undefined;
498
+ atNamespace?: "obfuscated" | "mojang" | "srg" | undefined;
452
499
  detail?: "full" | "summary" | "standard" | undefined;
453
500
  include?: string[] | undefined;
454
501
  }, {
455
- task: "mixin" | "access-widener" | "access-transformer" | "project-summary";
502
+ task: "mixin" | "project-summary" | "access-widener" | "access-transformer";
456
503
  subject: {
457
504
  kind: "workspace";
458
505
  projectPath: string;
@@ -494,9 +541,9 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
494
541
  mode: "path";
495
542
  };
496
543
  };
497
- mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
498
544
  version?: string | undefined;
499
- scope?: "loader" | "merged" | "vanilla" | undefined;
545
+ mapping?: "obfuscated" | "mojang" | "intermediary" | "yarn" | undefined;
546
+ scope?: "vanilla" | "merged" | "loader" | undefined;
500
547
  sourcePriority?: "loom-first" | "maven-first" | undefined;
501
548
  sourceRoots?: string[] | undefined;
502
549
  preferProjectVersion?: boolean | undefined;
@@ -508,8 +555,8 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
508
555
  warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
509
556
  treatInfoAsWarning?: boolean | undefined;
510
557
  includeIssues?: boolean | undefined;
511
- atNamespace?: "mojang" | "obfuscated" | "srg" | undefined;
512
558
  configPaths?: string[] | undefined;
559
+ atNamespace?: "obfuscated" | "mojang" | "srg" | undefined;
513
560
  detail?: "full" | "summary" | "standard" | undefined;
514
561
  include?: string[] | undefined;
515
562
  }>, {
@@ -519,7 +566,7 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
519
566
  preferProjectMapping: boolean;
520
567
  treatInfoAsWarning: boolean;
521
568
  includeIssues: boolean;
522
- task: "mixin" | "access-widener" | "access-transformer" | "project-summary";
569
+ task: "mixin" | "project-summary" | "access-widener" | "access-transformer";
523
570
  subject: {
524
571
  kind: "workspace";
525
572
  projectPath: string;
@@ -561,20 +608,20 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
561
608
  mode: "path";
562
609
  };
563
610
  };
564
- mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
565
611
  version?: string | undefined;
566
- scope?: "loader" | "merged" | "vanilla" | undefined;
612
+ mapping?: "obfuscated" | "mojang" | "intermediary" | "yarn" | undefined;
613
+ scope?: "vanilla" | "merged" | "loader" | undefined;
567
614
  sourcePriority?: "loom-first" | "maven-first" | undefined;
568
615
  sourceRoots?: string[] | undefined;
569
616
  preferProjectVersion?: boolean | undefined;
570
617
  warningMode?: "full" | "aggregated" | undefined;
571
618
  warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
572
- atNamespace?: "mojang" | "obfuscated" | "srg" | undefined;
573
619
  configPaths?: string[] | undefined;
620
+ atNamespace?: "obfuscated" | "mojang" | "srg" | undefined;
574
621
  detail?: "full" | "summary" | "standard" | undefined;
575
622
  include?: string[] | undefined;
576
623
  }, {
577
- task: "mixin" | "access-widener" | "access-transformer" | "project-summary";
624
+ task: "mixin" | "project-summary" | "access-widener" | "access-transformer";
578
625
  subject: {
579
626
  kind: "workspace";
580
627
  projectPath: string;
@@ -616,9 +663,9 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
616
663
  mode: "path";
617
664
  };
618
665
  };
619
- mapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
620
666
  version?: string | undefined;
621
- scope?: "loader" | "merged" | "vanilla" | undefined;
667
+ mapping?: "obfuscated" | "mojang" | "intermediary" | "yarn" | undefined;
668
+ scope?: "vanilla" | "merged" | "loader" | undefined;
622
669
  sourcePriority?: "loom-first" | "maven-first" | undefined;
623
670
  sourceRoots?: string[] | undefined;
624
671
  preferProjectVersion?: boolean | undefined;
@@ -630,43 +677,12 @@ export declare const validateProjectSchema: z.ZodEffects<z.ZodObject<{
630
677
  warningCategoryFilter?: ("mapping" | "parse" | "validation" | "configuration" | "resolution")[] | undefined;
631
678
  treatInfoAsWarning?: boolean | undefined;
632
679
  includeIssues?: boolean | undefined;
633
- atNamespace?: "mojang" | "obfuscated" | "srg" | undefined;
634
680
  configPaths?: string[] | undefined;
681
+ atNamespace?: "obfuscated" | "mojang" | "srg" | undefined;
635
682
  detail?: "full" | "summary" | "standard" | undefined;
636
683
  include?: string[] | undefined;
637
684
  }>;
638
685
  export type ValidateProjectInput = z.infer<typeof validateProjectSchema>;
639
- type ValidateProjectDeps = {
640
- validateMixin: (input: Record<string, unknown>) => Promise<Record<string, unknown> & {
641
- warnings?: string[];
642
- }>;
643
- validateAccessWidener: (input: {
644
- content: string;
645
- version: string;
646
- mapping?: "obfuscated" | "mojang" | "intermediary" | "yarn";
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;
662
- }) => Promise<Record<string, unknown> & {
663
- warnings?: string[];
664
- }>;
665
- discoverMixins: (projectPath: string, configPaths?: string[]) => Promise<string[]>;
666
- discoverAccessWideners: (projectPath: string) => Promise<string[]>;
667
- discoverAccessTransformers?: (projectPath: string) => Promise<string[]>;
668
- detectProjectMinecraftVersion?: (projectPath: string) => Promise<string | undefined>;
669
- };
670
686
  export declare function discoverWorkspaceMixins(projectPath: string, configPaths?: string[]): Promise<string[]>;
671
687
  export declare function discoverWorkspaceAccessWideners(projectPath: string): Promise<string[]>;
672
688
  export declare function discoverWorkspaceAccessTransformers(projectPath: string): Promise<string[]>;