@svrnsec/pulse 0.6.0 → 0.7.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 +242 -82
- package/SECURITY.md +1 -1
- package/dist/pulse.cjs.js +25 -25
- package/dist/pulse.cjs.js.map +1 -1
- package/dist/pulse.esm.js +25 -25
- package/dist/pulse.esm.js.map +1 -1
- package/index.d.ts +3 -3
- package/package.json +22 -3
- package/src/analysis/audio.js +1 -1
- package/src/analysis/authenticityAudit.js +13 -10
- package/src/analysis/coherence.js +1 -1
- package/src/analysis/coordinatedBehavior.js +804 -0
- package/src/analysis/heuristic.js +1 -1
- package/src/analysis/jitter.js +1 -1
- package/src/analysis/llm.js +1 -1
- package/src/analysis/provider.js +1 -1
- package/src/analysis/refraction.js +391 -0
- package/src/collector/adaptive.js +1 -1
- package/src/collector/bio.js +1 -1
- package/src/collector/canvas.js +1 -1
- package/src/collector/dram.js +1 -1
- package/src/collector/enf.js +1 -1
- package/src/collector/entropy.js +1 -1
- package/src/collector/gpu.js +1 -1
- package/src/collector/sabTimer.js +2 -2
- package/src/fingerprint.js +2 -2
- package/src/index.js +6 -6
- package/src/integrations/react.js +2 -2
- package/src/middleware/express.js +2 -2
- package/src/middleware/next.js +3 -3
- package/src/proof/fingerprint.js +1 -1
- package/src/proof/validator.js +1 -1
- package/src/registry/serializer.js +4 -4
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @svrnsec/pulse — TypeScript Declarations
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// =============================================================================
|
|
@@ -80,7 +80,7 @@ export interface PulseCommitment {
|
|
|
80
80
|
export function pulse(opts: PulseOptions): Promise<PulseCommitment>;
|
|
81
81
|
|
|
82
82
|
// =============================================================================
|
|
83
|
-
// React Hook (import from '@
|
|
83
|
+
// React Hook (import from '@svrnsec/pulse/react')
|
|
84
84
|
// =============================================================================
|
|
85
85
|
|
|
86
86
|
export interface UsePulseOptions {
|
|
@@ -133,7 +133,7 @@ export interface UsePulseReturn {
|
|
|
133
133
|
error: Error | null;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
/** React hook — import from '@
|
|
136
|
+
/** React hook — import from '@svrnsec/pulse/react' */
|
|
137
137
|
export declare function usePulse(opts?: UsePulseOptions): UsePulseReturn;
|
|
138
138
|
|
|
139
139
|
// =============================================================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svrnsec/pulse",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Physical Turing Test — Idle attestation, population-level Sybil detection, and engagement tokens that defeat click farms at the physics layer.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
".": {
|
|
26
26
|
"browser": "./dist/pulse.esm.js",
|
|
27
27
|
"import": "./dist/pulse.esm.js",
|
|
28
|
-
"require": "./dist/pulse.cjs
|
|
28
|
+
"require": "./dist/pulse.cjs"
|
|
29
29
|
},
|
|
30
30
|
"./validator": {
|
|
31
31
|
"node": "./src/proof/validator.js",
|
|
@@ -87,6 +87,15 @@
|
|
|
87
87
|
"./audit": {
|
|
88
88
|
"import": "./src/analysis/authenticityAudit.js",
|
|
89
89
|
"node": "./src/analysis/authenticityAudit.js"
|
|
90
|
+
},
|
|
91
|
+
"./refraction": {
|
|
92
|
+
"browser": "./src/analysis/refraction.js",
|
|
93
|
+
"import": "./src/analysis/refraction.js",
|
|
94
|
+
"node": "./src/analysis/refraction.js"
|
|
95
|
+
},
|
|
96
|
+
"./coordination": {
|
|
97
|
+
"import": "./src/analysis/coordinatedBehavior.js",
|
|
98
|
+
"node": "./src/analysis/coordinatedBehavior.js"
|
|
90
99
|
}
|
|
91
100
|
},
|
|
92
101
|
"main": "dist/pulse.cjs.js",
|
|
@@ -157,7 +166,17 @@
|
|
|
157
166
|
"proof-of-idle",
|
|
158
167
|
"authenticity-audit",
|
|
159
168
|
"bot-percentage",
|
|
160
|
-
"fraud-rate-estimation"
|
|
169
|
+
"fraud-rate-estimation",
|
|
170
|
+
"refraction",
|
|
171
|
+
"timer-calibration",
|
|
172
|
+
"browser-detection",
|
|
173
|
+
"coordinated-behavior",
|
|
174
|
+
"drift-fingerprinting",
|
|
175
|
+
"mutual-information",
|
|
176
|
+
"entropy-velocity",
|
|
177
|
+
"louvain-community-detection",
|
|
178
|
+
"clock-drift",
|
|
179
|
+
"inauthentic-behavior"
|
|
161
180
|
],
|
|
162
181
|
"engines": {
|
|
163
182
|
"node": ">=18.0.0"
|
package/src/analysis/audio.js
CHANGED
|
@@ -208,25 +208,28 @@ function _clusterTokens(tokens) {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
function _clusterKey(token) {
|
|
211
|
-
const hw
|
|
212
|
-
const
|
|
213
|
-
const iat = token.iat ?? 0;
|
|
211
|
+
const hw = token.hw ?? {};
|
|
212
|
+
const iat = token.iat ?? 0;
|
|
214
213
|
|
|
215
214
|
// ENF deviation → nearest bucket (null/undefined → 'no_enf')
|
|
215
|
+
// ±0.025 Hz resolution localizes devices to the same building/substation.
|
|
216
216
|
const enfBucket = hw.enfDev != null
|
|
217
217
|
? `e${Math.round(hw.enfDev / ENF_BUCKET_HZ)}`
|
|
218
218
|
: 'no_enf';
|
|
219
219
|
|
|
220
|
-
// DRAM verdict string
|
|
221
|
-
const dram
|
|
220
|
+
// DRAM verdict string — proxy for hardware generation
|
|
221
|
+
const dram = hw.dram ?? 'unknown';
|
|
222
222
|
|
|
223
|
-
//
|
|
224
|
-
const therm = idle.therm ?? 'unknown';
|
|
225
|
-
|
|
226
|
-
// 10-minute time bucket
|
|
223
|
+
// 10-minute time bucket — captures batch dispatch without splitting organic traffic
|
|
227
224
|
const tBucket = Math.floor(iat / TIME_BUCKET_MS);
|
|
228
225
|
|
|
229
|
-
|
|
226
|
+
// Note: thermal label is intentionally NOT part of the key.
|
|
227
|
+
// Clustering by thermal label would make testThermalDiversity a tautology
|
|
228
|
+
// (every cluster would have zero diversity by construction).
|
|
229
|
+
// Thermal diversity is left as a within-cluster discriminator — farms that
|
|
230
|
+
// co-locate in the same ENF + DRAM + time bucket will still show sustained_hot
|
|
231
|
+
// homogeneity; organic users in the same bucket will show hot_to_cold / cooling mix.
|
|
232
|
+
return `${enfBucket}:${dram}:${tBucket}`;
|
|
230
233
|
}
|
|
231
234
|
|
|
232
235
|
// ── Bootstrap CI ──────────────────────────────────────────────────────────────
|