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