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
@@ -1,12 +1,7 @@
1
1
  import { AutomationBridge } from '../automation/index.js';
2
2
  import { UnrealBridge } from '../unreal-bridge.js';
3
- interface EnvironmentResult {
4
- success: boolean;
5
- message?: string;
6
- error?: string;
7
- details?: Record<string, unknown>;
8
- }
9
- export declare class EnvironmentTools {
3
+ import { IEnvironmentTools, StandardActionResponse } from '../types/tool-interfaces.js';
4
+ export declare class EnvironmentTools implements IEnvironmentTools {
10
5
  private automationBridge?;
11
6
  constructor(_bridge: UnrealBridge, automationBridge?: AutomationBridge | undefined);
12
7
  setAutomationBridge(automationBridge?: AutomationBridge): void;
@@ -16,21 +11,20 @@ export declare class EnvironmentTools {
16
11
  private getDefaultSkylightIntensity;
17
12
  private normalizeNumber;
18
13
  private invoke;
19
- setTimeOfDay(hour: unknown): Promise<EnvironmentResult>;
20
- setSunIntensity(intensity: unknown): Promise<EnvironmentResult>;
21
- setSkylightIntensity(intensity: unknown): Promise<EnvironmentResult>;
14
+ setTimeOfDay(hour: unknown): Promise<StandardActionResponse>;
15
+ setSunIntensity(intensity: unknown): Promise<StandardActionResponse>;
16
+ setSkylightIntensity(intensity: unknown): Promise<StandardActionResponse>;
22
17
  exportSnapshot(params: {
23
18
  path?: unknown;
24
19
  filename?: unknown;
25
- }): Promise<EnvironmentResult>;
20
+ }): Promise<StandardActionResponse>;
26
21
  importSnapshot(params: {
27
22
  path?: unknown;
28
23
  filename?: unknown;
29
- }): Promise<EnvironmentResult>;
24
+ }): Promise<StandardActionResponse>;
30
25
  cleanup(params?: {
31
26
  names?: unknown;
32
27
  name?: unknown;
33
- }): Promise<EnvironmentResult>;
28
+ }): Promise<StandardActionResponse>;
34
29
  }
35
- export {};
36
30
  //# sourceMappingURL=environment.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { UnrealBridge } from '../unreal-bridge.js';
2
2
  import { AutomationBridge } from '../automation/index.js';
