@adhisang/minecraft-modding-mcp 4.0.0 → 4.1.1
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 +61 -0
- package/README.md +40 -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 +102 -0
- package/dist/entry-tools/validate-project/cases/project-summary.js +415 -0
- package/dist/entry-tools/validate-project/internal.d.ts +142 -0
- package/dist/entry-tools/validate-project/internal.js +303 -0
- package/dist/entry-tools/validate-project-service.d.ts +67 -47
- package/dist/entry-tools/validate-project-service.js +13 -563
- 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 +147 -1354
- 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 +8 -145
- package/dist/mapping-service.js +30 -1207
- 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 +111 -0
- package/dist/source/artifact-resolver.js +1271 -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 +522 -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 +26 -0
- package/dist/source/state.js +24 -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-resolver.d.ts +1 -0
- package/dist/source-resolver.js +1 -1
- package/dist/source-service.d.ts +164 -170
- package/dist/source-service.js +70 -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 +416 -0
- package/docs/examples.md +483 -0
- package/docs/tool-reference.md +462 -0
- package/package.json +17 -4
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;
|
|
@@ -39,13 +50,29 @@ export type ResolveArtifactOutput = {
|
|
|
39
50
|
warnings: string[];
|
|
40
51
|
sampleEntries?: string[];
|
|
41
52
|
};
|
|
53
|
+
export type ProbeMinecraftArtifactInput = {
|
|
54
|
+
target: {
|
|
55
|
+
kind: "version";
|
|
56
|
+
value: string;
|
|
57
|
+
};
|
|
58
|
+
mapping?: SourceMapping;
|
|
59
|
+
sourcePriority?: MappingSourcePriority;
|
|
60
|
+
projectPath?: string;
|
|
61
|
+
scope?: ArtifactScope;
|
|
62
|
+
preferProjectVersion?: boolean;
|
|
63
|
+
};
|
|
64
|
+
export type ProbeMinecraftArtifactOutput = {
|
|
65
|
+
artifactId: string;
|
|
66
|
+
mappingApplied: SourceMapping;
|
|
67
|
+
warnings?: string[];
|
|
68
|
+
};
|
|
42
69
|
export type ArtifactContentsSummary = {
|
|
43
70
|
sourceKind: "source-jar" | "decompiled-binary";
|
|
44
71
|
indexedContentKinds: string[];
|
|
45
72
|
resourcesIncluded: boolean;
|
|
46
73
|
sourceCoverage: "full" | "partial";
|
|
47
74
|
};
|
|
48
|
-
type SymbolKind = "class" | "interface" | "enum" | "record" | "method" | "field";
|
|
75
|
+
export type SymbolKind = "class" | "interface" | "enum" | "record" | "method" | "field";
|
|
49
76
|
type SearchIntent = "symbol" | "text" | "path";
|
|
50
77
|
type SearchMatch = "exact" | "prefix" | "contains" | "regex";
|
|
51
78
|
export type SearchScope = {
|
|
@@ -146,7 +173,7 @@ export type ResolveWorkspaceSymbolOutput = MappingSymbolResolutionOutput & {
|
|
|
146
173
|
export type SourceMode = "metadata" | "snippet" | "full";
|
|
147
174
|
export type GetClassSourceInput = {
|
|
148
175
|
artifactId?: string;
|
|
149
|
-
target?:
|
|
176
|
+
target?: ResolveArtifactTargetInput;
|
|
150
177
|
className: string;
|
|
151
178
|
mode?: SourceMode;
|
|
152
179
|
mapping?: SourceMapping;
|
|
@@ -203,7 +230,7 @@ export type FindClassOutput = {
|
|
|
203
230
|
type MemberAccess = "public" | "all";
|
|
204
231
|
export type GetClassMembersInput = {
|
|
205
232
|
artifactId?: string;
|
|
206
|
-
target?:
|
|
233
|
+
target?: ResolveArtifactTargetInput;
|
|
207
234
|
className: string;
|
|
208
235
|
mapping?: SourceMapping;
|
|
209
236
|
sourcePriority?: MappingSourcePriority;
|
|
@@ -229,6 +256,7 @@ export type DecompiledFallback = {
|
|
|
229
256
|
methods: DecompiledMember[];
|
|
230
257
|
origin: "source-extracted";
|
|
231
258
|
};
|
|
259
|
+
export type GetClassMembersStatus = "ok" | "members_unavailable" | "partial";
|
|
232
260
|
export type GetClassMembersOutput = {
|
|
233
261
|
className: string;
|
|
234
262
|
members: {
|
|
@@ -259,6 +287,12 @@ export type GetClassMembersOutput = {
|
|
|
259
287
|
methods: number;
|
|
260
288
|
total: number;
|
|
261
289
|
};
|
|
290
|
+
status?: GetClassMembersStatus;
|
|
291
|
+
unavailableReason?: string;
|
|
292
|
+
suggestedCall?: {
|
|
293
|
+
tool: string;
|
|
294
|
+
params: Record<string, unknown>;
|
|
295
|
+
};
|
|
262
296
|
warnings: string[];
|
|
263
297
|
};
|
|
264
298
|
export type TraceSymbolLifecycleInput = {
|
|
@@ -298,7 +332,7 @@ export type TraceSymbolLifecycleOutput = {
|
|
|
298
332
|
timeline?: TraceSymbolLifecycleTimelineEntry[];
|
|
299
333
|
warnings: string[];
|
|
300
334
|
};
|
|
301
|
-
type DiffClassChange = "added" | "removed" | "present_in_both" | "absent_in_both";
|
|
335
|
+
export type DiffClassChange = "added" | "removed" | "present_in_both" | "absent_in_both";
|
|
302
336
|
type DiffMemberChangedField = "accessFlags" | "isSynthetic" | "javaSignature" | "jvmDescriptor";
|
|
303
337
|
export type DiffMember = SignatureMember;
|
|
304
338
|
export type DiffMemberChange = {
|
|
@@ -359,24 +393,7 @@ export type DiffClassSignaturesOutput = {
|
|
|
359
393
|
};
|
|
360
394
|
warnings: string[];
|
|
361
395
|
};
|
|
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
|
-
};
|
|
396
|
+
export type { IndexArtifactInput, IndexArtifactOutput } from "./source/indexer.js";
|
|
380
397
|
export type ValidateMixinInput = {
|
|
381
398
|
input: {
|
|
382
399
|
mode: "inline";
|
|
@@ -411,6 +428,19 @@ export type ValidateMixinInput = {
|
|
|
411
428
|
treatInfoAsWarning?: boolean;
|
|
412
429
|
includeIssues?: boolean;
|
|
413
430
|
};
|
|
431
|
+
export type ValidateMixinOptions = {
|
|
432
|
+
stageEmitter?: StageEmitter;
|
|
433
|
+
/** Test-only override for stage budgets. Production code uses defaults. */
|
|
434
|
+
__stageBudgets?: Partial<MixinStageBudgets>;
|
|
435
|
+
/** Test-only hooks injected at stage boundaries to simulate slow work. */
|
|
436
|
+
__testHooks?: {
|
|
437
|
+
afterResolve?: () => Promise<void>;
|
|
438
|
+
afterMappingHealth?: () => Promise<void>;
|
|
439
|
+
afterParse?: () => Promise<void>;
|
|
440
|
+
beforeTargetLoop?: () => Promise<void>;
|
|
441
|
+
beforeTargetIter?: (targetIndex: number) => Promise<void>;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
414
444
|
export type ValidateMixinResultSource = {
|
|
415
445
|
kind: "inline" | "path" | "config";
|
|
416
446
|
label: string;
|
|
@@ -421,6 +451,10 @@ export type ValidateMixinBatchResult = {
|
|
|
421
451
|
source: ValidateMixinResultSource;
|
|
422
452
|
result?: MixinValidationResult;
|
|
423
453
|
error?: string;
|
|
454
|
+
/** Stable error code from AppError when the entry failed with a typed error (e.g. ERR_STAGE_BUDGET_PRE_PARSE). */
|
|
455
|
+
errorCode?: string;
|
|
456
|
+
/** AppError details (failedStage, stageBudgetExhausted, budgetMs, elapsedMs, …) preserved across batch aggregation. */
|
|
457
|
+
errorDetails?: Record<string, unknown>;
|
|
424
458
|
};
|
|
425
459
|
export type ValidateMixinBatchIssueSummaryItem = {
|
|
426
460
|
kind: string;
|
|
@@ -469,52 +503,78 @@ export type ValidateAccessTransformerInput = {
|
|
|
469
503
|
};
|
|
470
504
|
export type ValidateAccessTransformerOutput = AccessTransformerValidationResult;
|
|
471
505
|
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;
|
|
506
|
+
readonly config: Config;
|
|
507
|
+
readonly db: import("./storage/sqlite.js").default;
|
|
508
|
+
readonly artifactsRepo: ArtifactsRepo;
|
|
509
|
+
readonly filesRepo: FilesRepo;
|
|
510
|
+
readonly indexMetaRepo: IndexMetaRepo;
|
|
511
|
+
readonly symbolsRepo: SymbolsRepo;
|
|
512
|
+
readonly metrics: RuntimeMetrics;
|
|
513
|
+
readonly versionService: VersionService;
|
|
514
|
+
readonly mappingService: MappingService;
|
|
515
|
+
readonly workspaceMappingService: WorkspaceMappingService;
|
|
516
|
+
readonly workspaceContextCache: WorkspaceContextCache;
|
|
517
|
+
readonly explorerService: MinecraftExplorerService;
|
|
518
|
+
readonly registryService: RegistryService;
|
|
519
|
+
readonly versionDiffService: VersionDiffService;
|
|
520
|
+
readonly modDecompileService: ModDecompileService;
|
|
521
|
+
readonly modSearchService: ModSearchService;
|
|
522
|
+
readonly state: SourceServiceState;
|
|
523
|
+
constructor(explicitConfig?: Config, metrics?: RuntimeMetrics, deps?: {
|
|
524
|
+
workspaceContextCache?: WorkspaceContextCache;
|
|
525
|
+
});
|
|
517
526
|
resolveArtifact(input: ResolveArtifactInput): Promise<ResolveArtifactOutput>;
|
|
527
|
+
probeMinecraftArtifact(input: ProbeMinecraftArtifactInput): Promise<ProbeMinecraftArtifactOutput>;
|
|
528
|
+
synthesizeWorkspaceTarget(input: ResolveArtifactInput, workspace: import("./types.js").WorkspaceTargetInput): ReturnType<typeof workspaceTarget.synthesizeWorkspaceTarget>;
|
|
529
|
+
synthesizeDependencyTarget(input: ResolveArtifactInput, dep: import("./types.js").DependencyTargetInput): ReturnType<typeof workspaceTarget.synthesizeDependencyTarget>;
|
|
530
|
+
loadOrDetectWorkspaceContext(projectPath: string): ReturnType<typeof workspaceTarget.loadOrDetectWorkspaceContext>;
|
|
531
|
+
resolveAccessWidenerRuntimeArtifact(input: {
|
|
532
|
+
version: string;
|
|
533
|
+
awNamespace: SourceMapping;
|
|
534
|
+
projectPath?: string;
|
|
535
|
+
scope?: ArtifactScope;
|
|
536
|
+
preferProjectVersion?: boolean;
|
|
537
|
+
}): Promise<RuntimeValidationProvenance<SourceMapping>>;
|
|
538
|
+
resolveAccessTransformerNamespace(input: {
|
|
539
|
+
atNamespace?: AccessTransformerNamespace;
|
|
540
|
+
projectPath?: string;
|
|
541
|
+
}): Promise<AccessTransformerNamespace>;
|
|
542
|
+
resolveAccessTransformerRuntimeArtifact(input: {
|
|
543
|
+
version: string;
|
|
544
|
+
atNamespace: AccessTransformerNamespace;
|
|
545
|
+
projectPath?: string;
|
|
546
|
+
scope?: ArtifactScope;
|
|
547
|
+
preferProjectVersion?: boolean;
|
|
548
|
+
}): Promise<RuntimeValidationProvenance<AccessTransformerNamespace>>;
|
|
549
|
+
buildArtifactContentsSummary(input: {
|
|
550
|
+
origin: ResolvedSourceArtifact["origin"];
|
|
551
|
+
sourceJarPath?: string;
|
|
552
|
+
isDecompiled?: boolean;
|
|
553
|
+
qualityFlags: string[];
|
|
554
|
+
}): ArtifactContentsSummary;
|
|
555
|
+
discoverVersionSourceJar(input: {
|
|
556
|
+
version: string;
|
|
557
|
+
projectPath?: string;
|
|
558
|
+
}): ReturnType<typeof artifactResolver.discoverVersionSourceJar>;
|
|
559
|
+
discoverAccessWidenerRuntimeCandidates(input: {
|
|
560
|
+
version: string;
|
|
561
|
+
projectPath?: string;
|
|
562
|
+
requestedScope: ArtifactScope;
|
|
563
|
+
}): ReturnType<typeof artifactResolver.discoverAccessWidenerRuntimeCandidates>;
|
|
564
|
+
discoverAccessTransformerRuntimeCandidates(input: {
|
|
565
|
+
version: string;
|
|
566
|
+
projectPath?: string;
|
|
567
|
+
requestedScope: ArtifactScope;
|
|
568
|
+
atNamespace: AccessTransformerNamespace;
|
|
569
|
+
loader: import("./workspace-mapping-service.js").WorkspaceProjectLoader | "unknown";
|
|
570
|
+
}): ReturnType<typeof artifactResolver.discoverAccessTransformerRuntimeCandidates>;
|
|
571
|
+
buildMappingFallbackSuggestedCall(args: {
|
|
572
|
+
input: ResolveArtifactInput;
|
|
573
|
+
kind: import("./types.js").ArtifactTargetKind;
|
|
574
|
+
value: string;
|
|
575
|
+
scope: ArtifactScope | undefined;
|
|
576
|
+
effectiveMapping: SourceMapping;
|
|
577
|
+
}): ReturnType<typeof artifactResolver.buildMappingFallbackSuggestedCall>;
|
|
518
578
|
searchClassSource(input: SearchClassSourceInput): Promise<SearchClassSourceOutput>;
|
|
519
579
|
getArtifactFile(input: GetArtifactFileInput): Promise<GetArtifactFileOutput>;
|
|
520
580
|
listArtifactFiles(input: ListArtifactFilesInput): Promise<ListArtifactFilesOutput>;
|
|
@@ -535,103 +595,37 @@ export declare class SourceService {
|
|
|
535
595
|
findClass(input: FindClassInput): FindClassOutput;
|
|
536
596
|
getClassSource(input: GetClassSourceInput): Promise<GetClassSourceOutput>;
|
|
537
597
|
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;
|
|
598
|
+
validateMixin(input: ValidateMixinInput, options?: ValidateMixinOptions): Promise<ValidateMixinOutput>;
|
|
599
|
+
validateMixinSingle(input: validateMixinModule.ValidateMixinSingleInput): Promise<MixinValidationResult>;
|
|
600
|
+
remapSignatureMembers(members: SignatureMember[], kind: "field" | "method", version: string, sourceMapping: SourceMapping, targetMapping: SourceMapping, sourcePriority: MappingSourcePriority | undefined, warnings: string[], projectPath?: string): Promise<{
|
|
601
|
+
members: SignatureMember[];
|
|
602
|
+
failedNames: Set<string>;
|
|
603
|
+
}>;
|
|
551
604
|
validateAccessWidener(input: ValidateAccessWidenerInput): Promise<ValidateAccessWidenerOutput>;
|
|
552
605
|
validateAccessTransformer(input: ValidateAccessTransformerInput): Promise<ValidateAccessTransformerOutput>;
|
|
553
606
|
recordToolCall(tool: string, durationMs: number): void;
|
|
554
607
|
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;
|
|
608
|
+
indexArtifact(input: indexer.IndexArtifactInput): Promise<indexer.IndexArtifactOutput>;
|
|
609
|
+
resolveClassNameForLookup(input: {
|
|
610
|
+
className: string;
|
|
611
|
+
version?: string;
|
|
612
|
+
sourceMapping: SourceMapping;
|
|
613
|
+
targetMapping: SourceMapping;
|
|
614
|
+
sourcePriority: MappingSourcePriority | undefined;
|
|
615
|
+
warnings: string[];
|
|
616
|
+
context: string;
|
|
617
|
+
}): Promise<string>;
|
|
618
|
+
resolveBinaryFallbackArtifact(input: {
|
|
619
|
+
binaryJarPath?: string;
|
|
620
|
+
version?: string;
|
|
621
|
+
coordinate?: string;
|
|
622
|
+
requestedMapping: SourceMapping;
|
|
623
|
+
mappingApplied: SourceMapping;
|
|
624
|
+
provenance?: ArtifactProvenance;
|
|
625
|
+
qualityFlags: string[];
|
|
626
|
+
}): Promise<ResolvedSourceArtifact | undefined>;
|
|
586
627
|
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;
|
|
628
|
+
ingestIfNeeded(resolved: ResolvedSourceArtifact): Promise<void>;
|
|
630
629
|
private refreshCacheMetrics;
|
|
631
|
-
private touchCacheMetrics;
|
|
632
|
-
private upsertCacheMetrics;
|
|
633
|
-
private removeCacheMetrics;
|
|
634
|
-
private publishCacheMetrics;
|
|
635
630
|
private snapshotLruAccounting;
|
|
636
631
|
}
|
|
637
|
-
export {};
|