unreal-engine-mcp-server 0.5.0 → 0.5.2

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 (188) hide show
  1. package/.env.example +1 -1
  2. package/.github/release-drafter-config.yml +51 -0
  3. package/.github/workflows/greetings.yml +5 -1
  4. package/.github/workflows/labeler.yml +2 -1
  5. package/.github/workflows/publish-mcp.yml +2 -4
  6. package/.github/workflows/release-drafter.yml +3 -2
  7. package/.github/workflows/release.yml +3 -3
  8. package/CHANGELOG.md +109 -0
  9. package/CONTRIBUTING.md +1 -1
  10. package/GEMINI.md +115 -0
  11. package/Public/Plugin_setup_guide.mp4 +0 -0
  12. package/README.md +166 -200
  13. package/dist/automation/bridge.d.ts +1 -2
  14. package/dist/automation/bridge.js +24 -23
  15. package/dist/automation/connection-manager.d.ts +1 -0
  16. package/dist/automation/connection-manager.js +10 -0
  17. package/dist/automation/message-handler.js +5 -4
  18. package/dist/automation/request-tracker.d.ts +4 -0
  19. package/dist/automation/request-tracker.js +11 -3
  20. package/dist/config.d.ts +0 -1
  21. package/dist/config.js +0 -1
  22. package/dist/constants.d.ts +4 -0
  23. package/dist/constants.js +4 -0
  24. package/dist/graphql/loaders.d.ts +64 -0
  25. package/dist/graphql/loaders.js +117 -0
  26. package/dist/graphql/resolvers.d.ts +3 -3
  27. package/dist/graphql/resolvers.js +33 -30
  28. package/dist/graphql/server.js +3 -1
  29. package/dist/graphql/types.d.ts +2 -0
  30. package/dist/index.d.ts +2 -0
  31. package/dist/index.js +13 -2
  32. package/dist/server-setup.d.ts +0 -1
  33. package/dist/server-setup.js +0 -40
  34. package/dist/tools/actors.d.ts +58 -24
  35. package/dist/tools/actors.js +22 -6
  36. package/dist/tools/assets.d.ts +19 -71
  37. package/dist/tools/assets.js +28 -22
  38. package/dist/tools/base-tool.d.ts +4 -4
  39. package/dist/tools/base-tool.js +1 -1
  40. package/dist/tools/blueprint.d.ts +45 -61
  41. package/dist/tools/blueprint.js +43 -14
  42. package/dist/tools/consolidated-tool-definitions.js +2 -1
  43. package/dist/tools/consolidated-tool-handlers.js +96 -110
  44. package/dist/tools/dynamic-handler-registry.d.ts +11 -9
  45. package/dist/tools/dynamic-handler-registry.js +17 -95
  46. package/dist/tools/editor.d.ts +19 -193
  47. package/dist/tools/editor.js +11 -2
  48. package/dist/tools/environment.d.ts +8 -14
  49. package/dist/tools/foliage.d.ts +18 -143
  50. package/dist/tools/foliage.js +4 -2
  51. package/dist/tools/handlers/actor-handlers.d.ts +1 -1
  52. package/dist/tools/handlers/actor-handlers.js +14 -13
  53. package/dist/tools/handlers/asset-handlers.js +454 -454
  54. package/dist/tools/handlers/sequence-handlers.d.ts +1 -1
  55. package/dist/tools/handlers/sequence-handlers.js +24 -13
  56. package/dist/tools/introspection.d.ts +1 -1
  57. package/dist/tools/introspection.js +1 -1
  58. package/dist/tools/landscape.d.ts +16 -116
  59. package/dist/tools/landscape.js +7 -3
  60. package/dist/tools/level.d.ts +22 -103
  61. package/dist/tools/level.js +26 -18
  62. package/dist/tools/lighting.d.ts +54 -7
  63. package/dist/tools/lighting.js +9 -5
  64. package/dist/tools/materials.d.ts +1 -1
  65. package/dist/tools/materials.js +5 -1
  66. package/dist/tools/niagara.js +37 -2
  67. package/dist/tools/performance.d.ts +0 -1
  68. package/dist/tools/performance.js +0 -1
  69. package/dist/tools/physics.js +5 -1
  70. package/dist/tools/sequence.d.ts +24 -24
  71. package/dist/tools/sequence.js +13 -0
  72. package/dist/tools/ui.d.ts +0 -2
  73. package/dist/types/automation-responses.d.ts +115 -0
  74. package/dist/types/automation-responses.js +2 -0
  75. package/dist/types/responses.d.ts +249 -0
  76. package/dist/types/responses.js +2 -0
  77. package/dist/types/tool-interfaces.d.ts +135 -135
  78. package/dist/types/tool-types.d.ts +2 -0
  79. package/dist/unreal-bridge.js +4 -4
  80. package/dist/utils/command-validator.js +7 -5
  81. package/dist/utils/error-handler.d.ts +24 -2
  82. package/dist/utils/error-handler.js +58 -23
  83. package/dist/utils/normalize.d.ts +7 -4
  84. package/dist/utils/normalize.js +12 -10
  85. package/dist/utils/path-security.d.ts +2 -0
  86. package/dist/utils/path-security.js +24 -0
  87. package/dist/utils/response-factory.d.ts +4 -4
  88. package/dist/utils/response-factory.js +15 -21
  89. package/dist/utils/response-validator.js +88 -73
  90. package/dist/utils/unreal-command-queue.d.ts +2 -0
  91. package/dist/utils/unreal-command-queue.js +8 -1
  92. package/docs/Migration-Guide-v0.5.0.md +1 -9
  93. package/docs/handler-mapping.md +4 -2
  94. package/docs/testing-guide.md +2 -2
  95. package/package.json +12 -6
  96. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridgeSubsystem.cpp +298 -33
  97. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_AnimationHandlers.cpp +7 -8
  98. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintGraphHandlers.cpp +229 -319
  99. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintHandlers.cpp +98 -0
  100. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_EffectHandlers.cpp +24 -0
  101. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_EnvironmentHandlers.cpp +96 -0
  102. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_LightingHandlers.cpp +52 -5
  103. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_ProcessRequest.cpp +5 -268
  104. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_SequenceHandlers.cpp +57 -2
  105. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpConnectionManager.cpp +0 -1
  106. package/scripts/run-all-tests.mjs +25 -20
  107. package/server.json +3 -2
  108. package/src/automation/bridge.ts +27 -25
  109. package/src/automation/connection-manager.ts +18 -0
  110. package/src/automation/message-handler.ts +33 -8
  111. package/src/automation/request-tracker.ts +39 -7
  112. package/src/config.ts +1 -1
  113. package/src/constants.ts +7 -0
  114. package/src/graphql/loaders.ts +244 -0
  115. package/src/graphql/resolvers.ts +47 -49
  116. package/src/graphql/server.ts +3 -1
  117. package/src/graphql/types.ts +3 -0
  118. package/src/index.ts +15 -2
  119. package/src/resources/assets.ts +5 -4
  120. package/src/server/tool-registry.ts +3 -3
  121. package/src/server-setup.ts +3 -37
  122. package/src/tools/actors.ts +77 -44
  123. package/src/tools/animation.ts +1 -0
  124. package/src/tools/assets.ts +76 -65
  125. package/src/tools/base-tool.ts +3 -3
  126. package/src/tools/blueprint.ts +170 -104
  127. package/src/tools/consolidated-tool-definitions.ts +2 -1
  128. package/src/tools/consolidated-tool-handlers.ts +129 -150
  129. package/src/tools/dynamic-handler-registry.ts +22 -140
  130. package/src/tools/editor.ts +43 -29
  131. package/src/tools/environment.ts +21 -27
  132. package/src/tools/foliage.ts +28 -25
  133. package/src/tools/handlers/actor-handlers.ts +16 -17
  134. package/src/tools/handlers/asset-handlers.ts +484 -484
  135. package/src/tools/handlers/sequence-handlers.ts +85 -62
  136. package/src/tools/introspection.ts +7 -7
  137. package/src/tools/landscape.ts +34 -28
  138. package/src/tools/level.ts +100 -80
  139. package/src/tools/lighting.ts +25 -20
  140. package/src/tools/materials.ts +9 -3
  141. package/src/tools/niagara.ts +44 -2
  142. package/src/tools/performance.ts +1 -2
  143. package/src/tools/physics.ts +7 -1
  144. package/src/tools/sequence.ts +42 -26
  145. package/src/tools/ui.ts +1 -3
  146. package/src/types/automation-responses.ts +119 -0
  147. package/src/types/responses.ts +355 -0
  148. package/src/types/tool-interfaces.ts +135 -135
  149. package/src/types/tool-types.ts +4 -0
  150. package/src/unreal-bridge.ts +71 -26
  151. package/src/utils/command-validator.ts +47 -5
  152. package/src/utils/error-handler.ts +128 -45
  153. package/src/utils/normalize.test.ts +162 -0
  154. package/src/utils/normalize.ts +38 -16
  155. package/src/utils/path-security.ts +43 -0
  156. package/src/utils/response-factory.ts +29 -24
  157. package/src/utils/response-validator.ts +103 -87
  158. package/src/utils/safe-json.test.ts +90 -0
  159. package/src/utils/unreal-command-queue.ts +13 -1
  160. package/src/utils/validation.test.ts +184 -0
  161. package/tests/test-animation.mjs +358 -33
  162. package/tests/test-asset-graph.mjs +311 -0
  163. package/tests/test-audio.mjs +314 -116
  164. package/tests/test-behavior-tree.mjs +327 -144
  165. package/tests/test-blueprint-graph.mjs +343 -12
  166. package/tests/test-control-editor.mjs +85 -53
  167. package/tests/test-graphql.mjs +58 -8
  168. package/tests/test-input.mjs +349 -0
  169. package/tests/test-inspect.mjs +291 -61
  170. package/tests/test-landscape.mjs +304 -48
  171. package/tests/test-lighting.mjs +428 -0
  172. package/tests/test-manage-level.mjs +70 -51
  173. package/tests/test-performance.mjs +539 -0
  174. package/tests/test-sequence.mjs +82 -46
  175. package/tests/test-system.mjs +72 -33
  176. package/tests/test-wasm.mjs +98 -8
  177. package/vitest.config.ts +35 -0
  178. package/.github/release-drafter.yml +0 -148
  179. package/dist/prompts/index.d.ts +0 -21
  180. package/dist/prompts/index.js +0 -217
  181. package/dist/tools/blueprint/helpers.d.ts +0 -29
  182. package/dist/tools/blueprint/helpers.js +0 -182
  183. package/src/prompts/index.ts +0 -249
  184. package/src/tools/blueprint/helpers.ts +0 -189
  185. package/tests/test-blueprint-events.mjs +0 -35
  186. package/tests/test-extra-tools.mjs +0 -38
  187. package/tests/test-render.mjs +0 -33
  188. package/tests/test-search-assets.mjs +0 -66
@@ -0,0 +1,349 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Comprehensive Input Management Test Suite
4
+ * Tool: manage_input
5
+ * Coverage: All 4 actions with success, error, and edge cases
6
+ */
7
+
8
+ import { runToolTests } from './test-runner.mjs';
9
+
10
+ const testCases = [
11
+ // === PRE-CLEANUP ===
12
+ {
13
+ scenario: 'Pre-cleanup: Delete existing test input assets',
14
+ toolName: 'manage_asset',
15
+ arguments: {
16
+ action: 'delete',
17
+ assetPaths: [
18
+ '/Game/Input/IA_TestJump',
19
+ '/Game/Input/IA_TestMove',
20
+ '/Game/Input/IA_TestLook',
21
+ '/Game/Input/IA_TestInteract',
22
+ '/Game/Input/IA_TestFire',
23
+ '/Game/Input/IMC_TestContext',
24
+ '/Game/Input/IMC_TestContext2'
25
+ ]
26
+ },
27
+ expected: 'success|not_found'
28
+ },
29
+
30
+ // === CREATE INPUT ACTIONS ===
31
+ {
32
+ scenario: 'Create Input Action - Jump',
33
+ toolName: 'manage_input',
34
+ arguments: {
35
+ action: 'create_input_action',
36
+ name: 'IA_TestJump',
37
+ path: '/Game/Input'
38
+ },
39
+ expected: 'success'
40
+ },
41
+ {
42
+ scenario: 'Create Input Action - Move',
43
+ toolName: 'manage_input',
44
+ arguments: {
45
+ action: 'create_input_action',
46
+ name: 'IA_TestMove',
47
+ path: '/Game/Input'
48
+ },
49
+ expected: 'success'
50
+ },
51
+ {
52
+ scenario: 'Create Input Action - Look',
53
+ toolName: 'manage_input',
54
+ arguments: {
55
+ action: 'create_input_action',
56
+ name: 'IA_TestLook',
57
+ path: '/Game/Input'
58
+ },
59
+ expected: 'success'
60
+ },
61
+ {
62
+ scenario: 'Create Input Action - Interact',
63
+ toolName: 'manage_input',
64
+ arguments: {
65
+ action: 'create_input_action',
66
+ name: 'IA_TestInteract',
67
+ path: '/Game/Input'
68
+ },
69
+ expected: 'success'
70
+ },
71
+ {
72
+ scenario: 'Create Input Action - Fire',
73
+ toolName: 'manage_input',
74
+ arguments: {
75
+ action: 'create_input_action',
76
+ name: 'IA_TestFire',
77
+ path: '/Game/Input'
78
+ },
79
+ expected: 'success'
80
+ },
81
+
82
+ // === CREATE INPUT MAPPING CONTEXTS ===
83
+ {
84
+ scenario: 'Create Input Mapping Context',
85
+ toolName: 'manage_input',
86
+ arguments: {
87
+ action: 'create_input_mapping_context',
88
+ name: 'IMC_TestContext',
89
+ path: '/Game/Input'
90
+ },
91
+ expected: 'success'
92
+ },
93
+ {
94
+ scenario: 'Create Second Mapping Context',
95
+ toolName: 'manage_input',
96
+ arguments: {
97
+ action: 'create_input_mapping_context',
98
+ name: 'IMC_TestContext2',
99
+ path: '/Game/Input'
100
+ },
101
+ expected: 'success'
102
+ },
103
+
104
+ // === ADD MAPPINGS ===
105
+ {
106
+ scenario: 'Add Mapping - Space to Jump',
107
+ toolName: 'manage_input',
108
+ arguments: {
109
+ action: 'add_mapping',
110
+ contextPath: '/Game/Input/IMC_TestContext',
111
+ actionPath: '/Game/Input/IA_TestJump',
112
+ key: 'SpaceBar'
113
+ },
114
+ expected: 'success'
115
+ },
116
+ {
117
+ scenario: 'Add Mapping - W to Move',
118
+ toolName: 'manage_input',
119
+ arguments: {
120
+ action: 'add_mapping',
121
+ contextPath: '/Game/Input/IMC_TestContext',
122
+ actionPath: '/Game/Input/IA_TestMove',
123
+ key: 'W'
124
+ },
125
+ expected: 'success'
126
+ },
127
+ {
128
+ scenario: 'Add Mapping - E to Interact',
129
+ toolName: 'manage_input',
130
+ arguments: {
131
+ action: 'add_mapping',
132
+ contextPath: '/Game/Input/IMC_TestContext',
133
+ actionPath: '/Game/Input/IA_TestInteract',
134
+ key: 'E'
135
+ },
136
+ expected: 'success'
137
+ },
138
+ {
139
+ scenario: 'Add Mapping - Mouse Left to Fire',
140
+ toolName: 'manage_input',
141
+ arguments: {
142
+ action: 'add_mapping',
143
+ contextPath: '/Game/Input/IMC_TestContext',
144
+ actionPath: '/Game/Input/IA_TestFire',
145
+ key: 'LeftMouseButton'
146
+ },
147
+ expected: 'success'
148
+ },
149
+ {
150
+ scenario: 'Add Mapping - Gamepad A to Jump',
151
+ toolName: 'manage_input',
152
+ arguments: {
153
+ action: 'add_mapping',
154
+ contextPath: '/Game/Input/IMC_TestContext',
155
+ actionPath: '/Game/Input/IA_TestJump',
156
+ key: 'Gamepad_FaceButton_Bottom'
157
+ },
158
+ expected: 'success'
159
+ },
160
+ {
161
+ scenario: 'Add Mapping - Right Trigger to Fire',
162
+ toolName: 'manage_input',
163
+ arguments: {
164
+ action: 'add_mapping',
165
+ contextPath: '/Game/Input/IMC_TestContext',
166
+ actionPath: '/Game/Input/IA_TestFire',
167
+ key: 'Gamepad_RightTrigger'
168
+ },
169
+ expected: 'success'
170
+ },
171
+ {
172
+ scenario: 'Add Mapping to second context',
173
+ toolName: 'manage_input',
174
+ arguments: {
175
+ action: 'add_mapping',
176
+ contextPath: '/Game/Input/IMC_TestContext2',
177
+ actionPath: '/Game/Input/IA_TestJump',
178
+ key: 'F'
179
+ },
180
+ expected: 'success'
181
+ },
182
+
183
+ // === REMOVE MAPPINGS ===
184
+ {
185
+ scenario: 'Remove Mapping - Gamepad A from Jump',
186
+ toolName: 'manage_input',
187
+ arguments: {
188
+ action: 'remove_mapping',
189
+ contextPath: '/Game/Input/IMC_TestContext',
190
+ actionPath: '/Game/Input/IA_TestJump',
191
+ key: 'Gamepad_FaceButton_Bottom'
192
+ },
193
+ expected: 'success'
194
+ },
195
+ {
196
+ scenario: 'Remove Mapping - Right Trigger from Fire',
197
+ toolName: 'manage_input',
198
+ arguments: {
199
+ action: 'remove_mapping',
200
+ contextPath: '/Game/Input/IMC_TestContext',
201
+ actionPath: '/Game/Input/IA_TestFire',
202
+ key: 'Gamepad_RightTrigger'
203
+ },
204
+ expected: 'success'
205
+ },
206
+
207
+ // === REAL-WORLD SCENARIO: Complete Character Input Setup ===
208
+ {
209
+ scenario: 'Character Setup - Add WASD Movement',
210
+ toolName: 'manage_input',
211
+ arguments: {
212
+ action: 'add_mapping',
213
+ contextPath: '/Game/Input/IMC_TestContext',
214
+ actionPath: '/Game/Input/IA_TestMove',
215
+ key: 'A'
216
+ },
217
+ expected: 'success'
218
+ },
219
+ {
220
+ scenario: 'Character Setup - Add S Movement',
221
+ toolName: 'manage_input',
222
+ arguments: {
223
+ action: 'add_mapping',
224
+ contextPath: '/Game/Input/IMC_TestContext',
225
+ actionPath: '/Game/Input/IA_TestMove',
226
+ key: 'S'
227
+ },
228
+ expected: 'success'
229
+ },
230
+ {
231
+ scenario: 'Character Setup - Add D Movement',
232
+ toolName: 'manage_input',
233
+ arguments: {
234
+ action: 'add_mapping',
235
+ contextPath: '/Game/Input/IMC_TestContext',
236
+ actionPath: '/Game/Input/IA_TestMove',
237
+ key: 'D'
238
+ },
239
+ expected: 'success'
240
+ },
241
+ {
242
+ scenario: 'Character Setup - Mouse Look',
243
+ toolName: 'manage_input',
244
+ arguments: {
245
+ action: 'add_mapping',
246
+ contextPath: '/Game/Input/IMC_TestContext',
247
+ actionPath: '/Game/Input/IA_TestLook',
248
+ key: 'Mouse2D'
249
+ },
250
+ expected: 'success'
251
+ },
252
+
253
+ // === ERROR CASES ===
254
+ {
255
+ scenario: 'Error: Create action without name',
256
+ toolName: 'manage_input',
257
+ arguments: {
258
+ action: 'create_input_action',
259
+ path: '/Game/Input'
260
+ },
261
+ expected: 'error|missing'
262
+ },
263
+ {
264
+ scenario: 'Error: Create context without name',
265
+ toolName: 'manage_input',
266
+ arguments: {
267
+ action: 'create_input_mapping_context',
268
+ path: '/Game/Input'
269
+ },
270
+ expected: 'error|missing'
271
+ },
272
+ {
273
+ scenario: 'Error: Add mapping to non-existent context',
274
+ toolName: 'manage_input',
275
+ arguments: {
276
+ action: 'add_mapping',
277
+ contextPath: '/Game/Input/IMC_NonExistent',
278
+ actionPath: '/Game/Input/IA_TestJump',
279
+ key: 'X'
280
+ },
281
+ expected: 'error|not_found'
282
+ },
283
+ {
284
+ scenario: 'Error: Add mapping with non-existent action',
285
+ toolName: 'manage_input',
286
+ arguments: {
287
+ action: 'add_mapping',
288
+ contextPath: '/Game/Input/IMC_TestContext',
289
+ actionPath: '/Game/Input/IA_NonExistent',
290
+ key: 'X'
291
+ },
292
+ expected: 'error|not_found'
293
+ },
294
+ {
295
+ scenario: 'Error: Remove non-existent mapping',
296
+ toolName: 'manage_input',
297
+ arguments: {
298
+ action: 'remove_mapping',
299
+ contextPath: '/Game/Input/IMC_TestContext',
300
+ actionPath: '/Game/Input/IA_TestJump',
301
+ key: 'InvalidKey'
302
+ },
303
+ expected: 'error|not_found'
304
+ },
305
+
306
+ // === EDGE CASES ===
307
+ {
308
+ scenario: 'Edge: Create action with empty path',
309
+ toolName: 'manage_input',
310
+ arguments: {
311
+ action: 'create_input_action',
312
+ name: 'IA_TestEmpty',
313
+ path: ''
314
+ },
315
+ expected: 'error|validation'
316
+ },
317
+ {
318
+ scenario: 'Edge: Add duplicate mapping (same key)',
319
+ toolName: 'manage_input',
320
+ arguments: {
321
+ action: 'add_mapping',
322
+ contextPath: '/Game/Input/IMC_TestContext',
323
+ actionPath: '/Game/Input/IA_TestJump',
324
+ key: 'SpaceBar'
325
+ },
326
+ expected: 'success|already_exists'
327
+ },
328
+
329
+ // === CLEANUP ===
330
+ {
331
+ scenario: 'Cleanup: Delete all test input assets',
332
+ toolName: 'manage_asset',
333
+ arguments: {
334
+ action: 'delete',
335
+ assetPaths: [
336
+ '/Game/Input/IA_TestJump',
337
+ '/Game/Input/IA_TestMove',
338
+ '/Game/Input/IA_TestLook',
339
+ '/Game/Input/IA_TestInteract',
340
+ '/Game/Input/IA_TestFire',
341
+ '/Game/Input/IMC_TestContext',
342
+ '/Game/Input/IMC_TestContext2'
343
+ ]
344
+ },
345
+ expected: 'success|not_found'
346
+ }
347
+ ];
348
+
349
+ await runToolTests('Input Management', testCases);