agent-browser-stealth 0.16.1-fork.1 → 0.16.1-fork.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-browser-stealth",
3
- "version": "0.16.1-fork.1",
3
+ "version": "0.16.1-fork.2",
4
4
  "description": "Stealth browser automation CLI for AI agents with anti-bot evasions",
5
5
  "type": "module",
6
6
  "main": "dist/daemon.js",
@@ -27,7 +27,7 @@
27
27
  "build:windows": "npm run version:sync && docker compose -f docker/docker-compose.yml run --rm build-windows",
28
28
  "build:all-platforms": "npm run version:sync && (npm run build:linux & npm run build:windows & wait) && npm run build:macos",
29
29
  "build:docker": "docker build -t agent-browser-builder -f docker/Dockerfile.build .",
30
- "release": "npm run version:sync && npm run build && npm run build:all-platforms && npm publish",
30
+ "release": "npm run version:sync && npm run build && npm run build:all-platforms && npm run verify:bundled-binaries && npm run verify:native-version && npm publish",
31
31
  "start": "node dist/daemon.js",
32
32
  "dev": "tsx src/daemon.ts",
33
33
  "typecheck": "tsc --noEmit",
@@ -41,12 +41,13 @@
41
41
  "check:turnstile-testkey": "pnpm exec tsx scripts/check-turnstile-testkey.ts",
42
42
  "postinstall": "node scripts/postinstall.js",
43
43
  "verify:native-version": "node scripts/verify-native-version.js",
44
+ "verify:bundled-binaries": "node scripts/verify-bundled-binaries.js",
44
45
  "clawhub:sync": "bash scripts/clawhub-sync.sh",
45
46
  "sync:upstream": "bash scripts/sync-upstream.sh",
46
47
  "sync:upstream:push": "bash scripts/sync-upstream.sh --push",
47
48
  "changeset": "changeset",
48
49
  "ci:version": "changeset version && pnpm run version:sync && pnpm install --no-frozen-lockfile",
49
- "ci:publish": "pnpm run version:sync && pnpm run build && pnpm run build:native && pnpm run verify:native-version && changeset publish"
50
+ "ci:publish": "pnpm run version:sync && pnpm run build && pnpm run build:native && pnpm run verify:bundled-binaries && pnpm run verify:native-version && changeset publish"
50
51
  },
51
52
  "keywords": [
52
53
  "browser",
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Verifies that all bundled platform binaries are present and embed the
5
+ * package.json version string. This catches stale binary bundles where the
6
+ * package version is bumped but one or more binaries were not rebuilt.
7
+ */
8
+
9
+ import { existsSync, readFileSync, statSync } from "fs";
10
+ import { dirname, join } from "path";
11
+ import { fileURLToPath } from "url";
12
+
13
+ const __dirname = dirname(fileURLToPath(import.meta.url));
14
+ const rootDir = join(__dirname, "..");
15
+
16
+ const pkg = JSON.parse(readFileSync(join(rootDir, "package.json"), "utf8"));
17
+ const expectedVersion = String(pkg.version || "").trim();
18
+
19
+ if (!expectedVersion) {
20
+ console.error("Error: package.json version is empty");
21
+ process.exit(1);
22
+ }
23
+
24
+ const expectedBinaries = [
25
+ "agent-browser-linux-x64",
26
+ "agent-browser-linux-arm64",
27
+ "agent-browser-win32-x64.exe",
28
+ "agent-browser-darwin-x64",
29
+ "agent-browser-darwin-arm64",
30
+ ];
31
+
32
+ const minSizeBytes = 100_000;
33
+ const versionBytes = Buffer.from(expectedVersion, "utf8");
34
+
35
+ let errors = 0;
36
+
37
+ for (const name of expectedBinaries) {
38
+ const binaryPath = join(rootDir, "bin", name);
39
+ if (!existsSync(binaryPath)) {
40
+ console.error(`ERROR: missing binary: bin/${name}`);
41
+ errors += 1;
42
+ continue;
43
+ }
44
+
45
+ const size = statSync(binaryPath).size;
46
+ if (size < minSizeBytes) {
47
+ console.error(
48
+ `ERROR: binary too small: bin/${name} (${size} bytes, expected >= ${minSizeBytes})`
49
+ );
50
+ errors += 1;
51
+ continue;
52
+ }
53
+
54
+ const bytes = readFileSync(binaryPath);
55
+ if (!bytes.includes(versionBytes)) {
56
+ console.error(
57
+ `ERROR: stale binary version: bin/${name} does not contain "${expectedVersion}"`
58
+ );
59
+ errors += 1;
60
+ continue;
61
+ }
62
+
63
+ console.log(`OK: bin/${name} matches version ${expectedVersion}`);
64
+ }
65
+
66
+ if (errors > 0) {
67
+ console.error(`\nFound ${errors} binary validation issue(s).`);
68
+ process.exit(1);
69
+ }
70
+
71
+ console.log(`\nAll bundled binaries match package.json version ${expectedVersion}.`);