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 { IAssetTools } from '../types/tool-interfaces.js';
2
+ import { IAssetTools, StandardActionResponse, SourceControlState } from '../types/tool-interfaces.js';
3
3
  export declare class AssetTools extends BaseTool implements IAssetTools {
4
4
  private normalizeAssetPath;
5
5
  importAsset(params: {
@@ -7,124 +7,72 @@ export declare class AssetTools extends BaseTool implements IAssetTools {
7
7
  destinationPath: string;
8
8
  overwrite?: boolean;
9
9
  save?: boolean;
10
- }): Promise<any>;
10
+ }): Promise<StandardActionResponse>;
11
11
  duplicateAsset(params: {
12
12
  sourcePath: string;
13
13
  destinationPath: string;
14
14
  overwrite?: boolean;
15
- }): Promise<any>;
15
+ }): Promise<StandardActionResponse>;
16
16
  renameAsset(params: {
17
17
  sourcePath: string;
18
18
  destinationPath: string;
19
- }): Promise<any>;
19
+ }): Promise<StandardActionResponse>;
20
20
  moveAsset(params: {
21
21
  sourcePath: string;
22
22
  destinationPath: string;
23
- }): Promise<any>;
23
+ }): Promise<StandardActionResponse>;
24
24
  findByTag(params: {
25
25
  tag: string;
26
26
  value?: string;
27
- }): Promise<any>;
27
+ }): Promise<StandardActionResponse>;
28
28
  deleteAssets(params: {
29
29
  paths: string[];
30
30
  fixupRedirectors?: boolean;
31
31
  timeoutMs?: number;
32
- }): Promise<any>;
32
+ }): Promise<StandardActionResponse>;
33
33
  searchAssets(params: {
34
34
  classNames?: string[];
35
35
  packagePaths?: string[];
36
36
  recursivePaths?: boolean;
37
37
  recursiveClasses?: boolean;
38
38
  limit?: number;
39
- }): Promise<{
40
- success: boolean;
41
- error: any;
42
- message?: undefined;
43
- assets?: undefined;
44
- count?: undefined;
45
- } | {
46
- success: boolean;
47
- message: string;
48
- assets: any[];
49
- count: number;
50
- error?: undefined;
51
- }>;
52
- saveAsset(assetPath: string): Promise<any>;
53
- createFolder(folderPath: string): Promise<any>;
39
+ }): Promise<StandardActionResponse>;
40
+ saveAsset(assetPath: string): Promise<StandardActionResponse>;
41
+ createFolder(folderPath: string): Promise<StandardActionResponse>;
54
42
  getDependencies(params: {
55
43
  assetPath: string;
56
44
  recursive?: boolean;
57
- }): Promise<any>;
45
+ }): Promise<StandardActionResponse>;
58
46
  getSourceControlState(params: {
59
47
  assetPath: string;
60
- }): Promise<any>;
48
+ }): Promise<SourceControlState | StandardActionResponse>;
61
49
  getMetadata(params: {
62
50
  assetPath: string;
63
- }): Promise<{
64
- success: boolean;
65
- message: string;
66
- }>;
51
+ }): Promise<StandardActionResponse>;
67
52
  analyzeGraph(params: {
68
53
  assetPath: string;
69
54
  maxDepth?: number;
70
- }): Promise<{
71
- success: boolean;
72
- error: any;
73
- message?: undefined;
74
- analysis?: undefined;
75
- } | {
76
- success: boolean;
77
- message: string;
78
- analysis: {
79
- asset: any;
80
- dependencies: any[];
81
- totalDependencyCount: any;
82
- requestedMaxDepth: number;
83
- maxDepthUsed: number;
84
- circularDependencies: string[][];
85
- topologicalOrder: string[];
86
- stats: {
87
- nodeCount: number;
88
- leafCount: number;
89
- };
90
- };
91
- error?: undefined;
92
- }>;
55
+ }): Promise<StandardActionResponse>;
93
56
  createThumbnail(params: {
94
57
  assetPath: string;
95
58
  width?: number;
96
59
  height?: number;
97
- }): Promise<any>;
60
+ }): Promise<StandardActionResponse>;
98
61
  setTags(params: {
99
62
  assetPath: string;
100
63
  tags: string[];
101
- }): Promise<any>;
64
+ }): Promise<StandardActionResponse>;
102
65
  generateReport(params: {
103
66
  directory: string;
104
67
  reportType?: string;
105
68
  outputPath?: string;
106
- }): Promise<any>;
69
+ }): Promise<StandardActionResponse>;
107
70
  validate(params: {
108
71
  assetPath: string;
109
- }): Promise<any>;
72
+ }): Promise<StandardActionResponse>;
110
73
  generateLODs(params: {
111
74
  assetPath: string;
112
75
  lodCount: number;
113
- }): Promise<{
114
- success: boolean;
115
- error: string;
116
- details?: undefined;
117
- } | {
118
- success: boolean;
119
- error: any;
120
- details: any;
121
- } | {
122
- success: boolean;
123
- message: any;
124
- assetPath: string;
125
- lodCount: number;
126
- error?: undefined;
127
- details?: undefined;
128
- }>;
76
+ }): Promise<StandardActionResponse>;
129
77
  }
