ghostfox 0.8.2 → 0.9.0

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 CHANGED
@@ -14,7 +14,7 @@ Then wire it into any MCP client (Claude Code, Cursor, ...):
14
14
  ```json
15
15
  {
16
16
  "mcpServers": {
17
- "ghostcloak": { "command": "npx", "args": ["-y", "ghostfox", "mcp"] }
17
+ "ghostfox": { "command": "npx", "args": ["-y", "ghostfox", "mcp"] }
18
18
  }
19
19
  }
20
20
  ```
package/bin/ghostfox.js CHANGED
@@ -19,7 +19,10 @@ const zlib = require("zlib");
19
19
  const REPO = "autokeren/ghostfox";
20
20
  const ROOT = process.env.GHOSTFOX_ROOT || path.join(os.homedir(), ".ghostfox");
21
21
  const ENGINE = path.join(ROOT, "engine");
22
- const MCP_BIN = path.join(ROOT, "mcp", os.platform() === "win32" ? "ghostcloak-mcp.exe" : "ghostcloak-mcp");
22
+ const MCP_BIN = path.join(ROOT, "mcp",
23
+ os.platform() === "win32" ? "ghostfox-mcp.exe"
24
+ : os.platform() === "darwin" ? "ghostfox-mcp-darwin"
25
+ : "ghostfox-mcp");
23
26
 
24
27
  function log(msg) { process.stderr.write(`ghostfox: ${msg}\n`); }
25
28
 
@@ -67,9 +70,10 @@ async function install() {
67
70
  const assets = Object.fromEntries(rel.assets.map((a) => [a.name, a.browser_download_url]));
68
71
 
69
72
  if (!fs.existsSync(MCP_BIN)) {
70
- const rtAsset = os.platform() === "win32" ? "ghostcloak-mcp.exe"
71
- : os.platform() === "linux" && os.arch() === "arm64" ? "ghostcloak-mcp-arm64"
72
- : "ghostcloak-mcp";
73
+ const rtAsset = os.platform() === "win32" ? "ghostfox-mcp.exe"
74
+ : os.platform() === "darwin" ? "ghostfox-mcp-darwin"
75
+ : os.platform() === "linux" && os.arch() === "arm64" ? "ghostfox-mcp-arm64"
76
+ : "ghostfox-mcp";
73
77
  const url = assets[rtAsset];
74
78
  if (!url) throw new Error("no prebuilt runtime asset on the latest release — build it from source (see the repo README)");
75
79
  log("downloading ghostcloak-mcp runtime...");
@@ -81,8 +85,21 @@ async function install() {
81
85
  if (!fs.existsSync(path.join(ENGINE, "ghostfox-bin"))) {
82
86
  const platform = os.platform() === "linux" ? "lin" : os.platform() === "darwin" ? "mac" : "win";
83
87
  const arch = os.arch() === "arm64" ? "arm64" : "x86_64";
84
- const asset = Object.keys(assets).find((n) => n.includes(`${platform}.${arch}`) && n.endsWith(".zip"));
85
- if (!asset) throw new Error(`no prebuilt engine for ${platform}-${arch} on the latest release`);
88
+ const want = (a) => a.includes(`${platform}.${arch}`) && a.endsWith(".zip");
89
+ let asset = Object.keys(assets).find(want);
90
+ // Engine builds land ~2h after a release; when the latest release is
91
+ // still engine-less (runtime-only), fall back to the most recent
92
+ // release that HAS the engine zip.
93
+ if (!asset) {
94
+ log("engine zip not on the latest release yet — checking previous releases...");
95
+ const rels = await fetchJson(`https://api.github.com/repos/${REPO}/releases?per_page=10`);
96
+ for (const rel of rels) {
97
+ const prevAssets = Object.fromEntries(rel.assets.map((a) => [a.name, a.browser_download_url]));
98
+ const hit = Object.keys(prevAssets).find(want);
99
+ if (hit) { asset = hit; assets[asset] = prevAssets[hit]; log(`using ${asset} from ${rel.tag_name}`); break; }
100
+ }
101
+ }
102
+ if (!asset) throw new Error(`no prebuilt engine for ${platform}-${arch} on any release`);
86
103
  log(`downloading engine (${asset}) — this is ~650MB...`);
87
104
  const tmp = path.join(os.tmpdir(), "ghostfox-engine.zip");
88
105
  await download(assets[asset], tmp);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghostfox",
3
- "version": "0.8.2",
3
+ "version": "0.9.0",
4
4
  "description": "The agent-native stealth browser with 8 captcha solver families + debug cortex \u2014 MCP launcher + installer for Ghostfox (fingerprint-coherent Firefox engine + Rust MCP runtime).",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {