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,5 +1,5 @@
1
1
  import { BaseTool } from './base-tool.js';
2
- import { IBlueprintTools } from '../types/tool-interfaces.js';
2
+ import { IBlueprintTools, StandardActionResponse } from '../types/tool-interfaces.js';
3
3
  import { Logger } from '../utils/logger.js';
4
4
  import { validateAssetParams, concurrencyDelay } from '../utils/validation.js';
5
5
  import { coerceString } from '../utils/result-helpers.js';
@@ -54,7 +54,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
54
54
  return candidates.filter(Boolean);
55
55
  }
56
56
 
57
- async createBlueprint(params: { name: string; blueprintType?: string; savePath?: string; parentClass?: string; properties?: Record<string, unknown>; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
57
+ async createBlueprint(params: { name: string; blueprintType?: string; savePath?: string; parentClass?: string; properties?: Record<string, unknown>; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
58
58
  try {
59
59
  const validation = validateAssetParams({ name: params.name, savePath: params.savePath || '/Game/Blueprints' });
60
60
  if (!validation.valid) return { success: false, message: `Failed to create blueprint: ${validation.error}`, error: validation.error };
@@ -99,7 +99,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
99
99
  }
100
100
  }
101
101
 
102
- async modifyConstructionScript(params: { blueprintPath: string; operations: any[]; compile?: boolean; save?: boolean; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
102
+ async modifyConstructionScript(params: { blueprintPath: string; operations: any[]; compile?: boolean; save?: boolean; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
103
103
  const blueprintPath = coerceString(params.blueprintPath);
104
104
  if (!blueprintPath) return { success: false, message: 'Blueprint path is required', error: 'INVALID_BLUEPRINT_PATH' };
105
105
  if (!Array.isArray(params.operations) || params.operations.length === 0) return { success: false, message: 'At least one SCS operation is required', error: 'MISSING_OPERATIONS' };
@@ -128,7 +128,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
128
128
  return res;
129
129
  }
130
130
 
131
- async addComponent(params: { blueprintName: string; componentType: string; componentName: string; attachTo?: string; transform?: Record<string, unknown>; properties?: Record<string, unknown>; compile?: boolean; save?: boolean; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
131
+ async addComponent(params: { blueprintName: string; componentType: string; componentName: string; attachTo?: string; transform?: Record<string, unknown>; properties?: Record<string, unknown>; compile?: boolean; save?: boolean; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
132
132
  const blueprintName = coerceString(params.blueprintName);
133
133
  if (!blueprintName) return { success: false as const, message: 'Blueprint name is required', error: 'INVALID_BLUEPRINT' };
134
134
  const componentClass = coerceString(params.componentType);
@@ -156,7 +156,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
156
156
  }
157
157
  }
158
158
 
159
- async waitForBlueprint(blueprintRef: string | string[], timeoutMs?: number) {
159
+ async waitForBlueprint(blueprintRef: string | string[], timeoutMs?: number): Promise<StandardActionResponse> {
160
160
  const candidates = Array.isArray(blueprintRef) ? blueprintRef : this.buildCandidates(blueprintRef as string | undefined);
161
161
  if (!candidates || candidates.length === 0) return { success: false, error: 'Invalid blueprint reference', checked: [] } as any;
162
162
  if (this.pluginBlueprintActionsAvailable === false) {
@@ -193,7 +193,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
193
193
  return { success: false, error: `Timeout waiting for blueprint after ${tot}ms`, checked: candidates } as any;
194
194
  }
195
195
 
196
- async getBlueprint(params: { blueprintName: string; timeoutMs?: number; }) {
196
+ async getBlueprint(params: { blueprintName: string; timeoutMs?: number; }): Promise<StandardActionResponse> {
197
197
  const candidates = this.buildCandidates(params.blueprintName);
198
198
  const primary = candidates[0];
199
199
  if (!primary) return { success: false, error: 'Invalid blueprint name' } as const;
@@ -214,7 +214,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
214
214
  }
215
215
  }
216
216
 
217
- async getBlueprintInfo(params: { blueprintPath: string; timeoutMs?: number }) {
217
+ async getBlueprintInfo(params: { blueprintPath: string; timeoutMs?: number }): Promise<StandardActionResponse> {
218
218
  const blueprintPath = coerceString(params.blueprintPath);
219
219
  if (!blueprintPath) {
220
220
  return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
@@ -248,24 +248,24 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
248
248
  }
249
249
  }
250
250
 
251
- async probeSubobjectDataHandle(opts: { componentClass?: string } = {}) {
252
- return await this.sendAction('blueprint_probe_subobject_handle', { componentClass: opts.componentClass });
251
+ async probeSubobjectDataHandle(opts: { componentClass?: string } = {}): Promise<StandardActionResponse> {
252
+ return await this.sendAction('blueprint_probe_subobject_handle', { componentClass: opts.componentClass }) as any;
253
253
  }
254
254
 
255
- async setBlueprintDefault(params: { blueprintName: string; propertyName: string; value: unknown }) {
255
+ async setBlueprintDefault(params: { blueprintName: string; propertyName: string; value: unknown }): Promise<StandardActionResponse> {
256
256
  const candidates = this.buildCandidates(params.blueprintName);
257
257
  const primary = candidates[0];
258
258
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
259
- return await this.sendAction('blueprint_set_default', { blueprintCandidates: candidates, requestedPath: primary, propertyName: params.propertyName, value: params.value });
259
+ return await this.sendAction('blueprint_set_default', { blueprintCandidates: candidates, requestedPath: primary, propertyName: params.propertyName, value: params.value }) as any;
260
260
  }
261
261
 
262
- async addVariable(params: { blueprintName: string; variableName: string; variableType: string; defaultValue?: any; category?: string; isReplicated?: boolean; isPublic?: boolean; variablePinType?: Record<string, unknown>; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
262
+ async addVariable(params: { blueprintName: string; variableName: string; variableType: string; defaultValue?: any; category?: string; isReplicated?: boolean; isPublic?: boolean; variablePinType?: Record<string, unknown>; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
263
263
  const candidates = this.buildCandidates(params.blueprintName);
264
264
  const primary = candidates[0];
265
265
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
266
266
  const pluginResp = await this.sendAction('blueprint_add_variable', { blueprintCandidates: candidates, requestedPath: primary, variableName: params.variableName, variableType: params.variableType, defaultValue: params.defaultValue, category: params.category, isReplicated: params.isReplicated, isPublic: params.isPublic, variablePinType: params.variablePinType }, { timeoutMs: params.timeoutMs, waitForEvent: !!params.waitForCompletion, waitForEventTimeoutMs: params.waitForCompletionTimeoutMs });
267
267
  if (pluginResp && pluginResp.success) {
268
- return pluginResp;
268
+ return pluginResp as any;
269
269
  }
270
270
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
271
271
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement blueprint_add_variable' } as const;
@@ -273,24 +273,24 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
273
273
  return { success: false, error: pluginResp?.error ?? 'BLUEPRINT_ADD_VARIABLE_FAILED', message: pluginResp?.message ?? 'Failed to add variable via automation bridge' } as const;
274
274
  }
275
275
 
276
- async removeVariable(params: { blueprintName: string; variableName: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
276
+ async removeVariable(params: { blueprintName: string; variableName: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
277
277
  const candidates = this.buildCandidates(params.blueprintName);
278
278
  const primary = candidates[0];
279
279
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
280
280
  const pluginResp = await this.sendAction('blueprint_remove_variable', { blueprintCandidates: candidates, requestedPath: primary, variableName: params.variableName }, { timeoutMs: params.timeoutMs, waitForEvent: !!params.waitForCompletion, waitForEventTimeoutMs: params.waitForCompletionTimeoutMs });
281
- if (pluginResp && pluginResp.success) return pluginResp;
281
+ if (pluginResp && pluginResp.success) return pluginResp as any;
282
282
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
283
283
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement blueprint_remove_variable' } as const;
284
284
  }
285
285
  return { success: false, error: pluginResp?.error ?? 'BLUEPRINT_REMOVE_VARIABLE_FAILED', message: pluginResp?.message ?? 'Failed to remove variable via automation bridge' } as const;
286
286
  }
287
287
 
288
- async renameVariable(params: { blueprintName: string; oldName: string; newName: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
288
+ async renameVariable(params: { blueprintName: string; oldName: string; newName: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
289
289
  const candidates = this.buildCandidates(params.blueprintName);
290
290
  const primary = candidates[0];
291
291
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
292
292
  const pluginResp = await this.sendAction('blueprint_rename_variable', { blueprintCandidates: candidates, requestedPath: primary, oldName: params.oldName, newName: params.newName }, { timeoutMs: params.timeoutMs, waitForEvent: !!params.waitForCompletion, waitForEventTimeoutMs: params.waitForCompletionTimeoutMs });
293
- if (pluginResp && pluginResp.success) return pluginResp;
293
+ if (pluginResp && pluginResp.success) return pluginResp as any;
294
294
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
295
295
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement blueprint_rename_variable' } as const;
296
296
  }
@@ -299,13 +299,13 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
299
299
 
300
300
 
301
301
 
302
- async addEvent(params: { blueprintName: string; eventType: string; customEventName?: string; parameters?: Array<{ name: string; type: string }>; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
302
+ async addEvent(params: { blueprintName: string; eventType: string; customEventName?: string; parameters?: Array<{ name: string; type: string }>; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
303
303
  const candidates = this.buildCandidates(params.blueprintName);
304
304
  const primary = candidates[0];
305
305
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
306
306
  const pluginResp = await this.sendAction('blueprint_add_event', { blueprintCandidates: candidates, requestedPath: primary, eventType: params.eventType, customEventName: params.customEventName, parameters: params.parameters }, { timeoutMs: params.timeoutMs, waitForEvent: !!params.waitForCompletion, waitForEventTimeoutMs: params.waitForCompletionTimeoutMs });
307
307
  if (pluginResp && pluginResp.success) {
308
- return pluginResp;
308
+ return pluginResp as any;
309
309
  }
310
310
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
311
311
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement blueprint_add_event' } as const;
@@ -313,7 +313,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
313
313
  return { success: false, error: pluginResp?.error ?? 'BLUEPRINT_ADD_EVENT_FAILED', message: pluginResp?.message ?? 'Failed to add event via automation bridge' } as const;
314
314
  }
315
315
 
316
- async removeEvent(params: { blueprintName: string; eventName: string; customEventName?: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
316
+ async removeEvent(params: { blueprintName: string; eventName: string; customEventName?: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
317
317
  const candidates = this.buildCandidates(params.blueprintName);
318
318
  const primary = candidates[0];
319
319
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
@@ -325,7 +325,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
325
325
  try {
326
326
  const pluginResp = await this.sendAction('blueprint_remove_event', { blueprintCandidates: candidates, requestedPath: primary, eventName: finalEventName }, { timeoutMs: params.timeoutMs, waitForEvent: !!params.waitForCompletion, waitForEventTimeoutMs: params.waitForCompletionTimeoutMs });
327
327
  if (pluginResp && pluginResp.success) {
328
- return pluginResp;
328
+ return pluginResp as any;
329
329
  }
330
330
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
331
331
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement blueprint_remove_event' } as const;
@@ -336,13 +336,13 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
336
336
  }
337
337
  }
338
338
 
339
- async addFunction(params: { blueprintName: string; functionName: string; inputs?: Array<{ name: string; type: string }>; outputs?: Array<{ name: string; type: string }>; isPublic?: boolean; category?: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
339
+ async addFunction(params: { blueprintName: string; functionName: string; inputs?: Array<{ name: string; type: string }>; outputs?: Array<{ name: string; type: string }>; isPublic?: boolean; category?: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
340
340
  const candidates = this.buildCandidates(params.blueprintName);
341
341
  const primary = candidates[0];
342
342
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
343
343
  const pluginResp = await this.sendAction('blueprint_add_function', { blueprintCandidates: candidates, requestedPath: primary, functionName: params.functionName, inputs: params.inputs, outputs: params.outputs, isPublic: params.isPublic, category: params.category }, { timeoutMs: params.timeoutMs, waitForEvent: !!params.waitForCompletion, waitForEventTimeoutMs: params.waitForCompletionTimeoutMs });
344
344
  if (pluginResp && pluginResp.success) {
345
- return pluginResp;
345
+ return pluginResp as any;
346
346
  }
347
347
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
348
348
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement blueprint_add_function' } as const;
@@ -350,13 +350,13 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
350
350
  return { success: false, error: pluginResp?.error ?? 'BLUEPRINT_ADD_FUNCTION_FAILED', message: pluginResp?.message ?? 'Failed to add function via automation bridge' } as const;
351
351
  }
352
352
 
353
- async setVariableMetadata(params: { blueprintName: string; variableName: string; metadata: Record<string, unknown>; timeoutMs?: number }) {
353
+ async setVariableMetadata(params: { blueprintName: string; variableName: string; metadata: Record<string, unknown>; timeoutMs?: number }): Promise<StandardActionResponse> {
354
354
  const candidates = this.buildCandidates(params.blueprintName);
355
355
  const primary = candidates[0];
356
356
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
357
357
  const pluginResp = await this.sendAction('blueprint_set_variable_metadata', { blueprintCandidates: candidates, requestedPath: primary, variableName: params.variableName, metadata: params.metadata }, { timeoutMs: params.timeoutMs });
358
358
  if (pluginResp && pluginResp.success) {
359
- return pluginResp;
359
+ return pluginResp as any;
360
360
  }
361
361
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
362
362
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement blueprint_set_variable_metadata' } as const;
@@ -364,19 +364,19 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
364
364
  return { success: false, error: pluginResp?.error ?? 'SET_VARIABLE_METADATA_FAILED', message: pluginResp?.message ?? 'Failed to set variable metadata via automation bridge' } as const;
365
365
  }
366
366
 
367
- async addConstructionScript(params: { blueprintName: string; scriptName: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }) {
367
+ async addConstructionScript(params: { blueprintName: string; scriptName: string; timeoutMs?: number; waitForCompletion?: boolean; waitForCompletionTimeoutMs?: number }): Promise<StandardActionResponse> {
368
368
  const candidates = this.buildCandidates(params.blueprintName);
369
369
  const primary = candidates[0];
370
370
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
371
371
  const pluginResp = await this.sendAction('blueprint_add_construction_script', { blueprintCandidates: candidates, requestedPath: primary, scriptName: params.scriptName }, { timeoutMs: params.timeoutMs, waitForEvent: !!params.waitForCompletion, waitForEventTimeoutMs: params.waitForCompletionTimeoutMs });
372
- if (pluginResp && pluginResp.success) return pluginResp;
372
+ if (pluginResp && pluginResp.success) return pluginResp as any;
373
373
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
374
374
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement blueprint_add_construction_script' } as const;
375
375
  }
376
376
  return { success: false, error: pluginResp?.error ?? 'ADD_CONSTRUCTION_SCRIPT_FAILED', message: pluginResp?.message ?? 'Failed to add construction script via automation bridge' } as const;
377
377
  }
378
378
 
379
- async compileBlueprint(params: { blueprintName: string; saveAfterCompile?: boolean; }) {
379
+ async compileBlueprint(params: { blueprintName: string; saveAfterCompile?: boolean; }): Promise<StandardActionResponse> {
380
380
  try {
381
381
  const candidates = this.buildCandidates(params.blueprintName);
382
382
  const primary = candidates[0] ?? params.blueprintName;
@@ -386,7 +386,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
386
386
  ...pluginResp,
387
387
  blueprint: primary,
388
388
  message: pluginResp.message || `Compiled ${primary}`
389
- };
389
+ } as any;
390
390
  }
391
391
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
392
392
  this.pluginBlueprintActionsAvailable = false;
@@ -398,7 +398,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
398
398
  }
399
399
  }
400
400
 
401
- async getBlueprintSCS(params: { blueprintPath: string; timeoutMs?: number }) {
401
+ async getBlueprintSCS(params: { blueprintPath: string; timeoutMs?: number }): Promise<StandardActionResponse> {
402
402
  const blueprintPath = coerceString(params.blueprintPath);
403
403
  if (!blueprintPath) {
404
404
  return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
@@ -409,7 +409,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
409
409
  { blueprint_path: blueprintPath },
410
410
  { timeoutMs: params.timeoutMs });
411
411
 
412
- if (pluginResp && pluginResp.success) return pluginResp;
412
+ if (pluginResp && pluginResp.success) return pluginResp as any;
413
413
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
414
414
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement get_blueprint_scs' } as const;
415
415
  }
@@ -427,7 +427,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
427
427
  meshPath?: string;
428
428
  materialPath?: string;
429
429
  timeoutMs?: number;
430
- }) {
430
+ }): Promise<StandardActionResponse> {
431
431
  const blueprintPath = coerceString(params.blueprintPath);
432
432
  if (!blueprintPath) {
433
433
  return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
@@ -467,7 +467,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
467
467
  this.log.warn?.(`addSCSComponent reported warning: ${(pluginResp as any).message}`);
468
468
  }
469
469
  }
470
- if (pluginResp && pluginResp.success) return pluginResp;
470
+ if (pluginResp && pluginResp.success) return pluginResp as any;
471
471
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
472
472
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement add_scs_component' } as const;
473
473
  }
@@ -477,7 +477,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
477
477
  }
478
478
  }
479
479
 
480
- async removeSCSComponent(params: { blueprintPath: string; componentName: string; timeoutMs?: number }) {
480
+ async removeSCSComponent(params: { blueprintPath: string; componentName: string; timeoutMs?: number }): Promise<StandardActionResponse> {
481
481
  const blueprintPath = coerceString(params.blueprintPath);
482
482
  if (!blueprintPath) {
483
483
  return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
@@ -498,7 +498,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
498
498
  this.log.warn?.(`removeSCSComponent reported warning: ${(pluginResp as any).message}`);
499
499
  }
500
500
  }
501
- if (pluginResp && pluginResp.success) return pluginResp;
501
+ if (pluginResp && pluginResp.success) return pluginResp as any;
502
502
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
503
503
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement remove_scs_component' } as const;
504
504
  }
@@ -513,7 +513,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
513
513
  componentName: string;
514
514
  newParent: string;
515
515
  timeoutMs?: number;
516
- }) {
516
+ }): Promise<StandardActionResponse> {
517
517
  const blueprintPath = coerceString(params.blueprintPath);
518
518
  if (!blueprintPath) {
519
519
  return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
@@ -538,7 +538,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
538
538
  this.log.warn?.(`reparentSCSComponent reported warning: ${(pluginResp as any).message}`);
539
539
  }
540
540
  }
541
- if (pluginResp && pluginResp.success) return pluginResp;
541
+ if (pluginResp && pluginResp.success) return pluginResp as any;
542
542
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
543
543
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement reparent_scs_component' } as const;
544
544
  }
@@ -555,7 +555,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
555
555
  rotation?: [number, number, number];
556
556
  scale?: [number, number, number];
557
557
  timeoutMs?: number;
558
- }) {
558
+ }): Promise<StandardActionResponse> {
559
559
  const blueprintPath = coerceString(params.blueprintPath);
560
560
  if (!blueprintPath) {
561
561
  return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
@@ -583,7 +583,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
583
583
  this.log.warn?.(`setSCSComponentTransform reported warning: ${(pluginResp as any).message}`);
584
584
  }
585
585
  }
586
- if (pluginResp && pluginResp.success) return pluginResp;
586
+ if (pluginResp && pluginResp.success) return pluginResp as any;
587
587
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
588
588
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement set_scs_component_transform' } as const;
589
589
  }
@@ -599,7 +599,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
599
599
  propertyName: string;
600
600
  propertyValue: any;
601
601
  timeoutMs?: number;
602
- }) {
602
+ }): Promise<StandardActionResponse> {
603
603
  const blueprintPath = coerceString(params.blueprintPath);
604
604
  if (!blueprintPath) {
605
605
  return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
@@ -632,7 +632,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
632
632
  this.log.warn?.(`setSCSComponentProperty reported warning: ${(pluginResp as any).message}`);
633
633
  }
634
634
  }
635
- if (pluginResp && pluginResp.success) return pluginResp;
635
+ if (pluginResp && pluginResp.success) return pluginResp as any;
636
636
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
637
637
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement set_scs_component_property' } as const;
638
638
  }
@@ -646,7 +646,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
646
646
  blueprintPath: string;
647
647
  graphName?: string;
648
648
  timeoutMs?: number;
649
- }) {
649
+ }): Promise<StandardActionResponse> {
650
650
  const blueprintPath = coerceString(params.blueprintPath);
651
651
  if (!blueprintPath) {
652
652
  return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
@@ -664,7 +664,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
664
664
  success: true,
665
665
  nodes: (pluginResp.result as any).nodes,
666
666
  graphName: (pluginResp.result as any).graphName
667
- };
667
+ } as any;
668
668
  }
669
669
  if (pluginResp && this.isUnknownActionResponse(pluginResp)) {
670
670
  return { success: false, error: 'UNKNOWN_PLUGIN_ACTION', message: 'Automation plugin does not implement get_nodes' } as const;
@@ -688,7 +688,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
688
688
  posX?: number;
689
689
  posY?: number;
690
690
  timeoutMs?: number;
691
- }) {
691
+ }): Promise<StandardActionResponse> {
692
692
  const candidates = this.buildCandidates(params.blueprintName);
693
693
  const primary = candidates[0];
694
694
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
@@ -708,7 +708,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
708
708
  y: params.posY
709
709
  };
710
710
  const res = await this.sendAction('manage_blueprint_graph', payload, { timeoutMs: params.timeoutMs });
711
- return res;
711
+ return res as any;
712
712
  }
713
713
 
714
714
  async deleteNode(params: {
@@ -716,7 +716,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
716
716
  nodeId: string;
717
717
  graphName?: string;
718
718
  timeoutMs?: number;
719
- }) {
719
+ }): Promise<StandardActionResponse> {
720
720
  const blueprintPath = coerceString(params.blueprintPath);
721
721
  if (!blueprintPath) return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
722
722
  if (!params.nodeId) return { success: false, error: 'INVALID_NODE_ID', message: 'Node ID is required' } as const;
@@ -727,7 +727,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
727
727
  graphName: params.graphName || 'EventGraph',
728
728
  nodeId: params.nodeId
729
729
  }, { timeoutMs: params.timeoutMs });
730
- return res;
730
+ return res as any;
731
731
  }
732
732
 
733
733
  async createRerouteNode(params: {
@@ -736,7 +736,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
736
736
  x: number;
737
737
  y: number;
738
738
  timeoutMs?: number;
739
- }) {
739
+ }): Promise<StandardActionResponse> {
740
740
  const blueprintPath = coerceString(params.blueprintPath);
741
741
  if (!blueprintPath) return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
742
742
 
@@ -747,7 +747,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
747
747
  x: params.x,
748
748
  y: params.y
749
749
  }, { timeoutMs: params.timeoutMs });