130
78
  //# sourceMappingURL=assets.d.ts.map
@@ -1,5 +1,9 @@
1
1
  import { BaseTool } from './base-tool.js';
2
2
  import { wasmIntegration } from '../wasm/index.js';
3
+ import { Logger } from '../utils/logger.js';
4
+ import { sanitizePath } from '../utils/path-security.js';
5
+ import { DEFAULT_ASSET_OP_TIMEOUT_MS, EXTENDED_ASSET_OP_TIMEOUT_MS, LONG_RUNNING_OP_TIMEOUT_MS } from '../constants.js';
6
+ const log = new Logger('AssetTools');
3
7
  export class AssetTools extends BaseTool {
4
8
  normalizeAssetPath(path) {
5
9
  if (!path)
@@ -15,13 +19,14 @@ export class AssetTools extends BaseTool {
15
19
  else
16
20
  normalized = '/Game/' + normalized;
17
21
  }
18
- return normalized.replace(/\/+/g, '/');
22
+ normalized = normalized.replace(/\/+/g, '/');
23
+ return sanitizePath(normalized);
19
24
  }
20
25
  async importAsset(params) {
21
26
  const res = await this.sendRequest('manage_asset', {
22
27
  ...params,
23
28
  subAction: 'import'
24
- }, 'manage_asset', { timeoutMs: 120000 });
29
+ }, 'manage_asset', { timeoutMs: EXTENDED_ASSET_OP_TIMEOUT_MS });
25
30
  if (res && res.success) {
26
31
  return { ...res, asset: this.normalizeAssetPath(params.destinationPath), source: params.sourcePath };
27
32
  }
