@adhisang/minecraft-modding-mcp 6.2.0 → 7.0.0-rc.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/README.md +21 -5
  3. package/dist/cache-policy.d.ts +71 -0
  4. package/dist/cache-policy.js +83 -0
  5. package/dist/cache-registry.js +6 -6
  6. package/dist/cli.js +74 -3
  7. package/dist/compat-stdio-transport.d.ts +1 -1
  8. package/dist/compat-stdio-transport.js +13 -1
  9. package/dist/config.d.ts +3 -0
  10. package/dist/config.js +8 -2
  11. package/dist/decompiler/vineflower.d.ts +1 -0
  12. package/dist/decompiler/vineflower.js +8 -5
  13. package/dist/entry-tools/analyze-mod-service.d.ts +70 -136
  14. package/dist/entry-tools/analyze-symbol-service.d.ts +112 -150
  15. package/dist/entry-tools/compare-minecraft-service.d.ts +59 -145
  16. package/dist/entry-tools/entry-tool-schema.d.ts +38 -4
  17. package/dist/entry-tools/entry-tool-schema.js +4 -1
  18. package/dist/entry-tools/inspect-minecraft/internal.d.ts +235 -799
  19. package/dist/entry-tools/inspect-minecraft/internal.js +65 -28
  20. package/dist/entry-tools/inspect-minecraft-service.d.ts +372 -1736
  21. package/dist/entry-tools/inspect-minecraft-service.js +1 -1
  22. package/dist/entry-tools/manage-cache-service.d.ts +81 -91
  23. package/dist/entry-tools/validate-project/cases/project-summary.d.ts +7 -7
  24. package/dist/entry-tools/validate-project-service.d.ts +164 -592
  25. package/dist/entry-tools/verify-mixin-target-service.d.ts +3 -19
  26. package/dist/era-classifier.d.ts +161 -0
  27. package/dist/era-classifier.js +292 -0
  28. package/dist/error-mapping.js +9 -2
  29. package/dist/index.d.ts +42 -4
  30. package/dist/index.js +637 -475
  31. package/dist/java-process.d.ts +2 -0
  32. package/dist/java-process.js +22 -2
  33. package/dist/json-rpc-framing.d.ts +77 -1
  34. package/dist/json-rpc-framing.js +249 -13
  35. package/dist/mapping/loaders/tiny-loom-selection.d.ts +88 -0
  36. package/dist/mapping/loaders/tiny-loom-selection.js +223 -0
  37. package/dist/mapping/loaders/tiny-loom.js +45 -33
  38. package/dist/mapping/loaders/tiny-maven.js +6 -11
  39. package/dist/mapping/parsers/tiny.d.ts +57 -0
  40. package/dist/mapping/parsers/tiny.js +99 -22
  41. package/dist/mapping-service.d.ts +19 -0
  42. package/dist/mapping-service.js +93 -9
  43. package/dist/mcp-helpers.d.ts +19 -2
  44. package/dist/mcp-helpers.js +48 -6
  45. package/dist/minecraft-explorer-service.d.ts +1 -1
  46. package/dist/mixin/types.d.ts +8 -0
  47. package/dist/mod-analyzer.js +7 -7
  48. package/dist/mod-decompile-service.js +1 -0
  49. package/dist/nbt/java-nbt-codec.js +12 -2
  50. package/dist/nbt/json-patch.js +14 -3
  51. package/dist/nbt/pipeline.js +40 -3
  52. package/dist/nbt/typed-json.js +26 -1
  53. package/dist/registration-adapter.d.ts +32 -0
  54. package/dist/registration-adapter.js +52 -0
  55. package/dist/request-context.d.ts +7 -0
  56. package/dist/request-context.js +9 -0
  57. package/dist/resources.d.ts +1 -1
  58. package/dist/resources.js +25 -19
  59. package/dist/server-identity.d.ts +27 -0
  60. package/dist/server-identity.js +26 -0
  61. package/dist/source/access-validate.js +53 -0
  62. package/dist/source/artifact-resolver.d.ts +69 -1
  63. package/dist/source/artifact-resolver.js +215 -14
  64. package/dist/source/class-source.d.ts +22 -0
  65. package/dist/source/class-source.js +162 -29
  66. package/dist/source/did-you-mean.d.ts +12 -1
  67. package/dist/source/did-you-mean.js +6 -2
  68. package/dist/source/file-access.js +150 -46
  69. package/dist/source/indexer.js +1 -0
  70. package/dist/source/nested-jars.d.ts +19 -0
  71. package/dist/source/nested-jars.js +90 -21
  72. package/dist/source/shared-utils.d.ts +21 -0
  73. package/dist/source/shared-utils.js +23 -0
  74. package/dist/source-service.d.ts +12 -0
  75. package/dist/source-service.js +3 -0
  76. package/dist/stdio-supervisor.d.ts +357 -2
  77. package/dist/stdio-supervisor.js +1031 -80
  78. package/dist/storage/db.d.ts +2 -1
  79. package/dist/storage/db.js +15 -8
  80. package/dist/synthetic-decorator.d.ts +24 -0
  81. package/dist/synthetic-decorator.js +48 -0
  82. package/dist/tool-contract-manifest.js +1 -1
  83. package/dist/tool-guidance.d.ts +17 -1
  84. package/dist/tool-guidance.js +417 -13
  85. package/dist/tool-schema-registry.d.ts +2 -0
  86. package/dist/tool-schema-registry.js +4 -0
  87. package/dist/tool-schemas.d.ts +2214 -3915
  88. package/dist/tool-schemas.js +34 -7
  89. package/dist/types.d.ts +35 -0
  90. package/dist/v1-parity-schemas.d.ts +7 -0
  91. package/dist/v1-parity-schemas.js +5584 -0
  92. package/dist/version-diff-service.d.ts +33 -0
  93. package/dist/version-diff-service.js +148 -3
  94. package/dist/version-service.js +36 -14
  95. package/dist/warning-details.js +18 -1
  96. package/docs/README-ja.md +9 -3
  97. package/docs/tool-reference.md +267 -22
  98. package/package.json +12 -9
