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,3 +1,3 @@
1
1
  import { ITools } from '../../types/tool-interfaces.js';
2
- export declare function handleSequenceTools(action: string, args: any, tools: ITools): Promise<any>;
2
+ export declare function handleSequenceTools(action: string, args: Record<string, unknown>, tools: ITools): Promise<any>;
3
3
  //# sourceMappingURL=sequence-handlers.d.ts.map
@@ -20,7 +20,17 @@ function markSequenceDeleted(path) {
20
20
  if (!norm)
21
21
  return;
22
22
  managedSequences.delete(norm);
23
- deletedSequences.add(norm);
23
+ deletedSequences.delete(norm);
24
+ }
25
+ function getErrorString(res) {
26
+ if (!res)
27
+ return '';
28
+ return typeof res.error === 'string' ? res.error : '';
29
+ }
30
+ function getMessageString(res) {
31
+ if (!res)
32
+ return '';
33
+ return typeof res.message === 'string' ? res.message : '';
24
34
  }
25
35
  export async function handleSequenceTools(action, args, tools) {
26
36
  const seqAction = String(action || '').trim();
@@ -39,8 +49,8 @@ export async function handleSequenceTools(action, args, tools) {
39
49
  if (sequencePath && res && res.success !== false) {
40
50
  markSequenceCreated(sequencePath);
41
51
  }
42
- const errorCode = String((res && res.error) || '').toUpperCase();
43
- const msgLower = String((res && res.message) || '').toLowerCase();
52
+ const errorCode = getErrorString(res).toUpperCase();
53
+ const msgLower = getMessageString(res).toLowerCase();
44
54
  if (res && res.success === false && (errorCode === 'FACTORY_NOT_AVAILABLE' || msgLower.includes('ulevelsequencefactorynew not available'))) {
45
55
  const path = sequencePath || (typeof args.path === 'string' ? args.path : undefined);
46
56
  return cleanObject({
@@ -75,8 +85,8 @@ export async function handleSequenceTools(action, args, tools) {
75
85
  subAction: 'add_actor'
76
86
  };
77
87
  const res = await executeAutomationRequest(tools, 'manage_sequence', payload);
78
- const errorCode = String((res && res.error) || '').toUpperCase();
79
- const msgLower = String((res && res.message) || '').toLowerCase();
88
+ const errorCode = getErrorString(res).toUpperCase();
89
+ const msgLower = getMessageString(res).toLowerCase();
80
90
  if (res && res.success === false && path) {
81
91
  const isInvalidSequence = errorCode === 'INVALID_SEQUENCE' || msgLower.includes('sequence_add_actor requires a sequence path') || msgLower.includes('sequence not found');
82
92
  if (isInvalidSequence) {
@@ -114,8 +124,8 @@ export async function handleSequenceTools(action, args, tools) {
114
124
  case 'add_actors': {
115
125
  const actorNames = Array.isArray(args.actorNames) ? args.actorNames : [];
116
126
  const res = await tools.sequenceTools.addActors({ actorNames, path: args.path });
117
- const errorCode = String((res && res.error) || '').toUpperCase();
118
- const msgLower = String((res && res.message) || '').toLowerCase();
127
+ const errorCode = getErrorString(res).toUpperCase();
128
+ const msgLower = getMessageString(res).toLowerCase();
119
129
  if (actorNames.length === 0 && res && res.success === false && errorCode === 'INVALID_ARGUMENT') {
120
130
  return cleanObject({
121
131
  success: false,
@@ -172,8 +182,8 @@ export async function handleSequenceTools(action, args, tools) {
172
182
  payload.value = { scale: args.value };
173
183
  }
174
184
  const res = await executeAutomationRequest(tools, 'manage_sequence', payload);
175
- const errorCode = String((res && res.error) || '').toUpperCase();
176
- const msgLower = String((res && res.message) || '').toLowerCase();
185
+ const errorCode = getErrorString(res).toUpperCase();
186
+ const msgLower = getMessageString(res).toLowerCase();
177
187
  if (errorCode === 'INVALID_ARGUMENT' || msgLower.includes('frame number is required')) {
178
188
  return cleanObject(res);
179
189
  }
@@ -237,7 +247,7 @@ export async function handleSequenceTools(action, args, tools) {
237
247
  throw new Error('Invalid speed: must be a positive number');
238
248
  }
239
249
  let res = await tools.sequenceTools.setPlaybackSpeed({ speed, path: args.path });
240
- const errorCode = String((res && res.error) || '').toUpperCase();
250
+ const errorCode = getErrorString(res).toUpperCase();
241
251
  if ((!res || res.success === false) && errorCode === 'EDITOR_NOT_OPEN' && args.path) {
242
252
  await tools.sequenceTools.open({ path: args.path });
243
253
  await new Promise(resolve => setTimeout(resolve, 1000));
@@ -252,7 +262,8 @@ export async function handleSequenceTools(action, args, tools) {
252
262
  case 'duplicate': {
253
263
  const path = requireNonEmptyString(args.path, 'path', 'Missing required parameter: path');
254
264
  const destDir = requireNonEmptyString(args.destinationPath, 'destinationPath', 'Missing required parameter: destinationPath');
255
- const newName = requireNonEmptyString(args.newName || path.split('/').pop(), 'newName', 'Missing required parameter: newName');
265
+ const defaultNewName = path.split('/').pop() || '';
266
+ const newName = requireNonEmptyString(args.newName || defaultNewName, 'newName', 'Missing required parameter: newName');
256
267
  const baseDir = destDir.replace(/\/$/, '');
257
268
  const destPath = `${baseDir}/${newName}`;
258
269
  const res = await tools.sequenceTools.duplicate({ path, destinationPath: destPath });
@@ -262,8 +273,8 @@ export async function handleSequenceTools(action, args, tools) {
262
273
  const path = requireNonEmptyString(args.path, 'path', 'Missing required parameter: path');
263
274
  const newName = requireNonEmptyString(args.newName, 'newName', 'Missing required parameter: newName');
264
275
  const res = await tools.sequenceTools.rename({ path, newName });
265
- const errorCode = String((res && res.error) || '').toUpperCase();
266
- const msgLower = String((res && res.message) || '').toLowerCase();
276
+ const errorCode = getErrorString(res).toUpperCase();
277
+ const msgLower = getMessageString(res).toLowerCase();
267
278
  if (res && res.success === false && (errorCode === 'OPERATION_FAILED' || msgLower.includes('failed to rename sequence'))) {
268
279
  return cleanObject({
269
280
  success: false,
@@ -31,7 +31,7 @@ export interface PropertyInfo {
31
31
  type: string;
32
32
  value?: any;
33
33
  flags?: string[];
34
- metadata?: Record<string, any>;
34
+ metadata?: Record<string, unknown>;
35
35
  category?: string;
36
36
  tooltip?: string;
37
37
  description?: string;
@@ -339,7 +339,7 @@ export class IntrospectionTools {
339
339
  return res;
340
340
  }
341
341
  catch (err) {
342
- const errorMsg = err?.message || String(err);
342
+ const errorMsg = (err instanceof Error ? err.message : undefined) || String(err);
343
343
  if (errorMsg.includes('404')) {
344
344
  return { success: false, error: `Property '${params.propertyName}' not found on object '${params.objectPath}'` };
345
345
  }
@@ -1,6 +1,7 @@
1
1
  import { UnrealBridge } from '../unreal-bridge.js';
2
2
  import { AutomationBridge } from '../automation/index.js';
3
- export declare class LandscapeTools {
3
+ import { ILandscapeTools, StandardActionResponse } from '../types/tool-interfaces.js';
4
+ export declare class LandscapeTools implements ILandscapeTools {
4
5
  private bridge;
5
6
  private automationBridge?;
6
7
  constructor(bridge: UnrealBridge, automationBridge?: AutomationBridge | undefined);
@@ -18,7 +19,7 @@ export declare class LandscapeTools {
18
19
  runtimeGrid?: string;
19
20
  isSpatiallyLoaded?: boolean;
20
21
  dataLayers?: string[];
21
- }): Promise<Record<string, unknown>>;
22
+ }): Promise<StandardActionResponse>;
22
23
  sculptLandscape(params: {
23
24
  landscapeName: string;
24
25
  tool: string;
@@ -27,17 +28,7 @@ export declare class LandscapeTools {
27
28
  strength?: number;
28
29
  location?: [number, number, number];
29
30
  radius?: number;
30
- }): Promise<{
31
- success: boolean;
32
- error: string;
33
- message?: undefined;
34
- details?: undefined;
35
- } | {
36
- success: boolean;
37
- message: string;
38
- details: import("../automation/types.js").AutomationBridgeResponseMessage;
39
- error?: undefined;
40
- }>;
31
+ }): Promise<StandardActionResponse>;
41
32
  paintLandscape(params: {
42
33
  landscapeName: string;
43
34
  layerName: string;
@@ -47,17 +38,7 @@ export declare class LandscapeTools {
47
38
  targetValue?: number;
48
39
  radius?: number;
49
40
  density?: number;
50
- }): Promise<{
51
- success: boolean;
52
- error: string;
53
- message?: undefined;
54
- details?: undefined;
55
- } | {
56
- success: boolean;
57
- message: string;
58
- details: import("../automation/types.js").AutomationBridgeResponseMessage;
59
- error?: undefined;
60
- }>;
41
+ }): Promise<StandardActionResponse>;
61
42
  createProceduralTerrain(params: {
62
43
  name: string;
63
44
  location?: [number, number, number];
@@ -67,37 +48,7 @@ export declare class LandscapeTools {
67
48
  heightFunction?: string;
68
49
  material?: string;
69
50
  settings?: Record<string, unknown>;
70
- }): Promise<{
71
- success: boolean;
72
- error: string;
73
- message: string;
74
- actorName?: undefined;
75
- vertices?: undefined;
76
- triangles?: undefined;
77
- size?: undefined;
78
- subdivisions?: undefined;
79
- details?: undefined;
80
- } | {
81
- success: boolean;
82
- message: string;
83
- actorName: any;
84
- vertices: any;
85
- triangles: any;
86
- size: any;
87
- subdivisions: any;
88
- details: any;
89
- error?: undefined;
90
- } | {
91
- success: boolean;
92
- error: string;
93
- message?: undefined;
94
- actorName?: undefined;
95
- vertices?: undefined;
96
- triangles?: undefined;
97
- size?: undefined;
98
- subdivisions?: undefined;
99
- details?: undefined;
100
- }>;
51
+ }): Promise<StandardActionResponse>;
101
52
  createLandscapeGrassType(params: {
102
53
  name: string;
103
54
  meshPath: string;
@@ -106,11 +57,11 @@ export declare class LandscapeTools {
106
57
  maxScale?: number;
107
58
  path?: string;
108
59
  staticMesh?: string;
109
- }): Promise<any>;
60
+ }): Promise<StandardActionResponse>;
110
61
  setLandscapeMaterial(params: {
111
62
  landscapeName: string;
112
63
  materialPath: string;
113
- }): Promise<any>;
64
+ }): Promise<StandardActionResponse>;
114
65
  createLandscapeGrass(params: {
115
66
  landscapeName: string;
116
67
  grassType: string;
@@ -118,85 +69,42 @@ export declare class LandscapeTools {
118
69
  minScale?: number;
119
70
  maxScale?: number;
120
71
  randomRotation?: boolean;
121
- }): Promise<{
122
- success: boolean;
123
- message: string;
124
- }>;
72
+ }): Promise<StandardActionResponse>;
125
73
  updateLandscapeCollision(params: {
126
74
  landscapeName: string;
127
75
  collisionMipLevel?: number;
128
76
  simpleCollision?: boolean;
129
- }): Promise<{
130
- success: boolean;
131
- message: string;
132
- }>;
77
+ }): Promise<StandardActionResponse>;
133
78
  retopologizeLandscape(params: {
134
79
  landscapeName: string;
135
80
  targetTriangleCount?: number;
136
81
  preserveDetails?: boolean;
137
- }): Promise<{
138
- success: boolean;
139
- message: string;
140
- }>;
82
+ }): Promise<StandardActionResponse>;
141
83
  createWaterBody(params: {
142
84
  type: 'Ocean' | 'Lake' | 'River' | 'Stream';
143
85
  name: string;
144
86
  location?: [number, number, number];
145
87
  size?: [number, number];
146
88
  depth?: number;
147
- }): Promise<any>;
89
+ }): Promise<StandardActionResponse>;
148
90
  configureWorldPartition(params: {
149
91
  landscapeName: string;
150
92
  enableSpatialLoading?: boolean;
151
93
  runtimeGrid?: string;
152
94
  dataLayers?: string[];
153
95
  streamingDistance?: number;
154
- }): Promise<{
155
- success: boolean;
156
- error: string;
157
- message?: undefined;
158
- changes?: undefined;
159
- } | {
160
- success: boolean;
161
- message: string;
162
- changes: unknown;
163
- error?: undefined;
164
- }>;
96
+ }): Promise<StandardActionResponse>;
165
97
  setDataLayers(params: {
166
98
  landscapeName: string;
167
99
  dataLayerNames: string[];
168
100
  operation: 'add' | 'remove' | 'set';
169
- }): Promise<{
170
- success: boolean;
171
- message: string;
172
- layers: string[];
173
- error?: undefined;
174
- } | {
175
- success: boolean;
176
- error: string;
177
- message?: undefined;
178
- layers?: undefined;
179
- }>;
101
+ }): Promise<StandardActionResponse>;
180
102
  configureStreamingCells(params: {
181
103
  landscapeName: string;
182
104
  cellSize?: number;
183
105
  loadingRange?: number;
184
106
  enableHLOD?: boolean;
185
- }): Promise<{
186
- success: boolean;
187
- message: string;
188
- settings: {
189
- cellSize: number | undefined;
190
- loadingRange: number | undefined;
191
- hlod: boolean | undefined;
192
- };
193
- error?: undefined;
194
- } | {
195
- success: boolean;
196
- error: string;
197
- message?: undefined;
198
- settings?: undefined;
199
- }>;
107
+ }): Promise<StandardActionResponse>;
200
108
  modifyHeightmap(params: {
201
109
  landscapeName: string;
202
110
  heightData: number[];
@@ -205,14 +113,6 @@ export declare class LandscapeTools {
205
113
  maxX: number;
206
114
  maxY: number;
207
115
  updateNormals?: boolean;
208
- }): Promise<{
209
- success: boolean;
210
- error: string;
211
- message?: undefined;
212
- } | {
213
- success: boolean;
214
- message: string;
215
- error?: undefined;
216
- }>;
116
+ }): Promise<StandardActionResponse>;
217
117
  }
