@adhisang/minecraft-modding-mcp 3.2.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 (194) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +52 -32
  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 +59 -7
  7. package/dist/config.d.ts +10 -1
  8. package/dist/config.js +52 -1
  9. package/dist/entry-tools/analyze-symbol-service.d.ts +18 -18
  10. package/dist/entry-tools/analyze-symbol-service.js +13 -2
  11. package/dist/entry-tools/batch-class-members-service.d.ts +34 -0
  12. package/dist/entry-tools/batch-class-members-service.js +97 -0
  13. package/dist/entry-tools/batch-class-source-service.d.ts +37 -0
  14. package/dist/entry-tools/batch-class-source-service.js +100 -0
  15. package/dist/entry-tools/batch-mappings-service.d.ts +36 -0
  16. package/dist/entry-tools/batch-mappings-service.js +66 -0
  17. package/dist/entry-tools/batch-runner.d.ts +72 -0
  18. package/dist/entry-tools/batch-runner.js +90 -0
  19. package/dist/entry-tools/batch-symbol-exists-service.d.ts +46 -0
  20. package/dist/entry-tools/batch-symbol-exists-service.js +113 -0
  21. package/dist/entry-tools/compare-minecraft-service.d.ts +6 -6
  22. package/dist/entry-tools/inspect-minecraft/handlers/artifact.d.ts +5 -0
  23. package/dist/entry-tools/inspect-minecraft/handlers/artifact.js +83 -0
  24. package/dist/entry-tools/inspect-minecraft/handlers/class-members.d.ts +6 -0
  25. package/dist/entry-tools/inspect-minecraft/handlers/class-members.js +80 -0
  26. package/dist/entry-tools/inspect-minecraft/handlers/class-overview.d.ts +5 -0
  27. package/dist/entry-tools/inspect-minecraft/handlers/class-overview.js +248 -0
  28. package/dist/entry-tools/inspect-minecraft/handlers/class-source.d.ts +5 -0
  29. package/dist/entry-tools/inspect-minecraft/handlers/class-source.js +60 -0
  30. package/dist/entry-tools/inspect-minecraft/handlers/file.d.ts +5 -0
  31. package/dist/entry-tools/inspect-minecraft/handlers/file.js +54 -0
  32. package/dist/entry-tools/inspect-minecraft/handlers/list-files.d.ts +5 -0
  33. package/dist/entry-tools/inspect-minecraft/handlers/list-files.js +100 -0
  34. package/dist/entry-tools/inspect-minecraft/handlers/search.d.ts +5 -0
  35. package/dist/entry-tools/inspect-minecraft/handlers/search.js +155 -0
  36. package/dist/entry-tools/inspect-minecraft/handlers/versions.d.ts +6 -0
  37. package/dist/entry-tools/inspect-minecraft/handlers/versions.js +49 -0
  38. package/dist/entry-tools/inspect-minecraft/internal.d.ts +1042 -0
  39. package/dist/entry-tools/inspect-minecraft/internal.js +448 -0
  40. package/dist/entry-tools/inspect-minecraft-service.d.ts +213 -328
  41. package/dist/entry-tools/inspect-minecraft-service.js +20 -1238
  42. package/dist/entry-tools/manage-cache-service.d.ts +16 -16
  43. package/dist/entry-tools/validate-project/cases/access-transformer.d.ts +6 -0
  44. package/dist/entry-tools/validate-project/cases/access-transformer.js +106 -0
  45. package/dist/entry-tools/validate-project/cases/access-widener.d.ts +6 -0
  46. package/dist/entry-tools/validate-project/cases/access-widener.js +86 -0
  47. package/dist/entry-tools/validate-project/cases/mixin.d.ts +6 -0
  48. package/dist/entry-tools/validate-project/cases/mixin.js +90 -0
  49. package/dist/entry-tools/validate-project/cases/project-summary.d.ts +97 -0
  50. package/dist/entry-tools/validate-project/cases/project-summary.js +346 -0
  51. package/dist/entry-tools/validate-project/internal.d.ts +135 -0
  52. package/dist/entry-tools/validate-project/internal.js +287 -0
  53. package/dist/entry-tools/validate-project-service.d.ts +63 -47
  54. package/dist/entry-tools/validate-project-service.js +12 -482
  55. package/dist/entry-tools/verify-mixin-target-service.d.ts +133 -0
  56. package/dist/entry-tools/verify-mixin-target-service.js +323 -0
  57. package/dist/error-mapping.d.ts +40 -0
  58. package/dist/error-mapping.js +139 -0
  59. package/dist/errors.d.ts +6 -0
  60. package/dist/errors.js +6 -0
  61. package/dist/index.d.ts +2 -0
  62. package/dist/index.js +170 -1314
  63. package/dist/lru-list.d.ts +31 -0
  64. package/dist/lru-list.js +102 -0
  65. package/dist/mapping/internal-types.d.ts +54 -0
  66. package/dist/mapping/internal-types.js +14 -0
  67. package/dist/mapping/loaders/mojang.d.ts +2 -0
  68. package/dist/mapping/loaders/mojang.js +64 -0
  69. package/dist/mapping/loaders/tiny-loom.d.ts +2 -0
  70. package/dist/mapping/loaders/tiny-loom.js +73 -0
  71. package/dist/mapping/loaders/tiny-maven.d.ts +2 -0
  72. package/dist/mapping/loaders/tiny-maven.js +104 -0
  73. package/dist/mapping/loaders/types.d.ts +14 -0
  74. package/dist/mapping/loaders/types.js +2 -0
  75. package/dist/mapping/lookup.d.ts +52 -0
  76. package/dist/mapping/lookup.js +496 -0
  77. package/dist/mapping/parsers/normalize.d.ts +10 -0
  78. package/dist/mapping/parsers/normalize.js +52 -0
  79. package/dist/mapping/parsers/proguard.d.ts +20 -0
  80. package/dist/mapping/parsers/proguard.js +138 -0
  81. package/dist/mapping/parsers/symbol-records.d.ts +27 -0
  82. package/dist/mapping/parsers/symbol-records.js +216 -0
  83. package/dist/mapping/parsers/tiny.d.ts +9 -0
  84. package/dist/mapping/parsers/tiny.js +96 -0
  85. package/dist/mapping/types.d.ts +147 -0
  86. package/dist/mapping/types.js +2 -0
  87. package/dist/mapping-pipeline-service.d.ts +10 -1
  88. package/dist/mapping-pipeline-service.js +16 -3
  89. package/dist/mapping-service.d.ts +15 -144
  90. package/dist/mapping-service.js +179 -1119
  91. package/dist/mixin/access-validators.d.ts +9 -0
  92. package/dist/mixin/access-validators.js +257 -0
  93. package/dist/mixin/annotation-validators.d.ts +5 -0
  94. package/dist/mixin/annotation-validators.js +162 -0
  95. package/dist/mixin/helpers.d.ts +28 -0
  96. package/dist/mixin/helpers.js +315 -0
  97. package/dist/mixin/parsed-validator.d.ts +8 -0
  98. package/dist/mixin/parsed-validator.js +337 -0
  99. package/dist/mixin/types.d.ts +208 -0
  100. package/dist/mixin/types.js +28 -0
  101. package/dist/mixin-validator.d.ts +9 -201
  102. package/dist/mixin-validator.js +8 -1005
  103. package/dist/observability.d.ts +18 -1
  104. package/dist/observability.js +44 -1
  105. package/dist/response-utils.d.ts +44 -10
  106. package/dist/response-utils.js +131 -17
  107. package/dist/source/access-validate.d.ts +4 -0
  108. package/dist/source/access-validate.js +254 -0
  109. package/dist/source/artifact-resolver.d.ts +110 -0
  110. package/dist/source/artifact-resolver.js +1174 -0
  111. package/dist/source/cache-metrics.d.ts +26 -0
  112. package/dist/source/cache-metrics.js +172 -0
  113. package/dist/source/class-source/members-builder.d.ts +34 -0
  114. package/dist/source/class-source/members-builder.js +46 -0
  115. package/dist/source/class-source/snippet-builder.d.ts +19 -0
  116. package/dist/source/class-source/snippet-builder.js +46 -0
  117. package/dist/source/class-source-helpers.d.ts +34 -0
  118. package/dist/source/class-source-helpers.js +140 -0
  119. package/dist/source/class-source.d.ts +42 -0
  120. package/dist/source/class-source.js +883 -0
  121. package/dist/source/descriptor-utils.d.ts +6 -0
  122. package/dist/source/descriptor-utils.js +37 -0
  123. package/dist/source/file-access.d.ts +4 -0
  124. package/dist/source/file-access.js +102 -0
  125. package/dist/source/indexer.d.ts +82 -0
  126. package/dist/source/indexer.js +505 -0
  127. package/dist/source/lifecycle/diff-utils.d.ts +9 -0
  128. package/dist/source/lifecycle/diff-utils.js +107 -0
  129. package/dist/source/lifecycle/diff.d.ts +2 -0
  130. package/dist/source/lifecycle/diff.js +265 -0
  131. package/dist/source/lifecycle/mapping-helpers.d.ts +22 -0
  132. package/dist/source/lifecycle/mapping-helpers.js +327 -0
  133. package/dist/source/lifecycle/runtime-check.d.ts +2 -0
  134. package/dist/source/lifecycle/runtime-check.js +142 -0
  135. package/dist/source/lifecycle/trace.d.ts +2 -0
  136. package/dist/source/lifecycle/trace.js +231 -0
  137. package/dist/source/lifecycle.d.ts +4 -0
  138. package/dist/source/lifecycle.js +5 -0
  139. package/dist/source/search.d.ts +51 -0
  140. package/dist/source/search.js +676 -0
  141. package/dist/source/shared-utils.d.ts +6 -0
  142. package/dist/source/shared-utils.js +55 -0
  143. package/dist/source/state.d.ts +21 -0
  144. package/dist/source/state.js +19 -0
  145. package/dist/source/symbol-resolver.d.ts +3 -0
  146. package/dist/source/symbol-resolver.js +212 -0
  147. package/dist/source/validate-mixin/pipeline/mapping-health.d.ts +3 -0
  148. package/dist/source/validate-mixin/pipeline/mapping-health.js +41 -0
  149. package/dist/source/validate-mixin/pipeline/parse.d.ts +2 -0
  150. package/dist/source/validate-mixin/pipeline/parse.js +10 -0
  151. package/dist/source/validate-mixin/pipeline/resolve.d.ts +3 -0
  152. package/dist/source/validate-mixin/pipeline/resolve.js +78 -0
  153. package/dist/source/validate-mixin/pipeline/target-lookup.d.ts +6 -0
  154. package/dist/source/validate-mixin/pipeline/target-lookup.js +260 -0
  155. package/dist/source/validate-mixin/pipeline-context.d.ts +72 -0
  156. package/dist/source/validate-mixin/pipeline-context.js +93 -0
  157. package/dist/source/validate-mixin.d.ts +22 -0
  158. package/dist/source/validate-mixin.js +799 -0
  159. package/dist/source/workspace-target.d.ts +18 -0
  160. package/dist/source/workspace-target.js +305 -0
  161. package/dist/source-resolver.d.ts +9 -1
  162. package/dist/source-resolver.js +14 -6
  163. package/dist/source-service.d.ts +178 -105
  164. package/dist/source-service.js +72 -5312
  165. package/dist/stage-emitter.d.ts +13 -0
  166. package/dist/stage-emitter.js +30 -0
  167. package/dist/stdio-supervisor.d.ts +61 -0
  168. package/dist/stdio-supervisor.js +326 -9
  169. package/dist/storage/artifacts-repo.d.ts +4 -1
  170. package/dist/storage/artifacts-repo.js +33 -5
  171. package/dist/storage/files-repo.d.ts +0 -2
  172. package/dist/storage/files-repo.js +0 -11
  173. package/dist/storage/migrations.d.ts +1 -1
  174. package/dist/storage/migrations.js +10 -2
  175. package/dist/storage/schema.d.ts +2 -0
  176. package/dist/storage/schema.js +25 -0
  177. package/dist/tool-contract-manifest.d.ts +1 -1
  178. package/dist/tool-contract-manifest.js +23 -6
  179. package/dist/tool-guidance.d.ts +82 -0
  180. package/dist/tool-guidance.js +734 -0
  181. package/dist/tool-schema-registry.d.ts +16 -0
  182. package/dist/tool-schema-registry.js +37 -0
  183. package/dist/tool-schemas.d.ts +3518 -0
  184. package/dist/tool-schemas.js +813 -0
  185. package/dist/types.d.ts +39 -0
  186. package/dist/version-service.js +7 -6
  187. package/dist/workspace-context-cache.d.ts +32 -0
  188. package/dist/workspace-context-cache.js +66 -0
  189. package/dist/workspace-mapping-service.d.ts +16 -0
  190. package/dist/workspace-mapping-service.js +173 -1
  191. package/docs/README-ja.md +414 -0
  192. package/docs/examples.md +483 -0
  193. package/docs/tool-reference.md +459 -0
  194. package/package.json +5 -2