@@ -35,7 +40,7 @@ export class AssetTools extends BaseTool {
35
40
  destinationPath,
36
41
  overwrite: params.overwrite ?? false,
37
42
  subAction: 'duplicate'
38
- }, 'manage_asset', { timeoutMs: 60000 });
43
+ }, 'manage_asset', { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
39
44
  if (res && res.success) {
40
45
  return { ...res, asset: destinationPath, source: sourcePath };
41
46
  }
@@ -48,7 +53,7 @@ export class AssetTools extends BaseTool {
48
53
  sourcePath,
49
54
  destinationPath,
50
55
  subAction: 'rename'
51
- }, 'manage_asset', { timeoutMs: 60000 });
56
+ }, 'manage_asset', { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
52
57
  if (res && res.success) {
53
58
  return { ...res, asset: destinationPath, oldName: sourcePath };
54
59
  }
@@ -61,7 +66,7 @@ export class AssetTools extends BaseTool {
61
66
  sourcePath,
62
67
  destinationPath,
63
68
  subAction: 'move'
64
- }, 'manage_asset', { timeoutMs: 60000 });
69
+ }, 'manage_asset', { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
65
70
  if (res && res.success) {
66
71
  return { ...res, asset: destinationPath, from: sourcePath };
67
72
  }
@@ -71,7 +76,7 @@ export class AssetTools extends BaseTool {
71
76
  return this.sendRequest('asset_query', {
72
77
  ...params,
73
78
  subAction: 'find_by_tag'
74
- }, 'asset_query', { timeoutMs: 60000 });
79
+ }, 'asset_query', { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
75
80
  }
76
81
  async deleteAssets(params) {
77
82
  const assetPaths = (Array.isArray(params.paths) ? params.paths : [])
@@ -80,7 +85,7 @@ export class AssetTools extends BaseTool {
80
85
  assetPaths,
81
86
  fixupRedirectors: params.fixupRedirectors,
82
87
  subAction: 'delete'
83
- }, 'manage_asset', { timeoutMs: params.timeoutMs || 120000 });
88
+ }, 'manage_asset', { timeoutMs: params.timeoutMs || EXTENDED_ASSET_OP_TIMEOUT_MS });
84
89
  }