@@ -14,7 +14,7 @@ import { handleListFiles } from "./inspect-minecraft/handlers/list-files.js";
14
14
  const INCLUDE_GROUPS = ["warnings", "provenance", "candidates", "members", "descriptors", "source", "files", "samples", "artifact", "timings"];
15
15
  const nonEmptyString = z.string().trim().min(1);
16
16
  export const inspectMinecraftShape = {
17
- task: z.enum(TASKS).optional(),
17
+ task: z.enum(TASKS).optional().describe("Workflow task. auto dispatches only from subject.kind and workspace focus.kind; it is not a natural-language planner."),
18
18
  subject: subjectSchema.optional(),
19
19
  includeSnapshots: z.boolean().default(false),
20
20
  detail: detailSchema.optional(),
@@ -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<["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", "nested-jar", "workspace"]>, "many">>;
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<["healthy", "partial", "stale", "orphaned", "corrupt", "in_use"]>>;
29
+ status: z.ZodOptional<z.ZodEnum<{
30
+ healthy: "healthy";
31
+ partial: "partial";
32
+ stale: "stale";
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
- }, "strip", z.ZodTypeAny, {
17
- version?: string | undefined;
18
- projectPath?: string | undefined;
19
- mapping?: string | undefined;
20
- jarPath?: string | undefined;
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
- detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
38
- include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
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<["preview", "apply"]>>;
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<["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", "nested-jar", "workspace"]>, "many">>;
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<["healthy", "partial", "stale", "orphaned", "corrupt", "in_use"]>>;
83
+ status: z.ZodOptional<z.ZodEnum<{
84
+ healthy: "healthy";
85
+ partial: "partial";
86
+ stale: "stale";
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
- }, "strip", z.ZodTypeAny, {
57
- version?: string | undefined;
58
- projectPath?: string | undefined;
59
- mapping?: string | undefined;
60
- jarPath?: string | undefined;
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
- detail: z.ZodOptional<z.ZodEnum<["summary", "standard", "full"]>>;
78
- include: z.ZodOptional<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">>;
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<["preview", "apply"]>>;
82
- }, "strip", z.ZodTypeAny, {
83
- limit: number;
84
- executionMode: "preview" | "apply";
85
- action: "summary" | "list" | "inspect" | "verify" | "delete" | "prune" | "rebuild";
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;
@@ -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: "error" | "ok" | "skipped" | "missing";
12
+ status: "error" | "ok" | "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: "error" | "ok" | "skipped" | "missing";
23
+ status: "error" | "ok" | "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: "error" | "ok" | "skipped" | "missing";
35
+ status: "error" | "ok" | "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: "error" | "ok" | "skipped" | "missing";
46
+ status: "error" | "ok" | "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: "error" | "ok" | "skipped" | "missing";
58
+ status: "error" | "ok" | "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: "error" | "ok" | "skipped" | "missing";
73
+ status: "error" | "ok" | "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: "error" | "ok" | "skipped" | "missing";
87
+ status: "error" | "ok" | "missing" | "skipped";
88
88
  durationMs?: number;
89
89
  error?: {
90
90
  code: string;