3
- export declare class FoliageTools {
3
+ import { IFoliageTools, StandardActionResponse } from '../types/tool-interfaces.js';
4
+ export declare class FoliageTools implements IFoliageTools {
4
5
  private bridge;
5
6
  private automationBridge?;
6
7
  constructor(bridge: UnrealBridge, automationBridge?: AutomationBridge | undefined);
@@ -15,87 +16,21 @@ export declare class FoliageTools {
15
16
  alignToNormal?: boolean;
16
17
  randomYaw?: boolean;
17
18
  groundSlope?: number;
18
- }): Promise<{
19
- success: boolean;
20
- error: string;
21
- note?: undefined;
22
- created?: undefined;
23
- exists?: undefined;
24
- method?: undefined;
25
- assetPath?: undefined;
26
- usedMesh?: undefined;
27
- message?: undefined;
28
- } | {
29
- success: boolean;
30
- error: string;
31
- note: string | undefined;
32
- created?: undefined;
33
- exists?: undefined;
34
- method?: undefined;
35
- assetPath?: undefined;
36
- usedMesh?: undefined;
37
- message?: undefined;
38
- } | {
39
- success: boolean;
40
- created: boolean;
41
- exists: boolean;
42
- method: string;
43
- assetPath: string | undefined;
44
- usedMesh: string | undefined;
45
- note: string | undefined;
46
- message: string;
47
- error?: undefined;
48
- }>;
19
+ }): Promise<StandardActionResponse>;
49
20
  paintFoliage(params: {
50
21
  foliageType: string;
51
22
  position: [number, number, number];
52
23
  brushSize?: number;
53
24
  paintDensity?: number;
54
25
  eraseMode?: boolean;
55
- }): Promise<{
56
- success: boolean;
57
- error: string;
58
- note?: undefined;
59
- added?: undefined;
60
- message?: undefined;
61
- } | {
62
- success: boolean;
63
- error: string;
64
- note: string | undefined;
65
- added?: undefined;
66
- message?: undefined;
67
- } | {
68
- success: boolean;
69
- added: number;
70
- note: string | undefined;
71
- message: string;
72
- error?: undefined;
73
- }>;
26
+ }): Promise<StandardActionResponse>;
74
27
  getFoliageInstances(params: {
75
28
  foliageType?: string;
76
- }): Promise<{
77
- success: boolean;
78
- error: string;
79
- count?: undefined;
80
- instances?: undefined;
81
- } | {
82
- success: boolean;
83
- count: number;
84
- instances: any[];
85
- error?: undefined;
86
- }>;
29
+ }): Promise<StandardActionResponse>;
87
30
  removeFoliage(params: {
88
31
  foliageType?: string;
89
32
  removeAll?: boolean;
90
- }): Promise<{
91
- success: boolean;
92
- error: string;
93
- instancesRemoved?: undefined;
94
- } | {
95
- success: boolean;
96
- instancesRemoved: number;
97
- error?: undefined;
98
- }>;
33
+ }): Promise<StandardActionResponse>;
99
34
  createInstancedMesh(params: {
100
35
  name: string;
101
36
  meshPath: string;
@@ -106,18 +41,12 @@ export declare class FoliageTools {
106
41
  }>;
107
42
  enableCulling?: boolean;
108
43
  cullDistance?: number;
109
- }): Promise<{
110
- success: boolean;
111
- message: string;
112
- }>;
44
+ }): Promise<StandardActionResponse>;
113
45
  setFoliageLOD(params: {
114
46
  foliageType: string;
115
47
  lodDistances?: number[];
116
48
  screenSize?: number[];
117
- }): Promise<{
118
- success: boolean;
119
- message: string;
120
- }>;
49
+ }): Promise<StandardActionResponse>;
121
50
  addFoliage(params: {
122
51
  foliageType: string;
123
52
  locations: Array<{
@@ -125,15 +54,7 @@ export declare class FoliageTools {
125
54
  y: number;
126
55
  z: number;
127
56
  }>;
128
- }): Promise<{
129
- success: boolean;
130
- error: string;
131
- message?: undefined;
132
- } | {
133
- success: boolean;
134
- message: string;
135
- error?: undefined;
136
- }>;
57
+ }): Promise<StandardActionResponse>;
137
58
  createProceduralFoliage(params: {
138
59
  name: string;
139
60
  bounds?: {
@@ -161,23 +82,7 @@ export declare class FoliageTools {
161
82
  size?: [number, number, number];
162
83
  seed?: number;
163
84
  tileSize?: number;
164
- }): Promise<{
165
- success: boolean;
166
- error: string;
167
- message?: undefined;
168
- details?: undefined;
169
- volumeActor?: undefined;
170
- spawnerPath?: undefined;
171
- foliageTypesCount?: undefined;
172
- } | {
173
- success: boolean;
174
- message: string;
175
- details: import("../automation/types.js").AutomationBridgeResponseMessage;
176
- volumeActor: any;
177
- spawnerPath: any;
178
- foliageTypesCount: any;
179
- error?: undefined;
180
- }>;
85
+ }): Promise<StandardActionResponse>;
181
86
  addFoliageInstances(params: {
182
87
  foliageType: string;
183
88
  transforms: Array<{
@@ -185,31 +90,13 @@ export declare class FoliageTools {
185
90
  rotation?: [number, number, number];
186
91
  scale?: [number, number, number];
187
92
  }>;
188
- }): Promise<{
189
- success: boolean;
190
- error: string;
191
- message: string;
192
- instancesCount?: undefined;
193
- } | {
194
- success: boolean;
195
- message: string;
196
- instancesCount: any;
197
- error?: undefined;
198
- } | {
199
- success: boolean;
200
- error: string;
201
- message?: undefined;
202
- instancesCount?: undefined;
203
- }>;
93
+ }): Promise<StandardActionResponse>;
204
94
  setFoliageCollision(params: {
205
95
  foliageType: string;
206
96
  collisionEnabled?: boolean;
207
97
  collisionProfile?: string;
208
98
  generateOverlapEvents?: boolean;
209
- }): Promise<{
210
- success: boolean;
211
- message: string;
212
- }>;
99
+ }): Promise<StandardActionResponse>;
213
100
  createGrassSystem(params: {
214
101
  name: string;
215
102
  grassTypes: Array<{
@@ -220,46 +107,34 @@ export declare class FoliageTools {
220
107
  }>;
221
108
  windStrength?: number;
222
109
  windSpeed?: number;
223
- }): Promise<{
224
- success: boolean;
225
- message: string;
226
- }>;
110
+ }): Promise<StandardActionResponse>;
227
111
  removeFoliageInstances(params: {
228
112
  foliageType: string;
229
113
  position: [number, number, number];
230
114
  radius: number;
231
- }): Promise<any>;
115
+ }): Promise<StandardActionResponse>;
232
116
  selectFoliageInstances(params: {
233
117
  foliageType: string;
234
118
  position?: [number, number, number];
235
119
  radius?: number;
236
120
  selectAll?: boolean;
237
- }): Promise<any>;
121
+ }): Promise<StandardActionResponse>;
238
122
  updateFoliageInstances(params: {
239
123
  foliageType: string;
240
124
  updateTransforms?: boolean;
241
125
  updateMesh?: boolean;
242
126
  newMeshPath?: string;
243
- }): Promise<{
244
- success: boolean;
245
- message: string;
246
- }>;
127
+ }): Promise<StandardActionResponse>;
247
128
  createFoliageSpawner(params: {
248
129
  name: string;
249
130
  spawnArea: 'Landscape' | 'StaticMesh' | 'BSP' | 'Foliage' | 'All';
250
131
  excludeAreas?: Array<[number, number, number, number]>;
251
- }): Promise<{
252
- success: boolean;
253
- message: string;
254
- }>;
132
+ }): Promise<StandardActionResponse>;
255
133
  optimizeFoliage(params: {
256
134
  mergeInstances?: boolean;
257
135
  generateClusters?: boolean;
258
136
  clusterSize?: number;
259
137
  reduceDrawCalls?: boolean;
260
- }): Promise<{
261
- success: boolean;
262
- message: string;
263
- }>;
138
+ }): Promise<StandardActionResponse>;
264
139
  }
