flockbay 0.10.49 → 0.10.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -60
- package/bin/flockbay-mcp.mjs +62 -62
- package/bin/flockbay.mjs +95 -95
- package/dist/{index-D8AeVbvv.mjs → index-DZjyS6UX.mjs} +19 -6
- package/dist/{index-r3VTdgFI.cjs → index-wU3LFfZh.cjs} +20 -7
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{migratePlugin-CEvGPul8.mjs → migratePlugin-CnpWYW1E.mjs} +12 -2
- package/dist/{migratePlugin-wFK-k3Wk.cjs → migratePlugin-CyXgJ-se.cjs} +12 -2
- package/dist/{runCodex-ZfUyhHF6.mjs → runCodex-Dhkynhhh.mjs} +7 -2
- package/dist/{runCodex-DuyuYqoB.cjs → runCodex-jDfLDJJW.cjs} +7 -2
- package/dist/{runGemini-D7j5Y5TF.cjs → runGemini-DN189-WI.cjs} +2 -2
- package/dist/{runGemini-DBU1mMdp.mjs → runGemini-Dq5_59Us.mjs} +2 -2
- package/dist/{types-DNr0xwSy.cjs → types-CN-EDgzo.cjs} +131 -12
- package/dist/{types-BRJuZQj_.mjs → types-DRXvc8Nt.mjs} +130 -12
- package/package.json +131 -131
- package/scripts/claude_local_launcher.cjs +72 -72
- package/scripts/claude_remote_launcher.cjs +15 -15
- package/scripts/claude_version_utils.cjs +445 -445
- package/scripts/ripgrep_launcher.cjs +32 -32
- package/scripts/run-with-root-env.mjs +37 -32
- package/scripts/session_hook_forwarder.cjs +49 -49
- package/scripts/test-codex-abort-history.mjs +77 -77
- package/scripts/unpack-tools.cjs +244 -244
- package/tools/licenses/difftastic-LICENSE +21 -21
- package/tools/licenses/ripgrep-LICENSE +3 -3
- package/tools/unreal-mcp/UPSTREAM_VERSION.md +8 -8
- package/tools/unreal-mcp/upstream/Docs/README.md +8 -8
- package/tools/unreal-mcp/upstream/Docs/Tools/README.md +6 -6
- package/tools/unreal-mcp/upstream/Docs/Tools/actor_tools.md +183 -183
- package/tools/unreal-mcp/upstream/Docs/Tools/blueprint_tools.md +268 -268
- package/tools/unreal-mcp/upstream/Docs/Tools/editor_tools.md +104 -104
- package/tools/unreal-mcp/upstream/Docs/Tools/node_tools.md +274 -274
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Config/FilterPlugin.ini +8 -8
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/FlockbayMCP.uplugin +36 -36
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/FlockbayMCP.Build.cs +82 -82
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPBlueprintCommands.cpp +1364 -1364
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPBlueprintNodeCommands.cpp +1310 -1310
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPCommandSchema.cpp +756 -756
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPCommonUtils.cpp +1177 -1177
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPEditorCommands.cpp +2618 -2618
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPProjectCommands.cpp +71 -71
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPUMGCommands.cpp +543 -543
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/MCPServerRunnable.cpp +372 -372
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/UnrealMCPBridge.cpp +457 -457
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/UnrealMCPModule.cpp +21 -21
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPBlueprintCommands.h +35 -35
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPBlueprintNodeCommands.h +30 -30
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPCommandSchema.h +41 -41
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPCommonUtils.h +59 -59
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPEditorCommands.h +61 -61
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPProjectCommands.h +20 -20
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPUMGCommands.h +82 -82
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/MCPServerRunnable.h +33 -33
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/UnrealMCPBridge.h +64 -64
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/UnrealMCPModule.h +22 -22
- package/tools/unreal-mcp/upstream/Python/README.md +39 -39
- package/tools/unreal-mcp/upstream/Python/pyproject.toml +22 -22
- package/tools/unreal-mcp/upstream/Python/scripts/actors/test_cube.py +202 -202
- package/tools/unreal-mcp/upstream/Python/scripts/blueprints/test_create_and_spawn_blueprints_with_different_components.py +496 -496
- package/tools/unreal-mcp/upstream/Python/scripts/blueprints/test_create_and_spawn_cube_blueprint.py +193 -193
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_component_reference.py +266 -266
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_create_bird_blueprint_with_input_and_camera.py +617 -617
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_input_mapping.py +365 -365
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_physics_variables.py +389 -389
- package/tools/unreal-mcp/upstream/Python/tools/blueprint_tools.py +419 -419
- package/tools/unreal-mcp/upstream/Python/tools/editor_tools.py +369 -369
- package/tools/unreal-mcp/upstream/Python/tools/node_tools.py +429 -429
- package/tools/unreal-mcp/upstream/Python/tools/project_tools.py +63 -63
- package/tools/unreal-mcp/upstream/Python/tools/umg_tools.py +332 -332
- package/tools/unreal-mcp/upstream/Python/unreal_mcp_server.py +398 -398
- package/tools/unreal-mcp/upstream/Python/uv.lock +521 -521
package/README.md
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
# Flockbay CLI
|
|
2
|
-
|
|
3
|
-
Code on the go controlling Claude/Codex sessions from your mobile device.
|
|
4
|
-
|
|
5
|
-
Code anywhere.
|
|
6
|
-
|
|
7
|
-
Flockbay CLI is the command-line tool for running and controlling Flockbay sessions (including daemon and Codex mode).
|
|
8
|
-
|
|
9
|
-
## Installation
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install -g flockbay
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
flockbay
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
This will:
|
|
22
|
-
1. Start a Claude Code session
|
|
23
|
-
2. Display a QR code to connect from your mobile device
|
|
24
|
-
3. Allow real-time session sharing between Claude Code and your mobile app
|
|
25
|
-
|
|
26
|
-
## Commands
|
|
27
|
-
|
|
28
|
-
- `flockbay auth` – Manage authentication
|
|
29
|
-
- `flockbay codex` – Start Codex mode
|
|
30
|
-
- `flockbay connect` – Store AI vendor API keys in Flockbay
|
|
31
|
-
- `flockbay notify` – Send a push notification to your devices
|
|
32
|
-
- `flockbay daemon` – Manage background service
|
|
33
|
-
- `flockbay doctor` – System diagnostics & troubleshooting
|
|
34
|
-
|
|
35
|
-
## Options
|
|
36
|
-
|
|
37
|
-
- `-h, --help` - Show help
|
|
38
|
-
- `-v, --version` - Show version
|
|
39
|
-
- `-m, --model <model>` - Claude model to use (default: sonnet)
|
|
40
|
-
- `-p, --permission-mode <mode>` - Permission mode: auto, default, or plan
|
|
41
|
-
- `--claude-env KEY=VALUE` - Set environment variable for Claude Code (e.g., for [claude-code-router](https://github.com/musistudio/claude-code-router))
|
|
42
|
-
- `--claude-arg ARG` - Pass additional argument to Claude CLI
|
|
43
|
-
|
|
44
|
-
Run `flockbay --help` for the complete list of options.
|
|
45
|
-
|
|
46
|
-
## Requirements
|
|
47
|
-
|
|
48
|
-
- Node.js >= 20.0.0
|
|
49
|
-
- Required by `eventsource-parser@3.0.5`, which is required by
|
|
50
|
-
`@modelcontextprotocol/sdk`, which we used to implement permission forwarding
|
|
51
|
-
to mobile app
|
|
52
|
-
- Claude CLI installed & logged in (`claude` command available in PATH)
|
|
53
|
-
|
|
54
|
-
## Windows UX note
|
|
55
|
-
|
|
56
|
-
- Codex MCP child processes are started with hidden console windows to prevent blank `cmd.exe` popups during session startup.
|
|
57
|
-
|
|
58
|
-
## License
|
|
59
|
-
|
|
60
|
-
Proprietary. Copyright (c) 2024-2026 Flockbay. All rights reserved.
|
|
1
|
+
# Flockbay CLI
|
|
2
|
+
|
|
3
|
+
Code on the go controlling Claude/Codex sessions from your mobile device.
|
|
4
|
+
|
|
5
|
+
Code anywhere.
|
|
6
|
+
|
|
7
|
+
Flockbay CLI is the command-line tool for running and controlling Flockbay sessions (including daemon and Codex mode).
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g flockbay
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
flockbay
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This will:
|
|
22
|
+
1. Start a Claude Code session
|
|
23
|
+
2. Display a QR code to connect from your mobile device
|
|
24
|
+
3. Allow real-time session sharing between Claude Code and your mobile app
|
|
25
|
+
|
|
26
|
+
## Commands
|
|
27
|
+
|
|
28
|
+
- `flockbay auth` – Manage authentication
|
|
29
|
+
- `flockbay codex` – Start Codex mode
|
|
30
|
+
- `flockbay connect` – Store AI vendor API keys in Flockbay
|
|
31
|
+
- `flockbay notify` – Send a push notification to your devices
|
|
32
|
+
- `flockbay daemon` – Manage background service
|
|
33
|
+
- `flockbay doctor` – System diagnostics & troubleshooting
|
|
34
|
+
|
|
35
|
+
## Options
|
|
36
|
+
|
|
37
|
+
- `-h, --help` - Show help
|
|
38
|
+
- `-v, --version` - Show version
|
|
39
|
+
- `-m, --model <model>` - Claude model to use (default: sonnet)
|
|
40
|
+
- `-p, --permission-mode <mode>` - Permission mode: auto, default, or plan
|
|
41
|
+
- `--claude-env KEY=VALUE` - Set environment variable for Claude Code (e.g., for [claude-code-router](https://github.com/musistudio/claude-code-router))
|
|
42
|
+
- `--claude-arg ARG` - Pass additional argument to Claude CLI
|
|
43
|
+
|
|
44
|
+
Run `flockbay --help` for the complete list of options.
|
|
45
|
+
|
|
46
|
+
## Requirements
|
|
47
|
+
|
|
48
|
+
- Node.js >= 20.0.0
|
|
49
|
+
- Required by `eventsource-parser@3.0.5`, which is required by
|
|
50
|
+
`@modelcontextprotocol/sdk`, which we used to implement permission forwarding
|
|
51
|
+
to mobile app
|
|
52
|
+
- Claude CLI installed & logged in (`claude` command available in PATH)
|
|
53
|
+
|
|
54
|
+
## Windows UX note
|
|
55
|
+
|
|
56
|
+
- Codex MCP child processes are started with hidden console windows to prevent blank `cmd.exe` popups during session startup.
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
Proprietary. Copyright (c) 2024-2026 Flockbay. All rights reserved.
|
package/bin/flockbay-mcp.mjs
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { execFileSync } from 'node:child_process';
|
|
4
|
-
import { existsSync } from 'node:fs';
|
|
5
|
-
import { dirname, join } from 'node:path';
|
|
6
|
-
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
7
|
-
|
|
8
|
-
// Ensure Node flags to reduce noisy warnings on stdout (which could interfere with MCP).
|
|
9
|
-
const hasNoWarnings = process.execArgv.includes('--no-warnings');
|
|
10
|
-
const hasNoDeprecation = process.execArgv.includes('--no-deprecation');
|
|
11
|
-
|
|
12
|
-
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
13
|
-
const distEntrypoint = join(projectRoot, 'dist', 'codex', 'flockbayMcpStdioBridge.mjs');
|
|
14
|
-
const devEntrypoint = join(projectRoot, 'src', 'codex', 'flockbayMcpStdioBridge.ts');
|
|
15
|
-
const entrypoint = existsSync(distEntrypoint) ? distEntrypoint : devEntrypoint;
|
|
16
|
-
const useTsx = entrypoint.endsWith('.ts');
|
|
17
|
-
const invokedCwd = process.cwd();
|
|
18
|
-
|
|
19
|
-
function resolveTsxImportArgs() {
|
|
20
|
-
if (!useTsx) return [];
|
|
21
|
-
const candidates = [
|
|
22
|
-
join(projectRoot, 'node_modules', 'tsx', 'dist', 'esm', 'index.mjs'),
|
|
23
|
-
join(projectRoot, 'node_modules', 'tsx', 'dist', 'esm', 'index.js'),
|
|
24
|
-
join(projectRoot, 'node_modules', 'tsx', 'dist', 'index.mjs'),
|
|
25
|
-
join(projectRoot, 'node_modules', 'tsx', 'dist', 'index.js'),
|
|
26
|
-
];
|
|
27
|
-
const resolved = candidates.find(existsSync);
|
|
28
|
-
return resolved ? ['--import', toNodeSpecifier(resolved)] : ['--import', 'tsx'];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function toNodeSpecifier(p) {
|
|
32
|
-
if (process.platform !== 'win32') return p;
|
|
33
|
-
if (!/^[a-zA-Z]:[\\/]/.test(p)) return p;
|
|
34
|
-
return pathToFileURL(p).href;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (!hasNoWarnings || !hasNoDeprecation || useTsx) {
|
|
38
|
-
try {
|
|
39
|
-
execFileSync(
|
|
40
|
-
process.execPath,
|
|
41
|
-
[
|
|
42
|
-
'--no-warnings',
|
|
43
|
-
'--no-deprecation',
|
|
44
|
-
...resolveTsxImportArgs(),
|
|
45
|
-
entrypoint,
|
|
46
|
-
...process.argv.slice(2),
|
|
47
|
-
],
|
|
48
|
-
{
|
|
49
|
-
stdio: 'inherit',
|
|
50
|
-
...(useTsx ? { cwd: projectRoot } : {}),
|
|
51
|
-
env: {
|
|
52
|
-
...process.env,
|
|
53
|
-
...(useTsx ? { FLOCKBAY_INVOKED_CWD: invokedCwd } : {}),
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
);
|
|
57
|
-
} catch (error) {
|
|
58
|
-
process.exit(error?.status || 1);
|
|
59
|
-
}
|
|
60
|
-
} else {
|
|
61
|
-
await import('../dist/codex/flockbayMcpStdioBridge.mjs');
|
|
62
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execFileSync } from 'node:child_process';
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
5
|
+
import { dirname, join } from 'node:path';
|
|
6
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
7
|
+
|
|
8
|
+
// Ensure Node flags to reduce noisy warnings on stdout (which could interfere with MCP).
|
|
9
|
+
const hasNoWarnings = process.execArgv.includes('--no-warnings');
|
|
10
|
+
const hasNoDeprecation = process.execArgv.includes('--no-deprecation');
|
|
11
|
+
|
|
12
|
+
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
13
|
+
const distEntrypoint = join(projectRoot, 'dist', 'codex', 'flockbayMcpStdioBridge.mjs');
|
|
14
|
+
const devEntrypoint = join(projectRoot, 'src', 'codex', 'flockbayMcpStdioBridge.ts');
|
|
15
|
+
const entrypoint = existsSync(distEntrypoint) ? distEntrypoint : devEntrypoint;
|
|
16
|
+
const useTsx = entrypoint.endsWith('.ts');
|
|
17
|
+
const invokedCwd = process.cwd();
|
|
18
|
+
|
|
19
|
+
function resolveTsxImportArgs() {
|
|
20
|
+
if (!useTsx) return [];
|
|
21
|
+
const candidates = [
|
|
22
|
+
join(projectRoot, 'node_modules', 'tsx', 'dist', 'esm', 'index.mjs'),
|
|
23
|
+
join(projectRoot, 'node_modules', 'tsx', 'dist', 'esm', 'index.js'),
|
|
24
|
+
join(projectRoot, 'node_modules', 'tsx', 'dist', 'index.mjs'),
|
|
25
|
+
join(projectRoot, 'node_modules', 'tsx', 'dist', 'index.js'),
|
|
26
|
+
];
|
|
27
|
+
const resolved = candidates.find(existsSync);
|
|
28
|
+
return resolved ? ['--import', toNodeSpecifier(resolved)] : ['--import', 'tsx'];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function toNodeSpecifier(p) {
|
|
32
|
+
if (process.platform !== 'win32') return p;
|
|
33
|
+
if (!/^[a-zA-Z]:[\\/]/.test(p)) return p;
|
|
34
|
+
return pathToFileURL(p).href;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!hasNoWarnings || !hasNoDeprecation || useTsx) {
|
|
38
|
+
try {
|
|
39
|
+
execFileSync(
|
|
40
|
+
process.execPath,
|
|
41
|
+
[
|
|
42
|
+
'--no-warnings',
|
|
43
|
+
'--no-deprecation',
|
|
44
|
+
...resolveTsxImportArgs(),
|
|
45
|
+
entrypoint,
|
|
46
|
+
...process.argv.slice(2),
|
|
47
|
+
],
|
|
48
|
+
{
|
|
49
|
+
stdio: 'inherit',
|
|
50
|
+
...(useTsx ? { cwd: projectRoot } : {}),
|
|
51
|
+
env: {
|
|
52
|
+
...process.env,
|
|
53
|
+
...(useTsx ? { FLOCKBAY_INVOKED_CWD: invokedCwd } : {}),
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
process.exit(error?.status || 1);
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
await import('../dist/codex/flockbayMcpStdioBridge.mjs');
|
|
62
|
+
}
|
package/bin/flockbay.mjs
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { execFileSync } from 'node:child_process';
|
|
4
|
-
import { existsSync, statSync } from 'node:fs';
|
|
5
|
-
import { dirname, join } from 'node:path';
|
|
6
|
-
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
7
|
-
|
|
8
|
-
// Ensure Node flags to reduce noisy warnings on stdout.
|
|
9
|
-
const hasNoWarnings = process.execArgv.includes('--no-warnings');
|
|
10
|
-
const hasNoDeprecation = process.execArgv.includes('--no-deprecation');
|
|
11
|
-
|
|
12
|
-
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
13
|
-
const distEntrypoint = join(projectRoot, 'dist', 'index.mjs');
|
|
14
|
-
const devEntrypoint = join(projectRoot, 'src', 'index.ts');
|
|
15
|
-
const entrypoint = (() => {
|
|
16
|
-
const forceSrc = process.env.FLOCKBAY_USE_SRC === '1';
|
|
17
|
-
const forceDist = process.env.FLOCKBAY_USE_DIST === '1';
|
|
18
|
-
|
|
19
|
-
const hasDist = existsSync(distEntrypoint);
|
|
20
|
-
const hasDev = existsSync(devEntrypoint);
|
|
21
|
-
|
|
22
|
-
if (forceSrc && hasDev) return devEntrypoint;
|
|
23
|
-
if (forceDist && hasDist) return distEntrypoint;
|
|
24
|
-
|
|
25
|
-
if (hasDist && hasDev) {
|
|
26
|
-
try {
|
|
27
|
-
const devTime = statSync(devEntrypoint).mtimeMs;
|
|
28
|
-
const distTime = statSync(distEntrypoint).mtimeMs;
|
|
29
|
-
if (devTime > distTime) return devEntrypoint;
|
|
30
|
-
} catch {
|
|
31
|
-
// ignore
|
|
32
|
-
}
|
|
33
|
-
return distEntrypoint;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return hasDist ? distEntrypoint : devEntrypoint;
|
|
37
|
-
})();
|
|
38
|
-
const useTsx = entrypoint.endsWith('.ts');
|
|
39
|
-
const invokedCwd = process.cwd();
|
|
40
|
-
|
|
41
|
-
function rewriteTopLevelAliases(args) {
|
|
42
|
-
const cmd = args[0];
|
|
43
|
-
if (cmd === 'install') return ['daemon', 'install', ...args.slice(1)];
|
|
44
|
-
if (cmd === 'uninstall') return ['daemon', 'uninstall', ...args.slice(1)];
|
|
45
|
-
return args;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function resolveTsxImportArgs() {
|
|
49
|
-
if (!useTsx) return [];
|
|
50
|
-
const candidates = [
|
|
51
|
-
join(projectRoot, 'node_modules', 'tsx', 'dist', 'esm', 'index.mjs'),
|
|
52
|
-
join(projectRoot, 'node_modules', 'tsx', 'dist', 'esm', 'index.js'),
|
|
53
|
-
join(projectRoot, 'node_modules', 'tsx', 'dist', 'index.mjs'),
|
|
54
|
-
join(projectRoot, 'node_modules', 'tsx', 'dist', 'index.js'),
|
|
55
|
-
];
|
|
56
|
-
const resolved = candidates.find(existsSync);
|
|
57
|
-
return resolved ? ['--import', toNodeSpecifier(resolved)] : ['--import', 'tsx'];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function toNodeSpecifier(p) {
|
|
61
|
-
if (process.platform !== 'win32') return p;
|
|
62
|
-
if (!/^[a-zA-Z]:[\\/]/.test(p)) return p;
|
|
63
|
-
return pathToFileURL(p).href;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const rewrittenArgs = rewriteTopLevelAliases(process.argv.slice(2));
|
|
67
|
-
|
|
68
|
-
if (!hasNoWarnings || !hasNoDeprecation || useTsx) {
|
|
69
|
-
try {
|
|
70
|
-
execFileSync(
|
|
71
|
-
process.execPath,
|
|
72
|
-
[
|
|
73
|
-
'--no-warnings',
|
|
74
|
-
'--no-deprecation',
|
|
75
|
-
...resolveTsxImportArgs(),
|
|
76
|
-
entrypoint,
|
|
77
|
-
...rewrittenArgs,
|
|
78
|
-
],
|
|
79
|
-
{
|
|
80
|
-
stdio: 'inherit',
|
|
81
|
-
...(useTsx ? { cwd: projectRoot } : {}),
|
|
82
|
-
env: {
|
|
83
|
-
...process.env,
|
|
84
|
-
...(useTsx ? { FLOCKBAY_INVOKED_CWD: invokedCwd } : {}),
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
);
|
|
88
|
-
} catch (error) {
|
|
89
|
-
process.exit(error?.status || 1);
|
|
90
|
-
}
|
|
91
|
-
} else {
|
|
92
|
-
// When running via direct import, mutate argv so the entrypoint sees the same aliases.
|
|
93
|
-
process.argv.splice(2, process.argv.length - 2, ...rewrittenArgs);
|
|
94
|
-
await import('../dist/index.mjs');
|
|
95
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execFileSync } from 'node:child_process';
|
|
4
|
+
import { existsSync, statSync } from 'node:fs';
|
|
5
|
+
import { dirname, join } from 'node:path';
|
|
6
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
7
|
+
|
|
8
|
+
// Ensure Node flags to reduce noisy warnings on stdout.
|
|
9
|
+
const hasNoWarnings = process.execArgv.includes('--no-warnings');
|
|
10
|
+
const hasNoDeprecation = process.execArgv.includes('--no-deprecation');
|
|
11
|
+
|
|
12
|
+
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
13
|
+
const distEntrypoint = join(projectRoot, 'dist', 'index.mjs');
|
|
14
|
+
const devEntrypoint = join(projectRoot, 'src', 'index.ts');
|
|
15
|
+
const entrypoint = (() => {
|
|
16
|
+
const forceSrc = process.env.FLOCKBAY_USE_SRC === '1';
|
|
17
|
+
const forceDist = process.env.FLOCKBAY_USE_DIST === '1';
|
|
18
|
+
|
|
19
|
+
const hasDist = existsSync(distEntrypoint);
|
|
20
|
+
const hasDev = existsSync(devEntrypoint);
|
|
21
|
+
|
|
22
|
+
if (forceSrc && hasDev) return devEntrypoint;
|
|
23
|
+
if (forceDist && hasDist) return distEntrypoint;
|
|
24
|
+
|
|
25
|
+
if (hasDist && hasDev) {
|
|
26
|
+
try {
|
|
27
|
+
const devTime = statSync(devEntrypoint).mtimeMs;
|
|
28
|
+
const distTime = statSync(distEntrypoint).mtimeMs;
|
|
29
|
+
if (devTime > distTime) return devEntrypoint;
|
|
30
|
+
} catch {
|
|
31
|
+
// ignore
|
|
32
|
+
}
|
|
33
|
+
return distEntrypoint;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return hasDist ? distEntrypoint : devEntrypoint;
|
|
37
|
+
})();
|
|
38
|
+
const useTsx = entrypoint.endsWith('.ts');
|
|
39
|
+
const invokedCwd = process.cwd();
|
|
40
|
+
|
|
41
|
+
function rewriteTopLevelAliases(args) {
|
|
42
|
+
const cmd = args[0];
|
|
43
|
+
if (cmd === 'install') return ['daemon', 'install', ...args.slice(1)];
|
|
44
|
+
if (cmd === 'uninstall') return ['daemon', 'uninstall', ...args.slice(1)];
|
|
45
|
+
return args;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function resolveTsxImportArgs() {
|
|
49
|
+
if (!useTsx) return [];
|
|
50
|
+
const candidates = [
|
|
51
|
+
join(projectRoot, 'node_modules', 'tsx', 'dist', 'esm', 'index.mjs'),
|
|
52
|
+
join(projectRoot, 'node_modules', 'tsx', 'dist', 'esm', 'index.js'),
|
|
53
|
+
join(projectRoot, 'node_modules', 'tsx', 'dist', 'index.mjs'),
|
|
54
|
+
join(projectRoot, 'node_modules', 'tsx', 'dist', 'index.js'),
|
|
55
|
+
];
|
|
56
|
+
const resolved = candidates.find(existsSync);
|
|
57
|
+
return resolved ? ['--import', toNodeSpecifier(resolved)] : ['--import', 'tsx'];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function toNodeSpecifier(p) {
|
|
61
|
+
if (process.platform !== 'win32') return p;
|
|
62
|
+
if (!/^[a-zA-Z]:[\\/]/.test(p)) return p;
|
|
63
|
+
return pathToFileURL(p).href;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const rewrittenArgs = rewriteTopLevelAliases(process.argv.slice(2));
|
|
67
|
+
|
|
68
|
+
if (!hasNoWarnings || !hasNoDeprecation || useTsx) {
|
|
69
|
+
try {
|
|
70
|
+
execFileSync(
|
|
71
|
+
process.execPath,
|
|
72
|
+
[
|
|
73
|
+
'--no-warnings',
|
|
74
|
+
'--no-deprecation',
|
|
75
|
+
...resolveTsxImportArgs(),
|
|
76
|
+
entrypoint,
|
|
77
|
+
...rewrittenArgs,
|
|
78
|
+
],
|
|
79
|
+
{
|
|
80
|
+
stdio: 'inherit',
|
|
81
|
+
...(useTsx ? { cwd: projectRoot } : {}),
|
|
82
|
+
env: {
|
|
83
|
+
...process.env,
|
|
84
|
+
...(useTsx ? { FLOCKBAY_INVOKED_CWD: invokedCwd } : {}),
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
);
|
|
88
|
+
} catch (error) {
|
|
89
|
+
process.exit(error?.status || 1);
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
// When running via direct import, mutate argv so the entrypoint sees the same aliases.
|
|
93
|
+
process.argv.splice(2, process.argv.length - 2, ...rewrittenArgs);
|
|
94
|
+
await import('../dist/index.mjs');
|
|
95
|
+
}
|
|
@@ -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,
|
|
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-DRXvc8Nt.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';
|
|
@@ -2030,11 +2030,24 @@ function normalizeFilePathToken(token) {
|
|
|
2030
2030
|
function resolveCandidatePath(candidate, cwd) {
|
|
2031
2031
|
const raw = normalizeFilePathToken(candidate);
|
|
2032
2032
|
if (!raw) return raw;
|
|
2033
|
+
const isWindowsPath = (value) => {
|
|
2034
|
+
const v = String(value || "").trim();
|
|
2035
|
+
if (!v) return false;
|
|
2036
|
+
if (/^[a-zA-Z]:[\\/]/.test(v)) return true;
|
|
2037
|
+
if (v.startsWith("\\\\")) return true;
|
|
2038
|
+
return false;
|
|
2039
|
+
};
|
|
2040
|
+
const isPosixPath = (value) => String(value || "").trim().startsWith("/");
|
|
2041
|
+
const resolveApi = (() => {
|
|
2042
|
+
if (isWindowsPath(raw) || isWindowsPath(cwd)) return path__default.win32;
|
|
2043
|
+
if (isPosixPath(raw) || isPosixPath(cwd)) return path__default.posix;
|
|
2044
|
+
return path__default;
|
|
2045
|
+
})();
|
|
2033
2046
|
if (raw.startsWith("~/")) {
|
|
2034
2047
|
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
2035
|
-
if (home) return
|
|
2048
|
+
if (home) return resolveApi.join(home, raw.slice(2));
|
|
2036
2049
|
}
|
|
2037
|
-
return
|
|
2050
|
+
return resolveApi.isAbsolute(raw) ? raw : resolveApi.resolve(cwd, raw);
|
|
2038
2051
|
}
|
|
2039
2052
|
function isImageBlock(block) {
|
|
2040
2053
|
if (!block || typeof block !== "object") return false;
|
|
@@ -15190,7 +15203,7 @@ async function authAndSetupMachineIfNeeded() {
|
|
|
15190
15203
|
process.exit(1);
|
|
15191
15204
|
}
|
|
15192
15205
|
try {
|
|
15193
|
-
const { migrateUnrealMcpToFlockbayMcp } = await import('./migratePlugin-
|
|
15206
|
+
const { migrateUnrealMcpToFlockbayMcp } = await import('./migratePlugin-CnpWYW1E.mjs');
|
|
15194
15207
|
const result = migrateUnrealMcpToFlockbayMcp({
|
|
15195
15208
|
engineRoot,
|
|
15196
15209
|
projectUprojectPath: project || void 0,
|
|
@@ -15346,7 +15359,7 @@ ${engineRoot}`;
|
|
|
15346
15359
|
} else if (subcommand === "codex") {
|
|
15347
15360
|
try {
|
|
15348
15361
|
await chdirToNearestUprojectRootIfPresent();
|
|
15349
|
-
const { runCodex } = await import('./runCodex-
|
|
15362
|
+
const { runCodex } = await import('./runCodex-Dhkynhhh.mjs');
|
|
15350
15363
|
let startedBy = void 0;
|
|
15351
15364
|
let sessionId = void 0;
|
|
15352
15365
|
for (let i = 1; i < args.length; i++) {
|
|
@@ -15448,7 +15461,7 @@ ${engineRoot}`;
|
|
|
15448
15461
|
}
|
|
15449
15462
|
try {
|
|
15450
15463
|
await chdirToNearestUprojectRootIfPresent();
|
|
15451
|
-
const { runGemini } = await import('./runGemini-
|
|
15464
|
+
const { runGemini } = await import('./runGemini-Dq5_59Us.mjs');
|
|
15452
15465
|
let startedBy = void 0;
|
|
15453
15466
|
let sessionId = void 0;
|
|
15454
15467
|
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-CN-EDgzo.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');
|
|
@@ -1319,7 +1319,7 @@ function buildDaemonSafeEnv(baseEnv, binPath) {
|
|
|
1319
1319
|
env[pathKey] = [...prepend, ...existingParts].join(pathSep);
|
|
1320
1320
|
return env;
|
|
1321
1321
|
}
|
|
1322
|
-
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-
|
|
1322
|
+
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-wU3LFfZh.cjs', document.baseURI).href)));
|
|
1323
1323
|
const __dirname$1 = path.join(__filename$1, "..");
|
|
1324
1324
|
function getGlobalClaudeVersion(claudeExecutable) {
|
|
1325
1325
|
try {
|
|
@@ -2052,11 +2052,24 @@ function normalizeFilePathToken(token) {
|
|
|
2052
2052
|
function resolveCandidatePath(candidate, cwd) {
|
|
2053
2053
|
const raw = normalizeFilePathToken(candidate);
|
|
2054
2054
|
if (!raw) return raw;
|
|
2055
|
+
const isWindowsPath = (value) => {
|
|
2056
|
+
const v = String(value || "").trim();
|
|
2057
|
+
if (!v) return false;
|
|
2058
|
+
if (/^[a-zA-Z]:[\\/]/.test(v)) return true;
|
|
2059
|
+
if (v.startsWith("\\\\")) return true;
|
|
2060
|
+
return false;
|
|
2061
|
+
};
|
|
2062
|
+
const isPosixPath = (value) => String(value || "").trim().startsWith("/");
|
|
2063
|
+
const resolveApi = (() => {
|
|
2064
|
+
if (isWindowsPath(raw) || isWindowsPath(cwd)) return path.win32;
|
|
2065
|
+
if (isPosixPath(raw) || isPosixPath(cwd)) return path.posix;
|
|
2066
|
+
return path;
|
|
2067
|
+
})();
|
|
2055
2068
|
if (raw.startsWith("~/")) {
|
|
2056
2069
|
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
2057
|
-
if (home) return
|
|
2070
|
+
if (home) return resolveApi.join(home, raw.slice(2));
|
|
2058
2071
|
}
|
|
2059
|
-
return
|
|
2072
|
+
return resolveApi.isAbsolute(raw) ? raw : resolveApi.resolve(cwd, raw);
|
|
2060
2073
|
}
|
|
2061
2074
|
function isImageBlock(block) {
|
|
2062
2075
|
if (!block || typeof block !== "object") return false;
|
|
@@ -15212,7 +15225,7 @@ async function authAndSetupMachineIfNeeded() {
|
|
|
15212
15225
|
process.exit(1);
|
|
15213
15226
|
}
|
|
15214
15227
|
try {
|
|
15215
|
-
const { migrateUnrealMcpToFlockbayMcp } = await Promise.resolve().then(function () { return require('./migratePlugin-
|
|
15228
|
+
const { migrateUnrealMcpToFlockbayMcp } = await Promise.resolve().then(function () { return require('./migratePlugin-CyXgJ-se.cjs'); });
|
|
15216
15229
|
const result = migrateUnrealMcpToFlockbayMcp({
|
|
15217
15230
|
engineRoot,
|
|
15218
15231
|
projectUprojectPath: project || void 0,
|
|
@@ -15368,7 +15381,7 @@ ${engineRoot}`;
|
|
|
15368
15381
|
} else if (subcommand === "codex") {
|
|
15369
15382
|
try {
|
|
15370
15383
|
await chdirToNearestUprojectRootIfPresent();
|
|
15371
|
-
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-
|
|
15384
|
+
const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-jDfLDJJW.cjs'); });
|
|
15372
15385
|
let startedBy = void 0;
|
|
15373
15386
|
let sessionId = void 0;
|
|
15374
15387
|
for (let i = 1; i < args.length; i++) {
|
|
@@ -15470,7 +15483,7 @@ ${engineRoot}`;
|
|
|
15470
15483
|
}
|
|
15471
15484
|
try {
|
|
15472
15485
|
await chdirToNearestUprojectRootIfPresent();
|
|
15473
|
-
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-
|
|
15486
|
+
const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-DN189-WI.cjs'); });
|
|
15474
15487
|
let startedBy = void 0;
|
|
15475
15488
|
let sessionId = void 0;
|
|
15476
15489
|
for (let i = 1; i < args.length; i++) {
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
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-DRXvc8Nt.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, d as installUnrealMcpPluginToEngine } from './types-
|
|
3
|
+
import { i as installUnrealMcpPluginToProject, b as isInstalledEngineRoot, q as quarantineLegacyEnginePlugins, d as installUnrealMcpPluginToEngine } from './types-DRXvc8Nt.mjs';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import 'node:os';
|
|
6
6
|
import 'node:events';
|
|
@@ -141,9 +141,19 @@ Error: ${message}` };
|
|
|
141
141
|
if (projectUprojectPath) {
|
|
142
142
|
const installedProject = installUnrealMcpPluginToProject(projectUprojectPath);
|
|
143
143
|
if (!installedProject.ok) return { ok: false, errorMessage: installedProject.errorMessage };
|
|
144
|
+
if (isInstalledEngineRoot(engineRoot)) {
|
|
145
|
+
const quarantine = quarantineLegacyEnginePlugins(engineRoot);
|
|
146
|
+
if (!quarantine.ok) return { ok: false, errorMessage: quarantine.errorMessage };
|
|
147
|
+
}
|
|
144
148
|
return { ok: true, installedDestDir: installedProject.destDir, changedProjectPath, removedLegacyPluginDirs };
|
|
145
149
|
}
|
|
146
150
|
if (isInstalledEngineRoot(engineRoot)) {
|
|
151
|
+
const quarantine = quarantineLegacyEnginePlugins(engineRoot);
|
|
152
|
+
if (!quarantine.ok) return { ok: false, errorMessage: quarantine.errorMessage };
|
|
153
|
+
const disabledMeta = quarantine.disabledUpluginPaths.length ? `
|
|
154
|
+
|
|
155
|
+
Detected and disabled legacy engine plugin descriptor(s) to unblock builds:
|
|
156
|
+
` + quarantine.disabledUpluginPaths.map((p) => `- ${p}`).join("\n") : "";
|
|
147
157
|
return {
|
|
148
158
|
ok: false,
|
|
149
159
|
errorMessage: [
|
|
@@ -152,7 +162,7 @@ Error: ${message}` };
|
|
|
152
162
|
"",
|
|
153
163
|
"Fix: re-run migration with a project path to install as a project plugin:",
|
|
154
164
|
" flockbay unreal-mcp migrate --engine-root <ENGINE_ROOT> --project <PATH_TO_.UPROJECT> --remove-legacy"
|
|
155
|
-
].join("\n")
|
|
165
|
+
].join("\n") + disabledMeta
|
|
156
166
|
};
|
|
157
167
|
}
|
|
158
168
|
const installed = installUnrealMcpPluginToEngine(engineRoot);
|