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.
- package/.env.example +1 -1
- package/.github/release-drafter-config.yml +51 -0
- package/.github/workflows/greetings.yml +5 -1
- package/.github/workflows/labeler.yml +2 -1
- package/.github/workflows/publish-mcp.yml +2 -4
- package/.github/workflows/release-drafter.yml +3 -2
- package/.github/workflows/release.yml +3 -3
- package/CHANGELOG.md +109 -0
- package/CONTRIBUTING.md +1 -1
- package/GEMINI.md +115 -0
- package/Public/Plugin_setup_guide.mp4 +0 -0
- package/README.md +166 -200
- package/dist/automation/bridge.d.ts +1 -2
- package/dist/automation/bridge.js +24 -23
- package/dist/automation/connection-manager.d.ts +1 -0
- package/dist/automation/connection-manager.js +10 -0
- package/dist/automation/message-handler.js +5 -4
- package/dist/automation/request-tracker.d.ts +4 -0
- package/dist/automation/request-tracker.js +11 -3
- package/dist/config.d.ts +0 -1
- package/dist/config.js +0 -1
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +4 -0
- package/dist/graphql/loaders.d.ts +64 -0
- package/dist/graphql/loaders.js +117 -0
- package/dist/graphql/resolvers.d.ts +3 -3
- package/dist/graphql/resolvers.js +33 -30
- package/dist/graphql/server.js +3 -1
- package/dist/graphql/types.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +13 -2
- package/dist/server-setup.d.ts +0 -1
- package/dist/server-setup.js +0 -40
- package/dist/tools/actors.d.ts +58 -24
- package/dist/tools/actors.js +22 -6
- package/dist/tools/assets.d.ts +19 -71
- package/dist/tools/assets.js +28 -22
- package/dist/tools/base-tool.d.ts +4 -4
- package/dist/tools/base-tool.js +1 -1
- package/dist/tools/blueprint.d.ts +45 -61
- package/dist/tools/blueprint.js +43 -14
- package/dist/tools/consolidated-tool-definitions.js +2 -1
- package/dist/tools/consolidated-tool-handlers.js +96 -110
- package/dist/tools/dynamic-handler-registry.d.ts +11 -9
- package/dist/tools/dynamic-handler-registry.js +17 -95
- package/dist/tools/editor.d.ts +19 -193
- package/dist/tools/editor.js +11 -2
- package/dist/tools/environment.d.ts +8 -14
- package/dist/tools/foliage.d.ts +18 -143
- package/dist/tools/foliage.js +4 -2
- package/dist/tools/handlers/actor-handlers.d.ts +1 -1
- package/dist/tools/handlers/actor-handlers.js +14 -13
- package/dist/tools/handlers/asset-handlers.js +454 -454
- package/dist/tools/handlers/sequence-handlers.d.ts +1 -1
- package/dist/tools/handlers/sequence-handlers.js +24 -13
- package/dist/tools/introspection.d.ts +1 -1
- package/dist/tools/introspection.js +1 -1
- package/dist/tools/landscape.d.ts +16 -116
- package/dist/tools/landscape.js +7 -3
- package/dist/tools/level.d.ts +22 -103
- package/dist/tools/level.js +26 -18
- package/dist/tools/lighting.d.ts +54 -7
- package/dist/tools/lighting.js +9 -5
- package/dist/tools/materials.d.ts +1 -1
- package/dist/tools/materials.js +5 -1
- package/dist/tools/niagara.js +37 -2
- package/dist/tools/performance.d.ts +0 -1
- package/dist/tools/performance.js +0 -1
- package/dist/tools/physics.js +5 -1
- package/dist/tools/sequence.d.ts +24 -24
- package/dist/tools/sequence.js +13 -0
- package/dist/tools/ui.d.ts +0 -2
- package/dist/types/automation-responses.d.ts +115 -0
- package/dist/types/automation-responses.js +2 -0
- package/dist/types/responses.d.ts +249 -0
- package/dist/types/responses.js +2 -0
- package/dist/types/tool-interfaces.d.ts +135 -135
- package/dist/types/tool-types.d.ts +2 -0
- package/dist/unreal-bridge.js +4 -4
- package/dist/utils/command-validator.js +7 -5
- package/dist/utils/error-handler.d.ts +24 -2
- package/dist/utils/error-handler.js +58 -23
- package/dist/utils/normalize.d.ts +7 -4
- package/dist/utils/normalize.js +12 -10
- package/dist/utils/path-security.d.ts +2 -0
- package/dist/utils/path-security.js +24 -0
- package/dist/utils/response-factory.d.ts +4 -4
- package/dist/utils/response-factory.js +15 -21
- package/dist/utils/response-validator.js +88 -73
- package/dist/utils/unreal-command-queue.d.ts +2 -0
- package/dist/utils/unreal-command-queue.js +8 -1
- package/docs/Migration-Guide-v0.5.0.md +1 -9
- package/docs/handler-mapping.md +4 -2
- package/docs/testing-guide.md +2 -2
- package/package.json +12 -6
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridgeSubsystem.cpp +298 -33
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_AnimationHandlers.cpp +7 -8
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintGraphHandlers.cpp +229 -319
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintHandlers.cpp +98 -0
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_EffectHandlers.cpp +24 -0
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_EnvironmentHandlers.cpp +96 -0
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_LightingHandlers.cpp +52 -5
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_ProcessRequest.cpp +5 -268
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_SequenceHandlers.cpp +57 -2
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpConnectionManager.cpp +0 -1
- package/scripts/run-all-tests.mjs +25 -20
- package/server.json +3 -2
- package/src/automation/bridge.ts +27 -25
- package/src/automation/connection-manager.ts +18 -0
- package/src/automation/message-handler.ts +33 -8
- package/src/automation/request-tracker.ts +39 -7
- package/src/config.ts +1 -1
- package/src/constants.ts +7 -0
- package/src/graphql/loaders.ts +244 -0
- package/src/graphql/resolvers.ts +47 -49
- package/src/graphql/server.ts +3 -1
- package/src/graphql/types.ts +3 -0
- package/src/index.ts +15 -2
- package/src/resources/assets.ts +5 -4
- package/src/server/tool-registry.ts +3 -3
- package/src/server-setup.ts +3 -37
- package/src/tools/actors.ts +77 -44
- package/src/tools/animation.ts +1 -0
- package/src/tools/assets.ts +76 -65
- package/src/tools/base-tool.ts +3 -3
- package/src/tools/blueprint.ts +170 -104
- package/src/tools/consolidated-tool-definitions.ts +2 -1
- package/src/tools/consolidated-tool-handlers.ts +129 -150
- package/src/tools/dynamic-handler-registry.ts +22 -140
- package/src/tools/editor.ts +43 -29
- package/src/tools/environment.ts +21 -27
- package/src/tools/foliage.ts +28 -25
- package/src/tools/handlers/actor-handlers.ts +16 -17
- package/src/tools/handlers/asset-handlers.ts +484 -484
- package/src/tools/handlers/sequence-handlers.ts +85 -62
- package/src/tools/introspection.ts +7 -7
- package/src/tools/landscape.ts +34 -28
- package/src/tools/level.ts +100 -80
- package/src/tools/lighting.ts +25 -20
- package/src/tools/materials.ts +9 -3
- package/src/tools/niagara.ts +44 -2
- package/src/tools/performance.ts +1 -2
- package/src/tools/physics.ts +7 -1
- package/src/tools/sequence.ts +42 -26
- package/src/tools/ui.ts +1 -3
- package/src/types/automation-responses.ts +119 -0
- package/src/types/responses.ts +355 -0
- package/src/types/tool-interfaces.ts +135 -135
- package/src/types/tool-types.ts +4 -0
- package/src/unreal-bridge.ts +71 -26
- package/src/utils/command-validator.ts +47 -5
- package/src/utils/error-handler.ts +128 -45
- package/src/utils/normalize.test.ts +162 -0
- package/src/utils/normalize.ts +38 -16
- package/src/utils/path-security.ts +43 -0
- package/src/utils/response-factory.ts +29 -24
- package/src/utils/response-validator.ts +103 -87
- package/src/utils/safe-json.test.ts +90 -0
- package/src/utils/unreal-command-queue.ts +13 -1
- package/src/utils/validation.test.ts +184 -0
- package/tests/test-animation.mjs +358 -33
- package/tests/test-asset-graph.mjs +311 -0
- package/tests/test-audio.mjs +314 -116
- package/tests/test-behavior-tree.mjs +327 -144
- package/tests/test-blueprint-graph.mjs +343 -12
- package/tests/test-control-editor.mjs +85 -53
- package/tests/test-graphql.mjs +58 -8
- package/tests/test-input.mjs +349 -0
- package/tests/test-inspect.mjs +291 -61
- package/tests/test-landscape.mjs +304 -48
- package/tests/test-lighting.mjs +428 -0
- package/tests/test-manage-level.mjs +70 -51
- package/tests/test-performance.mjs +539 -0
- package/tests/test-sequence.mjs +82 -46
- package/tests/test-system.mjs +72 -33
- package/tests/test-wasm.mjs +98 -8
- package/vitest.config.ts +35 -0
- package/.github/release-drafter.yml +0 -148
- package/dist/prompts/index.d.ts +0 -21
- package/dist/prompts/index.js +0 -217
- package/dist/tools/blueprint/helpers.d.ts +0 -29
- package/dist/tools/blueprint/helpers.js +0 -182
- package/src/prompts/index.ts +0 -249
- package/src/tools/blueprint/helpers.ts +0 -189
- package/tests/test-blueprint-events.mjs +0 -35
- package/tests/test-extra-tools.mjs +0 -38
- package/tests/test-render.mjs +0 -33
- 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
|
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<
|
|
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<
|
|
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<
|
|
41
|
-
waitForBlueprint(blueprintRef: string | string[], timeoutMs?: number): Promise<
|
|
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<
|
|
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<
|
|
52
|
+
}): Promise<StandardActionResponse>;
|
|
69
53
|
setBlueprintDefault(params: {
|
|
70
54
|
blueprintName: string;
|
|
71
55
|
propertyName: string;
|
|
72
56
|
value: unknown;
|
|
73
|
-
}): Promise<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
135
|
+
}): Promise<StandardActionResponse>;
|
|
152
136
|
compileBlueprint(params: {
|
|
153
137
|
blueprintName: string;
|
|
154
138
|
saveAfterCompile?: boolean;
|
|
155
|
-
}): Promise<
|
|
139
|
+
}): Promise<StandardActionResponse>;
|
|
156
140
|
getBlueprintSCS(params: {
|
|
157
141
|
blueprintPath: string;
|
|
158
142
|
timeoutMs?: number;
|
|
159
|
-
}): Promise<
|
|
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<
|
|
152
|
+
}): Promise<StandardActionResponse>;
|
|
169
153
|
removeSCSComponent(params: {
|
|
170
154
|
blueprintPath: string;
|
|
171
155
|
componentName: string;
|
|
172
156
|
timeoutMs?: number;
|
|
173
|
-
}): Promise<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
209
|
+
}): Promise<StandardActionResponse>;
|
|
238
210
|
setNodeProperty(params: {
|
|
239
211
|
blueprintPath: string;
|
|
240
212
|
nodeId: string;
|
|
@@ -242,25 +214,37 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
|
|
|
242
214
|
value: string;
|
|
243
215
|
graphName?: string;
|
|
244
216
|
timeoutMs?: number;
|
|
245
|
-
}): Promise<
|
|
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<
|
|
223
|
+
}): Promise<StandardActionResponse>;
|
|
252
224
|
getGraphDetails(params: {
|
|
253
225
|
blueprintPath: string;
|
|
254
226
|
graphName?: string;
|
|
255
227
|
timeoutMs?: number;
|
|
256
|
-
}): Promise<
|
|
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<
|
|
235
|
+
}): Promise<StandardActionResponse>;
|
|
236
|
+
listNodeTypes(params?: {
|
|
237
|
+
blueprintPath?: string;
|
|
238
|
+
timeoutMs?: number;
|
|
239
|
+
}): Promise<StandardActionResponse>;
|
|
240
|
+
setPinDefaultValue(params: {
|
|
241
|
+
blueprintPath: string;
|
|
242
|
+
nodeId: string;
|
|
243
|
+
pinName: string;
|
|
244
|
+
value: string;
|
|
245
|
+
graphName?: string;
|
|
246
|
+
timeoutMs?: number;
|
|
247
|
+
}): Promise<StandardActionResponse>;
|
|
264
248
|
connectPins(params: {
|
|
265
249
|
blueprintName: string;
|
|
266
250
|
sourceNodeGuid: string;
|
|
@@ -268,6 +252,6 @@ export declare class BlueprintTools extends BaseTool implements IBlueprintTools
|
|
|
268
252
|
sourcePinName?: string;
|
|
269
253
|
targetPinName?: string;
|
|
270
254
|
timeoutMs?: number;
|
|
271
|
-
}): Promise<
|
|
255
|
+
}): Promise<StandardActionResponse>;
|
|
272
256
|
}
|
|
273
257
|
//# sourceMappingURL=blueprint.d.ts.map
|
package/dist/tools/blueprint.js
CHANGED
|
@@ -12,17 +12,20 @@ export class BlueprintTools extends BaseTool {
|
|
|
12
12
|
try {
|
|
13
13
|
const response = await this.sendAutomationRequest(action, payload, { timeoutMs: finalTimeout, waitForEvent: !!options?.waitForEvent, waitForEventTimeoutMs: options?.waitForEventTimeoutMs });
|
|
14
14
|
const success = response && response.success !== false;
|
|
15
|
-
const result = response.result ?? response;
|
|
15
|
+
const result = (response.result ?? response);
|
|
16
16
|
return { success, message: response.message ?? undefined, error: response.success === false ? (response.error ?? response.message) : undefined, result, requestId: response.requestId };
|
|
17
17
|
}
|
|
18
18
|
catch (err) {
|
|
19
|
-
|
|
19
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
20
|
+
return { success: false, error: errMsg, message: errMsg };
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
isUnknownActionResponse(res) {
|
|
23
24
|
if (!res)
|
|
24
25
|
return false;
|
|
25
|
-
const
|
|
26
|
+
const errStr = typeof res.error === 'string' ? res.error : '';
|
|
27
|
+
const msgStr = typeof res.message === 'string' ? res.message : '';
|
|
28
|
+
const txt = (errStr || msgStr).toLowerCase();
|
|
26
29
|
return txt.includes('unknown_action') || txt.includes('unknown automation action') || txt.includes('not_implemented') || txt === 'unknown_plugin_action';
|
|
27
30
|
}
|
|
28
31
|
buildCandidates(rawName) {
|
|
@@ -114,7 +117,7 @@ export class BlueprintTools extends BaseTool {
|
|
|
114
117
|
if (typeof params.save === 'boolean')
|
|
115
118
|
payload.save = params.save;
|
|
116
119
|
const res = await this.sendAction('blueprint_modify_scs', payload, { timeoutMs: params.timeoutMs, waitForEvent: !!params.waitForCompletion, waitForEventTimeoutMs: params.waitForCompletionTimeoutMs });
|
|
117
|
-
if (res && res.result && typeof res.result === 'object' && res.result
|
|
120
|
+
if (res && res.result && typeof res.result === 'object' && res.result?.error === 'SCS_UNAVAILABLE') {
|
|
118
121
|
this.pluginBlueprintActionsAvailable = false;
|
|
119
122
|
return { success: false, error: 'SCS_UNAVAILABLE', message: 'Plugin does not support construction script modification (blueprint_modify_scs)' };
|
|
120
123
|
}
|
|
@@ -441,8 +444,8 @@ export class BlueprintTools extends BaseTool {
|
|
|
441
444
|
}
|
|
442
445
|
const pluginResp = await this.sendAction('add_scs_component', payload, { timeoutMs: params.timeoutMs });
|
|
443
446
|
if (pluginResp && pluginResp.success === false) {
|
|
444
|
-
if (pluginResp
|
|
445
|
-
this.log.warn?.(`addSCSComponent reported warning: ${pluginResp
|
|
447
|
+
if (pluginResp?.message) {
|
|
448
|
+
this.log.warn?.(`addSCSComponent reported warning: ${pluginResp?.message}`);
|
|
446
449
|
}
|
|
447
450
|
}
|
|
448
451
|
if (pluginResp && pluginResp.success)
|
|
@@ -468,8 +471,8 @@ export class BlueprintTools extends BaseTool {
|
|
|
468
471
|
try {
|
|
469
472
|
const pluginResp = await this.sendAction('remove_scs_component', { blueprint_path: blueprintPath, component_name: componentName }, { timeoutMs: params.timeoutMs });
|
|
470
473
|
if (pluginResp && pluginResp.success === false) {
|
|
471
|
-
if (pluginResp
|
|
472
|
-
this.log.warn?.(`removeSCSComponent reported warning: ${pluginResp
|
|
474
|
+
if (pluginResp?.message) {
|
|
475
|
+
this.log.warn?.(`removeSCSComponent reported warning: ${pluginResp?.message}`);
|
|
473
476
|
}
|
|
474
477
|
}
|
|
475
478
|
if (pluginResp && pluginResp.success)
|
|
@@ -499,8 +502,8 @@ export class BlueprintTools extends BaseTool {
|
|
|
499
502
|
new_parent: params.newParent || ''
|
|
500
503
|
}, { timeoutMs: params.timeoutMs });
|
|
501
504
|
if (pluginResp && pluginResp.success === false) {
|
|
502
|
-
if (pluginResp
|
|
503
|
-
this.log.warn?.(`reparentSCSComponent reported warning: ${pluginResp
|
|
505
|
+
if (pluginResp?.message) {
|
|
506
|
+
this.log.warn?.(`reparentSCSComponent reported warning: ${pluginResp?.message}`);
|
|
504
507
|
}
|
|
505
508
|
}
|
|
506
509
|
if (pluginResp && pluginResp.success)
|
|
@@ -536,8 +539,8 @@ export class BlueprintTools extends BaseTool {
|
|
|
536
539
|
payload.scale = params.scale;
|
|
537
540
|
const pluginResp = await this.sendAction('set_scs_component_transform', payload, { timeoutMs: params.timeoutMs });
|
|
538
541
|
if (pluginResp && pluginResp.success === false) {
|
|
539
|
-
if (pluginResp
|
|
540
|
-
this.log.warn?.(`setSCSComponentTransform reported warning: ${pluginResp
|
|
542
|
+
if (pluginResp?.message) {
|
|
543
|
+
this.log.warn?.(`setSCSComponentTransform reported warning: ${pluginResp?.message}`);
|
|
541
544
|
}
|
|
542
545
|
}
|
|
543
546
|
if (pluginResp && pluginResp.success)
|
|
@@ -573,8 +576,8 @@ export class BlueprintTools extends BaseTool {
|
|
|
573
576
|
property_value: propertyValueJson
|
|
574
577
|
}, { timeoutMs: params.timeoutMs });
|
|
575
578
|
if (pluginResp && pluginResp.success === false) {
|
|
576
|
-
if (pluginResp
|
|
577
|
-
this.log.warn?.(`setSCSComponentProperty reported warning: ${pluginResp
|
|
579
|
+
if (pluginResp?.message) {
|
|
580
|
+
this.log.warn?.(`setSCSComponentProperty reported warning: ${pluginResp?.message}`);
|
|
578
581
|
}
|
|
579
582
|
}
|
|
580
583
|
if (pluginResp && pluginResp.success)
|
|
@@ -722,6 +725,32 @@ export class BlueprintTools extends BaseTool {
|
|
|
722
725
|
}, { timeoutMs: params.timeoutMs });
|
|
723
726
|
return res;
|
|
724
727
|
}
|
|
728
|
+
async listNodeTypes(params = {}) {
|
|
729
|
+
const res = await this.sendAction('manage_blueprint_graph', {
|
|
730
|
+
subAction: 'list_node_types',
|
|
731
|
+
blueprintPath: params.blueprintPath || '/Game/Temp',
|
|
732
|
+
graphName: 'EventGraph'
|
|
733
|
+
}, { timeoutMs: params.timeoutMs });
|
|
734
|
+
return res;
|
|
735
|
+
}
|
|
736
|
+
async setPinDefaultValue(params) {
|
|
737
|
+
const blueprintPath = coerceString(params.blueprintPath);
|
|
738
|
+
if (!blueprintPath)
|
|
739
|
+
return { success: false, error: 'INVALID_BLUEPRINT_PATH', message: 'Blueprint path is required' };
|
|
740
|
+
if (!params.nodeId)
|
|
741
|
+
return { success: false, error: 'INVALID_NODE_ID', message: 'Node ID is required' };
|
|
742
|
+
if (!params.pinName)
|
|
743
|
+
return { success: false, error: 'INVALID_PIN_NAME', message: 'Pin name is required' };
|
|
744
|
+
const res = await this.sendAction('manage_blueprint_graph', {
|
|
745
|
+
subAction: 'set_pin_default_value',
|
|
746
|
+
blueprintPath: blueprintPath,
|
|
747
|
+
graphName: params.graphName || 'EventGraph',
|
|
748
|
+
nodeId: params.nodeId,
|
|
749
|
+
pinName: params.pinName,
|
|
750
|
+
value: params.value
|
|
751
|
+
}, { timeoutMs: params.timeoutMs });
|
|
752
|
+
return res;
|
|
753
|
+
}
|
|
725
754
|
async connectPins(params) {
|
|
726
755
|
const candidates = this.buildCandidates(params.blueprintName);
|
|
727
756
|
const primary = candidates[0];
|
|
@@ -917,7 +917,8 @@ Supported actions: create_node, delete_node, connect_pins, break_pin_links, set_
|
|
|
917
917
|
type: 'string',
|
|
918
918
|
enum: [
|
|
919
919
|
'create_node', 'delete_node', 'connect_pins', 'break_pin_links', 'set_node_property',
|
|
920
|
-
'create_reroute_node', 'get_node_details', 'get_graph_details', 'get_pin_details'
|
|
920
|
+
'create_reroute_node', 'get_node_details', 'get_graph_details', 'get_pin_details',
|
|
921
|
+
'list_node_types', 'set_pin_default_value'
|
|
921
922
|
],
|
|
922
923
|
description: 'Action'
|
|
923
924
|
},
|