flockbay 0.10.45 → 0.10.47

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.
@@ -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-AsI7cuLg.cjs');
6
+ var types = require('./types-DUoq_qFJ.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');
@@ -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-CpdfIEVW.cjs', document.baseURI).href)));
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-0Arkr3mL.cjs', document.baseURI).href)));
1320
1320
  const __dirname$1 = path.join(__filename$1, "..");
1321
1321
  function getGlobalClaudeVersion(claudeExecutable) {
1322
1322
  try {
@@ -14054,8 +14054,11 @@ function recordIncludesNeedle(record, needle) {
14054
14054
  }
14055
14055
  }
14056
14056
  async function waitForMessage(opts) {
14057
- const { sessionClient, predicate, timeoutMs } = opts;
14057
+ const { sessionClient, predicate, timeoutMs, progressLabel } = opts;
14058
14058
  const deadline = Date.now() + timeoutMs;
14059
+ const startedAtMs = Date.now();
14060
+ const heartbeatMs = 1e4;
14061
+ let nextHeartbeatAtMs = startedAtMs + heartbeatMs;
14059
14062
  const existing = await sessionClient.listMessages().catch(() => []);
14060
14063
  for (const msg of existing) {
14061
14064
  const record = msg?.content;
@@ -14071,7 +14074,15 @@ async function waitForMessage(opts) {
14071
14074
  resolve(u?.body?.message);
14072
14075
  };
14073
14076
  const tick = () => {
14074
- if (Date.now() < deadline) return;
14077
+ const now = Date.now();
14078
+ if (now >= nextHeartbeatAtMs) {
14079
+ const elapsedSec = Math.max(0, Math.floor((now - startedAtMs) / 1e3));
14080
+ const remainingSec = Math.max(0, Math.ceil((deadline - now) / 1e3));
14081
+ const label = progressLabel ? ` (${progressLabel})` : "";
14082
+ console.log(chalk.gray(` \u2026 waiting for agent reply${label} (${elapsedSec}s elapsed, ${remainingSec}s left)`));
14083
+ nextHeartbeatAtMs = now + heartbeatMs;
14084
+ }
14085
+ if (now < deadline) return;
14075
14086
  cleanup();
14076
14087
  reject(new Error("timeout_waiting_for_message"));
14077
14088
  };
@@ -14241,7 +14252,8 @@ Update: ${updateCommand}`);
14241
14252
  await waitForMessage({
14242
14253
  sessionClient,
14243
14254
  predicate: (r) => isAgentRecord(r) && recordIncludesNeedle(r, token),
14244
- timeoutMs
14255
+ timeoutMs,
14256
+ progressLabel: `${agent}:basic-message`
14245
14257
  });
14246
14258
  }));
14247
14259
  scenarios.push(await runScenario("tool-search", async () => {
@@ -14260,7 +14272,8 @@ Update: ${updateCommand}`);
14260
14272
  await waitForMessage({
14261
14273
  sessionClient,
14262
14274
  predicate: (r) => isAgentRecord(r) && recordIncludesNeedle(r, `SMOKE_SECRET=${secret}`) && recordIncludesNeedle(r, token),
14263
- timeoutMs
14275
+ timeoutMs,
14276
+ progressLabel: `${agent}:tool-search`
14264
14277
  });
14265
14278
  }));
