@adhisang/minecraft-modding-mcp 2.1.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.
@@ -0,0 +1,207 @@
1
+ import type { AnalyzeModOptions, ModAnalysisResult } from "../mod-analyzer.js";
2
+ import { z } from "zod";
3
+ export declare const analyzeModShape: {
4
+ task: z.ZodEnum<["summary", "decompile", "search", "class-source", "remap"]>;
5
+ subject: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
6
+ kind: z.ZodLiteral<"jar">;
7
+ jarPath: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ kind: "jar";
10
+ jarPath: string;
11
+ }, {
12
+ kind: "jar";
13
+ jarPath: string;
14
+ }>, z.ZodObject<{
15
+ kind: z.ZodLiteral<"class">;
16
+ jarPath: z.ZodString;
17
+ className: z.ZodString;
18
+ }, "strip", z.ZodTypeAny, {
19
+ kind: "class";
20
+ jarPath: string;
21
+ className: string;
22
+ }, {
23
+ kind: "class";
24
+ jarPath: string;
25
+ className: string;
26
+ }>]>;
27
+ query: z.ZodOptional<z.ZodString>;
28
+ searchType: z.ZodOptional<z.ZodEnum<["class", "method", "field", "content", "all"]>>;
29
+ limit: z.ZodOptional<z.ZodNumber>;
30
+ includeFiles: z.ZodOptional<z.ZodBoolean>;
31
+ maxFiles: z.ZodOptional<z.ZodNumber>;
32
+ maxLines: z.ZodOptional<z.ZodNumber>;
33
+ maxChars: z.ZodOptional<z.ZodNumber>;
34
+ targetMapping: z.ZodOptional<z.ZodEnum<["yarn", "mojang"]>>;
35
+ outputJar: z.ZodOptional<z.ZodString>;
36
+ executionMode: z.ZodOptional<z.ZodEnum<["preview", "apply"]>>;
37
+ detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
38
+ include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
39
+ };
40
+ export declare const analyzeModSchema: z.ZodEffects<z.ZodObject<{
41
+ task: z.ZodEnum<["summary", "decompile", "search", "class-source", "remap"]>;
42
+ subject: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
43
+ kind: z.ZodLiteral<"jar">;
44
+ jarPath: z.ZodString;
45
+ }, "strip", z.ZodTypeAny, {
46
+ kind: "jar";
47
+ jarPath: string;
48
+ }, {
49
+ kind: "jar";
50
+ jarPath: string;
51
+ }>, z.ZodObject<{
52
+ kind: z.ZodLiteral<"class">;
53
+ jarPath: z.ZodString;
54
+ className: z.ZodString;
55
+ }, "strip", z.ZodTypeAny, {
56
+ kind: "class";
57
+ jarPath: string;
58
+ className: string;
59
+ }, {
60
+ kind: "class";
61
+ jarPath: string;
62
+ className: string;
63
+ }>]>;
64
+ query: z.ZodOptional<z.ZodString>;
65
+ searchType: z.ZodOptional<z.ZodEnum<["class", "method", "field", "content", "all"]>>;
66
+ limit: z.ZodOptional<z.ZodNumber>;
67
+ includeFiles: z.ZodOptional<z.ZodBoolean>;
68
+ maxFiles: z.ZodOptional<z.ZodNumber>;
69
+ maxLines: z.ZodOptional<z.ZodNumber>;
70
+ maxChars: z.ZodOptional<z.ZodNumber>;
71
+ targetMapping: z.ZodOptional<z.ZodEnum<["yarn", "mojang"]>>;
72
+ outputJar: z.ZodOptional<z.ZodString>;
73
+ executionMode: z.ZodOptional<z.ZodEnum<["preview", "apply"]>>;
74
+ detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
75
+ include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ task: "search" | "remap" | "summary" | "class-source" | "decompile";
78
+ subject: {
79
+ kind: "jar";
80
+ jarPath: string;
81
+ } | {
82
+ kind: "class";
83
+ jarPath: string;
84
+ className: string;
85
+ };
86
+ limit?: number | undefined;
87
+ maxLines?: number | undefined;
88
+ maxChars?: number | undefined;
89
+ targetMapping?: "mojang" | "yarn" | undefined;
90
+ outputJar?: string | undefined;
91
+ query?: string | undefined;
92
+ searchType?: "class" | "method" | "field" | "all" | "content" | undefined;
93
+ detail?: "full" | "summary" | "standard" | undefined;
94
+ include?: string[] | undefined;
95
+ includeFiles?: boolean | undefined;
96
+ maxFiles?: number | undefined;
97
+ executionMode?: "preview" | "apply" | undefined;
98
+ }, {
99
+ task: "search" | "remap" | "summary" | "class-source" | "decompile";
100
+ subject: {
101
+ kind: "jar";
102
+ jarPath: string;
103
+ } | {
104
+ kind: "class";
105
+ jarPath: string;
106
+ className: string;
107
+ };
108
+ limit?: number | undefined;
109
+ maxLines?: number | undefined;
110
+ maxChars?: number | undefined;
111
+ targetMapping?: "mojang" | "yarn" | undefined;
112
+ outputJar?: string | undefined;
113
+ query?: string | undefined;
114
+ searchType?: "class" | "method" | "field" | "all" | "content" | undefined;
115
+ detail?: "full" | "summary" | "standard" | undefined;
116
+ include?: string[] | undefined;
117
+ includeFiles?: boolean | undefined;
118
+ maxFiles?: number | undefined;
119
+ executionMode?: "preview" | "apply" | undefined;
120
+ }>, {
121
+ task: "search" | "remap" | "summary" | "class-source" | "decompile";
122
+ subject: {
123
+ kind: "jar";
124
+ jarPath: string;
125
+ } | {
126
+ kind: "class";
127
+ jarPath: string;
128
+ className: string;
129
+ };
130
+ limit?: number | undefined;
131
+ maxLines?: number | undefined;
132
+ maxChars?: number | undefined;
133
+ targetMapping?: "mojang" | "yarn" | undefined;
134
+ outputJar?: string | undefined;
135
+ query?: string | undefined;
136
+ searchType?: "class" | "method" | "field" | "all" | "content" | undefined;
137
+ detail?: "full" | "summary" | "standard" | undefined;
138
+ include?: string[] | undefined;
139
+ includeFiles?: boolean | undefined;
140
+ maxFiles?: number | undefined;
141
+ executionMode?: "preview" | "apply" | undefined;
142
+ }, {
143
+ task: "search" | "remap" | "summary" | "class-source" | "decompile";
144
+ subject: {
145
+ kind: "jar";
146
+ jarPath: string;
147
+ } | {
148
+ kind: "class";
149
+ jarPath: string;
150
+ className: string;
151
+ };
152
+ limit?: number | undefined;
153
+ maxLines?: number | undefined;
154
+ maxChars?: number | undefined;
155
+ targetMapping?: "mojang" | "yarn" | undefined;
156
+ outputJar?: string | undefined;
157
+ query?: string | undefined;
158
+ searchType?: "class" | "method" | "field" | "all" | "content" | undefined;
159
+ detail?: "full" | "summary" | "standard" | undefined;
160
+ include?: string[] | undefined;
161
+ includeFiles?: boolean | undefined;
162
+ maxFiles?: number | undefined;
163
+ executionMode?: "preview" | "apply" | undefined;
164
+ }>;
165
+ export type AnalyzeModInput = z.infer<typeof analyzeModSchema>;
166
+ type AnalyzeModDeps = {
167
+ analyzeModJar: (jarPath: string, options?: AnalyzeModOptions) => Promise<ModAnalysisResult>;
168
+ decompileModJar: (input: {
169
+ jarPath: string;
170
+ includeFiles?: boolean;
171
+ maxFiles?: number;
172
+ }) => Promise<Record<string, unknown> & {
173
+ warnings?: string[];
174
+ }>;
175
+ getModClassSource: (input: {
176
+ jarPath: string;
177
+ className: string;
178
+ maxLines?: number;
179
+ maxChars?: number;
180
+ }) => Promise<Record<string, unknown> & {
181
+ warnings?: string[];
182
+ }>;
183
+ searchModSource: (input: {
184
+ jarPath: string;
185
+ query: string;
186
+ searchType?: "class" | "method" | "field" | "content" | "all";
187
+ limit?: number;
188
+ }) => Promise<Record<string, unknown> & {
189
+ warnings?: string[];
190
+ }>;
191
+ remapModJar: (input: {
192
+ inputJar: string;
193
+ outputJar?: string;
194
+ mcVersion?: string;
195
+ targetMapping: "yarn" | "mojang";
196
+ }) => Promise<Record<string, unknown> & {
197
+ warnings?: string[];
198
+ }>;
199
+ };
200
+ export declare class AnalyzeModService {
201
+ private readonly deps;
202
+ constructor(deps: AnalyzeModDeps);
203
+ execute(input: AnalyzeModInput): Promise<Record<string, unknown> & {
204
+ warnings?: string[];
205
+ }>;
206
+ }
207
+ export {};
@@ -0,0 +1,253 @@
1
+ import { existsSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ import { normalizePathForHost } from "../path-converter.js";
4
+ import { createError, ERROR_CODES } from "../errors.js";
5
+ import { z } from "zod";
6
+ import { buildIncludeSchema, detailSchema, executionModeSchema, positiveIntSchema } from "./entry-tool-schema.js";
7
+ import { buildEntryToolResult } from "./response-contract.js";
8
+ import { resolveDetail, resolveInclude } from "./request-normalizers.js";
9
+ const nonEmptyString = z.string().trim().min(1);
10
+ const INCLUDE_GROUPS = ["warnings", "files", "source", "samples", "timings"];
11
+ const subjectSchema = z.discriminatedUnion("kind", [
12
+ z.object({
13
+ kind: z.literal("jar"),
14
+ jarPath: nonEmptyString
15
+ }),
16
+ z.object({
17
+ kind: z.literal("class"),
18
+ jarPath: nonEmptyString,
19
+ className: nonEmptyString
20
+ })
21
+ ]);
22
+ export const analyzeModShape = {
23
+ task: z.enum(["summary", "decompile", "search", "class-source", "remap"]),
24
+ subject: subjectSchema,
25
+ query: nonEmptyString.optional(),
26
+ searchType: z.enum(["class", "method", "field", "content", "all"]).optional(),
27
+ limit: positiveIntSchema.optional(),
28
+ includeFiles: z.boolean().optional(),
29
+ maxFiles: positiveIntSchema.optional(),
30
+ maxLines: positiveIntSchema.optional(),
31
+ maxChars: positiveIntSchema.optional(),
32
+ targetMapping: z.enum(["yarn", "mojang"]).optional(),
33
+ outputJar: nonEmptyString.optional(),
34
+ executionMode: executionModeSchema.optional(),
35
+ detail: detailSchema.optional(),
36
+ include: buildIncludeSchema(INCLUDE_GROUPS)
37
+ };
38
+ export const analyzeModSchema = z.object(analyzeModShape).superRefine((value, ctx) => {
39
+ if ((value.task === "summary" || value.task === "decompile" || value.task === "search" || value.task === "remap") && value.subject.kind !== "jar") {
40
+ ctx.addIssue({
41
+ code: z.ZodIssueCode.custom,
42
+ path: ["subject", "kind"],
43
+ message: `${value.task} requires subject.kind=jar.`
44
+ });
45
+ }
46
+ if (value.task === "class-source" && value.subject.kind !== "class") {
47
+ ctx.addIssue({
48
+ code: z.ZodIssueCode.custom,
49
+ path: ["subject", "kind"],
50
+ message: "class-source requires subject.kind=class."
51
+ });
52
+ }
53
+ if (value.task === "search" && !value.query) {
54
+ ctx.addIssue({
55
+ code: z.ZodIssueCode.custom,
56
+ path: ["query"],
57
+ message: "search requires query."
58
+ });
59
+ }
60
+ if (value.task === "remap" && !value.targetMapping) {
61
+ ctx.addIssue({
62
+ code: z.ZodIssueCode.custom,
63
+ path: ["targetMapping"],
64
+ message: "remap requires targetMapping."
65
+ });
66
+ }
67
+ });
68
+ function deriveOutputJar(inputJar, analysis, targetMapping) {
69
+ return join(dirname(inputJar), `${analysis.modId ?? "mod"}-${analysis.modVersion ?? "0"}-${targetMapping}.jar`);
70
+ }
71
+ export class AnalyzeModService {
72
+ deps;
73
+ constructor(deps) {
74
+ this.deps = deps;
75
+ }
76
+ async execute(input) {
77
+ const detail = resolveDetail(input.detail);
78
+ const include = resolveInclude(input.include);
79
+ switch (input.task) {
80
+ case "summary": {
81
+ const analysis = await this.deps.analyzeModJar(input.subject.jarPath, {
82
+ includeClasses: detail !== "summary" || include.includes("files")
83
+ });
84
+ return {
85
+ ...buildEntryToolResult({
86
+ task: "summary",
87
+ detail,
88
+ include,
89
+ summary: {
90
+ status: "ok",
91
+ headline: `Summarized ${analysis.loader} mod metadata.`,
92
+ counts: {
93
+ classes: analysis.classCount,
94
+ dependencies: analysis.dependencies?.length ?? 0
95
+ }
96
+ },
97
+ blocks: {
98
+ metadata: analysis
99
+ }
100
+ }),
101
+ warnings: []
102
+ };
103
+ }
104
+ case "decompile": {
105
+ const output = await this.deps.decompileModJar({
106
+ jarPath: input.subject.jarPath,
107
+ includeFiles: input.includeFiles,
108
+ maxFiles: input.maxFiles
109
+ });
110
+ return {
111
+ ...buildEntryToolResult({
112
+ task: "decompile",
113
+ detail,
114
+ include,
115
+ summary: {
116
+ status: "ok",
117
+ headline: `Decompiled ${input.subject.jarPath}.`
118
+ },
119
+ blocks: {
120
+ decompile: output
121
+ }
122
+ }),
123
+ warnings: Array.isArray(output.warnings) ? output.warnings : []
124
+ };
125
+ }
126
+ case "search": {
127
+ const output = await this.deps.searchModSource({
128
+ jarPath: input.subject.jarPath,
129
+ query: input.query,
130
+ searchType: input.searchType,
131
+ limit: input.limit
132
+ });
133
+ return {
134
+ ...buildEntryToolResult({
135
+ task: "search",
136
+ detail,
137
+ include,
138
+ summary: {
139
+ status: "ok",
140
+ headline: `Searched ${input.subject.jarPath} for ${input.query}.`
141
+ },
142
+ blocks: {
143
+ hits: output
144
+ }
145
+ }),
146
+ warnings: Array.isArray(output.warnings) ? output.warnings : []
147
+ };
148
+ }
149
+ case "class-source": {
150
+ if (input.subject.kind !== "class") {
151
+ throw createError({
152
+ code: ERROR_CODES.INVALID_INPUT,
153
+ message: "class-source requires subject.kind=class."
154
+ });
155
+ }
156
+ const output = await this.deps.getModClassSource({
157
+ jarPath: input.subject.jarPath,
158
+ className: input.subject.className,
159
+ maxLines: input.maxLines,
160
+ maxChars: input.maxChars
161
+ });
162
+ return {
163
+ ...buildEntryToolResult({
164
+ task: "class-source",
165
+ detail,
166
+ include,
167
+ summary: {
168
+ status: "ok",
169
+ headline: `Loaded class source for ${input.subject.className}.`
170
+ },
171
+ blocks: {
172
+ source: output
173
+ }
174
+ }),
175
+ warnings: Array.isArray(output.warnings) ? output.warnings : []
176
+ };
177
+ }
178
+ case "remap": {
179
+ const normalizedInputJar = normalizePathForHost(input.subject.jarPath, undefined, "jarPath");
180
+ const analysis = await this.deps.analyzeModJar(normalizedInputJar);
181
+ const outputJar = input.outputJar
182
+ ? normalizePathForHost(input.outputJar, undefined, "outputJar")
183
+ : deriveOutputJar(normalizedInputJar, analysis, input.targetMapping);
184
+ if (outputJar === normalizedInputJar) {
185
+ throw createError({
186
+ code: ERROR_CODES.INVALID_INPUT,
187
+ message: "outputJar must differ from the input jar."
188
+ });
189
+ }
190
+ if ((input.executionMode ?? "preview") === "apply" && existsSync(outputJar)) {
191
+ throw createError({
192
+ code: ERROR_CODES.INVALID_INPUT,
193
+ message: "outputJar already exists. Choose a new destination."
194
+ });
195
+ }
196
+ if ((input.executionMode ?? "preview") === "preview") {
197
+ return {
198
+ ...buildEntryToolResult({
199
+ task: "remap",
200
+ detail,
201
+ include,
202
+ summary: {
203
+ status: "unchanged",
204
+ headline: `Previewed remap output for ${normalizedInputJar}.`
205
+ },
206
+ blocks: {
207
+ metadata: {
208
+ loader: analysis.loader,
209
+ modId: analysis.modId,
210
+ modVersion: analysis.modVersion
211
+ },
212
+ operation: {
213
+ executionMode: "preview",
214
+ outputJar,
215
+ targetMapping: input.targetMapping
216
+ }
217
+ },
218
+ alwaysBlocks: ["operation"]
219
+ }),
220
+ warnings: []
221
+ };
222
+ }
223
+ const output = await this.deps.remapModJar({
224
+ inputJar: normalizedInputJar,
225
+ outputJar,
226
+ targetMapping: input.targetMapping
227
+ });
228
+ return {
229
+ ...buildEntryToolResult({
230
+ task: "remap",
231
+ detail,
232
+ include,
233
+ summary: {
234
+ status: "changed",
235
+ headline: `Remapped ${normalizedInputJar} to ${input.targetMapping}.`
236
+ },
237
+ blocks: {
238
+ operation: {
239
+ executionMode: "apply",
240
+ outputJar,
241
+ targetMapping: input.targetMapping
242
+ },
243
+ metadata: output
244
+ },
245
+ alwaysBlocks: ["operation"]
246
+ }),
247
+ warnings: Array.isArray(output.warnings) ? output.warnings : []
248
+ };
249
+ }
250
+ }
251
+ }
252
+ }
253
+ //# sourceMappingURL=analyze-mod-service.js.map
@@ -0,0 +1,209 @@
1
+ import { z } from "zod";
2
+ import type { CheckSymbolExistsOutput, FindMappingOutput, GetClassApiMatrixOutput, ResolveMethodMappingExactOutput, ResolveWorkspaceSymbolOutput, TraceSymbolLifecycleOutput } from "../source-service.js";
3
+ export declare const analyzeSymbolShape: {
4
+ task: z.ZodEnum<["exists", "map", "exact-map", "lifecycle", "workspace", "api-overview"]>;
5
+ subject: z.ZodObject<{
6
+ kind: z.ZodEnum<["class", "method", "field", "symbol"]>;
7
+ name: z.ZodString;
8
+ owner: z.ZodOptional<z.ZodString>;
9
+ descriptor: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ kind: "symbol" | "class" | "method" | "field";
12
+ name: string;
13
+ owner?: string | undefined;
14
+ descriptor?: string | undefined;
15
+ }, {
16
+ kind: "symbol" | "class" | "method" | "field";
17
+ name: string;
18
+ owner?: string | undefined;
19
+ descriptor?: string | undefined;
20
+ }>;
21
+ version: z.ZodOptional<z.ZodString>;
22
+ sourceMapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
23
+ targetMapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
24
+ classNameMapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
25
+ projectPath: z.ZodOptional<z.ZodString>;
26
+ signatureMode: z.ZodOptional<z.ZodEnum<["exact", "name-only"]>>;
27
+ nameMode: z.ZodOptional<z.ZodEnum<["fqcn", "auto"]>>;
28
+ includeKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["class", "field", "method"]>, "many">>;
29
+ maxRows: z.ZodOptional<z.ZodNumber>;
30
+ maxCandidates: z.ZodOptional<z.ZodNumber>;
31
+ detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
32
+ include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
33
+ };
34
+ export declare const analyzeSymbolSchema: z.ZodEffects<z.ZodObject<{
35
+ task: z.ZodEnum<["exists", "map", "exact-map", "lifecycle", "workspace", "api-overview"]>;
36
+ subject: z.ZodObject<{
37
+ kind: z.ZodEnum<["class", "method", "field", "symbol"]>;
38
+ name: z.ZodString;
39
+ owner: z.ZodOptional<z.ZodString>;
40
+ descriptor: z.ZodOptional<z.ZodString>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ kind: "symbol" | "class" | "method" | "field";
43
+ name: string;
44
+ owner?: string | undefined;
45
+ descriptor?: string | undefined;
46
+ }, {
47
+ kind: "symbol" | "class" | "method" | "field";
48
+ name: string;
49
+ owner?: string | undefined;
50
+ descriptor?: string | undefined;
51
+ }>;
52
+ version: z.ZodOptional<z.ZodString>;
53
+ sourceMapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
54
+ targetMapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
55
+ classNameMapping: z.ZodOptional<z.ZodEnum<["obfuscated", "mojang", "intermediary", "yarn"]>>;
56
+ projectPath: z.ZodOptional<z.ZodString>;
57
+ signatureMode: z.ZodOptional<z.ZodEnum<["exact", "name-only"]>>;
58
+ nameMode: z.ZodOptional<z.ZodEnum<["fqcn", "auto"]>>;
59
+ includeKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["class", "field", "method"]>, "many">>;
60
+ maxRows: z.ZodOptional<z.ZodNumber>;
61
+ maxCandidates: z.ZodOptional<z.ZodNumber>;
62
+ detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
63
+ include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ task: "map" | "workspace" | "exists" | "exact-map" | "lifecycle" | "api-overview";
66
+ subject: {
67
+ kind: "symbol" | "class" | "method" | "field";
68
+ name: string;
69
+ owner?: string | undefined;
70
+ descriptor?: string | undefined;
71
+ };
72
+ projectPath?: string | undefined;
73
+ version?: string | undefined;
74
+ sourceMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
75
+ targetMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
76
+ classNameMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
77
+ nameMode?: "auto" | "fqcn" | undefined;
78
+ detail?: "full" | "summary" | "standard" | undefined;
79
+ include?: string[] | undefined;
80
+ signatureMode?: "exact" | "name-only" | undefined;
81
+ includeKinds?: ("class" | "method" | "field")[] | undefined;
82
+ maxRows?: number | undefined;
83
+ maxCandidates?: number | undefined;
84
+ }, {
85
+ task: "map" | "workspace" | "exists" | "exact-map" | "lifecycle" | "api-overview";
86
+ subject: {
87
+ kind: "symbol" | "class" | "method" | "field";
88
+ name: string;
89
+ owner?: string | undefined;
90
+ descriptor?: string | undefined;
91
+ };
92
+ projectPath?: string | undefined;
93
+ version?: string | undefined;
94
+ sourceMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
95
+ targetMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
96
+ classNameMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
97
+ nameMode?: "auto" | "fqcn" | undefined;
98
+ detail?: "full" | "summary" | "standard" | undefined;
99
+ include?: string[] | undefined;
100
+ signatureMode?: "exact" | "name-only" | undefined;
101
+ includeKinds?: ("class" | "method" | "field")[] | undefined;
102
+ maxRows?: number | undefined;
103
+ maxCandidates?: number | undefined;
104
+ }>, {
105
+ task: "map" | "workspace" | "exists" | "exact-map" | "lifecycle" | "api-overview";
106
+ subject: {
107
+ kind: "symbol" | "class" | "method" | "field";
108
+ name: string;
109
+ owner?: string | undefined;
110
+ descriptor?: string | undefined;
111
+ };
112
+ projectPath?: string | undefined;
113
+ version?: string | undefined;
114
+ sourceMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
115
+ targetMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
116
+ classNameMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
117
+ nameMode?: "auto" | "fqcn" | undefined;
118
+ detail?: "full" | "summary" | "standard" | undefined;
119
+ include?: string[] | undefined;
120
+ signatureMode?: "exact" | "name-only" | undefined;
121
+ includeKinds?: ("class" | "method" | "field")[] | undefined;
122
+ maxRows?: number | undefined;
123
+ maxCandidates?: number | undefined;
124
+ }, {
125
+ task: "map" | "workspace" | "exists" | "exact-map" | "lifecycle" | "api-overview";
126
+ subject: {
127
+ kind: "symbol" | "class" | "method" | "field";
128
+ name: string;
129
+ owner?: string | undefined;
130
+ descriptor?: string | undefined;
131
+ };
132
+ projectPath?: string | undefined;
133
+ version?: string | undefined;
134
+ sourceMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
135
+ targetMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
136
+ classNameMapping?: "intermediary" | "mojang" | "yarn" | "obfuscated" | undefined;
137
+ nameMode?: "auto" | "fqcn" | undefined;
138
+ detail?: "full" | "summary" | "standard" | undefined;
139
+ include?: string[] | undefined;
140
+ signatureMode?: "exact" | "name-only" | undefined;
141
+ includeKinds?: ("class" | "method" | "field")[] | undefined;
142
+ maxRows?: number | undefined;
143
+ maxCandidates?: number | undefined;
144
+ }>;
145
+ export type AnalyzeSymbolInput = z.infer<typeof analyzeSymbolSchema>;
146
+ type AnalyzeSymbolDeps = {
147
+ checkSymbolExists: (input: {
148
+ version: string;
149
+ kind: "class" | "field" | "method";
150
+ name: string;
151
+ owner?: string;
152
+ descriptor?: string;
153
+ sourceMapping: "obfuscated" | "mojang" | "intermediary" | "yarn";
154
+ sourcePriority?: "loom-first" | "maven-first";
155
+ nameMode?: "fqcn" | "auto";
156
+ signatureMode?: "exact" | "name-only";
157
+ maxCandidates?: number;
158
+ }) => Promise<CheckSymbolExistsOutput>;
159
+ findMapping: (input: {
160
+ version: string;
161
+ kind: "class" | "field" | "method";
162
+ name: string;
163
+ owner?: string;
164
+ descriptor?: string;
165
+ sourceMapping: "obfuscated" | "mojang" | "intermediary" | "yarn";
166
+ targetMapping: "obfuscated" | "mojang" | "intermediary" | "yarn";
167
+ signatureMode?: "exact" | "name-only";
168
+ maxCandidates?: number;
169
+ }) => Promise<FindMappingOutput>;
170
+ resolveMethodMappingExact: (input: {
171
+ version: string;
172
+ owner: string;
173
+ name: string;
174
+ descriptor: string;
175
+ sourceMapping: "obfuscated" | "mojang" | "intermediary" | "yarn";
176
+ targetMapping: "obfuscated" | "mojang" | "intermediary" | "yarn";
177
+ maxCandidates?: number;
178
+ }) => Promise<ResolveMethodMappingExactOutput>;
179
+ traceSymbolLifecycle: (input: {
180
+ symbol: string;
181
+ descriptor?: string;
182
+ mapping?: "obfuscated" | "mojang" | "intermediary" | "yarn";
183
+ }) => Promise<TraceSymbolLifecycleOutput>;
184
+ resolveWorkspaceSymbol: (input: {
185
+ projectPath: string;
186
+ version: string;
187
+ kind: "class" | "field" | "method";
188
+ name: string;
189
+ owner?: string;
190
+ descriptor?: string;
191
+ sourceMapping: "obfuscated" | "mojang" | "intermediary" | "yarn";
192
+ maxCandidates?: number;
193
+ }) => Promise<ResolveWorkspaceSymbolOutput>;
194
+ getClassApiMatrix: (input: {
195
+ version: string;
196
+ className: string;
197
+ classNameMapping: "obfuscated" | "mojang" | "intermediary" | "yarn";
198
+ includeKinds?: ("class" | "field" | "method")[];
199
+ maxRows?: number;
200
+ }) => Promise<GetClassApiMatrixOutput>;
201
+ };
202
+ export declare class AnalyzeSymbolService {
203
+ private readonly deps;
204
+ constructor(deps: AnalyzeSymbolDeps);
205
+ execute(input: AnalyzeSymbolInput): Promise<Record<string, unknown> & {
206
+ warnings?: string[];
207
+ }>;
208
+ }
209
+ export {};