@adhisang/minecraft-modding-mcp 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/README.md +139 -30
- package/dist/cache-registry.d.ts +95 -0
- package/dist/cache-registry.js +541 -0
- package/dist/cli.js +31 -4
- package/dist/compat-stdio-transport.d.ts +2 -7
- package/dist/compat-stdio-transport.js +12 -154
- package/dist/entry-tools/analyze-mod-service.d.ts +207 -0
- package/dist/entry-tools/analyze-mod-service.js +253 -0
- package/dist/entry-tools/analyze-symbol-service.d.ts +209 -0
- package/dist/entry-tools/analyze-symbol-service.js +304 -0
- package/dist/entry-tools/compare-minecraft-service.d.ts +210 -0
- package/dist/entry-tools/compare-minecraft-service.js +397 -0
- package/dist/entry-tools/entry-tool-schema.d.ts +6 -0
- package/dist/entry-tools/entry-tool-schema.js +10 -0
- package/dist/entry-tools/inspect-minecraft-service.d.ts +1953 -0
- package/dist/entry-tools/inspect-minecraft-service.js +876 -0
- package/dist/entry-tools/manage-cache-service.d.ts +130 -0
- package/dist/entry-tools/manage-cache-service.js +229 -0
- package/dist/entry-tools/request-normalizers.d.ts +10 -0
- package/dist/entry-tools/request-normalizers.js +36 -0
- package/dist/entry-tools/response-contract.d.ts +44 -0
- package/dist/entry-tools/response-contract.js +96 -0
- package/dist/entry-tools/validate-project-service.d.ts +543 -0
- package/dist/entry-tools/validate-project-service.js +381 -0
- package/dist/index.js +495 -42
- package/dist/json-rpc-framing.d.ts +22 -0
- package/dist/json-rpc-framing.js +168 -0
- package/dist/mapping-pipeline-service.js +9 -1
- package/dist/mapping-service.d.ts +9 -0
- package/dist/mapping-service.js +183 -60
- package/dist/minecraft-explorer-service.d.ts +0 -1
- package/dist/minecraft-explorer-service.js +119 -23
- package/dist/mixin-validator.d.ts +24 -2
- package/dist/mixin-validator.js +223 -98
- package/dist/mod-decompile-service.d.ts +5 -0
- package/dist/mod-decompile-service.js +40 -5
- package/dist/mod-remap-service.js +142 -30
- package/dist/path-resolver.js +41 -4
- package/dist/registry-service.d.ts +10 -1
- package/dist/registry-service.js +154 -22
- package/dist/search-hit-accumulator.js +23 -2
- package/dist/source-jar-reader.js +16 -2
- package/dist/source-resolver.js +6 -7
- package/dist/source-service.d.ts +42 -4
- package/dist/source-service.js +781 -127
- package/dist/stdio-supervisor.d.ts +46 -0
- package/dist/stdio-supervisor.js +349 -0
- package/dist/storage/files-repo.d.ts +3 -9
- package/dist/storage/files-repo.js +66 -43
- package/dist/symbols/symbol-extractor.js +6 -4
- package/dist/tool-execution-gate.d.ts +15 -0
- package/dist/tool-execution-gate.js +58 -0
- package/dist/version-diff-service.js +10 -5
- package/dist/version-service.js +7 -2
- package/dist/workspace-mapping-service.js +12 -0
- package/package.json +1 -1
package/dist/source-service.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ResponseContext as ExplorerResponseContext, type SignatureMember } from "./minecraft-explorer-service.js";
|
|
2
|
-
import { type MixinValidationResult, type MappingHealthReport, type AccessWidenerValidationResult } from "./mixin-validator.js";
|
|
2
|
+
import { type MixinValidationResult, type MixinValidationProvenance, type MappingHealthReport, type AccessWidenerValidationResult } from "./mixin-validator.js";
|
|
3
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";
|
|
4
4
|
import { RuntimeMetrics, type RuntimeMetricSnapshot } from "./observability.js";
|
|
5
5
|
import { type WorkspaceCompileMappingOutput } from "./workspace-mapping-service.js";
|
|
@@ -33,9 +33,16 @@ export type ResolveArtifactOutput = {
|
|
|
33
33
|
provenance: ArtifactProvenance;
|
|
34
34
|
qualityFlags: string[];
|
|
35
35
|
repoUrl?: string;
|
|
36
|
+
artifactContents: ArtifactContentsSummary;
|
|
36
37
|
warnings: string[];
|
|
37
38
|
sampleEntries?: string[];
|
|
38
39
|
};
|
|
40
|
+
export type ArtifactContentsSummary = {
|
|
41
|
+
sourceKind: "source-jar" | "decompiled-binary";
|
|
42
|
+
indexedContentKinds: string[];
|
|
43
|
+
resourcesIncluded: boolean;
|
|
44
|
+
sourceCoverage: "full" | "partial";
|
|
45
|
+
};
|
|
39
46
|
type SymbolKind = "class" | "interface" | "enum" | "record" | "method" | "field";
|
|
40
47
|
type SearchIntent = "symbol" | "text" | "path";
|
|
41
48
|
type SearchMatch = "exact" | "prefix" | "contains" | "regex";
|
|
@@ -72,6 +79,8 @@ export type SearchClassSourceOutput = {
|
|
|
72
79
|
hits: SearchSourceHit[];
|
|
73
80
|
nextCursor?: string;
|
|
74
81
|
mappingApplied: SourceMapping;
|
|
82
|
+
returnedNamespace: SourceMapping;
|
|
83
|
+
artifactContents: ArtifactContentsSummary;
|
|
75
84
|
};
|
|
76
85
|
export type GetArtifactFileInput = {
|
|
77
86
|
artifactId: string;
|
|
@@ -84,6 +93,8 @@ export type GetArtifactFileOutput = {
|
|
|
84
93
|
contentBytes: number;
|
|
85
94
|
truncated: boolean;
|
|
86
95
|
mappingApplied: SourceMapping;
|
|
96
|
+
returnedNamespace: SourceMapping;
|
|
97
|
+
artifactContents: ArtifactContentsSummary;
|
|
87
98
|
};
|
|
88
99
|
export type ListArtifactFilesInput = {
|
|
89
100
|
artifactId: string;
|
|
@@ -95,6 +106,8 @@ export type ListArtifactFilesOutput = {
|
|
|
95
106
|
items: string[];
|
|
96
107
|
nextCursor?: string;
|
|
97
108
|
mappingApplied: SourceMapping;
|
|
109
|
+
artifactContents: ArtifactContentsSummary;
|
|
110
|
+
warnings: string[];
|
|
98
111
|
};
|
|
99
112
|
export type FindMappingInput = MappingFindMappingInput;
|
|
100
113
|
export type FindMappingOutput = MappingFindMappingOutput;
|
|
@@ -114,6 +127,7 @@ export type ResolveWorkspaceSymbolInput = {
|
|
|
114
127
|
descriptor?: string;
|
|
115
128
|
sourceMapping: SourceMapping;
|
|
116
129
|
sourcePriority?: MappingSourcePriority;
|
|
130
|
+
maxCandidates?: number;
|
|
117
131
|
};
|
|
118
132
|
export type ResolveWorkspaceSymbolOutput = MappingSymbolResolutionOutput & {
|
|
119
133
|
workspaceDetection: WorkspaceCompileMappingOutput;
|
|
@@ -152,8 +166,10 @@ export type GetClassSourceOutput = {
|
|
|
152
166
|
artifactId: string;
|
|
153
167
|
requestedMapping: SourceMapping;
|
|
154
168
|
mappingApplied: SourceMapping;
|
|
169
|
+
returnedNamespace: SourceMapping;
|
|
155
170
|
provenance: ArtifactProvenance;
|
|
156
171
|
qualityFlags: string[];
|
|
172
|
+
artifactContents: ArtifactContentsSummary;
|
|
157
173
|
outputFile?: string;
|
|
158
174
|
warnings: string[];
|
|
159
175
|
};
|
|
@@ -210,8 +226,10 @@ export type GetClassMembersOutput = {
|
|
|
210
226
|
artifactId: string;
|
|
211
227
|
requestedMapping: SourceMapping;
|
|
212
228
|
mappingApplied: SourceMapping;
|
|
229
|
+
returnedNamespace: SourceMapping;
|
|
213
230
|
provenance: ArtifactProvenance;
|
|
214
231
|
qualityFlags: string[];
|
|
232
|
+
artifactContents: ArtifactContentsSummary;
|
|
215
233
|
warnings: string[];
|
|
216
234
|
};
|
|
217
235
|
export type TraceSymbolLifecycleInput = {
|
|
@@ -256,9 +274,9 @@ type DiffMemberChangedField = "accessFlags" | "isSynthetic" | "javaSignature" |
|
|
|
256
274
|
export type DiffMember = SignatureMember;
|
|
257
275
|
export type DiffMemberChange = {
|
|
258
276
|
key: string;
|
|
259
|
-
from: DiffMember;
|
|
260
|
-
to: DiffMember;
|
|
261
277
|
changed: DiffMemberChangedField[];
|
|
278
|
+
from?: DiffMember;
|
|
279
|
+
to?: DiffMember;
|
|
262
280
|
};
|
|
263
281
|
export type DiffClassMemberDelta = {
|
|
264
282
|
added: DiffMember[];
|
|
@@ -271,6 +289,7 @@ export type DiffClassSignaturesInput = {
|
|
|
271
289
|
toVersion: string;
|
|
272
290
|
mapping?: SourceMapping;
|
|
273
291
|
sourcePriority?: MappingSourcePriority;
|
|
292
|
+
includeFullDiff?: boolean;
|
|
274
293
|
};
|
|
275
294
|
export type DiffClassSignaturesOutput = {
|
|
276
295
|
query: {
|
|
@@ -342,6 +361,9 @@ export type ValidateMixinInput = {
|
|
|
342
361
|
} | {
|
|
343
362
|
mode: "config";
|
|
344
363
|
configPaths: string[];
|
|
364
|
+
} | {
|
|
365
|
+
mode: "project";
|
|
366
|
+
path: string;
|
|
345
367
|
};
|
|
346
368
|
sourceRoots?: string[];
|
|
347
369
|
version: string;
|
|
@@ -355,9 +377,10 @@ export type ValidateMixinInput = {
|
|
|
355
377
|
explain?: boolean;
|
|
356
378
|
warningMode?: "full" | "aggregated";
|
|
357
379
|
preferProjectMapping?: boolean;
|
|
358
|
-
reportMode?: "compact" | "full";
|
|
380
|
+
reportMode?: "compact" | "full" | "summary-first";
|
|
359
381
|
warningCategoryFilter?: ("mapping" | "configuration" | "validation" | "resolution" | "parse")[];
|
|
360
382
|
treatInfoAsWarning?: boolean;
|
|
383
|
+
includeIssues?: boolean;
|
|
361
384
|
};
|
|
362
385
|
export type ValidateMixinResultSource = {
|
|
363
386
|
kind: "inline" | "path" | "config";
|
|
@@ -383,12 +406,15 @@ export type ValidateMixinOutput = {
|
|
|
383
406
|
summary: {
|
|
384
407
|
total: number;
|
|
385
408
|
valid: number;
|
|
409
|
+
partial: number;
|
|
386
410
|
invalid: number;
|
|
387
411
|
processingErrors: number;
|
|
388
412
|
totalValidationErrors: number;
|
|
389
413
|
totalValidationWarnings: number;
|
|
390
414
|
};
|
|
391
415
|
issueSummary?: ValidateMixinBatchIssueSummaryItem[];
|
|
416
|
+
provenance?: MixinValidationProvenance;
|
|
417
|
+
incompleteReasons?: string[];
|
|
392
418
|
toolHealth?: MappingHealthReport;
|
|
393
419
|
confidenceScore?: number;
|
|
394
420
|
warnings: string[];
|
|
@@ -416,9 +442,13 @@ export declare class SourceService {
|
|
|
416
442
|
private readonly versionDiffService;
|
|
417
443
|
private readonly modDecompileService;
|
|
418
444
|
private readonly modSearchService;
|
|
445
|
+
private cacheMetricsState;
|
|
419
446
|
constructor(explicitConfig?: Config, metrics?: RuntimeMetrics);
|
|
420
447
|
private discoverVersionSourceJar;
|
|
421
448
|
private buildVersionSourceRecoveryCommand;
|
|
449
|
+
private buildArtifactContentsSummary;
|
|
450
|
+
private inferVersionFromContext;
|
|
451
|
+
private resolveVersionContext;
|
|
422
452
|
resolveArtifact(input: ResolveArtifactInput): Promise<ResolveArtifactOutput>;
|
|
423
453
|
searchClassSource(input: SearchClassSourceInput): Promise<SearchClassSourceOutput>;
|
|
424
454
|
getArtifactFile(input: GetArtifactFileInput): Promise<GetArtifactFileOutput>;
|
|
@@ -440,10 +470,14 @@ export declare class SourceService {
|
|
|
440
470
|
getClassSource(input: GetClassSourceInput): Promise<GetClassSourceOutput>;
|
|
441
471
|
getClassMembers(input: GetClassMembersInput): Promise<GetClassMembersOutput>;
|
|
442
472
|
validateMixin(input: ValidateMixinInput): Promise<ValidateMixinOutput>;
|
|
473
|
+
private createProjectValidateMixinConfigInput;
|
|
474
|
+
private shouldRetryValidateMixinWithMavenFirst;
|
|
475
|
+
private findValidateMixinClassMapping;
|
|
443
476
|
private validateMixinSingle;
|
|
444
477
|
private resolveMixinInputPath;
|
|
445
478
|
private resolveMixinConfigSources;
|
|
446
479
|
private validateMixinMany;
|
|
480
|
+
private applyValidateMixinOutputCompaction;
|
|
447
481
|
private buildValidateMixinOutput;
|
|
448
482
|
validateAccessWidener(input: ValidateAccessWidenerInput): Promise<ValidateAccessWidenerOutput>;
|
|
449
483
|
getRuntimeMetrics(): RuntimeMetricSnapshot;
|
|
@@ -478,5 +512,9 @@ export declare class SourceService {
|
|
|
478
512
|
private hasAnyFiles;
|
|
479
513
|
private enforceCacheLimits;
|
|
480
514
|
private refreshCacheMetrics;
|
|
515
|
+
private touchCacheMetrics;
|
|
516
|
+
private upsertCacheMetrics;
|
|
517
|
+
private removeCacheMetrics;
|
|
518
|
+
private publishCacheMetrics;
|
|
481
519
|
}
|
|
482
520
|
export {};
|