14266
14279
  scenarios.push(await runScenario("image-attachment", async () => {
@@ -14278,7 +14291,8 @@ Update: ${updateCommand}`);
14278
14291
  const msg = await waitForMessage({
14279
14292
  sessionClient,
14280
14293
  predicate: (r) => isAgentRecord(r) && (recordIncludesNeedle(r, token) || agent === "codex" && recordIncludesNeedle(r, "image-attachment-missing") || recordIncludesNeedle(r, "Could not process image") || recordIncludesNeedle(r, "messages.") || recordIncludesNeedle(r, "invalid_request_error")),
14281
- timeoutMs
14294
+ timeoutMs,
14295
+ progressLabel: `${agent}:image-attachment`
14282
14296
  });
14283
14297
  const record = msg?.content;
14284
14298
  if (agent === "codex" && recordIncludesNeedle(record, "image-attachment-missing")) {
@@ -15139,7 +15153,7 @@ async function authAndSetupMachineIfNeeded() {
15139
15153
  process.exit(1);
15140
15154
  }
15141
15155
  try {
15142
- const { migrateUnrealMcpToFlockbayMcp } = await Promise.resolve().then(function () { return require('./migratePlugin--pdww8Jg.cjs'); });
15156
+ const { migrateUnrealMcpToFlockbayMcp } = await Promise.resolve().then(function () { return require('./migratePlugin-Bd4y5ID_.cjs'); });
15143
15157
  const result = migrateUnrealMcpToFlockbayMcp({
15144
15158
  engineRoot,
15145
15159
  projectUprojectPath: project || void 0,
@@ -15278,7 +15292,7 @@ ${engineRoot}`, {
15278
15292
  } else if (subcommand === "codex") {
15279
15293
  try {
15280
15294
  await chdirToNearestUprojectRootIfPresent();
15281
- const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-t2FSXDl4.cjs'); });
15295
+ const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-EHn5VQcY.cjs'); });
15282
15296
  let startedBy = void 0;
15283
15297
  let sessionId = void 0;
15284
15298
  for (let i = 1; i < args.length; i++) {
@@ -15380,7 +15394,7 @@ ${engineRoot}`, {
15380
15394
  }
15381
15395
  try {
15382
15396
  await chdirToNearestUprojectRootIfPresent();
15383
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-D__vNNGK.cjs'); });
15397
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DLUQln_I.cjs'); });
15384
15398
  let startedBy = void 0;
15385
15399
  let sessionId = void 0;
15386
15400
  for (let i = 1; i < args.length; i++) {
@@ -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 installUnrealMcpPluginToProject, I as getLatestDaemonLog, J as normalizeServerUrlForNode } from './types-Cq5rjOkx.mjs';
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-e5yrDcQZ.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';
@@ -14032,8 +14032,11 @@ function recordIncludesNeedle(record, needle) {
14032
14032
  }
14033
14033
  }
14034
14034
  async function waitForMessage(opts) {
14035
- const { sessionClient, predicate, timeoutMs } = opts;
14035
+ const { sessionClient, predicate, timeoutMs, progressLabel } = opts;
14036
14036
  const deadline = Date.now() + timeoutMs;
14037
+ const startedAtMs = Date.now();
14038
+ const heartbeatMs = 1e4;
14039
+ let nextHeartbeatAtMs = startedAtMs + heartbeatMs;
14037
14040
  const existing = await sessionClient.listMessages().catch(() => []);
14038
14041
  for (const msg of existing) {
14039
14042
  const record = msg?.content;
@@ -14049,7 +14052,15 @@ async function waitForMessage(opts) {
14049
14052
  resolve(u?.body?.message);
14050
14053
  };
14051
14054
  const tick = () => {
14052
- if (Date.now() < deadline) return;
14055
+ const now = Date.now();
14056
+ if (now >= nextHeartbeatAtMs) {
14057
+ const elapsedSec = Math.max(0, Math.floor((now - startedAtMs) / 1e3));
14058
+ const remainingSec = Math.max(0, Math.ceil((deadline - now) / 1e3));
14059
+ const label = progressLabel ? ` (${progressLabel})` : "";
14060
+ console.log(chalk.gray(` \u2026 waiting for agent reply${label} (${elapsedSec}s elapsed, ${remainingSec}s left)`));
14061
+ nextHeartbeatAtMs = now + heartbeatMs;
14062
+ }
14063
+ if (now < deadline) return;
14053
14064
  cleanup();
14054
14065
  reject(new Error("timeout_waiting_for_message"));
14055
14066
  };
@@ -14219,7 +14230,8 @@ Update: ${updateCommand}`);
14219
14230
  await waitForMessage({
14220
14231
  sessionClient,
14221
14232
  predicate: (r) => isAgentRecord(r) && recordIncludesNeedle(r, token),
14222
- timeoutMs
14233
+ timeoutMs,
14234
+ progressLabel: `${agent}:basic-message`
14223
14235
  });
14224
14236
  }));
14225
14237
  scenarios.push(await runScenario("tool-search", async () => {
@@ -14238,7 +14250,8 @@ Update: ${updateCommand}`);
14238
14250
  await waitForMessage({
14239
14251
  sessionClient,
14240
14252
  predicate: (r) => isAgentRecord(r) && recordIncludesNeedle(r, `SMOKE_SECRET=${secret}`) && recordIncludesNeedle(r, token),
14241
- timeoutMs
14253
+ timeoutMs,
14254
+ progressLabel: `${agent}:tool-search`
14242
14255
  });
14243
14256
  }));
14244
14257
  scenarios.push(await runScenario("image-attachment", async () => {
@@ -14256,7 +14269,8 @@ Update: ${updateCommand}`);
14256
14269
  const msg = await waitForMessage({
14257
14270
  sessionClient,
14258
14271
  predicate: (r) => isAgentRecord(r) && (recordIncludesNeedle(r, token) || agent === "codex" && recordIncludesNeedle(r, "image-attachment-missing") || recordIncludesNeedle(r, "Could not process image") || recordIncludesNeedle(r, "messages.") || recordIncludesNeedle(r, "invalid_request_error")),
14259
- timeoutMs
14272
+ timeoutMs,
14273
+ progressLabel: `${agent}:image-attachment`
14260
14274
  });
14261
14275
  const record = msg?.content;
14262
14276
  if (agent === "codex" && recordIncludesNeedle(record, "image-attachment-missing")) {
@@ -15117,7 +15131,7 @@ async function authAndSetupMachineIfNeeded() {
15117
15131
  process.exit(1);
15118
15132
  }
15119
15133
  try {
15120
- const { migrateUnrealMcpToFlockbayMcp } = await import('./migratePlugin-JesDYgpP.mjs');
15134
+ const { migrateUnrealMcpToFlockbayMcp } = await import('./migratePlugin-9YalMg61.mjs');
15121
15135
  const result = migrateUnrealMcpToFlockbayMcp({
15122
15136
  engineRoot,
15123
15137
  projectUprojectPath: project || void 0,
@@ -15256,7 +15270,7 @@ ${engineRoot}`, {
15256
15270
  } else if (subcommand === "codex") {
15257
15271
  try {
15258
15272
  await chdirToNearestUprojectRootIfPresent();
15259
- const { runCodex } = await import('./runCodex-DeNgXSEc.mjs');
15273
+ const { runCodex } = await import('./runCodex-Ck-v-SW_.mjs');
15260
15274
  let startedBy = void 0;
15261
15275
  let sessionId = void 0;
15262
15276
  for (let i = 1; i < args.length; i++) {
@@ -15358,7 +15372,7 @@ ${engineRoot}`, {
15358
15372
  }
15359
15373
  try {
15360
15374
  await chdirToNearestUprojectRootIfPresent();
15361
- const { runGemini } = await import('./runGemini-X5dTcwGa.mjs');
15375
+ const { runGemini } = await import('./runGemini-CTyWoAvM.mjs');
15362
15376
  let startedBy = void 0;
15363
15377
  let sessionId = void 0;
15364
15378
  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-CpdfIEVW.cjs');
5
- require('./types-AsI7cuLg.cjs');
4
+ require('./index-0Arkr3mL.cjs');
5
+ require('./types-DUoq_qFJ.cjs');
6
6
  require('zod');
7
7
  require('node:child_process');
8
8
  require('node:fs');
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'chalk';
2
- import './index-BRx_RPRT.mjs';
3
- import './types-Cq5rjOkx.mjs';
2
+ import './index-BWNZJMIV.mjs';
3
+ import './types-e5yrDcQZ.mjs';
4
4
  import 'zod';
5
5
  import 'node:child_process';
6
6
  import 'node:fs';
package/dist/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var types = require('./types-AsI7cuLg.cjs');
3
+ var types = require('./types-DUoq_qFJ.cjs');
4
4
  require('axios');
5
5
  require('node:fs');
6
6
  require('node:os');
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-Cq5rjOkx.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-e5yrDcQZ.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-Cq5rjOkx.mjs';
3
+ import { i as installUnrealMcpPluginToEngine } from './types-e5yrDcQZ.mjs';
4
4
  import 'axios';
5
5
  import 'node:os';
6
6
  import 'node:events';
@@ -2,7 +2,7 @@
2
2
 
3
3
  var fs = require('node:fs');
4
4
  var path = require('node:path');
5
- var types = require('./types-AsI7cuLg.cjs');
5
+ var types = require('./types-DUoq_qFJ.cjs');
6
6
  require('axios');
7
7
  require('node:os');
8
8
  require('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-Cq5rjOkx.mjs';
3
+ import { l as logger, A as ApiClient, p as packageJson, c as configuration, r as readSettings, b as projectPath } from './types-e5yrDcQZ.mjs';
4
4
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
5
5
  import { z } from 'zod';
6
6
  import { ElicitRequestSchema } from '@modelcontextprotocol/sdk/types.js';
@@ -14,7 +14,7 @@ import process$1 from 'node:process';
14
14
  import { PassThrough } from 'node:stream';
15
15
  import { getDefaultEnvironment } from '@modelcontextprotocol/sdk/client/stdio.js';
16
16
  import { ReadBuffer, serializeMessage } from '@modelcontextprotocol/sdk/shared/stdio.js';
17
- 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-BRx_RPRT.mjs';
17
+ 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-BWNZJMIV.mjs';
18
18
  import 'axios';
19
19
  import 'node:events';
20
20
  import 'socket.io-client';
@@ -2339,16 +2339,25 @@ function parseEffortSuffix(model) {
2339
2339
  if (m.endsWith("-high")) return "high";
2340
2340
  return null;
2341
2341
  }
2342
+ function parseCodexModelTarget(model) {
2343
+ const trimmed = String(model || "").trim();
2344
+ if (!trimmed) return null;
2345
+ if (trimmed.startsWith("gpt-5.3-codex-")) return "gpt-5.3-codex";
2346
+ if (trimmed === "gpt-5-minimal" || trimmed === "gpt-5-low" || trimmed === "gpt-5-medium" || trimmed === "gpt-5-high" || trimmed.startsWith("gpt-5-codex-")) {
2347
+ return "gpt-5.2";
2348
+ }
2349
+ return null;
2350
+ }
2342
2351
  function resolveCodexModelOverride(rawModel) {
2343
2352
  const model = typeof rawModel === "string" ? rawModel.trim() : "";
2344
2353
  if (!model) return {};
2345
2354
  const effort = parseEffortSuffix(model);
2346
- const isFlockbayModelModeToken = model === "gpt-5-minimal" || model === "gpt-5-low" || model === "gpt-5-medium" || model === "gpt-5-high" || model.startsWith("gpt-5-codex-");
2347
- if (isFlockbayModelModeToken) {
2355
+ const codexModelTarget = parseCodexModelTarget(model);
2356
+ if (codexModelTarget) {
2348
2357
  const nextEffort = effort ?? "medium";
2349
2358
  return {
2350
2359
  config: {
2351
- model: "gpt-5.2",
2360
+ model: codexModelTarget,
2352
2361
  model_reasoning_effort: nextEffort
2353
2362
  }
2354
2363
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  var ink = require('ink');
4
4
  var React = require('react');
5
- var types = require('./types-AsI7cuLg.cjs');
5
+ var types = require('./types-DUoq_qFJ.cjs');
6
6
  var index_js = require('@modelcontextprotocol/sdk/client/index.js');
7
7
  var z = require('zod');
8
8
  var types_js = require('@modelcontextprotocol/sdk/types.js');
@@ -16,7 +16,7 @@ var process$1 = require('node:process');
16
16
  var node_stream = require('node:stream');
17
17
  var stdio_js$1 = require('@modelcontextprotocol/sdk/client/stdio.js');
18
18
  var stdio_js = require('@modelcontextprotocol/sdk/shared/stdio.js');
19
- var index = require('./index-CpdfIEVW.cjs');
19
+ var index = require('./index-0Arkr3mL.cjs');
20
20
  require('axios');
21
21
  require('node:events');
22
22
  require('socket.io-client');
@@ -2341,16 +2341,25 @@ function parseEffortSuffix(model) {
2341
2341
  if (m.endsWith("-high")) return "high";
2342
2342
  return null;
2343
2343
  }
2344
+ function parseCodexModelTarget(model) {
2345
+ const trimmed = String(model || "").trim();
2346
+ if (!trimmed) return null;
2347
+ if (trimmed.startsWith("gpt-5.3-codex-")) return "gpt-5.3-codex";
2348
+ if (trimmed === "gpt-5-minimal" || trimmed === "gpt-5-low" || trimmed === "gpt-5-medium" || trimmed === "gpt-5-high" || trimmed.startsWith("gpt-5-codex-")) {
2349
+ return "gpt-5.2";
2350
+ }
2351
+ return null;
2352
+ }
2344
2353
  function resolveCodexModelOverride(rawModel) {
2345
2354
  const model = typeof rawModel === "string" ? rawModel.trim() : "";
2346
2355
  if (!model) return {};
2347
2356
  const effort = parseEffortSuffix(model);
2348
- const isFlockbayModelModeToken = model === "gpt-5-minimal" || model === "gpt-5-low" || model === "gpt-5-medium" || model === "gpt-5-high" || model.startsWith("gpt-5-codex-");
2349
- if (isFlockbayModelModeToken) {
2357
+ const codexModelTarget = parseCodexModelTarget(model);
2358
+ if (codexModelTarget) {
2350
2359
  const nextEffort = effort ?? "medium";
2351
2360
  return {
2352
2361
  config: {
2353
- model: "gpt-5.2",
2362
+ model: codexModelTarget,
2354
2363
  model_reasoning_effort: nextEffort
2355
2364
  }
2356
2365
  };
@@ -4,8 +4,8 @@ import { randomUUID, createHash } from 'node:crypto';
4
4
  import os__default from 'node:os';
5
5
  import path__default, { resolve, join as join$1, basename } from 'node:path';
6
6
  import { mkdir, writeFile, readFile } from 'node:fs/promises';
7
- import { l as logger, p as packageJson, A as ApiClient, c as configuration, r as readSettings, b as projectPath } from './types-Cq5rjOkx.mjs';
8
- import { s as shouldCountToolCall, c as consumeToolQuota, f as formatQuotaDeniedReason, h as hashObject, e as enforceCliVersionPolicy, i as initialMachineMetadata, n as notifyDaemonSessionStarted, M as MessageQueue2, g as buildProjectCapsule, a as setLatestUserImages, b as MessageBuffer, w as withUserImagesMarker, r as registerKillSessionHandler, d as startFlockbayServer, o as extractUserImagesMarker, p as getLatestUserImages, P as PLATFORM_SYSTEM_PROMPT, j as autoFinalizeCoordinationWorkItem, E as ElicitationHub, k as detectScreenshotsForGate, m as stopCaffeinate } from './index-BRx_RPRT.mjs';
7
+ import { l as logger, p as packageJson, A as ApiClient, c as configuration, r as readSettings, b as projectPath } from './types-e5yrDcQZ.mjs';
8
+ import { s as shouldCountToolCall, c as consumeToolQuota, f as formatQuotaDeniedReason, h as hashObject, e as enforceCliVersionPolicy, i as initialMachineMetadata, n as notifyDaemonSessionStarted, M as MessageQueue2, g as buildProjectCapsule, a as setLatestUserImages, b as MessageBuffer, w as withUserImagesMarker, r as registerKillSessionHandler, d as startFlockbayServer, o as extractUserImagesMarker, p as getLatestUserImages, P as PLATFORM_SYSTEM_PROMPT, j as autoFinalizeCoordinationWorkItem, E as ElicitationHub, k as detectScreenshotsForGate, m as stopCaffeinate } from './index-BWNZJMIV.mjs';
9
9
  import { spawn, spawnSync } from 'node:child_process';
10
10
  import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
11
11
  import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
@@ -6,8 +6,8 @@ var node_crypto = require('node:crypto');
6
6
  var os = require('node:os');
7
7
  var path = require('node:path');
8
8
  var fs$2 = require('node:fs/promises');
9
- var types = require('./types-AsI7cuLg.cjs');
10
- var index = require('./index-CpdfIEVW.cjs');
9
+ var types = require('./types-DUoq_qFJ.cjs');
10
+ var index = require('./index-0Arkr3mL.cjs');
11
11
  var node_child_process = require('node:child_process');
12
12
  var sdk = require('@agentclientprotocol/sdk');
13
13
  var fs = require('fs');
@@ -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.45";
47
+ var version = "0.10.47";
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-AsI7cuLg.cjs', document.baseURI).href))));
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-DUoq_qFJ.cjs', document.baseURI).href))));
836
836
  function projectPath() {
837
837
  const path = path$1.resolve(__dirname$1, "..");
838
838
  return path;
@@ -3836,7 +3836,7 @@ exitCode: ${exitCode}
3836
3836
  buildLogPath,
3837
3837
  errorMessage: `Failed to build the Flockbay MCP plugin.
3838
3838
  Log: ${buildLogPath}
3839
- Make sure your compiler tools are installed (Xcode on macOS, Visual Studio Build Tools on Windows).`
3839
+ Open the log to see the exact failure (missing compiler toolchain vs plugin compile errors).`
3840
3840
  };
3841
3841
  }
3842
3842
  const resolved = resolvePackagedPluginDir(packageDir);
@@ -23,7 +23,7 @@ import { createServer } from 'http';
23
23
  import open$2 from 'open';
24
24
 
25
25
  var name = "flockbay";
26
- var version = "0.10.45";
26
+ var version = "0.10.47";
27
27
  var description = "Flockbay CLI (local agent + daemon)";
28
28
  var author = "Eduardo Orellana";
29
29
  var license = "UNLICENSED";
@@ -3815,7 +3815,7 @@ exitCode: ${exitCode}
3815
3815
  buildLogPath,
3816
3816
  errorMessage: `Failed to build the Flockbay MCP plugin.
3817
3817
  Log: ${buildLogPath}
3818
- Make sure your compiler tools are installed (Xcode on macOS, Visual Studio Build Tools on Windows).`
3818
+ Open the log to see the exact failure (missing compiler toolchain vs plugin compile errors).`
3819
3819
  };
3820
3820
  }
3821
3821
  const resolved = resolvePackagedPluginDir(packageDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flockbay",
3
- "version": "0.10.45",
3
+ "version": "0.10.47",
4
4
  "description": "Flockbay CLI (local agent + daemon)",
5
5
  "author": "Eduardo Orellana",
6
6
  "license": "UNLICENSED",
@@ -16,6 +16,7 @@
16
16
  #include "Engine/SCS_Node.h"
17
17
  #include "UObject/Field.h"
18
18
  #include "UObject/FieldPath.h"
19
+ #include "UObject/UObjectGlobals.h"
19
20
  #include "EditorAssetLibrary.h"
20
21
  #include "AssetRegistry/AssetRegistryModule.h"
21
22
  #include "MessageLogModule.h"
@@ -23,6 +24,20 @@
23
24
  #include "GameFramework/Actor.h"
24
25
  #include "GameFramework/Pawn.h"
25
26
 
27
+ static UClass* FindMcpClassByName(const TCHAR* ClassName)
28
+ {
29
+ #if defined(ANY_PACKAGE)
30
+ return FindObject<UClass>(ANY_PACKAGE, ClassName);
31
+ #else
32
+ return FindFirstObject<UClass>(ClassName);
33
+ #endif
34
+ }
35
+
36
+ static UClass* FindMcpClassByName(const FString& ClassName)
37
+ {
38
+ return FindMcpClassByName(*ClassName);
39
+ }
40
+
26
41
  FUnrealMCPBlueprintCommands::FUnrealMCPBlueprintCommands()
27
42
  {
28
43
  }
@@ -249,26 +264,26 @@ TSharedPtr<FJsonObject> FUnrealMCPBlueprintCommands::HandleAddComponentToBluepri
249
264
  UClass* ComponentClass = nullptr;
250
265
 
251
266
  // Try to find the class with exact name first
252
- ComponentClass = FindObject<UClass>(ANY_PACKAGE, *ComponentType);
267
+ ComponentClass = FindMcpClassByName(ComponentType);
253
268
 
254
269
  // If not found, try with "Component" suffix
255
270
  if (!ComponentClass && !ComponentType.EndsWith(TEXT("Component")))
256
271
  {
257
272
  FString ComponentTypeWithSuffix = ComponentType + TEXT("Component");
258
- ComponentClass = FindObject<UClass>(ANY_PACKAGE, *ComponentTypeWithSuffix);
273
+ ComponentClass = FindMcpClassByName(ComponentTypeWithSuffix);
259
274
  }
260
275
 
261
276
  // If still not found, try with "U" prefix
262
277
  if (!ComponentClass && !ComponentType.StartsWith(TEXT("U")))
263
278
  {
264
279
  FString ComponentTypeWithPrefix = TEXT("U") + ComponentType;
265
- ComponentClass = FindObject<UClass>(ANY_PACKAGE, *ComponentTypeWithPrefix);
280
+ ComponentClass = FindMcpClassByName(ComponentTypeWithPrefix);
266
281
 
267
282
  // Try with both prefix and suffix
268
283
  if (!ComponentClass && !ComponentType.EndsWith(TEXT("Component")))
269
284
  {
270
285
  FString ComponentTypeWithBoth = TEXT("U") + ComponentType + TEXT("Component");
271
- ComponentClass = FindObject<UClass>(ANY_PACKAGE, *ComponentTypeWithBoth);
286
+ ComponentClass = FindMcpClassByName(ComponentTypeWithBoth);
272
287
  }
273
288
  }
274
289
 
@@ -17,11 +17,26 @@
17
17
  #include "Kismet/GameplayStatics.h"
18
18
  #include "EdGraphSchema_K2.h"
19
19
  #include "UObject/UObjectIterator.h"
20
+ #include "UObject/UObjectGlobals.h"
20
21
  #include "Kismet/BlueprintFunctionLibrary.h"
21
22
 
22
23
  // Declare the log category
23
24
  DEFINE_LOG_CATEGORY_STATIC(LogUnrealMCP, Log, All);
24
25
 
26
+ static UClass* FindMcpClassByName(const TCHAR* ClassName)
27
+ {
28
+ #if defined(ANY_PACKAGE)
29
+ return FindObject<UClass>(ANY_PACKAGE, ClassName);
30
+ #else
31
+ return FindFirstObject<UClass>(ClassName);
32
+ #endif
33
+ }
34
+
35
+ static UClass* FindMcpClassByName(const FString& ClassName)
36
+ {
37
+ return FindMcpClassByName(*ClassName);
38
+ }
39
+
25
40
  FUnrealMCPBlueprintNodeCommands::FUnrealMCPBlueprintNodeCommands()
26
41
  {
27
42
  }
@@ -413,7 +428,7 @@ TSharedPtr<FJsonObject> FUnrealMCPBlueprintNodeCommands::HandleAddBlueprintFunct
413
428
  UClass* TargetClass = nullptr;
414
429
 
415
430
  // First try without a prefix
416
- TargetClass = FindObject<UClass>(ANY_PACKAGE, *Target);
431
+ TargetClass = FindMcpClassByName(Target);
417
432
  UE_LOG(LogTemp, Display, TEXT("Tried to find class '%s': %s"),
418
433
  *Target, TargetClass ? TEXT("Found") : TEXT("Not found"));
419
434
 
@@ -421,7 +436,7 @@ TSharedPtr<FJsonObject> FUnrealMCPBlueprintNodeCommands::HandleAddBlueprintFunct
421
436
  if (!TargetClass && !Target.StartsWith(TEXT("U")))
422
437
  {
423
438
  FString TargetWithPrefix = FString(TEXT("U")) + Target;
424
- TargetClass = FindObject<UClass>(ANY_PACKAGE, *TargetWithPrefix);
439
+ TargetClass = FindMcpClassByName(TargetWithPrefix);
425
440
  UE_LOG(LogTemp, Display, TEXT("Tried to find class '%s': %s"),
426
441
  *TargetWithPrefix, TargetClass ? TEXT("Found") : TEXT("Not found"));
427
442
  }
@@ -436,7 +451,7 @@ TSharedPtr<FJsonObject> FUnrealMCPBlueprintNodeCommands::HandleAddBlueprintFunct
436
451
 
437
452
  for (const FString& ClassName : PossibleClassNames)
438
453
  {
439
- TargetClass = FindObject<UClass>(ANY_PACKAGE, *ClassName);
454
+ TargetClass = FindMcpClassByName(ClassName);
440
455
  if (TargetClass)
441
456
  {
442
457
  UE_LOG(LogTemp, Display, TEXT("Found class using alternative name '%s'"), *ClassName);
@@ -449,7 +464,7 @@ TSharedPtr<FJsonObject> FUnrealMCPBlueprintNodeCommands::HandleAddBlueprintFunct
449
464
  if (!TargetClass && Target == TEXT("UGameplayStatics"))
450
465
  {
451
466
  // For UGameplayStatics, use a direct reference to known class
452
- TargetClass = FindObject<UClass>(ANY_PACKAGE, TEXT("UGameplayStatics"));
467
+ TargetClass = FindMcpClassByName(TEXT("UGameplayStatics"));
453
468
  if (!TargetClass)
454
469
  {
455
470
  // Try loading it from its known package
@@ -594,7 +609,7 @@ TSharedPtr<FJsonObject> FUnrealMCPBlueprintNodeCommands::HandleAddBlueprintFunct
594
609
  const FString& ClassName = StringVal;
595
610
 
596
611
  // TODO: This likely won't work in UE5.5+, so don't rely on it.
597
- UClass* Class = FindObject<UClass>(ANY_PACKAGE, *ClassName);
612
+ UClass* Class = FindMcpClassByName(ClassName);
598
613
 
599
614
  if (!Class)
600
615
  {
@@ -796,18 +811,18 @@ static UClass* ResolveClassBestEffort(const FString& Target)
796
811
  return LoadObject<UClass>(nullptr, *T);
797
812
  }
798
813
 
799
- UClass* Found = FindObject<UClass>(ANY_PACKAGE, *T);
814
+ UClass* Found = FindMcpClassByName(T);
800
815
  if (!Found && !T.StartsWith(TEXT("U")))
801
816
  {
802
- Found = FindObject<UClass>(ANY_PACKAGE, *(FString(TEXT("U")) + T));
817
+ Found = FindMcpClassByName(FString(TEXT("U")) + T);
803
818
  }
804
819
  if (!Found && !T.EndsWith(TEXT("Library")))
805
820
  {
806
- Found = FindObject<UClass>(ANY_PACKAGE, *(FString(TEXT("U")) + T + TEXT("Library")));
821
+ Found = FindMcpClassByName(FString(TEXT("U")) + T + TEXT("Library"));
807
822
  }
808
823
  if (!Found && !T.EndsWith(TEXT("Component")))
809
824
  {
810
- Found = FindObject<UClass>(ANY_PACKAGE, *(FString(TEXT("U")) + T + TEXT("Component")));
825
+ Found = FindMcpClassByName(FString(TEXT("U")) + T + TEXT("Component"));
811
826
  }
812
827
  return Found;
813
828
  }
@@ -44,6 +44,7 @@
44
44
  #include "AssetRegistry/AssetRegistryModule.h"
45
45
  #include "UObject/SoftObjectPath.h"
46
46
  #include "UObject/Package.h"
47
+ #include "UObject/UObjectGlobals.h"
47
48
  #include "FileHelpers.h"
48
49
  #include "MessageLogModule.h"
49
50
  #include "IMessageLogListing.h"
@@ -56,6 +57,20 @@
56
57
  #include "Components/SceneCaptureComponent2D.h"
57
58
  #include "Engine/TextureRenderTarget2D.h"
58
59
 
60
+ static UClass* FindMcpClassByName(const TCHAR* ClassName)
61
+ {
62
+ #if defined(ANY_PACKAGE)
63
+ return FindObject<UClass>(ANY_PACKAGE, ClassName);
64
+ #else
65
+ return FindFirstObject<UClass>(ClassName);
66
+ #endif
67
+ }
68
+
69
+ static UClass* FindMcpClassByName(const FString& ClassName)
70
+ {
71
+ return FindMcpClassByName(*ClassName);
72
+ }
73
+
59
74
  static bool SavePngToFile(const FString& FilePath, int32 Width, int32 Height, TArray<FColor>& Bitmap)
60
75
  {
61
76
  IImageWrapperModule& ImageWrapperModule = FModuleManager::LoadModuleChecked<IImageWrapperModule>(FName("ImageWrapper"));
@@ -560,10 +575,10 @@ static bool TryResolveAssetClassFilter(const TSharedPtr<FJsonObject>& Params, FA
560
575
  }
561
576
  else
562
577
  {
563
- Class = FindObject<UClass>(ANY_PACKAGE, *ClassName);
578
+ Class = FindMcpClassByName(ClassName);
564
579
  if (!Class && !ClassName.StartsWith(TEXT("U")))
565
580
  {
566
- Class = FindObject<UClass>(ANY_PACKAGE, *(TEXT("U") + ClassName));
581
+ Class = FindMcpClassByName(TEXT("U") + ClassName);
567
582
  }
568
583
  }
569
584
 
@@ -12,7 +12,7 @@
12
12
  #include "HAL/PlatformTime.h"
13
13
 
14
14
  // Buffer size for receiving data
15
- const int32 BufferSize = 8192;
15
+ const int32 RecvBufferSizeBytes = 8192;
16
16
 
17
17
  static bool SendAll(FSocket* Socket, const uint8* Data, int32 TotalBytes, int32& OutTotalBytesSent)
18
18
  {
@@ -102,7 +102,7 @@ uint32 FMCPServerRunnable::Run()
102
102
  ClientSocket->SetSendBufferSize(SocketBufferSize, SocketBufferSize);
103
103
  ClientSocket->SetReceiveBufferSize(SocketBufferSize, SocketBufferSize);
104
104
 
105
- uint8 Buffer[8192 + 1];
105
+ uint8 Buffer[RecvBufferSizeBytes + 1];
106
106
  while (bRunning)
107
107
  {
108
108
  int32 BytesRead = 0;
@@ -116,7 +116,7 @@ uint32 FMCPServerRunnable::Run()
116
116
 
117
117
  // Convert received data to string
118
118
  // Null-terminate safely (Recv can fill the entire buffer).
119
- const int32 SafeIndex = FMath::Clamp(BytesRead, 0, 8192);
119
+ const int32 SafeIndex = FMath::Clamp(BytesRead, 0, RecvBufferSizeBytes);
120
120
  Buffer[SafeIndex] = '\0';
121
121
  FString ReceivedText = UTF8_TO_TCHAR(Buffer);
122
122
  UE_LOG(LogTemp, Display, TEXT("MCPServerRunnable: Received: %s"), *ReceivedText);