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.
- package/.env.example +1 -1
- package/.github/release-drafter-config.yml +51 -0
- package/.github/workflows/greetings.yml +5 -1
- package/.github/workflows/labeler.yml +2 -1
- package/.github/workflows/publish-mcp.yml +1 -0
- package/.github/workflows/release-drafter.yml +1 -1
- package/.github/workflows/release.yml +3 -3
- package/CHANGELOG.md +71 -0
- package/CONTRIBUTING.md +1 -1
- package/GEMINI.md +115 -0
- package/Public/Plugin_setup_guide.mp4 +0 -0
- package/README.md +166 -200
- package/dist/config.d.ts +0 -1
- package/dist/config.js +0 -1
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +4 -0
- package/dist/graphql/loaders.d.ts +64 -0
- package/dist/graphql/loaders.js +117 -0
- package/dist/graphql/resolvers.d.ts +3 -3
- package/dist/graphql/resolvers.js +33 -30
- package/dist/graphql/server.js +3 -1
- package/dist/graphql/types.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +13 -2
- package/dist/server-setup.d.ts +0 -1
- package/dist/server-setup.js +0 -40
- package/dist/tools/actors.d.ts +40 -24
- package/dist/tools/actors.js +8 -2
- package/dist/tools/assets.d.ts +19 -71
- package/dist/tools/assets.js +28 -22
- package/dist/tools/base-tool.d.ts +4 -4
- package/dist/tools/base-tool.js +1 -1
- package/dist/tools/blueprint.d.ts +33 -61
- package/dist/tools/consolidated-tool-handlers.js +96 -110
- package/dist/tools/dynamic-handler-registry.d.ts +11 -9
- package/dist/tools/dynamic-handler-registry.js +17 -95
- package/dist/tools/editor.d.ts +19 -193
- package/dist/tools/editor.js +8 -0
- package/dist/tools/environment.d.ts +8 -14
- package/dist/tools/foliage.d.ts +18 -143
- package/dist/tools/foliage.js +4 -2
- package/dist/tools/handlers/actor-handlers.js +0 -5
- package/dist/tools/handlers/asset-handlers.js +454 -454
- package/dist/tools/landscape.d.ts +16 -116
- package/dist/tools/landscape.js +7 -3
- package/dist/tools/level.d.ts +22 -103
- package/dist/tools/level.js +24 -16
- package/dist/tools/lighting.js +5 -1
- package/dist/tools/materials.js +5 -1
- package/dist/tools/niagara.js +37 -2
- package/dist/tools/performance.d.ts +0 -1
- package/dist/tools/performance.js +0 -1
- package/dist/tools/physics.js +5 -1
- package/dist/tools/sequence.d.ts +24 -24
- package/dist/tools/sequence.js +13 -0
- package/dist/tools/ui.d.ts +0 -2
- package/dist/types/automation-responses.d.ts +115 -0
- package/dist/types/automation-responses.js +2 -0
- package/dist/types/responses.d.ts +249 -0
- package/dist/types/responses.js +2 -0
- package/dist/types/tool-interfaces.d.ts +135 -135
- package/dist/utils/command-validator.js +3 -2
- package/dist/utils/path-security.d.ts +2 -0
- package/dist/utils/path-security.js +24 -0
- package/dist/utils/response-factory.d.ts +4 -4
- package/dist/utils/response-factory.js +15 -21
- package/docs/Migration-Guide-v0.5.0.md +1 -9
- package/docs/testing-guide.md +2 -2
- package/package.json +12 -6
- package/scripts/run-all-tests.mjs +25 -20
- package/server.json +3 -2
- package/src/config.ts +1 -1
- package/src/constants.ts +7 -0
- package/src/graphql/loaders.ts +244 -0
- package/src/graphql/resolvers.ts +47 -49
- package/src/graphql/server.ts +3 -1
- package/src/graphql/types.ts +3 -0
- package/src/index.ts +15 -2
- package/src/resources/assets.ts +5 -4
- package/src/server-setup.ts +3 -37
- package/src/tools/actors.ts +36 -28
- package/src/tools/animation.ts +1 -0
- package/src/tools/assets.ts +74 -63
- package/src/tools/base-tool.ts +3 -3
- package/src/tools/blueprint.ts +59 -59
- package/src/tools/consolidated-tool-handlers.ts +129 -150
- package/src/tools/dynamic-handler-registry.ts +22 -140
- package/src/tools/editor.ts +39 -26
- package/src/tools/environment.ts +21 -27
- package/src/tools/foliage.ts +28 -25
- package/src/tools/handlers/actor-handlers.ts +2 -8
- package/src/tools/handlers/asset-handlers.ts +484 -484
- package/src/tools/handlers/sequence-handlers.ts +1 -1
- package/src/tools/landscape.ts +34 -28
- package/src/tools/level.ts +96 -76
- package/src/tools/lighting.ts +6 -1
- package/src/tools/materials.ts +8 -2
- package/src/tools/niagara.ts +44 -2
- package/src/tools/performance.ts +1 -2
- package/src/tools/physics.ts +7 -1
- package/src/tools/sequence.ts +41 -25
- package/src/tools/ui.ts +0 -2
- package/src/types/automation-responses.ts +119 -0
- package/src/types/responses.ts +355 -0
- package/src/types/tool-interfaces.ts +135 -135
- package/src/utils/command-validator.ts +3 -2
- package/src/utils/normalize.test.ts +162 -0
- package/src/utils/path-security.ts +43 -0
- package/src/utils/response-factory.ts +29 -24
- package/src/utils/safe-json.test.ts +90 -0
- package/src/utils/validation.test.ts +184 -0
- package/tests/test-animation.mjs +358 -33
- package/tests/test-asset-graph.mjs +311 -0
- package/tests/test-audio.mjs +314 -116
- package/tests/test-behavior-tree.mjs +327 -144
- package/tests/test-blueprint-graph.mjs +343 -12
- package/tests/test-control-editor.mjs +85 -53
- package/tests/test-graphql.mjs +58 -8
- package/tests/test-input.mjs +349 -0
- package/tests/test-inspect.mjs +291 -61
- package/tests/test-landscape.mjs +304 -48
- package/tests/test-lighting.mjs +428 -0
- package/tests/test-manage-level.mjs +70 -51
- package/tests/test-performance.mjs +539 -0
- package/tests/test-sequence.mjs +82 -46
- package/tests/test-system.mjs +72 -33
- package/tests/test-wasm.mjs +98 -8
- package/vitest.config.ts +35 -0
- package/.github/release-drafter.yml +0 -148
- package/dist/prompts/index.d.ts +0 -21
- package/dist/prompts/index.js +0 -217
- package/dist/tools/blueprint/helpers.d.ts +0 -29
- package/dist/tools/blueprint/helpers.js +0 -182
- package/src/prompts/index.ts +0 -249
- package/src/tools/blueprint/helpers.ts +0 -189
- package/tests/test-blueprint-events.mjs +0 -35
- package/tests/test-extra-tools.mjs +0 -38
- package/tests/test-render.mjs +0 -33
- 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);
|