@adhisang/minecraft-modding-mcp 6.3.0 → 7.0.0-rc.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 +90 -0
- package/README.md +13 -3
- package/dist/cache-policy.d.ts +71 -0
- package/dist/cache-policy.js +83 -0
- package/dist/cache-registry.js +45 -8
- package/dist/cli.js +74 -3
- package/dist/compat-stdio-transport.d.ts +1 -1
- package/dist/compat-stdio-transport.js +13 -1
- package/dist/config.d.ts +3 -0
- package/dist/config.js +8 -2
- package/dist/decompiler/vineflower.d.ts +1 -0
- package/dist/decompiler/vineflower.js +8 -5
- package/dist/entry-tools/analyze-mod-service.d.ts +70 -136
- package/dist/entry-tools/analyze-symbol-service.d.ts +112 -150
- package/dist/entry-tools/compare-minecraft-service.d.ts +59 -145
- package/dist/entry-tools/entry-tool-schema.d.ts +38 -4
- package/dist/entry-tools/entry-tool-schema.js +4 -1
- package/dist/entry-tools/inspect-minecraft/internal.d.ts +235 -799
- package/dist/entry-tools/inspect-minecraft/internal.js +50 -13
- package/dist/entry-tools/inspect-minecraft-service.d.ts +372 -1736
- package/dist/entry-tools/manage-cache-service.d.ts +81 -91
- package/dist/entry-tools/validate-project/cases/mixin.js +26 -6
- package/dist/entry-tools/validate-project/cases/project-summary.d.ts +7 -7
- package/dist/entry-tools/validate-project-service.d.ts +164 -592
- package/dist/entry-tools/verify-mixin-target-service.d.ts +3 -19
- package/dist/entry-tools/verify-mixin-target-service.js +19 -1
- package/dist/era-classifier.d.ts +161 -0
- package/dist/era-classifier.js +292 -0
- package/dist/error-mapping.d.ts +76 -0
- package/dist/error-mapping.js +116 -8
- package/dist/index.d.ts +42 -4
- package/dist/index.js +636 -473
- package/dist/java-process.d.ts +2 -0
- package/dist/java-process.js +22 -2
- package/dist/json-rpc-framing.d.ts +77 -1
- package/dist/json-rpc-framing.js +249 -13
- package/dist/mapping/loaders/tiny-loom-selection.d.ts +88 -0
- package/dist/mapping/loaders/tiny-loom-selection.js +223 -0
- package/dist/mapping/loaders/tiny-loom.js +45 -33
- package/dist/mapping/loaders/tiny-maven.js +6 -11
- package/dist/mapping/parsers/tiny.d.ts +57 -0
- package/dist/mapping/parsers/tiny.js +99 -22
- package/dist/mapping-service.d.ts +19 -0
- package/dist/mapping-service.js +93 -9
- package/dist/maven-resolver.d.ts +18 -0
- package/dist/maven-resolver.js +20 -0
- package/dist/mcp-helpers.d.ts +19 -2
- package/dist/mcp-helpers.js +58 -9
- package/dist/minecraft-explorer-service.d.ts +1 -1
- package/dist/mixin/types.d.ts +8 -0
- package/dist/mod-analyzer.js +7 -7
- package/dist/mod-decompile-service.js +1 -0
- package/dist/nbt/java-nbt-codec.js +12 -2
- package/dist/nbt/json-patch.js +14 -3
- package/dist/nbt/pipeline.js +40 -3
- package/dist/nbt/typed-json.js +26 -1
- package/dist/registration-adapter.d.ts +32 -0
- package/dist/registration-adapter.js +52 -0
- package/dist/repo-downloader.d.ts +165 -0
- package/dist/repo-downloader.js +568 -10
- package/dist/request-context.d.ts +7 -0
- package/dist/request-context.js +9 -0
- package/dist/resources.d.ts +1 -1
- package/dist/resources.js +25 -19
- package/dist/server-identity.d.ts +27 -0
- package/dist/server-identity.js +26 -0
- package/dist/source/access-validate.js +53 -0
- package/dist/source/artifact-resolver.d.ts +81 -2
- package/dist/source/artifact-resolver.js +227 -15
- package/dist/source/class-source.d.ts +36 -0
- package/dist/source/class-source.js +222 -38
- package/dist/source/did-you-mean.d.ts +12 -1
- package/dist/source/did-you-mean.js +6 -2
- package/dist/source/file-access.js +150 -46
- package/dist/source/indexer.js +1 -0
- package/dist/source/shared-utils.d.ts +21 -0
- package/dist/source/shared-utils.js +23 -0
- package/dist/source-resolver.js +224 -57
- package/dist/source-service.d.ts +12 -1
- package/dist/stdio-supervisor.d.ts +357 -2
- package/dist/stdio-supervisor.js +1031 -80
- package/dist/storage/db.d.ts +2 -1
- package/dist/storage/db.js +15 -8
- package/dist/synthetic-decorator.d.ts +24 -0
- package/dist/synthetic-decorator.js +48 -0
- package/dist/tool-guidance.d.ts +17 -1
- package/dist/tool-guidance.js +323 -18
- package/dist/tool-schema-registry.d.ts +2 -0
- package/dist/tool-schema-registry.js +4 -0
- package/dist/tool-schemas.d.ts +2212 -3919
- package/dist/tool-schemas.js +33 -7
- package/dist/types.d.ts +35 -0
- package/dist/v1-parity-schemas.d.ts +7 -0
- package/dist/v1-parity-schemas.js +5584 -0
- package/dist/version-diff-service.d.ts +33 -0
- package/dist/version-diff-service.js +148 -3
- package/dist/version-service.js +36 -14
- package/dist/warning-details.js +18 -1
- package/docs/README-ja.md +5 -3
- package/docs/tool-reference.md +196 -19
- package/package.json +13 -8
|
@@ -1,123 +1,113 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type CacheRegistry } from "../cache-registry.js";
|
|
3
3
|
export declare const manageCacheShape: {
|
|
4
|
-
action: z.ZodEnum<
|
|
5
|
-
|
|
4
|
+
action: z.ZodEnum<{
|
|
5
|
+
summary: "summary";
|
|
6
|
+
list: "list";
|
|
7
|
+
inspect: "inspect";
|
|
8
|
+
delete: "delete";
|
|
9
|
+
prune: "prune";
|
|
10
|
+
rebuild: "rebuild";
|
|
11
|
+
verify: "verify";
|
|
12
|
+
}>;
|
|
13
|
+
cacheKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
14
|
+
workspace: "workspace";
|
|
15
|
+
"artifact-index": "artifact-index";
|
|
16
|
+
downloads: "downloads";
|
|
17
|
+
mapping: "mapping";
|
|
18
|
+
registry: "registry";
|
|
19
|
+
"decompiled-source": "decompiled-source";
|
|
20
|
+
"mod-remap": "mod-remap";
|
|
21
|
+
"binary-remap": "binary-remap";
|
|
22
|
+
"nested-jar": "nested-jar";
|
|
23
|
+
}>>>;
|
|
6
24
|
selector: z.ZodOptional<z.ZodObject<{
|
|
7
25
|
artifactId: z.ZodOptional<z.ZodString>;
|
|
8
26
|
version: z.ZodOptional<z.ZodString>;
|
|
9
27
|
jarPath: z.ZodOptional<z.ZodString>;
|
|
10
28
|
entryId: z.ZodOptional<z.ZodString>;
|
|
11
|
-
status: z.ZodOptional<z.ZodEnum<
|
|
29
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
stale: "stale";
|
|
31
|
+
healthy: "healthy";
|
|
32
|
+
partial: "partial";
|
|
33
|
+
orphaned: "orphaned";
|
|
34
|
+
corrupt: "corrupt";
|
|
35
|
+
in_use: "in_use";
|
|
36
|
+
}>>;
|
|
12
37
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
13
38
|
mapping: z.ZodOptional<z.ZodString>;
|
|
14
39
|
scope: z.ZodOptional<z.ZodString>;
|
|
15
40
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
entryId?: string | undefined;
|
|
22
|
-
artifactId?: string | undefined;
|
|
23
|
-
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
24
|
-
scope?: string | undefined;
|
|
25
|
-
olderThan?: string | undefined;
|
|
26
|
-
}, {
|
|
27
|
-
version?: string | undefined;
|
|
28
|
-
projectPath?: string | undefined;
|
|
29
|
-
mapping?: string | undefined;
|
|
30
|
-
jarPath?: string | undefined;
|
|
31
|
-
entryId?: string | undefined;
|
|
32
|
-
artifactId?: string | undefined;
|
|
33
|
-
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
34
|
-
scope?: string | undefined;
|
|
35
|
-
olderThan?: string | undefined;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
summary: "summary";
|
|
44
|
+
standard: "standard";
|
|
45
|
+
full: "full";
|
|
36
46
|
}>>;
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
48
|
+
[x: string]: string;
|
|
49
|
+
}>>>;
|
|
39
50
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
40
51
|
cursor: z.ZodOptional<z.ZodString>;
|
|
41
|
-
executionMode: z.ZodDefault<z.ZodEnum<
|
|
52
|
+
executionMode: z.ZodDefault<z.ZodEnum<{
|
|
53
|
+
preview: "preview";
|
|
54
|
+
apply: "apply";
|
|
55
|
+
}>>;
|
|
42
56
|
};
|
|
43
57
|
export declare const manageCacheSchema: z.ZodObject<{
|
|
44
|
-
action: z.ZodEnum<
|
|
45
|
-
|
|
58
|
+
action: z.ZodEnum<{
|
|
59
|
+
summary: "summary";
|
|
60
|
+
list: "list";
|
|
61
|
+
inspect: "inspect";
|
|
62
|
+
delete: "delete";
|
|
63
|
+
prune: "prune";
|
|
64
|
+
rebuild: "rebuild";
|
|
65
|
+
verify: "verify";
|
|
66
|
+
}>;
|
|
67
|
+
cacheKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
68
|
+
workspace: "workspace";
|
|
69
|
+
"artifact-index": "artifact-index";
|
|
70
|
+
downloads: "downloads";
|
|
71
|
+
mapping: "mapping";
|
|
72
|
+
registry: "registry";
|
|
73
|
+
"decompiled-source": "decompiled-source";
|
|
74
|
+
"mod-remap": "mod-remap";
|
|
75
|
+
"binary-remap": "binary-remap";
|
|
76
|
+
"nested-jar": "nested-jar";
|
|
77
|
+
}>>>;
|
|
46
78
|
selector: z.ZodOptional<z.ZodObject<{
|
|
47
79
|
artifactId: z.ZodOptional<z.ZodString>;
|
|
48
80
|
version: z.ZodOptional<z.ZodString>;
|
|
49
81
|
jarPath: z.ZodOptional<z.ZodString>;
|
|
50
82
|
entryId: z.ZodOptional<z.ZodString>;
|
|
51
|
-
status: z.ZodOptional<z.ZodEnum<
|
|
83
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
84
|
+
stale: "stale";
|
|
85
|
+
healthy: "healthy";
|
|
86
|
+
partial: "partial";
|
|
87
|
+
orphaned: "orphaned";
|
|
88
|
+
corrupt: "corrupt";
|
|
89
|
+
in_use: "in_use";
|
|
90
|
+
}>>;
|
|
52
91
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
53
92
|
mapping: z.ZodOptional<z.ZodString>;
|
|
54
93
|
scope: z.ZodOptional<z.ZodString>;
|
|
55
94
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
entryId?: string | undefined;
|
|
62
|
-
artifactId?: string | undefined;
|
|
63
|
-
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
64
|
-
scope?: string | undefined;
|
|
65
|
-
olderThan?: string | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
version?: string | undefined;
|
|
68
|
-
projectPath?: string | undefined;
|
|
69
|
-
mapping?: string | undefined;
|
|
70
|
-
jarPath?: string | undefined;
|
|
71
|
-
entryId?: string | undefined;
|
|
72
|
-
artifactId?: string | undefined;
|
|
73
|
-
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
74
|
-
scope?: string | undefined;
|
|
75
|
-
olderThan?: string | undefined;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
97
|
+
summary: "summary";
|
|
98
|
+
standard: "standard";
|
|
99
|
+
full: "full";
|
|
76
100
|
}>>;
|
|
77
|
-
|
|
78
|
-
|
|
101
|
+
include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
102
|
+
[x: string]: string;
|
|
103
|
+
}>>>;
|
|
79
104
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
80
105
|
cursor: z.ZodOptional<z.ZodString>;
|
|
81
|
-
executionMode: z.ZodDefault<z.ZodEnum<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
cursor?: string | undefined;
|
|
87
|
-
detail?: "summary" | "standard" | "full" | undefined;
|
|
88
|
-
include?: string[] | undefined;
|
|
89
|
-
cacheKinds?: ("workspace" | "artifact-index" | "downloads" | "mapping" | "registry" | "decompiled-source" | "mod-remap" | "binary-remap" | "nested-jar")[] | undefined;
|
|
90
|
-
selector?: {
|
|
91
|
-
version?: string | undefined;
|
|
92
|
-
projectPath?: string | undefined;
|
|
93
|
-
mapping?: string | undefined;
|
|
94
|
-
jarPath?: string | undefined;
|
|
95
|
-
entryId?: string | undefined;
|
|
96
|
-
artifactId?: string | undefined;
|
|
97
|
-
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
98
|
-
scope?: string | undefined;
|
|
99
|
-
olderThan?: string | undefined;
|
|
100
|
-
} | undefined;
|
|
101
|
-
}, {
|
|
102
|
-
action: "summary" | "list" | "inspect" | "verify" | "delete" | "prune" | "rebuild";
|
|
103
|
-
limit?: number | undefined;
|
|
104
|
-
cursor?: string | undefined;
|
|
105
|
-
detail?: "summary" | "standard" | "full" | undefined;
|
|
106
|
-
include?: string[] | undefined;
|
|
107
|
-
executionMode?: "preview" | "apply" | undefined;
|
|
108
|
-
cacheKinds?: ("workspace" | "artifact-index" | "downloads" | "mapping" | "registry" | "decompiled-source" | "mod-remap" | "binary-remap" | "nested-jar")[] | undefined;
|
|
109
|
-
selector?: {
|
|
110
|
-
version?: string | undefined;
|
|
111
|
-
projectPath?: string | undefined;
|
|
112
|
-
mapping?: string | undefined;
|
|
113
|
-
jarPath?: string | undefined;
|
|
114
|
-
entryId?: string | undefined;
|
|
115
|
-
artifactId?: string | undefined;
|
|
116
|
-
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
117
|
-
scope?: string | undefined;
|
|
118
|
-
olderThan?: string | undefined;
|
|
119
|
-
} | undefined;
|
|
120
|
-
}>;
|
|
106
|
+
executionMode: z.ZodDefault<z.ZodEnum<{
|
|
107
|
+
preview: "preview";
|
|
108
|
+
apply: "apply";
|
|
109
|
+
}>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
121
111
|
export type ManageCacheInput = z.infer<typeof manageCacheSchema>;
|
|
122
112
|
export declare class ManageCacheService {
|
|
123
113
|
private readonly deps;
|
|
@@ -21,14 +21,34 @@ export async function handleMixin(deps, input, detail, include) {
|
|
|
21
21
|
details: {
|
|
22
22
|
task: "mixin",
|
|
23
23
|
failedStage: "input-validation",
|
|
24
|
-
nextAction: "Pass version explicitly
|
|
24
|
+
nextAction: "Pass version explicitly: the Minecraft version this project targets. task=\"project-summary\" supports preferProjectVersion for auto-detection from gradle.properties, but direct task=\"mixin\" requires an explicit version. Call the suggested list-versions to see what is available, then replay the exampleCalls template with that version substituted.",
|
|
25
|
+
// No concrete version can be derived here -- the caller omitted it and this
|
|
26
|
+
// task does not auto-detect one. A `suggestedCall` is a payload the caller
|
|
27
|
+
// may replay verbatim, so filling the hole with a made-up version produced
|
|
28
|
+
// a call that RUNS and validates the mixin against the wrong Minecraft
|
|
29
|
+
// version, which is worse than no suggestion.
|
|
30
|
+
//
|
|
31
|
+
// So the two roles are split, following what the sibling "a version is
|
|
32
|
+
// required but none was resolved" site already does in
|
|
33
|
+
// src/source/class-source.ts: `suggestedCall` is a REAL next step that
|
|
34
|
+
// needs nothing the caller does not have (list-versions takes no
|
|
35
|
+
// arguments and answers exactly the question blocking them), while the
|
|
36
|
+
// task="mixin" retry shape travels as an `exampleCalls` template whose
|
|
37
|
+
// placeholder makes the substitution the caller must perform obvious.
|
|
38
|
+
...buildSuggestedCall({ tool: "list-versions", params: {} }),
|
|
25
39
|
...buildSuggestedCall({
|
|
26
40
|
tool: "validate-project",
|
|
27
|
-
params:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
41
|
+
params: undefined,
|
|
42
|
+
examples: [
|
|
43
|
+
{
|
|
44
|
+
params: {
|
|
45
|
+
task: "mixin",
|
|
46
|
+
subject: input.subject,
|
|
47
|
+
version: "<your-mc-version>"
|
|
48
|
+
},
|
|
49
|
+
reason: "Replace <your-mc-version> with the Minecraft version this project targets (gradle.properties, or task=\"project-summary\" with preferProjectVersion=true reports it)."
|
|
50
|
+
}
|
|
51
|
+
]
|
|
32
52
|
})
|
|
33
53
|
}
|
|
34
54
|
});
|
|
@@ -9,7 +9,7 @@ export declare function handleProjectSummary(deps: ValidateProjectDeps, input: V
|
|
|
9
9
|
warnings: string[];
|
|
10
10
|
tasks?: {
|
|
11
11
|
"workspace.detected": {
|
|
12
|
-
status: "
|
|
12
|
+
status: "ok" | "error" | "missing" | "skipped";
|
|
13
13
|
durationMs?: number;
|
|
14
14
|
error?: {
|
|
15
15
|
code: string;
|
|
@@ -20,7 +20,7 @@ export declare function handleProjectSummary(deps: ValidateProjectDeps, input: V
|
|
|
20
20
|
evidence?: string[];
|
|
21
21
|
};
|
|
22
22
|
"gradle.readable": {
|
|
23
|
-
status: "
|
|
23
|
+
status: "ok" | "error" | "missing" | "skipped";
|
|
24
24
|
durationMs?: number;
|
|
25
25
|
error?: {
|
|
26
26
|
code: string;
|
|
@@ -32,7 +32,7 @@ export declare function handleProjectSummary(deps: ValidateProjectDeps, input: V
|
|
|
32
32
|
buildScripts?: string[];
|
|
33
33
|
};
|
|
34
34
|
"loom.cache.found": {
|
|
35
|
-
status: "
|
|
35
|
+
status: "ok" | "error" | "missing" | "skipped";
|
|
36
36
|
durationMs?: number;
|
|
37
37
|
error?: {
|
|
38
38
|
code: string;
|
|
@@ -43,7 +43,7 @@ export declare function handleProjectSummary(deps: ValidateProjectDeps, input: V
|
|
|
43
43
|
cachePath?: string;
|
|
44
44
|
};
|
|
45
45
|
"minecraft.artifact.resolved": {
|
|
46
|
-
status: "
|
|
46
|
+
status: "ok" | "error" | "missing" | "skipped";
|
|
47
47
|
durationMs?: number;
|
|
48
48
|
error?: {
|
|
49
49
|
code: string;
|
|
@@ -55,7 +55,7 @@ export declare function handleProjectSummary(deps: ValidateProjectDeps, input: V
|
|
|
55
55
|
mapping?: import("../../../types.js").SourceMapping;
|
|
56
56
|
};
|
|
57
57
|
"mixins.validated": {
|
|
58
|
-
status: "
|
|
58
|
+
status: "ok" | "error" | "missing" | "skipped";
|
|
59
59
|
durationMs?: number;
|
|
60
60
|
error?: {
|
|
61
61
|
code: string;
|
|
@@ -70,7 +70,7 @@ export declare function handleProjectSummary(deps: ValidateProjectDeps, input: V
|
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
"accessWideners.validated": {
|
|
73
|
-
status: "
|
|
73
|
+
status: "ok" | "error" | "missing" | "skipped";
|
|
74
74
|
durationMs?: number;
|
|
75
75
|
error?: {
|
|
76
76
|
code: string;
|
|
@@ -84,7 +84,7 @@ export declare function handleProjectSummary(deps: ValidateProjectDeps, input: V
|
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
"accessTransformers.validated": {
|
|
87
|
-
status: "
|
|
87
|
+
status: "ok" | "error" | "missing" | "skipped";
|
|
88
88
|
durationMs?: number;
|
|
89
89
|
error?: {
|
|
90
90
|
code: string;
|