flockbay 0.10.41 → 0.10.42
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/{index-4XOVLZZ1.mjs → index-B6WkRhlp.mjs} +98 -34
- package/dist/{index-X_0a6dpP.cjs → index-F8r81l86.cjs} +99 -35
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{migratePlugin-D-oSS5d1.mjs → migratePlugin-CCepAUqm.mjs} +1 -1
- package/dist/{migratePlugin-8J2c5CrP.cjs → migratePlugin-T0MOGk0T.cjs} +1 -1
- package/dist/{runCodex-B10NJHEL.mjs → runCodex-7GeFJuM_.mjs} +3 -3
- package/dist/{runCodex-BfUYEEBp.cjs → runCodex-Bx4E0ukk.cjs} +3 -3
- package/dist/{runGemini-B4kutwSV.mjs → runGemini-9LGJaWVk.mjs} +3 -3
- package/dist/{runGemini-CnyDdQAY.cjs → runGemini-xvROo10g.cjs} +3 -3
- package/dist/{types-DQ-HKKy4.mjs → types-D1UKSrkg.mjs} +199 -31
- package/dist/{types-2vFbaIZJ.cjs → types-wdJcHT5x.cjs} +200 -31
- package/package.json +1 -1
- package/scripts/unpack-tools.cjs +1 -2
|
@@ -2,7 +2,7 @@ import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(im
|
|
|
2
2
|
import * as os from 'node:os';
|
|
3
3
|
import os__default, { homedir } from 'node:os';
|
|
4
4
|
import { randomUUID, createCipheriv, randomBytes, createHash as createHash$1 } from 'node:crypto';
|
|
5
|
-
import { l as logger, b as projectPath, d as backoff, e as delay, R as RawJSONLinesSchema, c as configuration, f as readDaemonState, g as clearDaemonState, p as packageJson, r as readSettings, h as readCredentials, u as updateSettings, o as openBrowser, w as writeCredentials, j as unrealMcpPythonDir, k as acquireDaemonLock, m as writeDaemonState, n as ApiMachineClient, q as releaseDaemonLock, s as sendUnrealMcpTcpCommand, A as ApiClient, v as validatePath, t as run, x as run$1, y as buildShellInvocation, z as clearCredentials, B as clearMachineId, C as authenticateCodex, D as syncCodexCliAuth, E as authenticateClaude, F as authenticateGemini, i as installUnrealMcpPluginToEngine, G as buildAndInstallUnrealMcpPlugin, H as
|
|
5
|
+
import { l as logger, b as projectPath, d as backoff, e as delay, R as RawJSONLinesSchema, c as configuration, f as readDaemonState, g as clearDaemonState, p as packageJson, r as readSettings, h as readCredentials, u as updateSettings, o as openBrowser, w as writeCredentials, j as unrealMcpPythonDir, k as acquireDaemonLock, m as writeDaemonState, n as ApiMachineClient, q as releaseDaemonLock, s as sendUnrealMcpTcpCommand, A as ApiClient, v as validatePath, t as run, x as run$1, y as buildShellInvocation, z as clearCredentials, B as clearMachineId, C as authenticateCodex, D as syncCodexCliAuth, E as authenticateClaude, F as authenticateGemini, i as installUnrealMcpPluginToEngine, G as buildAndInstallUnrealMcpPlugin, H as installUnrealMcpPluginToProject, I as getLatestDaemonLog, J as normalizeServerUrlForNode } from './types-D1UKSrkg.mjs';
|
|
6
6
|
import { spawn, execFileSync, execSync } from 'node:child_process';
|
|
7
7
|
import * as path from 'node:path';
|
|
8
8
|
import path__default, { resolve, join, dirname } from 'node:path';
|
|
@@ -16,7 +16,6 @@ import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
|
16
16
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
17
17
|
import { fileURLToPath } from 'node:url';
|
|
18
18
|
import axios from 'axios';
|
|
19
|
-
import { EventEmitter } from 'node:events';
|
|
20
19
|
import 'socket.io-client';
|
|
21
20
|
import { spawn as spawn$1, execFileSync as execFileSync$1 } from 'child_process';
|
|
22
21
|
import { createHash } from 'crypto';
|
|
@@ -35,6 +34,7 @@ import { validatorCompiler, serializerCompiler } from 'fastify-type-provider-zod
|
|
|
35
34
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
36
35
|
import { createServer } from 'node:http';
|
|
37
36
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
37
|
+
import { EventEmitter } from 'node:events';
|
|
38
38
|
import 'tweetnacl';
|
|
39
39
|
import { deflateSync } from 'node:zlib';
|
|
40
40
|
|
|
@@ -13146,7 +13146,7 @@ Update: ${updateCommand}`);
|
|
|
13146
13146
|
summary: currentMetadata?.summary
|
|
13147
13147
|
}));
|
|
13148
13148
|
}
|
|
13149
|
-
await session.connectAndWait(
|
|
13149
|
+
await session.connectAndWait();
|
|
13150
13150
|
session.keepAlive(false, options.startingMode === "remote" ? "remote" : "local");
|
|
13151
13151
|
try {
|
|
13152
13152
|
logger.debug(`[START] Reporting session ${response.id} to daemon`);
|
|
@@ -14127,7 +14127,8 @@ async function runSmokeForAgent(agent, args) {
|
|
|
14127
14127
|
const skipUnreal = !readFlag(args, "--with-unreal");
|
|
14128
14128
|
const baseDir = readArgValue$2(args, "--directory") || readArgValue$2(args, "--dir");
|
|
14129
14129
|
const timeoutMsRaw = readArgValue$2(args, "--timeout-ms");
|
|
14130
|
-
const
|
|
14130
|
+
const defaultTimeoutMs = process.platform === "win32" ? 24e4 : 9e4;
|
|
14131
|
+
const timeoutMs = timeoutMsRaw && Number.isFinite(Number(timeoutMsRaw)) ? Number(timeoutMsRaw) : defaultTimeoutMs;
|
|
14131
14132
|
let sessionId;
|
|
14132
14133
|
let directory;
|
|
14133
14134
|
let sessionClient = null;
|
|
@@ -14175,7 +14176,7 @@ Update: ${updateCommand}`);
|
|
|
14175
14176
|
throw new Error(msg);
|
|
14176
14177
|
}
|
|
14177
14178
|
sessionClient = api.sessionSyncClient(session);
|
|
14178
|
-
await sessionClient.connectAndWait(
|
|
14179
|
+
await sessionClient.connectAndWait();
|
|
14179
14180
|
await ensureSessionActive(api, sessionId, 25e3);
|
|
14180
14181
|
const permissionMode = permissionModeForAgent(agent);
|
|
14181
14182
|
scenarios.push(await runScenario("basic-message", async () => {
|
|
@@ -14280,7 +14281,7 @@ Options:
|
|
|
14280
14281
|
--agent, -a Run a single agent
|
|
14281
14282
|
--agents Comma-separated list of agents
|
|
14282
14283
|
--directory, --dir Directory to run the session in (defaults to a temp folder)
|
|
14283
|
-
--timeout-ms Per-scenario timeout (default 90000)
|
|
14284
|
+
--timeout-ms Per-scenario timeout (default 90000; Windows default 240000)
|
|
14284
14285
|
--keep Do not stop session or delete temp dir
|
|
14285
14286
|
--json Write results JSON to a file
|
|
14286
14287
|
--with-unreal Allow Unreal MCP prompts (off by default)
|
|
@@ -14344,6 +14345,18 @@ function splitList(value) {
|
|
|
14344
14345
|
function ensureDir(dir) {
|
|
14345
14346
|
fs__default.mkdirSync(dir, { recursive: true });
|
|
14346
14347
|
}
|
|
14348
|
+
function canWriteDir(dir) {
|
|
14349
|
+
const root = (dir || "").trim();
|
|
14350
|
+
if (!root) return false;
|
|
14351
|
+
try {
|
|
14352
|
+
const tmp = path__default.join(root, `.__flockbay_write_test_${Date.now()}_${Math.random().toString(16).slice(2)}.tmp`);
|
|
14353
|
+
fs__default.writeFileSync(tmp, "ok", "utf8");
|
|
14354
|
+
fs__default.unlinkSync(tmp);
|
|
14355
|
+
return true;
|
|
14356
|
+
} catch {
|
|
14357
|
+
return false;
|
|
14358
|
+
}
|
|
14359
|
+
}
|
|
14347
14360
|
function detectImageMimeTypeFromBuffer(buf) {
|
|
14348
14361
|
if (!buf || buf.length < 12) return null;
|
|
14349
14362
|
if (buf[0] === 137 && buf[1] === 80 && buf[2] === 78 && buf[3] === 71 && buf[4] === 13 && buf[5] === 10 && buf[6] === 26 && buf[7] === 10) {
|
|
@@ -14362,7 +14375,7 @@ async function waitForUnreal(options) {
|
|
|
14362
14375
|
while (Date.now() - startedAt < options.timeoutMs) {
|
|
14363
14376
|
try {
|
|
14364
14377
|
const res = await sendUnrealMcpTcpCommand({ type: "ping", host: options.host, port: options.port, timeoutMs: 2e3 });
|
|
14365
|
-
const msg = typeof res?.message === "string" ? res.message : null;
|
|
14378
|
+
const msg = typeof res?.message === "string" ? res.message : typeof res?.result?.message === "string" ? res.result.message : null;
|
|
14366
14379
|
if (msg === "pong") return { ok: true };
|
|
14367
14380
|
} catch (err) {
|
|
14368
14381
|
lastErr = err instanceof Error ? err.message : String(err);
|
|
@@ -14410,22 +14423,23 @@ async function runRuntimeSmoke(options) {
|
|
|
14410
14423
|
}
|
|
14411
14424
|
try {
|
|
14412
14425
|
const pluginInfo = await sendUnrealMcpTcpCommand({ type: "get_plugin_info", host: options.host, port: options.port, timeoutMs: options.timeoutMs });
|
|
14413
|
-
const
|
|
14414
|
-
const
|
|
14415
|
-
const
|
|
14416
|
-
const
|
|
14417
|
-
const
|
|
14418
|
-
|
|
14426
|
+
const pluginInfoResult = pluginInfo?.result && typeof pluginInfo.result === "object" ? pluginInfo.result : pluginInfo;
|
|
14427
|
+
const createdBy = String(pluginInfoResult?.createdBy || "").trim();
|
|
14428
|
+
const friendlyName = String(pluginInfoResult?.friendlyName || "").trim();
|
|
14429
|
+
const baseDir = String(pluginInfoResult?.baseDir || "").trim();
|
|
14430
|
+
const schemaVersion = Number(pluginInfoResult?.schemaVersion);
|
|
14431
|
+
const commands = Array.isArray(pluginInfoResult?.commands) ? pluginInfoResult.commands.filter((c) => typeof c === "string") : [];
|
|
14432
|
+
if (friendlyName !== "Flockbay MCP" || createdBy !== "Respaced Inc.") {
|
|
14419
14433
|
return {
|
|
14420
14434
|
ok: false,
|
|
14421
14435
|
error: `Unexpected plugin identity loaded by Unreal.
|
|
14422
14436
|
friendlyName=${friendlyName || "(missing)"} createdBy=${createdBy || "(missing)"}
|
|
14423
14437
|
baseDir=${baseDir || "(missing)"}
|
|
14424
|
-
Expected FriendlyName="
|
|
14438
|
+
Expected FriendlyName="Flockbay MCP" CreatedBy="Respaced Inc."`
|
|
14425
14439
|
};
|
|
14426
14440
|
}
|
|
14427
14441
|
if (!Number.isFinite(schemaVersion) || schemaVersion <= 0) {
|
|
14428
|
-
return { ok: false, error: `Invalid schemaVersion from get_plugin_info: ${String(
|
|
14442
|
+
return { ok: false, error: `Invalid schemaVersion from get_plugin_info: ${String(pluginInfoResult?.schemaVersion)}` };
|
|
14429
14443
|
}
|
|
14430
14444
|
const requireCommands = [
|
|
14431
14445
|
"ping",
|
|
@@ -14445,7 +14459,8 @@ Expected FriendlyName="Unreal MCP Plugin" CreatedBy="Respaced Inc."`
|
|
|
14445
14459
|
return { ok: false, error: `Missing required commands in this Unreal MCP build: ${missing.join(", ")}` };
|
|
14446
14460
|
}
|
|
14447
14461
|
const playStatus0 = await sendUnrealMcpTcpCommand({ type: "get_play_in_editor_status", host: options.host, port: options.port, timeoutMs: options.timeoutMs });
|
|
14448
|
-
const
|
|
14462
|
+
const playStatusResult = playStatus0?.result && typeof playStatus0.result === "object" ? playStatus0.result : playStatus0;
|
|
14463
|
+
const isPlaying = Boolean(playStatusResult?.isPlaySessionInProgress);
|
|
14449
14464
|
if (isPlaying) {
|
|
14450
14465
|
await sendUnrealMcpTcpCommand({ type: "stop_play_in_editor", host: options.host, port: options.port, timeoutMs: options.timeoutMs });
|
|
14451
14466
|
}
|
|
@@ -14472,7 +14487,9 @@ Expected FriendlyName="Unreal MCP Plugin" CreatedBy="Respaced Inc."`
|
|
|
14472
14487
|
const bpName = `BP_Smoke_${Date.now()}`;
|
|
14473
14488
|
await sendUnrealMcpTcpCommand({
|
|
14474
14489
|
type: "create_blueprint",
|
|
14475
|
-
|
|
14490
|
+
// Important: pass only the name so the plugin's default (/Game/Blueprints/) is used.
|
|
14491
|
+
// The plugin's "compile_blueprint" name-only lookup searches /Game/Blueprints by design.
|
|
14492
|
+
params: { name: bpName, parent_class: "Actor" },
|
|
14476
14493
|
host: options.host,
|
|
14477
14494
|
port: options.port,
|
|
14478
14495
|
timeoutMs: Math.max(options.timeoutMs, 2e4)
|
|
@@ -14539,26 +14556,73 @@ async function runUnrealMcpMatrixSmoke(args) {
|
|
|
14539
14556
|
if (!engineRoot) continue;
|
|
14540
14557
|
console.log(chalk.bold(`== Engine: ${engineRoot} ==`));
|
|
14541
14558
|
if (doBuild) {
|
|
14542
|
-
|
|
14543
|
-
const
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14559
|
+
const enginePluginsDir = path__default.join(engineRoot, "Engine", "Plugins");
|
|
14560
|
+
const enginePluginDir = path__default.join(enginePluginsDir, "FlockbayMCP");
|
|
14561
|
+
const enginePluginUplugin = path__default.join(enginePluginDir, "FlockbayMCP.uplugin");
|
|
14562
|
+
const enginePluginHasBinaries = fs__default.existsSync(path__default.join(enginePluginDir, "Binaries"));
|
|
14563
|
+
const projectUprojectPath = project ? path__default.resolve(project) : null;
|
|
14564
|
+
if (fs__default.existsSync(enginePluginUplugin) && enginePluginHasBinaries) {
|
|
14565
|
+
console.log(chalk.green(`Build: engine plugin already installed + built (${enginePluginDir})`));
|
|
14566
|
+
} else if (canWriteDir(enginePluginsDir)) {
|
|
14567
|
+
console.log(chalk.cyan("Build: installing Flockbay MCP plugin sources into the engine (folder: FlockbayMCP)..."));
|
|
14568
|
+
const installed = installUnrealMcpPluginToEngine(engineRoot);
|
|
14569
|
+
if (!installed.ok) {
|
|
14570
|
+
failures.push({ engineRoot, phase: "build", error: installed.errorMessage });
|
|
14571
|
+
console.log(chalk.red(`Build: failed (install)
|
|
14547
14572
|
${installed.errorMessage}
|
|
14548
14573
|
`));
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14574
|
+
if (!doRuntime) continue;
|
|
14575
|
+
} else {
|
|
14576
|
+
console.log(chalk.green(`Build: sources installed to ${installed.destDir}`));
|
|
14577
|
+
console.log(chalk.cyan("Build: compiling plugin via RunUAT BuildPlugin..."));
|
|
14578
|
+
const built = await buildAndInstallUnrealMcpPlugin({ engineRoot, flockbayHomeDir: configuration.flockbayHomeDir });
|
|
14579
|
+
if (!built.ok) {
|
|
14580
|
+
failures.push({ engineRoot, phase: "build", error: built.errorMessage });
|
|
14581
|
+
console.log(chalk.red(`Build: failed
|
|
14557
14582
|
${built.errorMessage}
|
|
14558
14583
|
`));
|
|
14584
|
+
} else {
|
|
14585
|
+
console.log(chalk.green(`Build: ok (log: ${built.buildLogPath})`));
|
|
14586
|
+
}
|
|
14587
|
+
}
|
|
14588
|
+
} else if (projectUprojectPath) {
|
|
14589
|
+
console.log(chalk.cyan("Build: engine install not writable; installing plugin into the project instead..."));
|
|
14590
|
+
const installedProject = installUnrealMcpPluginToProject(projectUprojectPath);
|
|
14591
|
+
if (!installedProject.ok) {
|
|
14592
|
+
failures.push({ engineRoot, phase: "build", error: installedProject.errorMessage });
|
|
14593
|
+
console.log(chalk.red(`Build: failed (project install)
|
|
14594
|
+
${installedProject.errorMessage}
|
|
14595
|
+
`));
|
|
14596
|
+
if (!doRuntime) continue;
|
|
14559
14597
|
} else {
|
|
14560
|
-
console.log(chalk.green(`Build:
|
|
14598
|
+
console.log(chalk.green(`Build: sources installed to ${installedProject.destDir}`));
|
|
14599
|
+
console.log(chalk.cyan("Build: compiling plugin via RunUAT BuildPlugin..."));
|
|
14600
|
+
const built = await buildAndInstallUnrealMcpPlugin({
|
|
14601
|
+
engineRoot,
|
|
14602
|
+
flockbayHomeDir: configuration.flockbayHomeDir,
|
|
14603
|
+
pluginDir: installedProject.destDir
|
|
14604
|
+
});
|
|
14605
|
+
if (!built.ok) {
|
|
14606
|
+
failures.push({ engineRoot, phase: "build", error: built.errorMessage });
|
|
14607
|
+
console.log(chalk.red(`Build: failed
|
|
14608
|
+
${built.errorMessage}
|
|
14609
|
+
`));
|
|
14610
|
+
} else {
|
|
14611
|
+
console.log(chalk.green(`Build: ok (log: ${built.buildLogPath})`));
|
|
14612
|
+
}
|
|
14561
14613
|
}
|
|
14614
|
+
} else {
|
|
14615
|
+
const error = `Engine plugins folder is not writable:
|
|
14616
|
+
${enginePluginsDir}
|
|
14617
|
+
|
|
14618
|
+
Fix:
|
|
14619
|
+
- Re-run with --project "<path-to-your-project>.uproject" so we can install the plugin into the project (no admin), OR
|
|
14620
|
+
- Run the installer with Windows admin permissions.`;
|
|
14621
|
+
failures.push({ engineRoot, phase: "build", error });
|
|
14622
|
+
console.log(chalk.red(`Build: failed
|
|
14623
|
+
${error}
|
|
14624
|
+
`));
|
|
14625
|
+
if (!doRuntime) continue;
|
|
14562
14626
|
}
|
|
14563
14627
|
}
|
|
14564
14628
|
if (doRuntime) {
|
|
@@ -15017,7 +15081,7 @@ async function authAndSetupMachineIfNeeded() {
|
|
|
15017
15081
|
process.exit(1);
|
|
15018
15082
|
}
|
|
15019
15083
|
try {
|
|
15020
|
-
const { migrateUnrealMcpToFlockbayMcp } = await import('./migratePlugin-
|
|
15084
|
+
const { migrateUnrealMcpToFlockbayMcp } = await import('./migratePlugin-CCepAUqm.mjs');
|
|
15021
15085
|
const result = migrateUnrealMcpToFlockbayMcp({
|
|
15022
15086
|
engineRoot,
|
|
15023
15087
|
projectUprojectPath: project || void 0,
|
|
@@ -15156,7 +15220,7 @@ ${engineRoot}`, {
|
|
|
15156
15220
|
} else if (subcommand === "codex") {
|
|
15157
15221
|
try {
|
|
15158
15222
|
await chdirToNearestUprojectRootIfPresent();
|
|
15159
|
-
const { runCodex } = await import('./runCodex-
|
|
15223
|
+
const { runCodex } = await import('./runCodex-7GeFJuM_.mjs');
|
|
15160
15224
|
let startedBy = void 0;
|
|
15161
15225
|
let sessionId = void 0;
|
|
15162
15226
|
for (let i = 1; i < args.length; i++) {
|
|
@@ -15258,7 +15322,7 @@ ${engineRoot}`, {
|
|
|
15258
15322
|
}
|
|
15259
15323
|
try {
|
|
15260
15324
|
await chdirToNearestUprojectRootIfPresent();
|
|
15261
|
-
const { runGemini } = await import('./runGemini-
|
|
15325
|
+
const { runGemini } = await import('./runGemini-9LGJaWVk.mjs');
|
|
15262
15326
|
let startedBy = void 0;
|
|
15263
15327
|
let sessionId = void 0;
|
|
15264
15328
|
for (let i = 1; i < args.length; i++) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var types = require('./types-
|
|
6
|
+
var types = require('./types-wdJcHT5x.cjs');
|
|
7
7
|
var node_child_process = require('node:child_process');
|
|
8
8
|
var path = require('node:path');
|
|
9
9
|
var node_readline = require('node:readline');
|
|
@@ -15,7 +15,6 @@ var ink = require('ink');
|
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var node_url = require('node:url');
|
|
17
17
|
var axios = require('axios');
|
|
18
|
-
var node_events = require('node:events');
|
|
19
18
|
require('socket.io-client');
|
|
20
19
|
var child_process = require('child_process');
|
|
21
20
|
var crypto = require('crypto');
|
|
@@ -34,6 +33,7 @@ var fastifyTypeProviderZod = require('fastify-type-provider-zod');
|
|
|
34
33
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
35
34
|
var node_http = require('node:http');
|
|
36
35
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
36
|
+
var node_events = require('node:events');
|
|
37
37
|
require('tweetnacl');
|
|
38
38
|
var node_zlib = require('node:zlib');
|
|
39
39
|
|
|
@@ -1316,7 +1316,7 @@ function buildDaemonSafeEnv(baseEnv, binPath) {
|
|
|
1316
1316
|
env[pathKey] = [...prepend, ...existingParts].join(pathSep);
|
|
1317
1317
|
return env;
|
|
1318
1318
|
}
|
|
1319
|
-
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-
|
|
1319
|
+
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-F8r81l86.cjs', document.baseURI).href)));
|
|
1320
1320
|
const __dirname$1 = path.join(__filename$1, "..");
|
|
1321
1321
|
function getGlobalClaudeVersion(claudeExecutable) {
|
|
1322
1322
|
try {
|
|
@@ -13168,7 +13168,7 @@ Update: ${updateCommand}`);
|
|
|
13168
13168
|
summary: currentMetadata?.summary
|
|
13169
13169
|
}));
|
|
13170
13170
|
}
|
|
13171
|
-
await session.connectAndWait(
|
|
13171
|
+
await session.connectAndWait();
|
|
13172
13172
|
session.keepAlive(false, options.startingMode === "remote" ? "remote" : "local");
|
|
13173
13173
|
try {
|
|
13174
13174
|
types.logger.debug(`[START] Reporting session ${response.id} to daemon`);
|
|
@@ -14149,7 +14149,8 @@ async function runSmokeForAgent(agent, args) {
|
|
|
14149
14149
|
const skipUnreal = !readFlag(args, "--with-unreal");
|
|
14150
14150
|
const baseDir = readArgValue$2(args, "--directory") || readArgValue$2(args, "--dir");
|
|
14151
14151
|
const timeoutMsRaw = readArgValue$2(args, "--timeout-ms");
|
|
14152
|
-
const
|
|
14152
|
+
const defaultTimeoutMs = process.platform === "win32" ? 24e4 : 9e4;
|
|
14153
|
+
const timeoutMs = timeoutMsRaw && Number.isFinite(Number(timeoutMsRaw)) ? Number(timeoutMsRaw) : defaultTimeoutMs;
|
|
14153
14154
|
let sessionId;
|
|
14154
14155
|
let directory;
|
|
14155
14156
|
let sessionClient = null;
|
|
@@ -14197,7 +14198,7 @@ Update: ${updateCommand}`);
|
|
|
14197
14198
|
throw new Error(msg);
|
|
14198
14199
|
}
|
|
14199
14200
|
sessionClient = api.sessionSyncClient(session);
|
|
14200
|
-
await sessionClient.connectAndWait(
|
|
14201
|
+
await sessionClient.connectAndWait();
|
|
14201
14202
|
await ensureSessionActive(api, sessionId, 25e3);
|
|
14202
14203
|
const permissionMode = permissionModeForAgent(agent);
|
|
14203
14204
|
scenarios.push(await runScenario("basic-message", async () => {
|
|
@@ -14302,7 +14303,7 @@ Options:
|
|
|
14302
14303
|
--agent, -a Run a single agent
|
|
14303
14304
|
--agents Comma-separated list of agents
|
|
14304
14305
|
--directory, --dir Directory to run the session in (defaults to a temp folder)
|
|
14305
|
-
--timeout-ms Per-scenario timeout (default 90000)
|
|
14306
|
+
--timeout-ms Per-scenario timeout (default 90000; Windows default 240000)
|
|
14306
14307
|
--keep Do not stop session or delete temp dir
|
|
14307
14308
|
--json Write results JSON to a file
|
|
14308
14309
|
--with-unreal Allow Unreal MCP prompts (off by default)
|
|
@@ -14366,6 +14367,18 @@ function splitList(value) {
|
|
|
14366
14367
|
function ensureDir(dir) {
|
|
14367
14368
|
fs.mkdirSync(dir, { recursive: true });
|
|
14368
14369
|
}
|
|
14370
|
+
function canWriteDir(dir) {
|
|
14371
|
+
const root = (dir || "").trim();
|
|
14372
|
+
if (!root) return false;
|
|
14373
|
+
try {
|
|
14374
|
+
const tmp = path.join(root, `.__flockbay_write_test_${Date.now()}_${Math.random().toString(16).slice(2)}.tmp`);
|
|
14375
|
+
fs.writeFileSync(tmp, "ok", "utf8");
|
|
14376
|
+
fs.unlinkSync(tmp);
|
|
14377
|
+
return true;
|
|
14378
|
+
} catch {
|
|
14379
|
+
return false;
|
|
14380
|
+
}
|
|
14381
|
+
}
|
|
14369
14382
|
function detectImageMimeTypeFromBuffer(buf) {
|
|
14370
14383
|
if (!buf || buf.length < 12) return null;
|
|
14371
14384
|
if (buf[0] === 137 && buf[1] === 80 && buf[2] === 78 && buf[3] === 71 && buf[4] === 13 && buf[5] === 10 && buf[6] === 26 && buf[7] === 10) {
|
|
@@ -14384,7 +14397,7 @@ async function waitForUnreal(options) {
|
|
|
14384
14397
|
while (Date.now() - startedAt < options.timeoutMs) {
|
|
14385
14398
|
try {
|
|
14386
14399
|
const res = await types.sendUnrealMcpTcpCommand({ type: "ping", host: options.host, port: options.port, timeoutMs: 2e3 });
|
|
14387
|
-
const msg = typeof res?.message === "string" ? res.message : null;
|
|
14400
|
+
const msg = typeof res?.message === "string" ? res.message : typeof res?.result?.message === "string" ? res.result.message : null;
|
|
14388
14401
|
if (msg === "pong") return { ok: true };
|
|
14389
14402
|
} catch (err) {
|
|
14390
14403
|
lastErr = err instanceof Error ? err.message : String(err);
|
|
@@ -14432,22 +14445,23 @@ async function runRuntimeSmoke(options) {
|
|
|
14432
14445
|
}
|
|
14433
14446
|
try {
|
|
14434
14447
|
const pluginInfo = await types.sendUnrealMcpTcpCommand({ type: "get_plugin_info", host: options.host, port: options.port, timeoutMs: options.timeoutMs });
|
|
14435
|
-
const
|
|
14436
|
-
const
|
|
14437
|
-
const
|
|
14438
|
-
const
|
|
14439
|
-
const
|
|
14440
|
-
|
|
14448
|
+
const pluginInfoResult = pluginInfo?.result && typeof pluginInfo.result === "object" ? pluginInfo.result : pluginInfo;
|
|
14449
|
+
const createdBy = String(pluginInfoResult?.createdBy || "").trim();
|
|
14450
|
+
const friendlyName = String(pluginInfoResult?.friendlyName || "").trim();
|
|
14451
|
+
const baseDir = String(pluginInfoResult?.baseDir || "").trim();
|
|
14452
|
+
const schemaVersion = Number(pluginInfoResult?.schemaVersion);
|
|
14453
|
+
const commands = Array.isArray(pluginInfoResult?.commands) ? pluginInfoResult.commands.filter((c) => typeof c === "string") : [];
|
|
14454
|
+
if (friendlyName !== "Flockbay MCP" || createdBy !== "Respaced Inc.") {
|
|
14441
14455
|
return {
|
|
14442
14456
|
ok: false,
|
|
14443
14457
|
error: `Unexpected plugin identity loaded by Unreal.
|
|
14444
14458
|
friendlyName=${friendlyName || "(missing)"} createdBy=${createdBy || "(missing)"}
|
|
14445
14459
|
baseDir=${baseDir || "(missing)"}
|
|
14446
|
-
Expected FriendlyName="
|
|
14460
|
+
Expected FriendlyName="Flockbay MCP" CreatedBy="Respaced Inc."`
|
|
14447
14461
|
};
|
|
14448
14462
|
}
|
|
14449
14463
|
if (!Number.isFinite(schemaVersion) || schemaVersion <= 0) {
|
|
14450
|
-
return { ok: false, error: `Invalid schemaVersion from get_plugin_info: ${String(
|
|
14464
|
+
return { ok: false, error: `Invalid schemaVersion from get_plugin_info: ${String(pluginInfoResult?.schemaVersion)}` };
|
|
14451
14465
|
}
|
|
14452
14466
|
const requireCommands = [
|
|
14453
14467
|
"ping",
|
|
@@ -14467,7 +14481,8 @@ Expected FriendlyName="Unreal MCP Plugin" CreatedBy="Respaced Inc."`
|
|
|
14467
14481
|
return { ok: false, error: `Missing required commands in this Unreal MCP build: ${missing.join(", ")}` };
|
|
14468
14482
|
}
|
|
14469
14483
|
const playStatus0 = await types.sendUnrealMcpTcpCommand({ type: "get_play_in_editor_status", host: options.host, port: options.port, timeoutMs: options.timeoutMs });
|
|
14470
|
-
const
|
|
14484
|
+
const playStatusResult = playStatus0?.result && typeof playStatus0.result === "object" ? playStatus0.result : playStatus0;
|
|
14485
|
+
const isPlaying = Boolean(playStatusResult?.isPlaySessionInProgress);
|
|
14471
14486
|
if (isPlaying) {
|
|
14472
14487
|
await types.sendUnrealMcpTcpCommand({ type: "stop_play_in_editor", host: options.host, port: options.port, timeoutMs: options.timeoutMs });
|
|
14473
14488
|
}
|
|
@@ -14494,7 +14509,9 @@ Expected FriendlyName="Unreal MCP Plugin" CreatedBy="Respaced Inc."`
|
|
|
14494
14509
|
const bpName = `BP_Smoke_${Date.now()}`;
|
|
14495
14510
|
await types.sendUnrealMcpTcpCommand({
|
|
14496
14511
|
type: "create_blueprint",
|
|
14497
|
-
|
|
14512
|
+
// Important: pass only the name so the plugin's default (/Game/Blueprints/) is used.
|
|
14513
|
+
// The plugin's "compile_blueprint" name-only lookup searches /Game/Blueprints by design.
|
|
14514
|
+
params: { name: bpName, parent_class: "Actor" },
|
|
14498
14515
|
host: options.host,
|
|
14499
14516
|
port: options.port,
|
|
14500
14517
|
timeoutMs: Math.max(options.timeoutMs, 2e4)
|
|
@@ -14561,26 +14578,73 @@ async function runUnrealMcpMatrixSmoke(args) {
|
|
|
14561
14578
|
if (!engineRoot) continue;
|
|
14562
14579
|
console.log(chalk.bold(`== Engine: ${engineRoot} ==`));
|
|
14563
14580
|
if (doBuild) {
|
|
14564
|
-
|
|
14565
|
-
const
|
|
14566
|
-
|
|
14567
|
-
|
|
14568
|
-
|
|
14581
|
+
const enginePluginsDir = path.join(engineRoot, "Engine", "Plugins");
|
|
14582
|
+
const enginePluginDir = path.join(enginePluginsDir, "FlockbayMCP");
|
|
14583
|
+
const enginePluginUplugin = path.join(enginePluginDir, "FlockbayMCP.uplugin");
|
|
14584
|
+
const enginePluginHasBinaries = fs.existsSync(path.join(enginePluginDir, "Binaries"));
|
|
14585
|
+
const projectUprojectPath = project ? path.resolve(project) : null;
|
|
14586
|
+
if (fs.existsSync(enginePluginUplugin) && enginePluginHasBinaries) {
|
|
14587
|
+
console.log(chalk.green(`Build: engine plugin already installed + built (${enginePluginDir})`));
|
|
14588
|
+
} else if (canWriteDir(enginePluginsDir)) {
|
|
14589
|
+
console.log(chalk.cyan("Build: installing Flockbay MCP plugin sources into the engine (folder: FlockbayMCP)..."));
|
|
14590
|
+
const installed = types.installUnrealMcpPluginToEngine(engineRoot);
|
|
14591
|
+
if (!installed.ok) {
|
|
14592
|
+
failures.push({ engineRoot, phase: "build", error: installed.errorMessage });
|
|
14593
|
+
console.log(chalk.red(`Build: failed (install)
|
|
14569
14594
|
${installed.errorMessage}
|
|
14570
14595
|
`));
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14578
|
-
|
|
14596
|
+
if (!doRuntime) continue;
|
|
14597
|
+
} else {
|
|
14598
|
+
console.log(chalk.green(`Build: sources installed to ${installed.destDir}`));
|
|
14599
|
+
console.log(chalk.cyan("Build: compiling plugin via RunUAT BuildPlugin..."));
|
|
14600
|
+
const built = await types.buildAndInstallUnrealMcpPlugin({ engineRoot, flockbayHomeDir: types.configuration.flockbayHomeDir });
|
|
14601
|
+
if (!built.ok) {
|
|
14602
|
+
failures.push({ engineRoot, phase: "build", error: built.errorMessage });
|
|
14603
|
+
console.log(chalk.red(`Build: failed
|
|
14579
14604
|
${built.errorMessage}
|
|
14580
14605
|
`));
|
|
14606
|
+
} else {
|
|
14607
|
+
console.log(chalk.green(`Build: ok (log: ${built.buildLogPath})`));
|
|
14608
|
+
}
|
|
14609
|
+
}
|
|
14610
|
+
} else if (projectUprojectPath) {
|
|
14611
|
+
console.log(chalk.cyan("Build: engine install not writable; installing plugin into the project instead..."));
|
|
14612
|
+
const installedProject = types.installUnrealMcpPluginToProject(projectUprojectPath);
|
|
14613
|
+
if (!installedProject.ok) {
|
|
14614
|
+
failures.push({ engineRoot, phase: "build", error: installedProject.errorMessage });
|
|
14615
|
+
console.log(chalk.red(`Build: failed (project install)
|
|
14616
|
+
${installedProject.errorMessage}
|
|
14617
|
+
`));
|
|
14618
|
+
if (!doRuntime) continue;
|
|
14581
14619
|
} else {
|
|
14582
|
-
console.log(chalk.green(`Build:
|
|
14620
|
+
console.log(chalk.green(`Build: sources installed to ${installedProject.destDir}`));
|
|
14621
|
+
console.log(chalk.cyan("Build: compiling plugin via RunUAT BuildPlugin..."));
|
|
14622
|
+
const built = await types.buildAndInstallUnrealMcpPlugin({
|
|
14623
|
+
engineRoot,
|
|
14624
|
+
flockbayHomeDir: types.configuration.flockbayHomeDir,
|
|
14625
|
+
pluginDir: installedProject.destDir
|
|
14626
|
+
});
|
|
14627
|
+
if (!built.ok) {
|
|
14628
|
+
failures.push({ engineRoot, phase: "build", error: built.errorMessage });
|
|
14629
|
+
console.log(chalk.red(`Build: failed
|
|
14630
|
+
${built.errorMessage}
|
|
14631
|
+
`));
|
|
14632
|
+
} else {
|
|
14633
|
+
console.log(chalk.green(`Build: ok (log: ${built.buildLogPath})`));
|
|
14634
|
+
}
|
|
14583
14635
|
}
|
|
14636
|
+
} else {
|
|
14637
|
+
const error = `Engine plugins folder is not writable:
|
|
14638
|
+
${enginePluginsDir}
|
|
14639
|
+
|
|
14640
|
+
Fix:
|
|
14641
|
+
- Re-run with --project "<path-to-your-project>.uproject" so we can install the plugin into the project (no admin), OR
|
|
14642
|
+
- Run the installer with Windows admin permissions.`;
|
|
14643
|
+
failures.push({ engineRoot, phase: "build", error });
|
|
14644
|
+
console.log(chalk.red(`Build: failed
|
|
14645
|
+
${error}
|
|
14646
|
+
`));
|
|
14647
|
+
if (!doRuntime) continue;
|
|
14584
14648
|
}
|
|
14585
14649
|
}
|
|
14586
14650
|
if (doRuntime) {
|
|
@@ -15039,7 +15103,7 @@ async function authAndSetupMachineIfNeeded() {
|
|
|
15039
15103
|
process.exit(1);
|
|
15040
15104
|
}
|
|
15041
15105
|
try {
|
|
15042
|
-
const { migrateUnrealMcpToFlockbayMcp } = await Promise.resolve().then(function () { return require('./migratePlugin-
|
|
15106
|
+
const { migrateUnrealMcpToFlockbayMcp } = await Promise.resolve().then(function () { return require('./migratePlugin-T0MOGk0T.cjs'); });
|
|
15043
15107
|
const result = migrateUnrealMcpToFlockbayMcp({
|
|
15044
15108
|
engineRoot,
|
|
15045
15109
|
projectUprojectPath: project || void 0,
|
|
@@ -15178,7 +15242,7 @@ ${engineRoot}`, {
|
|
|
15178
15242
|
} else if (subcommand === "codex") {
|
|
15179
15243
|
try {
|
|
15180
15244
|
await chdirToNearestUprojectRootIfPresent();
|
|
15181
|
-
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-
|
|
15245
|
+
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-Bx4E0ukk.cjs'); });
|
|
15182
15246
|
let startedBy = void 0;
|
|
15183
15247
|
let sessionId = void 0;
|
|
15184
15248
|
for (let i = 1; i < args.length; i++) {
|
|
@@ -15280,7 +15344,7 @@ ${engineRoot}`, {
|
|
|
15280
15344
|
}
|
|
15281
15345
|
try {
|
|
15282
15346
|
await chdirToNearestUprojectRootIfPresent();
|
|
15283
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
15347
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-xvROo10g.cjs'); });
|
|
15284
15348
|
let startedBy = void 0;
|
|
15285
15349
|
let sessionId = void 0;
|
|
15286
15350
|
for (let i = 1; i < args.length; i++) {
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('chalk');
|
|
4
|
-
require('./index-
|
|
5
|
-
require('./types-
|
|
4
|
+
require('./index-F8r81l86.cjs');
|
|
5
|
+
require('./types-wdJcHT5x.cjs');
|
|
6
6
|
require('zod');
|
|
7
7
|
require('node:child_process');
|
|
8
8
|
require('node:fs');
|
|
@@ -17,7 +17,6 @@ require('ink');
|
|
|
17
17
|
require('react');
|
|
18
18
|
require('node:url');
|
|
19
19
|
require('axios');
|
|
20
|
-
require('node:events');
|
|
21
20
|
require('socket.io-client');
|
|
22
21
|
require('child_process');
|
|
23
22
|
require('crypto');
|
|
@@ -35,6 +34,7 @@ require('fastify-type-provider-zod');
|
|
|
35
34
|
require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
36
35
|
require('node:http');
|
|
37
36
|
require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
37
|
+
require('node:events');
|
|
38
38
|
require('tweetnacl');
|
|
39
39
|
require('node:zlib');
|
|
40
40
|
require('url');
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'chalk';
|
|
2
|
-
import './index-
|
|
3
|
-
import './types-
|
|
2
|
+
import './index-B6WkRhlp.mjs';
|
|
3
|
+
import './types-D1UKSrkg.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'node:child_process';
|
|
6
6
|
import 'node:fs';
|
|
@@ -15,7 +15,6 @@ import 'ink';
|
|
|
15
15
|
import 'react';
|
|
16
16
|
import 'node:url';
|
|
17
17
|
import 'axios';
|
|
18
|
-
import 'node:events';
|
|
19
18
|
import 'socket.io-client';
|
|
20
19
|
import 'child_process';
|
|
21
20
|
import 'crypto';
|
|
@@ -33,6 +32,7 @@ import 'fastify-type-provider-zod';
|
|
|
33
32
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
34
33
|
import 'node:http';
|
|
35
34
|
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
35
|
+
import 'node:events';
|
|
36
36
|
import 'tweetnacl';
|
|
37
37
|
import 'node:zlib';
|
|
38
38
|
import 'url';
|
package/dist/lib.cjs
CHANGED
package/dist/lib.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-D1UKSrkg.mjs';
|
|
2
2
|
import 'axios';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:os';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs__default from 'node:fs';
|
|
2
2
|
import path__default from 'node:path';
|
|
3
|
-
import { i as installUnrealMcpPluginToEngine } from './types-
|
|
3
|
+
import { i as installUnrealMcpPluginToEngine } from './types-D1UKSrkg.mjs';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import 'node:os';
|
|
6
6
|
import 'node:events';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
2
2
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
3
|
-
import { l as logger, A as ApiClient, p as packageJson, c as configuration, r as readSettings, b as projectPath } from './types-
|
|
3
|
+
import { l as logger, A as ApiClient, p as packageJson, c as configuration, r as readSettings, b as projectPath } from './types-D1UKSrkg.mjs';
|
|
4
4
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
5
5
|
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -10,7 +10,7 @@ import fs__default from 'node:fs';
|
|
|
10
10
|
import os__default from 'node:os';
|
|
11
11
|
import path__default, { resolve, join } from 'node:path';
|
|
12
12
|
import { spawnSync } from 'node:child_process';
|
|
13
|
-
import { s as shouldCountToolCall, c as consumeToolQuota, f as formatQuotaDeniedReason, h as hashObject, e as enforceCliVersionPolicy, i as initialMachineMetadata, E as ElicitationHub, n as notifyDaemonSessionStarted, M as MessageQueue2, P as PLATFORM_SYSTEM_PROMPT, a as setLatestUserImages, w as withUserImagesMarker, r as registerKillSessionHandler, b as MessageBuffer, d as startFlockbayServer, g as buildProjectCapsule, t as trimIdent, j as autoFinalizeCoordinationWorkItem, k as detectScreenshotsForGate, l as applyCoordinationSideEffectsFromMcpToolResult, m as stopCaffeinate } from './index-
|
|
13
|
+
import { s as shouldCountToolCall, c as consumeToolQuota, f as formatQuotaDeniedReason, h as hashObject, e as enforceCliVersionPolicy, i as initialMachineMetadata, E as ElicitationHub, n as notifyDaemonSessionStarted, M as MessageQueue2, P as PLATFORM_SYSTEM_PROMPT, a as setLatestUserImages, w as withUserImagesMarker, r as registerKillSessionHandler, b as MessageBuffer, d as startFlockbayServer, g as buildProjectCapsule, t as trimIdent, j as autoFinalizeCoordinationWorkItem, k as detectScreenshotsForGate, l as applyCoordinationSideEffectsFromMcpToolResult, m as stopCaffeinate } from './index-B6WkRhlp.mjs';
|
|
14
14
|
import 'axios';
|
|
15
15
|
import 'node:events';
|
|
16
16
|
import 'socket.io-client';
|
|
@@ -2514,7 +2514,7 @@ Update: ${updateCommand}`);
|
|
|
2514
2514
|
}
|
|
2515
2515
|
const elicitationHub = new ElicitationHub();
|
|
2516
2516
|
const permissionHandler = new CodexPermissionHandler(session, { elicitationHub });
|
|
2517
|
-
await session.connectAndWait(
|
|
2517
|
+
await session.connectAndWait();
|
|
2518
2518
|
session.keepAlive(false, "remote");
|
|
2519
2519
|
try {
|
|
2520
2520
|
logger.debug(`[START] Reporting session ${response.id} to daemon`);
|