@@ -1,16 +1,27 @@
1
- import { type ResponseContext as ExplorerResponseContext, type SignatureMember } from "./minecraft-explorer-service.js";
2
- import { type MixinValidationResult, type MixinValidationProvenance, type MappingHealthReport, type AccessWidenerValidationResult, type AccessTransformerValidationResult } from "./mixin-validator.js";
3
- import { type ClassApiMatrixInput as MappingClassApiMatrixInput, type ClassApiMatrixOutput as MappingClassApiMatrixOutput, type FindMappingInput as MappingFindMappingInput, type FindMappingOutput as MappingFindMappingOutput, type ResolveMethodMappingExactInput as MappingResolveMethodMappingExactInput, type ResolveMethodMappingExactOutput as MappingResolveMethodMappingExactOutput, type SymbolResolutionOutput as MappingSymbolResolutionOutput, type SymbolExistenceInput as MappingSymbolExistenceInput, type SymbolExistenceOutput as MappingSymbolExistenceOutput } from "./mapping-service.js";
1
+ import { MinecraftExplorerService, type ResponseContext as ExplorerResponseContext, type SignatureMember } from "./minecraft-explorer-service.js";
2
+ import { type MixinValidationResult, type MixinValidationProvenance, type MappingHealthReport, type AccessWidenerValidationResult, type AccessTransformerValidationResult, type MixinStageBudgets } from "./mixin-validator.js";
3
+ import { MappingService, type ClassApiMatrixInput as MappingClassApiMatrixInput, type ClassApiMatrixOutput as MappingClassApiMatrixOutput, type FindMappingInput as MappingFindMappingInput, type FindMappingOutput as MappingFindMappingOutput, type ResolveMethodMappingExactInput as MappingResolveMethodMappingExactInput, type ResolveMethodMappingExactOutput as MappingResolveMethodMappingExactOutput, type SymbolResolutionOutput as MappingSymbolResolutionOutput, type SymbolExistenceInput as MappingSymbolExistenceInput, type SymbolExistenceOutput as MappingSymbolExistenceOutput } from "./mapping-service.js";
4
+ import { ArtifactsRepo } from "./storage/artifacts-repo.js";
5
+ import { FilesRepo } from "./storage/files-repo.js";
6
+ import { IndexMetaRepo } from "./storage/index-meta-repo.js";
7
+ import { SymbolsRepo } from "./storage/symbols-repo.js";
4
8
  import { RuntimeMetrics, type RuntimeMetricSnapshot } from "./observability.js";