750
- return res;
750
+ return res as any;
751
751
  }
752
752
 
753
753
  async setNodeProperty(params: {
@@ -757,7 +757,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
757
757
  value: string;
758
758
  graphName?: string;
759
759
  timeoutMs?: number;
760
- }) {
760
+ }): Promise<StandardActionResponse> {
761
761
  const blueprintPath = coerceString(params.blueprintPath);
762
762
  if (!blueprintPath) return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
763
763
  if (!params.nodeId) return { success: false, error: 'INVALID_NODE_ID', message: 'Node ID is required' } as const;
@@ -771,7 +771,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
771
771
  propertyName: params.propertyName,
772
772
  value: params.value
773
773
  }, { timeoutMs: params.timeoutMs });
774
- return res;
774
+ return res as any;
775
775
  }
776
776
 
777
777
  async getNodeDetails(params: {
@@ -779,7 +779,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
779
779
  nodeId: string;
780
780
  graphName?: string;
781
781
  timeoutMs?: number;
782
- }) {
782
+ }): Promise<StandardActionResponse> {
783
783
  const blueprintPath = coerceString(params.blueprintPath);
784
784
  if (!blueprintPath) return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
785
785
  if (!params.nodeId) return { success: false, error: 'INVALID_NODE_ID', message: 'Node ID is required' } as const;
@@ -790,14 +790,14 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
790
790
  graphName: params.graphName || 'EventGraph',
791
791
  nodeId: params.nodeId
792
792
  }, { timeoutMs: params.timeoutMs });
