unreal-engine-mcp-server 0.3.1 → 0.4.3

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 (144) hide show
  1. package/.env.production +1 -1
  2. package/.github/copilot-instructions.md +45 -0
  3. package/.github/workflows/publish-mcp.yml +1 -1
  4. package/README.md +22 -7
  5. package/dist/index.js +137 -46
  6. package/dist/prompts/index.d.ts +10 -3
  7. package/dist/prompts/index.js +186 -7
  8. package/dist/resources/actors.d.ts +19 -1
  9. package/dist/resources/actors.js +55 -64
  10. package/dist/resources/assets.d.ts +3 -2
  11. package/dist/resources/assets.js +117 -109
  12. package/dist/resources/levels.d.ts +21 -3
  13. package/dist/resources/levels.js +31 -56
  14. package/dist/tools/actors.d.ts +3 -14
  15. package/dist/tools/actors.js +246 -302
  16. package/dist/tools/animation.d.ts +57 -102
  17. package/dist/tools/animation.js +429 -450
  18. package/dist/tools/assets.d.ts +13 -2
  19. package/dist/tools/assets.js +58 -46
  20. package/dist/tools/audio.d.ts +22 -13
  21. package/dist/tools/audio.js +467 -121
  22. package/dist/tools/blueprint.d.ts +32 -13
  23. package/dist/tools/blueprint.js +699 -448
  24. package/dist/tools/build_environment_advanced.d.ts +0 -1
  25. package/dist/tools/build_environment_advanced.js +236 -87
  26. package/dist/tools/consolidated-tool-definitions.d.ts +232 -15
  27. package/dist/tools/consolidated-tool-definitions.js +124 -255
  28. package/dist/tools/consolidated-tool-handlers.js +749 -766
  29. package/dist/tools/debug.d.ts +72 -10
  30. package/dist/tools/debug.js +170 -36
  31. package/dist/tools/editor.d.ts +9 -2
  32. package/dist/tools/editor.js +30 -44
  33. package/dist/tools/foliage.d.ts +34 -15
  34. package/dist/tools/foliage.js +97 -107
  35. package/dist/tools/introspection.js +19 -21
  36. package/dist/tools/landscape.d.ts +1 -2
  37. package/dist/tools/landscape.js +311 -168
  38. package/dist/tools/level.d.ts +3 -28
  39. package/dist/tools/level.js +642 -192
  40. package/dist/tools/lighting.d.ts +14 -3
  41. package/dist/tools/lighting.js +236 -123
  42. package/dist/tools/materials.d.ts +25 -7
  43. package/dist/tools/materials.js +102 -79
  44. package/dist/tools/niagara.d.ts +10 -12
  45. package/dist/tools/niagara.js +74 -94
  46. package/dist/tools/performance.d.ts +12 -4
  47. package/dist/tools/performance.js +38 -79
  48. package/dist/tools/physics.d.ts +34 -10
  49. package/dist/tools/physics.js +364 -292
  50. package/dist/tools/rc.js +98 -24
  51. package/dist/tools/sequence.d.ts +1 -0
  52. package/dist/tools/sequence.js +146 -24
  53. package/dist/tools/ui.d.ts +31 -4
  54. package/dist/tools/ui.js +83 -66
  55. package/dist/tools/visual.d.ts +11 -0
  56. package/dist/tools/visual.js +245 -30
  57. package/dist/types/tool-types.d.ts +0 -6
  58. package/dist/types/tool-types.js +1 -8
  59. package/dist/unreal-bridge.d.ts +32 -2
  60. package/dist/unreal-bridge.js +621 -127
  61. package/dist/utils/elicitation.d.ts +57 -0
  62. package/dist/utils/elicitation.js +104 -0
  63. package/dist/utils/error-handler.d.ts +0 -33
  64. package/dist/utils/error-handler.js +4 -111
  65. package/dist/utils/http.d.ts +2 -22
  66. package/dist/utils/http.js +12 -75
  67. package/dist/utils/normalize.d.ts +4 -4
  68. package/dist/utils/normalize.js +15 -7
  69. package/dist/utils/python-output.d.ts +18 -0
  70. package/dist/utils/python-output.js +290 -0
  71. package/dist/utils/python.d.ts +2 -0
  72. package/dist/utils/python.js +4 -0
  73. package/dist/utils/response-validator.d.ts +6 -1
  74. package/dist/utils/response-validator.js +66 -13
  75. package/dist/utils/result-helpers.d.ts +27 -0
  76. package/dist/utils/result-helpers.js +147 -0
  77. package/dist/utils/safe-json.d.ts +0 -2
  78. package/dist/utils/safe-json.js +0 -43
  79. package/dist/utils/validation.d.ts +16 -0
  80. package/dist/utils/validation.js +70 -7
  81. package/mcp-config-example.json +2 -2
  82. package/package.json +11 -10
  83. package/server.json +37 -14
  84. package/src/index.ts +146 -50
  85. package/src/prompts/index.ts +211 -13
  86. package/src/resources/actors.ts +59 -44
  87. package/src/resources/assets.ts +123 -102
  88. package/src/resources/levels.ts +37 -47
  89. package/src/tools/actors.ts +269 -313
  90. package/src/tools/animation.ts +556 -539
  91. package/src/tools/assets.ts +59 -45
  92. package/src/tools/audio.ts +507 -113
  93. package/src/tools/blueprint.ts +778 -462
  94. package/src/tools/build_environment_advanced.ts +312 -106
  95. package/src/tools/consolidated-tool-definitions.ts +136 -267
  96. package/src/tools/consolidated-tool-handlers.ts +871 -795
  97. package/src/tools/debug.ts +179 -38
  98. package/src/tools/editor.ts +35 -37
  99. package/src/tools/foliage.ts +110 -104
  100. package/src/tools/introspection.ts +24 -22
  101. package/src/tools/landscape.ts +334 -181
  102. package/src/tools/level.ts +683 -182
  103. package/src/tools/lighting.ts +244 -123
  104. package/src/tools/materials.ts +114 -83
  105. package/src/tools/niagara.ts +87 -81
  106. package/src/tools/performance.ts +49 -88
  107. package/src/tools/physics.ts +393 -299
  108. package/src/tools/rc.ts +103 -25
  109. package/src/tools/sequence.ts +157 -30
  110. package/src/tools/ui.ts +101 -70
  111. package/src/tools/visual.ts +250 -29
  112. package/src/types/tool-types.ts +0 -9
  113. package/src/unreal-bridge.ts +658 -140
  114. package/src/utils/elicitation.ts +129 -0
  115. package/src/utils/error-handler.ts +4 -159
  116. package/src/utils/http.ts +16 -115
  117. package/src/utils/normalize.ts +20 -10
  118. package/src/utils/python-output.ts +351 -0
  119. package/src/utils/python.ts +3 -0
  120. package/src/utils/response-validator.ts +68 -17
  121. package/src/utils/result-helpers.ts +193 -0
  122. package/src/utils/safe-json.ts +0 -50
  123. package/src/utils/validation.ts +94 -7
  124. package/tests/run-unreal-tool-tests.mjs +720 -0
  125. package/tsconfig.json +2 -2
  126. package/dist/python-utils.d.ts +0 -29
  127. package/dist/python-utils.js +0 -54
  128. package/dist/tools/tool-definitions.d.ts +0 -4919
  129. package/dist/tools/tool-definitions.js +0 -1065
  130. package/dist/tools/tool-handlers.d.ts +0 -47
  131. package/dist/tools/tool-handlers.js +0 -863
  132. package/dist/types/index.d.ts +0 -323
  133. package/dist/types/index.js +0 -28
  134. package/dist/utils/cache-manager.d.ts +0 -64
  135. package/dist/utils/cache-manager.js +0 -176
  136. package/dist/utils/errors.d.ts +0 -133
  137. package/dist/utils/errors.js +0 -256
  138. package/src/python/editor_compat.py +0 -181
  139. package/src/python-utils.ts +0 -57
  140. package/src/tools/tool-definitions.ts +0 -1081
  141. package/src/tools/tool-handlers.ts +0 -973
  142. package/src/types/index.ts +0 -414
  143. package/src/utils/cache-manager.ts +0 -213
  144. package/src/utils/errors.ts +0 -312
