@svrnsec/pulse 0.8.0 → 0.9.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/dist/pulse.esm.js CHANGED
@@ -6310,6 +6310,61 @@ function renderInlineUpdateHint(latest) {
6310
6310
  );
6311
6311
  }
6312
6312
 
6313
+ /**
6314
+ * @svrnsec/pulse — Structured Error Codes
6315
+ *
6316
+ * Use these constants instead of string matching for type-safe error handling.
6317
+ */
6318
+ const PulseErrorCode = Object.freeze({
6319
+ // Structural
6320
+ INVALID_PAYLOAD_STRUCTURE: 'INVALID_PAYLOAD_STRUCTURE',
6321
+ PROTOTYPE_POLLUTION_ATTEMPT: 'PROTOTYPE_POLLUTION_ATTEMPT',
6322
+ MISSING_REQUIRED_FIELD: 'MISSING_REQUIRED_FIELD',
6323
+ INVALID_TYPE: 'INVALID_TYPE',
6324
+ TIMESTAMP_OUT_OF_RANGE: 'TIMESTAMP_OUT_OF_RANGE',
6325
+ UNSUPPORTED_PROOF_VERSION: 'UNSUPPORTED_PROOF_VERSION',
6326
+
6327
+ // Hash integrity
6328
+ INVALID_HASH_FORMAT: 'INVALID_HASH_FORMAT',
6329
+ HASH_MISMATCH_PAYLOAD_TAMPERED: 'HASH_MISMATCH_PAYLOAD_TAMPERED',
6330
+
6331
+ // Timestamp / freshness
6332
+ PROOF_EXPIRED: 'PROOF_EXPIRED',
6333
+ PROOF_FROM_FUTURE: 'PROOF_FROM_FUTURE',
6334
+ NONCE_INVALID_OR_REPLAYED: 'NONCE_INVALID_OR_REPLAYED',
6335
+
6336
+ // Jitter / scoring
6337
+ JITTER_SCORE_TOO_LOW: 'JITTER_SCORE_TOO_LOW',
6338
+ DYNAMIC_THRESHOLD_NOT_MET: 'DYNAMIC_THRESHOLD_NOT_MET',
6339
+
6340
+ // Heuristic / coherence overrides
6341
+ HEURISTIC_HARD_OVERRIDE: 'HEURISTIC_HARD_OVERRIDE',
6342
+ COHERENCE_HARD_OVERRIDE: 'COHERENCE_HARD_OVERRIDE',
6343
+
6344
+ // Renderer
6345
+ SOFTWARE_RENDERER_DETECTED: 'SOFTWARE_RENDERER_DETECTED',
6346
+ BLOCKLISTED_RENDERER: 'BLOCKLISTED_RENDERER',
6347
+
6348
+ // Bio activity
6349
+ NO_BIO_ACTIVITY_DETECTED: 'NO_BIO_ACTIVITY_DETECTED',
6350
+
6351
+ // Cross-signal forgery detection
6352
+ FORGED_SIGNAL_CV_SCORE_IMPOSSIBLE: 'FORGED_SIGNAL:CV_SCORE_IMPOSSIBLE',
6353
+ FORGED_SIGNAL_AUTOCORR_SCORE_IMPOSSIBLE: 'FORGED_SIGNAL:AUTOCORR_SCORE_IMPOSSIBLE',
6354
+ FORGED_SIGNAL_QE_SCORE_IMPOSSIBLE: 'FORGED_SIGNAL:QE_SCORE_IMPOSSIBLE',
6355
+
6356
+ // Risk flags (informational, not rejection reasons)
6357
+ NONCE_FRESHNESS_NOT_CHECKED: 'NONCE_FRESHNESS_NOT_CHECKED',
6358
+ CANVAS_UNAVAILABLE: 'CANVAS_UNAVAILABLE',
6359
+ ZERO_BIO_SAMPLES: 'ZERO_BIO_SAMPLES',
6360
+ NEGATIVE_INTERFERENCE_COEFFICIENT: 'NEGATIVE_INTERFERENCE_COEFFICIENT',
6361
+ INCONSISTENCY_LOW_CV_BUT_HIGH_SCORE: 'INCONSISTENCY:LOW_CV_BUT_HIGH_SCORE',
6362
+ SUSPICIOUS_ZERO_TIMER_GRANULARITY: 'SUSPICIOUS_ZERO_TIMER_GRANULARITY',
6363
+ INCONSISTENCY_FLAT_THERMAL_BUT_HIGH_SCORE: 'INCONSISTENCY:FLAT_THERMAL_BUT_HIGH_SCORE',
6364
+ EXTREME_HURST: 'EXTREME_HURST',
6365
+ AUDIO_JITTER_TOO_FLAT: 'AUDIO_JITTER_TOO_FLAT',
6366
+ });
6367
+
6313
6368
  /**
6314
6369
  * @svrnsec/pulse
6315
6370
  *
@@ -6780,5 +6835,5 @@ var pulse_core = /*#__PURE__*/Object.freeze({
6780
6835
  run_memory_probe: run_memory_probe
6781
6836
  });
6782
6837
 
6783
- export { CURRENT_VERSION, Fingerprint, checkForUpdate, collectDramTimings, collectEnfTimings, collectGpuEntropy, detectLlmAgent, detectProvider, generateNonce, pulse, renderError, renderInlineUpdateHint, renderProbeResult, runHeuristicEngine, validateProof };
6838
+ export { CURRENT_VERSION, Fingerprint, PulseErrorCode, checkForUpdate, collectDramTimings, collectEnfTimings, collectGpuEntropy, detectLlmAgent, detectProvider, generateNonce, pulse, renderError, renderInlineUpdateHint, renderProbeResult, runHeuristicEngine, validateProof };
6784
6839
  //# sourceMappingURL=pulse.esm.js.map