218
118
  //# sourceMappingURL=landscape.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import { ensureVector3 } from '../utils/validation.js';
2
+ import { wasmIntegration } from '../wasm/index.js';
2
3
  export class LandscapeTools {
3
4
  bridge;
4
5
  automationBridge;
@@ -28,6 +29,9 @@ export class LandscapeTools {
28
29
  throw new Error('Automation Bridge not available. Landscape operations require plugin support.');
29
30
  }
30
31
  const [locX, locY, locZ] = ensureVector3(params.location ?? [0, 0, 0], 'landscape location');
32
+ const zeroVector = [0, 0, 0];
33
+ const processedLocation = wasmIntegration.vectorAdd(zeroVector, [locX, locY, locZ]);
34
+ console.error('[WASM] Using vectorAdd for landscape positioning');
31
35
  const sectionsPerComponent = Math.max(1, Math.floor(params.sectionsPerComponent ?? 1));
32
36
  const quadsPerSection = Math.max(1, Math.floor(params.quadsPerSection ?? 63));
33
37
  try {
@@ -36,9 +40,9 @@ export class LandscapeTools {
36
40
  const quadsPerComponent = quadsPerSection;
37
41
  const payload = {
38
42
  name,
39
- x: locX,
40
- y: locY,
41
- z: locZ,
43
+ x: processedLocation[0],
44
+ y: processedLocation[1],
45
+ z: processedLocation[2],
42
46
  componentsX,
43
47
  componentsY,
44
48
  quadsPerComponent,
@@ -1,5 +1,5 @@
1
1
  import { BaseTool } from './base-tool.js';
2
- import { ILevelTools } from '../types/tool-interfaces.js';
2
+ import { ILevelTools, StandardActionResponse } from '../types/tool-interfaces.js';
3
3
  export declare class LevelTools extends BaseTool implements ILevelTools {
4
4
  private managedLevels;
5
5
  private listCache?;
@@ -15,13 +15,8 @@ export declare class LevelTools extends BaseTool implements ILevelTools {
15
15
  private listManagedLevels;
16
16
  private summarizeLevel;
17
17
  private setCurrentLevel;
18
- listLevels(): Promise<Record<string, unknown> | {
19
- success: true;
20
- message: string;
21
- count: number;
22
- levels: Array<Record<string, unknown>>;
23
- }>;
24
- getLevelSummary(levelPath?: string): Promise<Record<string, unknown>>;
18
+ listLevels(): Promise<StandardActionResponse>;
19
+ getLevelSummary(levelPath?: string): Promise<StandardActionResponse>;
25
20
  registerLight(levelPath: string | undefined, info: {
26
21
  name: string;
27
22
  type: string;
@@ -32,122 +27,52 @@ export declare class LevelTools extends BaseTool implements ILevelTools {
32
27
  exportPath: string;
33
28
  note?: string;
34
29
  timeoutMs?: number;
35
- }): Promise<{
36
- success: boolean;
37
- error: string;
38
- levelPath?: undefined;
39
- exportPath?: undefined;
40
- details?: undefined;
41
- message?: undefined;
42
- } | {
43
- success: boolean;
44
- error: any;
45
- levelPath: string;
46
- exportPath: string;
47
- details: any;
48
- message?: undefined;
49
- } | {
50
- success: boolean;
51
- message: string;
52
- levelPath: string;
53
- exportPath: string;
54
- details: any;
55
- error?: undefined;
56
- }>;
30
+ }): Promise<StandardActionResponse>;
57
31
  importLevel(params: {
58
32
  packagePath: string;
59
33
  destinationPath?: string;
60
34
  streaming?: boolean;
61
35
  timeoutMs?: number;
62
- }): Promise<{
63
- success: boolean;
64
- error: any;
65
- levelPath: string;
66
- details: any;
67
- message?: undefined;
68
- partitioned?: undefined;
69
- streaming?: undefined;
70
- } | {
71
- success: boolean;
72
- message: string;
73
- levelPath: string;
74
- partitioned: boolean;
75
- streaming: boolean;
76
- details: any;
77
- error?: undefined;
78
- } | {
79
- success: boolean;
80
- error: string;
81
- levelPath?: undefined;
82
- details?: undefined;
83
- message?: undefined;
84
- partitioned?: undefined;
85
- streaming?: undefined;
86
- }>;
36
+ }): Promise<StandardActionResponse>;
87
37
  saveLevelAs(params: {
88
38
  sourcePath?: string;
89
39
  targetPath: string;
90
- }): Promise<{
91
- success: boolean;
92
- error: any;
93
- message?: undefined;
94
- levelPath?: undefined;
95
- } | {
96
- success: boolean;
97
- message: any;
98
- levelPath: string;
99
- error?: undefined;
100
- }>;
40
+ }): Promise<StandardActionResponse>;
101
41
  deleteLevels(params: {
102
42
  levelPaths: string[];
103
- }): Promise<{
104
- success: boolean;
105
- message: string;
106
- removed: string[];
107
- }>;
43
+ }): Promise<StandardActionResponse>;
108
44
  loadLevel(params: {
109
45
  levelPath: string;
110
46
  streaming?: boolean;
111
47
  position?: [number, number, number];
112
- }): Promise<any>;
48
+ }): Promise<StandardActionResponse>;
113
49
  saveLevel(params: {
114
50
  levelName?: string;
115
51
  savePath?: string;
116
- }): Promise<Record<string, unknown> | {
117
- success: boolean;
118
- error: any;
119
- }>;
52
+ }): Promise<StandardActionResponse>;
120
53
  createLevel(params: {
121
54
  levelName: string;
122
55
  template?: 'Empty' | 'Default' | 'VR' | 'TimeOfDay';
123
56
  savePath?: string;
124
- }): Promise<Record<string, unknown> | {
125
- success: boolean;
126
- error: any;
127
- path: string;
128
- partitioned: boolean;
129
- }>;
57
+ }): Promise<StandardActionResponse>;
130
58
  addSubLevel(params: {
131
59
  parentLevel?: string;
132
60
  subLevelPath: string;
133
61
  streamingMethod?: 'Blueprint' | 'AlwaysLoaded';
134
- }): Promise<any>;
62
+ }): Promise<StandardActionResponse>;
135
63
  streamLevel(params: {
136
64
  levelPath?: string;
137
65
  levelName?: string;
138
66
  shouldBeLoaded: boolean;
139
67
  shouldBeVisible?: boolean;
140
68
  position?: [number, number, number];
141
- }): Promise<any>;
69
+ }): Promise<StandardActionResponse>;
142
70
  setupWorldComposition(params: {
143
71
  enableComposition: boolean;
144
72
  tileSize?: number;
145
73
  distanceStreaming?: boolean;
146
74
  streamingDistance?: number;
147
- }): Promise<{
148
- success: boolean;
149
- message: string;
150
- }>;
75
+ }): Promise<StandardActionResponse>;
151
76
  editLevelBlueprint(params: {
152
77
  eventType: 'BeginPlay' | 'EndPlay' | 'Tick' | 'Custom';
153
78
  customEventName?: string;
@@ -156,50 +81,44 @@ export declare class LevelTools extends BaseTool implements ILevelTools {
156
81
  position: [number, number];
157
82
  connections?: string[];
158
83
  }>;
159
- }): Promise<any>;
84
+ }): Promise<StandardActionResponse>;
160
85
  createSubLevel(params: {
161
86
  name: string;
162
87
  type: 'Persistent' | 'Streaming' | 'Lighting' | 'Gameplay';
163
88
  parent?: string;
164
- }): Promise<any>;
89
+ }): Promise<StandardActionResponse>;
165
90
  setWorldSettings(params: {
166
91
  gravity?: number;
167
92
  worldScale?: number;
168
93
  gameMode?: string;
169
94
  defaultPawn?: string;
170
95
  killZ?: number;
171
- }): Promise<{
172
- success: boolean;
173
- message: string;
174
- }>;
96
+ }): Promise<StandardActionResponse>;
175
97
  setLevelBounds(params: {
176
98
  min: [number, number, number];
177
99
  max: [number, number, number];
178
- }): Promise<any>;
100
+ }): Promise<StandardActionResponse>;
179
101
  buildNavMesh(params: {
180
102
  rebuildAll?: boolean;
181
103
  selectedOnly?: boolean;
182
- }): Promise<Record<string, unknown> | {
183
- success: boolean;
184
- error: any;
185
- }>;
104
+ }): Promise<StandardActionResponse>;
186
105
  setLevelVisibility(params: {
187
106
  levelName: string;
188
107
  visible: boolean;
189
- }): Promise<any>;
108
+ }): Promise<StandardActionResponse>;
190
109
  setWorldOrigin(params: {
191
110
  location: [number, number, number];
192
- }): Promise<any>;
111
+ }): Promise<StandardActionResponse>;
193
112
  createStreamingVolume(params: {
194
113
  levelName: string;
195
114
  position: [number, number, number];
196
115
  size: [number, number, number];
197
116
  streamingDistance?: number;
198
- }): Promise<any>;
117
+ }): Promise<StandardActionResponse>;
199
118
  setLevelLOD(params: {
200
119
  levelName: string;
201
120
  lodLevel: number;
202
121
  distance: number;
203
- }): Promise<any>;
122
+ }): Promise<StandardActionResponse>;
204
123
  }
205
124
  //# sourceMappingURL=level.d.ts.map