clearcote 0.20.0 → 0.22.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 +1 -1
- package/dist/humanize.d.ts.map +1 -1
- package/dist/humanize.js +307 -95
- package/dist/humanize.js.map +1 -1
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +55 -2
- package/dist/index.js.map +1 -1
- package/dist/motionscore.js +1 -1
- package/dist/motionscore.js.map +1 -1
- package/dist/profileauto.d.ts +43 -0
- package/dist/profileauto.d.ts.map +1 -0
- package/dist/profileauto.js +150 -0
- package/dist/profileauto.js.map +1 -0
- package/dist/profileimport.d.ts +22 -0
- package/dist/profileimport.d.ts.map +1 -0
- package/dist/profileimport.js +116 -0
- package/dist/profileimport.js.map +1 -0
- package/dist/profilelib.d.ts +100 -0
- package/dist/profilelib.d.ts.map +1 -0
- package/dist/profilelib.js +181 -0
- package/dist/profilelib.js.map +1 -0
- package/dist/profilesource.d.ts +29 -0
- package/dist/profilesource.d.ts.map +1 -0
- package/dist/profilesource.js +180 -0
- package/dist/profilesource.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profilesource.d.ts","sourceRoot":"","sources":["../src/profilesource.ts"],"names":[],"mappings":"AAaA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AAezB,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,IAAI,MAAM,CAOrC;AAgBD,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAW5D;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAMnE;AA8BD,mGAAmG;AACnG,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,EACpJ,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,SAAS,CAAC,CAiCpB;AAiBD,+FAA+F;AAC/F,wBAAsB,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,GAAE,oBAAyB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAsB/G;AAED;yDACyD;AACzD,wBAAsB,YAAY,CAChC,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,oBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAiBlC;AAED,0FAA0F;AAC1F,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,SAAS,EACf,IAAI,GAAE,oBAAyB,GAC9B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC,CAKrE"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
// Fetching personas from the profile service, and caching them locally.
|
|
2
|
+
//
|
|
3
|
+
// Selection runs CLIENT-SIDE (see profilelib.ts) because it needs facts only this machine has:
|
|
4
|
+
// the real GPU, the real display, the engine's actual Chromium major. The server cannot see any
|
|
5
|
+
// of those, so it returns candidates for a described host and the SDK picks among them.
|
|
6
|
+
//
|
|
7
|
+
// The service caps DISTINCT profiles per license per day, and re-fetching one already held is
|
|
8
|
+
// free. That is why this module caches aggressively on disk: a sticky identity must resolve to
|
|
9
|
+
// the same profile every launch without spending budget or requiring the network.
|
|
10
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
import { PROFILE_DIR } from "./profile.js";
|
|
13
|
+
import { selectProfile, gpuVendorClass, } from "./profilelib.js";
|
|
14
|
+
const DEFAULT_API_BASE = "https://www.clearcotelabs.com";
|
|
15
|
+
function apiBase(base) {
|
|
16
|
+
return (base || process.env.CLEARCOTE_PROFILE_API || process.env.CLEARCOTE_LICENSE_API || DEFAULT_API_BASE)
|
|
17
|
+
.replace(/\/$/, "");
|
|
18
|
+
}
|
|
19
|
+
function cacheDir() {
|
|
20
|
+
const d = join(PROFILE_DIR, "library");
|
|
21
|
+
if (!existsSync(d))
|
|
22
|
+
mkdirSync(d, { recursive: true });
|
|
23
|
+
return d;
|
|
24
|
+
}
|
|
25
|
+
/** Map a Node platform string onto the os_family values the corpus stores. */
|
|
26
|
+
export function hostOsFamily() {
|
|
27
|
+
switch (process.platform) {
|
|
28
|
+
case "win32": return "windows";
|
|
29
|
+
case "darwin": return "macos";
|
|
30
|
+
case "linux": return "linux";
|
|
31
|
+
default: return process.platform;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function hostCachePath() {
|
|
35
|
+
return join(cacheDir(), "host.json");
|
|
36
|
+
}
|
|
37
|
+
export function readCachedHost(exe) {
|
|
38
|
+
try {
|
|
39
|
+
const c = JSON.parse(readFileSync(hostCachePath(), "utf8"));
|
|
40
|
+
if (c._exe !== exe)
|
|
41
|
+
return null; // different binary: re-measure
|
|
42
|
+
// Host hardware does not change often, but a monitor or driver swap does; a month is a
|
|
43
|
+
// reasonable compromise between staleness and paying for a launch every run.
|
|
44
|
+
if (Date.now() - Date.parse(c._at) > 30 * 86_400_000)
|
|
45
|
+
return null;
|
|
46
|
+
return c;
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export function writeCachedHost(exe, facts) {
|
|
53
|
+
try {
|
|
54
|
+
writeFileSync(hostCachePath(), JSON.stringify({ ...facts, _exe: exe, _at: new Date().toISOString() }, null, 1));
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
/* a cache write failure must never fail a launch */
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** The in-page probe, as an expression string. Reads the REAL GPU and display — this launch
|
|
61
|
+
* applies no persona, so what it sees is the host itself. */
|
|
62
|
+
const PROBE_EXPR = `(() => {
|
|
63
|
+
let renderer = "";
|
|
64
|
+
try {
|
|
65
|
+
const gl = document.createElement("canvas").getContext("webgl");
|
|
66
|
+
const dbg = gl && gl.getExtension("WEBGL_debug_renderer_info");
|
|
67
|
+
if (gl && dbg) renderer = String(gl.getParameter(dbg.UNMASKED_RENDERER_WEBGL));
|
|
68
|
+
} catch (e) { /* headless with no GPU: leave blank, scored as unknown rather than guessed */ }
|
|
69
|
+
return {
|
|
70
|
+
renderer: renderer,
|
|
71
|
+
screen_width: screen.width,
|
|
72
|
+
screen_height: screen.height,
|
|
73
|
+
device_pixel_ratio: devicePixelRatio,
|
|
74
|
+
hardware_concurrency: navigator.hardwareConcurrency,
|
|
75
|
+
device_memory: navigator.deviceMemory,
|
|
76
|
+
};
|
|
77
|
+
})()`;
|
|
78
|
+
/** Read the host's real GPU/display by rendering in the engine itself, with no persona applied. */
|
|
79
|
+
export async function measureHost(launchFn, exe, browserMajor) {
|
|
80
|
+
const cached = readCachedHost(exe);
|
|
81
|
+
if (cached)
|
|
82
|
+
return cached;
|
|
83
|
+
const browser = await launchFn({ executablePath: exe, headless: true, quiet: true });
|
|
84
|
+
try {
|
|
85
|
+
const ctx = await browser.newContext();
|
|
86
|
+
const page = (await ctx.newPage());
|
|
87
|
+
// about:blank is enough: WebGL and screen do not need an origin.
|
|
88
|
+
await page.goto("about:blank");
|
|
89
|
+
// Passed as an EXPRESSION STRING, not a closure: this body runs in the browser, and typing
|
|
90
|
+
// it here would mean adding the DOM lib to a Node-only SDK's tsconfig just to describe code
|
|
91
|
+
// that never executes in Node.
|
|
92
|
+
const facts = await page.evaluate(PROBE_EXPR);
|
|
93
|
+
const out = {
|
|
94
|
+
os_family: hostOsFamily(),
|
|
95
|
+
browser_major: browserMajor,
|
|
96
|
+
gpu_vendor: gpuVendorClass(facts.renderer),
|
|
97
|
+
screen_width: facts.screen_width,
|
|
98
|
+
screen_height: facts.screen_height,
|
|
99
|
+
device_pixel_ratio: facts.device_pixel_ratio,
|
|
100
|
+
hardware_concurrency: facts.hardware_concurrency,
|
|
101
|
+
device_memory: facts.device_memory,
|
|
102
|
+
};
|
|
103
|
+
writeCachedHost(exe, out);
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
finally {
|
|
107
|
+
await browser.close().catch(() => { });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
// Service client
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
function authHeaders(licenseKey) {
|
|
114
|
+
const key = licenseKey || process.env.CLEARCOTE_LICENSE_KEY || "";
|
|
115
|
+
if (!key) {
|
|
116
|
+
throw new Error("the profile library needs a license key — pass licenseKey or set CLEARCOTE_LICENSE_KEY " +
|
|
117
|
+
"(profiles are served to PRO licenses with an active subscription)");
|
|
118
|
+
}
|
|
119
|
+
return { authorization: `Bearer ${key}` };
|
|
120
|
+
}
|
|
121
|
+
/** Candidate index for a described host. Cached briefly so repeated launches do not re-ask. */
|
|
122
|
+
export async function fetchIndex(host, opts = {}) {
|
|
123
|
+
const os = (opts.os ?? host.os_family).toLowerCase();
|
|
124
|
+
const cachePath = join(cacheDir(), `index-${os}-${host.browser_major}.json`);
|
|
125
|
+
if (opts.offline) {
|
|
126
|
+
if (!existsSync(cachePath)) {
|
|
127
|
+
throw new Error(`offline: no cached profile index for ${os}/${host.browser_major}`);
|
|
128
|
+
}
|
|
129
|
+
return JSON.parse(readFileSync(cachePath, "utf8"));
|
|
130
|
+
}
|
|
131
|
+
const url = `${apiBase(opts.apiBase)}/api/v1/profiles?os=${encodeURIComponent(os)}&major=${host.browser_major}`;
|
|
132
|
+
const res = await fetch(url, { headers: authHeaders(opts.licenseKey) });
|
|
133
|
+
if (!res.ok) {
|
|
134
|
+
// Serve stale rather than fail the launch — a cached index is far better than no persona.
|
|
135
|
+
if (existsSync(cachePath))
|
|
136
|
+
return JSON.parse(readFileSync(cachePath, "utf8"));
|
|
137
|
+
const body = await res.text().catch(() => "");
|
|
138
|
+
throw new Error(`profile index request failed (${res.status}): ${body.slice(0, 200)}`);
|
|
139
|
+
}
|
|
140
|
+
const json = (await res.json());
|
|
141
|
+
try {
|
|
142
|
+
writeFileSync(cachePath, JSON.stringify(json.candidates));
|
|
143
|
+
}
|
|
144
|
+
catch { /* non-fatal */ }
|
|
145
|
+
return json.candidates ?? [];
|
|
146
|
+
}
|
|
147
|
+
/** Fetch one profile by id, preferring the on-disk copy — a repeat costs no distinct budget,
|
|
148
|
+
* but not spending a request at all is better still. */
|
|
149
|
+
export async function fetchProfile(id, opts = {}) {
|
|
150
|
+
const cachePath = join(cacheDir(), `profile-${id}.json`);
|
|
151
|
+
if (existsSync(cachePath)) {
|
|
152
|
+
try {
|
|
153
|
+
return JSON.parse(readFileSync(cachePath, "utf8"));
|
|
154
|
+
}
|
|
155
|
+
catch { /* refetch */ }
|
|
156
|
+
}
|
|
157
|
+
if (opts.offline)
|
|
158
|
+
throw new Error(`offline: profile ${id} is not cached`);
|
|
159
|
+
const res = await fetch(`${apiBase(opts.apiBase)}/api/v1/profiles?id=${encodeURIComponent(id)}`, {
|
|
160
|
+
headers: authHeaders(opts.licenseKey),
|
|
161
|
+
});
|
|
162
|
+
if (!res.ok) {
|
|
163
|
+
const body = await res.text().catch(() => "");
|
|
164
|
+
throw new Error(`profile fetch failed (${res.status}): ${body.slice(0, 200)}`);
|
|
165
|
+
}
|
|
166
|
+
const json = (await res.json());
|
|
167
|
+
try {
|
|
168
|
+
writeFileSync(cachePath, JSON.stringify(json.profile));
|
|
169
|
+
}
|
|
170
|
+
catch { /* non-fatal */ }
|
|
171
|
+
return json.profile;
|
|
172
|
+
}
|
|
173
|
+
/** Resolve a persona end to end: index -> score against this host -> fetch the winner. */
|
|
174
|
+
export async function resolveAutoProfile(host, opts = {}) {
|
|
175
|
+
const index = await fetchIndex(host, opts);
|
|
176
|
+
const selection = selectProfile(index, host, opts);
|
|
177
|
+
const profile = await fetchProfile(selection.entry.id, opts);
|
|
178
|
+
return { profile, selection };
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=profilesource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profilesource.js","sourceRoot":"","sources":["../src/profilesource.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,EAAE;AACF,+FAA+F;AAC/F,gGAAgG;AAChG,wFAAwF;AACxF,EAAE;AACF,8FAA8F;AAC9F,+FAA+F;AAC/F,kFAAkF;AAElF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,aAAa,EACb,cAAc,GAKf,MAAM,iBAAiB,CAAC;AAEzB,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;AAEzD,SAAS,OAAO,CAAC,IAAa;IAC5B,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,gBAAgB,CAAC;SACxG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACxB,CAAC;AAED,SAAS,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AAC,CAAC;IACnD,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAC7D,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AAChC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clearcote",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Playwright drop-in for the Clearcote anti-fingerprint Chromium build. launch() returns a standard Playwright Browser backed by the verified Clearcote binary, which is auto-downloaded and SHA-256 checked.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|