85
90
  async searchAssets(params) {
86
91
  const packagePaths = params.packagePaths
@@ -90,10 +95,10 @@ export class AssetTools extends BaseTool {
90
95
  ...params,
91
96
  packagePaths,
92
97
  subAction: 'search_assets'
93
- }, 'asset_query', { timeoutMs: 60000 });
98
+ }, 'asset_query', { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
94
99
  if (!response.success) {
95
- const errorMsg = response.error || `Failed to search assets. Raw response: ${JSON.stringify(response)}`;
96
- return { success: false, error: errorMsg };
100
+ const errorMsg = typeof response.error === 'string' ? response.error : JSON.stringify(response.error);
101
+ return { success: false, error: errorMsg || 'Failed to search assets' };
97
102
  }
98
103
  const assetsRaw = response.assets || response.data || response.result;
99
104
  const assets = Array.isArray(assetsRaw) ? assetsRaw : [];
@@ -110,7 +115,7 @@ export class AssetTools extends BaseTool {
110
115
  const bridge = this.getAutomationBridge();
111
116
  if (bridge && typeof bridge.sendAutomationRequest === 'function') {
112
117
  try {
113
- const response = await bridge.sendAutomationRequest('manage_asset', { assetPath: normalizedPath, subAction: 'save_asset' }, { timeoutMs: 60000 });
118
+ const response = await bridge.sendAutomationRequest('manage_asset', { assetPath: normalizedPath, subAction: 'save_asset' }, { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
114
119
  if (response && response.success !== false) {
115
120
  return {
116
121
  success: true,
@@ -120,7 +125,8 @@ export class AssetTools extends BaseTool {
120
125
  };
121
126
  }
122
127
  }
123
- catch (_err) {
128
+ catch (primaryError) {
129
+ log.debug('saveAsset primary method failed, trying fallback', primaryError);
124
130
  }
125
131
  }
126
132
  const res = await this.bridge.executeEditorFunction('SAVE_ASSET', { path: normalizedPath });
@@ -131,7 +137,7 @@ export class AssetTools extends BaseTool {
131
137
  return { success: false, error: res?.error ?? 'Failed to save asset' };
132
138
  }
133
139
  catch (err) {
134
- return { success: false, error: `Failed to save asset: ${err}` };
140
+ return { success: false, error: `Failed to save asset: ${err} ` };
135
141
  }
136
142
  }
137
143
  async createFolder(folderPath) {
@@ -139,7 +145,7 @@ export class AssetTools extends BaseTool {
139
145
  return this.sendRequest('manage_asset', {
140
146
  path,
141
147
  subAction: 'create_folder'
142
- }, 'manage_asset', { timeoutMs: 60000 });
148
+ }, 'manage_asset', { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
143
149
  }
144
150
  async getDependencies(params) {
145
151
  return this.sendRequest('manage_asset', {
@@ -176,7 +182,7 @@ export class AssetTools extends BaseTool {
176
182
  assetPath,
177
183
  maxDepth,
178
184
  subAction: 'get_asset_graph'
179
- }, 'manage_asset', { timeoutMs: 60000 });
185
+ }, 'manage_asset', { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
180
186
  if (!response.success || !response.graph) {
181
187
  return { success: false, error: response.error || 'Failed to retrieve asset graph from engine' };
182
188
  }
@@ -216,7 +222,7 @@ export class AssetTools extends BaseTool {
216
222
  };
217
223
  }
218
224
  catch (e) {
219
- return { success: false, error: `Analysis failed: ${e.message}` };
225
+ return { success: false, error: `Analysis failed: ${e.message} ` };
220
226
  }
221
227
  }
222
228
  async createThumbnail(params) {
@@ -224,28 +230,28 @@ export class AssetTools extends BaseTool {
224
230
  ...params,
225
231
  assetPath: this.normalizeAssetPath(params.assetPath),
226
232
  subAction: 'generate_thumbnail'
227
- }, 'manage_asset', { timeoutMs: 60000 });
233
+ }, 'manage_asset', { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
228
234
  }
229
235
  async setTags(params) {
230
236
  return this.sendRequest('manage_asset', {
231
237
  ...params,
232
238
  assetPath: this.normalizeAssetPath(params.assetPath),
233
239
  subAction: 'set_tags'
234
- }, 'manage_asset', { timeoutMs: 60000 });
240
+ }, 'manage_asset', { timeoutMs: DEFAULT_ASSET_OP_TIMEOUT_MS });
235
241
  }
236
242
  async generateReport(params) {
237
243
  return this.sendRequest('manage_asset', {
238
244
  ...params,
239
245
  directory: this.normalizeAssetPath(params.directory),
240
246
  subAction: 'generate_report'
241
- }, 'manage_asset', { timeoutMs: 300000 });
247
+ }, 'manage_asset', { timeoutMs: LONG_RUNNING_OP_TIMEOUT_MS });
242
248
  }
243
249
  async validate(params) {
244
250
  return this.sendRequest('manage_asset', {
245
251
  ...params,
246
252
  assetPath: this.normalizeAssetPath(params.assetPath),
247
253
  subAction: 'validate'
248
- }, 'manage_asset', { timeoutMs: 300000 });
254
+ }, 'manage_asset', { timeoutMs: LONG_RUNNING_OP_TIMEOUT_MS });
249
255
  }
250
256
  async generateLODs(params) {
251
257
  const assetPath = this.normalizeAssetPath(String(params.assetPath ?? '').trim());
@@ -263,7 +269,7 @@ export class AssetTools extends BaseTool {
263
269
  assetPaths: [assetPath],
264
270
  numLODs: lodCount,
265
271
  subAction: 'generate_lods'
266
- }, { timeoutMs: 120000 });
272
+ }, { timeoutMs: EXTENDED_ASSET_OP_TIMEOUT_MS });
267
273
  if (!response || response.success === false) {
268
274
  return {
269
275
  success: false,
@@ -283,7 +289,7 @@ export class AssetTools extends BaseTool {
283
289
  catch (error) {
284
290
  return {
285
291
  success: false,
286
- error: `Failed to generate LODs: ${error instanceof Error ? error.message : String(error)}`
292
+ error: `Failed to generate LODs: ${error instanceof Error ? error.message : String(error)} `
287
293
  };
288
294
  }
289
295
  }
@@ -5,13 +5,13 @@ export declare abstract class BaseTool implements IBaseTool {
5
5
  protected bridge: UnrealBridge;
6
6
  constructor(bridge: UnrealBridge);
7
7
  getAutomationBridge(): AutomationBridge;
8
- protected sendRequest(action: string, params: Record<string, unknown>, toolName?: string, options?: {
8
+ protected sendRequest<T = unknown>(action: string, params: Record<string, unknown>, toolName?: string, options?: {
9
9
  timeoutMs?: number;
10
- }): Promise<any>;
11
- protected sendAutomationRequest(action: string, params?: Record<string, unknown>, options?: {
10
+ }): Promise<T>;
11
+ protected sendAutomationRequest<T = unknown>(action: string, params?: Record<string, unknown>, options?: {
12
12
  timeoutMs?: number;
13
13
  waitForEvent?: boolean;
14
14
  waitForEventTimeoutMs?: number;
15
- }): Promise<any>;
15
+ }): Promise<T>;
16
16
  }
17
17
  //# sourceMappingURL=base-tool.d.ts.map
@@ -33,7 +33,7 @@ export class BaseTool {
33
33
  }
34
34
  throw new Error(errorMessage);
35
35
  }
36
- return response.result ?? response;
36
+ return (response.result ?? response);
37
37
  }
