unreal-engine-mcp-server 0.5.0 → 0.5.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.
Files changed (139) 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 +1 -0
  6. package/.github/workflows/release-drafter.yml +1 -1
  7. package/.github/workflows/release.yml +3 -3
  8. package/CHANGELOG.md +71 -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/config.d.ts +0 -1
  14. package/dist/config.js +0 -1
  15. package/dist/constants.d.ts +4 -0
  16. package/dist/constants.js +4 -0
  17. package/dist/graphql/loaders.d.ts +64 -0
  18. package/dist/graphql/loaders.js +117 -0
  19. package/dist/graphql/resolvers.d.ts +3 -3
  20. package/dist/graphql/resolvers.js +33 -30
  21. package/dist/graphql/server.js +3 -1
  22. package/dist/graphql/types.d.ts +2 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +13 -2
  25. package/dist/server-setup.d.ts +0 -1
  26. package/dist/server-setup.js +0 -40
  27. package/dist/tools/actors.d.ts +40 -24
  28. package/dist/tools/actors.js +8 -2
  29. package/dist/tools/assets.d.ts +19 -71
  30. package/dist/tools/assets.js +28 -22
  31. package/dist/tools/base-tool.d.ts +4 -4
  32. package/dist/tools/base-tool.js +1 -1
  33. package/dist/tools/blueprint.d.ts +33 -61
  34. package/dist/tools/consolidated-tool-handlers.js +96 -110
  35. package/dist/tools/dynamic-handler-registry.d.ts +11 -9
  36. package/dist/tools/dynamic-handler-registry.js +17 -95
  37. package/dist/tools/editor.d.ts +19 -193
  38. package/dist/tools/editor.js +8 -0
  39. package/dist/tools/environment.d.ts +8 -14
  40. package/dist/tools/foliage.d.ts +18 -143
  41. package/dist/tools/foliage.js +4 -2
  42. package/dist/tools/handlers/actor-handlers.js +0 -5
  43. package/dist/tools/handlers/asset-handlers.js +454 -454
  44. package/dist/tools/landscape.d.ts +16 -116
  45. package/dist/tools/landscape.js +7 -3
  46. package/dist/tools/level.d.ts +22 -103
  47. package/dist/tools/level.js +24 -16
  48. package/dist/tools/lighting.js +5 -1
  49. package/dist/tools/materials.js +5 -1
  50. package/dist/tools/niagara.js +37 -2
  51. package/dist/tools/performance.d.ts +0 -1
  52. package/dist/tools/performance.js +0 -1
  53. package/dist/tools/physics.js +5 -1
  54. package/dist/tools/sequence.d.ts +24 -24
  55. package/dist/tools/sequence.js +13 -0
  56. package/dist/tools/ui.d.ts +0 -2
  57. package/dist/types/automation-responses.d.ts +115 -0
  58. package/dist/types/automation-responses.js +2 -0
  59. package/dist/types/responses.d.ts +249 -0
  60. package/dist/types/responses.js +2 -0
  61. package/dist/types/tool-interfaces.d.ts +135 -135
  62. package/dist/utils/command-validator.js +3 -2
  63. package/dist/utils/path-security.d.ts +2 -0
  64. package/dist/utils/path-security.js +24 -0
  65. package/dist/utils/response-factory.d.ts +4 -4
  66. package/dist/utils/response-factory.js +15 -21
  67. package/docs/Migration-Guide-v0.5.0.md +1 -9
  68. package/docs/testing-guide.md +2 -2
  69. package/package.json +12 -6
  70. package/scripts/run-all-tests.mjs +25 -20
  71. package/server.json +3 -2
  72. package/src/config.ts +1 -1
  73. package/src/constants.ts +7 -0
  74. package/src/graphql/loaders.ts +244 -0
  75. package/src/graphql/resolvers.ts +47 -49
  76. package/src/graphql/server.ts +3 -1
  77. package/src/graphql/types.ts +3 -0
  78. package/src/index.ts +15 -2
  79. package/src/resources/assets.ts +5 -4
  80. package/src/server-setup.ts +3 -37
  81. package/src/tools/actors.ts +36 -28
  82. package/src/tools/animation.ts +1 -0
  83. package/src/tools/assets.ts +74 -63
  84. package/src/tools/base-tool.ts +3 -3
  85. package/src/tools/blueprint.ts +59 -59
  86. package/src/tools/consolidated-tool-handlers.ts +129 -150
  87. package/src/tools/dynamic-handler-registry.ts +22 -140
  88. package/src/tools/editor.ts +39 -26
  89. package/src/tools/environment.ts +21 -27
  90. package/src/tools/foliage.ts +28 -25
  91. package/src/tools/handlers/actor-handlers.ts +2 -8
  92. package/src/tools/handlers/asset-handlers.ts +484 -484
  93. package/src/tools/handlers/sequence-handlers.ts +1 -1
  94. package/src/tools/landscape.ts +34 -28
  95. package/src/tools/level.ts +96 -76
  96. package/src/tools/lighting.ts +6 -1
  97. package/src/tools/materials.ts +8 -2
  98. package/src/tools/niagara.ts +44 -2
  99. package/src/tools/performance.ts +1 -2
  100. package/src/tools/physics.ts +7 -1
  101. package/src/tools/sequence.ts +41 -25
  102. package/src/tools/ui.ts +0 -2
  103. package/src/types/automation-responses.ts +119 -0
  104. package/src/types/responses.ts +355 -0
  105. package/src/types/tool-interfaces.ts +135 -135
  106. package/src/utils/command-validator.ts +3 -2
  107. package/src/utils/normalize.test.ts +162 -0
  108. package/src/utils/path-security.ts +43 -0
  109. package/src/utils/response-factory.ts +29 -24
  110. package/src/utils/safe-json.test.ts +90 -0
  111. package/src/utils/validation.test.ts +184 -0
  112. package/tests/test-animation.mjs +358 -33
  113. package/tests/test-asset-graph.mjs +311 -0
  114. package/tests/test-audio.mjs +314 -116
  115. package/tests/test-behavior-tree.mjs +327 -144
  116. package/tests/test-blueprint-graph.mjs +343 -12
  117. package/tests/test-control-editor.mjs +85 -53
  118. package/tests/test-graphql.mjs +58 -8
  119. package/tests/test-input.mjs +349 -0
  120. package/tests/test-inspect.mjs +291 -61
  121. package/tests/test-landscape.mjs +304 -48
  122. package/tests/test-lighting.mjs +428 -0
  123. package/tests/test-manage-level.mjs +70 -51
  124. package/tests/test-performance.mjs +539 -0
  125. package/tests/test-sequence.mjs +82 -46
  126. package/tests/test-system.mjs +72 -33
  127. package/tests/test-wasm.mjs +98 -8
  128. package/vitest.config.ts +35 -0
  129. package/.github/release-drafter.yml +0 -148
  130. package/dist/prompts/index.d.ts +0 -21
  131. package/dist/prompts/index.js +0 -217
  132. package/dist/tools/blueprint/helpers.d.ts +0 -29
  133. package/dist/tools/blueprint/helpers.js +0 -182
  134. package/src/prompts/index.ts +0 -249
  135. package/src/tools/blueprint/helpers.ts +0 -189
  136. package/tests/test-blueprint-events.mjs +0 -35
  137. package/tests/test-extra-tools.mjs +0 -38
  138. package/tests/test-render.mjs +0 -33
  139. 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);