flockbay 0.10.55 → 0.10.56

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-reygbXgh.cjs');
6
+ var types = require('./types-mdNlgF2l.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');
@@ -1324,7 +1324,7 @@ function buildDaemonSafeEnv(baseEnv, binPath) {
1324
1324
  env[pathKey] = [...prepend, ...existingParts].join(pathSep);
1325
1325
  return env;
1326
1326
  }
1327
- 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-BDpihows.cjs', document.baseURI).href)));
1327
+ 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-BvAn9mzP.cjs', document.baseURI).href)));
1328
1328
  const __dirname$1 = path.join(__filename$1, "..");
1329
1329
  function getGlobalClaudeVersion(claudeExecutable) {
1330
1330
  try {
@@ -12968,14 +12968,22 @@ Fix: ${res.hint}` : "";
12968
12968
  isError: false
12969
12969
  };
12970
12970
  }));
12971
- const transport = new streamableHttp_js.StreamableHTTPServerTransport({
12972
- // NOTE: Returning session id here will result in claude
12973
- // sdk spawn to fail with `Invalid Request: Server already initialized`
12974
- sessionIdGenerator: void 0
12975
- });
12976
- await mcp.connect(transport);
12971
+ const activeHttpTransports = /* @__PURE__ */ new Set();
12977
12972
  const server = node_http.createServer(async (req, res) => {
12973
+ const transport = new streamableHttp_js.StreamableHTTPServerTransport({
12974
+ // Keep the local MCP endpoint stateless. The SDK recommends creating a
12975
+ // fresh transport per request for streamable HTTP when session management
12976
+ // is disabled; this avoids shared request/stream state across tool calls.
12977
+ sessionIdGenerator: void 0,
12978
+ enableJsonResponse: true
12979
+ });
12980
+ activeHttpTransports.add(transport);
12981
+ res.on("close", () => {
12982
+ activeHttpTransports.delete(transport);
12983
+ void transport.close().catch(() => void 0);
12984
+ });
12978
12985
  try {
12986
+ await mcp.connect(transport);
12979
12987
  await transport.handleRequest(req, res);
12980
12988
  } catch (error) {
12981
12989
  types.logger.debug("Error handling request:", error);
@@ -13066,6 +13074,10 @@ Fix: ${res.hint}` : "";
13066
13074
  stop: () => {
13067
13075
  types.logger.debug("[flockbayMCP] Stopping server");
13068
13076
  unrealEditorSupervisor.stop();
13077
+ for (const transport of activeHttpTransports) {
13078
+ void transport.close().catch(() => void 0);
13079
+ }
13080
+ activeHttpTransports.clear();
13069
13081
  mcp.close();
13070
13082
  server.close();
13071
13083
  }
@@ -15330,7 +15342,7 @@ async function authAndSetupMachineIfNeeded() {
15330
15342
  process.exit(1);
15331
15343
  }
15332
15344
  try {
15333
- const { migrateUnrealMcpToFlockbayMcp } = await Promise.resolve().then(function () { return require('./migratePlugin-BNbQyujP.cjs'); });
15345
+ const { migrateUnrealMcpToFlockbayMcp } = await Promise.resolve().then(function () { return require('./migratePlugin-Dhw_USQr.cjs'); });
15334
15346
  const result = migrateUnrealMcpToFlockbayMcp({
15335
15347
  engineRoot,
15336
15348
  projectUprojectPath: project || void 0,
@@ -15486,7 +15498,7 @@ ${engineRoot}`;
15486
15498
  } else if (subcommand === "codex") {
15487
15499
  try {
15488
15500
  await chdirToNearestUprojectRootIfPresent();
15489
- const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-COq1y0uD.cjs'); });
15501
+ const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-CEoR7aAy.cjs'); });
15490
15502
  let startedBy = void 0;
15491
15503
  let sessionId = void 0;
15492
15504
  for (let i = 1; i < args.length; i++) {
@@ -15588,7 +15600,7 @@ ${engineRoot}`;
15588
15600
  }
15589
15601
  try {
15590
15602
  await chdirToNearestUprojectRootIfPresent();
15591
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-HokTc0Z1.cjs'); });
15603
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-Bp4xUrIJ.cjs'); });
15592
15604
  let startedBy = void 0;
15593
15605
  let sessionId = void 0;
15594
15606
  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, e as projectPath, f as backoff, g as delay, R as RawJSONLinesSchema, c as configuration, h as readDaemonState, j as clearDaemonState, p as packageJson, r as readSettings, k as readCredentials, u as updateSettings, o as openBrowser, w as writeCredentials, m as unrealMcpPythonDir, n as acquireDaemonLock, s as writeDaemonState, t as ApiMachineClient, v as releaseDaemonLock, x as sendUnrealMcpTcpCommand, A as ApiClient, y as validatePath, z as run, B as run$1, C as buildShellInvocation, D as clearCredentials, E as clearMachineId, F as authenticateCodex, G as syncCodexCliAuth, H as authenticateClaude, I as authenticateGemini, d as installUnrealMcpPluginToEngine, J as buildAndInstallUnrealMcpPlugin, i as installUnrealMcpPluginToProject, b as isInstalledEngineRoot, K as getLatestDaemonLog, L as normalizeServerUrlForNode } from './types-xflr9vd_.mjs';
5
+ import { l as logger, e as projectPath, f as backoff, g as delay, R as RawJSONLinesSchema, c as configuration, h as readDaemonState, j as clearDaemonState, p as packageJson, r as readSettings, k as readCredentials, u as updateSettings, o as openBrowser, w as writeCredentials, m as unrealMcpPythonDir, n as acquireDaemonLock, s as writeDaemonState, t as ApiMachineClient, v as releaseDaemonLock, x as sendUnrealMcpTcpCommand, A as ApiClient, y as validatePath, z as run, B as run$1, C as buildShellInvocation, D as clearCredentials, E as clearMachineId, F as authenticateCodex, G as syncCodexCliAuth, H as authenticateClaude, I as authenticateGemini, d as installUnrealMcpPluginToEngine, J as buildAndInstallUnrealMcpPlugin, i as installUnrealMcpPluginToProject, b as isInstalledEngineRoot, K as getLatestDaemonLog, L as normalizeServerUrlForNode } from './types-D2z7I_Ei.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';
@@ -12946,14 +12946,22 @@ Fix: ${res.hint}` : "";
12946
12946
  isError: false
12947
12947
  };
12948
12948
  }));
12949
- const transport = new StreamableHTTPServerTransport({
12950
- // NOTE: Returning session id here will result in claude
12951
- // sdk spawn to fail with `Invalid Request: Server already initialized`
12952
- sessionIdGenerator: void 0
12953
- });
12954
- await mcp.connect(transport);
12949
+ const activeHttpTransports = /* @__PURE__ */ new Set();
12955
12950
  const server = createServer(async (req, res) => {
12951
+ const transport = new StreamableHTTPServerTransport({
12952
+ // Keep the local MCP endpoint stateless. The SDK recommends creating a
12953
+ // fresh transport per request for streamable HTTP when session management
12954
+ // is disabled; this avoids shared request/stream state across tool calls.
12955
+ sessionIdGenerator: void 0,
12956
+ enableJsonResponse: true
12957
+ });
12958
+ activeHttpTransports.add(transport);
12959
+ res.on("close", () => {
12960
+ activeHttpTransports.delete(transport);
12961
+ void transport.close().catch(() => void 0);
12962
+ });
12956
12963
  try {
12964
+ await mcp.connect(transport);
12957
12965
  await transport.handleRequest(req, res);
12958
12966
  } catch (error) {
12959
12967
  logger.debug("Error handling request:", error);
@@ -13044,6 +13052,10 @@ Fix: ${res.hint}` : "";
13044
13052
  stop: () => {
13045
13053
  logger.debug("[flockbayMCP] Stopping server");
13046
13054
  unrealEditorSupervisor.stop();
13055
+ for (const transport of activeHttpTransports) {
13056
+ void transport.close().catch(() => void 0);
13057
+ }
13058
+ activeHttpTransports.clear();
13047
13059
  mcp.close();
13048
13060
  server.close();
13049
13061
  }
@@ -15308,7 +15320,7 @@ async function authAndSetupMachineIfNeeded() {
15308
15320
  process.exit(1);
15309
15321
  }
15310
15322
  try {
15311
- const { migrateUnrealMcpToFlockbayMcp } = await import('./migratePlugin-BVy0Kw-1.mjs');
15323
+ const { migrateUnrealMcpToFlockbayMcp } = await import('./migratePlugin-BWa_MICW.mjs');
15312
15324
  const result = migrateUnrealMcpToFlockbayMcp({
15313
15325
  engineRoot,
15314
15326
  projectUprojectPath: project || void 0,
@@ -15464,7 +15476,7 @@ ${engineRoot}`;
15464
15476
  } else if (subcommand === "codex") {
15465
15477
  try {
15466
15478
  await chdirToNearestUprojectRootIfPresent();
15467
- const { runCodex } = await import('./runCodex-BCWCnen8.mjs');
15479
+ const { runCodex } = await import('./runCodex-CW8p6MqM.mjs');
15468
15480
  let startedBy = void 0;
15469
15481
  let sessionId = void 0;
15470
15482
  for (let i = 1; i < args.length; i++) {
@@ -15566,7 +15578,7 @@ ${engineRoot}`;
15566
15578
  }
15567
15579
  try {
15568
15580
  await chdirToNearestUprojectRootIfPresent();
15569
- const { runGemini } = await import('./runGemini-Dq2TkMwC.mjs');
15581
+ const { runGemini } = await import('./runGemini-CutURnfo.mjs');
15570
15582
  let startedBy = void 0;
15571
15583
  let sessionId = void 0;
15572
15584
  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-BDpihows.cjs');
5
- require('./types-reygbXgh.cjs');
4
+ require('./index-BvAn9mzP.cjs');
5
+ require('./types-mdNlgF2l.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-AQTYO52f.mjs';
3
- import './types-xflr9vd_.mjs';
2
+ import './index-DuZhXr8l.mjs';
3
+ import './types-D2z7I_Ei.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-reygbXgh.cjs');
3
+ var types = require('./types-mdNlgF2l.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-xflr9vd_.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-D2z7I_Ei.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 installUnrealMcpPluginToProject, b as isInstalledEngineRoot, q as quarantineLegacyEnginePlugins, d as installUnrealMcpPluginToEngine } from './types-xflr9vd_.mjs';
3
+ import { i as installUnrealMcpPluginToProject, b as isInstalledEngineRoot, q as quarantineLegacyEnginePlugins, d as installUnrealMcpPluginToEngine } from './types-D2z7I_Ei.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-reygbXgh.cjs');
5
+ var types = require('./types-mdNlgF2l.cjs');
6
6
  require('axios');
7
7
  require('node:os');
8
8
  require('node:events');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var ink = require('ink');
4
4
  var React = require('react');
5
- var types = require('./types-reygbXgh.cjs');
5
+ var types = require('./types-mdNlgF2l.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-BDpihows.cjs');
19
+ var index = require('./index-BvAn9mzP.cjs');
20
20
  require('axios');
21
21
  require('node:events');
22
22
  require('socket.io-client');
@@ -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, e as projectPath } from './types-xflr9vd_.mjs';
3
+ import { l as logger, A as ApiClient, p as packageJson, c as configuration, r as readSettings, e as projectPath } from './types-D2z7I_Ei.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-AQTYO52f.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-DuZhXr8l.mjs';
18
18
  import 'axios';
19
19
  import 'node:events';
20
20
  import 'socket.io-client';
@@ -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-reygbXgh.cjs');
10
- var index = require('./index-BDpihows.cjs');
9
+ var types = require('./types-mdNlgF2l.cjs');
10
+ var index = require('./index-BvAn9mzP.cjs');
11
11
  var node_child_process = require('node:child_process');
12
12
  var sdk = require('@agentclientprotocol/sdk');
13
13
  var fs = require('fs');
@@ -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, e as projectPath } from './types-xflr9vd_.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-AQTYO52f.mjs';
7
+ import { l as logger, p as packageJson, A as ApiClient, c as configuration, r as readSettings, e as projectPath } from './types-D2z7I_Ei.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-DuZhXr8l.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';
@@ -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.55";
26
+ var version = "0.10.56";
27
27
  var description = "Flockbay CLI (local agent + daemon)";
28
28
  var author = "Eduardo Orellana";
29
29
  var license = "UNLICENSED";
@@ -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.55";
47
+ var version = "0.10.56";
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-reygbXgh.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-mdNlgF2l.cjs', document.baseURI).href))));
836
836
  function projectPath() {
837
837
  const path = path$1.resolve(__dirname$1, "..");
838
838
  return path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flockbay",
3
- "version": "0.10.55",
3
+ "version": "0.10.56",
4
4
  "description": "Flockbay CLI (local agent + daemon)",
5
5
  "author": "Eduardo Orellana",
6
6
  "license": "UNLICENSED",