@@ -1,33 +1,51 @@
1
1
  import { UnrealBridge } from '../unreal-bridge.js';
2
+ type CreateAnimationBlueprintSuccess = {
3
+ success: true;
4
+ message: string;
5
+ path: string;
6
+ exists?: boolean;
7
+ skeleton?: string;
8
+ warnings?: string[];
9
+ details?: string[];
10
+ };
11
+ type CreateAnimationBlueprintFailure = {
12
+ success: false;
13
+ message: string;
14
+ error: string;
15
+ path?: string;
16
+ exists?: boolean;
17
+ skeleton?: string;
18
+ warnings?: string[];
19
+ details?: string[];
20
+ };
21
+ type PlayAnimationSuccess = {
22
+ success: true;
23
+ message: string;
24
+ warnings?: string[];
25
+ details?: string[];
26
+ actorName?: string;
27
+ animationType?: string;
28
+ assetPath?: string;
29
+ };
30
+ type PlayAnimationFailure = {
31
+ success: false;
32
+ message: string;
33
+ error: string;
34
+ warnings?: string[];
35
+ details?: string[];
36
+ availableActors?: string[];
37
+ actorName?: string;
38
+ animationType?: string;
39
+ assetPath?: string;
40
+ };
2
41
  export declare class AnimationTools {
3
42
  private bridge;
4
43
  constructor(bridge: UnrealBridge);
5
- /**
6
- * Create Animation Blueprint
7
- */
8
44
  createAnimationBlueprint(params: {
9
45
  name: string;
10
46
  skeletonPath: string;
11
47
  savePath?: string;
12
- }): Promise<{
13
- success: boolean;
14
- message: string;
15
- error: string | undefined;
16
- path?: undefined;
17
- } | {
18
- success: boolean;
19
- message: string;
20
- path: string;
21
- error?: undefined;
22
- } | {
23
- success: boolean;
24
- error: string;
25
- message?: undefined;
26
- path?: undefined;
27
- }>;
28
- /**
29
- * Add State Machine to Animation Blueprint
30
- */
48
+ }): Promise<CreateAnimationBlueprintSuccess | CreateAnimationBlueprintFailure>;
31
49
  addStateMachine(params: {
32
50
  blueprintPath: string;
33
51
  machineName: string;
@@ -43,49 +61,17 @@ export declare class AnimationTools {
43
61
  condition?: string;
44
62
  }>;
45
63
  }): Promise<{
46
- success: boolean;
64
+ success: true;
47
65
  message: string;
48
- error?: undefined;
49
66
  } | {
50
- success: boolean;
67
+ success: false;
51
68
  error: string;
52
- message?: undefined;
53
69
  }>;
