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,539 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Comprehensive Performance Management Test Suite
4
+ * Tool: manage_performance
5
+ * Coverage: All 19 actions with success, error, and edge cases
6
+ */
7
+
8
+ import { runToolTests } from './test-runner.mjs';
9
+
10
+ const testCases = [
11
+ // === PROFILING (start_profiling, stop_profiling, run_benchmark) ===
12
+ {
13
+ scenario: 'Start CPU Profiling',
14
+ toolName: 'manage_performance',
15
+ arguments: {
16
+ action: 'start_profiling',
17
+ type: 'CPU',
18
+ outputPath: './tests/reports'
19
+ },
20
+ expected: 'success'
21
+ },
22
+ {
23
+ scenario: 'Stop CPU Profiling',
24
+ toolName: 'manage_performance',
25
+ arguments: {
26
+ action: 'stop_profiling',
27
+ type: 'CPU'
28
+ },
29
+ expected: 'success'
30
+ },
31
+ {
32
+ scenario: 'Start GPU Profiling',
33
+ toolName: 'manage_performance',
34
+ arguments: {
35
+ action: 'start_profiling',
36
+ type: 'GPU'
37
+ },
38
+ expected: 'success'
39
+ },
40
+ {
41
+ scenario: 'Stop GPU Profiling',
42
+ toolName: 'manage_performance',
43
+ arguments: {
44
+ action: 'stop_profiling',
45
+ type: 'GPU'
46
+ },
47
+ expected: 'success'
48
+ },
49
+ {
50
+ scenario: 'Start Memory Profiling',
51
+ toolName: 'manage_performance',
52
+ arguments: {
53
+ action: 'start_profiling',
54
+ type: 'Memory',
55
+ detailed: true
56
+ },
57
+ expected: 'success'
58
+ },
59
+ {
60
+ scenario: 'Stop Memory Profiling',
61
+ toolName: 'manage_performance',
62
+ arguments: {
63
+ action: 'stop_profiling',
64
+ type: 'Memory'
65
+ },
66
+ expected: 'success'
67
+ },
68
+ {
69
+ scenario: 'Start RenderThread Profiling',
70
+ toolName: 'manage_performance',
71
+ arguments: {
72
+ action: 'start_profiling',
73
+ type: 'RenderThread'
74
+ },
75
+ expected: 'success'
76
+ },
77
+ {
78
+ scenario: 'Stop RenderThread Profiling',
79
+ toolName: 'manage_performance',
80
+ arguments: {
81
+ action: 'stop_profiling',
82
+ type: 'RenderThread'
83
+ },
84
+ expected: 'success'
85
+ },
86
+ {
87
+ scenario: 'Start GameThread Profiling',
88
+ toolName: 'manage_performance',
89
+ arguments: {
90
+ action: 'start_profiling',
91
+ type: 'GameThread'
92
+ },
93
+ expected: 'success'
94
+ },
95
+ {
96
+ scenario: 'Stop GameThread Profiling',
97
+ toolName: 'manage_performance',
98
+ arguments: {
99
+ action: 'stop_profiling',
100
+ type: 'GameThread'
101
+ },
102
+ expected: 'success'
103
+ },
104
+ {
105
+ scenario: 'Run Benchmark',
106
+ toolName: 'manage_performance',
107
+ arguments: {
108
+ action: 'run_benchmark',
109
+ duration: 5,
110
+ verbose: false
111
+ },
112
+ expected: 'success'
113
+ },
114
+
115
+ // === DISPLAY (show_fps, show_stats, generate_memory_report) ===
116
+ {
117
+ scenario: 'Show FPS',
118
+ toolName: 'manage_performance',
119
+ arguments: {
120
+ action: 'show_fps',
121
+ enabled: true
122
+ },
123
+ expected: 'success'
124
+ },
125
+ {
126
+ scenario: 'Hide FPS',
127
+ toolName: 'manage_performance',
128
+ arguments: {
129
+ action: 'show_fps',
130
+ enabled: false
131
+ },
132
+ expected: 'success'
133
+ },
134
+ {
135
+ scenario: 'Show Stats',
136
+ toolName: 'manage_performance',
137
+ arguments: {
138
+ action: 'show_stats',
139
+ category: 'Unit'
140
+ },
141
+ expected: 'success'
142
+ },
143
+ {
144
+ scenario: 'Generate Memory Report',
145
+ toolName: 'manage_performance',
146
+ arguments: {
147
+ action: 'generate_memory_report',
148
+ outputPath: './tests/reports/memory_report.txt',
149
+ detailed: true
150
+ },
151
+ expected: 'success'
152
+ },
153
+
154
+ // === SCALABILITY (set_scalability, set_resolution_scale, set_vsync, set_frame_rate_limit) ===
155
+ {
156
+ scenario: 'Set Scalability Low',
157
+ toolName: 'manage_performance',
158
+ arguments: {
159
+ action: 'set_scalability',
160
+ level: 0
161
+ },
162
+ expected: 'success'
163
+ },
164
+ {
165
+ scenario: 'Set Scalability Medium',
166
+ toolName: 'manage_performance',
167
+ arguments: {
168
+ action: 'set_scalability',
169
+ level: 1
170
+ },
171
+ expected: 'success'
172
+ },
173
+ {
174
+ scenario: 'Set Scalability High',
175
+ toolName: 'manage_performance',
176
+ arguments: {
177
+ action: 'set_scalability',
178
+ level: 2
179
+ },
180
+ expected: 'success'
181
+ },
182
+ {
183
+ scenario: 'Set Scalability Epic',
184
+ toolName: 'manage_performance',
185
+ arguments: {
186
+ action: 'set_scalability',
187
+ level: 3
188
+ },
189
+ expected: 'success'
190
+ },
191
+ {
192
+ scenario: 'Set Resolution Scale 100%',
193
+ toolName: 'manage_performance',
194
+ arguments: {
195
+ action: 'set_resolution_scale',
196
+ scale: 100
197
+ },
198
+ expected: 'success'
199
+ },
200
+ {
201
+ scenario: 'Set Resolution Scale 50%',
202
+ toolName: 'manage_performance',
203
+ arguments: {
204
+ action: 'set_resolution_scale',
205
+ scale: 50
206
+ },
207
+ expected: 'success'
208
+ },
209
+ {
210
+ scenario: 'Enable VSync',
211
+ toolName: 'manage_performance',
212
+ arguments: {
213
+ action: 'set_vsync',
214
+ enabled: true
215
+ },
216
+ expected: 'success'
217
+ },
218
+ {
219
+ scenario: 'Disable VSync',
220
+ toolName: 'manage_performance',
221
+ arguments: {
222
+ action: 'set_vsync',
223
+ enabled: false
224
+ },
225
+ expected: 'success'
226
+ },
227
+ {
228
+ scenario: 'Set Frame Rate Limit 60',
229
+ toolName: 'manage_performance',
230
+ arguments: {
231
+ action: 'set_frame_rate_limit',
232
+ maxFPS: 60
233
+ },
234
+ expected: 'success'
235
+ },
236
+ {
237
+ scenario: 'Set Frame Rate Limit 120',
238
+ toolName: 'manage_performance',
239
+ arguments: {
240
+ action: 'set_frame_rate_limit',
241
+ maxFPS: 120
242
+ },
243
+ expected: 'success'
244
+ },
245
+ {
246
+ scenario: 'Uncap Frame Rate',
247
+ toolName: 'manage_performance',
248
+ arguments: {
249
+ action: 'set_frame_rate_limit',
250
+ maxFPS: 0
251
+ },
252
+ expected: 'success'
253
+ },
254
+
255
+ // === GPU TIMING (enable_gpu_timing) ===
256
+ {
257
+ scenario: 'Enable GPU Timing',
258
+ toolName: 'manage_performance',
259
+ arguments: {
260
+ action: 'enable_gpu_timing',
261
+ enabled: true
262
+ },
263
+ expected: 'success'
264
+ },
265
+ {
266
+ scenario: 'Disable GPU Timing',
267
+ toolName: 'manage_performance',
268
+ arguments: {
269
+ action: 'enable_gpu_timing',
270
+ enabled: false
271
+ },
272
+ expected: 'success'
273
+ },
274
+
275
+ // === TEXTURE STREAMING (configure_texture_streaming) ===
276
+ {
277
+ scenario: 'Configure Texture Streaming',
278
+ toolName: 'manage_performance',
279
+ arguments: {
280
+ action: 'configure_texture_streaming',
281
+ poolSize: 1024,
282
+ streamingDistance: 5000,
283
+ boostPlayerLocation: true
284
+ },
285
+ expected: 'success'
286
+ },
287
+ {
288
+ scenario: 'Disable Texture Streaming',
289
+ toolName: 'manage_performance',
290
+ arguments: {
291
+ action: 'configure_texture_streaming',
292
+ enabled: false
293
+ },
294
+ expected: 'success'
295
+ },
296
+
297
+ // === LOD (configure_lod) ===
298
+ {
299
+ scenario: 'Configure LOD',
300
+ toolName: 'manage_performance',
301
+ arguments: {
302
+ action: 'configure_lod',
303
+ distanceScale: 1.0,
304
+ lodBias: 0,
305
+ skeletalBias: 0
306
+ },
307
+ expected: 'success'
308
+ },
309
+ {
310
+ scenario: 'Configure Aggressive LOD',
311
+ toolName: 'manage_performance',
312
+ arguments: {
313
+ action: 'configure_lod',
314
+ distanceScale: 0.5,
315
+ lodBias: 1.0
316
+ },
317
+ expected: 'success'
318
+ },
319
+ {
320
+ scenario: 'Force LOD Level',
321
+ toolName: 'manage_performance',
322
+ arguments: {
323
+ action: 'configure_lod',
324
+ forceLOD: 2
325
+ },
326
+ expected: 'success'
327
+ },
328
+
329
+ // === BASELINE SETTINGS (apply_baseline_settings) ===
330
+ {
331
+ scenario: 'Apply Baseline Settings - Mobile',
332
+ toolName: 'manage_performance',
333
+ arguments: {
334
+ action: 'apply_baseline_settings',
335
+ platform: 'Mobile'
336
+ },
337
+ expected: 'success'
338
+ },
339
+ {
340
+ scenario: 'Apply Baseline Settings - Console',
341
+ toolName: 'manage_performance',
342
+ arguments: {
343
+ action: 'apply_baseline_settings',
344
+ platform: 'Console'
345
+ },
346
+ expected: 'success'
347
+ },
348
+ {
349
+ scenario: 'Apply Baseline Settings - PC',
350
+ toolName: 'manage_performance',
351
+ arguments: {
352
+ action: 'apply_baseline_settings',
353
+ platform: 'PC'
354
+ },
355
+ expected: 'success'
356
+ },
357
+
358
+ // === DRAW CALLS (optimize_draw_calls) ===
359
+ {
360
+ scenario: 'Optimize Draw Calls',
361
+ toolName: 'manage_performance',
362
+ arguments: {
363
+ action: 'optimize_draw_calls',
364
+ enableInstancing: true,
365
+ enableBatching: true,
366
+ mergeActors: false
367
+ },
368
+ expected: 'success'
369
+ },
370
+
371
+ // === MERGE ACTORS ===
372
+ {
373
+ scenario: 'Merge Actors',
374
+ toolName: 'manage_performance',
375
+ arguments: {
376
+ action: 'merge_actors',
377
+ actors: ['StaticMeshActor_1', 'StaticMeshActor_2']
378
+ },
379
+ expected: 'success|not_found'
380
+ },
381
+
382
+ // === OCCLUSION (configure_occlusion_culling) ===
383
+ {
384
+ scenario: 'Configure Occlusion Culling',
385
+ toolName: 'manage_performance',
386
+ arguments: {
387
+ action: 'configure_occlusion_culling',
388
+ enabled: true,
389
+ hzb: true,
390
+ freezeRendering: false
391
+ },
392
+ expected: 'success'
393
+ },
394
+ {
395
+ scenario: 'Disable Occlusion Culling',
396
+ toolName: 'manage_performance',
397
+ arguments: {
398
+ action: 'configure_occlusion_culling',
399
+ enabled: false
400
+ },
401
+ expected: 'success'
402
+ },
403
+
404
+ // === SHADERS (optimize_shaders) ===
405
+ {
406
+ scenario: 'Optimize Shaders',
407
+ toolName: 'manage_performance',
408
+ arguments: {
409
+ action: 'optimize_shaders',
410
+ reducePermutations: true,
411
+ cacheShaders: true,
412
+ compileOnDemand: false
413
+ },
414
+ expected: 'success'
415
+ },
416
+
417
+ // === NANITE (configure_nanite) ===
418
+ {
419
+ scenario: 'Configure Nanite',
420
+ toolName: 'manage_performance',
421
+ arguments: {
422
+ action: 'configure_nanite',
423
+ enabled: true,
424
+ maxPixelsPerEdge: 1
425
+ },
426
+ expected: 'success|not_supported'
427
+ },
428
+ {
429
+ scenario: 'Disable Nanite',
430
+ toolName: 'manage_performance',
431
+ arguments: {
432
+ action: 'configure_nanite',
433
+ enabled: false
434
+ },
435
+ expected: 'success|not_supported'
436
+ },
437
+
438
+ // === WORLD PARTITION (configure_world_partition) ===
439
+ {
440
+ scenario: 'Configure World Partition',
441
+ toolName: 'manage_performance',
442
+ arguments: {
443
+ action: 'configure_world_partition',
444
+ enabled: true,
445
+ cellSize: 25600,
446
+ streamingPoolSize: 512
447
+ },
448
+ expected: 'success|not_supported'
449
+ },
450
+
451
+ // === ERROR CASES ===
452
+ {
453
+ scenario: 'Error: Invalid Profiling Type',
454
+ toolName: 'manage_performance',
455
+ arguments: {
456
+ action: 'start_profiling',
457
+ type: 'InvalidType'
458
+ },
459
+ expected: 'error|unknown_type'
460
+ },
461
+ {
462
+ scenario: 'Error: Invalid Scalability Level',
463
+ toolName: 'manage_performance',
464
+ arguments: {
465
+ action: 'set_scalability',
466
+ level: 999
467
+ },
468
+ expected: 'error|clamped'
469
+ },
470
+ {
471
+ scenario: 'Error: Invalid Platform',
472
+ toolName: 'manage_performance',
473
+ arguments: {
474
+ action: 'apply_baseline_settings',
475
+ platform: 'InvalidPlatform'
476
+ },
477
+ expected: 'error|unknown_platform'
478
+ },
479
+
480
+ // === EDGE CASES ===
481
+ {
482
+ scenario: 'Edge: Resolution Scale 0%',
483
+ toolName: 'manage_performance',
484
+ arguments: {
485
+ action: 'set_resolution_scale',
486
+ scale: 0
487
+ },
488
+ expected: 'success|clamped'
489
+ },
490
+ {
491
+ scenario: 'Edge: Resolution Scale 200%',
492
+ toolName: 'manage_performance',
493
+ arguments: {
494
+ action: 'set_resolution_scale',
495
+ scale: 200
496
+ },
497
+ expected: 'success'
498
+ },
499
+ {
500
+ scenario: 'Edge: Negative Frame Rate',
501
+ toolName: 'manage_performance',
502
+ arguments: {
503
+ action: 'set_frame_rate_limit',
504
+ maxFPS: -60
505
+ },
506
+ expected: 'success|handled'
507
+ },
508
+ {
509
+ scenario: 'Edge: Very Large Pool Size',
510
+ toolName: 'manage_performance',
511
+ arguments: {
512
+ action: 'configure_texture_streaming',
513
+ poolSize: 100000
514
+ },
515
+ expected: 'success|clamped'
516
+ },
517
+
518
+ // === RESET TO DEFAULTS ===
519
+ {
520
+ scenario: 'Reset - Set Resolution Scale 100%',
521
+ toolName: 'manage_performance',
522
+ arguments: {
523
+ action: 'set_resolution_scale',
524
+ scale: 100
525
+ },
526
+ expected: 'success'
527
+ },
528
+ {
529
+ scenario: 'Reset - Set Frame Rate Limit 0 (uncapped)',
530
+ toolName: 'manage_performance',
531
+ arguments: {
532
+ action: 'set_frame_rate_limit',
533
+ maxFPS: 0
534
+ },
535
+ expected: 'success'
536
+ }
537
+ ];
538
+
539
+ await runToolTests('Performance Management', testCases);