5
- import { type WorkspaceCompileMappingOutput } from "./workspace-mapping-service.js";
6
- import type { AccessTransformerNamespace, ArtifactProvenance, ArtifactRow, ArtifactScope, Config, MappingSourcePriority, ResolvedSourceArtifact, SourceMapping, SourceTargetInput } from "./types.js";
7
- import { type ListVersionsInput, type ListVersionsOutput } from "./version-service.js";
8
- import { type GetRegistryDataInput, type GetRegistryDataOutput } from "./registry-service.js";
9
- import { type CompareVersionsInput, type CompareVersionsOutput } from "./version-diff-service.js";
10
- import { type DecompileModJarInput, type DecompileModJarOutput, type GetModClassSourceInput, type GetModClassSourceOutput } from "./mod-decompile-service.js";
11
- import { type SearchModSourceInput, type SearchModSourceOutput } from "./mod-search-service.js";
9
+ import { SourceServiceState } from "./source/state.js";
10
+ import * as indexer from "./source/indexer.js";
11
+ import * as workspaceTarget from "./source/workspace-target.js";
12
+ import * as validateMixinModule from "./source/validate-mixin.js";
13
+ import * as artifactResolver from "./source/artifact-resolver.js";
14
+ import { type StageEmitter } from "./stage-emitter.js";
15
+ import { WorkspaceMappingService, type WorkspaceCompileMappingOutput } from "./workspace-mapping-service.js";
16
+ import { type WorkspaceContextCache } from "./workspace-context-cache.js";
17
+ import type { AccessTransformerNamespace, ArtifactProvenance, ArtifactRow, ArtifactScope, Config, MappingSourcePriority, ResolveArtifactTargetInput, ResolvedSourceArtifact, RuntimeValidationProvenance, SourceMapping } from "./types.js";
18
+ import { VersionService, type ListVersionsInput, type ListVersionsOutput } from "./version-service.js";
19
+ import { RegistryService, type GetRegistryDataInput, type GetRegistryDataOutput } from "./registry-service.js";
20
+ import { VersionDiffService, type CompareVersionsInput, type CompareVersionsOutput } from "./version-diff-service.js";
21
+ import { ModDecompileService, type DecompileModJarInput, type DecompileModJarOutput, type GetModClassSourceInput, type GetModClassSourceOutput } from "./mod-decompile-service.js";
22
+ import { ModSearchService, type SearchModSourceInput, type SearchModSourceOutput } from "./mod-search-service.js";
12
23
  export type ResolveArtifactInput = {
13
- target: SourceTargetInput;
24
+ target: ResolveArtifactTargetInput;
14
25
  mapping?: SourceMapping;
15
26
  sourcePriority?: MappingSourcePriority;
16
27
  allowDecompile?: boolean;
@@ -18,9 +29,11 @@ export type ResolveArtifactInput = {
18
29
  scope?: ArtifactScope;
19
30
  preferProjectVersion?: boolean;
20
31
  strictVersion?: boolean;
32
+ compact?: boolean;
21
33
  };
22
34
  export type ResolveArtifactOutput = {
23
35
  artifactId: string;
36
+ artifactAlias: string;
24
37
  origin: "local-jar" | "local-m2" | "remote-repo" | "decompiled";
25
38
  isDecompiled: boolean;
26
39
  resolvedSourceJarPath?: string;
@@ -43,7 +56,7 @@ export type ArtifactContentsSummary = {
43
56
  resourcesIncluded: boolean;
44
57
  sourceCoverage: "full" | "partial";
45
58
  };
46
- type SymbolKind = "class" | "interface" | "enum" | "record" | "method" | "field";
59
+ export type SymbolKind = "class" | "interface" | "enum" | "record" | "method" | "field";
47
60
  type SearchIntent = "symbol" | "text" | "path";
48
61
  type SearchMatch = "exact" | "prefix" | "contains" | "regex";
49
62
  export type SearchScope = {
@@ -74,6 +87,8 @@ export type SearchClassSourceInput = {
74
87
  queryMode?: QueryMode;
75
88
  limit?: number;
76
89
  cursor?: string;
90
+ queryNamespace?: SourceMapping;
91
+ sourcePriority?: MappingSourcePriority;
77
92
  };
78
93
  export type SearchClassSourceOutput = {
79
94
  hits: SearchSourceHit[];
@@ -81,6 +96,13 @@ export type SearchClassSourceOutput = {
81
96
  mappingApplied: SourceMapping;
82
97
  returnedNamespace: SourceMapping;
83
98
  artifactContents: ArtifactContentsSummary;
99
+ translatedQuery?: {
100
+ original: string;
101
+ translated: string;
102
+ fromNamespace: SourceMapping;
103
+ toNamespace: SourceMapping;
104
+ };
105
+ warnings?: string[];
84
106
  };
85
107
  export type GetArtifactFileInput = {
86
108
  artifactId: string;
@@ -135,7 +157,7 @@ export type ResolveWorkspaceSymbolOutput = MappingSymbolResolutionOutput & {
135
157
  export type SourceMode = "metadata" | "snippet" | "full";
136
158
  export type GetClassSourceInput = {
137
159
  artifactId?: string;
138
- target?: SourceTargetInput;
160
+ target?: ResolveArtifactTargetInput;
139
161
  className: string;
140
162
  mode?: SourceMode;
141
163
  mapping?: SourceMapping;
@@ -192,7 +214,7 @@ export type FindClassOutput = {
192
214
  type MemberAccess = "public" | "all";
193
215
  export type GetClassMembersInput = {
194
216
  artifactId?: string;
195
- target?: SourceTargetInput;
217
+ target?: ResolveArtifactTargetInput;
196
218
  className: string;
197
219
  mapping?: SourceMapping;
198
220
  sourcePriority?: MappingSourcePriority;
@@ -207,6 +229,18 @@ export type GetClassMembersInput = {
207
229
  preferProjectVersion?: boolean;
208
230
  strictVersion?: boolean;
209
231
  };
232
+ export type DecompiledMember = {
233
+ name: string;
234
+ line: number;
235
+ kind: "constructor" | "field" | "method";
236
+ };
237
+ export type DecompiledFallback = {
238
+ constructors: DecompiledMember[];
239
+ fields: DecompiledMember[];
240
+ methods: DecompiledMember[];
241
+ origin: "source-extracted";
242
+ };
243
+ export type GetClassMembersStatus = "ok" | "members_unavailable" | "partial";
210
244
  export type GetClassMembersOutput = {
211
245
  className: string;
212
246
  members: {
@@ -230,6 +264,19 @@ export type GetClassMembersOutput = {
230
264
  provenance: ArtifactProvenance;
231
265
  qualityFlags: string[];
232
266
  artifactContents: ArtifactContentsSummary;
267
+ decompiledFallback?: DecompiledFallback;
268
+ decompiledMemberCounts?: {
269
+ constructors: number;
270
+ fields: number;
271
+ methods: number;
272
+ total: number;
273
+ };
274
+ status?: GetClassMembersStatus;
275
+ unavailableReason?: string;
276
+ suggestedCall?: {
277
+ tool: string;
278
+ params: Record<string, unknown>;
279
+ };
233
280
  warnings: string[];
234
281
  };
235
282
  export type TraceSymbolLifecycleInput = {
@@ -269,7 +316,7 @@ export type TraceSymbolLifecycleOutput = {
269
316
  timeline?: TraceSymbolLifecycleTimelineEntry[];
270
317
  warnings: string[];
271
318
  };
272
- type DiffClassChange = "added" | "removed" | "present_in_both" | "absent_in_both";
319
+ export type DiffClassChange = "added" | "removed" | "present_in_both" | "absent_in_both";
273
320
  type DiffMemberChangedField = "accessFlags" | "isSynthetic" | "javaSignature" | "jvmDescriptor";
274
321
  export type DiffMember = SignatureMember;
275
322
  export type DiffMemberChange = {
@@ -330,24 +377,7 @@ export type DiffClassSignaturesOutput = {
330
377
  };
331
378
  warnings: string[];
332
379
  };
333
- export type IndexArtifactInput = {
334
- artifactId: string;
335
- force?: boolean;
336
- };
337
- type IndexRebuildReason = "force" | "missing_meta" | "schema_mismatch" | "signature_mismatch" | "already_current";
338
- export type IndexArtifactOutput = {
339
- artifactId: string;
340
- reindexed: boolean;
341
- reason: IndexRebuildReason;
342
- counts: {
343
- files: number;
344
- symbols: number;
345
- ftsRows: number;
346
- };
347
- indexedAt: string;
348
- durationMs: number;
349
- mappingApplied: SourceMapping;
350
- };
380
+ export type { IndexArtifactInput, IndexArtifactOutput } from "./source/indexer.js";
351
381
  export type ValidateMixinInput = {
352
382
  input: {
353
383
  mode: "inline";
@@ -382,6 +412,19 @@ export type ValidateMixinInput = {
382
412
  treatInfoAsWarning?: boolean;
383
413
  includeIssues?: boolean;
384
414
  };
415
+ export type ValidateMixinOptions = {
416
+ stageEmitter?: StageEmitter;
417
+ /** Test-only override for stage budgets. Production code uses defaults. */
418
+ __stageBudgets?: Partial<MixinStageBudgets>;
419
+ /** Test-only hooks injected at stage boundaries to simulate slow work. */
420
+ __testHooks?: {
421
+ afterResolve?: () => Promise<void>;
422
+ afterMappingHealth?: () => Promise<void>;
423
+ afterParse?: () => Promise<void>;
424
+ beforeTargetLoop?: () => Promise<void>;
425
+ beforeTargetIter?: (targetIndex: number) => Promise<void>;
426
+ };
427
+ };
385
428
  export type ValidateMixinResultSource = {
386
429
  kind: "inline" | "path" | "config";
387
430
  label: string;
@@ -392,6 +435,10 @@ export type ValidateMixinBatchResult = {
392
435
  source: ValidateMixinResultSource;
393
436
  result?: MixinValidationResult;
394
437
  error?: string;
438
+ /** Stable error code from AppError when the entry failed with a typed error (e.g. ERR_STAGE_BUDGET_PRE_PARSE). */
439
+ errorCode?: string;
440
+ /** AppError details (failedStage, stageBudgetExhausted, budgetMs, elapsedMs, …) preserved across batch aggregation. */
441
+ errorDetails?: Record<string, unknown>;
395
442
  };
396
443
  export type ValidateMixinBatchIssueSummaryItem = {
397
444
  kind: string;
@@ -440,34 +487,77 @@ export type ValidateAccessTransformerInput = {
440
487
  };
441
488
  export type ValidateAccessTransformerOutput = AccessTransformerValidationResult;
442
489
  export declare class SourceService {
443
- private readonly config;
444
- private readonly db;
445
- private readonly artifactsRepo;
446
- private readonly filesRepo;
447
- private readonly indexMetaRepo;
448
- private readonly symbolsRepo;
449
- private readonly metrics;
450
- private readonly versionService;
451
- private readonly mappingService;
452
- private readonly workspaceMappingService;
453
- private readonly explorerService;
454
- private readonly registryService;
455
- private readonly versionDiffService;
456
- private readonly modDecompileService;
457
- private readonly modSearchService;
458
- private cacheMetricsState;
459
- constructor(explicitConfig?: Config, metrics?: RuntimeMetrics);
460
- private discoverVersionSourceJar;
461
- private discoverAccessWidenerRuntimeCandidates;
462
- private discoverAccessTransformerRuntimeCandidates;
463
- private resolveAccessWidenerRuntimeArtifact;
464
- private resolveAccessTransformerNamespace;
465
- private resolveAccessTransformerRuntimeArtifact;
466
- private buildVersionSourceRecoveryCommand;
467
- private buildArtifactContentsSummary;
468
- private inferVersionFromContext;
469
- private resolveVersionContext;
490
+ readonly config: Config;
491
+ readonly db: import("./storage/sqlite.js").default;
492
+ readonly artifactsRepo: ArtifactsRepo;
493
+ readonly filesRepo: FilesRepo;
494
+ readonly indexMetaRepo: IndexMetaRepo;
495
+ readonly symbolsRepo: SymbolsRepo;
496
+ readonly metrics: RuntimeMetrics;
497
+ readonly versionService: VersionService;
498
+ readonly mappingService: MappingService;
499
+ readonly workspaceMappingService: WorkspaceMappingService;
500
+ readonly workspaceContextCache: WorkspaceContextCache;
501
+ readonly explorerService: MinecraftExplorerService;
502
+ readonly registryService: RegistryService;
503
+ readonly versionDiffService: VersionDiffService;
504
+ readonly modDecompileService: ModDecompileService;
505
+ readonly modSearchService: ModSearchService;
506
+ readonly state: SourceServiceState;
507
+ constructor(explicitConfig?: Config, metrics?: RuntimeMetrics, deps?: {
508
+ workspaceContextCache?: WorkspaceContextCache;
509
+ });
470
510
  resolveArtifact(input: ResolveArtifactInput): Promise<ResolveArtifactOutput>;
511
+ synthesizeWorkspaceTarget(input: ResolveArtifactInput, workspace: import("./types.js").WorkspaceTargetInput): ReturnType<typeof workspaceTarget.synthesizeWorkspaceTarget>;
512
+ synthesizeDependencyTarget(input: ResolveArtifactInput, dep: import("./types.js").DependencyTargetInput): ReturnType<typeof workspaceTarget.synthesizeDependencyTarget>;
513
+ loadOrDetectWorkspaceContext(projectPath: string): ReturnType<typeof workspaceTarget.loadOrDetectWorkspaceContext>;
514
+ resolveAccessWidenerRuntimeArtifact(input: {
515
+ version: string;
516
+ awNamespace: SourceMapping;
517
+ projectPath?: string;
518
+ scope?: ArtifactScope;
519
+ preferProjectVersion?: boolean;
520
+ }): Promise<RuntimeValidationProvenance<SourceMapping>>;
521
+ resolveAccessTransformerNamespace(input: {
522
+ atNamespace?: AccessTransformerNamespace;
523
+ projectPath?: string;
524
+ }): Promise<AccessTransformerNamespace>;
525
+ resolveAccessTransformerRuntimeArtifact(input: {
526
+ version: string;
527
+ atNamespace: AccessTransformerNamespace;
528
+ projectPath?: string;
529
+ scope?: ArtifactScope;
530
+ preferProjectVersion?: boolean;
531
+ }): Promise<RuntimeValidationProvenance<AccessTransformerNamespace>>;
532
+ buildArtifactContentsSummary(input: {
533
+ origin: ResolvedSourceArtifact["origin"];
534
+ sourceJarPath?: string;
535
+ isDecompiled?: boolean;
536
+ qualityFlags: string[];
537
+ }): ArtifactContentsSummary;
538
+ discoverVersionSourceJar(input: {
539
+ version: string;
540
+ projectPath?: string;
541
+ }): ReturnType<typeof artifactResolver.discoverVersionSourceJar>;
542
+ discoverAccessWidenerRuntimeCandidates(input: {
543
+ version: string;
544
+ projectPath?: string;
545
+ requestedScope: ArtifactScope;
546
+ }): ReturnType<typeof artifactResolver.discoverAccessWidenerRuntimeCandidates>;
547
+ discoverAccessTransformerRuntimeCandidates(input: {
548
+ version: string;
549
+ projectPath?: string;
550
+ requestedScope: ArtifactScope;
551
+ atNamespace: AccessTransformerNamespace;
552
+ loader: import("./workspace-mapping-service.js").WorkspaceProjectLoader | "unknown";
553
+ }): ReturnType<typeof artifactResolver.discoverAccessTransformerRuntimeCandidates>;
554
+ buildMappingFallbackSuggestedCall(args: {
555
+ input: ResolveArtifactInput;
556
+ kind: import("./types.js").ArtifactTargetKind;
557
+ value: string;
558
+ scope: ArtifactScope | undefined;
559
+ effectiveMapping: SourceMapping;
560
+ }): ReturnType<typeof artifactResolver.buildMappingFallbackSuggestedCall>;
471
561
  searchClassSource(input: SearchClassSourceInput): Promise<SearchClassSourceOutput>;
472
562
  getArtifactFile(input: GetArtifactFileInput): Promise<GetArtifactFileOutput>;
473
563
  listArtifactFiles(input: ListArtifactFilesInput): Promise<ListArtifactFilesOutput>;
@@ -488,54 +578,37 @@ export declare class SourceService {
488
578
  findClass(input: FindClassInput): FindClassOutput;
489
579
  getClassSource(input: GetClassSourceInput): Promise<GetClassSourceOutput>;
490
580
  getClassMembers(input: GetClassMembersInput): Promise<GetClassMembersOutput>;
491
- validateMixin(input: ValidateMixinInput): Promise<ValidateMixinOutput>;
492
- private createProjectValidateMixinConfigInput;
493
- private shouldRetryValidateMixinWithMavenFirst;
494
- private findValidateMixinClassMapping;
495
- private validateMixinSingle;
496
- private resolveMixinInputPath;
497
- private resolveMixinConfigSources;
498
- private validateMixinMany;
499
- private applyValidateMixinOutputCompaction;
500
- private buildValidateMixinOutput;
581
+ validateMixin(input: ValidateMixinInput, options?: ValidateMixinOptions): Promise<ValidateMixinOutput>;
582
+ validateMixinSingle(input: validateMixinModule.ValidateMixinSingleInput): Promise<MixinValidationResult>;
583
+ remapSignatureMembers(members: SignatureMember[], kind: "field" | "method", version: string, sourceMapping: SourceMapping, targetMapping: SourceMapping, sourcePriority: MappingSourcePriority | undefined, warnings: string[], projectPath?: string): Promise<{
584
+ members: SignatureMember[];
585
+ failedNames: Set<string>;
586
+ }>;
501
587
  validateAccessWidener(input: ValidateAccessWidenerInput): Promise<ValidateAccessWidenerOutput>;
502
588
  validateAccessTransformer(input: ValidateAccessTransformerInput): Promise<ValidateAccessTransformerOutput>;
589
+ recordToolCall(tool: string, durationMs: number): void;
503
590
  getRuntimeMetrics(): RuntimeMetricSnapshot;
504
- indexArtifact(input: IndexArtifactInput): Promise<IndexArtifactOutput>;
505
- private searchSymbolIntent;
506
- private searchTextIntentIndexed;
507
- private searchPathIntentIndexed;
508
- private searchTextIntent;
509
- private searchPathIntent;
510
- private findSymbolHits;
511
- private indexedCandidateLimit;
512
- private indexedCandidateLimitForMatch;
513
- private extractClassMetadata;
514
- private resolveClassFilePath;
515
- private resolveBinaryFallbackArtifact;
516
- private buildProvenance;
517
- private buildFallbackProvenance;
518
- private resolveClassNameForLookup;
519
- private buildClassSourceNotFoundError;
520
- private rejectLifecycleClassLikeInput;
521
- private releaseLifecycleMappingGraph;
522
- private resolveToObfuscatedClassName;
523
- private resolveToObfuscatedMemberName;
524
- private remapSignatureMembers;
525
- private fallbackArtifactSignature;
526
- private resolveIndexRebuildReason;
527
- private toResolvedArtifact;
528
- private rebuildAndPersistArtifactIndex;
529
- private buildRebuiltArtifactData;
591
+ indexArtifact(input: indexer.IndexArtifactInput): Promise<indexer.IndexArtifactOutput>;
592
+ resolveClassNameForLookup(input: {
593
+ className: string;
594
+ version?: string;
595
+ sourceMapping: SourceMapping;
596
+ targetMapping: SourceMapping;
597
+ sourcePriority: MappingSourcePriority | undefined;
598
+ warnings: string[];
599
+ context: string;
600
+ }): Promise<string>;
601
+ resolveBinaryFallbackArtifact(input: {
602
+ binaryJarPath?: string;
603
+ version?: string;
604
+ coordinate?: string;
605
+ requestedMapping: SourceMapping;
606
+ mappingApplied: SourceMapping;
607
+ provenance?: ArtifactProvenance;
608
+ qualityFlags: string[];
609
+ }): Promise<ResolvedSourceArtifact | undefined>;
530
610
  getArtifact(artifactId: string): ArtifactRow;
531
- private ingestIfNeeded;
532
- private loadFromSourceJar;
533
- private hasAnyFiles;
534
- private enforceCacheLimits;
611
+ ingestIfNeeded(resolved: ResolvedSourceArtifact): Promise<void>;
535
612
  private refreshCacheMetrics;
536
- private touchCacheMetrics;
537
- private upsertCacheMetrics;
538
- private removeCacheMetrics;
539
- private publishCacheMetrics;
613
+ private snapshotLruAccounting;
540
614
  }
541
- export {};