unreal-engine-mcp-server 0.2.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/.dockerignore +57 -0
- package/.env.production +25 -0
- package/.eslintrc.json +54 -0
- package/.github/workflows/publish-mcp.yml +75 -0
- package/Dockerfile +54 -0
- package/LICENSE +21 -0
- package/Public/icon.png +0 -0
- package/README.md +209 -0
- package/claude_desktop_config_example.json +13 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +7 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +484 -0
- package/dist/prompts/index.d.ts +14 -0
- package/dist/prompts/index.js +38 -0
- package/dist/python-utils.d.ts +29 -0
- package/dist/python-utils.js +54 -0
- package/dist/resources/actors.d.ts +13 -0
- package/dist/resources/actors.js +83 -0
- package/dist/resources/assets.d.ts +23 -0
- package/dist/resources/assets.js +245 -0
- package/dist/resources/levels.d.ts +17 -0
- package/dist/resources/levels.js +94 -0
- package/dist/tools/actors.d.ts +51 -0
- package/dist/tools/actors.js +459 -0
- package/dist/tools/animation.d.ts +196 -0
- package/dist/tools/animation.js +579 -0
- package/dist/tools/assets.d.ts +21 -0
- package/dist/tools/assets.js +304 -0
- package/dist/tools/audio.d.ts +170 -0
- package/dist/tools/audio.js +416 -0
- package/dist/tools/blueprint.d.ts +144 -0
- package/dist/tools/blueprint.js +652 -0
- package/dist/tools/build_environment_advanced.d.ts +66 -0
- package/dist/tools/build_environment_advanced.js +484 -0
- package/dist/tools/consolidated-tool-definitions.d.ts +2598 -0
- package/dist/tools/consolidated-tool-definitions.js +607 -0
- package/dist/tools/consolidated-tool-handlers.d.ts +2 -0
- package/dist/tools/consolidated-tool-handlers.js +1050 -0
- package/dist/tools/debug.d.ts +185 -0
- package/dist/tools/debug.js +265 -0
- package/dist/tools/editor.d.ts +88 -0
- package/dist/tools/editor.js +365 -0
- package/dist/tools/engine.d.ts +30 -0
- package/dist/tools/engine.js +36 -0
- package/dist/tools/foliage.d.ts +155 -0
- package/dist/tools/foliage.js +525 -0
- package/dist/tools/introspection.d.ts +98 -0
- package/dist/tools/introspection.js +683 -0
- package/dist/tools/landscape.d.ts +158 -0
- package/dist/tools/landscape.js +375 -0
- package/dist/tools/level.d.ts +110 -0
- package/dist/tools/level.js +362 -0
- package/dist/tools/lighting.d.ts +159 -0
- package/dist/tools/lighting.js +1179 -0
- package/dist/tools/materials.d.ts +34 -0
- package/dist/tools/materials.js +146 -0
- package/dist/tools/niagara.d.ts +145 -0
- package/dist/tools/niagara.js +289 -0
- package/dist/tools/performance.d.ts +163 -0
- package/dist/tools/performance.js +412 -0
- package/dist/tools/physics.d.ts +189 -0
- package/dist/tools/physics.js +784 -0
- package/dist/tools/rc.d.ts +110 -0
- package/dist/tools/rc.js +363 -0
- package/dist/tools/sequence.d.ts +112 -0
- package/dist/tools/sequence.js +675 -0
- package/dist/tools/tool-definitions.d.ts +4919 -0
- package/dist/tools/tool-definitions.js +891 -0
- package/dist/tools/tool-handlers.d.ts +47 -0
- package/dist/tools/tool-handlers.js +830 -0
- package/dist/tools/ui.d.ts +171 -0
- package/dist/tools/ui.js +337 -0
- package/dist/tools/visual.d.ts +29 -0
- package/dist/tools/visual.js +67 -0
- package/dist/types/env.d.ts +10 -0
- package/dist/types/env.js +18 -0
- package/dist/types/index.d.ts +323 -0
- package/dist/types/index.js +28 -0
- package/dist/types/tool-types.d.ts +274 -0
- package/dist/types/tool-types.js +13 -0
- package/dist/unreal-bridge.d.ts +126 -0
- package/dist/unreal-bridge.js +992 -0
- package/dist/utils/cache-manager.d.ts +64 -0
- package/dist/utils/cache-manager.js +176 -0
- package/dist/utils/error-handler.d.ts +66 -0
- package/dist/utils/error-handler.js +243 -0
- package/dist/utils/errors.d.ts +133 -0
- package/dist/utils/errors.js +256 -0
- package/dist/utils/http.d.ts +26 -0
- package/dist/utils/http.js +135 -0
- package/dist/utils/logger.d.ts +12 -0
- package/dist/utils/logger.js +32 -0
- package/dist/utils/normalize.d.ts +17 -0
- package/dist/utils/normalize.js +49 -0
- package/dist/utils/response-validator.d.ts +34 -0
- package/dist/utils/response-validator.js +121 -0
- package/dist/utils/safe-json.d.ts +4 -0
- package/dist/utils/safe-json.js +97 -0
- package/dist/utils/stdio-redirect.d.ts +2 -0
- package/dist/utils/stdio-redirect.js +20 -0
- package/dist/utils/validation.d.ts +50 -0
- package/dist/utils/validation.js +173 -0
- package/mcp-config-example.json +14 -0
- package/package.json +63 -0
- package/server.json +60 -0
- package/src/cli.ts +7 -0
- package/src/index.ts +543 -0
- package/src/prompts/index.ts +51 -0
- package/src/python/editor_compat.py +181 -0
- package/src/python-utils.ts +57 -0
- package/src/resources/actors.ts +92 -0
- package/src/resources/assets.ts +251 -0
- package/src/resources/levels.ts +83 -0
- package/src/tools/actors.ts +480 -0
- package/src/tools/animation.ts +713 -0
- package/src/tools/assets.ts +305 -0
- package/src/tools/audio.ts +548 -0
- package/src/tools/blueprint.ts +736 -0
- package/src/tools/build_environment_advanced.ts +526 -0
- package/src/tools/consolidated-tool-definitions.ts +619 -0
- package/src/tools/consolidated-tool-handlers.ts +1093 -0
- package/src/tools/debug.ts +368 -0
- package/src/tools/editor.ts +360 -0
- package/src/tools/engine.ts +32 -0
- package/src/tools/foliage.ts +652 -0
- package/src/tools/introspection.ts +778 -0
- package/src/tools/landscape.ts +523 -0
- package/src/tools/level.ts +410 -0
- package/src/tools/lighting.ts +1316 -0
- package/src/tools/materials.ts +148 -0
- package/src/tools/niagara.ts +312 -0
- package/src/tools/performance.ts +549 -0
- package/src/tools/physics.ts +924 -0
- package/src/tools/rc.ts +437 -0
- package/src/tools/sequence.ts +791 -0
- package/src/tools/tool-definitions.ts +907 -0
- package/src/tools/tool-handlers.ts +941 -0
- package/src/tools/ui.ts +499 -0
- package/src/tools/visual.ts +60 -0
- package/src/types/env.ts +27 -0
- package/src/types/index.ts +414 -0
- package/src/types/tool-types.ts +343 -0
- package/src/unreal-bridge.ts +1118 -0
- package/src/utils/cache-manager.ts +213 -0
- package/src/utils/error-handler.ts +320 -0
- package/src/utils/errors.ts +312 -0
- package/src/utils/http.ts +184 -0
- package/src/utils/logger.ts +30 -0
- package/src/utils/normalize.ts +54 -0
- package/src/utils/response-validator.ts +145 -0
- package/src/utils/safe-json.ts +112 -0
- package/src/utils/stdio-redirect.ts +18 -0
- package/src/utils/validation.ts +212 -0
- package/tsconfig.json +33 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comprehensive type definitions for Unreal Engine MCP Server
|
|
3
|
+
*/
|
|
4
|
+
export * from './env.js';
|
|
5
|
+
export * from './tool-types.js';
|
|
6
|
+
export interface Vector3 {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
z: number;
|
|
10
|
+
}
|
|
11
|
+
export interface Rotation3 {
|
|
12
|
+
pitch: number;
|
|
13
|
+
yaw: number;
|
|
14
|
+
roll: number;
|
|
15
|
+
}
|
|
16
|
+
export interface Transform {
|
|
17
|
+
location: Vector3;
|
|
18
|
+
rotation: Rotation3;
|
|
19
|
+
scale?: Vector3;
|
|
20
|
+
}
|
|
21
|
+
export interface Color {
|
|
22
|
+
r: number;
|
|
23
|
+
g: number;
|
|
24
|
+
b: number;
|
|
25
|
+
a?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface Asset {
|
|
28
|
+
Name: string;
|
|
29
|
+
Path: string;
|
|
30
|
+
Class: string;
|
|
31
|
+
PackagePath: string;
|
|
32
|
+
Type?: string;
|
|
33
|
+
Size?: number;
|
|
34
|
+
LastModified?: Date;
|
|
35
|
+
}
|
|
36
|
+
export interface Material extends Asset {
|
|
37
|
+
BaseColor?: Color;
|
|
38
|
+
Metallic?: number;
|
|
39
|
+
Roughness?: number;
|
|
40
|
+
Emissive?: Color;
|
|
41
|
+
}
|
|
42
|
+
export interface Texture extends Asset {
|
|
43
|
+
Width?: number;
|
|
44
|
+
Height?: number;
|
|
45
|
+
Format?: string;
|
|
46
|
+
MipLevels?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface Actor {
|
|
49
|
+
Name: string;
|
|
50
|
+
Class: string;
|
|
51
|
+
Path: string;
|
|
52
|
+
Transform?: Transform;
|
|
53
|
+
Components?: Component[];
|
|
54
|
+
Tags?: string[];
|
|
55
|
+
IsSelected?: boolean;
|
|
56
|
+
IsHidden?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface Component {
|
|
59
|
+
Name: string;
|
|
60
|
+
Class: string;
|
|
61
|
+
Properties?: Record<string, any>;
|
|
62
|
+
}
|
|
63
|
+
export interface Level {
|
|
64
|
+
Name: string;
|
|
65
|
+
Path: string;
|
|
66
|
+
IsLoaded: boolean;
|
|
67
|
+
IsVisible: boolean;
|
|
68
|
+
Actors?: Actor[];
|
|
69
|
+
StreamingLevels?: StreamingLevel[];
|
|
70
|
+
}
|
|
71
|
+
export interface StreamingLevel {
|
|
72
|
+
Name: string;
|
|
73
|
+
Path: string;
|
|
74
|
+
LoadingState: 'Unloaded' | 'Loading' | 'Loaded';
|
|
75
|
+
ShouldBeLoaded: boolean;
|
|
76
|
+
ShouldBeVisible: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface Blueprint {
|
|
79
|
+
Name: string;
|
|
80
|
+
Path: string;
|
|
81
|
+
ParentClass: string;
|
|
82
|
+
Components?: BlueprintComponent[];
|
|
83
|
+
Variables?: BlueprintVariable[];
|
|
84
|
+
Functions?: BlueprintFunction[];
|
|
85
|
+
}
|
|
86
|
+
export interface BlueprintComponent {
|
|
87
|
+
Name: string;
|
|
88
|
+
Type: string;
|
|
89
|
+
DefaultProperties?: Record<string, any>;
|
|
90
|
+
}
|
|
91
|
+
export interface BlueprintVariable {
|
|
92
|
+
Name: string;
|
|
93
|
+
Type: string;
|
|
94
|
+
DefaultValue?: any;
|
|
95
|
+
IsPublic?: boolean;
|
|
96
|
+
Category?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface BlueprintFunction {
|
|
99
|
+
Name: string;
|
|
100
|
+
ReturnType?: string;
|
|
101
|
+
Parameters?: FunctionParameter[];
|
|
102
|
+
IsPublic?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface FunctionParameter {
|
|
105
|
+
Name: string;
|
|
106
|
+
Type: string;
|
|
107
|
+
DefaultValue?: any;
|
|
108
|
+
IsOptional?: boolean;
|
|
109
|
+
}
|
|
110
|
+
export interface AnimationSequence {
|
|
111
|
+
Name: string;
|
|
112
|
+
Path: string;
|
|
113
|
+
Duration: number;
|
|
114
|
+
FrameRate: number;
|
|
115
|
+
Skeleton?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface AnimationMontage {
|
|
118
|
+
Name: string;
|
|
119
|
+
Path: string;
|
|
120
|
+
Sections?: MontageSection[];
|
|
121
|
+
BlendIn?: number;
|
|
122
|
+
BlendOut?: number;
|
|
123
|
+
}
|
|
124
|
+
export interface MontageSection {
|
|
125
|
+
Name: string;
|
|
126
|
+
StartTime: number;
|
|
127
|
+
EndTime: number;
|
|
128
|
+
NextSection?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface PhysicsBody {
|
|
131
|
+
Mass: number;
|
|
132
|
+
LinearDamping: number;
|
|
133
|
+
AngularDamping: number;
|
|
134
|
+
EnableGravity: boolean;
|
|
135
|
+
IsKinematic: boolean;
|
|
136
|
+
CollisionEnabled: boolean;
|
|
137
|
+
}
|
|
138
|
+
export interface PhysicsConstraint {
|
|
139
|
+
Name: string;
|
|
140
|
+
Actor1: string;
|
|
141
|
+
Actor2: string;
|
|
142
|
+
LinearLimits?: Vector3;
|
|
143
|
+
AngularLimits?: Vector3;
|
|
144
|
+
}
|
|
145
|
+
export interface NiagaraSystem {
|
|
146
|
+
Name: string;
|
|
147
|
+
Path: string;
|
|
148
|
+
Emitters?: NiagaraEmitter[];
|
|
149
|
+
Parameters?: NiagaraParameter[];
|
|
150
|
+
}
|
|
151
|
+
export interface NiagaraEmitter {
|
|
152
|
+
Name: string;
|
|
153
|
+
SpawnRate: number;
|
|
154
|
+
Lifetime: number;
|
|
155
|
+
VelocityModule?: Vector3;
|
|
156
|
+
ColorModule?: Color;
|
|
157
|
+
}
|
|
158
|
+
export interface NiagaraParameter {
|
|
159
|
+
Name: string;
|
|
160
|
+
Type: string;
|
|
161
|
+
Value: any;
|
|
162
|
+
}
|
|
163
|
+
export interface Landscape {
|
|
164
|
+
Name: string;
|
|
165
|
+
ComponentCount: number;
|
|
166
|
+
Resolution: {
|
|
167
|
+
x: number;
|
|
168
|
+
y: number;
|
|
169
|
+
};
|
|
170
|
+
Scale: Vector3;
|
|
171
|
+
Materials?: string[];
|
|
172
|
+
Layers?: LandscapeLayer[];
|
|
173
|
+
}
|
|
174
|
+
export interface LandscapeLayer {
|
|
175
|
+
Name: string;
|
|
176
|
+
BlendMode: string;
|
|
177
|
+
Weight: number;
|
|
178
|
+
}
|
|
179
|
+
export interface RemoteControlPreset {
|
|
180
|
+
Name: string;
|
|
181
|
+
Path: string;
|
|
182
|
+
ExposedProperties?: ExposedProperty[];
|
|
183
|
+
ExposedFunctions?: ExposedFunction[];
|
|
184
|
+
}
|
|
185
|
+
export interface ExposedProperty {
|
|
186
|
+
Name: string;
|
|
187
|
+
DisplayName?: string;
|
|
188
|
+
ObjectPath: string;
|
|
189
|
+
PropertyPath: string;
|
|
190
|
+
Type: string;
|
|
191
|
+
Value?: any;
|
|
192
|
+
Metadata?: Record<string, any>;
|
|
193
|
+
}
|
|
194
|
+
export interface ExposedFunction {
|
|
195
|
+
Name: string;
|
|
196
|
+
DisplayName?: string;
|
|
197
|
+
ObjectPath: string;
|
|
198
|
+
FunctionName: string;
|
|
199
|
+
Parameters?: FunctionParameter[];
|
|
200
|
+
}
|
|
201
|
+
export interface LevelSequence {
|
|
202
|
+
Name: string;
|
|
203
|
+
Path: string;
|
|
204
|
+
Duration: number;
|
|
205
|
+
FrameRate: number;
|
|
206
|
+
Tracks?: SequencerTrack[];
|
|
207
|
+
}
|
|
208
|
+
export interface SequencerTrack {
|
|
209
|
+
Name: string;
|
|
210
|
+
Type: string;
|
|
211
|
+
BoundObject?: string;
|
|
212
|
+
Sections?: SequencerSection[];
|
|
213
|
+
}
|
|
214
|
+
export interface SequencerSection {
|
|
215
|
+
StartFrame: number;
|
|
216
|
+
EndFrame: number;
|
|
217
|
+
Properties?: Record<string, any>;
|
|
218
|
+
}
|
|
219
|
+
export interface PerformanceMetrics {
|
|
220
|
+
FPS: number;
|
|
221
|
+
FrameTime: number;
|
|
222
|
+
GameThreadTime: number;
|
|
223
|
+
RenderThreadTime: number;
|
|
224
|
+
GPUTime: number;
|
|
225
|
+
DrawCalls: number;
|
|
226
|
+
Triangles: number;
|
|
227
|
+
Memory: MemoryMetrics;
|
|
228
|
+
}
|
|
229
|
+
export interface MemoryMetrics {
|
|
230
|
+
Physical: number;
|
|
231
|
+
Virtual: number;
|
|
232
|
+
GPU: number;
|
|
233
|
+
TextureMemory: number;
|
|
234
|
+
MeshMemory: number;
|
|
235
|
+
}
|
|
236
|
+
export interface EngineVersion {
|
|
237
|
+
Major: number;
|
|
238
|
+
Minor: number;
|
|
239
|
+
Patch: number;
|
|
240
|
+
Build?: number;
|
|
241
|
+
Branch?: string;
|
|
242
|
+
Compatible?: boolean;
|
|
243
|
+
}
|
|
244
|
+
export interface ProjectInfo {
|
|
245
|
+
Name: string;
|
|
246
|
+
Path: string;
|
|
247
|
+
EngineVersion: string;
|
|
248
|
+
Plugins?: PluginInfo[];
|
|
249
|
+
Settings?: ProjectSettings;
|
|
250
|
+
}
|
|
251
|
+
export interface PluginInfo {
|
|
252
|
+
Name: string;
|
|
253
|
+
Version: string;
|
|
254
|
+
Enabled: boolean;
|
|
255
|
+
Category?: string;
|
|
256
|
+
}
|
|
257
|
+
export interface ProjectSettings {
|
|
258
|
+
DefaultMap?: string;
|
|
259
|
+
DefaultGameMode?: string;
|
|
260
|
+
TargetFrameRate?: number;
|
|
261
|
+
EnableRayTracing?: boolean;
|
|
262
|
+
EnableNanite?: boolean;
|
|
263
|
+
}
|
|
264
|
+
export interface SuccessResponse<T = any> {
|
|
265
|
+
success: true;
|
|
266
|
+
data?: T;
|
|
267
|
+
message?: string;
|
|
268
|
+
metadata?: Record<string, any>;
|
|
269
|
+
}
|
|
270
|
+
export interface ErrorResponse {
|
|
271
|
+
success: false;
|
|
272
|
+
error: string;
|
|
273
|
+
code?: string;
|
|
274
|
+
statusCode?: number;
|
|
275
|
+
details?: Record<string, any>;
|
|
276
|
+
}
|
|
277
|
+
export type ApiResponse<T = any> = SuccessResponse<T> | ErrorResponse;
|
|
278
|
+
export interface ToolContext {
|
|
279
|
+
bridge: any;
|
|
280
|
+
tools: Record<string, any>;
|
|
281
|
+
cache?: any;
|
|
282
|
+
metrics?: any;
|
|
283
|
+
}
|
|
284
|
+
export interface ToolResult<T = any> {
|
|
285
|
+
content: Array<{
|
|
286
|
+
type: 'text' | 'json' | 'error';
|
|
287
|
+
text?: string;
|
|
288
|
+
data?: T;
|
|
289
|
+
}>;
|
|
290
|
+
isError?: boolean;
|
|
291
|
+
metadata?: Record<string, any>;
|
|
292
|
+
}
|
|
293
|
+
export interface UnrealEvent {
|
|
294
|
+
type: string;
|
|
295
|
+
timestamp: Date;
|
|
296
|
+
data: any;
|
|
297
|
+
source?: string;
|
|
298
|
+
}
|
|
299
|
+
export interface PropertyChangeEvent extends UnrealEvent {
|
|
300
|
+
type: 'property_change';
|
|
301
|
+
objectPath: string;
|
|
302
|
+
propertyName: string;
|
|
303
|
+
oldValue: any;
|
|
304
|
+
newValue: any;
|
|
305
|
+
}
|
|
306
|
+
export interface ActorSpawnEvent extends UnrealEvent {
|
|
307
|
+
type: 'actor_spawn';
|
|
308
|
+
actorName: string;
|
|
309
|
+
actorClass: string;
|
|
310
|
+
location: Vector3;
|
|
311
|
+
}
|
|
312
|
+
export type DeepPartial<T> = {
|
|
313
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
314
|
+
};
|
|
315
|
+
export type Nullable<T> = T | null;
|
|
316
|
+
export type Optional<T> = T | undefined;
|
|
317
|
+
export type AsyncResult<T> = Promise<ApiResponse<T>>;
|
|
318
|
+
export type Callback<T> = (error: Error | null, result?: T) => void;
|
|
319
|
+
export declare function isVector3(value: any): value is Vector3;
|
|
320
|
+
export declare function isRotation3(value: any): value is Rotation3;
|
|
321
|
+
export declare function isSuccessResponse<T>(response: ApiResponse<T>): response is SuccessResponse<T>;
|
|
322
|
+
export declare function isErrorResponse(response: ApiResponse): response is ErrorResponse;
|
|
323
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comprehensive type definitions for Unreal Engine MCP Server
|
|
3
|
+
*/
|
|
4
|
+
// Re-export existing types
|
|
5
|
+
export * from './env.js';
|
|
6
|
+
export * from './tool-types.js';
|
|
7
|
+
// Type guards
|
|
8
|
+
export function isVector3(value) {
|
|
9
|
+
return (typeof value === 'object' &&
|
|
10
|
+
value !== null &&
|
|
11
|
+
typeof value.x === 'number' &&
|
|
12
|
+
typeof value.y === 'number' &&
|
|
13
|
+
typeof value.z === 'number');
|
|
14
|
+
}
|
|
15
|
+
export function isRotation3(value) {
|
|
16
|
+
return (typeof value === 'object' &&
|
|
17
|
+
value !== null &&
|
|
18
|
+
typeof value.pitch === 'number' &&
|
|
19
|
+
typeof value.yaw === 'number' &&
|
|
20
|
+
typeof value.roll === 'number');
|
|
21
|
+
}
|
|
22
|
+
export function isSuccessResponse(response) {
|
|
23
|
+
return response.success === true;
|
|
24
|
+
}
|
|
25
|
+
export function isErrorResponse(response) {
|
|
26
|
+
return response.success === false;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated TypeScript types from tool schemas
|
|
3
|
+
* This provides type safety and IntelliSense support
|
|
4
|
+
*/
|
|
5
|
+
export interface BaseToolResponse {
|
|
6
|
+
success: boolean;
|
|
7
|
+
message?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
warning?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AssetInfo {
|
|
12
|
+
Name: string;
|
|
13
|
+
Path: string;
|
|
14
|
+
Class?: string;
|
|
15
|
+
PackagePath?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ManageAssetResponse extends BaseToolResponse {
|
|
18
|
+
assets?: AssetInfo[];
|
|
19
|
+
paths?: string[];
|
|
20
|
+
materialPath?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface Vector3D {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
z: number;
|
|
26
|
+
}
|
|
27
|
+
export interface Rotation3D {
|
|
28
|
+
pitch: number;
|
|
29
|
+
yaw: number;
|
|
30
|
+
roll: number;
|
|
31
|
+
}
|
|
32
|
+
export interface ControlActorResponse extends BaseToolResponse {
|
|
33
|
+
actor?: string;
|
|
34
|
+
deleted?: string;
|
|
35
|
+
physicsEnabled?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface ControlEditorResponse extends BaseToolResponse {
|
|
38
|
+
playing?: boolean;
|
|
39
|
+
location?: [number, number, number];
|
|
40
|
+
rotation?: [number, number, number];
|
|
41
|
+
viewMode?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ManageLevelResponse extends BaseToolResponse {
|
|
44
|
+
levelName?: string;
|
|
45
|
+
loaded?: boolean;
|
|
46
|
+
visible?: boolean;
|
|
47
|
+
lightName?: string;
|
|
48
|
+
buildQuality?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface AnimationPhysicsResponse extends BaseToolResponse {
|
|
51
|
+
blueprintPath?: string;
|
|
52
|
+
playing?: boolean;
|
|
53
|
+
playRate?: number;
|
|
54
|
+
ragdollActive?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface CreateEffectResponse extends BaseToolResponse {
|
|
57
|
+
effectName?: string;
|
|
58
|
+
effectPath?: string;
|
|
59
|
+
spawned?: boolean;
|
|
60
|
+
location?: [number, number, number];
|
|
61
|
+
}
|
|
62
|
+
export interface ManageBlueprintResponse extends BaseToolResponse {
|
|
63
|
+
blueprintPath?: string;
|
|
64
|
+
componentAdded?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface BuildEnvironmentResponse extends BaseToolResponse {
|
|
67
|
+
landscapeName?: string;
|
|
68
|
+
foliageTypeName?: string;
|
|
69
|
+
instancesPlaced?: number;
|
|
70
|
+
}
|
|
71
|
+
export interface SystemControlResponse extends BaseToolResponse {
|
|
72
|
+
profiling?: boolean;
|
|
73
|
+
fpsVisible?: boolean;
|
|
74
|
+
qualityLevel?: number;
|
|
75
|
+
soundPlaying?: boolean;
|
|
76
|
+
widgetPath?: string;
|
|
77
|
+
widgetVisible?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface ConsoleCommandResponse extends BaseToolResponse {
|
|
80
|
+
command?: string;
|
|
81
|
+
result?: any;
|
|
82
|
+
info?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface VerifyEnvironmentResponse extends BaseToolResponse {
|
|
85
|
+
exists?: boolean;
|
|
86
|
+
count?: number;
|
|
87
|
+
actual?: number;
|
|
88
|
+
method?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface ToolParameters {
|
|
91
|
+
ListAssetsParams: {
|
|
92
|
+
directory: string;
|
|
93
|
+
recursive?: boolean;
|
|
94
|
+
};
|
|
95
|
+
ImportAssetParams: {
|
|
96
|
+
sourcePath: string;
|
|
97
|
+
destinationPath: string;
|
|
98
|
+
};
|
|
99
|
+
CreateMaterialParams: {
|
|
100
|
+
name: string;
|
|
101
|
+
path: string;
|
|
102
|
+
};
|
|
103
|
+
SpawnActorParams: {
|
|
104
|
+
classPath: string;
|
|
105
|
+
location?: Vector3D;
|
|
106
|
+
rotation?: Rotation3D;
|
|
107
|
+
};
|
|
108
|
+
DeleteActorParams: {
|
|
109
|
+
actorName: string;
|
|
110
|
+
};
|
|
111
|
+
ApplyForceParams: {
|
|
112
|
+
actorName: string;
|
|
113
|
+
force: Vector3D;
|
|
114
|
+
};
|
|
115
|
+
SetCameraParams: {
|
|
116
|
+
location?: Vector3D;
|
|
117
|
+
rotation?: Rotation3D;
|
|
118
|
+
};
|
|
119
|
+
SetViewModeParams: {
|
|
120
|
+
mode: string;
|
|
121
|
+
};
|
|
122
|
+
ConsoleCommandParams: {
|
|
123
|
+
command: string;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export type AssetAction = 'list' | 'import' | 'create_material';
|
|
127
|
+
export type ActorAction = 'spawn' | 'delete' | 'apply_force';
|
|
128
|
+
export type EditorAction = 'play' | 'stop' | 'set_camera' | 'set_view_mode';
|
|
129
|
+
export type LevelAction = 'load' | 'save' | 'stream' | 'create_light' | 'build_lighting';
|
|
130
|
+
export type AnimationAction = 'create_animation_bp' | 'play_montage' | 'setup_ragdoll';
|
|
131
|
+
export type EffectAction = 'particle' | 'niagara' | 'debug_shape';
|
|
132
|
+
export type BlueprintAction = 'create' | 'add_component';
|
|
133
|
+
export type EnvironmentAction = 'create_landscape' | 'sculpt' | 'add_foliage' | 'paint_foliage';
|
|
134
|
+
export type SystemAction = 'profile' | 'show_fps' | 'set_quality' | 'play_sound' | 'create_widget' | 'show_widget';
|
|
135
|
+
export type VerificationAction = 'foliage_type_exists' | 'foliage_instances_near' | 'landscape_exists' | 'quality_level';
|
|
136
|
+
export interface ConsolidatedToolParams {
|
|
137
|
+
manage_asset: {
|
|
138
|
+
action: AssetAction;
|
|
139
|
+
directory?: string;
|
|
140
|
+
recursive?: boolean;
|
|
141
|
+
sourcePath?: string;
|
|
142
|
+
destinationPath?: string;
|
|
143
|
+
name?: string;
|
|
144
|
+
path?: string;
|
|
145
|
+
};
|
|
146
|
+
control_actor: {
|
|
147
|
+
action: ActorAction;
|
|
148
|
+
actorName?: string;
|
|
149
|
+
classPath?: string;
|
|
150
|
+
location?: Vector3D;
|
|
151
|
+
rotation?: Rotation3D;
|
|
152
|
+
force?: Vector3D;
|
|
153
|
+
};
|
|
154
|
+
control_editor: {
|
|
155
|
+
action: EditorAction;
|
|
156
|
+
location?: Vector3D;
|
|
157
|
+
rotation?: Rotation3D;
|
|
158
|
+
viewMode?: string;
|
|
159
|
+
};
|
|
160
|
+
manage_level: {
|
|
161
|
+
action: LevelAction;
|
|
162
|
+
levelPath?: string;
|
|
163
|
+
levelName?: string;
|
|
164
|
+
streaming?: boolean;
|
|
165
|
+
shouldBeLoaded?: boolean;
|
|
166
|
+
shouldBeVisible?: boolean;
|
|
167
|
+
lightType?: 'Directional' | 'Point' | 'Spot' | 'Rect';
|
|
168
|
+
name?: string;
|
|
169
|
+
location?: Vector3D;
|
|
170
|
+
intensity?: number;
|
|
171
|
+
quality?: 'Preview' | 'Medium' | 'High' | 'Production';
|
|
172
|
+
};
|
|
173
|
+
animation_physics: {
|
|
174
|
+
action: AnimationAction;
|
|
175
|
+
name?: string;
|
|
176
|
+
actorName?: string;
|
|
177
|
+
skeletonPath?: string;
|
|
178
|
+
montagePath?: string;
|
|
179
|
+
animationPath?: string;
|
|
180
|
+
playRate?: number;
|
|
181
|
+
physicsAssetName?: string;
|
|
182
|
+
blendWeight?: number;
|
|
183
|
+
savePath?: string;
|
|
184
|
+
};
|
|
185
|
+
create_effect: {
|
|
186
|
+
action: EffectAction;
|
|
187
|
+
name?: string;
|
|
188
|
+
location?: Vector3D;
|
|
189
|
+
effectType?: string;
|
|
190
|
+
systemPath?: string;
|
|
191
|
+
scale?: number;
|
|
192
|
+
shape?: string;
|
|
193
|
+
size?: number;
|
|
194
|
+
color?: [number, number, number, number];
|
|
195
|
+
duration?: number;
|
|
196
|
+
};
|
|
197
|
+
manage_blueprint: {
|
|
198
|
+
action: BlueprintAction;
|
|
199
|
+
name: string;
|
|
200
|
+
blueprintType?: string;
|
|
201
|
+
componentType?: string;
|
|
202
|
+
componentName?: string;
|
|
203
|
+
savePath?: string;
|
|
204
|
+
};
|
|
205
|
+
build_environment: {
|
|
206
|
+
action: EnvironmentAction;
|
|
207
|
+
name?: string;
|
|
208
|
+
sizeX?: number;
|
|
209
|
+
sizeY?: number;
|
|
210
|
+
tool?: string;
|
|
211
|
+
meshPath?: string;
|
|
212
|
+
foliageType?: string;
|
|
213
|
+
density?: number;
|
|
214
|
+
position?: Vector3D;
|
|
215
|
+
brushSize?: number;
|
|
216
|
+
strength?: number;
|
|
217
|
+
};
|
|
218
|
+
system_control: {
|
|
219
|
+
action: SystemAction;
|
|
220
|
+
profileType?: string;
|
|
221
|
+
category?: string;
|
|
222
|
+
level?: number;
|
|
223
|
+
enabled?: boolean;
|
|
224
|
+
verbose?: boolean;
|
|
225
|
+
soundPath?: string;
|
|
226
|
+
location?: Vector3D;
|
|
227
|
+
volume?: number;
|
|
228
|
+
is3D?: boolean;
|
|
229
|
+
widgetName?: string;
|
|
230
|
+
widgetType?: string;
|
|
231
|
+
visible?: boolean;
|
|
232
|
+
};
|
|
233
|
+
console_command: {
|
|
234
|
+
command: string;
|
|
235
|
+
};
|
|
236
|
+
verify_environment: {
|
|
237
|
+
action: VerificationAction;
|
|
238
|
+
name?: string;
|
|
239
|
+
position?: Vector3D;
|
|
240
|
+
radius?: number;
|
|
241
|
+
category?: string;
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
export interface ToolResponseMap {
|
|
245
|
+
manage_asset: ManageAssetResponse;
|
|
246
|
+
control_actor: ControlActorResponse;
|
|
247
|
+
control_editor: ControlEditorResponse;
|
|
248
|
+
manage_level: ManageLevelResponse;
|
|
249
|
+
animation_physics: AnimationPhysicsResponse;
|
|
250
|
+
create_effect: CreateEffectResponse;
|
|
251
|
+
manage_blueprint: ManageBlueprintResponse;
|
|
252
|
+
build_environment: BuildEnvironmentResponse;
|
|
253
|
+
system_control: SystemControlResponse;
|
|
254
|
+
console_command: ConsoleCommandResponse;
|
|
255
|
+
verify_environment: VerifyEnvironmentResponse;
|
|
256
|
+
list_assets: ManageAssetResponse;
|
|
257
|
+
import_asset: ManageAssetResponse;
|
|
258
|
+
spawn_actor: ControlActorResponse;
|
|
259
|
+
delete_actor: ControlActorResponse;
|
|
260
|
+
create_material: ManageAssetResponse;
|
|
261
|
+
play_in_editor: ControlEditorResponse;
|
|
262
|
+
stop_play_in_editor: ControlEditorResponse;
|
|
263
|
+
set_camera: ControlEditorResponse;
|
|
264
|
+
}
|
|
265
|
+
export type ToolName = keyof ToolResponseMap;
|
|
266
|
+
export type GetToolResponse<T extends ToolName> = ToolResponseMap[T];
|
|
267
|
+
export type GetToolParams<T extends keyof ConsolidatedToolParams> = ConsolidatedToolParams[T];
|
|
268
|
+
export declare function isSuccessResponse(response: BaseToolResponse): response is BaseToolResponse & {
|
|
269
|
+
success: true;
|
|
270
|
+
};
|
|
271
|
+
export declare function isErrorResponse(response: BaseToolResponse): response is BaseToolResponse & {
|
|
272
|
+
error: string;
|
|
273
|
+
};
|
|
274
|
+
//# sourceMappingURL=tool-types.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated TypeScript types from tool schemas
|
|
3
|
+
* This provides type safety and IntelliSense support
|
|
4
|
+
*/
|
|
5
|
+
// Export a type guard to check if a response is successful
|
|
6
|
+
export function isSuccessResponse(response) {
|
|
7
|
+
return response.success === true;
|
|
8
|
+
}
|
|
9
|
+
// Export a type guard to check if a response has an error
|
|
10
|
+
export function isErrorResponse(response) {
|
|
11
|
+
return response.success === false && typeof response.error === 'string';
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=tool-types.js.map
|