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
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Behavior Tree Test Suite (20 cases)
3
+ * Comprehensive Behavior Tree Test Suite
4
4
  * Tool: manage_behavior_tree
5
+ * Coverage: All 6 actions with success, error, and edge cases
5
6
  */
6
7
 
7
8
  import { runToolTests } from './test-runner.mjs';
@@ -9,252 +10,434 @@ import { runToolTests } from './test-runner.mjs';
9
10
  const btPath = '/Game/AI/BT_TestTree';
10
11
 
11
12
  const testCases = [
12
- // Setup: Create a Behavior Tree asset first
13
+ // === PRE-CLEANUP ===
13
14
  {
14
- scenario: "Create Behavior Tree Asset",
15
- toolName: "manage_asset",
15
+ scenario: 'Pre-cleanup: Delete existing BT',
16
+ toolName: 'manage_asset',
17
+ arguments: { action: 'delete', assetPaths: [btPath] },
18
+ expected: 'success|not_found'
19
+ },
20
+
21
+ // === CREATE ===
22
+ {
23
+ scenario: 'Create Behavior Tree',
24
+ toolName: 'manage_behavior_tree',
16
25
  arguments: {
17
- action: "create_asset", // Assuming generic asset creation or create_behavior_tree if specialized
18
- // Actually, let's use generic import or assume it exists for now,
19
- // or create via blueprint/asset tools if supported.
20
- // Fallback: use generic create_asset with BehaviorTree class if supported,
21
- // otherwise 'create_behavior_tree' might be needed in manage_asset or manage_behavior_tree.
22
- // Checking consolidated definitions: manage_behavior_tree has add_node etc, but no create_tree.
23
- // manage_asset has import/create_material... maybe generic create?
24
- // Let's assume we use a pre-existing one or create one via a helper if available.
25
- // For test, let's try to create one using manage_asset generic if possible, or skip creation.
26
- // Let's try to assume it exists or use a known path.
27
- // For robustness, let's try to create via a python command in 'system_control' if we can't natively.
28
- action: "execute_console_command",
29
- command: "py.exec \"unreal.AssetToolsHelpers.get_asset_tools().create_asset('BT_TestTree', '/Game/AI', unreal.BehaviorTree, unreal.BehaviorTreeFactory())\""
26
+ action: 'create',
27
+ name: 'BT_TestTree',
28
+ savePath: '/Game/AI'
30
29
  },
31
- toolName: "system_control",
32
- expected: "success"
30
+ expected: 'success'
33
31
  },
32
+
33
+ // === ADD NODES (add_node) ===
34
34
  {
35
- scenario: "Add Root Node (Selector)",
36
- toolName: "manage_behavior_tree",
35
+ scenario: 'Add Root Selector Node',
36
+ toolName: 'manage_behavior_tree',
37
37
  arguments: {
38
- action: "add_node",
38
+ action: 'add_node',
39
39
  assetPath: btPath,
40
- nodeType: "Selector",
41
- nodeId: "RootSelector",
40
+ nodeType: 'Selector',
41
+ nodeId: 'RootSelector',
42
42
  x: 0,
43
43
  y: 0
44
44
  },
45
- expected: "success"
45
+ expected: 'success'
46
46
  },
47
47
  {
48
- scenario: "Add Sequence Node",
49
- toolName: "manage_behavior_tree",
48
+ scenario: 'Add Sequence Node',
49
+ toolName: 'manage_behavior_tree',
50
50
  arguments: {
51
- action: "add_node",
51
+ action: 'add_node',
52
52
  assetPath: btPath,
53
- nodeType: "Sequence",
54
- nodeId: "MainSequence",
53
+ nodeType: 'Sequence',
54
+ nodeId: 'MainSequence',
55
55
  x: -200,
56
56
  y: 150
57
57
  },
58
- expected: "success"
58
+ expected: 'success'
59
59
  },
60
60
  {
61
- scenario: "Connect Root to Sequence",
62
- toolName: "manage_behavior_tree",
61
+ scenario: 'Add Task Node (Wait)',
62
+ toolName: 'manage_behavior_tree',
63
63
  arguments: {
64
- action: "connect_nodes",
64
+ action: 'add_node',
65
65
  assetPath: btPath,
66
- parentNodeId: "RootSelector",
67
- childNodeId: "MainSequence"
66
+ nodeType: 'Task',
67
+ nodeId: 'WaitTask',
68
+ x: -300,
69
+ y: 300,
70
+ comment: 'Wait 5 seconds'
68
71
  },
69
- expected: "success"
72
+ expected: 'success'
70
73
  },
71
74
  {
72
- scenario: "Add Task Node (Wait)",
73
- toolName: "manage_behavior_tree",
75
+ scenario: 'Add Decorator Node',
76
+ toolName: 'manage_behavior_tree',
74
77
  arguments: {
75
- action: "add_node",
78
+ action: 'add_node',
76
79
  assetPath: btPath,
77
- nodeType: "Task",
78
- nodeClass: "BTTask_Wait", // Assuming class name resolution
79
- nodeId: "WaitTask",
80
- x: -300,
80
+ nodeType: 'Decorator',
81
+ nodeId: 'BBDecorator',
82
+ parentNodeId: 'MainSequence',
83
+ x: -400,
84
+ y: 200
85
+ },
86
+ expected: 'success'
87
+ },
88
+ {
89
+ scenario: 'Add Service Node',
90
+ toolName: 'manage_behavior_tree',
91
+ arguments: {
92
+ action: 'add_node',
93
+ assetPath: btPath,
94
+ nodeType: 'Service',
95
+ nodeId: 'FocusService',
96
+ parentNodeId: 'RootSelector',
97
+ x: 100,
98
+ y: 100
99
+ },
100
+ expected: 'success'
101
+ },
102
+ {
103
+ scenario: 'Add SimpleParallel Node',
104
+ toolName: 'manage_behavior_tree',
105
+ arguments: {
106
+ action: 'add_node',
107
+ assetPath: btPath,
108
+ nodeType: 'SimpleParallel',
109
+ nodeId: 'ParallelNode',
110
+ x: 200,
111
+ y: 150
112
+ },
113
+ expected: 'success'
114
+ },
115
+ {
116
+ scenario: 'Add MoveTo Task',
117
+ toolName: 'manage_behavior_tree',
118
+ arguments: {
119
+ action: 'add_node',
120
+ assetPath: btPath,
121
+ nodeType: 'Task',
122
+ nodeId: 'MoveToTask',
123
+ x: 200,
81
124
  y: 300
82
125
  },
83
- expected: "success"
126
+ expected: 'success'
84
127
  },
85
128
  {
86
- scenario: "Connect Sequence to Task",
87
- toolName: "manage_behavior_tree",
129
+ scenario: 'Add FinishWithResult Task',
130
+ toolName: 'manage_behavior_tree',
88
131
  arguments: {
89
- action: "connect_nodes",
132
+ action: 'add_node',
90
133
  assetPath: btPath,
91
- parentNodeId: "MainSequence",
92
- childNodeId: "WaitTask"
134
+ nodeType: 'Task',
135
+ nodeId: 'FinishTask',
136
+ x: 300,
137
+ y: 300
93
138
  },
94
- expected: "success"
139
+ expected: 'success'
95
140
  },
141
+
142
+ // === CONNECT NODES (connect_nodes) ===
96
143
  {
97
- scenario: "Set Task Property (Wait Time)",
98
- toolName: "manage_behavior_tree",
144
+ scenario: 'Connect Root to Sequence',
145
+ toolName: 'manage_behavior_tree',
99
146
  arguments: {
100
- action: "set_node_properties",
147
+ action: 'connect_nodes',
101
148
  assetPath: btPath,
102
- nodeId: "WaitTask",
103
- properties: {
104
- "WaitTime": 5.0
105
- }
149
+ parentNodeId: 'RootSelector',
150
+ childNodeId: 'MainSequence'
106
151
  },
107
- expected: "success"
152
+ expected: 'success'
108
153
  },
109
154
  {
110
- scenario: "Add Decorator (Blackboard)",
111
- toolName: "manage_behavior_tree",
155
+ scenario: 'Connect Sequence to WaitTask',
156
+ toolName: 'manage_behavior_tree',
112
157
  arguments: {
113
- action: "add_node",
158
+ action: 'connect_nodes',
114
159
  assetPath: btPath,
115
- nodeType: "Decorator",
116
- nodeClass: "BTDecorator_Blackboard",
117
- parentNodeId: "MainSequence", // Decorators attach to nodes (composites/tasks)
118
- nodeId: "BBDecorator"
160
+ parentNodeId: 'MainSequence',
161
+ childNodeId: 'WaitTask'
119
162
  },
120
- expected: "success"
163
+ expected: 'success'
121
164
  },
122
165
  {
123
- scenario: "Set Decorator Property",
124
- toolName: "manage_behavior_tree",
166
+ scenario: 'Connect Root to Parallel',
167
+ toolName: 'manage_behavior_tree',
125
168
  arguments: {
126
- action: "set_node_properties",
169
+ action: 'connect_nodes',
127
170
  assetPath: btPath,
128
- nodeId: "BBDecorator",
129
- properties: {
130
- "BlackboardKey": "TargetActor"
131
- }
171
+ parentNodeId: 'RootSelector',
172
+ childNodeId: 'ParallelNode'
132
173
  },
133
- expected: "success"
174
+ expected: 'success'
134
175
  },
135
176
  {
136
- scenario: "Add Service (Default Focus)",
137
- toolName: "manage_behavior_tree",
177
+ scenario: 'Connect Parallel to MoveTo',
178
+ toolName: 'manage_behavior_tree',
138
179
  arguments: {
139
- action: "add_node",
180
+ action: 'connect_nodes',
140
181
  assetPath: btPath,
141
- nodeType: "Service",
142
- nodeClass: "BTService_DefaultFocus",
143
- parentNodeId: "RootSelector",
144
- nodeId: "FocusService"
182
+ parentNodeId: 'ParallelNode',
183
+ childNodeId: 'MoveToTask'
145
184
  },
146
- expected: "success"
185
+ expected: 'success'
147
186
  },
187
+
188
+ // === SET NODE PROPERTIES (set_node_properties) ===
148
189
  {
149
- scenario: "Remove Node (Wait Task)",
150
- toolName: "manage_behavior_tree",
190
+ scenario: 'Set WaitTask property (WaitTime)',
191
+ toolName: 'manage_behavior_tree',
151
192
  arguments: {
152
- action: "remove_node",
193
+ action: 'set_node_properties',
153
194
  assetPath: btPath,
154
- nodeId: "WaitTask"
195
+ nodeId: 'WaitTask',
196
+ properties: { WaitTime: 5.0 }
155
197
  },
156
- expected: "success"
198
+ expected: 'success'
157
199
  },
158
200
  {
159
- scenario: "Break Connections",
160
- toolName: "manage_behavior_tree",
201
+ scenario: 'Set Decorator property (BlackboardKey)',
202
+ toolName: 'manage_behavior_tree',
161
203
  arguments: {
162
- action: "break_connections",
204
+ action: 'set_node_properties',
163
205
  assetPath: btPath,
164
- parentNodeId: "RootSelector",
165
- childNodeId: "MainSequence"
206
+ nodeId: 'BBDecorator',
207
+ properties: { BlackboardKey: 'TargetActor' }
166
208
  },
167
- expected: "success"
209
+ expected: 'success'
168
210
  },
169
211
  {
170
- scenario: "Add Parallel Node",
171
- toolName: "manage_behavior_tree",
212
+ scenario: 'Set RootSelector comment',
213
+ toolName: 'manage_behavior_tree',
172
214
  arguments: {
173
- action: "add_node",
215
+ action: 'set_node_properties',
174
216
  assetPath: btPath,
175
- nodeType: "SimpleParallel",
176
- nodeId: "ParallelNode",
177
- x: 200,
217
+ nodeId: 'RootSelector',
218
+ comment: 'Main Entry Point'
219
+ },
220
+ expected: 'success'
221
+ },
222
+ {
223
+ scenario: 'Set multiple properties',
224
+ toolName: 'manage_behavior_tree',
225
+ arguments: {
226
+ action: 'set_node_properties',
227
+ assetPath: btPath,
228
+ nodeId: 'MoveToTask',
229
+ properties: { AcceptableRadius: 50.0, bStopOnOverlap: true }
230
+ },
231
+ expected: 'success'
232
+ },
233
+
234
+ // === BREAK CONNECTIONS (break_connections) ===
235
+ {
236
+ scenario: 'Break Root to Sequence connection',
237
+ toolName: 'manage_behavior_tree',
238
+ arguments: {
239
+ action: 'break_connections',
240
+ assetPath: btPath,
241
+ parentNodeId: 'RootSelector',
242
+ childNodeId: 'MainSequence'
243
+ },
244
+ expected: 'success'
245
+ },
246
+ {
247
+ scenario: 'Reconnect Root to Sequence',
248
+ toolName: 'manage_behavior_tree',
249
+ arguments: {
250
+ action: 'connect_nodes',
251
+ assetPath: btPath,
252
+ parentNodeId: 'RootSelector',
253
+ childNodeId: 'MainSequence'
254
+ },
255
+ expected: 'success'
256
+ },
257
+
258
+ // === REMOVE NODES (remove_node) ===
259
+ {
260
+ scenario: 'Remove FinishTask',
261
+ toolName: 'manage_behavior_tree',
262
+ arguments: {
263
+ action: 'remove_node',
264
+ assetPath: btPath,
265
+ nodeId: 'FinishTask'
266
+ },
267
+ expected: 'success'
268
+ },
269
+ {
270
+ scenario: 'Remove FocusService',
271
+ toolName: 'manage_behavior_tree',
272
+ arguments: {
273
+ action: 'remove_node',
274
+ assetPath: btPath,
275
+ nodeId: 'FocusService'
276
+ },
277
+ expected: 'success'
278
+ },
279
+
280
+ // === REAL-WORLD SCENARIO: AI Patrol Tree ===
281
+ {
282
+ scenario: 'Patrol - Create Second BT',
283
+ toolName: 'manage_behavior_tree',
284
+ arguments: {
285
+ action: 'create',
286
+ name: 'BT_Patrol',
287
+ savePath: '/Game/AI'
288
+ },
289
+ expected: 'success'
290
+ },
291
+ {
292
+ scenario: 'Patrol - Add Root',
293
+ toolName: 'manage_behavior_tree',
294
+ arguments: {
295
+ action: 'add_node',
296
+ assetPath: '/Game/AI/BT_Patrol',
297
+ nodeType: 'Sequence',
298
+ nodeId: 'PatrolRoot',
299
+ x: 0,
300
+ y: 0
301
+ },
302
+ expected: 'success'
303
+ },
304
+ {
305
+ scenario: 'Patrol - Add MoveToPatrol',
306
+ toolName: 'manage_behavior_tree',
307
+ arguments: {
308
+ action: 'add_node',
309
+ assetPath: '/Game/AI/BT_Patrol',
310
+ nodeType: 'Task',
311
+ nodeId: 'MoveToPatrol',
312
+ x: 0,
178
313
  y: 150
179
314
  },
180
- expected: "success"
315
+ expected: 'success'
181
316
  },
182
317
  {
183
- scenario: "Connect Root to Parallel",
184
- toolName: "manage_behavior_tree",
318
+ scenario: 'Patrol - Add Wait',
319
+ toolName: 'manage_behavior_tree',
185
320
  arguments: {
186
- action: "connect_nodes",
321
+ action: 'add_node',
322
+ assetPath: '/Game/AI/BT_Patrol',
323
+ nodeType: 'Task',
324
+ nodeId: 'WaitAtPatrol',
325
+ x: 100,
326
+ y: 150
327
+ },
328
+ expected: 'success'
329
+ },
330
+ {
331
+ scenario: 'Patrol - Connect nodes',
332
+ toolName: 'manage_behavior_tree',
333
+ arguments: {
334
+ action: 'connect_nodes',
335
+ assetPath: '/Game/AI/BT_Patrol',
336
+ parentNodeId: 'PatrolRoot',
337
+ childNodeId: 'MoveToPatrol'
338
+ },
339
+ expected: 'success'
340
+ },
341
+
342
+ // === ERROR CASES ===
343
+ {
344
+ scenario: 'Error: Add invalid node type',
345
+ toolName: 'manage_behavior_tree',
346
+ arguments: {
347
+ action: 'add_node',
187
348
  assetPath: btPath,
188
- parentNodeId: "RootSelector",
189
- childNodeId: "ParallelNode"
349
+ nodeType: 'InvalidType'
190
350
  },
191
- expected: "success"
351
+ expected: 'error'
192
352
  },
193
353
  {
194
- scenario: "Add Custom Task (MoveTo)",
195
- toolName: "manage_behavior_tree",
354
+ scenario: 'Error: Connect cycle',
355
+ toolName: 'manage_behavior_tree',
196
356
  arguments: {
197
- action: "add_node",
357
+ action: 'connect_nodes',
198
358
  assetPath: btPath,
199
- nodeType: "Task",
200
- nodeClass: "BTTask_MoveTo",
201
- nodeId: "MoveToTask",
202
- x: 200,
203
- y: 300
359
+ parentNodeId: 'MoveToTask',
360
+ childNodeId: 'RootSelector'
204
361
  },
205
- expected: "success"
362
+ expected: 'error'
206
363
  },
207
364
  {
208
- scenario: "Error: Add Invalid Node Type",
209
- toolName: "manage_behavior_tree",
365
+ scenario: 'Error: Set property on invalid node',
366
+ toolName: 'manage_behavior_tree',
210
367
  arguments: {
211
- action: "add_node",
368
+ action: 'set_node_properties',
212
369
  assetPath: btPath,
213
- nodeType: "InvalidType"
370
+ nodeId: 'NonExistentNode',
371
+ properties: { Val: 1 }
214
372
  },
215
- expected: "error"
373
+ expected: 'error|not_found'
216
374
  },
217
375
  {
218
- scenario: "Error: Connect Cycle",
219
- toolName: "manage_behavior_tree",
376
+ scenario: 'Error: Remove non-existent node',
377
+ toolName: 'manage_behavior_tree',
220
378
  arguments: {
221
- action: "connect_nodes",
379
+ action: 'remove_node',
222
380
  assetPath: btPath,
223
- parentNodeId: "MoveToTask",
224
- childNodeId: "RootSelector"
381
+ nodeId: 'GhostNode'
225
382
  },
226
- expected: "error"
383
+ expected: 'error|not_found'
227
384
  },
228
385
  {
229
- scenario: "Error: Set Property on Invalid Node",
230
- toolName: "manage_behavior_tree",
386
+ scenario: 'Error: Connect to non-existent parent',
387
+ toolName: 'manage_behavior_tree',
231
388
  arguments: {
232
- action: "set_node_properties",
389
+ action: 'connect_nodes',
233
390
  assetPath: btPath,
234
- nodeId: "NonExistentNode",
235
- properties: { "Val": 1 }
391
+ parentNodeId: 'NonExistentParent',
392
+ childNodeId: 'WaitTask'
236
393
  },
237
- expected: "error|not_found"
394
+ expected: 'error|not_found'
238
395
  },
239
396
  {
240
- scenario: "Edge: Comment String",
241
- toolName: "manage_behavior_tree",
397
+ scenario: 'Error: Create without name',
398
+ toolName: 'manage_behavior_tree',
242
399
  arguments: {
243
- action: "set_node_properties",
400
+ action: 'create',
401
+ savePath: '/Game/AI'
402
+ },
403
+ expected: 'error|missing'
404
+ },
405
+
406
+ // === EDGE CASES ===
407
+ {
408
+ scenario: 'Edge: Negative coordinates',
409
+ toolName: 'manage_behavior_tree',
410
+ arguments: {
411
+ action: 'add_node',
244
412
  assetPath: btPath,
245
- nodeId: "RootSelector",
246
- comment: "Main Entry Point"
413
+ nodeType: 'Selector',
414
+ nodeId: 'NegPosNode',
415
+ x: -1000,
416
+ y: -1000
247
417
  },
248
- expected: "success"
418
+ expected: 'success'
249
419
  },
250
420
  {
251
- scenario: "Cleanup BT Asset",
252
- toolName: "manage_asset",
421
+ scenario: 'Edge: Empty properties object',
422
+ toolName: 'manage_behavior_tree',
423
+ arguments: {
424
+ action: 'set_node_properties',
425
+ assetPath: btPath,
426
+ nodeId: 'RootSelector',
427
+ properties: {}
428
+ },
429
+ expected: 'success'
430
+ },
431
+
432
+ // === CLEANUP ===
433
+ {
434
+ scenario: 'Cleanup: Delete test BT assets',
435
+ toolName: 'manage_asset',
253
436
  arguments: {
254
- action: "delete",
255
- assetPaths: [btPath]
437
+ action: 'delete',
438
+ assetPaths: [btPath, '/Game/AI/BT_Patrol']
256
439
  },
257
- expected: "success"
440
+ expected: 'success'
258
441
  }
259
442
  ];
260
443