38
38
  async sendAutomationRequest(action, params = {}, options) {
39
39
  const automation = this.getAutomationBridge();
@@ -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
  export declare class BlueprintTools extends BaseTool implements IBlueprintTools {
4
4
  private log;
5
5
  private pluginBlueprintActionsAvailable;
@@ -15,7 +15,7 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
15
15
  timeoutMs?: number;
16
16
  waitForCompletion?: boolean;
17
17
  waitForCompletionTimeoutMs?: number;
18
- }): Promise<any>;
18
+ }): Promise<StandardActionResponse>;
19
19
  modifyConstructionScript(params: {
20
20
  blueprintPath: string;
21
21
  operations: any[];
@@ -24,7 +24,7 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
24
24
  timeoutMs?: number;
25
25
  waitForCompletion?: boolean;
26
26
  waitForCompletionTimeoutMs?: number;
27
- }): Promise<any>;
27
+ }): Promise<StandardActionResponse>;
28
28
  addComponent(params: {
29
29
  blueprintName: string;
30
30
  componentType: string;
@@ -37,40 +37,24 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
37
37
  timeoutMs?: number;
38
38
  waitForCompletion?: boolean;
39
39
  waitForCompletionTimeoutMs?: number;
40
- }): Promise<any>;
41
- waitForBlueprint(blueprintRef: string | string[], timeoutMs?: number): Promise<any>;
40
+ }): Promise<StandardActionResponse>;
41
+ waitForBlueprint(blueprintRef: string | string[], timeoutMs?: number): Promise<StandardActionResponse>;
42
42
  getBlueprint(params: {
43
43
  blueprintName: string;
44
44
  timeoutMs?: number;
45
- }): Promise<any>;
45
+ }): Promise<StandardActionResponse>;
46
46
  getBlueprintInfo(params: {
47
47
  blueprintPath: string;
48
48
  timeoutMs?: number;
49
- }): Promise<{
50
- success: boolean;
51
- message: any;
52
- blueprintPath: any;
53
- blueprint: any;
54
- result: any;
55
- requestId: any;
56
- error?: undefined;
57
- } | {
58
- readonly success: false;
59
- readonly error: any;
60
- readonly message: any;
61
- blueprintPath?: undefined;
62
- blueprint?: undefined;
63
- result?: undefined;
64
- requestId?: undefined;
65
- }>;
49
+ }): Promise<StandardActionResponse>;
66
50
  probeSubobjectDataHandle(opts?: {
67
51
  componentClass?: string;
68
- }): Promise<any>;
52
+ }): Promise<StandardActionResponse>;
69
53
  setBlueprintDefault(params: {
70
54
  blueprintName: string;
71
55
  propertyName: string;
72
56
  value: unknown;
73
- }): Promise<any>;
57
+ }): Promise<StandardActionResponse>;
74
58
  addVariable(params: {
75
59
  blueprintName: string;
76
60
  variableName: string;
@@ -83,14 +67,14 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
83
67
  timeoutMs?: number;
84
68
  waitForCompletion?: boolean;
85
69
  waitForCompletionTimeoutMs?: number;
86
- }): Promise<any>;
70
+ }): Promise<StandardActionResponse>;
87
71
  removeVariable(params: {
88
72
  blueprintName: string;
89
73
  variableName: string;
90
74
  timeoutMs?: number;
91
75
  waitForCompletion?: boolean;
92
76
  waitForCompletionTimeoutMs?: number;
93
- }): Promise<any>;
77
+ }): Promise<StandardActionResponse>;
94
78
  renameVariable(params: {
95
79
  blueprintName: string;
96
80
  oldName: string;
@@ -98,7 +82,7 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
98
82
  timeoutMs?: number;
99
83
  waitForCompletion?: boolean;
100
84
  waitForCompletionTimeoutMs?: number;
101
- }): Promise<any>;
85
+ }): Promise<StandardActionResponse>;
102
86
  addEvent(params: {
103
87
  blueprintName: string;
104
88
  eventType: string;
@@ -110,7 +94,7 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
110
94
  timeoutMs?: number;
111
95
  waitForCompletion?: boolean;
112
96
  waitForCompletionTimeoutMs?: number;
113
- }): Promise<any>;
97
+ }): Promise<StandardActionResponse>;
114
98
  removeEvent(params: {
115
99
  blueprintName: string;
116
100
  eventName: string;
@@ -118,7 +102,7 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
118
102
  timeoutMs?: number;
119
103
  waitForCompletion?: boolean;
120
104
  waitForCompletionTimeoutMs?: number;
121
- }): Promise<any>;
105
+ }): Promise<StandardActionResponse>;
122
106
  addFunction(params: {
123
107
  blueprintName: string;
124
108
  functionName: string;
@@ -135,28 +119,28 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
135
119
  timeoutMs?: number;
136
120
  waitForCompletion?: boolean;
137
121
  waitForCompletionTimeoutMs?: number;
138
- }): Promise<any>;
122
+ }): Promise<StandardActionResponse>;
139
123
  setVariableMetadata(params: {
140
124
  blueprintName: string;
141
125
  variableName: string;
142
126
  metadata: Record<string, unknown>;
143
127
  timeoutMs?: number;
144
- }): Promise<any>;
128
+ }): Promise<StandardActionResponse>;
145
129
  addConstructionScript(params: {
146
130
  blueprintName: string;
147
131
  scriptName: string;
148
132
  timeoutMs?: number;
149
133
  waitForCompletion?: boolean;
150
134
  waitForCompletionTimeoutMs?: number;
151
- }): Promise<any>;
135
+ }): Promise<StandardActionResponse>;
152
136
  compileBlueprint(params: {
153
137
  blueprintName: string;
154
138
  saveAfterCompile?: boolean;
155
- }): Promise<any>;
139
+ }): Promise<StandardActionResponse>;
156
140
  getBlueprintSCS(params: {
157
141
  blueprintPath: string;
158
142
  timeoutMs?: number;
159
- }): Promise<any>;
143
+ }): Promise<StandardActionResponse>;
160
144
  addSCSComponent(params: {
161
145
  blueprintPath: string;
162
146
  componentClass: string;
@@ -165,18 +149,18 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
165
149
  meshPath?: string;
166
150
  materialPath?: string;
167
151
  timeoutMs?: number;
168
- }): Promise<any>;
152
+ }): Promise<StandardActionResponse>;
169
153
  removeSCSComponent(params: {
170
154
  blueprintPath: string;
171
155
  componentName: string;
172
156
  timeoutMs?: number;
173
- }): Promise<any>;
157
+ }): Promise<StandardActionResponse>;
174
158
  reparentSCSComponent(params: {
175
159
  blueprintPath: string;
176
160
  componentName: string;
177
161
  newParent: string;
178
162
  timeoutMs?: number;
179
- }): Promise<any>;
163
+ }): Promise<StandardActionResponse>;
180
164
  setSCSComponentTransform(params: {
181
165
  blueprintPath: string;
182
166
  componentName: string;
@@ -184,31 +168,19 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
184
168
  rotation?: [number, number, number];
185
169
  scale?: [number, number, number];
186
170
  timeoutMs?: number;
187
- }): Promise<any>;
171
+ }): Promise<StandardActionResponse>;
188
172
  setSCSComponentProperty(params: {
189
173
  blueprintPath: string;
190
174
  componentName: string;
191
175
  propertyName: string;
192
176
  propertyValue: any;
193
177
  timeoutMs?: number;
194
- }): Promise<any>;
178
+ }): Promise<StandardActionResponse>;
195
179
  getNodes(params: {
196
180
  blueprintPath: string;
197
181
  graphName?: string;
198
182
  timeoutMs?: number;
199
- }): Promise<{
200
- success: boolean;
201
- nodes: any;
202
- graphName: any;
203
- error?: undefined;
204
- message?: undefined;
205
- } | {
206
- readonly success: false;
207
- readonly error: any;
208
- readonly message: any;
209
- nodes?: undefined;
210
- graphName?: undefined;
211
- }>;
183
+ }): Promise<StandardActionResponse>;
212
184
  addNode(params: {
213
185
  blueprintName: string;
214
186
  nodeType: string;
@@ -221,20 +193,20 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
221
193
  posX?: number;
222
194
  posY?: number;
223
195
  timeoutMs?: number;
224
- }): Promise<any>;
196
+ }): Promise<StandardActionResponse>;
225
197
  deleteNode(params: {
226
198
  blueprintPath: string;
227
199
  nodeId: string;
228
200
  graphName?: string;
229
201
  timeoutMs?: number;
230
- }): Promise<any>;
202
+ }): Promise<StandardActionResponse>;
231
203
  createRerouteNode(params: {
232
204
  blueprintPath: string;
233
205
  graphName?: string;
234
206
  x: number;
235
207
  y: number;
236
208
  timeoutMs?: number;
237
- }): Promise<any>;
209
+ }): Promise<StandardActionResponse>;
238
210
  setNodeProperty(params: {
239
211
  blueprintPath: string;
240
212
  nodeId: string;
@@ -242,25 +214,25 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
242
214
  value: string;
243
215
  graphName?: string;
244
216
  timeoutMs?: number;
245
- }): Promise<any>;
217
+ }): Promise<StandardActionResponse>;
246
218
  getNodeDetails(params: {
247
219
  blueprintPath: string;
248
220
  nodeId: string;
249
221
  graphName?: string;
250
222
  timeoutMs?: number;
251
- }): Promise<any>;
223
+ }): Promise<StandardActionResponse>;
252
224
  getGraphDetails(params: {
253
225
  blueprintPath: string;
254
226
  graphName?: string;
255
227
  timeoutMs?: number;
256
- }): Promise<any>;
228
+ }): Promise<StandardActionResponse>;
257
229
  getPinDetails(params: {
258
230
  blueprintPath: string;
259
231
  nodeId: string;
260
232
  pinName?: string;
261
233
  graphName?: string;
262
234
  timeoutMs?: number;
263
- }): Promise<any>;
235
+ }): Promise<StandardActionResponse>;
264
236
  connectPins(params: {
265
237
  blueprintName: string;
266
238
  sourceNodeGuid: string;
@@ -268,6 +240,6 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
268
240
  sourcePinName?: string;
269
241
  targetPinName?: string;
270
242
  timeoutMs?: number;
271
- }): Promise<any>;
243
+ }): Promise<StandardActionResponse>;
272
244
  }
273
245
  //# sourceMappingURL=blueprint.d.ts.map