unbrowse 8.3.0-preview.1 → 8.3.0-preview.2
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/package.json +5 -8
- package/runtime/cli.js +1 -1
- package/scripts/postinstall.mjs +13 -0
- package/scripts/prune-foreign-binaries.mjs +61 -0
- package/vendor/kuri/darwin-arm64/kuri +0 -0
- package/vendor/kuri/darwin-arm64/libkuri_ffi.dylib +0 -0
- package/vendor/kuri/darwin-x64/libkuri_ffi.dylib +0 -0
- package/vendor/kuri/linux-arm64/libkuri_ffi.so +0 -0
- package/vendor/kuri/linux-x64/kuri +0 -0
- package/vendor/kuri/linux-x64/libkuri_ffi.so +0 -0
- package/vendor/kuri/manifest.json +9 -9
- package/vendor/kuri/win-x64/kuri.exe +0 -0
- package/vendor/utls-proxy/utls-proxy-darwin-amd64 +0 -0
- package/vendor/utls-proxy/utls-proxy-darwin-arm64 +0 -0
- package/vendor/utls-proxy/utls-proxy-linux-arm64 +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unbrowse",
|
|
3
|
-
"version": "8.3.0-preview.
|
|
3
|
+
"version": "8.3.0-preview.2",
|
|
4
4
|
"description": "Reverse-engineer any website into reusable API skills. Zero-dep single binary with embedded browser engine.",
|
|
5
5
|
"mcpName": "io.github.unbrowse-ai/unbrowse",
|
|
6
6
|
"type": "module",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"vendor/utls-proxy",
|
|
26
26
|
"scripts/release-assets.mjs",
|
|
27
27
|
"scripts/postinstall.mjs",
|
|
28
|
+
"scripts/prune-foreign-binaries.mjs",
|
|
28
29
|
"scripts/postinstall-ping.mjs",
|
|
29
30
|
"scripts/verify-release-assets.mjs",
|
|
30
31
|
"README.md",
|
|
@@ -42,23 +43,19 @@
|
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@fastify/cors": "^11.2.0",
|
|
45
|
-
"@fastify/rate-limit": "^10.3.0",
|
|
46
|
-
"@solana/kit": "^6.6.0",
|
|
47
|
-
"@x402/fetch": "^2.9.0",
|
|
48
46
|
"bs58": "^6.0.0",
|
|
49
47
|
"cheerio": "^1.2.0",
|
|
50
48
|
"dotenv": "^17.3.1",
|
|
51
49
|
"fastify": "^5.7.4",
|
|
52
50
|
"nanoid": "^5.1.6",
|
|
53
|
-
"tsx": "^4.20.6",
|
|
54
51
|
"ws": "^8.19.0"
|
|
55
52
|
},
|
|
56
53
|
"optionalDependencies": {
|
|
57
|
-
"keytar": "^7.9.0"
|
|
58
|
-
"@faremeter/flex-solana": "^0.2.1"
|
|
54
|
+
"keytar": "^7.9.0"
|
|
59
55
|
},
|
|
60
56
|
"devDependencies": {
|
|
61
|
-
"@types/node": "^24.6.1"
|
|
57
|
+
"@types/node": "^24.6.1",
|
|
58
|
+
"tsx": "^4.20.6"
|
|
62
59
|
},
|
|
63
60
|
"engines": {
|
|
64
61
|
"node": ">=22.5"
|
package/runtime/cli.js
CHANGED
|
@@ -1019,7 +1019,7 @@ var init_cached_resolution = __esm(() => {
|
|
|
1019
1019
|
});
|
|
1020
1020
|
|
|
1021
1021
|
// .tmp-runtime-src/build-info.generated.ts
|
|
1022
|
-
var BUILD_RELEASE_VERSION = "8.3.0-preview.
|
|
1022
|
+
var BUILD_RELEASE_VERSION = "8.3.0-preview.2", BUILD_GIT_SHA = "f6d6fe373987", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiOC4zLjAtcHJldmlldy4yIiwiZ2l0X3NoYSI6ImY2ZDZmZTM3Mzk4NyIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFAZjZkNmZlMzczOTg3IiwiaXNzdWVkX2F0IjoiMjAyNi0wNi0wNlQwODoyNzo0Mi43NDdaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "umoIaiWXMDcPaJOkssS1d5BlwM17T3yDINApOuQgJ3c", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
1023
1023
|
|
|
1024
1024
|
// .tmp-runtime-src/version.ts
|
|
1025
1025
|
import { createHash as createHash2 } from "crypto";
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -95,3 +95,16 @@ try {
|
|
|
95
95
|
} catch {
|
|
96
96
|
/* Telemetry must never break install. */
|
|
97
97
|
}
|
|
98
|
+
|
|
99
|
+
// konmari: keep only THIS host's vendored native binaries — deletes the other platforms'
|
|
100
|
+
// (~40 MB lighter per install). Fail-safe + idempotent in the script; never blocks/breaks
|
|
101
|
+
// install. Opt out with UNBROWSE_NO_PRUNE=1.
|
|
102
|
+
try {
|
|
103
|
+
const { spawnSync } = await import("node:child_process");
|
|
104
|
+
spawnSync(process.execPath, [join(__dirname, "prune-foreign-binaries.mjs")], {
|
|
105
|
+
stdio: "inherit",
|
|
106
|
+
env: process.env,
|
|
107
|
+
});
|
|
108
|
+
} catch {
|
|
109
|
+
/* The prune is best-effort; install must never break on it. */
|
|
110
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* prune-foreign-binaries.mjs — konmari: after install, keep only THIS host's vendored
|
|
4
|
+
* native binaries (kuri, utls-proxy) and delete the other platforms'. The runtime resolver
|
|
5
|
+
* picks host-by-name (src/kuri/client.ts → vendor/kuri/<platform>-<arch>/;
|
|
6
|
+
* src/cdp/proxy/utls-daemon.ts → vendor/utls-proxy/utls-proxy-<platform>-<goarch>), so the
|
|
7
|
+
* foreign binaries are provably unused on this machine — ~40 MB of dead weight per install.
|
|
8
|
+
*
|
|
9
|
+
* Fail-safe (Luke 15:4): if the host's own binary is ABSENT, prune NOTHING — never orphan the
|
|
10
|
+
* CLI. Idempotent (only deletes non-host entries). Opt out with UNBROWSE_NO_PRUNE=1.
|
|
11
|
+
*/
|
|
12
|
+
import { existsSync, readdirSync, rmSync, statSync } from "node:fs";
|
|
13
|
+
import { dirname, join } from "node:path";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
15
|
+
|
|
16
|
+
if (process.env.UNBROWSE_NO_PRUNE === "1") process.exit(0);
|
|
17
|
+
|
|
18
|
+
const rootArgIdx = process.argv.indexOf("--root");
|
|
19
|
+
const root = rootArgIdx !== -1 ? process.argv[rootArgIdx + 1]
|
|
20
|
+
: join(dirname(fileURLToPath(import.meta.url)), ".."); // scripts/ -> package root
|
|
21
|
+
|
|
22
|
+
const platform = process.platform;
|
|
23
|
+
const arch = process.arch;
|
|
24
|
+
const goarch = arch === "x64" ? "amd64" : arch === "arm64" ? "arm64" : arch;
|
|
25
|
+
// Match the runtime resolver EXACTLY (src/kuri/client.ts: win32+x64 → "win-x64", NOT
|
|
26
|
+
// "win32-x64"); a mismatch here makes the prune inert on that platform (or, worse, treat the
|
|
27
|
+
// host's own dir as foreign). Mirror currentBundledKuriTarget().
|
|
28
|
+
const hostKuriDir = (platform === "win32" && arch === "x64") ? "win-x64" : `${platform}-${arch}`;
|
|
29
|
+
const hostUtlsBin = `utls-proxy-${platform}-${goarch}`; // resolver uses the same raw formula (utls-daemon.ts)
|
|
30
|
+
|
|
31
|
+
const du = (p) => {
|
|
32
|
+
try { return statSync(p).isDirectory() ? readdirSync(p).reduce((a, f) => a + du(join(p, f)), 0) : statSync(p).size; }
|
|
33
|
+
catch { return 0; }
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
let freed = 0;
|
|
37
|
+
|
|
38
|
+
// kuri: keep the host platform dir, delete the others — only if the host dir exists
|
|
39
|
+
const kuriDir = join(root, "vendor", "kuri");
|
|
40
|
+
if (existsSync(join(kuriDir, hostKuriDir))) {
|
|
41
|
+
for (const name of readdirSync(kuriDir)) {
|
|
42
|
+
const p = join(kuriDir, name);
|
|
43
|
+
if (name !== hostKuriDir && existsSync(p) && statSync(p).isDirectory()) {
|
|
44
|
+
freed += du(p); rmSync(p, { recursive: true, force: true });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// utls-proxy: keep the host binary, delete the other utls-proxy-* binaries — only if host exists
|
|
50
|
+
const utlsDir = join(root, "vendor", "utls-proxy");
|
|
51
|
+
if (existsSync(join(utlsDir, hostUtlsBin))) {
|
|
52
|
+
for (const name of readdirSync(utlsDir)) {
|
|
53
|
+
if (name.startsWith("utls-proxy-") && name !== hostUtlsBin) {
|
|
54
|
+
const p = join(utlsDir, name); freed += du(p); rmSync(p, { force: true });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (freed > 0) {
|
|
60
|
+
console.error(`[unbrowse] konmari: pruned ${(freed / 1048576).toFixed(1)} MB of foreign-platform binaries (kept ${hostKuriDir} / ${hostUtlsBin})`);
|
|
61
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"repo_url": "https://github.com/justrach/kuri.git",
|
|
3
3
|
"branch": "adding-extensions",
|
|
4
4
|
"source_sha": "8938f89f3d0c032bd19c59db0de4eadca18a1800",
|
|
5
|
-
"built_at": "2026-06-
|
|
5
|
+
"built_at": "2026-06-06T08:08:33.865Z",
|
|
6
6
|
"binaries": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"zig_target": "aarch64-macos",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"source": "placeholder",
|
|
10
|
+
"sha256": "ca459cd22baadb02a3e246c547e39a2b9a3eccc2b50852b5a05386b3c584c760"
|
|
11
11
|
},
|
|
12
12
|
"darwin-x64": {
|
|
13
13
|
"zig_target": "x86_64-macos",
|
|
@@ -21,33 +21,33 @@
|
|
|
21
21
|
},
|
|
22
22
|
"linux-x64": {
|
|
23
23
|
"zig_target": "x86_64-linux",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "86517fb46e703870254ab0346f0e23645566efa4ed9c9f57d4501e4dbf5457c1"
|
|
25
25
|
},
|
|
26
26
|
"win-x64": {
|
|
27
27
|
"zig_target": "x86_64-windows-gnu",
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "7e853a7b252655bb6e9d8420a5b00a4b9114a3c48ce2edffd18ab76abdf1f7ca"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"ffi": {
|
|
32
32
|
"darwin-arm64": {
|
|
33
33
|
"zig_target": "aarch64-macos",
|
|
34
34
|
"lib": "libkuri_ffi.dylib",
|
|
35
|
-
"sha256": "
|
|
35
|
+
"sha256": "802ef056c63b14bb6bfd6526dac2d91167208279d0412423be2912d3ddc93cf5"
|
|
36
36
|
},
|
|
37
37
|
"darwin-x64": {
|
|
38
38
|
"zig_target": "x86_64-macos",
|
|
39
39
|
"lib": "libkuri_ffi.dylib",
|
|
40
|
-
"sha256": "
|
|
40
|
+
"sha256": "d9afeea945564cc0b260c242c594c53c82e16a837befb85a99f8324d85d5ced4"
|
|
41
41
|
},
|
|
42
42
|
"linux-arm64": {
|
|
43
43
|
"zig_target": "aarch64-linux",
|
|
44
44
|
"lib": "libkuri_ffi.so",
|
|
45
|
-
"sha256": "
|
|
45
|
+
"sha256": "65e4b04890d1512b9088ed607dbc6264f6befe404b8fb4e7bac6b31c391bc7f0"
|
|
46
46
|
},
|
|
47
47
|
"linux-x64": {
|
|
48
48
|
"zig_target": "x86_64-linux",
|
|
49
49
|
"lib": "libkuri_ffi.so",
|
|
50
|
-
"sha256": "
|
|
50
|
+
"sha256": "d4027bf3ad4099ccd0c970b4695253aefc258ab711fe17ecc9c9ddb67d404aa4"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|