793
- return res;
793
+ return res as any;
794
794
  }
795
795
 
796
796
  async getGraphDetails(params: {
797
797
  blueprintPath: string;
798
798
  graphName?: string;
799
799
  timeoutMs?: number;
800
- }) {
800
+ }): Promise<StandardActionResponse> {
801
801
  const blueprintPath = coerceString(params.blueprintPath);
802
802
  if (!blueprintPath) return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
803
803
 
@@ -806,7 +806,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
806
806
  blueprintPath: blueprintPath,
807
807
  graphName: params.graphName || 'EventGraph'
808
808
  }, { timeoutMs: params.timeoutMs });
809
- return res;
809
+ return res as any;
810
810
  }
811
811
 
812
812
  async getPinDetails(params: {
@@ -815,7 +815,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
815
815
  pinName?: string;
816
816
  graphName?: string;
817
817
  timeoutMs?: number;
818
- }) {
818
+ }): Promise<StandardActionResponse> {
819
819
  const blueprintPath = coerceString(params.blueprintPath);
820
820
  if (!blueprintPath) return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' } as const;
821
821
  if (!params.nodeId) return { success: false, error: 'INVALID_NODE_ID', message: 'Node ID is required' } as const;
@@ -827,7 +827,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
827
827
  nodeId: params.nodeId,
828
828
  pinName: params.pinName
829
829
  }, { timeoutMs: params.timeoutMs });
830
- return res;
830
+ return res as any;
831
831
  }
832
832
 
833
833
 
@@ -838,7 +838,7 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
838
838
  sourcePinName?: string;
839
839
  targetPinName?: string;
840
840
  timeoutMs?: number;
841
- }) {
841
+ }): Promise<StandardActionResponse> {
842
842
  const candidates = this.buildCandidates(params.blueprintName);
843
843
  const primary = candidates[0];
844
844
  if (!primary) return { success: false as const, error: 'Invalid blueprint name' };
@@ -869,6 +869,6 @@ export class BlueprintTools extends BaseTool implements IBlueprintTools {
869
869
  fromPinName: fromPinName,
870
870
  toPinName: toPinName
871
871
  }, { timeoutMs: params.timeoutMs });
872
- return res;
872
+ return res as any;
873
873
  }
874
874
  }