@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.
- package/CHANGELOG.md +47 -0
- package/README.md +36 -23
- package/dist/build-suggested-call.d.ts +29 -0
- package/dist/build-suggested-call.js +58 -0
- package/dist/cache-registry.d.ts +3 -1
- package/dist/cache-registry.js +50 -6
- package/dist/entry-tools/analyze-symbol-service.d.ts +16 -16
- package/dist/entry-tools/batch-class-members-service.d.ts +34 -0
- package/dist/entry-tools/batch-class-members-service.js +97 -0
- package/dist/entry-tools/batch-class-source-service.d.ts +37 -0
- package/dist/entry-tools/batch-class-source-service.js +100 -0
- package/dist/entry-tools/batch-mappings-service.d.ts +36 -0
- package/dist/entry-tools/batch-mappings-service.js +66 -0
- package/dist/entry-tools/batch-runner.d.ts +72 -0
- package/dist/entry-tools/batch-runner.js +90 -0
- package/dist/entry-tools/batch-symbol-exists-service.d.ts +46 -0
- package/dist/entry-tools/batch-symbol-exists-service.js +113 -0
- package/dist/entry-tools/compare-minecraft-service.d.ts +6 -6
- package/dist/entry-tools/inspect-minecraft/handlers/artifact.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/artifact.js +83 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-members.d.ts +6 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-members.js +80 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-overview.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-overview.js +248 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-source.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/class-source.js +60 -0
- package/dist/entry-tools/inspect-minecraft/handlers/file.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/file.js +54 -0
- package/dist/entry-tools/inspect-minecraft/handlers/list-files.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/list-files.js +100 -0
- package/dist/entry-tools/inspect-minecraft/handlers/search.d.ts +5 -0
- package/dist/entry-tools/inspect-minecraft/handlers/search.js +155 -0
- package/dist/entry-tools/inspect-minecraft/handlers/versions.d.ts +6 -0
- package/dist/entry-tools/inspect-minecraft/handlers/versions.js +49 -0
- package/dist/entry-tools/inspect-minecraft/internal.d.ts +1042 -0
- package/dist/entry-tools/inspect-minecraft/internal.js +448 -0
- package/dist/entry-tools/inspect-minecraft-service.d.ts +193 -308
- package/dist/entry-tools/inspect-minecraft-service.js +20 -1244
- package/dist/entry-tools/manage-cache-service.d.ts +16 -16
- package/dist/entry-tools/validate-project/cases/access-transformer.d.ts +6 -0
- package/dist/entry-tools/validate-project/cases/access-transformer.js +106 -0
- package/dist/entry-tools/validate-project/cases/access-widener.d.ts +6 -0
- package/dist/entry-tools/validate-project/cases/access-widener.js +86 -0
- package/dist/entry-tools/validate-project/cases/mixin.d.ts +6 -0
- package/dist/entry-tools/validate-project/cases/mixin.js +90 -0
- package/dist/entry-tools/validate-project/cases/project-summary.d.ts +97 -0
- package/dist/entry-tools/validate-project/cases/project-summary.js +346 -0
- package/dist/entry-tools/validate-project/internal.d.ts +135 -0
- package/dist/entry-tools/validate-project/internal.js +287 -0
- package/dist/entry-tools/validate-project-service.d.ts +63 -47
- package/dist/entry-tools/validate-project-service.js +12 -562
- package/dist/entry-tools/verify-mixin-target-service.d.ts +133 -0
- package/dist/entry-tools/verify-mixin-target-service.js +323 -0
- package/dist/error-mapping.d.ts +40 -0
- package/dist/error-mapping.js +139 -0
- package/dist/errors.d.ts +6 -0
- package/dist/errors.js +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +142 -1352
- package/dist/mapping/internal-types.d.ts +54 -0
- package/dist/mapping/internal-types.js +14 -0
- package/dist/mapping/loaders/mojang.d.ts +2 -0
- package/dist/mapping/loaders/mojang.js +64 -0
- package/dist/mapping/loaders/tiny-loom.d.ts +2 -0
- package/dist/mapping/loaders/tiny-loom.js +73 -0
- package/dist/mapping/loaders/tiny-maven.d.ts +2 -0
- package/dist/mapping/loaders/tiny-maven.js +104 -0
- package/dist/mapping/loaders/types.d.ts +14 -0
- package/dist/mapping/loaders/types.js +2 -0
- package/dist/mapping/lookup.d.ts +52 -0
- package/dist/mapping/lookup.js +496 -0
- package/dist/mapping/parsers/normalize.d.ts +10 -0
- package/dist/mapping/parsers/normalize.js +52 -0
- package/dist/mapping/parsers/proguard.d.ts +20 -0
- package/dist/mapping/parsers/proguard.js +138 -0
- package/dist/mapping/parsers/symbol-records.d.ts +27 -0
- package/dist/mapping/parsers/symbol-records.js +216 -0
- package/dist/mapping/parsers/tiny.d.ts +9 -0
- package/dist/mapping/parsers/tiny.js +96 -0
- package/dist/mapping/types.d.ts +147 -0
- package/dist/mapping/types.js +2 -0
- package/dist/mapping-pipeline-service.js +3 -2
- package/dist/mapping-service.d.ts +3 -144
- package/dist/mapping-service.js +19 -1201
- package/dist/mixin/access-validators.d.ts +9 -0
- package/dist/mixin/access-validators.js +257 -0
- package/dist/mixin/annotation-validators.d.ts +5 -0
- package/dist/mixin/annotation-validators.js +162 -0
- package/dist/mixin/helpers.d.ts +28 -0
- package/dist/mixin/helpers.js +315 -0
- package/dist/mixin/parsed-validator.d.ts +8 -0
- package/dist/mixin/parsed-validator.js +337 -0
- package/dist/mixin/types.d.ts +208 -0
- package/dist/mixin/types.js +28 -0
- package/dist/mixin-validator.d.ts +9 -201
- package/dist/mixin-validator.js +8 -1020
- package/dist/source/access-validate.d.ts +4 -0
- package/dist/source/access-validate.js +254 -0
- package/dist/source/artifact-resolver.d.ts +110 -0
- package/dist/source/artifact-resolver.js +1174 -0
- package/dist/source/cache-metrics.d.ts +26 -0
- package/dist/source/cache-metrics.js +172 -0
- package/dist/source/class-source/members-builder.d.ts +34 -0
- package/dist/source/class-source/members-builder.js +46 -0
- package/dist/source/class-source/snippet-builder.d.ts +19 -0
- package/dist/source/class-source/snippet-builder.js +46 -0
- package/dist/source/class-source-helpers.d.ts +34 -0
- package/dist/source/class-source-helpers.js +140 -0
- package/dist/source/class-source.d.ts +42 -0
- package/dist/source/class-source.js +883 -0
- package/dist/source/descriptor-utils.d.ts +6 -0
- package/dist/source/descriptor-utils.js +37 -0
- package/dist/source/file-access.d.ts +4 -0
- package/dist/source/file-access.js +102 -0
- package/dist/source/indexer.d.ts +82 -0
- package/dist/source/indexer.js +505 -0
- package/dist/source/lifecycle/diff-utils.d.ts +9 -0
- package/dist/source/lifecycle/diff-utils.js +107 -0
- package/dist/source/lifecycle/diff.d.ts +2 -0
- package/dist/source/lifecycle/diff.js +265 -0
- package/dist/source/lifecycle/mapping-helpers.d.ts +22 -0
- package/dist/source/lifecycle/mapping-helpers.js +327 -0
- package/dist/source/lifecycle/runtime-check.d.ts +2 -0
- package/dist/source/lifecycle/runtime-check.js +142 -0
- package/dist/source/lifecycle/trace.d.ts +2 -0
- package/dist/source/lifecycle/trace.js +231 -0
- package/dist/source/lifecycle.d.ts +4 -0
- package/dist/source/lifecycle.js +5 -0
- package/dist/source/search.d.ts +51 -0
- package/dist/source/search.js +676 -0
- package/dist/source/shared-utils.d.ts +6 -0
- package/dist/source/shared-utils.js +55 -0
- package/dist/source/state.d.ts +21 -0
- package/dist/source/state.js +19 -0
- package/dist/source/symbol-resolver.d.ts +3 -0
- package/dist/source/symbol-resolver.js +212 -0
- package/dist/source/validate-mixin/pipeline/mapping-health.d.ts +3 -0
- package/dist/source/validate-mixin/pipeline/mapping-health.js +41 -0
- package/dist/source/validate-mixin/pipeline/parse.d.ts +2 -0
- package/dist/source/validate-mixin/pipeline/parse.js +10 -0
- package/dist/source/validate-mixin/pipeline/resolve.d.ts +3 -0
- package/dist/source/validate-mixin/pipeline/resolve.js +78 -0
- package/dist/source/validate-mixin/pipeline/target-lookup.d.ts +6 -0
- package/dist/source/validate-mixin/pipeline/target-lookup.js +260 -0
- package/dist/source/validate-mixin/pipeline-context.d.ts +72 -0
- package/dist/source/validate-mixin/pipeline-context.js +93 -0
- package/dist/source/validate-mixin.d.ts +22 -0
- package/dist/source/validate-mixin.js +799 -0
- package/dist/source/workspace-target.d.ts +18 -0
- package/dist/source/workspace-target.js +305 -0
- package/dist/source-service.d.ts +147 -170
- package/dist/source-service.js +67 -6116
- package/dist/stage-emitter.d.ts +13 -0
- package/dist/stage-emitter.js +30 -0
- package/dist/stdio-supervisor.d.ts +61 -0
- package/dist/stdio-supervisor.js +326 -9
- package/dist/tool-contract-manifest.d.ts +1 -1
- package/dist/tool-contract-manifest.js +23 -6
- package/dist/tool-guidance.d.ts +82 -0
- package/dist/tool-guidance.js +734 -0
- package/dist/tool-schema-registry.d.ts +16 -0
- package/dist/tool-schema-registry.js +37 -0
- package/dist/tool-schemas.d.ts +3518 -0
- package/dist/tool-schemas.js +813 -0
- package/dist/types.d.ts +36 -0
- package/dist/version-service.js +7 -6
- package/dist/workspace-context-cache.d.ts +32 -0
- package/dist/workspace-context-cache.js +66 -0
- package/dist/workspace-mapping-service.d.ts +16 -0
- package/dist/workspace-mapping-service.js +173 -1
- package/docs/README-ja.md +414 -0
- package/docs/examples.md +483 -0
- package/docs/tool-reference.md +459 -0
- package/package.json +3 -2
package/dist/source-service.d.ts
CHANGED
|
@@ -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 {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { type
|
|
11
|
-
import {
|
|
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:
|
|
24
|
+
target: ResolveArtifactTargetInput;
|
|
14
25
|
mapping?: SourceMapping;
|
|
15
26
|
sourcePriority?: MappingSourcePriority;
|
|
16
27
|
allowDecompile?: boolean;
|
|
@@ -45,7 +56,7 @@ export type ArtifactContentsSummary = {
|
|
|
45
56
|
resourcesIncluded: boolean;
|
|
46
57
|
sourceCoverage: "full" | "partial";
|
|
47
58
|
};
|
|
48
|
-
type SymbolKind = "class" | "interface" | "enum" | "record" | "method" | "field";
|
|
59
|
+
export type SymbolKind = "class" | "interface" | "enum" | "record" | "method" | "field";
|
|
49
60
|
type SearchIntent = "symbol" | "text" | "path";
|
|
50
61
|
type SearchMatch = "exact" | "prefix" | "contains" | "regex";
|
|
51
62
|
export type SearchScope = {
|
|
@@ -146,7 +157,7 @@ export type ResolveWorkspaceSymbolOutput = MappingSymbolResolutionOutput & {
|
|
|
146
157
|
export type SourceMode = "metadata" | "snippet" | "full";
|
|
147
158
|
export type GetClassSourceInput = {
|
|
148
159
|
artifactId?: string;
|
|
149
|
-
target?:
|
|
160
|
+
target?: ResolveArtifactTargetInput;
|
|
150
161
|
className: string;
|
|
151
162
|
mode?: SourceMode;
|
|
152
163
|
mapping?: SourceMapping;
|
|
@@ -203,7 +214,7 @@ export type FindClassOutput = {
|
|
|
203
214
|
type MemberAccess = "public" | "all";
|
|
204
215
|
export type GetClassMembersInput = {
|
|
205
216
|
artifactId?: string;
|
|
206
|
-
target?:
|
|
217
|
+
target?: ResolveArtifactTargetInput;
|
|
207
218
|
className: string;
|
|
208
219
|
mapping?: SourceMapping;
|
|
209
220
|
sourcePriority?: MappingSourcePriority;
|
|
@@ -229,6 +240,7 @@ export type DecompiledFallback = {
|
|
|
229
240
|
methods: DecompiledMember[];
|
|
230
241
|
origin: "source-extracted";
|
|
231
242
|
};
|
|
243
|
+
export type GetClassMembersStatus = "ok" | "members_unavailable" | "partial";
|
|
232
244
|
export type GetClassMembersOutput = {
|
|
233
245
|
className: string;
|
|
234
246
|
members: {
|
|
@@ -259,6 +271,12 @@ export type GetClassMembersOutput = {
|
|
|
259
271
|
methods: number;
|
|
260
272
|
total: number;
|
|
261
273
|
};
|
|
274
|
+
status?: GetClassMembersStatus;
|
|
275
|
+
unavailableReason?: string;
|
|
276
|
+
suggestedCall?: {
|
|
277
|
+
tool: string;
|
|
278
|
+
params: Record<string, unknown>;
|
|
279
|
+
};
|
|
262
280
|
warnings: string[];
|
|
263
281
|
};
|
|
264
282
|
export type TraceSymbolLifecycleInput = {
|
|
@@ -298,7 +316,7 @@ export type TraceSymbolLifecycleOutput = {
|
|
|
298
316
|
timeline?: TraceSymbolLifecycleTimelineEntry[];
|
|
299
317
|
warnings: string[];
|
|
300
318
|
};
|
|
301
|
-
type DiffClassChange = "added" | "removed" | "present_in_both" | "absent_in_both";
|
|
319
|
+
export type DiffClassChange = "added" | "removed" | "present_in_both" | "absent_in_both";
|
|
302
320
|
type DiffMemberChangedField = "accessFlags" | "isSynthetic" | "javaSignature" | "jvmDescriptor";
|
|
303
321
|
export type DiffMember = SignatureMember;
|
|
304
322
|
export type DiffMemberChange = {
|
|
@@ -359,24 +377,7 @@ export type DiffClassSignaturesOutput = {
|
|
|
359
377
|
};
|
|
360
378
|
warnings: string[];
|
|
361
379
|
};
|
|
362
|
-
export type IndexArtifactInput
|
|
363
|
-
artifactId: string;
|
|
364
|
-
force?: boolean;
|
|
365
|
-
};
|
|
366
|
-
type IndexRebuildReason = "force" | "missing_meta" | "schema_mismatch" | "signature_mismatch" | "already_current";
|
|
367
|
-
export type IndexArtifactOutput = {
|
|
368
|
-
artifactId: string;
|
|
369
|
-
reindexed: boolean;
|
|
370
|
-
reason: IndexRebuildReason;
|
|
371
|
-
counts: {
|
|
372
|
-
files: number;
|
|
373
|
-
symbols: number;
|
|
374
|
-
ftsRows: number;
|
|
375
|
-
};
|
|
376
|
-
indexedAt: string;
|
|
377
|
-
durationMs: number;
|
|
378
|
-
mappingApplied: SourceMapping;
|
|
379
|
-
};
|
|
380
|
+
export type { IndexArtifactInput, IndexArtifactOutput } from "./source/indexer.js";
|
|
380
381
|
export type ValidateMixinInput = {
|
|
381
382
|
input: {
|
|
382
383
|
mode: "inline";
|
|
@@ -411,6 +412,19 @@ export type ValidateMixinInput = {
|
|
|
411
412
|
treatInfoAsWarning?: boolean;
|
|
412
413
|
includeIssues?: boolean;
|
|
413
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
|
+
};
|
|
414
428
|
export type ValidateMixinResultSource = {
|
|
415
429
|
kind: "inline" | "path" | "config";
|
|
416
430
|
label: string;
|
|
@@ -421,6 +435,10 @@ export type ValidateMixinBatchResult = {
|
|
|
421
435
|
source: ValidateMixinResultSource;
|
|
422
436
|
result?: MixinValidationResult;
|
|
423
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>;
|
|
424
442
|
};
|
|
425
443
|
export type ValidateMixinBatchIssueSummaryItem = {
|
|
426
444
|
kind: string;
|
|
@@ -469,52 +487,77 @@ export type ValidateAccessTransformerInput = {
|
|
|
469
487
|
};
|
|
470
488
|
export type ValidateAccessTransformerOutput = AccessTransformerValidationResult;
|
|
471
489
|
export declare class SourceService {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
private readonly inflightRemaps;
|
|
493
|
-
constructor(explicitConfig?: Config, metrics?: RuntimeMetrics);
|
|
494
|
-
private discoverVersionSourceJar;
|
|
495
|
-
private discoverAccessWidenerRuntimeCandidates;
|
|
496
|
-
private discoverAccessTransformerRuntimeCandidates;
|
|
497
|
-
private resolveAccessWidenerRuntimeArtifact;
|
|
498
|
-
private resolveAccessTransformerNamespace;
|
|
499
|
-
private resolveAccessTransformerRuntimeArtifact;
|
|
500
|
-
private buildVersionSourceRecoveryCommand;
|
|
501
|
-
/**
|
|
502
|
-
* Decide whether the upcoming resolveArtifact call may transparently remap a
|
|
503
|
-
* binary-only artifact (obfuscated -> mojang) and decompile it. The gate
|
|
504
|
-
* succeeds only when:
|
|
505
|
-
* - the requested mapping is "mojang" on a still-obfuscated runtime
|
|
506
|
-
* - tiny-remapper jar is downloadable / available locally
|
|
507
|
-
* - the version's Mojang tiny mapping file can be produced
|
|
508
|
-
* - checkMappingHealth reports mojang mappings are usable
|
|
509
|
-
* On any failure the variant defaults to "pass" so the legacy
|
|
510
|
-
* MAPPING_NOT_APPLIED fallback (or the existing source-backed flow) keeps
|
|
511
|
-
* its existing artifactId hash.
|
|
512
|
-
*/
|
|
513
|
-
private computeBinaryRemapGate;
|
|
514
|
-
private buildArtifactContentsSummary;
|
|
515
|
-
private inferVersionFromContext;
|
|
516
|
-
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
|
+
});
|
|
517
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>;
|
|
518
561
|
searchClassSource(input: SearchClassSourceInput): Promise<SearchClassSourceOutput>;
|
|
519
562
|
getArtifactFile(input: GetArtifactFileInput): Promise<GetArtifactFileOutput>;
|
|
520
563
|
listArtifactFiles(input: ListArtifactFilesInput): Promise<ListArtifactFilesOutput>;
|
|
@@ -535,103 +578,37 @@ export declare class SourceService {
|
|
|
535
578
|
findClass(input: FindClassInput): FindClassOutput;
|
|
536
579
|
getClassSource(input: GetClassSourceInput): Promise<GetClassSourceOutput>;
|
|
537
580
|
getClassMembers(input: GetClassMembersInput): Promise<GetClassMembersOutput>;
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
private validateMixinSingle;
|
|
545
|
-
private runValidateMixinPipeline;
|
|
546
|
-
private resolveMixinInputPath;
|
|
547
|
-
private resolveMixinConfigSources;
|
|
548
|
-
private validateMixinMany;
|
|
549
|
-
private applyValidateMixinOutputCompaction;
|
|
550
|
-
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
|
+
}>;
|
|
551
587
|
validateAccessWidener(input: ValidateAccessWidenerInput): Promise<ValidateAccessWidenerOutput>;
|
|
552
588
|
validateAccessTransformer(input: ValidateAccessTransformerInput): Promise<ValidateAccessTransformerOutput>;
|
|
553
589
|
recordToolCall(tool: string, durationMs: number): void;
|
|
554
590
|
getRuntimeMetrics(): RuntimeMetricSnapshot;
|
|
555
|
-
indexArtifact(input: IndexArtifactInput): Promise<IndexArtifactOutput>;
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
private resolveClassNameForLookup;
|
|
575
|
-
private buildClassSourceNotFoundError;
|
|
576
|
-
private rejectLifecycleClassLikeInput;
|
|
577
|
-
private releaseLifecycleMappingGraph;
|
|
578
|
-
private resolveToObfuscatedClassName;
|
|
579
|
-
private resolveToObfuscatedMemberName;
|
|
580
|
-
private remapSignatureMembers;
|
|
581
|
-
private fallbackArtifactSignature;
|
|
582
|
-
private resolveIndexRebuildReason;
|
|
583
|
-
private toResolvedArtifact;
|
|
584
|
-
private rebuildAndPersistArtifactIndex;
|
|
585
|
-
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>;
|
|
586
610
|
getArtifact(artifactId: string): ArtifactRow;
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* If the resolved artifact's transformChain promised an "obf -> mojang"
|
|
590
|
-
* binary remap, run tiny-remapper now and return the remapped jar path.
|
|
591
|
-
* Otherwise return the original binaryJarPath unchanged.
|
|
592
|
-
*
|
|
593
|
-
* Cache safety: writes to a per-attempt temp file then atomic-renames into
|
|
594
|
-
* <cacheDir>/remapped/<artifactId>.jar. A per-target inflight Promise map
|
|
595
|
-
* collapses concurrent calls so two simultaneous resolveArtifact calls for
|
|
596
|
-
* the same artifactId share one tiny-remapper run instead of racing on the
|
|
597
|
-
* same output path.
|
|
598
|
-
*/
|
|
599
|
-
private maybeRemapBinaryForMojang;
|
|
600
|
-
private recordRemappedJarBytesFromDisk;
|
|
601
|
-
/**
|
|
602
|
-
* Best-effort structural check that `path` is a non-empty file beginning with
|
|
603
|
-
* the ZIP local-file-header magic (`50 4B 03 04`). Used to drop partial /
|
|
604
|
-
* corrupt remap-cache entries before they reach Vineflower. False positives
|
|
605
|
-
* are acceptable (Vineflower will surface a clearer error); false negatives
|
|
606
|
-
* are not (a corrupt cache hit must be evicted).
|
|
607
|
-
*/
|
|
608
|
-
private isUsableJarFile;
|
|
609
|
-
private runBinaryRemap;
|
|
610
|
-
private loadFromSourceJar;
|
|
611
|
-
private hasAnyFiles;
|
|
612
|
-
/**
|
|
613
|
-
* Best-effort cleanup of `<cacheDir>/remapped/<artifactId>.jar` written by
|
|
614
|
-
* `maybeRemapBinaryForMojang`. Called from cache-eviction paths so the
|
|
615
|
-
* Mojang-remapped binary jar does not outlive the artifact row that owns it.
|
|
616
|
-
* Also releases the jar's bytes from `cacheTotalContentBytes`. Errors are
|
|
617
|
-
* swallowed: orphaned jars remain visible to `manage-cache` under the
|
|
618
|
-
* `binary-remap` cache kind and can be reclaimed there.
|
|
619
|
-
*/
|
|
620
|
-
private unlinkRemappedJarForArtifact;
|
|
621
|
-
/**
|
|
622
|
-
* Add the remapped jar's on-disk size to `cacheTotalContentBytes` so the
|
|
623
|
-
* `enforceCacheLimits` byte gate sees the jar before deciding to evict.
|
|
624
|
-
* Without this, a Mojang-remapped client jar (tens of MB) can accumulate
|
|
625
|
-
* silently while the indexed-source byte total stays below `maxCacheBytes`.
|
|
626
|
-
*/
|
|
627
|
-
private recordRemappedJarBytes;
|
|
628
|
-
private releaseRemappedJarBytes;
|
|
629
|
-
private enforceCacheLimits;
|
|
611
|
+
ingestIfNeeded(resolved: ResolvedSourceArtifact): Promise<void>;
|
|
630
612
|
private refreshCacheMetrics;
|
|
631
|
-
private touchCacheMetrics;
|
|
632
|
-
private upsertCacheMetrics;
|
|
633
|
-
private removeCacheMetrics;
|
|
634
|
-
private publishCacheMetrics;
|
|
635
613
|
private snapshotLruAccounting;
|
|
636
614
|
}
|
|
637
|
-
export {};
|