capiumbrowser 1.1.4 → 1.1.6

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/lib/channels.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "_comment": "SINGLE SOURCE OF TRUTH for the current stable Capium browser build per OS/arch. Each OS reaches stable independently -- edit one entry without touching the others. This file ships inside the wheel (the SDK reads it to pick each host's stable build) AND is published to the download server by the release pipeline. `version` is the Chromium version (what the browser reports to the customer -- unchanged by the revision); `revision` is our packaging counter -- the served R2 folder is chromium-v<version>.<revision>/, ALWAYS dotted-suffixed starting at 1 (chromium-v<version>.1/ is the first build, .2/ a same-engine re-spin), so publishing a re-spin never overwrites the artifact older SDKs still fetch. `published: false` means the tag is declared but no artifact exists yet -- the SDK raises a clear 'not published yet' error instead of a raw 404.",
3
- "schema": 1,
4
- "updated": "2026-09-29",
5
- "channels": {
6
- "stable": {
7
- "windows-x64": {
8
- "version": "153.0.8010.53",
9
- "engine_version": "153.0.8010.52",
10
- "revision": 3,
11
- "sha256": "af8ca122fe5ba572c985ee83869371505aba4e9cf6696c9385c68b28001c43ef",
12
- "published": true
13
- },
14
- "macos-arm64": {
15
- "version": "153.0.8010.53",
16
- "engine_version": "153.0.8010.52",
17
- "revision": 3,
18
- "sha256": "4f41a66c792781e86bff653cd91adb3d41733c67d350d70c5c7c4287621a679f",
19
- "published": true
20
- },
21
- "linux-x64": {
22
- "version": "153.0.8010.52",
23
- "revision": 2,
24
- "sha256": "bb6f88b874f41718250cc26f50976c6cd27167a7583b5169fbcac99619d0eafc",
25
- "published": true
26
- },
27
- "linux-arm64": {
28
- "version": "153.0.8010.52",
29
- "revision": 1,
30
- "sha256": null,
31
- "published": false
32
- }
33
- }
34
- }
35
- }
1
+ {
2
+ "_comment": "SINGLE SOURCE OF TRUTH for the current stable Capium browser build per OS/arch. Each OS reaches stable independently -- edit one entry without touching the others. This file ships inside the wheel (the SDK reads it to pick each host's stable build) AND is published to the download server by the release pipeline. `version` is the Chromium version (what the browser reports to the customer -- unchanged by the revision); `revision` is our packaging counter -- the served R2 folder is chromium-v<version>.<revision>/, ALWAYS dotted-suffixed starting at 1 (chromium-v<version>.1/ is the first build, .2/ a same-engine re-spin), so publishing a re-spin never overwrites the artifact older SDKs still fetch. `published: false` means the tag is declared but no artifact exists yet -- the SDK raises a clear 'not published yet' error instead of a raw 404.",
3
+ "schema": 1,
4
+ "updated": "2026-10-06",
5
+ "channels": {
6
+ "stable": {
7
+ "windows-x64": {
8
+ "version": "153.0.8010.53",
9
+ "engine_version": "153.0.8010.52",
10
+ "revision": 5,
11
+ "sha256": "3f53b86f80a3b145cb75995615f19c957a74d6a1a0ae1151ff64517b3a931d67",
12
+ "published": true
13
+ },
14
+ "macos-arm64": {
15
+ "version": "153.0.8010.53",
16
+ "engine_version": "153.0.8010.52",
17
+ "revision": 5,
18
+ "sha256": "4e65cc764eda17a5ea9a70eafdda214fccac78b8ddf4de41a05addf036006f43",
19
+ "published": true
20
+ },
21
+ "linux-x64": {
22
+ "version": "153.0.8010.52",
23
+ "revision": 4,
24
+ "sha256": "5968821210bb54c7003637444dbf52ccfc93e06d229d21da240b8fc3cfd35d98",
25
+ "published": true
26
+ },
27
+ "linux-arm64": {
28
+ "version": "153.0.8010.52",
29
+ "revision": 1,
30
+ "sha256": null,
31
+ "published": false
32
+ }
33
+ }
34
+ }
35
+ }
package/lib/config.js CHANGED
@@ -52,6 +52,11 @@ function getDefaultStealthArgs(seed = null, platform = 'windows', screen = [1440
52
52
  'primaryPointerType=4,availablePointerTypes=4',
53
53
  '--no-first-run',
54
54
  '--no-default-browser-check',
55
+ // NOTE: capium "CDP stealth" (isolated-world eval + console-API masking that make a vanilla
56
+ // driver behave like patchright vs DataDome/rebrowser) is ON BY DEFAULT in the binary -- no
57
+ // flag needed. To opt out (e.g. a solver needing page.evaluate to read the page's own
58
+ // main-world window globals, which the isolated world can't see), pass
59
+ // extra: ['--capium-disable-cdp-stealth'].
55
60
  );
56
61
  // Patch 001 makes developer_tools always false, which unmasks FingerprintJS's
57
62
  // tampering ML: per-seed canvas/audio NOISE would then read as tampering, so
package/lib/version.js CHANGED
@@ -1,139 +1,139 @@
1
- /**
2
- * Version of the capium Node SDK (independent of the browser binary version).
3
- *
4
- * The SDK version and the Capium/Chromium binary version move on separate cadences: you update
5
- * the SDK with `npm install -U capiumbrowser`, and the SDK fetches the *default* binary build to
6
- * match. Crucially that default is **per platform** -- each OS/arch reaches a stable Capium build
7
- * independently (Windows can sit on 150 while macOS is on 151).
8
- *
9
- * The stable build for each OS is not hardcoded here; it comes from `channels.json`, which ships
10
- * inside the package and is the single source of truth (the release pipeline edits that file to
11
- * promote an OS to a new stable, and the same file is published to the download server). This
12
- * module just loads it; FALLBACK_VERSIONS is used only if the bundled manifest is missing or
13
- * corrupt in an install.
14
- *
15
- * Override order at download time: CAPIUM_VERSION env > per-OS stable from channels.json.
16
- */
17
- 'use strict';
18
-
19
- const fs = require('fs');
20
- const os = require('os');
21
- const path = require('path');
22
-
23
- const SDK_VERSION = require('../package.json').version;
24
-
25
- // Used only if channels.json can't be read (corrupt/removed install). ensureBinary() raises a
26
- // clear error long before the "unsupported platform" case matters; this keeps lookups total.
27
- const FALLBACK_VERSIONS = {
28
- 'windows-x64': '153.0.8010.52', // real Chrome 152 stable per OS (win/mac .65, linux .64)
29
- 'macos-arm64': '153.0.8010.52',
30
- 'linux-x64': '153.0.8010.52',
31
- 'linux-arm64': '153.0.8010.52', // declared; not yet published (see channels.json)
32
- };
33
- const DEFAULT_BINARY_VERSION = '153.0.8010.52';
34
-
35
- function loadStable() {
36
- // The `channels.stable` map from the bundled manifest, or null if unreadable.
37
- try {
38
- const raw = fs.readFileSync(path.join(__dirname, 'channels.json'), 'utf8');
39
- const stable = JSON.parse(raw).channels.stable;
40
- return stable && typeof stable === 'object' ? stable : null;
41
- } catch {
42
- return null;
43
- }
44
- }
45
-
46
- const STABLE = loadStable();
47
-
48
- function versionsFromManifest() {
49
- if (!STABLE) return { ...FALLBACK_VERSIONS };
50
- const out = {};
51
- for (const [tag, entry] of Object.entries(STABLE)) {
52
- if (entry && typeof entry === 'object' && entry.version) out[tag] = entry.version;
53
- }
54
- return Object.keys(out).length ? out : { ...FALLBACK_VERSIONS };
55
- }
56
-
57
- // Default stable Capium binary build per distro tag, resolved from channels.json.
58
- const CAPIUM_BINARY_VERSIONS = versionsFromManifest();
59
-
60
- /** The current stable Capium binary version for a distro tag (e.g. 'windows-x64'). */
61
- function binaryVersionFor(tag) {
62
- return CAPIUM_BINARY_VERSIONS[tag] || DEFAULT_BINARY_VERSION;
63
- }
64
-
65
- function revisionsFromManifest() {
66
- if (!STABLE) return {};
67
- const out = {};
68
- for (const [tag, entry] of Object.entries(STABLE)) {
69
- if (entry && typeof entry === 'object' && Number.isInteger(entry.revision)) out[tag] = entry.revision;
70
- }
71
- return out;
72
- }
73
-
74
- // Re-spin variant per tag (>=1). Same Chromium version can be rebuilt (a stealth/fingerprint
75
- // change with no engine bump); each re-spin increments this. 1 = the base build.
76
- const CAPIUM_BINARY_REVISIONS = revisionsFromManifest();
77
-
78
- /**
79
- * The packaging revision (>=1) for a distro tag. 1 = the first build (chromium-v<version>.1/);
80
- * 2,3,... are re-spins of the SAME Chromium version served from chromium-v<version>.<N>/ (so a
81
- * re-spin never overwrites the artifact older SDKs still fetch). A version bump resets this to 1.
82
- */
83
- function binaryRevisionFor(tag) {
84
- return CAPIUM_BINARY_REVISIONS[tag] || 1;
85
- }
86
-
87
- /**
88
- * Stable identity of one specific build = the R2 folder discriminator AND the install-cache key.
89
- * The packaging revision is ALWAYS a dotted suffix starting at 1: chromium-v<version>.<N>/
90
- * (revision 1 -> <version>.1, the first build; 2,3,... -> <version>.2 etc., a same-engine
91
- * re-spin). Each revision is its own immutable folder, so a re-spin never overwrites the
92
- * artifact an older SDK still fetches, and a revision bump re-downloads. NOTE: the customer's
93
- * reported Chrome version is unchanged -- this suffix only names our distro/upload/download
94
- * artifact, not the browser version.
95
- */
96
- function buildId(version, revision) {
97
- const n = parseInt(revision, 10);
98
- return `${version}.${!n || n < 1 ? 1 : n}`;
99
- }
100
-
101
- /**
102
- * False only when the manifest declares the tag but marks it not-yet-published. Unknown
103
- * tags / missing manifest return true so the download layer's own error/404 speaks instead.
104
- */
105
- function isPublished(tag) {
106
- if (!STABLE) return true;
107
- const entry = STABLE[tag];
108
- if (!entry || typeof entry !== 'object') return true;
109
- return entry.published !== false;
110
- }
111
-
112
- /**
113
- * Best-effort distro tag for the current host, mirroring download.js's mapping. Kept
114
- * dependency-free (no require of download.js) so version.js stays loadable in isolation.
115
- */
116
- function hostTag() {
117
- const p = process.platform;
118
- const osName = p === 'darwin' ? 'macos' : p === 'win32' ? 'windows' : 'linux';
119
- const m = os.arch();
120
- const arch = m === 'x64' || m === 'ia32' ? 'x64' : m === 'arm64' ? 'arm64' : m;
121
- return `${osName}-${arch}`;
122
- }
123
-
124
- // The stable build this SDK targets for THIS host (CLI display, examples). Code that fetches a
125
- // build should prefer binaryVersionFor(tag) with the tag it already resolved.
126
- const CAPIUM_BINARY_VERSION = binaryVersionFor(hostTag());
127
-
128
- module.exports = {
129
- SDK_VERSION,
130
- CAPIUM_BINARY_VERSION,
131
- CAPIUM_BINARY_VERSIONS,
132
- CAPIUM_BINARY_REVISIONS,
133
- binaryVersionFor,
134
- binaryRevisionFor,
135
- buildId,
136
- isPublished,
137
- hostTag,
138
- _FALLBACK_VERSIONS: FALLBACK_VERSIONS,
139
- };
1
+ /**
2
+ * Version of the capium Node SDK (independent of the browser binary version).
3
+ *
4
+ * The SDK version and the Capium/Chromium binary version move on separate cadences: you update
5
+ * the SDK with `npm install -U capiumbrowser`, and the SDK fetches the *default* binary build to
6
+ * match. Crucially that default is **per platform** -- each OS/arch reaches a stable Capium build
7
+ * independently (Windows can sit on 150 while macOS is on 151).
8
+ *
9
+ * The stable build for each OS is not hardcoded here; it comes from `channels.json`, which ships
10
+ * inside the package and is the single source of truth (the release pipeline edits that file to
11
+ * promote an OS to a new stable, and the same file is published to the download server). This
12
+ * module just loads it; FALLBACK_VERSIONS is used only if the bundled manifest is missing or
13
+ * corrupt in an install.
14
+ *
15
+ * Override order at download time: CAPIUM_VERSION env > per-OS stable from channels.json.
16
+ */
17
+ 'use strict';
18
+
19
+ const fs = require('fs');
20
+ const os = require('os');
21
+ const path = require('path');
22
+
23
+ const SDK_VERSION = require('../package.json').version;
24
+
25
+ // Used only if channels.json can't be read (corrupt/removed install). ensureBinary() raises a
26
+ // clear error long before the "unsupported platform" case matters; this keeps lookups total.
27
+ const FALLBACK_VERSIONS = {
28
+ 'windows-x64': '153.0.8010.52', // real Chrome 152 stable per OS (win/mac .65, linux .64)
29
+ 'macos-arm64': '153.0.8010.52',
30
+ 'linux-x64': '153.0.8010.52',
31
+ 'linux-arm64': '153.0.8010.52', // declared; not yet published (see channels.json)
32
+ };
33
+ const DEFAULT_BINARY_VERSION = '153.0.8010.52';
34
+
35
+ function loadStable() {
36
+ // The `channels.stable` map from the bundled manifest, or null if unreadable.
37
+ try {
38
+ const raw = fs.readFileSync(path.join(__dirname, 'channels.json'), 'utf8');
39
+ const stable = JSON.parse(raw).channels.stable;
40
+ return stable && typeof stable === 'object' ? stable : null;
41
+ } catch {
42
+ return null;
43
+ }
44
+ }
45
+
46
+ const STABLE = loadStable();
47
+
48
+ function versionsFromManifest() {
49
+ if (!STABLE) return { ...FALLBACK_VERSIONS };
50
+ const out = {};
51
+ for (const [tag, entry] of Object.entries(STABLE)) {
52
+ if (entry && typeof entry === 'object' && entry.version) out[tag] = entry.version;
53
+ }
54
+ return Object.keys(out).length ? out : { ...FALLBACK_VERSIONS };
55
+ }
56
+
57
+ // Default stable Capium binary build per distro tag, resolved from channels.json.
58
+ const CAPIUM_BINARY_VERSIONS = versionsFromManifest();
59
+
60
+ /** The current stable Capium binary version for a distro tag (e.g. 'windows-x64'). */
61
+ function binaryVersionFor(tag) {
62
+ return CAPIUM_BINARY_VERSIONS[tag] || DEFAULT_BINARY_VERSION;
63
+ }
64
+
65
+ function revisionsFromManifest() {
66
+ if (!STABLE) return {};
67
+ const out = {};
68
+ for (const [tag, entry] of Object.entries(STABLE)) {
69
+ if (entry && typeof entry === 'object' && Number.isInteger(entry.revision)) out[tag] = entry.revision;
70
+ }
71
+ return out;
72
+ }
73
+
74
+ // Re-spin variant per tag (>=1). Same Chromium version can be rebuilt (a stealth/fingerprint
75
+ // change with no engine bump); each re-spin increments this. 1 = the base build.
76
+ const CAPIUM_BINARY_REVISIONS = revisionsFromManifest();
77
+
78
+ /**
79
+ * The packaging revision (>=1) for a distro tag. 1 = the first build (chromium-v<version>.1/);
80
+ * 2,3,... are re-spins of the SAME Chromium version served from chromium-v<version>.<N>/ (so a
81
+ * re-spin never overwrites the artifact older SDKs still fetch). A version bump resets this to 1.
82
+ */
83
+ function binaryRevisionFor(tag) {
84
+ return CAPIUM_BINARY_REVISIONS[tag] || 1;
85
+ }
86
+
87
+ /**
88
+ * Stable identity of one specific build = the R2 folder discriminator AND the install-cache key.
89
+ * The packaging revision is ALWAYS a dotted suffix starting at 1: chromium-v<version>.<N>/
90
+ * (revision 1 -> <version>.1, the first build; 2,3,... -> <version>.2 etc., a same-engine
91
+ * re-spin). Each revision is its own immutable folder, so a re-spin never overwrites the
92
+ * artifact an older SDK still fetches, and a revision bump re-downloads. NOTE: the customer's
93
+ * reported Chrome version is unchanged -- this suffix only names our distro/upload/download
94
+ * artifact, not the browser version.
95
+ */
96
+ function buildId(version, revision) {
97
+ const n = parseInt(revision, 10);
98
+ return `${version}.${!n || n < 1 ? 1 : n}`;
99
+ }
100
+
101
+ /**
102
+ * False only when the manifest declares the tag but marks it not-yet-published. Unknown
103
+ * tags / missing manifest return true so the download layer's own error/404 speaks instead.
104
+ */
105
+ function isPublished(tag) {
106
+ if (!STABLE) return true;
107
+ const entry = STABLE[tag];
108
+ if (!entry || typeof entry !== 'object') return true;
109
+ return entry.published !== false;
110
+ }
111
+
112
+ /**
113
+ * Best-effort distro tag for the current host, mirroring download.js's mapping. Kept
114
+ * dependency-free (no require of download.js) so version.js stays loadable in isolation.
115
+ */
116
+ function hostTag() {
117
+ const p = process.platform;
118
+ const osName = p === 'darwin' ? 'macos' : p === 'win32' ? 'windows' : 'linux';
119
+ const m = os.arch();
120
+ const arch = m === 'x64' || m === 'ia32' ? 'x64' : m === 'arm64' ? 'arm64' : m;
121
+ return `${osName}-${arch}`;
122
+ }
123
+
124
+ // The stable build this SDK targets for THIS host (CLI display, examples). Code that fetches a
125
+ // build should prefer binaryVersionFor(tag) with the tag it already resolved.
126
+ const CAPIUM_BINARY_VERSION = binaryVersionFor(hostTag());
127
+
128
+ module.exports = {
129
+ SDK_VERSION,
130
+ CAPIUM_BINARY_VERSION,
131
+ CAPIUM_BINARY_VERSIONS,
132
+ CAPIUM_BINARY_REVISIONS,
133
+ binaryVersionFor,
134
+ binaryRevisionFor,
135
+ buildId,
136
+ isPublished,
137
+ hostTag,
138
+ _FALLBACK_VERSIONS: FALLBACK_VERSIONS,
139
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capiumbrowser",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Drop-in stealth browser SDK on top of Playwright or Puppeteer (Capium Chromium).",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Capzy (https://capzy.ai)",