Summary
agent-browser@0.39.1 (current latest) publishes all seven prebuilt binaries inside the main package, so every install downloads and unpacks every platform:
file in bin/ | bytes |
|---|---|
| agent-browser-darwin-arm64 | 15,803,440 |
| agent-browser-darwin-x64 | 17,441,576 |
| agent-browser-linux-arm64 | 15,844,112 |
| agent-browser-linux-musl-arm64 | 15,642,552 |
| agent-browser-linux-musl-x64 | 18,102,976 |
| agent-browser-linux-x64 | 18,305,528 |
| agent-browser-win32-x64.exe | 17,922,560 |
Registry facts:
- tarball: 53,561,140 B (~53.6 MB)
- unpacked: 119,447,219 B (~119.5 MB), 45 files (
npm view agent-browser@0.39.1 dist) dependencies/optionalDependencies: none — the binaries are simply listed infiles: ["bin", ...]of the main package- the binaries are 99.7% of the unpacked payload, and any given host runs exactly one of them
Measured impact (Linux x64, node 26, pnpm 12.11.2)
- fetching the tarball directly: 53.56 MB in 0.87 s (61.8 MB/s) — the network is not the problem
- cold
pnpm install -g agent-browser@0.39.1with an empty store: 6.0–8.4 s, almost entirely time spent writing/unpacking ~119 MB (this machine does ~28 MB/s fsync writes) - same command with a warm store: 0.09–0.12 s
- on a Linux x64 host the only usable binary is
agent-browser-linux-x64(18.3 MB; 7,714,144 B when gzipped with-9), so ~45 MB of the 53.56 MB download is for platforms that can never run here
A secondary effect of bundling the binaries in the main package is that a postinstall script is required (chmod + repoint the global symlink). pnpm ≥10 blocks dependency build scripts by default, so a global install with pnpm 12 stops on the interactive "Choose which packages to build" prompt — a cold install that takes 6 s when the prompt is answered immediately measured "Done in 15s" when the answer arrived 15 s later. The CLI itself keeps working (the JS wrapper chmods at runtime), so this is friction rather than breakage.
Suggestion
Publish per-platform packages (@agent-browser/linux-x64, @agent-browser/darwin-arm64, @agent-browser/win32-x64, ...) and reference them from optionalDependencies with os/cpu/libc fields — the pattern used by esbuild, @swc/core, rollup and rolldown. A Linux x64 install would then fetch ~8 MB instead of 53.56 MB and unpack ~18 MB instead of ~119 MB, and the postinstall script would no longer be needed on the normal path.
Related: #1422, #1577 (verification of the fallback postinstall download) — this report is about what the main tarball contains.
Reproduction
$ npm view agent-browser@0.39.1 dist --json
$ npm pack agent-browser@0.39.1 # 53.56 MB
$ ls -l node_modules/agent-browser/bin
$ gzip -9 -c node_modules/agent-browser/bin/agent-browser-linux-x64 | wc -c
7714144Activity
0No activity yet.