flockbay 0.10.49 → 0.10.52
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/README.md +60 -60
- package/bin/flockbay-mcp.mjs +62 -62
- package/bin/flockbay.mjs +95 -95
- package/dist/{index-r3VTdgFI.cjs → index-IntvnrmZ.cjs} +71 -14
- package/dist/{index-D8AeVbvv.mjs → index-wkeSi0iC.mjs} +70 -13
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{migratePlugin-CEvGPul8.mjs → migratePlugin-C71hAoc5.mjs} +12 -2
- package/dist/{migratePlugin-wFK-k3Wk.cjs → migratePlugin-D1XjjWFq.cjs} +12 -2
- package/dist/{runCodex-DuyuYqoB.cjs → runCodex-B7i_ICoQ.cjs} +34 -23
- package/dist/{runCodex-ZfUyhHF6.mjs → runCodex-BSx-hCu6.mjs} +34 -23
- package/dist/{runGemini-DBU1mMdp.mjs → runGemini-Dwyh7_WI.mjs} +2 -2
- package/dist/{runGemini-D7j5Y5TF.cjs → runGemini-gBKR3rdL.cjs} +2 -2
- package/dist/{types-DNr0xwSy.cjs → types-5z8UADAi.cjs} +224 -15
- package/dist/{types-BRJuZQj_.mjs → types-Bgzap7qR.mjs} +224 -16
- package/package.json +131 -131
- package/scripts/claude_local_launcher.cjs +72 -72
- package/scripts/claude_remote_launcher.cjs +15 -15
- package/scripts/claude_version_utils.cjs +445 -445
- package/scripts/ripgrep_launcher.cjs +32 -32
- package/scripts/run-with-root-env.mjs +37 -32
- package/scripts/session_hook_forwarder.cjs +49 -49
- package/scripts/test-codex-abort-history.mjs +77 -77
- package/scripts/unpack-tools.cjs +244 -244
- package/tools/licenses/difftastic-LICENSE +21 -21
- package/tools/licenses/ripgrep-LICENSE +3 -3
- package/tools/unreal-mcp/UPSTREAM_VERSION.md +8 -8
- package/tools/unreal-mcp/upstream/Docs/README.md +8 -8
- package/tools/unreal-mcp/upstream/Docs/Tools/README.md +6 -6
- package/tools/unreal-mcp/upstream/Docs/Tools/actor_tools.md +183 -183
- package/tools/unreal-mcp/upstream/Docs/Tools/blueprint_tools.md +268 -268
- package/tools/unreal-mcp/upstream/Docs/Tools/editor_tools.md +104 -104
- package/tools/unreal-mcp/upstream/Docs/Tools/node_tools.md +274 -274
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Config/FilterPlugin.ini +8 -8
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/FlockbayMCP.uplugin +36 -36
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/FlockbayMCP.Build.cs +82 -82
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPBlueprintCommands.cpp +1364 -1364
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPBlueprintNodeCommands.cpp +1310 -1310
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPCommandSchema.cpp +756 -756
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPCommonUtils.cpp +1177 -1177
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPEditorCommands.cpp +2618 -2618
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPProjectCommands.cpp +71 -71
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPUMGCommands.cpp +543 -543
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/MCPServerRunnable.cpp +372 -372
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/UnrealMCPBridge.cpp +457 -457
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/UnrealMCPModule.cpp +21 -21
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPBlueprintCommands.h +35 -35
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPBlueprintNodeCommands.h +30 -30
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPCommandSchema.h +41 -41
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPCommonUtils.h +59 -59
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPEditorCommands.h +61 -61
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPProjectCommands.h +20 -20
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPUMGCommands.h +82 -82
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/MCPServerRunnable.h +33 -33
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/UnrealMCPBridge.h +64 -64
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/UnrealMCPModule.h +22 -22
- package/tools/unreal-mcp/upstream/Python/README.md +39 -39
- package/tools/unreal-mcp/upstream/Python/pyproject.toml +22 -22
- package/tools/unreal-mcp/upstream/Python/scripts/actors/test_cube.py +202 -202
- package/tools/unreal-mcp/upstream/Python/scripts/blueprints/test_create_and_spawn_blueprints_with_different_components.py +496 -496
- package/tools/unreal-mcp/upstream/Python/scripts/blueprints/test_create_and_spawn_cube_blueprint.py +193 -193
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_component_reference.py +266 -266
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_create_bird_blueprint_with_input_and_camera.py +617 -617
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_input_mapping.py +365 -365
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_physics_variables.py +389 -389
- package/tools/unreal-mcp/upstream/Python/tools/blueprint_tools.py +419 -419
- package/tools/unreal-mcp/upstream/Python/tools/editor_tools.py +369 -369
- package/tools/unreal-mcp/upstream/Python/tools/node_tools.py +429 -429
- package/tools/unreal-mcp/upstream/Python/tools/project_tools.py +63 -63
- package/tools/unreal-mcp/upstream/Python/tools/umg_tools.py +332 -332
- package/tools/unreal-mcp/upstream/Python/unreal_mcp_server.py +398 -398
- package/tools/unreal-mcp/upstream/Python/uv.lock +521 -521
|
@@ -44,7 +44,7 @@ function _interopNamespaceDefault(e) {
|
|
|
44
44
|
var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
|
|
45
45
|
|
|
46
46
|
var name = "flockbay";
|
|
47
|
-
var version = "0.10.
|
|
47
|
+
var version = "0.10.52";
|
|
48
48
|
var description = "Flockbay CLI (local agent + daemon)";
|
|
49
49
|
var author = "Eduardo Orellana";
|
|
50
50
|
var license = "UNLICENSED";
|
|
@@ -832,7 +832,7 @@ class RpcHandlerManager {
|
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
|
|
835
|
-
const __dirname$1 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-
|
|
835
|
+
const __dirname$1 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('types-5z8UADAi.cjs', document.baseURI).href))));
|
|
836
836
|
function projectPath() {
|
|
837
837
|
const path = path$1.resolve(__dirname$1, "..");
|
|
838
838
|
return path;
|
|
@@ -3269,6 +3269,9 @@ class ApiSessionClient extends node_events.EventEmitter {
|
|
|
3269
3269
|
this.socket.on("connect", () => {
|
|
3270
3270
|
logger.debug("[session] socket connected");
|
|
3271
3271
|
this.rpcHandlerManager.onSocketConnect(this.socket);
|
|
3272
|
+
if (this.agentStateVersion <= 0) {
|
|
3273
|
+
this.updateAgentState((s) => ({ ...s || {} }));
|
|
3274
|
+
}
|
|
3272
3275
|
this.flush();
|
|
3273
3276
|
this.emit("connect");
|
|
3274
3277
|
});
|
|
@@ -3484,6 +3487,105 @@ function isInstalledEngineRoot(engineRootRaw) {
|
|
|
3484
3487
|
return false;
|
|
3485
3488
|
}
|
|
3486
3489
|
|
|
3490
|
+
function findFilesNamedUnderDir$2(options) {
|
|
3491
|
+
const rootDir = options.rootDir;
|
|
3492
|
+
const filename = options.filename;
|
|
3493
|
+
const maxDepth = Math.max(0, Math.floor(options.maxDepth));
|
|
3494
|
+
const results = [];
|
|
3495
|
+
const visit = (dir, depth) => {
|
|
3496
|
+
if (depth > maxDepth) return;
|
|
3497
|
+
let entries = [];
|
|
3498
|
+
try {
|
|
3499
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
3500
|
+
} catch {
|
|
3501
|
+
return;
|
|
3502
|
+
}
|
|
3503
|
+
for (const entry of entries) {
|
|
3504
|
+
if (entry.name === ".DS_Store") continue;
|
|
3505
|
+
const full = path.join(dir, entry.name);
|
|
3506
|
+
if (entry.isDirectory()) {
|
|
3507
|
+
visit(full, depth + 1);
|
|
3508
|
+
continue;
|
|
3509
|
+
}
|
|
3510
|
+
if (entry.isFile() && entry.name === filename) results.push(full);
|
|
3511
|
+
}
|
|
3512
|
+
};
|
|
3513
|
+
visit(rootDir, 0);
|
|
3514
|
+
return results;
|
|
3515
|
+
}
|
|
3516
|
+
function readJsonIfPossible$2(filePath) {
|
|
3517
|
+
try {
|
|
3518
|
+
return JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
3519
|
+
} catch {
|
|
3520
|
+
return null;
|
|
3521
|
+
}
|
|
3522
|
+
}
|
|
3523
|
+
function isRespacedFlockbayMcpPlugin(upluginJson) {
|
|
3524
|
+
const friendlyName = typeof upluginJson?.FriendlyName === "string" ? upluginJson.FriendlyName : "";
|
|
3525
|
+
const createdBy = typeof upluginJson?.CreatedBy === "string" ? upluginJson.CreatedBy : "";
|
|
3526
|
+
return friendlyName === "Flockbay MCP" && createdBy === "Respaced Inc.";
|
|
3527
|
+
}
|
|
3528
|
+
function looksLikeLegacyBrokenEngineCopy(upluginJson) {
|
|
3529
|
+
const enabledByDefault = Boolean(upluginJson?.EnabledByDefault);
|
|
3530
|
+
const installed = Boolean(upluginJson?.Installed);
|
|
3531
|
+
const hasEngineVersion = typeof upluginJson?.EngineVersion === "string" && upluginJson.EngineVersion.length > 0;
|
|
3532
|
+
return enabledByDefault || installed || hasEngineVersion;
|
|
3533
|
+
}
|
|
3534
|
+
function quarantineLegacyEnginePlugins(engineRootRaw) {
|
|
3535
|
+
const engineRoot = (engineRootRaw || "").trim();
|
|
3536
|
+
if (!engineRoot) {
|
|
3537
|
+
return { ok: true, disabledUpluginPaths: [], ignoredUpluginPaths: [] };
|
|
3538
|
+
}
|
|
3539
|
+
const enginePluginsDir = path.join(engineRoot, "Engine", "Plugins");
|
|
3540
|
+
const candidates = findFilesNamedUnderDir$2({ rootDir: enginePluginsDir, filename: "FlockbayMCP.uplugin", maxDepth: 6 }).map((p) => path.resolve(p)).filter((p, idx, arr) => arr.indexOf(p) === idx);
|
|
3541
|
+
const disabled = [];
|
|
3542
|
+
const ignored = [];
|
|
3543
|
+
for (const upluginPath of candidates) {
|
|
3544
|
+
const parsed = readJsonIfPossible$2(upluginPath);
|
|
3545
|
+
if (!parsed || typeof parsed !== "object") {
|
|
3546
|
+
ignored.push(upluginPath);
|
|
3547
|
+
continue;
|
|
3548
|
+
}
|
|
3549
|
+
if (!isRespacedFlockbayMcpPlugin(parsed)) {
|
|
3550
|
+
ignored.push(upluginPath);
|
|
3551
|
+
continue;
|
|
3552
|
+
}
|
|
3553
|
+
if (!looksLikeLegacyBrokenEngineCopy(parsed)) {
|
|
3554
|
+
ignored.push(upluginPath);
|
|
3555
|
+
continue;
|
|
3556
|
+
}
|
|
3557
|
+
const disabledPath = `${upluginPath}.disabled`;
|
|
3558
|
+
if (fs.existsSync(disabledPath)) {
|
|
3559
|
+
try {
|
|
3560
|
+
fs.rmSync(upluginPath, { force: true });
|
|
3561
|
+
} catch {
|
|
3562
|
+
}
|
|
3563
|
+
continue;
|
|
3564
|
+
}
|
|
3565
|
+
try {
|
|
3566
|
+
fs.renameSync(upluginPath, disabledPath);
|
|
3567
|
+
disabled.push(upluginPath);
|
|
3568
|
+
} catch (err) {
|
|
3569
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
3570
|
+
return {
|
|
3571
|
+
ok: false,
|
|
3572
|
+
disabledUpluginPaths: disabled,
|
|
3573
|
+
ignoredUpluginPaths: ignored,
|
|
3574
|
+
errorMessage: `Detected a legacy engine-scope FlockbayMCP plugin install that can break builds on Installed Build engines, but failed to disable it.
|
|
3575
|
+
|
|
3576
|
+
Path: ${upluginPath}
|
|
3577
|
+
Error: ${message}
|
|
3578
|
+
|
|
3579
|
+
Fix:
|
|
3580
|
+
- Close Unreal Editor
|
|
3581
|
+
- Rename "${upluginPath}" to "${disabledPath}" (or delete the plugin folder)
|
|
3582
|
+
- Re-run the Flockbay MCP project install`
|
|
3583
|
+
};
|
|
3584
|
+
}
|
|
3585
|
+
}
|
|
3586
|
+
return { ok: true, disabledUpluginPaths: disabled, ignoredUpluginPaths: ignored };
|
|
3587
|
+
}
|
|
3588
|
+
|
|
3487
3589
|
function looksLikeEngineRoot$1(engineRoot) {
|
|
3488
3590
|
if (!engineRoot) return false;
|
|
3489
3591
|
return fs.existsSync(path.join(engineRoot, "Engine")) && fs.existsSync(path.join(engineRoot, "Engine", "Plugins"));
|
|
@@ -3523,6 +3625,14 @@ function installUnrealMcpPluginToEngine(engineRootRaw) {
|
|
|
3523
3625
|
};
|
|
3524
3626
|
}
|
|
3525
3627
|
if (isInstalledEngineRoot(engineRoot)) {
|
|
3628
|
+
const quarantine = quarantineLegacyEnginePlugins(engineRoot);
|
|
3629
|
+
if (!quarantine.ok) {
|
|
3630
|
+
return { ok: false, errorMessage: quarantine.errorMessage };
|
|
3631
|
+
}
|
|
3632
|
+
const disabledMeta = quarantine.disabledUpluginPaths.length ? `
|
|
3633
|
+
|
|
3634
|
+
Detected and disabled legacy engine plugin descriptor(s) to unblock builds:
|
|
3635
|
+
` + quarantine.disabledUpluginPaths.map((p) => `- ${p}`).join("\n") : "";
|
|
3526
3636
|
return {
|
|
3527
3637
|
ok: false,
|
|
3528
3638
|
errorMessage: [
|
|
@@ -3537,7 +3647,7 @@ function installUnrealMcpPluginToEngine(engineRootRaw) {
|
|
|
3537
3647
|
"If you are using the Flockbay UI/CLI, choose a project-scope install or pass a project path.",
|
|
3538
3648
|
"Example:",
|
|
3539
3649
|
" flockbay unreal-mcp migrate --engine-root <ENGINE_ROOT> --project <PATH_TO_.UPROJECT> --remove-legacy"
|
|
3540
|
-
].join("\n")
|
|
3650
|
+
].join("\n") + disabledMeta
|
|
3541
3651
|
};
|
|
3542
3652
|
}
|
|
3543
3653
|
const srcDir = unrealMcpPluginSourceDir();
|
|
@@ -3891,20 +4001,107 @@ Expected: ${binariesDir}
|
|
|
3891
4001
|
Log: ${buildLogPath}`
|
|
3892
4002
|
};
|
|
3893
4003
|
}
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
4004
|
+
if (options.enableByDefault) {
|
|
4005
|
+
const setEnabled = setEnabledByDefault(pluginUpluginPath, true);
|
|
4006
|
+
if (!setEnabled.ok) {
|
|
4007
|
+
return {
|
|
4008
|
+
ok: false,
|
|
4009
|
+
buildLogPath,
|
|
4010
|
+
errorMessage: `Built the plugin, but failed to enable it.
|
|
3900
4011
|
Plugin: ${pluginUpluginPath}
|
|
3901
4012
|
Error: ${setEnabled.error}
|
|
3902
4013
|
Log: ${buildLogPath}`
|
|
3903
|
-
|
|
4014
|
+
};
|
|
4015
|
+
}
|
|
3904
4016
|
}
|
|
3905
4017
|
return { ok: true, buildLogPath };
|
|
3906
4018
|
}
|
|
3907
4019
|
|
|
4020
|
+
function normalizeWindowsPath(value) {
|
|
4021
|
+
return path.win32.normalize(String(value || "").trim()).replace(/[\\/]+$/, "");
|
|
4022
|
+
}
|
|
4023
|
+
function equalsIgnoreCaseWindows(a, b) {
|
|
4024
|
+
return normalizeWindowsPath(a || "").toLowerCase() === normalizeWindowsPath(b || "").toLowerCase();
|
|
4025
|
+
}
|
|
4026
|
+
function extractUprojectPathFromCommandLine(commandLine) {
|
|
4027
|
+
const raw = String(commandLine || "").trim();
|
|
4028
|
+
if (!raw) return null;
|
|
4029
|
+
const matches = Array.from(raw.matchAll(/"([^"\r\n]+?\.uproject)"|([^\s"]+?\.uproject)/gi));
|
|
4030
|
+
for (const match of matches) {
|
|
4031
|
+
const candidate = String(match[1] || match[2] || "").trim();
|
|
4032
|
+
if (!candidate) continue;
|
|
4033
|
+
return normalizeWindowsPath(candidate);
|
|
4034
|
+
}
|
|
4035
|
+
return null;
|
|
4036
|
+
}
|
|
4037
|
+
function inferEngineRootFromExecutablePath(executablePath) {
|
|
4038
|
+
const normalized = normalizeWindowsPath(executablePath);
|
|
4039
|
+
if (!normalized) return null;
|
|
4040
|
+
const marker = `${path.win32.sep}Engine${path.win32.sep}Binaries${path.win32.sep}`;
|
|
4041
|
+
const idx = normalized.toLowerCase().indexOf(marker.toLowerCase());
|
|
4042
|
+
if (idx === -1) return null;
|
|
4043
|
+
return normalized.slice(0, idx);
|
|
4044
|
+
}
|
|
4045
|
+
function compareCreationDateDesc(a, b) {
|
|
4046
|
+
const aa = String(a || "").trim();
|
|
4047
|
+
const bb = String(b || "").trim();
|
|
4048
|
+
return bb.localeCompare(aa);
|
|
4049
|
+
}
|
|
4050
|
+
function parseRunningUnrealEditorProjectsFromWindowsJson(input) {
|
|
4051
|
+
const engineRoot = String(input.engineRoot || "").trim();
|
|
4052
|
+
const wantedEngineRoot = engineRoot ? normalizeWindowsPath(engineRoot) : "";
|
|
4053
|
+
const raw = String(input.raw || "").trim();
|
|
4054
|
+
if (!raw) return [];
|
|
4055
|
+
let parsed;
|
|
4056
|
+
try {
|
|
4057
|
+
parsed = JSON.parse(raw);
|
|
4058
|
+
} catch {
|
|
4059
|
+
return [];
|
|
4060
|
+
}
|
|
4061
|
+
const records = (Array.isArray(parsed) ? parsed : [parsed]).filter(Boolean);
|
|
4062
|
+
const out = [];
|
|
4063
|
+
for (const record of records) {
|
|
4064
|
+
const uprojectPath = extractUprojectPathFromCommandLine(String(record?.CommandLine || ""));
|
|
4065
|
+
if (!uprojectPath) continue;
|
|
4066
|
+
const executablePath = record?.ExecutablePath ? normalizeWindowsPath(record.ExecutablePath) : null;
|
|
4067
|
+
const inferredEngineRoot = executablePath ? inferEngineRootFromExecutablePath(executablePath) : null;
|
|
4068
|
+
if (wantedEngineRoot && !equalsIgnoreCaseWindows(inferredEngineRoot, wantedEngineRoot)) continue;
|
|
4069
|
+
const processIdNumber = Number(record?.ProcessId);
|
|
4070
|
+
out.push({
|
|
4071
|
+
processId: Number.isFinite(processIdNumber) && processIdNumber > 0 ? processIdNumber : null,
|
|
4072
|
+
executablePath,
|
|
4073
|
+
engineRoot: inferredEngineRoot,
|
|
4074
|
+
uprojectPath,
|
|
4075
|
+
commandLine: record?.CommandLine ? String(record.CommandLine) : null,
|
|
4076
|
+
creationDate: record?.CreationDate ? String(record.CreationDate) : null
|
|
4077
|
+
});
|
|
4078
|
+
}
|
|
4079
|
+
out.sort((a, b) => compareCreationDateDesc(a.creationDate, b.creationDate));
|
|
4080
|
+
return out;
|
|
4081
|
+
}
|
|
4082
|
+
function detectRunningUnrealEditorProject(options) {
|
|
4083
|
+
if (process.platform !== "win32") return null;
|
|
4084
|
+
const execFileSyncImpl = options?.execFileSyncImpl || node_child_process.execFileSync;
|
|
4085
|
+
const script = [
|
|
4086
|
+
'$ErrorActionPreference = "Stop"',
|
|
4087
|
+
`$procs = Get-CimInstance Win32_Process -Filter "Name = 'UnrealEditor.exe'" | Select-Object ProcessId, ExecutablePath, CommandLine, CreationDate`,
|
|
4088
|
+
'if ($null -eq $procs) { "[]" } else { $procs | ConvertTo-Json -Compress -Depth 3 }'
|
|
4089
|
+
].join("; ");
|
|
4090
|
+
try {
|
|
4091
|
+
const raw = execFileSyncImpl("powershell.exe", ["-NoProfile", "-Command", script], {
|
|
4092
|
+
encoding: "utf8",
|
|
4093
|
+
windowsHide: true
|
|
4094
|
+
});
|
|
4095
|
+
const matches = parseRunningUnrealEditorProjectsFromWindowsJson({
|
|
4096
|
+
raw: typeof raw === "string" ? raw : String(raw || ""),
|
|
4097
|
+
engineRoot: options?.engineRoot
|
|
4098
|
+
});
|
|
4099
|
+
return matches[0] || null;
|
|
4100
|
+
} catch {
|
|
4101
|
+
return null;
|
|
4102
|
+
}
|
|
4103
|
+
}
|
|
4104
|
+
|
|
3908
4105
|
function canWriteDir$1(dir) {
|
|
3909
4106
|
const root = String(dir || "").trim();
|
|
3910
4107
|
if (!root) return false;
|
|
@@ -3980,11 +4177,14 @@ function getUnrealMcpPluginDiskStatus(params) {
|
|
|
3980
4177
|
const checkedAtMs = Date.now();
|
|
3981
4178
|
const engineRoot = String(params?.engineRoot || "").trim();
|
|
3982
4179
|
const installScope = String(params?.installScope || "auto");
|
|
3983
|
-
const
|
|
4180
|
+
const requestedProjectUprojectPath = typeof params?.projectUprojectPath === "string" ? params.projectUprojectPath.trim() : "";
|
|
3984
4181
|
if (!engineRoot) return { success: false, error: "Missing engineRoot." };
|
|
3985
4182
|
if (!looksLikeEngineRoot(engineRoot)) {
|
|
3986
4183
|
return { success: false, error: `Invalid engine root (expected an Unreal Engine install folder containing Engine/Plugins): ${engineRoot}` };
|
|
3987
4184
|
}
|
|
4185
|
+
const installedEngine = isInstalledEngineRoot(engineRoot);
|
|
4186
|
+
const runningProject = detectRunningUnrealEditorProject({ engineRoot });
|
|
4187
|
+
const projectUprojectPathRaw = runningProject?.uprojectPath || requestedProjectUprojectPath;
|
|
3988
4188
|
const enginePluginsDir = path.join(engineRoot, "Engine", "Plugins");
|
|
3989
4189
|
const enginePluginDir = path.join(enginePluginsDir, "FlockbayMCP");
|
|
3990
4190
|
const engineUpluginPath = path.join(enginePluginDir, "FlockbayMCP.uplugin");
|
|
@@ -4052,7 +4252,7 @@ function getUnrealMcpPluginDiskStatus(params) {
|
|
|
4052
4252
|
}
|
|
4053
4253
|
const engineInstalled = engineInfo.exists && engineInfo.descriptorOk && engineInfo.hasBinaries;
|
|
4054
4254
|
const projectInstalled = Boolean(project && project.exists && project.descriptorOk && project.enabledInUproject);
|
|
4055
|
-
const effectiveScope = installScope === "engine" ? "engine" : installScope === "project" ? "project" : engineInstalled ? "engine" : project && !engineInfo.enginePluginsWritable ? "project" : "engine";
|
|
4255
|
+
const effectiveScope = installScope === "engine" ? "engine" : installScope === "project" ? "project" : installedEngine && project ? "project" : engineInstalled ? "engine" : project && !engineInfo.enginePluginsWritable ? "project" : "engine";
|
|
4056
4256
|
const conflict = engineInfo.conflicts.length > 0;
|
|
4057
4257
|
const legacyConflict = engineInfo.legacy.length > 0;
|
|
4058
4258
|
const baseInstalled = effectiveScope === "engine" ? engineInstalled : projectInstalled;
|
|
@@ -4767,12 +4967,18 @@ class ApiMachineClient {
|
|
|
4767
4967
|
async (params) => {
|
|
4768
4968
|
const engineRoot = String(params?.engineRoot || "").trim();
|
|
4769
4969
|
const scope = String(params?.installScope || "auto");
|
|
4770
|
-
const
|
|
4970
|
+
const requestedProjectUprojectPath = typeof params?.projectUprojectPath === "string" ? params.projectUprojectPath.trim() : "";
|
|
4771
4971
|
const enginePluginsDir = path.join(engineRoot, "Engine", "Plugins");
|
|
4772
4972
|
const enginePluginDir = path.join(enginePluginsDir, "FlockbayMCP");
|
|
4773
4973
|
const enginePluginUplugin = path.join(enginePluginDir, "FlockbayMCP.uplugin");
|
|
4774
4974
|
const enginePluginHasBinaries = fs.existsSync(path.join(enginePluginDir, "Binaries"));
|
|
4775
4975
|
const installedEngine = isInstalledEngineRoot(engineRoot);
|
|
4976
|
+
const runningProject = installedEngine ? detectRunningUnrealEditorProject({ engineRoot }) : null;
|
|
4977
|
+
const projectUprojectPath = runningProject?.uprojectPath || requestedProjectUprojectPath;
|
|
4978
|
+
if (installedEngine) {
|
|
4979
|
+
const quarantine = quarantineLegacyEnginePlugins(engineRoot);
|
|
4980
|
+
if (!quarantine.ok) return { success: false, error: quarantine.errorMessage };
|
|
4981
|
+
}
|
|
4776
4982
|
if (scope === "engine" && installedEngine) {
|
|
4777
4983
|
return {
|
|
4778
4984
|
success: false,
|
|
@@ -4809,7 +5015,8 @@ class ApiMachineClient {
|
|
|
4809
5015
|
const built = await buildAndInstallUnrealMcpPlugin({
|
|
4810
5016
|
engineRoot,
|
|
4811
5017
|
flockbayHomeDir: this.machine?.metadata?.flockbayHomeDir || os.homedir(),
|
|
4812
|
-
pluginDir: installedProject.destDir
|
|
5018
|
+
pluginDir: installedProject.destDir,
|
|
5019
|
+
enableByDefault: false
|
|
4813
5020
|
});
|
|
4814
5021
|
if (!built.ok) return { success: false, error: built.errorMessage };
|
|
4815
5022
|
return { success: true, engineRoot, destDir: installedProject.destDir, buildLogPath: built.buildLogPath };
|
|
@@ -4824,7 +5031,8 @@ class ApiMachineClient {
|
|
|
4824
5031
|
}
|
|
4825
5032
|
const built = await buildAndInstallUnrealMcpPlugin({
|
|
4826
5033
|
engineRoot: result.engineRoot,
|
|
4827
|
-
flockbayHomeDir: this.machine?.metadata?.flockbayHomeDir || os.homedir()
|
|
5034
|
+
flockbayHomeDir: this.machine?.metadata?.flockbayHomeDir || os.homedir(),
|
|
5035
|
+
enableByDefault: true
|
|
4828
5036
|
});
|
|
4829
5037
|
if (!built.ok) return { success: false, error: built.errorMessage };
|
|
4830
5038
|
return { success: true, engineRoot: result.engineRoot, destDir: result.destDir, buildLogPath: built.buildLogPath };
|
|
@@ -5391,6 +5599,7 @@ exports.normalizeServerUrlForNode = normalizeServerUrlForNode;
|
|
|
5391
5599
|
exports.openBrowser = openBrowser;
|
|
5392
5600
|
exports.packageJson = packageJson;
|
|
5393
5601
|
exports.projectPath = projectPath;
|
|
5602
|
+
exports.quarantineLegacyEnginePlugins = quarantineLegacyEnginePlugins;
|
|
5394
5603
|
exports.readCredentials = readCredentials;
|
|
5395
5604
|
exports.readDaemonState = readDaemonState;
|
|
5396
5605
|
exports.readSettings = readSettings;
|