flockbay 0.10.16 → 0.10.17

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-SUAKq-K0.cjs');
6
+ var types = require('./types-CGQhv7Z-.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');
@@ -1272,7 +1272,7 @@ function buildDaemonSafeEnv(baseEnv, binPath) {
1272
1272
  env[pathKey] = [...prepend, ...existingParts].join(pathSep);
1273
1273
  return env;
1274
1274
  }
1275
- 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-Cau-_Qvn.cjs', document.baseURI).href)));
1275
+ 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-BxBuBx7C.cjs', document.baseURI).href)));
1276
1276
  const __dirname$1 = path.join(__filename$1, "..");
1277
1277
  function getGlobalClaudeVersion(claudeExecutable) {
1278
1278
  try {
@@ -11665,6 +11665,29 @@ async function startDaemonDetachedOrExit(opts) {
11665
11665
  const auth = await types.readCredentials().catch(() => null);
11666
11666
  const settings = await types.readSettings().catch(() => null);
11667
11667
  const daemon = await types.readDaemonState().catch(() => null);
11668
+ const desiredOrgId = auth?.orgId ? String(auth.orgId).trim() : "";
11669
+ const desiredMachineId = settings?.machineId ? String(settings.machineId).trim() : "";
11670
+ const daemonOrgId = typeof status?.orgId === "string" ? status.orgId.trim() : "";
11671
+ const daemonMachineId = typeof status?.machineId === "string" ? status.machineId.trim() : "";
11672
+ const daemonServerUrl = typeof status?.serverUrl === "string" ? status.serverUrl.trim() : "";
11673
+ const desiredServerUrl = String(types.configuration.serverUrl || "").trim();
11674
+ const orgMismatch = desiredOrgId && daemonOrgId && desiredOrgId !== daemonOrgId;
11675
+ const machineMismatch = desiredMachineId && daemonMachineId && desiredMachineId !== daemonMachineId;
11676
+ const serverMismatch = desiredServerUrl && daemonServerUrl && desiredServerUrl !== daemonServerUrl;
11677
+ if ((orgMismatch || machineMismatch || serverMismatch) && !opts?.restartAttempted) {
11678
+ console.error("");
11679
+ console.error(chalk.yellow("Daemon is running with different settings than the current CLI profile."));
11680
+ if (serverMismatch) console.error(chalk.gray(`Daemon server: ${daemonServerUrl || "unknown"}`));
11681
+ if (desiredServerUrl) console.error(chalk.gray(`CLI server: ${desiredServerUrl}`));
11682
+ if (orgMismatch) console.error(chalk.gray(`Daemon org: ${daemonOrgId || "unknown"}`));
11683
+ if (desiredOrgId) console.error(chalk.gray(`CLI org: ${desiredOrgId}`));
11684
+ if (machineMismatch) console.error(chalk.gray(`Daemon machine: ${daemonMachineId || "unknown"}`));
11685
+ if (desiredMachineId) console.error(chalk.gray(`CLI machine: ${desiredMachineId}`));
11686
+ console.error(chalk.gray("Restarting daemon to apply current login/pairing..."));
11687
+ await stopDaemon();
11688
+ await startDaemonDetachedOrExit({ ...opts, restartAttempted: true });
11689
+ return;
11690
+ }
11668
11691
  console.log(chalk.bold("\nFlockbay ready\n"));
11669
11692
  console.log(chalk.gray(`Profile: ${types.configuration.profile}`));
11670
11693
  console.log(chalk.gray(`Server: ${types.configuration.serverUrl}`));
@@ -11934,7 +11957,7 @@ ${engineRoot}`, {
11934
11957
  } else if (subcommand === "codex") {
11935
11958
  try {
11936
11959
  await chdirToNearestUprojectRootIfPresent();
11937
- const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-DzP3VUa-.cjs'); });
11960
+ const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-DuCGwO2K.cjs'); });
11938
11961
  let startedBy = void 0;
11939
11962
  let sessionId = void 0;
11940
11963
  for (let i = 1; i < args.length; i++) {
@@ -12029,7 +12052,7 @@ ${engineRoot}`, {
12029
12052
  }
12030
12053
  try {
12031
12054
  await chdirToNearestUprojectRootIfPresent();
12032
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-CpmehDQ2.cjs'); });
12055
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-B25LZ4Cw.cjs'); });
12033
12056
  let startedBy = void 0;
12034
12057
  let sessionId = void 0;
12035
12058
  for (let i = 1; i < args.length; i++) {
@@ -1,7 +1,7 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
2
  import os, { homedir } from 'node:os';
3
3
  import { randomUUID, createCipheriv, randomBytes } from 'node:crypto';
4
- import { l as logger, p as projectPath, d as backoff, e as delay, R as RawJSONLinesSchema, c as configuration, f as readDaemonState, g as clearDaemonState, b as packageJson, r as readSettings, h as readCredentials, u as updateSettings, w as writeCredentials, i as unrealMcpPythonDir, j as acquireDaemonLock, k as writeDaemonState, m as ApiMachineClient, n as releaseDaemonLock, s as sendUnrealMcpTcpCommand, A as ApiClient, o as clearCredentials, q as clearMachineId, t as installUnrealMcpPluginToEngine, v as getLatestDaemonLog } from './types-CwzNqYEx.mjs';
4
+ import { l as logger, p as projectPath, d as backoff, e as delay, R as RawJSONLinesSchema, c as configuration, f as readDaemonState, g as clearDaemonState, b as packageJson, r as readSettings, h as readCredentials, u as updateSettings, w as writeCredentials, i as unrealMcpPythonDir, j as acquireDaemonLock, k as writeDaemonState, m as ApiMachineClient, n as releaseDaemonLock, s as sendUnrealMcpTcpCommand, A as ApiClient, o as clearCredentials, q as clearMachineId, t as installUnrealMcpPluginToEngine, v as getLatestDaemonLog } from './types-DuhcLxar.mjs';
5
5
  import { spawn, execFileSync, execSync } from 'node:child_process';
6
6
  import path, { resolve, join, dirname } from 'node:path';
7
7
  import { createInterface } from 'node:readline';
@@ -11643,6 +11643,29 @@ async function startDaemonDetachedOrExit(opts) {
11643
11643
  const auth = await readCredentials().catch(() => null);
11644
11644
  const settings = await readSettings().catch(() => null);
11645
11645
  const daemon = await readDaemonState().catch(() => null);
11646
+ const desiredOrgId = auth?.orgId ? String(auth.orgId).trim() : "";
11647
+ const desiredMachineId = settings?.machineId ? String(settings.machineId).trim() : "";
11648
+ const daemonOrgId = typeof status?.orgId === "string" ? status.orgId.trim() : "";
11649
+ const daemonMachineId = typeof status?.machineId === "string" ? status.machineId.trim() : "";
11650
+ const daemonServerUrl = typeof status?.serverUrl === "string" ? status.serverUrl.trim() : "";
11651
+ const desiredServerUrl = String(configuration.serverUrl || "").trim();
11652
+ const orgMismatch = desiredOrgId && daemonOrgId && desiredOrgId !== daemonOrgId;
11653
+ const machineMismatch = desiredMachineId && daemonMachineId && desiredMachineId !== daemonMachineId;
11654
+ const serverMismatch = desiredServerUrl && daemonServerUrl && desiredServerUrl !== daemonServerUrl;
11655
+ if ((orgMismatch || machineMismatch || serverMismatch) && !opts?.restartAttempted) {
11656
+ console.error("");
11657
+ console.error(chalk.yellow("Daemon is running with different settings than the current CLI profile."));
11658
+ if (serverMismatch) console.error(chalk.gray(`Daemon server: ${daemonServerUrl || "unknown"}`));
11659
+ if (desiredServerUrl) console.error(chalk.gray(`CLI server: ${desiredServerUrl}`));
11660
+ if (orgMismatch) console.error(chalk.gray(`Daemon org: ${daemonOrgId || "unknown"}`));
11661
+ if (desiredOrgId) console.error(chalk.gray(`CLI org: ${desiredOrgId}`));
11662
+ if (machineMismatch) console.error(chalk.gray(`Daemon machine: ${daemonMachineId || "unknown"}`));
11663
+ if (desiredMachineId) console.error(chalk.gray(`CLI machine: ${desiredMachineId}`));
11664
+ console.error(chalk.gray("Restarting daemon to apply current login/pairing..."));
11665
+ await stopDaemon();
11666
+ await startDaemonDetachedOrExit({ ...opts, restartAttempted: true });
11667
+ return;
11668
+ }
11646
11669
  console.log(chalk.bold("\nFlockbay ready\n"));
11647
11670
  console.log(chalk.gray(`Profile: ${configuration.profile}`));
11648
11671
  console.log(chalk.gray(`Server: ${configuration.serverUrl}`));
@@ -11912,7 +11935,7 @@ ${engineRoot}`, {
11912
11935
  } else if (subcommand === "codex") {
11913
11936
  try {
11914
11937
  await chdirToNearestUprojectRootIfPresent();
11915
- const { runCodex } = await import('./runCodex-Di9eHddq.mjs');
11938
+ const { runCodex } = await import('./runCodex-DudVDqNh.mjs');
11916
11939
  let startedBy = void 0;
11917
11940
  let sessionId = void 0;
11918
11941
  for (let i = 1; i < args.length; i++) {
@@ -12007,7 +12030,7 @@ ${engineRoot}`, {
12007
12030
  }
12008
12031
  try {
12009
12032
  await chdirToNearestUprojectRootIfPresent();
12010
- const { runGemini } = await import('./runGemini-BS6sBU_V.mjs');
12033
+ const { runGemini } = await import('./runGemini-Ddu8UCOS.mjs');
12011
12034
  let startedBy = void 0;
12012
12035
  let sessionId = void 0;
12013
12036
  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-Cau-_Qvn.cjs');
5
- require('./types-SUAKq-K0.cjs');
4
+ require('./index-BxBuBx7C.cjs');
5
+ require('./types-CGQhv7Z-.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-DtmFQzXY.mjs';
3
- import './types-CwzNqYEx.mjs';
2
+ import './index-CHm9r89K.mjs';
3
+ import './types-DuhcLxar.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-SUAKq-K0.cjs');
3
+ var types = require('./types-CGQhv7Z-.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-CwzNqYEx.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, R as RawJSONLinesSchema, c as configuration, l as logger } from './types-DuhcLxar.mjs';
2
2
  import 'axios';
3
3
  import 'node:fs';
4
4
  import 'node:os';
@@ -2,7 +2,7 @@
2
2
 
3
3
  var ink = require('ink');
4
4
  var React = require('react');
5
- var types = require('./types-SUAKq-K0.cjs');
5
+ var types = require('./types-CGQhv7Z-.cjs');
6
6
  var index_js = require('@modelcontextprotocol/sdk/client/index.js');
7
7
  var stdio_js = require('@modelcontextprotocol/sdk/client/stdio.js');
8
8
  var z = require('zod');
@@ -12,7 +12,7 @@ var fs = require('node:fs');
12
12
  var os = require('node:os');
13
13
  var path = require('node:path');
14
14
  var node_child_process = require('node:child_process');
15
- var index = require('./index-Cau-_Qvn.cjs');
15
+ var index = require('./index-BxBuBx7C.cjs');
16
16
  require('axios');
17
17
  require('node:events');
18
18
  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, r as readSettings, p as projectPath, c as configuration, b as packageJson } from './types-CwzNqYEx.mjs';
3
+ import { l as logger, A as ApiClient, r as readSettings, p as projectPath, c as configuration, b as packageJson } from './types-DuhcLxar.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 from 'node:os';
11
11
  import path, { 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, 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, e as detectUnrealProject, g as buildProjectCapsule, t as trimIdent, j as autoFinalizeCoordinationWorkItem, k as detectScreenshotsForGate, l as applyCoordinationSideEffectsFromMcpToolResult, m as stopCaffeinate } from './index-DtmFQzXY.mjs';
13
+ import { s as shouldCountToolCall, c as consumeToolQuota, f as formatQuotaDeniedReason, h as hashObject, 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, e as detectUnrealProject, g as buildProjectCapsule, t as trimIdent, j as autoFinalizeCoordinationWorkItem, k as detectScreenshotsForGate, l as applyCoordinationSideEffectsFromMcpToolResult, m as stopCaffeinate } from './index-CHm9r89K.mjs';
14
14
  import 'axios';
15
15
  import 'node:events';
16
16
  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-SUAKq-K0.cjs');
10
- var index = require('./index-Cau-_Qvn.cjs');
9
+ var types = require('./types-CGQhv7Z-.cjs');
10
+ var index = require('./index-BxBuBx7C.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 from 'node:os';
5
5
  import path, { resolve, join as join$1, basename } from 'node:path';
6
6
  import { mkdir, writeFile, readFile } from 'node:fs/promises';
7
- import { l as logger, b as packageJson, A as ApiClient, r as readSettings, p as projectPath, c as configuration } from './types-CwzNqYEx.mjs';
8
- import { s as shouldCountToolCall, c as consumeToolQuota, f as formatQuotaDeniedReason, h as hashObject, i as initialMachineMetadata, n as notifyDaemonSessionStarted, M as MessageQueue2, g as buildProjectCapsule, a as setLatestUserImages, b as MessageBuffer, w as withUserImagesMarker, P as PLATFORM_SYSTEM_PROMPT, r as registerKillSessionHandler, d as startFlockbayServer, o as extractUserImagesMarker, p as getLatestUserImages, j as autoFinalizeCoordinationWorkItem, E as ElicitationHub, k as detectScreenshotsForGate, m as stopCaffeinate } from './index-DtmFQzXY.mjs';
7
+ import { l as logger, b as packageJson, A as ApiClient, r as readSettings, p as projectPath, c as configuration } from './types-DuhcLxar.mjs';
8
+ import { s as shouldCountToolCall, c as consumeToolQuota, f as formatQuotaDeniedReason, h as hashObject, i as initialMachineMetadata, n as notifyDaemonSessionStarted, M as MessageQueue2, g as buildProjectCapsule, a as setLatestUserImages, b as MessageBuffer, w as withUserImagesMarker, P as PLATFORM_SYSTEM_PROMPT, r as registerKillSessionHandler, d as startFlockbayServer, o as extractUserImagesMarker, p as getLatestUserImages, j as autoFinalizeCoordinationWorkItem, E as ElicitationHub, k as detectScreenshotsForGate, m as stopCaffeinate } from './index-CHm9r89K.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';
@@ -42,7 +42,7 @@ function _interopNamespaceDefault(e) {
42
42
  var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
43
43
 
44
44
  var name = "flockbay";
45
- var version = "0.10.16";
45
+ var version = "0.10.17";
46
46
  var description = "Flockbay CLI (local agent + daemon)";
47
47
  var author = "Eduardo Orellana";
48
48
  var license = "UNLICENSED";
@@ -197,7 +197,7 @@ function parseProfileFromProcessArgs() {
197
197
  const args = process.argv.slice(2);
198
198
  for (let i = 0; i < args.length; i++) {
199
199
  const a = String(args[i] || "");
200
- if (a === "--profile") {
200
+ if (a === "--profile" || a === "-profile" || a === "-p") {
201
201
  const v = String(args[i + 1] || "").trim();
202
202
  if (v && !v.startsWith("-")) return v;
203
203
  }
@@ -205,6 +205,10 @@ function parseProfileFromProcessArgs() {
205
205
  const v = a.slice("--profile=".length).trim();
206
206
  if (v) return v;
207
207
  }
208
+ if (a.startsWith("-profile=")) {
209
+ const v = a.slice("-profile=".length).trim();
210
+ if (v) return v;
211
+ }
208
212
  }
209
213
  return "";
210
214
  }
@@ -766,7 +770,7 @@ class RpcHandlerManager {
766
770
  }
767
771
  }
768
772
 
769
- 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-SUAKq-K0.cjs', document.baseURI).href))));
773
+ 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-CGQhv7Z-.cjs', document.baseURI).href))));
770
774
  function projectPath() {
771
775
  const path = path$1.resolve(__dirname$1, "..");
772
776
  return path;
@@ -21,7 +21,7 @@ import net from 'node:net';
21
21
  import { spawn as spawn$1 } from 'node:child_process';
22
22
 
23
23
  var name = "flockbay";
24
- var version = "0.10.16";
24
+ var version = "0.10.17";
25
25
  var description = "Flockbay CLI (local agent + daemon)";
26
26
  var author = "Eduardo Orellana";
27
27
  var license = "UNLICENSED";
@@ -176,7 +176,7 @@ function parseProfileFromProcessArgs() {
176
176
  const args = process.argv.slice(2);
177
177
  for (let i = 0; i < args.length; i++) {
178
178
  const a = String(args[i] || "");
179
- if (a === "--profile") {
179
+ if (a === "--profile" || a === "-profile" || a === "-p") {
180
180
  const v = String(args[i + 1] || "").trim();
181
181
  if (v && !v.startsWith("-")) return v;
182
182
  }
@@ -184,6 +184,10 @@ function parseProfileFromProcessArgs() {
184
184
  const v = a.slice("--profile=".length).trim();
185
185
  if (v) return v;
186
186
  }
187
+ if (a.startsWith("-profile=")) {
188
+ const v = a.slice("-profile=".length).trim();
189
+ if (v) return v;
190
+ }
187
191
  }
188
192
  return "";
189
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flockbay",
3
- "version": "0.10.16",
3
+ "version": "0.10.17",
4
4
  "description": "Flockbay CLI (local agent + daemon)",
5
5
  "author": "Eduardo Orellana",
6
6
  "license": "UNLICENSED",