54
- /**
55
- * Create Animation Montage
56
- */
57
- createMontage(params: {
58
- name: string;
59
- animationSequence: string;
60
- savePath?: string;
61
- sections?: Array<{
62
- name: string;
63
- startTime: number;
64
- endTime: number;
65
- }>;
66
- notifies?: Array<{
67
- name: string;
68
- time: number;
69
- }>;
70
- }): Promise<{
71
- success: boolean;
72
- message: string;
73
- path: string;
74
- error?: undefined;
75
- } | {
76
- success: boolean;
77
- error: string;
78
- message?: undefined;
79
- path?: undefined;
80
- }>;
81
- /**
82
- * Create Blend Space
83
- */
84
70
  createBlendSpace(params: {
85
71
  name: string;
86
- skeletonPath: string;
87
72
  savePath?: string;
88
- dimensions: 1 | 2;
73
+ dimensions?: 1 | 2;
74
+ skeletonPath?: string;
89
75
  horizontalAxis?: {
90
76
  name: string;
91
77
  minValue: number;
@@ -102,19 +88,13 @@ export declare class AnimationTools {
102
88
  y?: number;
103
89
  }>;
104
90
  }): Promise<{
105
- success: boolean;
91
+ success: true;
106
92
  message: string;
107
93
  path: string;
108
- error?: undefined;
109
94
  } | {
110
- success: boolean;
95
+ success: false;
111
96
  error: string;
112
- message?: undefined;
113
- path?: undefined;
114
97
  }>;
115
- /**
116
- * Setup Control Rig
117
- */
118
98
  setupControlRig(params: {
119
99
  name: string;
120
100
  skeletonPath: string;
@@ -123,27 +103,16 @@ export declare class AnimationTools {
123
103
  name: string;
124
104
  type: 'Transform' | 'Float' | 'Bool' | 'Vector';
125
105
  bone?: string;
126
- defaultValue?: any;
106
+ defaultValue?: unknown;
127
107
  }>;
128
108
  }): Promise<{
129
- success: boolean;
130
- message: string;
131
- error: string;
132
- path?: undefined;
133
- } | {
134
- success: boolean;
109
+ success: true;
135
110
  message: string;
136
111
  path: string;
137
- error?: undefined;
138
112
  } | {
139
- success: boolean;
113
+ success: false;
140
114
  error: string;
141
- message?: undefined;
142
- path?: undefined;
143
115
  }>;
144
- /**
145
- * Create Level Sequence (for cinematics)
146
- */
147
116
  createLevelSequence(params: {
148
117
  name: string;
149
118
  savePath?: string;
@@ -154,23 +123,17 @@ export declare class AnimationTools {
154
123
  trackType: 'Transform' | 'Animation' | 'Camera' | 'Event';
155
124
  keyframes?: Array<{
156
125
  time: number;
157
- value: any;
126
+ value: unknown;
158
127
  }>;
159
128
  }>;
160
129
  }): Promise<{
161
- success: boolean;
130
+ success: true;
162
131
  message: string;
163
132
  path: string;
164
- error?: undefined;
165
133
  } | {
166
- success: boolean;
134
+ success: false;
167
135
  error: string;
168
- message?: undefined;
169
- path?: undefined;
170
136
  }>;
171
- /**
172
- * Play Animation on Actor
173
- */
174
137
  playAnimation(params: {
175
138
  actorName: string;
176
139
  animationType: 'Montage' | 'Sequence' | 'BlendSpace';
@@ -179,18 +142,10 @@ export declare class AnimationTools {
179
142
  loop?: boolean;
180
143
  blendInTime?: number;
181
144
  blendOutTime?: number;
182
- }): Promise<{
183
- success: boolean;
184
- message: any;
185
- error?: undefined;
186
- } | {
187
- success: boolean;
188
- error: any;
189
- message?: undefined;
190
- }>;
191
- /**
192
- * Helper function to execute console commands
193
- */
194
- private _executeCommand;
145
+ }): Promise<PlayAnimationSuccess | PlayAnimationFailure>;
146
+ private buildCreateAnimationBlueprintScript;
147
+ private parseAnimationBlueprintResponse;
148
+ private buildPlayAnimationScript;
195
149
  }
150
+ export {};
196
151
  //# sourceMappingURL=animation.d.ts.map