265
140
  //# sourceMappingURL=foliage.d.ts.map
@@ -161,7 +161,8 @@ export class FoliageTools {
161
161
  return {
162
162
  success: true,
163
163
  count: coerceNumber(payload.count) ?? 0,
164
- instances: payload.instances ?? []
164
+ instances: payload.instances ?? [],
165
+ message: 'Foliage instances retrieved'
165
166
  };
166
167
  }
167
168
  catch (error) {
@@ -184,7 +185,8 @@ export class FoliageTools {
184
185
  const payload = response.result;
185
186
  return {
186
187
  success: true,
187
- instancesRemoved: coerceNumber(payload.instancesRemoved) ?? 0
188
+ instancesRemoved: coerceNumber(payload.instancesRemoved) ?? 0,
189
+ message: 'Foliage removed'
188
190
  };
189
191
  }
190
192
  catch (error) {
@@ -1,3 +1,3 @@
1
1
  import { ITools } from '../../types/tool-interfaces.js';
2
- export declare function handleActorTools(action: string, args: any, tools: ITools): Promise<any>;
2
+ export declare function handleActorTools(action: string, args: any, tools: ITools): Promise<import("../../types/tool-interfaces.js").StandardActionResponse<any>>;
3
3
  //# sourceMappingURL=actor-handlers.d.ts.map
@@ -1,8 +1,6 @@
1
- import { cleanObject } from '../../utils/safe-json.js';
2
1
  import { executeAutomationRequest } from './common-handlers.js';
3
- import { Logger } from '../../utils/logger.js';
4
2
  import { normalizeArgs } from './argument-helper.js';
5
- const logger = new Logger('ActorHandlers');
3
+ import { ResponseFactory } from '../../utils/response-factory.js';
6
4
  const handlers = {
7
5
  spawn: async (args, tools) => {
8
6
  const classAliases = {
@@ -30,11 +28,11 @@ const handlers = {
30
28
  ]);
31
29
  const timeoutMs = typeof params.timeoutMs === 'number' ? params.timeoutMs : undefined;
32
30
  if (typeof timeoutMs === 'number' && timeoutMs > 0 && timeoutMs < 200) {
33
- return cleanObject({
31
+ return {
34
32
  success: false,
35
33
  error: `Timeout too small for spawn operation: ${timeoutMs}ms`,
36
34
  message: 'Timeout too small for spawn operation'
37
- });
35
+ };
38
36
  }
39
37
  const originalClass = args.classPath || args.class || args.type || args.actorClass;
40
38
  const componentToAdd = (originalClass === 'SplineActor' || originalClass === 'Spline')
@@ -87,18 +85,15 @@ const handlers = {
87
85
  try {
88
86
  const compsResult = await tools.actorTools.getComponents(params.actorName);
89
87
  if (compsResult && compsResult.success && Array.isArray(compsResult.components)) {
90
- logger.debug('Components found:', JSON.stringify(compsResult.components));
91
88
  const meshComp = compsResult.components.find((c) => {
92
89
  const name = c.name || c;
93
90
  const match = typeof name === 'string' && (name.toLowerCase().includes('staticmesh') ||
94
91
  name.toLowerCase().includes('mesh') ||
95
92
  name.toLowerCase().includes('primitive'));
96
- logger.debug(`Checking component '${name}' matches? ${match}`);
97
93
  return match;
98
94
  });
99
95
  if (meshComp) {
100
96
  const compName = meshComp.name || meshComp;
101
- logger.debug(`Auto-enabling physics for component: ${compName}`);
102
97
  await tools.actorTools.setComponentProperties({
103
98
  actorName: params.actorName,
104
99
  componentName: compName,
@@ -222,11 +217,17 @@ const handlers = {
222
217
  }
223
218
  };
224
219
  export async function handleActorTools(action, args, tools) {
225
- const handler = handlers[action];
226
- if (handler) {
227
- const res = await handler(args, tools);
228
- return cleanObject(res);
220
+ try {
221
+ const handler = handlers[action];
222
+ if (handler) {
223
+ const res = await handler(args, tools);
224
+ return ResponseFactory.success(res);
225
+ }
226
+ const res = await executeAutomationRequest(tools, 'control_actor', args);
227
+ return ResponseFactory.success(res);
228
+ }
229
+ catch (error) {
230
+ return ResponseFactory.error(error);
229
231
  }
230
- return executeAutomationRequest(tools, 'control_actor', args);
231
232
  }
232
233
  //# sourceMappingURL=actor-handlers.js.map