@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
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { type CacheRegistry } from "../cache-registry.js";
|
|
3
3
|
export declare const manageCacheShape: {
|
|
4
4
|
action: z.ZodEnum<["summary", "list", "inspect", "delete", "prune", "rebuild", "verify"]>;
|
|
5
|
-
cacheKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["artifact-index", "downloads", "mapping", "registry", "decompiled-source", "mod-remap", "binary-remap"]>, "many">>;
|
|
5
|
+
cacheKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["artifact-index", "downloads", "mapping", "registry", "decompiled-source", "mod-remap", "binary-remap", "workspace"]>, "many">>;
|
|
6
6
|
selector: z.ZodOptional<z.ZodObject<{
|
|
7
7
|
artifactId: z.ZodOptional<z.ZodString>;
|
|
8
8
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -14,23 +14,23 @@ export declare const manageCacheShape: {
|
|
|
14
14
|
scope: z.ZodOptional<z.ZodString>;
|
|
15
15
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
version?: string | undefined;
|
|
18
|
+
projectPath?: string | undefined;
|
|
17
19
|
mapping?: string | undefined;
|
|
18
20
|
jarPath?: string | undefined;
|
|
19
|
-
projectPath?: string | undefined;
|
|
20
21
|
entryId?: string | undefined;
|
|
21
22
|
artifactId?: string | undefined;
|
|
22
23
|
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
23
|
-
version?: string | undefined;
|
|
24
24
|
scope?: string | undefined;
|
|
25
25
|
olderThan?: string | undefined;
|
|
26
26
|
}, {
|
|
27
|
+
version?: string | undefined;
|
|
28
|
+
projectPath?: string | undefined;
|
|
27
29
|
mapping?: string | undefined;
|
|
28
30
|
jarPath?: string | undefined;
|
|
29
|
-
projectPath?: string | undefined;
|
|
30
31
|
entryId?: string | undefined;
|
|
31
32
|
artifactId?: string | undefined;
|
|
32
33
|
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
33
|
-
version?: string | undefined;
|
|
34
34
|
scope?: string | undefined;
|
|
35
35
|
olderThan?: string | undefined;
|
|
36
36
|
}>>;
|
|
@@ -42,7 +42,7 @@ export declare const manageCacheShape: {
|
|
|
42
42
|
};
|
|
43
43
|
export declare const manageCacheSchema: z.ZodObject<{
|
|
44
44
|
action: z.ZodEnum<["summary", "list", "inspect", "delete", "prune", "rebuild", "verify"]>;
|
|
45
|
-
cacheKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["artifact-index", "downloads", "mapping", "registry", "decompiled-source", "mod-remap", "binary-remap"]>, "many">>;
|
|
45
|
+
cacheKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["artifact-index", "downloads", "mapping", "registry", "decompiled-source", "mod-remap", "binary-remap", "workspace"]>, "many">>;
|
|
46
46
|
selector: z.ZodOptional<z.ZodObject<{
|
|
47
47
|
artifactId: z.ZodOptional<z.ZodString>;
|
|
48
48
|
version: z.ZodOptional<z.ZodString>;
|
|
@@ -54,23 +54,23 @@ export declare const manageCacheSchema: z.ZodObject<{
|
|
|
54
54
|
scope: z.ZodOptional<z.ZodString>;
|
|
55
55
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
version?: string | undefined;
|
|
58
|
+
projectPath?: string | undefined;
|
|
57
59
|
mapping?: string | undefined;
|
|
58
60
|
jarPath?: string | undefined;
|
|
59
|
-
projectPath?: string | undefined;
|
|
60
61
|
entryId?: string | undefined;
|
|
61
62
|
artifactId?: string | undefined;
|
|
62
63
|
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
63
|
-
version?: string | undefined;
|
|
64
64
|
scope?: string | undefined;
|
|
65
65
|
olderThan?: string | undefined;
|
|
66
66
|
}, {
|
|
67
|
+
version?: string | undefined;
|
|
68
|
+
projectPath?: string | undefined;
|
|
67
69
|
mapping?: string | undefined;
|
|
68
70
|
jarPath?: string | undefined;
|
|
69
|
-
projectPath?: string | undefined;
|
|
70
71
|
entryId?: string | undefined;
|
|
71
72
|
artifactId?: string | undefined;
|
|
72
73
|
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
73
|
-
version?: string | undefined;
|
|
74
74
|
scope?: string | undefined;
|
|
75
75
|
olderThan?: string | undefined;
|
|
76
76
|
}>>;
|
|
@@ -86,15 +86,15 @@ export declare const manageCacheSchema: z.ZodObject<{
|
|
|
86
86
|
cursor?: string | undefined;
|
|
87
87
|
detail?: "full" | "summary" | "standard" | undefined;
|
|
88
88
|
include?: string[] | undefined;
|
|
89
|
-
cacheKinds?: ("artifact-index" | "downloads" | "mapping" | "registry" | "decompiled-source" | "mod-remap" | "binary-remap")[] | undefined;
|
|
89
|
+
cacheKinds?: ("workspace" | "artifact-index" | "downloads" | "mapping" | "registry" | "decompiled-source" | "mod-remap" | "binary-remap")[] | undefined;
|
|
90
90
|
selector?: {
|
|
91
|
+
version?: string | undefined;
|
|
92
|
+
projectPath?: string | undefined;
|
|
91
93
|
mapping?: string | undefined;
|
|
92
94
|
jarPath?: string | undefined;
|
|
93
|
-
projectPath?: string | undefined;
|
|
94
95
|
entryId?: string | undefined;
|
|
95
96
|
artifactId?: string | undefined;
|
|
96
97
|
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
97
|
-
version?: string | undefined;
|
|
98
98
|
scope?: string | undefined;
|
|
99
99
|
olderThan?: string | undefined;
|
|
100
100
|
} | undefined;
|
|
@@ -105,15 +105,15 @@ export declare const manageCacheSchema: z.ZodObject<{
|
|
|
105
105
|
detail?: "full" | "summary" | "standard" | undefined;
|
|
106
106
|
include?: string[] | undefined;
|
|
107
107
|
executionMode?: "preview" | "apply" | undefined;
|
|
108
|
-
cacheKinds?: ("artifact-index" | "downloads" | "mapping" | "registry" | "decompiled-source" | "mod-remap" | "binary-remap")[] | undefined;
|
|
108
|
+
cacheKinds?: ("workspace" | "artifact-index" | "downloads" | "mapping" | "registry" | "decompiled-source" | "mod-remap" | "binary-remap")[] | undefined;
|
|
109
109
|
selector?: {
|
|
110
|
+
version?: string | undefined;
|
|
111
|
+
projectPath?: string | undefined;
|
|
110
112
|
mapping?: string | undefined;
|
|
111
113
|
jarPath?: string | undefined;
|
|
112
|
-
projectPath?: string | undefined;
|
|
113
114
|
entryId?: string | undefined;
|
|
114
115
|
artifactId?: string | undefined;
|
|
115
116
|
status?: "healthy" | "partial" | "stale" | "orphaned" | "corrupt" | "in_use" | undefined;
|
|
116
|
-
version?: string | undefined;
|
|
117
117
|
scope?: string | undefined;
|
|
118
118
|
olderThan?: string | undefined;
|
|
119
119
|
} | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type DetailLevel } from "../../response-contract.js";
|
|
2
|
+
import type { ValidateProjectInput } from "../../validate-project-service.js";
|
|
3
|
+
import { type ValidateProjectDeps } from "../internal.js";
|
|
4
|
+
export declare function handleAccessTransformer(deps: ValidateProjectDeps, input: ValidateProjectInput, detail: DetailLevel, include: string[]): Promise<{
|
|
5
|
+
warnings: string[];
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { buildEntryToolResult, createSummarySubject } from "../../response-contract.js";
|
|
3
|
+
import { ERROR_CODES, createError } from "../../../errors.js";
|
|
4
|
+
import { buildSuggestedCall } from "../../../build-suggested-call.js";
|
|
5
|
+
export async function handleAccessTransformer(deps, input, detail, include) {
|
|
6
|
+
if (input.subject.kind !== "access-transformer") {
|
|
7
|
+
throw createError({
|
|
8
|
+
code: ERROR_CODES.INVALID_INPUT,
|
|
9
|
+
message: "task=access-transformer requires subject.kind=access-transformer.",
|
|
10
|
+
details: {
|
|
11
|
+
task: input.task,
|
|
12
|
+
subjectKind: input.subject.kind,
|
|
13
|
+
failedStage: "input-validation",
|
|
14
|
+
nextAction: "Set subject.kind to \"access-transformer\" for task=\"access-transformer\"."
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
if (!input.version) {
|
|
19
|
+
throw createError({
|
|
20
|
+
code: ERROR_CODES.INVALID_INPUT,
|
|
21
|
+
message: "task=access-transformer requires version.",
|
|
22
|
+
details: {
|
|
23
|
+
task: "access-transformer",
|
|
24
|
+
failedStage: "input-validation",
|
|
25
|
+
nextAction: "Pass version explicitly (e.g. \"1.21.10\"). Access Transformer validation resolves class names against a specific Minecraft version.",
|
|
26
|
+
...buildSuggestedCall({
|
|
27
|
+
tool: "validate-project",
|
|
28
|
+
params: {
|
|
29
|
+
task: "access-transformer",
|
|
30
|
+
subject: input.subject,
|
|
31
|
+
version: "1.21.10"
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const content = input.subject.input.mode === "inline"
|
|
38
|
+
? input.subject.input.content
|
|
39
|
+
: await readFile(input.subject.input.path, "utf8");
|
|
40
|
+
if (!deps.validateAccessTransformer) {
|
|
41
|
+
throw createError({
|
|
42
|
+
code: ERROR_CODES.CONTEXT_UNRESOLVED,
|
|
43
|
+
message: "Access Transformer validation is not configured.",
|
|
44
|
+
details: {
|
|
45
|
+
task: "access-transformer",
|
|
46
|
+
failedStage: "dependency-resolution",
|
|
47
|
+
nextAction: "The current runtime was built without an Access Transformer validator. Rebuild the MCP server with validateAccessTransformer configured, or use task=\"access-widener\" if the workspace uses Fabric AccessWideners."
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
const output = await deps.validateAccessTransformer({
|
|
52
|
+
content,
|
|
53
|
+
version: input.version,
|
|
54
|
+
atNamespace: input.atNamespace,
|
|
55
|
+
sourcePriority: input.sourcePriority,
|
|
56
|
+
scope: input.scope,
|
|
57
|
+
preferProjectVersion: input.preferProjectVersion
|
|
58
|
+
});
|
|
59
|
+
const issueEntries = Array.isArray(output.entries)
|
|
60
|
+
? output.entries.filter((entry) => {
|
|
61
|
+
if (!entry || typeof entry !== "object" || !("valid" in entry)) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
return entry.valid !== true;
|
|
65
|
+
})
|
|
66
|
+
: undefined;
|
|
67
|
+
return {
|
|
68
|
+
...buildEntryToolResult({
|
|
69
|
+
task: "access-transformer",
|
|
70
|
+
detail,
|
|
71
|
+
include,
|
|
72
|
+
summary: {
|
|
73
|
+
status: output.valid ? "ok" : "invalid",
|
|
74
|
+
headline: output.valid
|
|
75
|
+
? "Access Transformer is valid."
|
|
76
|
+
: "Access Transformer contains validation issues.",
|
|
77
|
+
subject: createSummarySubject({
|
|
78
|
+
task: "access-transformer",
|
|
79
|
+
kind: input.subject.kind,
|
|
80
|
+
input: input.subject.input,
|
|
81
|
+
version: input.version,
|
|
82
|
+
sourcePriority: input.sourcePriority,
|
|
83
|
+
scope: input.scope,
|
|
84
|
+
atNamespace: input.atNamespace
|
|
85
|
+
}),
|
|
86
|
+
counts: {
|
|
87
|
+
valid: output.valid ? 1 : 0,
|
|
88
|
+
invalid: output.valid ? 0 : 1
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
blocks: {
|
|
92
|
+
project: {
|
|
93
|
+
summary: {
|
|
94
|
+
total: 1,
|
|
95
|
+
valid: output.valid ? 1 : 0,
|
|
96
|
+
invalid: output.valid ? 0 : 1
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
issues: include.includes("issues") || detail !== "summary" ? issueEntries : undefined
|
|
100
|
+
},
|
|
101
|
+
alwaysBlocks: ["project"]
|
|
102
|
+
}),
|
|
103
|
+
warnings: Array.isArray(output.warnings) ? output.warnings : []
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=access-transformer.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type DetailLevel } from "../../response-contract.js";
|
|
2
|
+
import type { ValidateProjectInput } from "../../validate-project-service.js";
|
|
3
|
+
import { type ValidateProjectDeps } from "../internal.js";
|
|
4
|
+
export declare function handleAccessWidener(deps: ValidateProjectDeps, input: ValidateProjectInput, detail: DetailLevel, include: string[]): Promise<{
|
|
5
|
+
warnings: string[];
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { buildEntryToolResult, createSummarySubject } from "../../response-contract.js";
|
|
3
|
+
import { ERROR_CODES, createError } from "../../../errors.js";
|
|
4
|
+
import { buildSuggestedCall } from "../../../build-suggested-call.js";
|
|
5
|
+
export async function handleAccessWidener(deps, input, detail, include) {
|
|
6
|
+
if (input.subject.kind !== "access-widener") {
|
|
7
|
+
throw createError({
|
|
8
|
+
code: ERROR_CODES.INVALID_INPUT,
|
|
9
|
+
message: "task=access-widener requires subject.kind=access-widener.",
|
|
10
|
+
details: {
|
|
11
|
+
task: input.task,
|
|
12
|
+
subjectKind: input.subject.kind,
|
|
13
|
+
failedStage: "input-validation",
|
|
14
|
+
nextAction: "Set subject.kind to \"access-widener\" for task=\"access-widener\"."
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
if (!input.version) {
|
|
19
|
+
throw createError({
|
|
20
|
+
code: ERROR_CODES.INVALID_INPUT,
|
|
21
|
+
message: "task=access-widener requires version.",
|
|
22
|
+
details: {
|
|
23
|
+
task: "access-widener",
|
|
24
|
+
failedStage: "input-validation",
|
|
25
|
+
nextAction: "Pass version explicitly (e.g. \"1.21.10\"). Access Widener validation resolves class names against a specific Minecraft version.",
|
|
26
|
+
...buildSuggestedCall({
|
|
27
|
+
tool: "validate-project",
|
|
28
|
+
params: {
|
|
29
|
+
task: "access-widener",
|
|
30
|
+
subject: input.subject,
|
|
31
|
+
version: "1.21.10"
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const content = input.subject.input.mode === "inline"
|
|
38
|
+
? input.subject.input.content
|
|
39
|
+
: await readFile(input.subject.input.path, "utf8");
|
|
40
|
+
const output = await deps.validateAccessWidener({
|
|
41
|
+
content,
|
|
42
|
+
version: input.version,
|
|
43
|
+
mapping: input.mapping,
|
|
44
|
+
sourcePriority: input.sourcePriority,
|
|
45
|
+
scope: input.scope,
|
|
46
|
+
preferProjectVersion: input.preferProjectVersion
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
...buildEntryToolResult({
|
|
50
|
+
task: "access-widener",
|
|
51
|
+
detail,
|
|
52
|
+
include,
|
|
53
|
+
summary: {
|
|
54
|
+
status: output.valid ? "ok" : "invalid",
|
|
55
|
+
headline: output.valid
|
|
56
|
+
? "Access Widener is valid."
|
|
57
|
+
: "Access Widener contains validation issues.",
|
|
58
|
+
subject: createSummarySubject({
|
|
59
|
+
task: "access-widener",
|
|
60
|
+
kind: input.subject.kind,
|
|
61
|
+
input: input.subject.input,
|
|
62
|
+
version: input.version,
|
|
63
|
+
mapping: input.mapping,
|
|
64
|
+
sourcePriority: input.sourcePriority
|
|
65
|
+
}),
|
|
66
|
+
counts: {
|
|
67
|
+
valid: output.valid ? 1 : 0,
|
|
68
|
+
invalid: output.valid ? 0 : 1
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
blocks: {
|
|
72
|
+
project: {
|
|
73
|
+
summary: {
|
|
74
|
+
total: 1,
|
|
75
|
+
valid: output.valid ? 1 : 0,
|
|
76
|
+
invalid: output.valid ? 0 : 1
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
issues: include.includes("issues") || detail !== "summary" ? output.issues : undefined
|
|
80
|
+
},
|
|
81
|
+
alwaysBlocks: ["project"]
|
|
82
|
+
}),
|
|
83
|
+
warnings: Array.isArray(output.warnings) ? output.warnings : []
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=access-widener.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type DetailLevel } from "../../response-contract.js";
|
|
2
|
+
import type { ValidateProjectInput } from "../../validate-project-service.js";
|
|
3
|
+
import { type ValidateProjectDeps } from "../internal.js";
|
|
4
|
+
export declare function handleMixin(deps: ValidateProjectDeps, input: ValidateProjectInput, detail: DetailLevel, include: string[]): Promise<{
|
|
5
|
+
warnings: string[];
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { buildEntryToolResult, createSummarySubject } from "../../response-contract.js";
|
|
2
|
+
import { ERROR_CODES, createError } from "../../../errors.js";
|
|
3
|
+
import { buildSuggestedCall } from "../../../build-suggested-call.js";
|
|
4
|
+
export async function handleMixin(deps, input, detail, include) {
|
|
5
|
+
if (input.subject.kind !== "mixin") {
|
|
6
|
+
throw createError({
|
|
7
|
+
code: ERROR_CODES.INVALID_INPUT,
|
|
8
|
+
message: "task=mixin requires subject.kind=mixin.",
|
|
9
|
+
details: {
|
|
10
|
+
task: input.task,
|
|
11
|
+
subjectKind: input.subject.kind,
|
|
12
|
+
failedStage: "input-validation",
|
|
13
|
+
nextAction: "Set subject.kind to \"mixin\" for task=\"mixin\"."
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
if (!input.version) {
|
|
18
|
+
throw createError({
|
|
19
|
+
code: ERROR_CODES.INVALID_INPUT,
|
|
20
|
+
message: "task=mixin requires version.",
|
|
21
|
+
details: {
|
|
22
|
+
task: "mixin",
|
|
23
|
+
failedStage: "input-validation",
|
|
24
|
+
nextAction: "Pass version explicitly (e.g. \"1.21.10\"). task=\"project-summary\" supports preferProjectVersion for auto-detection from gradle.properties, but direct task=\"mixin\" requires an explicit version.",
|
|
25
|
+
...buildSuggestedCall({
|
|
26
|
+
tool: "validate-project",
|
|
27
|
+
params: {
|
|
28
|
+
task: "mixin",
|
|
29
|
+
subject: input.subject,
|
|
30
|
+
version: "1.21.10"
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const output = await deps.validateMixin({
|
|
37
|
+
input: input.subject.input,
|
|
38
|
+
version: input.version,
|
|
39
|
+
mapping: input.mapping,
|
|
40
|
+
sourcePriority: input.sourcePriority,
|
|
41
|
+
scope: input.scope,
|
|
42
|
+
preferProjectVersion: input.preferProjectVersion,
|
|
43
|
+
preferProjectMapping: input.preferProjectMapping,
|
|
44
|
+
sourceRoots: input.sourceRoots,
|
|
45
|
+
minSeverity: input.minSeverity,
|
|
46
|
+
hideUncertain: input.hideUncertain,
|
|
47
|
+
explain: input.explain,
|
|
48
|
+
warningMode: input.warningMode,
|
|
49
|
+
warningCategoryFilter: input.warningCategoryFilter,
|
|
50
|
+
treatInfoAsWarning: input.treatInfoAsWarning,
|
|
51
|
+
includeIssues: input.includeIssues
|
|
52
|
+
});
|
|
53
|
+
const summary = output.summary;
|
|
54
|
+
const invalidCount = summary?.invalid ?? 0;
|
|
55
|
+
const partialCount = summary?.partial ?? 0;
|
|
56
|
+
return {
|
|
57
|
+
...buildEntryToolResult({
|
|
58
|
+
task: "mixin",
|
|
59
|
+
detail,
|
|
60
|
+
include,
|
|
61
|
+
summary: {
|
|
62
|
+
status: invalidCount > 0 ? "invalid" : partialCount > 0 ? "partial" : "ok",
|
|
63
|
+
headline: `Validated ${summary?.total ?? 0} mixin input(s).`,
|
|
64
|
+
subject: createSummarySubject({
|
|
65
|
+
task: "mixin",
|
|
66
|
+
kind: input.subject.kind,
|
|
67
|
+
input: input.subject.input,
|
|
68
|
+
version: input.version,
|
|
69
|
+
mapping: input.mapping,
|
|
70
|
+
sourcePriority: input.sourcePriority,
|
|
71
|
+
scope: input.scope
|
|
72
|
+
}),
|
|
73
|
+
counts: {
|
|
74
|
+
valid: summary?.valid ?? 0,
|
|
75
|
+
partial: partialCount,
|
|
76
|
+
invalid: invalidCount
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
blocks: {
|
|
80
|
+
project: {
|
|
81
|
+
summary
|
|
82
|
+
},
|
|
83
|
+
issues: include.includes("issues") || detail !== "summary" ? output.results : undefined
|
|
84
|
+
},
|
|
85
|
+
alwaysBlocks: ["project"]
|
|
86
|
+
}),
|
|
87
|
+
warnings: Array.isArray(output.warnings) ? output.warnings : []
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=mixin.js.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { type DetailLevel } from "../../response-contract.js";
|
|
2
|
+
import type { StageEmitter } from "../../../stage-emitter.js";
|
|
3
|
+
import type { ValidateProjectInput } from "../../validate-project-service.js";
|
|
4
|
+
import { type ValidateProjectDeps } from "../internal.js";
|
|
5
|
+
type ProjectSummaryOptions = {
|
|
6
|
+
stageEmitter?: StageEmitter;
|
|
7
|
+
};
|
|
8
|
+
export declare function handleProjectSummary(deps: ValidateProjectDeps, input: ValidateProjectInput, detail: DetailLevel, include: string[], options?: ProjectSummaryOptions): Promise<{
|
|
9
|
+
warnings: string[];
|
|
10
|
+
tasks?: {
|
|
11
|
+
"workspace.detected": {
|
|
12
|
+
status: "error" | "ok" | "skipped" | "missing";
|
|
13
|
+
durationMs?: number;
|
|
14
|
+
error?: {
|
|
15
|
+
code: string;
|
|
16
|
+
detail: string;
|
|
17
|
+
};
|
|
18
|
+
warnings?: string[];
|
|
19
|
+
} & {
|
|
20
|
+
evidence?: string[];
|
|
21
|
+
};
|
|
22
|
+
"gradle.readable": {
|
|
23
|
+
status: "error" | "ok" | "skipped" | "missing";
|
|
24
|
+
durationMs?: number;
|
|
25
|
+
error?: {
|
|
26
|
+
code: string;
|
|
27
|
+
detail: string;
|
|
28
|
+
};
|
|
29
|
+
warnings?: string[];
|
|
30
|
+
} & {
|
|
31
|
+
propertiesPath?: string;
|
|
32
|
+
buildScripts?: string[];
|
|
33
|
+
};
|
|
34
|
+
"loom.cache.found": {
|
|
35
|
+
status: "error" | "ok" | "skipped" | "missing";
|
|
36
|
+
durationMs?: number;
|
|
37
|
+
error?: {
|
|
38
|
+
code: string;
|
|
39
|
+
detail: string;
|
|
40
|
+
};
|
|
41
|
+
warnings?: string[];
|
|
42
|
+
} & {
|
|
43
|
+
cachePath?: string;
|
|
44
|
+
};
|
|
45
|
+
"minecraft.artifact.resolved": {
|
|
46
|
+
status: "error" | "ok" | "skipped" | "missing";
|
|
47
|
+
durationMs?: number;
|
|
48
|
+
error?: {
|
|
49
|
+
code: string;
|
|
50
|
+
detail: string;
|
|
51
|
+
};
|
|
52
|
+
warnings?: string[];
|
|
53
|
+
} & {
|
|
54
|
+
artifactId?: string;
|
|
55
|
+
mapping?: import("../../../types.js").SourceMapping;
|
|
56
|
+
};
|
|
57
|
+
"mixins.validated": {
|
|
58
|
+
status: "error" | "ok" | "skipped" | "missing";
|
|
59
|
+
durationMs?: number;
|
|
60
|
+
error?: {
|
|
61
|
+
code: string;
|
|
62
|
+
detail: string;
|
|
63
|
+
};
|
|
64
|
+
warnings?: string[];
|
|
65
|
+
} & {
|
|
66
|
+
counts?: {
|
|
67
|
+
ok: number;
|
|
68
|
+
partial: number;
|
|
69
|
+
invalid: number;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
"accessWideners.validated": {
|
|
73
|
+
status: "error" | "ok" | "skipped" | "missing";
|
|
74
|
+
durationMs?: number;
|
|
75
|
+
error?: {
|
|
76
|
+
code: string;
|
|
77
|
+
detail: string;
|
|
78
|
+
};
|
|
79
|
+
warnings?: string[];
|
|
80
|
+
} & {
|
|
81
|
+
counts?: {
|
|
82
|
+
ok: number;
|
|
83
|
+
invalid: number;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
"accessTransformers.validated": {
|
|
87
|
+
status: "error" | "ok" | "skipped" | "missing";
|
|
88
|
+
durationMs?: number;
|
|
89
|
+
error?: {
|
|
90
|
+
code: string;
|
|
91
|
+
detail: string;
|
|
92
|
+
};
|
|
93
|
+
warnings?: string[];
|
|
94
|
+
} & {
|
|
95
|
+
counts?: {
|
|
96
|
+
ok: number;
|
|
97
|
+
invalid: number;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
} | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
export {};
|