unreal-engine-mcp-server 0.5.4 → 0.5.5
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/dist/automation/bridge.d.ts.map +1 -0
- package/dist/automation/bridge.js.map +1 -0
- package/dist/automation/connection-manager.d.ts.map +1 -0
- package/dist/automation/connection-manager.js.map +1 -0
- package/dist/automation/handshake.d.ts.map +1 -0
- package/dist/automation/handshake.js.map +1 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/automation/message-handler.d.ts.map +1 -0
- package/dist/automation/message-handler.js.map +1 -0
- package/dist/automation/request-tracker.d.ts.map +1 -0
- package/dist/automation/request-tracker.js.map +1 -0
- package/dist/automation/types.d.ts.map +1 -0
- package/dist/automation/types.js.map +1 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +4 -3
- package/dist/cli.js.map +1 -0
- package/dist/config/class-aliases.d.ts.map +1 -0
- package/dist/config/class-aliases.js.map +1 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js.map +1 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js.map +1 -0
- package/dist/graphql/loaders.d.ts.map +1 -0
- package/dist/graphql/loaders.js.map +1 -0
- package/dist/graphql/resolvers.d.ts.map +1 -0
- package/dist/graphql/resolvers.js +29 -29
- package/dist/graphql/resolvers.js.map +1 -0
- package/dist/graphql/schema.d.ts.map +1 -0
- package/dist/graphql/schema.js.map +1 -0
- package/dist/graphql/server.d.ts.map +1 -0
- package/dist/graphql/server.js.map +1 -0
- package/dist/graphql/types.d.ts.map +1 -0
- package/dist/graphql/types.js.map +1 -0
- package/dist/handlers/resource-handlers.d.ts.map +1 -0
- package/dist/handlers/resource-handlers.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -7
- package/dist/index.js.map +1 -0
- package/dist/resources/actors.d.ts.map +1 -0
- package/dist/resources/actors.js.map +1 -0
- package/dist/resources/assets.d.ts.map +1 -0
- package/dist/resources/assets.js +6 -4
- package/dist/resources/assets.js.map +1 -0
- package/dist/resources/levels.d.ts.map +1 -0
- package/dist/resources/levels.js.map +1 -0
- package/dist/server/resource-registry.d.ts.map +1 -0
- package/dist/server/resource-registry.js.map +1 -0
- package/dist/server/tool-registry.d.ts.map +1 -0
- package/dist/server/tool-registry.js.map +1 -0
- package/dist/server-setup.d.ts.map +1 -0
- package/dist/server-setup.js.map +1 -0
- package/dist/services/health-monitor.d.ts.map +1 -0
- package/dist/services/health-monitor.js.map +1 -0
- package/dist/services/metrics-server.d.ts.map +1 -0
- package/dist/services/metrics-server.js.map +1 -0
- package/dist/tools/actors.d.ts.map +1 -0
- package/dist/tools/actors.js +3 -1
- package/dist/tools/actors.js.map +1 -0
- package/dist/tools/animation.d.ts.map +1 -0
- package/dist/tools/animation.js +2 -2
- package/dist/tools/animation.js.map +1 -0
- package/dist/tools/assets.d.ts.map +1 -0
- package/dist/tools/assets.js.map +1 -0
- package/dist/tools/audio.d.ts.map +1 -0
- package/dist/tools/audio.js.map +1 -0
- package/dist/tools/base-tool.d.ts.map +1 -0
- package/dist/tools/base-tool.js.map +1 -0
- package/dist/tools/behavior-tree.d.ts.map +1 -0
- package/dist/tools/behavior-tree.js.map +1 -0
- package/dist/tools/blueprint.d.ts.map +1 -0
- package/dist/tools/blueprint.js +4 -2
- package/dist/tools/blueprint.js.map +1 -0
- package/dist/tools/consolidated-tool-definitions.d.ts.map +1 -0
- package/dist/tools/consolidated-tool-definitions.js.map +1 -0
- package/dist/tools/consolidated-tool-handlers.d.ts.map +1 -0
- package/dist/tools/consolidated-tool-handlers.js.map +1 -0
- package/dist/tools/debug.d.ts.map +1 -0
- package/dist/tools/debug.js +3 -1
- package/dist/tools/debug.js.map +1 -0
- package/dist/tools/dynamic-handler-registry.d.ts.map +1 -0
- package/dist/tools/dynamic-handler-registry.js +3 -1
- package/dist/tools/dynamic-handler-registry.js.map +1 -0
- package/dist/tools/editor.d.ts.map +1 -0
- package/dist/tools/editor.js +1 -1
- package/dist/tools/editor.js.map +1 -0
- package/dist/tools/engine.d.ts.map +1 -0
- package/dist/tools/engine.js.map +1 -0
- package/dist/tools/environment.d.ts.map +1 -0
- package/dist/tools/environment.js +2 -2
- package/dist/tools/environment.js.map +1 -0
- package/dist/tools/foliage.d.ts.map +1 -0
- package/dist/tools/foliage.js.map +1 -0
- package/dist/tools/handlers/actor-handlers.d.ts +1 -1
- package/dist/tools/handlers/actor-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/actor-handlers.js +6 -5
- package/dist/tools/handlers/actor-handlers.js.map +1 -0
- package/dist/tools/handlers/animation-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/animation-handlers.js.map +1 -0
- package/dist/tools/handlers/argument-helper.d.ts.map +1 -0
- package/dist/tools/handlers/argument-helper.js.map +1 -0
- package/dist/tools/handlers/asset-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/asset-handlers.js +5 -1
- package/dist/tools/handlers/asset-handlers.js.map +1 -0
- package/dist/tools/handlers/audio-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/audio-handlers.js.map +1 -0
- package/dist/tools/handlers/blueprint-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/blueprint-handlers.js +2 -1
- package/dist/tools/handlers/blueprint-handlers.js.map +1 -0
- package/dist/tools/handlers/common-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/common-handlers.js.map +1 -0
- package/dist/tools/handlers/editor-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/editor-handlers.js +12 -2
- package/dist/tools/handlers/editor-handlers.js.map +1 -0
- package/dist/tools/handlers/effect-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/effect-handlers.js.map +1 -0
- package/dist/tools/handlers/environment-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/environment-handlers.js.map +1 -0
- package/dist/tools/handlers/graph-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/graph-handlers.js +61 -1
- package/dist/tools/handlers/graph-handlers.js.map +1 -0
- package/dist/tools/handlers/input-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/input-handlers.js.map +1 -0
- package/dist/tools/handlers/inspect-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/inspect-handlers.js.map +1 -0
- package/dist/tools/handlers/level-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/level-handlers.js.map +1 -0
- package/dist/tools/handlers/lighting-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/lighting-handlers.js +23 -1
- package/dist/tools/handlers/lighting-handlers.js.map +1 -0
- package/dist/tools/handlers/performance-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/performance-handlers.js +15 -2
- package/dist/tools/handlers/performance-handlers.js.map +1 -0
- package/dist/tools/handlers/pipeline-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/pipeline-handlers.js.map +1 -0
- package/dist/tools/handlers/sequence-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/sequence-handlers.js.map +1 -0
- package/dist/tools/handlers/system-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/system-handlers.js +16 -1
- package/dist/tools/handlers/system-handlers.js.map +1 -0
- package/dist/tools/input.d.ts.map +1 -0
- package/dist/tools/input.js +3 -1
- package/dist/tools/input.js.map +1 -0
- package/dist/tools/introspection.d.ts.map +1 -0
- package/dist/tools/introspection.js.map +1 -0
- package/dist/tools/landscape.d.ts.map +1 -0
- package/dist/tools/landscape.js +3 -1
- package/dist/tools/landscape.js.map +1 -0
- package/dist/tools/level.d.ts.map +1 -0
- package/dist/tools/level.js.map +1 -0
- package/dist/tools/lighting.d.ts.map +1 -0
- package/dist/tools/lighting.js +3 -1
- package/dist/tools/lighting.js.map +1 -0
- package/dist/tools/logs.d.ts.map +1 -0
- package/dist/tools/logs.js.map +1 -0
- package/dist/tools/materials.d.ts.map +1 -0
- package/dist/tools/materials.js +3 -1
- package/dist/tools/materials.js.map +1 -0
- package/dist/tools/niagara.d.ts.map +1 -0
- package/dist/tools/niagara.js +7 -5
- package/dist/tools/niagara.js.map +1 -0
- package/dist/tools/performance.d.ts.map +1 -0
- package/dist/tools/performance.js.map +1 -0
- package/dist/tools/physics.d.ts.map +1 -0
- package/dist/tools/physics.js +9 -7
- package/dist/tools/physics.js.map +1 -0
- package/dist/tools/property-dictionary.d.ts.map +1 -0
- package/dist/tools/property-dictionary.js.map +1 -0
- package/dist/tools/sequence.d.ts.map +1 -0
- package/dist/tools/sequence.js +3 -1
- package/dist/tools/sequence.js.map +1 -0
- package/dist/tools/tool-definition-utils.d.ts.map +1 -0
- package/dist/tools/tool-definition-utils.js.map +1 -0
- package/dist/tools/ui.d.ts.map +1 -0
- package/dist/tools/ui.js +3 -1
- package/dist/tools/ui.js.map +1 -0
- package/dist/types/automation-responses.d.ts.map +1 -0
- package/dist/types/automation-responses.js.map +1 -0
- package/dist/types/env.d.ts.map +1 -0
- package/dist/types/env.js.map +1 -0
- package/dist/types/handler-types.d.ts.map +1 -0
- package/dist/types/handler-types.js.map +1 -0
- package/dist/types/tool-interfaces.d.ts.map +1 -0
- package/dist/types/tool-interfaces.js.map +1 -0
- package/dist/types/tool-types.d.ts.map +1 -0
- package/dist/types/tool-types.js.map +1 -0
- package/dist/unreal-bridge.d.ts +1 -0
- package/dist/unreal-bridge.d.ts.map +1 -0
- package/dist/unreal-bridge.js +8 -0
- package/dist/unreal-bridge.js.map +1 -0
- package/dist/utils/command-validator.d.ts.map +1 -0
- package/dist/utils/command-validator.js.map +1 -0
- package/dist/utils/elicitation.d.ts.map +1 -0
- package/dist/utils/elicitation.js.map +1 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/ini-reader.d.ts.map +1 -0
- package/dist/utils/ini-reader.js.map +1 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/normalize.d.ts.map +1 -0
- package/dist/utils/normalize.js.map +1 -0
- package/dist/utils/path-security.d.ts.map +1 -0
- package/dist/utils/path-security.js.map +1 -0
- package/dist/utils/response-factory.d.ts.map +1 -0
- package/dist/utils/response-factory.js +3 -1
- package/dist/utils/response-factory.js.map +1 -0
- package/dist/utils/response-validator.d.ts.map +1 -0
- package/dist/utils/response-validator.js.map +1 -0
- package/dist/utils/result-helpers.d.ts.map +1 -0
- package/dist/utils/result-helpers.js.map +1 -0
- package/dist/utils/safe-json.d.ts.map +1 -0
- package/dist/utils/safe-json.js.map +1 -0
- package/dist/utils/unreal-command-queue.d.ts.map +1 -0
- package/dist/utils/unreal-command-queue.js.map +1 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/wasm/index.d.ts.map +1 -0
- package/dist/wasm/index.js.map +1 -0
- package/package.json +12 -34
- package/server.json +2 -2
- package/.dockerignore +0 -57
- package/.env.example +0 -26
- package/.env.production +0 -61
- package/.eslintrc.json +0 -0
- package/.eslintrc.override.json +0 -8
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -94
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -56
- package/.github/copilot-instructions.md +0 -478
- package/.github/dependabot.yml +0 -19
- package/.github/labeler.yml +0 -24
- package/.github/labels.yml +0 -70
- package/.github/pull_request_template.md +0 -42
- package/.github/release-drafter-config.yml +0 -51
- package/.github/workflows/auto-merge.yml +0 -38
- package/.github/workflows/ci.yml +0 -38
- package/.github/workflows/dependency-review.yml +0 -17
- package/.github/workflows/gemini-issue-triage.yml +0 -172
- package/.github/workflows/greetings.yml +0 -27
- package/.github/workflows/labeler.yml +0 -17
- package/.github/workflows/links.yml +0 -80
- package/.github/workflows/pr-size-labeler.yml +0 -137
- package/.github/workflows/publish-mcp.yml +0 -79
- package/.github/workflows/release-drafter.yml +0 -24
- package/.github/workflows/release.yml +0 -112
- package/.github/workflows/semantic-pull-request.yml +0 -35
- package/.github/workflows/smoke-test.yml +0 -36
- package/.github/workflows/stale.yml +0 -28
- package/CONTRIBUTING.md +0 -140
- package/Dockerfile +0 -37
- package/GEMINI.md +0 -115
- package/Public/Plugin_setup_guide.mp4 +0 -0
- package/Public/icon.png +0 -0
- package/claude_desktop_config_example.json +0 -15
- package/dist/types/responses.d.ts +0 -249
- package/dist/types/responses.js +0 -2
- package/docs/GraphQL-API.md +0 -888
- package/docs/Migration-Guide-v0.5.0.md +0 -684
- package/docs/Roadmap.md +0 -53
- package/docs/WebAssembly-Integration.md +0 -628
- package/docs/editor-plugin-extension.md +0 -370
- package/docs/handler-mapping.md +0 -249
- package/docs/native-automation-progress.md +0 -128
- package/docs/testing-guide.md +0 -423
- package/eslint.config.mjs +0 -68
- package/mcp-config-example.json +0 -14
- package/plugins/McpAutomationBridge/Config/FilterPlugin.ini +0 -8
- package/plugins/McpAutomationBridge/McpAutomationBridge.uplugin +0 -64
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/McpAutomationBridge.Build.cs +0 -189
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridgeGlobals.cpp +0 -22
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridgeGlobals.h +0 -30
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridgeHelpers.h +0 -1983
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridgeModule.cpp +0 -72
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridgeSettings.cpp +0 -46
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridgeSubsystem.cpp +0 -846
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_AnimationHandlers.cpp +0 -2393
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_AssetQueryHandlers.cpp +0 -300
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_AssetWorkflowHandlers.cpp +0 -2807
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_AudioHandlers.cpp +0 -1087
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BehaviorTreeHandlers.cpp +0 -488
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintCreationHandlers.cpp +0 -643
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintCreationHandlers.h +0 -31
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintGraphHandlers.cpp +0 -1094
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintHandlers.cpp +0 -5750
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintHandlers_List.cpp +0 -152
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_ControlHandlers.cpp +0 -2614
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_DebugHandlers.cpp +0 -42
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_EditorFunctionHandlers.cpp +0 -1237
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_EffectHandlers.cpp +0 -1725
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_EnvironmentHandlers.cpp +0 -2265
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_FoliageHandlers.cpp +0 -954
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_InputHandlers.cpp +0 -209
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_InsightsHandlers.cpp +0 -41
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_LandscapeHandlers.cpp +0 -1164
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_LevelHandlers.cpp +0 -762
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_LightingHandlers.cpp +0 -663
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_LogHandlers.cpp +0 -136
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_MaterialGraphHandlers.cpp +0 -494
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_NiagaraGraphHandlers.cpp +0 -278
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_NiagaraHandlers.cpp +0 -625
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_PerformanceHandlers.cpp +0 -401
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_PipelineHandlers.cpp +0 -67
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_ProcessRequest.cpp +0 -472
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_PropertyHandlers.cpp +0 -2634
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_RenderHandlers.cpp +0 -189
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_SCSHandlers.cpp +0 -917
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_SCSHandlers.h +0 -39
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_SequenceHandlers.cpp +0 -2706
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_SequencerHandlers.cpp +0 -519
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_TestHandlers.cpp +0 -38
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_UiHandlers.cpp +0 -668
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_WorldPartitionHandlers.cpp +0 -346
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpBridgeWebSocket.cpp +0 -1345
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpBridgeWebSocket.h +0 -149
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpConnectionManager.cpp +0 -782
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Public/McpAutomationBridgeSettings.h +0 -115
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Public/McpAutomationBridgeSubsystem.h +0 -796
- package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Public/McpConnectionManager.h +0 -117
- package/scripts/check-unreal-connection.mjs +0 -19
- package/scripts/clean-tmp.js +0 -23
- package/scripts/patch-wasm.js +0 -26
- package/scripts/run-all-tests.mjs +0 -136
- package/scripts/smoke-test.ts +0 -94
- package/scripts/sync-mcp-plugin.js +0 -143
- package/scripts/test-no-plugin-alternates.mjs +0 -113
- package/scripts/validate-server.js +0 -46
- package/scripts/verify-automation-bridge.js +0 -200
- package/src/automation/bridge.ts +0 -630
- package/src/automation/connection-manager.ts +0 -148
- package/src/automation/handshake.ts +0 -99
- package/src/automation/index.ts +0 -2
- package/src/automation/message-handler.ts +0 -192
- package/src/automation/request-tracker.ts +0 -155
- package/src/automation/types.ts +0 -108
- package/src/cli.ts +0 -34
- package/src/config/class-aliases.ts +0 -65
- package/src/config.ts +0 -73
- package/src/constants.ts +0 -29
- package/src/graphql/loaders.ts +0 -244
- package/src/graphql/resolvers.ts +0 -1008
- package/src/graphql/schema.ts +0 -452
- package/src/graphql/server.ts +0 -156
- package/src/graphql/types.ts +0 -10
- package/src/handlers/resource-handlers.ts +0 -186
- package/src/index.ts +0 -243
- package/src/resources/actors.ts +0 -127
- package/src/resources/assets.ts +0 -286
- package/src/resources/levels.ts +0 -68
- package/src/server/resource-registry.ts +0 -47
- package/src/server/tool-registry.ts +0 -354
- package/src/server-setup.ts +0 -114
- package/src/services/health-monitor.ts +0 -132
- package/src/services/metrics-server.ts +0 -176
- package/src/tools/actors.ts +0 -564
- package/src/tools/animation.ts +0 -941
- package/src/tools/assets.ts +0 -394
- package/src/tools/audio.ts +0 -499
- package/src/tools/base-tool.ts +0 -52
- package/src/tools/behavior-tree.ts +0 -45
- package/src/tools/blueprint.ts +0 -940
- package/src/tools/consolidated-tool-definitions.ts +0 -1256
- package/src/tools/consolidated-tool-handlers.ts +0 -302
- package/src/tools/debug.ts +0 -622
- package/src/tools/dynamic-handler-registry.ts +0 -33
- package/src/tools/editor.ts +0 -435
- package/src/tools/engine.ts +0 -43
- package/src/tools/environment.ts +0 -281
- package/src/tools/foliage.ts +0 -596
- package/src/tools/handlers/actor-handlers.ts +0 -244
- package/src/tools/handlers/animation-handlers.ts +0 -237
- package/src/tools/handlers/argument-helper.ts +0 -142
- package/src/tools/handlers/asset-handlers.ts +0 -550
- package/src/tools/handlers/audio-handlers.ts +0 -194
- package/src/tools/handlers/blueprint-handlers.ts +0 -380
- package/src/tools/handlers/common-handlers.ts +0 -108
- package/src/tools/handlers/editor-handlers.ts +0 -124
- package/src/tools/handlers/effect-handlers.ts +0 -224
- package/src/tools/handlers/environment-handlers.ts +0 -183
- package/src/tools/handlers/graph-handlers.ts +0 -117
- package/src/tools/handlers/input-handlers.ts +0 -28
- package/src/tools/handlers/inspect-handlers.ts +0 -450
- package/src/tools/handlers/level-handlers.ts +0 -253
- package/src/tools/handlers/lighting-handlers.ts +0 -151
- package/src/tools/handlers/performance-handlers.ts +0 -132
- package/src/tools/handlers/pipeline-handlers.ts +0 -194
- package/src/tools/handlers/sequence-handlers.ts +0 -438
- package/src/tools/handlers/system-handlers.ts +0 -564
- package/src/tools/input.ts +0 -160
- package/src/tools/introspection.ts +0 -689
- package/src/tools/landscape.ts +0 -649
- package/src/tools/level.ts +0 -989
- package/src/tools/lighting.ts +0 -1052
- package/src/tools/logs.ts +0 -219
- package/src/tools/materials.ts +0 -295
- package/src/tools/niagara.ts +0 -485
- package/src/tools/performance.ts +0 -661
- package/src/tools/physics.ts +0 -679
- package/src/tools/property-dictionary.ts +0 -98
- package/src/tools/sequence.ts +0 -385
- package/src/tools/tool-definition-utils.ts +0 -35
- package/src/tools/ui.ts +0 -452
- package/src/types/automation-responses.ts +0 -119
- package/src/types/env.ts +0 -17
- package/src/types/handler-types.ts +0 -442
- package/src/types/responses.ts +0 -355
- package/src/types/tool-interfaces.ts +0 -250
- package/src/types/tool-types.ts +0 -575
- package/src/unreal-bridge.ts +0 -693
- package/src/utils/command-validator.ts +0 -139
- package/src/utils/elicitation.ts +0 -132
- package/src/utils/error-handler.ts +0 -287
- package/src/utils/ini-reader.ts +0 -86
- package/src/utils/logger.ts +0 -35
- package/src/utils/normalize.test.ts +0 -162
- package/src/utils/normalize.ts +0 -146
- package/src/utils/path-security.ts +0 -43
- package/src/utils/response-factory.ts +0 -44
- package/src/utils/response-validator.ts +0 -395
- package/src/utils/result-helpers.ts +0 -195
- package/src/utils/safe-json.test.ts +0 -90
- package/src/utils/safe-json.ts +0 -70
- package/src/utils/unreal-command-queue.ts +0 -166
- package/src/utils/validation.test.ts +0 -184
- package/src/utils/validation.ts +0 -312
- package/src/wasm/index.ts +0 -838
- package/test-server.mjs +0 -100
- package/tests/test-animation.mjs +0 -369
- package/tests/test-asset-advanced.mjs +0 -82
- package/tests/test-asset-graph.mjs +0 -311
- package/tests/test-audio.mjs +0 -417
- package/tests/test-automation-timeouts.mjs +0 -98
- package/tests/test-behavior-tree.mjs +0 -444
- package/tests/test-blueprint-graph.mjs +0 -410
- package/tests/test-blueprint.mjs +0 -577
- package/tests/test-client-mode.mjs +0 -86
- package/tests/test-console-command.mjs +0 -56
- package/tests/test-control-actor.mjs +0 -425
- package/tests/test-control-editor.mjs +0 -112
- package/tests/test-graphql.mjs +0 -372
- package/tests/test-input.mjs +0 -349
- package/tests/test-inspect.mjs +0 -302
- package/tests/test-landscape.mjs +0 -316
- package/tests/test-lighting.mjs +0 -428
- package/tests/test-manage-asset.mjs +0 -438
- package/tests/test-manage-level.mjs +0 -89
- package/tests/test-materials.mjs +0 -356
- package/tests/test-niagara.mjs +0 -185
- package/tests/test-no-inline-python.mjs +0 -122
- package/tests/test-performance.mjs +0 -539
- package/tests/test-plugin-handshake.mjs +0 -82
- package/tests/test-runner.mjs +0 -993
- package/tests/test-sequence.mjs +0 -104
- package/tests/test-system.mjs +0 -96
- package/tests/test-wasm.mjs +0 -283
- package/tests/test-world-partition.mjs +0 -215
- package/tsconfig.json +0 -56
- package/vitest.config.ts +0 -35
- package/wasm/Cargo.lock +0 -363
- package/wasm/Cargo.toml +0 -42
- package/wasm/LICENSE +0 -21
- package/wasm/README.md +0 -253
- package/wasm/src/dependency_resolver.rs +0 -377
- package/wasm/src/lib.rs +0 -153
- package/wasm/src/property_parser.rs +0 -271
- package/wasm/src/transform_math.rs +0 -396
- package/wasm/tests/integration.rs +0 -109
|
@@ -1,625 +0,0 @@
|
|
|
1
|
-
#include "McpAutomationBridgeGlobals.h"
|
|
2
|
-
#include "McpAutomationBridgeHelpers.h"
|
|
3
|
-
#include "McpAutomationBridgeSubsystem.h"
|
|
4
|
-
|
|
5
|
-
#if WITH_EDITOR
|
|
6
|
-
#include "AssetRegistry/AssetRegistryModule.h"
|
|
7
|
-
#include "AssetToolsModule.h"
|
|
8
|
-
#include "Async/Async.h"
|
|
9
|
-
#include "EditorAssetLibrary.h"
|
|
10
|
-
#include "Engine/World.h"
|
|
11
|
-
#include "Modules/ModuleManager.h"
|
|
12
|
-
#include "NiagaraActor.h"
|
|
13
|
-
#include "NiagaraComponent.h"
|
|
14
|
-
#include "NiagaraEmitter.h"
|
|
15
|
-
#include "NiagaraEmitterFactoryNew.h"
|
|
16
|
-
#include "NiagaraParameterCollection.h"
|
|
17
|
-
#include "NiagaraScriptFactoryNew.h"
|
|
18
|
-
#include "NiagaraSystem.h"
|
|
19
|
-
#include "NiagaraSystemFactoryNew.h"
|
|
20
|
-
#if __has_include("Subsystems/EditorActorSubsystem.h")
|
|
21
|
-
#include "Subsystems/EditorActorSubsystem.h"
|
|
22
|
-
#elif __has_include("EditorActorSubsystem.h")
|
|
23
|
-
#include "EditorActorSubsystem.h"
|
|
24
|
-
#endif
|
|
25
|
-
#endif
|
|
26
|
-
|
|
27
|
-
#if WITH_EDITOR
|
|
28
|
-
#include "AssetRegistry/AssetRegistryModule.h"
|
|
29
|
-
#include "AssetToolsModule.h"
|
|
30
|
-
#include "Async/Async.h"
|
|
31
|
-
#include "EditorAssetLibrary.h"
|
|
32
|
-
#include "Engine/World.h"
|
|
33
|
-
#include "Modules/ModuleManager.h"
|
|
34
|
-
#include "NiagaraActor.h"
|
|
35
|
-
#include "NiagaraComponent.h"
|
|
36
|
-
#include "NiagaraEmitter.h"
|
|
37
|
-
#include "NiagaraEmitterFactoryNew.h"
|
|
38
|
-
#include "NiagaraParameterCollection.h"
|
|
39
|
-
#include "NiagaraScriptFactoryNew.h"
|
|
40
|
-
#include "NiagaraSystem.h"
|
|
41
|
-
#include "NiagaraSystemFactoryNew.h"
|
|
42
|
-
#if __has_include("Subsystems/EditorActorSubsystem.h")
|
|
43
|
-
#include "Subsystems/EditorActorSubsystem.h"
|
|
44
|
-
#elif __has_include("EditorActorSubsystem.h")
|
|
45
|
-
#include "EditorActorSubsystem.h"
|
|
46
|
-
#endif
|
|
47
|
-
#endif
|
|
48
|
-
|
|
49
|
-
bool UMcpAutomationBridgeSubsystem::HandleCreateNiagaraSystem(
|
|
50
|
-
const FString &RequestId, const FString &Action,
|
|
51
|
-
const TSharedPtr<FJsonObject> &Payload,
|
|
52
|
-
TSharedPtr<FMcpBridgeWebSocket> RequestingSocket) {
|
|
53
|
-
const FString Lower = Action.ToLower();
|
|
54
|
-
if (!Lower.Equals(TEXT("create_niagara_system"), ESearchCase::IgnoreCase)) {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
#if WITH_EDITOR
|
|
59
|
-
if (!Payload.IsValid()) {
|
|
60
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
61
|
-
TEXT("create_niagara_system payload missing"),
|
|
62
|
-
TEXT("INVALID_PAYLOAD"));
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
FString SystemName;
|
|
67
|
-
if (!Payload->TryGetStringField(TEXT("name"), SystemName) ||
|
|
68
|
-
SystemName.IsEmpty()) {
|
|
69
|
-
SendAutomationError(RequestingSocket, RequestId, TEXT("name required"),
|
|
70
|
-
TEXT("INVALID_ARGUMENT"));
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
FString SavePath;
|
|
75
|
-
if (!Payload->TryGetStringField(TEXT("savePath"), SavePath) ||
|
|
76
|
-
SavePath.IsEmpty()) {
|
|
77
|
-
SendAutomationError(RequestingSocket, RequestId, TEXT("savePath required"),
|
|
78
|
-
TEXT("INVALID_ARGUMENT"));
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Check for Niagara plugin availability via module system
|
|
83
|
-
// Previous check for asset existence failed even when Niagara was enabled
|
|
84
|
-
// because it was looking for engine content which requires "Show Engine
|
|
85
|
-
// Content" in Content Browser
|
|
86
|
-
if (!FModuleManager::Get().IsModuleLoaded(TEXT("Niagara"))) {
|
|
87
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
88
|
-
TEXT("Niagara plugin module is not loaded. Please "
|
|
89
|
-
"enable and restart the editor."),
|
|
90
|
-
TEXT("DEPENDENCY_MISSING"));
|
|
91
|
-
return true;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
UNiagaraSystemFactoryNew *Factory = NewObject<UNiagaraSystemFactoryNew>();
|
|
95
|
-
if (!Factory) {
|
|
96
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
97
|
-
TEXT("Failed to create Niagara system factory"),
|
|
98
|
-
TEXT("FACTORY_FAILED"));
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
FString PackagePath = SavePath;
|
|
103
|
-
FString AssetName = SystemName;
|
|
104
|
-
FAssetToolsModule &AssetToolsModule =
|
|
105
|
-
FModuleManager::LoadModuleChecked<FAssetToolsModule>("AssetTools");
|
|
106
|
-
UObject *NewAsset = AssetToolsModule.Get().CreateAsset(
|
|
107
|
-
AssetName, PackagePath, UNiagaraSystem::StaticClass(), Factory);
|
|
108
|
-
UNiagaraSystem *NiagaraSystem = Cast<UNiagaraSystem>(NewAsset);
|
|
109
|
-
|
|
110
|
-
if (!NiagaraSystem) {
|
|
111
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
112
|
-
TEXT("Failed to create Niagara system asset"),
|
|
113
|
-
TEXT("ASSET_CREATION_FAILED"));
|
|
114
|
-
return true;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
UEditorAssetLibrary::SaveAsset(NiagaraSystem->GetPathName());
|
|
118
|
-
|
|
119
|
-
TSharedPtr<FJsonObject> Resp = MakeShared<FJsonObject>();
|
|
120
|
-
Resp->SetBoolField(TEXT("success"), true);
|
|
121
|
-
Resp->SetStringField(TEXT("systemPath"), NiagaraSystem->GetPathName());
|
|
122
|
-
Resp->SetStringField(TEXT("systemName"), SystemName);
|
|
123
|
-
|
|
124
|
-
SendAutomationResponse(RequestingSocket, RequestId, true,
|
|
125
|
-
TEXT("Niagara system created successfully"), Resp,
|
|
126
|
-
FString());
|
|
127
|
-
return true;
|
|
128
|
-
#else
|
|
129
|
-
SendAutomationResponse(RequestingSocket, RequestId, false,
|
|
130
|
-
TEXT("create_niagara_system requires editor build"),
|
|
131
|
-
nullptr, TEXT("NOT_IMPLEMENTED"));
|
|
132
|
-
return true;
|
|
133
|
-
#endif
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
bool UMcpAutomationBridgeSubsystem::HandleCreateNiagaraEmitter(
|
|
137
|
-
const FString &RequestId, const FString &Action,
|
|
138
|
-
const TSharedPtr<FJsonObject> &Payload,
|
|
139
|
-
TSharedPtr<FMcpBridgeWebSocket> RequestingSocket) {
|
|
140
|
-
const FString Lower = Action.ToLower();
|
|
141
|
-
if (!Lower.Equals(TEXT("create_niagara_emitter"), ESearchCase::IgnoreCase)) {
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
#if WITH_EDITOR
|
|
146
|
-
if (!Payload.IsValid()) {
|
|
147
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
148
|
-
TEXT("create_niagara_emitter payload missing"),
|
|
149
|
-
TEXT("INVALID_PAYLOAD"));
|
|
150
|
-
return true;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
FString EmitterName;
|
|
154
|
-
if (!Payload->TryGetStringField(TEXT("name"), EmitterName) ||
|
|
155
|
-
EmitterName.IsEmpty()) {
|
|
156
|
-
SendAutomationError(RequestingSocket, RequestId, TEXT("name required"),
|
|
157
|
-
TEXT("INVALID_ARGUMENT"));
|
|
158
|
-
return true;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
FString SavePath;
|
|
162
|
-
if (!Payload->TryGetStringField(TEXT("savePath"), SavePath) ||
|
|
163
|
-
SavePath.IsEmpty()) {
|
|
164
|
-
SendAutomationError(RequestingSocket, RequestId, TEXT("savePath required"),
|
|
165
|
-
TEXT("INVALID_ARGUMENT"));
|
|
166
|
-
return true;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Check for Niagara plugin availability via module system
|
|
170
|
-
if (!FModuleManager::Get().IsModuleLoaded(TEXT("Niagara"))) {
|
|
171
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
172
|
-
TEXT("Niagara plugin module is not loaded. Please "
|
|
173
|
-
"enable and restart the editor."),
|
|
174
|
-
TEXT("DEPENDENCY_MISSING"));
|
|
175
|
-
return true;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
UNiagaraEmitterFactoryNew *Factory = NewObject<UNiagaraEmitterFactoryNew>();
|
|
179
|
-
if (!Factory) {
|
|
180
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
181
|
-
TEXT("Failed to create Niagara emitter factory"),
|
|
182
|
-
TEXT("FACTORY_FAILED"));
|
|
183
|
-
return true;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
FString PackagePath = SavePath;
|
|
187
|
-
FString AssetName = EmitterName;
|
|
188
|
-
FAssetToolsModule &AssetToolsModule =
|
|
189
|
-
FModuleManager::LoadModuleChecked<FAssetToolsModule>("AssetTools");
|
|
190
|
-
UObject *NewAsset = AssetToolsModule.Get().CreateAsset(
|
|
191
|
-
AssetName, PackagePath, UNiagaraEmitter::StaticClass(), Factory);
|
|
192
|
-
UNiagaraEmitter *NiagaraEmitter = Cast<UNiagaraEmitter>(NewAsset);
|
|
193
|
-
|
|
194
|
-
if (!NiagaraEmitter) {
|
|
195
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
196
|
-
TEXT("Failed to create Niagara emitter asset"),
|
|
197
|
-
TEXT("ASSET_CREATION_FAILED"));
|
|
198
|
-
return true;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
UEditorAssetLibrary::SaveAsset(NiagaraEmitter->GetPathName());
|
|
202
|
-
|
|
203
|
-
TSharedPtr<FJsonObject> Resp = MakeShared<FJsonObject>();
|
|
204
|
-
Resp->SetBoolField(TEXT("success"), true);
|
|
205
|
-
Resp->SetStringField(TEXT("emitterPath"), NiagaraEmitter->GetPathName());
|
|
206
|
-
Resp->SetStringField(TEXT("emitterName"), EmitterName);
|
|
207
|
-
|
|
208
|
-
SendAutomationResponse(RequestingSocket, RequestId, true,
|
|
209
|
-
TEXT("Niagara emitter created successfully"), Resp,
|
|
210
|
-
FString());
|
|
211
|
-
return true;
|
|
212
|
-
#else
|
|
213
|
-
SendAutomationResponse(RequestingSocket, RequestId, false,
|
|
214
|
-
TEXT("create_niagara_emitter requires editor build"),
|
|
215
|
-
nullptr, TEXT("NOT_IMPLEMENTED"));
|
|
216
|
-
return true;
|
|
217
|
-
#endif
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
bool UMcpAutomationBridgeSubsystem::HandleSpawnNiagaraActor(
|
|
221
|
-
const FString &RequestId, const FString &Action,
|
|
222
|
-
const TSharedPtr<FJsonObject> &Payload,
|
|
223
|
-
TSharedPtr<FMcpBridgeWebSocket> RequestingSocket) {
|
|
224
|
-
const FString Lower = Action.ToLower();
|
|
225
|
-
if (!Lower.Equals(TEXT("spawn_niagara_actor"), ESearchCase::IgnoreCase)) {
|
|
226
|
-
return false;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
#if WITH_EDITOR
|
|
230
|
-
if (!Payload.IsValid()) {
|
|
231
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
232
|
-
TEXT("spawn_niagara_actor payload missing"),
|
|
233
|
-
TEXT("INVALID_PAYLOAD"));
|
|
234
|
-
return true;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
FString SystemPath;
|
|
238
|
-
if (!Payload->TryGetStringField(TEXT("systemPath"), SystemPath) ||
|
|
239
|
-
SystemPath.IsEmpty()) {
|
|
240
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
241
|
-
TEXT("systemPath required"), TEXT("INVALID_ARGUMENT"));
|
|
242
|
-
return true;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
double X = 0.0, Y = 0.0, Z = 0.0;
|
|
246
|
-
const TSharedPtr<FJsonObject> *LocationObj = nullptr;
|
|
247
|
-
if (Payload->TryGetObjectField(TEXT("location"), LocationObj) &&
|
|
248
|
-
LocationObj) {
|
|
249
|
-
(*LocationObj)->TryGetNumberField(TEXT("x"), X);
|
|
250
|
-
(*LocationObj)->TryGetNumberField(TEXT("y"), Y);
|
|
251
|
-
(*LocationObj)->TryGetNumberField(TEXT("z"), Z);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
FString ActorName;
|
|
255
|
-
Payload->TryGetStringField(TEXT("name"), ActorName);
|
|
256
|
-
|
|
257
|
-
if (!GEditor || !GEditor->GetEditorWorldContext().World()) {
|
|
258
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
259
|
-
TEXT("Editor world not available"),
|
|
260
|
-
TEXT("EDITOR_NOT_AVAILABLE"));
|
|
261
|
-
return true;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
UWorld *World = GEditor->GetEditorWorldContext().World();
|
|
265
|
-
|
|
266
|
-
if (!UEditorAssetLibrary::DoesAssetExist(SystemPath)) {
|
|
267
|
-
SendAutomationResponse(
|
|
268
|
-
RequestingSocket, RequestId, false,
|
|
269
|
-
FString::Printf(TEXT("Niagara system asset not found: %s"),
|
|
270
|
-
*SystemPath),
|
|
271
|
-
nullptr, TEXT("ASSET_NOT_FOUND"));
|
|
272
|
-
return true;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
UNiagaraSystem *NiagaraSystem =
|
|
276
|
-
LoadObject<UNiagaraSystem>(nullptr, *SystemPath);
|
|
277
|
-
if (!NiagaraSystem) {
|
|
278
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
279
|
-
TEXT("Failed to load Niagara system"),
|
|
280
|
-
TEXT("LOAD_FAILED"));
|
|
281
|
-
return true;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
FVector Location(X, Y, Z);
|
|
285
|
-
ANiagaraActor *NiagaraActor = World->SpawnActor<ANiagaraActor>(
|
|
286
|
-
ANiagaraActor::StaticClass(), Location, FRotator::ZeroRotator);
|
|
287
|
-
|
|
288
|
-
if (!NiagaraActor) {
|
|
289
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
290
|
-
TEXT("Failed to spawn Niagara actor"),
|
|
291
|
-
TEXT("SPAWN_FAILED"));
|
|
292
|
-
return true;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
if (NiagaraActor->GetNiagaraComponent()) {
|
|
296
|
-
NiagaraActor->GetNiagaraComponent()->SetAsset(NiagaraSystem);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
if (!ActorName.IsEmpty()) {
|
|
300
|
-
NiagaraActor->SetActorLabel(ActorName);
|
|
301
|
-
} else {
|
|
302
|
-
NiagaraActor->SetActorLabel(
|
|
303
|
-
FString::Printf(TEXT("NiagaraActor_%s"),
|
|
304
|
-
*FGuid::NewGuid().ToString(EGuidFormats::Short)));
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
TSharedPtr<FJsonObject> Resp = MakeShared<FJsonObject>();
|
|
308
|
-
Resp->SetBoolField(TEXT("success"), true);
|
|
309
|
-
Resp->SetStringField(TEXT("actorPath"), NiagaraActor->GetPathName());
|
|
310
|
-
Resp->SetStringField(TEXT("actorName"), NiagaraActor->GetActorLabel());
|
|
311
|
-
Resp->SetStringField(TEXT("systemPath"), SystemPath);
|
|
312
|
-
|
|
313
|
-
SendAutomationResponse(RequestingSocket, RequestId, true,
|
|
314
|
-
TEXT("Niagara actor spawned successfully"), Resp,
|
|
315
|
-
FString());
|
|
316
|
-
return true;
|
|
317
|
-
#else
|
|
318
|
-
SendAutomationResponse(RequestingSocket, RequestId, false,
|
|
319
|
-
TEXT("spawn_niagara_actor requires editor build"),
|
|
320
|
-
nullptr, TEXT("NOT_IMPLEMENTED"));
|
|
321
|
-
return true;
|
|
322
|
-
#endif
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
bool UMcpAutomationBridgeSubsystem::HandleModifyNiagaraParameter(
|
|
326
|
-
const FString &RequestId, const FString &Action,
|
|
327
|
-
const TSharedPtr<FJsonObject> &Payload,
|
|
328
|
-
TSharedPtr<FMcpBridgeWebSocket> RequestingSocket) {
|
|
329
|
-
const FString Lower = Action.ToLower();
|
|
330
|
-
if (!Lower.Equals(TEXT("modify_niagara_parameter"),
|
|
331
|
-
ESearchCase::IgnoreCase)) {
|
|
332
|
-
return false;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
#if WITH_EDITOR
|
|
336
|
-
if (!Payload.IsValid()) {
|
|
337
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
338
|
-
TEXT("modify_niagara_parameter payload missing"),
|
|
339
|
-
TEXT("INVALID_PAYLOAD"));
|
|
340
|
-
return true;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
FString ActorName;
|
|
344
|
-
if (!Payload->TryGetStringField(TEXT("actorName"), ActorName) ||
|
|
345
|
-
ActorName.IsEmpty()) {
|
|
346
|
-
SendAutomationError(RequestingSocket, RequestId, TEXT("actorName required"),
|
|
347
|
-
TEXT("INVALID_ARGUMENT"));
|
|
348
|
-
return true;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
FString ParameterName;
|
|
352
|
-
if (!Payload->TryGetStringField(TEXT("parameterName"), ParameterName) ||
|
|
353
|
-
ParameterName.IsEmpty()) {
|
|
354
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
355
|
-
TEXT("parameterName required"),
|
|
356
|
-
TEXT("INVALID_ARGUMENT"));
|
|
357
|
-
return true;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
FString ParameterType;
|
|
361
|
-
if (!Payload->TryGetStringField(TEXT("parameterType"), ParameterType)) {
|
|
362
|
-
Payload->TryGetStringField(TEXT("type"), ParameterType);
|
|
363
|
-
}
|
|
364
|
-
if (ParameterType.IsEmpty())
|
|
365
|
-
ParameterType = TEXT("Float");
|
|
366
|
-
|
|
367
|
-
if (!GEditor || !GEditor->GetEditorWorldContext().World()) {
|
|
368
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
369
|
-
TEXT("Editor world not available"),
|
|
370
|
-
TEXT("EDITOR_NOT_AVAILABLE"));
|
|
371
|
-
return true;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
UEditorActorSubsystem *ActorSS =
|
|
375
|
-
GEditor->GetEditorSubsystem<UEditorActorSubsystem>();
|
|
376
|
-
if (!ActorSS) {
|
|
377
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
378
|
-
TEXT("EditorActorSubsystem not available"),
|
|
379
|
-
TEXT("EDITOR_ACTOR_SUBSYSTEM_MISSING"));
|
|
380
|
-
return true;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
TArray<AActor *> AllActors = ActorSS->GetAllLevelActors();
|
|
384
|
-
ANiagaraActor *NiagaraActor = nullptr;
|
|
385
|
-
|
|
386
|
-
for (AActor *Actor : AllActors) {
|
|
387
|
-
if (Actor &&
|
|
388
|
-
Actor->GetActorLabel().Equals(ActorName, ESearchCase::IgnoreCase)) {
|
|
389
|
-
NiagaraActor = Cast<ANiagaraActor>(Actor);
|
|
390
|
-
if (NiagaraActor)
|
|
391
|
-
break;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
if (!NiagaraActor || !NiagaraActor->GetNiagaraComponent()) {
|
|
396
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
397
|
-
TEXT("Niagara actor not found"),
|
|
398
|
-
TEXT("ACTOR_NOT_FOUND"));
|
|
399
|
-
return true;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
UNiagaraComponent *NiagaraComp = NiagaraActor->GetNiagaraComponent();
|
|
403
|
-
bool bSuccess = false;
|
|
404
|
-
|
|
405
|
-
if (ParameterType.Equals(TEXT("Float"), ESearchCase::IgnoreCase)) {
|
|
406
|
-
double Value = 0.0;
|
|
407
|
-
if (Payload->TryGetNumberField(TEXT("value"), Value)) {
|
|
408
|
-
NiagaraComp->SetFloatParameter(FName(*ParameterName),
|
|
409
|
-
static_cast<float>(Value));
|
|
410
|
-
bSuccess = true;
|
|
411
|
-
}
|
|
412
|
-
} else if (ParameterType.Equals(TEXT("Vector"), ESearchCase::IgnoreCase)) {
|
|
413
|
-
const TSharedPtr<FJsonObject> *VectorObj = nullptr;
|
|
414
|
-
const TArray<TSharedPtr<FJsonValue>> *VectorArr = nullptr;
|
|
415
|
-
|
|
416
|
-
if (Payload->TryGetObjectField(TEXT("value"), VectorObj) && VectorObj) {
|
|
417
|
-
double VX = 0.0, VY = 0.0, VZ = 0.0;
|
|
418
|
-
(*VectorObj)->TryGetNumberField(TEXT("x"), VX);
|
|
419
|
-
(*VectorObj)->TryGetNumberField(TEXT("y"), VY);
|
|
420
|
-
(*VectorObj)->TryGetNumberField(TEXT("z"), VZ);
|
|
421
|
-
NiagaraComp->SetVectorParameter(FName(*ParameterName),
|
|
422
|
-
FVector(VX, VY, VZ));
|
|
423
|
-
bSuccess = true;
|
|
424
|
-
} else if (Payload->TryGetArrayField(TEXT("value"), VectorArr) &&
|
|
425
|
-
VectorArr && VectorArr->Num() >= 3) {
|
|
426
|
-
double VX = (*VectorArr)[0]->AsNumber();
|
|
427
|
-
double VY = (*VectorArr)[1]->AsNumber();
|
|
428
|
-
double VZ = (*VectorArr)[2]->AsNumber();
|
|
429
|
-
NiagaraComp->SetVectorParameter(FName(*ParameterName),
|
|
430
|
-
FVector(VX, VY, VZ));
|
|
431
|
-
bSuccess = true;
|
|
432
|
-
}
|
|
433
|
-
} else if (ParameterType.Equals(TEXT("Color"), ESearchCase::IgnoreCase)) {
|
|
434
|
-
const TSharedPtr<FJsonObject> *ColorObj = nullptr;
|
|
435
|
-
const TArray<TSharedPtr<FJsonValue>> *ColorArr = nullptr;
|
|
436
|
-
|
|
437
|
-
if (Payload->TryGetObjectField(TEXT("value"), ColorObj) && ColorObj) {
|
|
438
|
-
double R = 0.0, G = 0.0, B = 0.0, A = 1.0;
|
|
439
|
-
(*ColorObj)->TryGetNumberField(TEXT("r"), R);
|
|
440
|
-
(*ColorObj)->TryGetNumberField(TEXT("g"), G);
|
|
441
|
-
(*ColorObj)->TryGetNumberField(TEXT("b"), B);
|
|
442
|
-
(*ColorObj)->TryGetNumberField(TEXT("a"), A);
|
|
443
|
-
NiagaraComp->SetColorParameter(FName(*ParameterName),
|
|
444
|
-
FLinearColor(R, G, B, A));
|
|
445
|
-
bSuccess = true;
|
|
446
|
-
} else if (Payload->TryGetArrayField(TEXT("value"), ColorArr) && ColorArr &&
|
|
447
|
-
ColorArr->Num() >= 3) {
|
|
448
|
-
double R = (*ColorArr)[0]->AsNumber();
|
|
449
|
-
double G = (*ColorArr)[1]->AsNumber();
|
|
450
|
-
double B = (*ColorArr)[2]->AsNumber();
|
|
451
|
-
double A = (ColorArr->Num() > 3) ? (*ColorArr)[3]->AsNumber() : 1.0;
|
|
452
|
-
NiagaraComp->SetColorParameter(FName(*ParameterName),
|
|
453
|
-
FLinearColor(R, G, B, A));
|
|
454
|
-
bSuccess = true;
|
|
455
|
-
}
|
|
456
|
-
} else if (ParameterType.Equals(TEXT("Bool"), ESearchCase::IgnoreCase)) {
|
|
457
|
-
bool Value = false;
|
|
458
|
-
if (Payload->TryGetBoolField(TEXT("value"), Value)) {
|
|
459
|
-
NiagaraComp->SetBoolParameter(FName(*ParameterName), Value);
|
|
460
|
-
bSuccess = true;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
TSharedPtr<FJsonObject> Resp = MakeShared<FJsonObject>();
|
|
465
|
-
Resp->SetBoolField(TEXT("success"), bSuccess);
|
|
466
|
-
Resp->SetStringField(TEXT("actorName"), ActorName);
|
|
467
|
-
Resp->SetStringField(TEXT("parameterName"), ParameterName);
|
|
468
|
-
Resp->SetStringField(TEXT("parameterType"), ParameterType);
|
|
469
|
-
|
|
470
|
-
SendAutomationResponse(
|
|
471
|
-
RequestingSocket, RequestId, bSuccess,
|
|
472
|
-
bSuccess ? TEXT("Niagara parameter modified successfully")
|
|
473
|
-
: TEXT("Failed to modify parameter"),
|
|
474
|
-
Resp, bSuccess ? FString() : TEXT("PARAMETER_SET_FAILED"));
|
|
475
|
-
return true;
|
|
476
|
-
#else
|
|
477
|
-
SendAutomationResponse(RequestingSocket, RequestId, false,
|
|
478
|
-
TEXT("modify_niagara_parameter requires editor build"),
|
|
479
|
-
nullptr, TEXT("NOT_IMPLEMENTED"));
|
|
480
|
-
return true;
|
|
481
|
-
#endif
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
bool UMcpAutomationBridgeSubsystem::HandleCreateNiagaraRibbon(
|
|
485
|
-
const FString &RequestId, const FString &Action,
|
|
486
|
-
const TSharedPtr<FJsonObject> &Payload,
|
|
487
|
-
TSharedPtr<FMcpBridgeWebSocket> RequestingSocket) {
|
|
488
|
-
const FString Lower = Action.ToLower();
|
|
489
|
-
if (!Lower.Equals(TEXT("create_niagara_ribbon"), ESearchCase::IgnoreCase)) {
|
|
490
|
-
return false;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
#if WITH_EDITOR
|
|
494
|
-
if (!Payload.IsValid()) {
|
|
495
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
496
|
-
TEXT("create_niagara_ribbon payload missing"),
|
|
497
|
-
TEXT("INVALID_PAYLOAD"));
|
|
498
|
-
return true;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
FString SystemPath;
|
|
502
|
-
if (!Payload->TryGetStringField(TEXT("systemPath"), SystemPath) ||
|
|
503
|
-
SystemPath.IsEmpty()) {
|
|
504
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
505
|
-
TEXT("systemPath required"), TEXT("INVALID_ARGUMENT"));
|
|
506
|
-
return true;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
FString Name;
|
|
510
|
-
Payload->TryGetStringField(TEXT("name"), Name);
|
|
511
|
-
|
|
512
|
-
if (!GEditor || !GEditor->GetEditorWorldContext().World()) {
|
|
513
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
514
|
-
TEXT("Editor world not available"),
|
|
515
|
-
TEXT("EDITOR_NOT_AVAILABLE"));
|
|
516
|
-
return true;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
UWorld *World = GEditor->GetEditorWorldContext().World();
|
|
520
|
-
|
|
521
|
-
if (!UEditorAssetLibrary::DoesAssetExist(SystemPath)) {
|
|
522
|
-
SendAutomationResponse(
|
|
523
|
-
RequestingSocket, RequestId, false,
|
|
524
|
-
FString::Printf(TEXT("Niagara system asset not found: %s"),
|
|
525
|
-
*SystemPath),
|
|
526
|
-
nullptr, TEXT("ASSET_NOT_FOUND"));
|
|
527
|
-
return true;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
UNiagaraSystem *NiagaraSystem =
|
|
531
|
-
LoadObject<UNiagaraSystem>(nullptr, *SystemPath);
|
|
532
|
-
if (!NiagaraSystem) {
|
|
533
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
534
|
-
TEXT("Failed to load Niagara system"),
|
|
535
|
-
TEXT("LOAD_FAILED"));
|
|
536
|
-
return true;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
FVector Start(0, 0, 0);
|
|
540
|
-
const TSharedPtr<FJsonObject> *StartObj = nullptr;
|
|
541
|
-
if (Payload->TryGetObjectField(TEXT("start"), StartObj) && StartObj) {
|
|
542
|
-
double X = 0, Y = 0, Z = 0;
|
|
543
|
-
(*StartObj)->TryGetNumberField(TEXT("x"), X);
|
|
544
|
-
(*StartObj)->TryGetNumberField(TEXT("y"), Y);
|
|
545
|
-
(*StartObj)->TryGetNumberField(TEXT("z"), Z);
|
|
546
|
-
Start = FVector(X, Y, Z);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
ANiagaraActor *NiagaraActor = World->SpawnActor<ANiagaraActor>(
|
|
550
|
-
ANiagaraActor::StaticClass(), Start, FRotator::ZeroRotator);
|
|
551
|
-
|
|
552
|
-
if (!NiagaraActor) {
|
|
553
|
-
SendAutomationError(RequestingSocket, RequestId,
|
|
554
|
-
TEXT("Failed to spawn Niagara actor"),
|
|
555
|
-
TEXT("SPAWN_FAILED"));
|
|
556
|
-
return true;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
NiagaraActor->SetActorLabel(Name.IsEmpty() ? TEXT("NiagaraRibbon") : Name);
|
|
560
|
-
|
|
561
|
-
UNiagaraComponent *NiagaraComp = NiagaraActor->GetNiagaraComponent();
|
|
562
|
-
if (NiagaraComp) {
|
|
563
|
-
NiagaraComp->SetAsset(NiagaraSystem);
|
|
564
|
-
|
|
565
|
-
// Set Parameters
|
|
566
|
-
NiagaraComp->SetVectorParameter(FName("User.RibbonStart"), Start);
|
|
567
|
-
|
|
568
|
-
const TSharedPtr<FJsonObject> *EndObj = nullptr;
|
|
569
|
-
if (Payload->TryGetObjectField(TEXT("end"), EndObj) && EndObj) {
|
|
570
|
-
double X = 0, Y = 0, Z = 0;
|
|
571
|
-
(*EndObj)->TryGetNumberField(TEXT("x"), X);
|
|
572
|
-
(*EndObj)->TryGetNumberField(TEXT("y"), Y);
|
|
573
|
-
(*EndObj)->TryGetNumberField(TEXT("z"), Z);
|
|
574
|
-
// Often needed to ensure the beam has an endpoint
|
|
575
|
-
NiagaraComp->SetVectorParameter(FName("User.RibbonEnd"),
|
|
576
|
-
FVector(X, Y, Z));
|
|
577
|
-
NiagaraComp->SetVectorParameter(FName("User.BeamEnd"), FVector(X, Y, Z));
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
double Width = 10.0;
|
|
581
|
-
if (Payload->TryGetNumberField(TEXT("width"), Width)) {
|
|
582
|
-
NiagaraComp->SetFloatParameter(FName("User.RibbonWidth"), (float)Width);
|
|
583
|
-
NiagaraComp->SetFloatParameter(FName("User.BeamWidth"), (float)Width);
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
const TSharedPtr<FJsonObject> *ColorObj = nullptr;
|
|
587
|
-
FLinearColor ColorVal(1, 1, 1, 1);
|
|
588
|
-
if (Payload->TryGetObjectField(TEXT("color"), ColorObj) && ColorObj) {
|
|
589
|
-
double R = 1, G = 1, B = 1, A = 1;
|
|
590
|
-
(*ColorObj)->TryGetNumberField(TEXT("r"), R);
|
|
591
|
-
(*ColorObj)->TryGetNumberField(TEXT("g"), G);
|
|
592
|
-
(*ColorObj)->TryGetNumberField(TEXT("b"), B);
|
|
593
|
-
(*ColorObj)->TryGetNumberField(TEXT("a"), A);
|
|
594
|
-
ColorVal = FLinearColor(R, G, B, A);
|
|
595
|
-
} else {
|
|
596
|
-
const TArray<TSharedPtr<FJsonValue>> *ColorArr = nullptr;
|
|
597
|
-
if (Payload->TryGetArrayField(TEXT("color"), ColorArr) && ColorArr &&
|
|
598
|
-
ColorArr->Num() >= 3) {
|
|
599
|
-
double R = (*ColorArr)[0]->AsNumber();
|
|
600
|
-
double G = (*ColorArr)[1]->AsNumber();
|
|
601
|
-
double B = (*ColorArr)[2]->AsNumber();
|
|
602
|
-
double A = (ColorArr->Num() > 3) ? (*ColorArr)[3]->AsNumber() : 1.0;
|
|
603
|
-
ColorVal = FLinearColor(R, G, B, A);
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
NiagaraComp->SetColorParameter(FName("User.RibbonColor"), ColorVal);
|
|
607
|
-
NiagaraComp->SetColorParameter(FName("User.Color"), ColorVal);
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
TSharedPtr<FJsonObject> Resp = MakeShared<FJsonObject>();
|
|
611
|
-
Resp->SetBoolField(TEXT("success"), true);
|
|
612
|
-
Resp->SetStringField(TEXT("actorPath"), NiagaraActor->GetPathName());
|
|
613
|
-
Resp->SetStringField(TEXT("actorName"), NiagaraActor->GetActorLabel());
|
|
614
|
-
|
|
615
|
-
SendAutomationResponse(RequestingSocket, RequestId, true,
|
|
616
|
-
TEXT("Niagara ribbon created successfully"), Resp,
|
|
617
|
-
FString());
|
|
618
|
-
return true;
|
|
619
|
-
#else
|
|
620
|
-
SendAutomationResponse(RequestingSocket, RequestId, false,
|
|
621
|
-
TEXT("create_niagara_ribbon requires editor build"),
|
|
622
|
-
nullptr, TEXT("NOT_IMPLEMENTED"));
|
|
623
|
-
return true;
|
|
624
|
-
#endif
|
|
625
|
-
}
|