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,3 +1,3 @@
|
|
|
1
1
|
import { ITools } from '../../types/tool-interfaces.js';
|
|
2
|
-
export declare function handleSequenceTools(action: string, args:
|
|
2
|
+
export declare function handleSequenceTools(action: string, args: Record<string, unknown>, tools: ITools): Promise<any>;
|
|
3
3
|
//# sourceMappingURL=sequence-handlers.d.ts.map
|
|
@@ -20,7 +20,17 @@ function markSequenceDeleted(path) {
|
|
|
20
20
|
if (!norm)
|
|
21
21
|
return;
|
|
22
22
|
managedSequences.delete(norm);
|
|
23
|
-
deletedSequences.
|
|
23
|
+
deletedSequences.delete(norm);
|
|
24
|
+
}
|
|
25
|
+
function getErrorString(res) {
|
|
26
|
+
if (!res)
|
|
27
|
+
return '';
|
|
28
|
+
return typeof res.error === 'string' ? res.error : '';
|
|
29
|
+
}
|
|
30
|
+
function getMessageString(res) {
|
|
31
|
+
if (!res)
|
|
32
|
+
return '';
|
|
33
|
+
return typeof res.message === 'string' ? res.message : '';
|
|
24
34
|
}
|
|
25
35
|
export async function handleSequenceTools(action, args, tools) {
|
|
26
36
|
const seqAction = String(action || '').trim();
|
|
@@ -39,8 +49,8 @@ export async function handleSequenceTools(action, args, tools) {
|
|
|
39
49
|
if (sequencePath && res && res.success !== false) {
|
|
40
50
|
markSequenceCreated(sequencePath);
|
|
41
51
|
}
|
|
42
|
-
const errorCode =
|
|
43
|
-
const msgLower =
|
|
52
|
+
const errorCode = getErrorString(res).toUpperCase();
|
|
53
|
+
const msgLower = getMessageString(res).toLowerCase();
|
|
44
54
|
if (res && res.success === false && (errorCode === 'FACTORY_NOT_AVAILABLE' || msgLower.includes('ulevelsequencefactorynew not available'))) {
|
|
45
55
|
const path = sequencePath || (typeof args.path === 'string' ? args.path : undefined);
|
|
46
56
|
return cleanObject({
|
|
@@ -75,8 +85,8 @@ export async function handleSequenceTools(action, args, tools) {
|
|
|
75
85
|
subAction: 'add_actor'
|
|
76
86
|
};
|
|
77
87
|
const res = await executeAutomationRequest(tools, 'manage_sequence', payload);
|
|
78
|
-
const errorCode =
|
|
79
|
-
const msgLower =
|
|
88
|
+
const errorCode = getErrorString(res).toUpperCase();
|
|
89
|
+
const msgLower = getMessageString(res).toLowerCase();
|
|
80
90
|
if (res && res.success === false && path) {
|
|
81
91
|
const isInvalidSequence = errorCode === 'INVALID_SEQUENCE' || msgLower.includes('sequence_add_actor requires a sequence path') || msgLower.includes('sequence not found');
|
|
82
92
|
if (isInvalidSequence) {
|
|
@@ -114,8 +124,8 @@ export async function handleSequenceTools(action, args, tools) {
|
|
|
114
124
|
case 'add_actors': {
|
|
115
125
|
const actorNames = Array.isArray(args.actorNames) ? args.actorNames : [];
|
|
116
126
|
const res = await tools.sequenceTools.addActors({ actorNames, path: args.path });
|
|
117
|
-
const errorCode =
|
|
118
|
-
const msgLower =
|
|
127
|
+
const errorCode = getErrorString(res).toUpperCase();
|
|
128
|
+
const msgLower = getMessageString(res).toLowerCase();
|
|
119
129
|
if (actorNames.length === 0 && res && res.success === false && errorCode === 'INVALID_ARGUMENT') {
|
|
120
130
|
return cleanObject({
|
|
121
131
|
success: false,
|
|
@@ -172,8 +182,8 @@ export async function handleSequenceTools(action, args, tools) {
|
|
|
172
182
|
payload.value = { scale: args.value };
|
|
173
183
|
}
|
|
174
184
|
const res = await executeAutomationRequest(tools, 'manage_sequence', payload);
|
|
175
|
-
const errorCode =
|
|
176
|
-
const msgLower =
|
|
185
|
+
const errorCode = getErrorString(res).toUpperCase();
|
|
186
|
+
const msgLower = getMessageString(res).toLowerCase();
|
|
177
187
|
if (errorCode === 'INVALID_ARGUMENT' || msgLower.includes('frame number is required')) {
|
|
178
188
|
return cleanObject(res);
|
|
179
189
|
}
|
|
@@ -237,7 +247,7 @@ export async function handleSequenceTools(action, args, tools) {
|
|
|
237
247
|
throw new Error('Invalid speed: must be a positive number');
|
|
238
248
|
}
|
|
239
249
|
let res = await tools.sequenceTools.setPlaybackSpeed({ speed, path: args.path });
|
|
240
|
-
const errorCode =
|
|
250
|
+
const errorCode = getErrorString(res).toUpperCase();
|
|
241
251
|
if ((!res || res.success === false) && errorCode === 'EDITOR_NOT_OPEN' && args.path) {
|
|
242
252
|
await tools.sequenceTools.open({ path: args.path });
|
|
243
253
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
@@ -252,7 +262,8 @@ export async function handleSequenceTools(action, args, tools) {
|
|
|
252
262
|
case 'duplicate': {
|
|
253
263
|
const path = requireNonEmptyString(args.path, 'path', 'Missing required parameter: path');
|
|
254
264
|
const destDir = requireNonEmptyString(args.destinationPath, 'destinationPath', 'Missing required parameter: destinationPath');
|
|
255
|
-
const
|
|
265
|
+
const defaultNewName = path.split('/').pop() || '';
|
|
266
|
+
const newName = requireNonEmptyString(args.newName || defaultNewName, 'newName', 'Missing required parameter: newName');
|
|
256
267
|
const baseDir = destDir.replace(/\/$/, '');
|
|
257
268
|
const destPath = `${baseDir}/${newName}`;
|
|
258
269
|
const res = await tools.sequenceTools.duplicate({ path, destinationPath: destPath });
|
|
@@ -262,8 +273,8 @@ export async function handleSequenceTools(action, args, tools) {
|
|
|
262
273
|
const path = requireNonEmptyString(args.path, 'path', 'Missing required parameter: path');
|
|
263
274
|
const newName = requireNonEmptyString(args.newName, 'newName', 'Missing required parameter: newName');
|
|
264
275
|
const res = await tools.sequenceTools.rename({ path, newName });
|
|
265
|
-
const errorCode =
|
|
266
|
-
const msgLower =
|
|
276
|
+
const errorCode = getErrorString(res).toUpperCase();
|
|
277
|
+
const msgLower = getMessageString(res).toLowerCase();
|
|
267
278
|
if (res && res.success === false && (errorCode === 'OPERATION_FAILED' || msgLower.includes('failed to rename sequence'))) {
|
|
268
279
|
return cleanObject({
|
|
269
280
|
success: false,
|
|
@@ -339,7 +339,7 @@ export class IntrospectionTools {
|
|
|
339
339
|
return res;
|
|
340
340
|
}
|
|
341
341
|
catch (err) {
|
|
342
|
-
const errorMsg = err
|
|
342
|
+
const errorMsg = (err instanceof Error ? err.message : undefined) || String(err);
|
|
343
343
|
if (errorMsg.includes('404')) {
|
|
344
344
|
return { success: false, error: `Property '${params.propertyName}' not found on object '${params.objectPath}'` };
|
|
345
345
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UnrealBridge } from '../unreal-bridge.js';
|
|
2
2
|
import { AutomationBridge } from '../automation/index.js';
|
|
3
|
-
|
|
3
|
+
import { ILandscapeTools, StandardActionResponse } from '../types/tool-interfaces.js';
|
|
4
|
+
export declare class LandscapeTools implements ILandscapeTools {
|
|
4
5
|
private bridge;
|
|
5
6
|
private automationBridge?;
|
|
6
7
|
constructor(bridge: UnrealBridge, automationBridge?: AutomationBridge | undefined);
|
|
@@ -18,7 +19,7 @@ export declare class LandscapeTools {
|
|
|
18
19
|
runtimeGrid?: string;
|
|
19
20
|
isSpatiallyLoaded?: boolean;
|
|
20
21
|
dataLayers?: string[];
|
|
21
|
-
}): Promise<
|
|
22
|
+
}): Promise<StandardActionResponse>;
|
|
22
23
|
sculptLandscape(params: {
|
|
23
24
|
landscapeName: string;
|
|
24
25
|
tool: string;
|
|
@@ -27,17 +28,7 @@ export declare class LandscapeTools {
|
|
|
27
28
|
strength?: number;
|
|
28
29
|
location?: [number, number, number];
|
|
29
30
|
radius?: number;
|
|
30
|
-
}): Promise<
|
|
31
|
-
success: boolean;
|
|
32
|
-
error: string;
|
|
33
|
-
message?: undefined;
|
|
34
|
-
details?: undefined;
|
|
35
|
-
} | {
|
|
36
|
-
success: boolean;
|
|
37
|
-
message: string;
|
|
38
|
-
details: import("../automation/types.js").AutomationBridgeResponseMessage;
|
|
39
|
-
error?: undefined;
|
|
40
|
-
}>;
|
|
31
|
+
}): Promise<StandardActionResponse>;
|
|
41
32
|
paintLandscape(params: {
|
|
42
33
|
landscapeName: string;
|
|
43
34
|
layerName: string;
|
|
@@ -47,17 +38,7 @@ export declare class LandscapeTools {
|
|
|
47
38
|
targetValue?: number;
|
|
48
39
|
radius?: number;
|
|
49
40
|
density?: number;
|
|
50
|
-
}): Promise<
|
|
51
|
-
success: boolean;
|
|
52
|
-
error: string;
|
|
53
|
-
message?: undefined;
|
|
54
|
-
details?: undefined;
|
|
55
|
-
} | {
|
|
56
|
-
success: boolean;
|
|
57
|
-
message: string;
|
|
58
|
-
details: import("../automation/types.js").AutomationBridgeResponseMessage;
|
|
59
|
-
error?: undefined;
|
|
60
|
-
}>;
|
|
41
|
+
}): Promise<StandardActionResponse>;
|
|
61
42
|
createProceduralTerrain(params: {
|
|
62
43
|
name: string;
|
|
63
44
|
location?: [number, number, number];
|
|
@@ -67,37 +48,7 @@ export declare class LandscapeTools {
|
|
|
67
48
|
heightFunction?: string;
|
|
68
49
|
material?: string;
|
|
69
50
|
settings?: Record<string, unknown>;
|
|
70
|
-
}): Promise<
|
|
71
|
-
success: boolean;
|
|
72
|
-
error: string;
|
|
73
|
-
message: string;
|
|
74
|
-
actorName?: undefined;
|
|
75
|
-
vertices?: undefined;
|
|
76
|
-
triangles?: undefined;
|
|
77
|
-
size?: undefined;
|
|
78
|
-
subdivisions?: undefined;
|
|
79
|
-
details?: undefined;
|
|
80
|
-
} | {
|
|
81
|
-
success: boolean;
|
|
82
|
-
message: string;
|
|
83
|
-
actorName: any;
|
|
84
|
-
vertices: any;
|
|
85
|
-
triangles: any;
|
|
86
|
-
size: any;
|
|
87
|
-
subdivisions: any;
|
|
88
|
-
details: any;
|
|
89
|
-
error?: undefined;
|
|
90
|
-
} | {
|
|
91
|
-
success: boolean;
|
|
92
|
-
error: string;
|
|
93
|
-
message?: undefined;
|
|
94
|
-
actorName?: undefined;
|
|
95
|
-
vertices?: undefined;
|
|
96
|
-
triangles?: undefined;
|
|
97
|
-
size?: undefined;
|
|
98
|
-
subdivisions?: undefined;
|
|
99
|
-
details?: undefined;
|
|
100
|
-
}>;
|
|
51
|
+
}): Promise<StandardActionResponse>;
|
|
101
52
|
createLandscapeGrassType(params: {
|
|
102
53
|
name: string;
|
|
103
54
|
meshPath: string;
|
|
@@ -106,11 +57,11 @@ export declare class LandscapeTools {
|
|
|
106
57
|
maxScale?: number;
|
|
107
58
|
path?: string;
|
|
108
59
|
staticMesh?: string;
|
|
109
|
-
}): Promise<
|
|
60
|
+
}): Promise<StandardActionResponse>;
|
|
110
61
|
setLandscapeMaterial(params: {
|
|
111
62
|
landscapeName: string;
|
|
112
63
|
materialPath: string;
|
|
113
|
-
}): Promise<
|
|
64
|
+
}): Promise<StandardActionResponse>;
|
|
114
65
|
createLandscapeGrass(params: {
|
|
115
66
|
landscapeName: string;
|
|
116
67
|
grassType: string;
|
|
@@ -118,85 +69,42 @@ export declare class LandscapeTools {
|
|
|
118
69
|
minScale?: number;
|
|
119
70
|
maxScale?: number;
|
|
120
71
|
randomRotation?: boolean;
|
|
121
|
-
}): Promise<
|
|
122
|
-
success: boolean;
|
|
123
|
-
message: string;
|
|
124
|
-
}>;
|
|
72
|
+
}): Promise<StandardActionResponse>;
|
|
125
73
|
updateLandscapeCollision(params: {
|
|
126
74
|
landscapeName: string;
|
|
127
75
|
collisionMipLevel?: number;
|
|
128
76
|
simpleCollision?: boolean;
|
|
129
|
-
}): Promise<
|
|
130
|
-
success: boolean;
|
|
131
|
-
message: string;
|
|
132
|
-
}>;
|
|
77
|
+
}): Promise<StandardActionResponse>;
|
|
133
78
|
retopologizeLandscape(params: {
|
|
134
79
|
landscapeName: string;
|
|
135
80
|
targetTriangleCount?: number;
|
|
136
81
|
preserveDetails?: boolean;
|
|
137
|
-
}): Promise<
|
|
138
|
-
success: boolean;
|
|
139
|
-
message: string;
|
|
140
|
-
}>;
|
|
82
|
+
}): Promise<StandardActionResponse>;
|
|
141
83
|
createWaterBody(params: {
|
|
142
84
|
type: 'Ocean' | 'Lake' | 'River' | 'Stream';
|
|
143
85
|
name: string;
|
|
144
86
|
location?: [number, number, number];
|
|
145
87
|
size?: [number, number];
|
|
146
88
|
depth?: number;
|
|
147
|
-
}): Promise<
|
|
89
|
+
}): Promise<StandardActionResponse>;
|
|
148
90
|
configureWorldPartition(params: {
|
|
149
91
|
landscapeName: string;
|
|
150
92
|
enableSpatialLoading?: boolean;
|
|
151
93
|
runtimeGrid?: string;
|
|
152
94
|
dataLayers?: string[];
|
|
153
95
|
streamingDistance?: number;
|
|
154
|
-
}): Promise<
|
|
155
|
-
success: boolean;
|
|
156
|
-
error: string;
|
|
157
|
-
message?: undefined;
|
|
158
|
-
changes?: undefined;
|
|
159
|
-
} | {
|
|
160
|
-
success: boolean;
|
|
161
|
-
message: string;
|
|
162
|
-
changes: unknown;
|
|
163
|
-
error?: undefined;
|
|
164
|
-
}>;
|
|
96
|
+
}): Promise<StandardActionResponse>;
|
|
165
97
|
setDataLayers(params: {
|
|
166
98
|
landscapeName: string;
|
|
167
99
|
dataLayerNames: string[];
|
|
168
100
|
operation: 'add' | 'remove' | 'set';
|
|
169
|
-
}): Promise<
|
|
170
|
-
success: boolean;
|
|
171
|
-
message: string;
|
|
172
|
-
layers: string[];
|
|
173
|
-
error?: undefined;
|
|
174
|
-
} | {
|
|
175
|
-
success: boolean;
|
|
176
|
-
error: string;
|
|
177
|
-
message?: undefined;
|
|
178
|
-
layers?: undefined;
|
|
179
|
-
}>;
|
|
101
|
+
}): Promise<StandardActionResponse>;
|
|
180
102
|
configureStreamingCells(params: {
|
|
181
103
|
landscapeName: string;
|
|
182
104
|
cellSize?: number;
|
|
183
105
|
loadingRange?: number;
|
|
184
106
|
enableHLOD?: boolean;
|
|
185
|
-
}): Promise<
|
|
186
|
-
success: boolean;
|
|
187
|
-
message: string;
|
|
188
|
-
settings: {
|
|
189
|
-
cellSize: number | undefined;
|
|
190
|
-
loadingRange: number | undefined;
|
|
191
|
-
hlod: boolean | undefined;
|
|
192
|
-
};
|
|
193
|
-
error?: undefined;
|
|
194
|
-
} | {
|
|
195
|
-
success: boolean;
|
|
196
|
-
error: string;
|
|
197
|
-
message?: undefined;
|
|
198
|
-
settings?: undefined;
|
|
199
|
-
}>;
|
|
107
|
+
}): Promise<StandardActionResponse>;
|
|
200
108
|
modifyHeightmap(params: {
|
|
201
109
|
landscapeName: string;
|
|
202
110
|
heightData: number[];
|
|
@@ -205,14 +113,6 @@ export declare class LandscapeTools {
|
|
|
205
113
|
maxX: number;
|
|
206
114
|
maxY: number;
|
|
207
115
|
updateNormals?: boolean;
|
|
208
|
-
}): Promise<
|
|
209
|
-
success: boolean;
|
|
210
|
-
error: string;
|
|
211
|
-
message?: undefined;
|
|
212
|
-
} | {
|
|
213
|
-
success: boolean;
|
|
214
|
-
message: string;
|
|
215
|
-
error?: undefined;
|
|
216
|
-
}>;
|
|
116
|
+
}): Promise<StandardActionResponse>;
|
|
217
117
|
}
|
|
218
118
|
//# sourceMappingURL=landscape.d.ts.map
|
package/dist/tools/landscape.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ensureVector3 } from '../utils/validation.js';
|
|
2
|
+
import { wasmIntegration } from '../wasm/index.js';
|
|
2
3
|
export class LandscapeTools {
|
|
3
4
|
bridge;
|
|
4
5
|
automationBridge;
|
|
@@ -28,6 +29,9 @@ export class LandscapeTools {
|
|
|
28
29
|
throw new Error('Automation Bridge not available. Landscape operations require plugin support.');
|
|
29
30
|
}
|
|
30
31
|
const [locX, locY, locZ] = ensureVector3(params.location ?? [0, 0, 0], 'landscape location');
|
|
32
|
+
const zeroVector = [0, 0, 0];
|
|
33
|
+
const processedLocation = wasmIntegration.vectorAdd(zeroVector, [locX, locY, locZ]);
|
|
34
|
+
console.error('[WASM] Using vectorAdd for landscape positioning');
|
|
31
35
|
const sectionsPerComponent = Math.max(1, Math.floor(params.sectionsPerComponent ?? 1));
|
|
32
36
|
const quadsPerSection = Math.max(1, Math.floor(params.quadsPerSection ?? 63));
|
|
33
37
|
try {
|
|
@@ -36,9 +40,9 @@ export class LandscapeTools {
|
|
|
36
40
|
const quadsPerComponent = quadsPerSection;
|
|
37
41
|
const payload = {
|
|
38
42
|
name,
|
|
39
|
-
x:
|
|
40
|
-
y:
|
|
41
|
-
z:
|
|
43
|
+
x: processedLocation[0],
|
|
44
|
+
y: processedLocation[1],
|
|
45
|
+
z: processedLocation[2],
|
|
42
46
|
componentsX,
|
|
43
47
|
componentsY,
|
|
44
48
|
quadsPerComponent,
|
package/dist/tools/level.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseTool } from './base-tool.js';
|
|
2
|
-
import { ILevelTools } from '../types/tool-interfaces.js';
|
|
2
|
+
import { ILevelTools, StandardActionResponse } from '../types/tool-interfaces.js';
|
|
3
3
|
export declare class LevelTools extends BaseTool implements ILevelTools {
|
|
4
4
|
private managedLevels;
|
|
5
5
|
private listCache?;
|
|
@@ -15,13 +15,8 @@ export declare class LevelTools extends BaseTool implements ILevelTools {
|
|
|
15
15
|
private listManagedLevels;
|
|
16
16
|
private summarizeLevel;
|
|
17
17
|
private setCurrentLevel;
|
|
18
|
-
listLevels(): Promise<
|
|
19
|
-
|
|
20
|
-
message: string;
|
|
21
|
-
count: number;
|
|
22
|
-
levels: Array<Record<string, unknown>>;
|
|
23
|
-
}>;
|
|
24
|
-
getLevelSummary(levelPath?: string): Promise<Record<string, unknown>>;
|
|
18
|
+
listLevels(): Promise<StandardActionResponse>;
|
|
19
|
+
getLevelSummary(levelPath?: string): Promise<StandardActionResponse>;
|
|
25
20
|
registerLight(levelPath: string | undefined, info: {
|
|
26
21
|
name: string;
|
|
27
22
|
type: string;
|
|
@@ -32,122 +27,52 @@ export declare class LevelTools extends BaseTool implements ILevelTools {
|
|
|
32
27
|
exportPath: string;
|
|
33
28
|
note?: string;
|
|
34
29
|
timeoutMs?: number;
|
|
35
|
-
}): Promise<
|
|
36
|
-
success: boolean;
|
|
37
|
-
error: string;
|
|
38
|
-
levelPath?: undefined;
|
|
39
|
-
exportPath?: undefined;
|
|
40
|
-
details?: undefined;
|
|
41
|
-
message?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
success: boolean;
|
|
44
|
-
error: any;
|
|
45
|
-
levelPath: string;
|
|
46
|
-
exportPath: string;
|
|
47
|
-
details: any;
|
|
48
|
-
message?: undefined;
|
|
49
|
-
} | {
|
|
50
|
-
success: boolean;
|
|
51
|
-
message: string;
|
|
52
|
-
levelPath: string;
|
|
53
|
-
exportPath: string;
|
|
54
|
-
details: any;
|
|
55
|
-
error?: undefined;
|
|
56
|
-
}>;
|
|
30
|
+
}): Promise<StandardActionResponse>;
|
|
57
31
|
importLevel(params: {
|
|
58
32
|
packagePath: string;
|
|
59
33
|
destinationPath?: string;
|
|
60
34
|
streaming?: boolean;
|
|
61
35
|
timeoutMs?: number;
|
|
62
|
-
}): Promise<
|
|
63
|
-
success: boolean;
|
|
64
|
-
error: any;
|
|
65
|
-
levelPath: string;
|
|
66
|
-
details: any;
|
|
67
|
-
message?: undefined;
|
|
68
|
-
partitioned?: undefined;
|
|
69
|
-
streaming?: undefined;
|
|
70
|
-
} | {
|
|
71
|
-
success: boolean;
|
|
72
|
-
message: string;
|
|
73
|
-
levelPath: string;
|
|
74
|
-
partitioned: boolean;
|
|
75
|
-
streaming: boolean;
|
|
76
|
-
details: any;
|
|
77
|
-
error?: undefined;
|
|
78
|
-
} | {
|
|
79
|
-
success: boolean;
|
|
80
|
-
error: string;
|
|
81
|
-
levelPath?: undefined;
|
|
82
|
-
details?: undefined;
|
|
83
|
-
message?: undefined;
|
|
84
|
-
partitioned?: undefined;
|
|
85
|
-
streaming?: undefined;
|
|
86
|
-
}>;
|
|
36
|
+
}): Promise<StandardActionResponse>;
|
|
87
37
|
saveLevelAs(params: {
|
|
88
38
|
sourcePath?: string;
|
|
89
39
|
targetPath: string;
|
|
90
|
-
}): Promise<
|
|
91
|
-
success: boolean;
|
|
92
|
-
error: any;
|
|
93
|
-
message?: undefined;
|
|
94
|
-
levelPath?: undefined;
|
|
95
|
-
} | {
|
|
96
|
-
success: boolean;
|
|
97
|
-
message: any;
|
|
98
|
-
levelPath: string;
|
|
99
|
-
error?: undefined;
|
|
100
|
-
}>;
|
|
40
|
+
}): Promise<StandardActionResponse>;
|
|
101
41
|
deleteLevels(params: {
|
|
102
42
|
levelPaths: string[];
|
|
103
|
-
}): Promise<
|
|
104
|
-
success: boolean;
|
|
105
|
-
message: string;
|
|
106
|
-
removed: string[];
|
|
107
|
-
}>;
|
|
43
|
+
}): Promise<StandardActionResponse>;
|
|
108
44
|
loadLevel(params: {
|
|
109
45
|
levelPath: string;
|
|
110
46
|
streaming?: boolean;
|
|
111
47
|
position?: [number, number, number];
|
|
112
|
-
}): Promise<
|
|
48
|
+
}): Promise<StandardActionResponse>;
|
|
113
49
|
saveLevel(params: {
|
|
114
50
|
levelName?: string;
|
|
115
51
|
savePath?: string;
|
|
116
|
-
}): Promise<
|
|
117
|
-
success: boolean;
|
|
118
|
-
error: any;
|
|
119
|
-
}>;
|
|
52
|
+
}): Promise<StandardActionResponse>;
|
|
120
53
|
createLevel(params: {
|
|
121
54
|
levelName: string;
|
|
122
55
|
template?: 'Empty' | 'Default' | 'VR' | 'TimeOfDay';
|
|
123
56
|
savePath?: string;
|
|
124
|
-
}): Promise<
|
|
125
|
-
success: boolean;
|
|
126
|
-
error: any;
|
|
127
|
-
path: string;
|
|
128
|
-
partitioned: boolean;
|
|
129
|
-
}>;
|
|
57
|
+
}): Promise<StandardActionResponse>;
|
|
130
58
|
addSubLevel(params: {
|
|
131
59
|
parentLevel?: string;
|
|
132
60
|
subLevelPath: string;
|
|
133
61
|
streamingMethod?: 'Blueprint' | 'AlwaysLoaded';
|
|
134
|
-
}): Promise<
|
|
62
|
+
}): Promise<StandardActionResponse>;
|
|
135
63
|
streamLevel(params: {
|
|
136
64
|
levelPath?: string;
|
|
137
65
|
levelName?: string;
|
|
138
66
|
shouldBeLoaded: boolean;
|
|
139
67
|
shouldBeVisible?: boolean;
|
|
140
68
|
position?: [number, number, number];
|
|
141
|
-
}): Promise<
|
|
69
|
+
}): Promise<StandardActionResponse>;
|
|
142
70
|
setupWorldComposition(params: {
|
|
143
71
|
enableComposition: boolean;
|
|
144
72
|
tileSize?: number;
|
|
145
73
|
distanceStreaming?: boolean;
|
|
146
74
|
streamingDistance?: number;
|
|
147
|
-
}): Promise<
|
|
148
|
-
success: boolean;
|
|
149
|
-
message: string;
|
|
150
|
-
}>;
|
|
75
|
+
}): Promise<StandardActionResponse>;
|
|
151
76
|
editLevelBlueprint(params: {
|
|
152
77
|
eventType: 'BeginPlay' | 'EndPlay' | 'Tick' | 'Custom';
|
|
153
78
|
customEventName?: string;
|
|
@@ -156,50 +81,44 @@ export declare class LevelTools extends BaseTool implements ILevelTools {
|
|
|
156
81
|
position: [number, number];
|
|
157
82
|
connections?: string[];
|
|
158
83
|
}>;
|
|
159
|
-
}): Promise<
|
|
84
|
+
}): Promise<StandardActionResponse>;
|
|
160
85
|
createSubLevel(params: {
|
|
161
86
|
name: string;
|
|
162
87
|
type: 'Persistent' | 'Streaming' | 'Lighting' | 'Gameplay';
|
|
163
88
|
parent?: string;
|
|
164
|
-
}): Promise<
|
|
89
|
+
}): Promise<StandardActionResponse>;
|
|
165
90
|
setWorldSettings(params: {
|
|
166
91
|
gravity?: number;
|
|
167
92
|
worldScale?: number;
|
|
168
93
|
gameMode?: string;
|
|
169
94
|
defaultPawn?: string;
|
|
170
95
|
killZ?: number;
|
|
171
|
-
}): Promise<
|
|
172
|
-
success: boolean;
|
|
173
|
-
message: string;
|
|
174
|
-
}>;
|
|
96
|
+
}): Promise<StandardActionResponse>;
|
|
175
97
|
setLevelBounds(params: {
|
|
176
98
|
min: [number, number, number];
|
|
177
99
|
max: [number, number, number];
|
|
178
|
-
}): Promise<
|
|
100
|
+
}): Promise<StandardActionResponse>;
|
|
179
101
|
buildNavMesh(params: {
|
|
180
102
|
rebuildAll?: boolean;
|
|
181
103
|
selectedOnly?: boolean;
|
|
182
|
-
}): Promise<
|
|
183
|
-
success: boolean;
|
|
184
|
-
error: any;
|
|
185
|
-
}>;
|
|
104
|
+
}): Promise<StandardActionResponse>;
|
|
186
105
|
setLevelVisibility(params: {
|
|
187
106
|
levelName: string;
|
|
188
107
|
visible: boolean;
|
|
189
|
-
}): Promise<
|
|
108
|
+
}): Promise<StandardActionResponse>;
|
|
190
109
|
setWorldOrigin(params: {
|
|
191
110
|
location: [number, number, number];
|
|
192
|
-
}): Promise<
|
|
111
|
+
}): Promise<StandardActionResponse>;
|
|
193
112
|
createStreamingVolume(params: {
|
|
194
113
|
levelName: string;
|
|
195
114
|
position: [number, number, number];
|
|
196
115
|
size: [number, number, number];
|
|
197
116
|
streamingDistance?: number;
|
|
198
|
-
}): Promise<
|
|
117
|
+
}): Promise<StandardActionResponse>;
|
|
199
118
|
setLevelLOD(params: {
|
|
200
119
|
levelName: string;
|
|
201
120
|
lodLevel: number;
|
|
202
121
|
distance: number;
|
|
203
|
-
}): Promise<
|
|
122
|
+
}): Promise<StandardActionResponse>;
|
|
204
123
|
}
|
|
205
124
|
//# sourceMappingURL=level.d.ts.map
|