@sekyro/web 0.1.0-rc.2 → 0.1.0-rc.3

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.
@@ -1,5 +1,5 @@
1
- import { C as CameraErrorKind } from '../capture-session-v3-CAoWM8iT.cjs';
2
- export { a as CLIP_MS, b as CaptureArtifacts, c as CaptureErrorKind, d as CaptureSessionEvents, e as CaptureSessionV3, f as CaptureSessionV3Events, g as CaptureSessionV3Options, h as CaptureState, i as ClipError, j as ClipErrorKind, k as ClipRecorder, l as ClipResult, D as DEFAULT_CLIP_MIME, m as DEVICE_PROFILES, n as DeviceClass, o as DeviceProbe, p as DeviceProfile, q as DeviceProfiler, E as EscalationClipArtifact, r as EscalationHook, F as FaceGateV3, G as GateChecks, K as KEYFRAME_CANDIDATES, s as KEYFRAME_WINDOW_MS, M as MAX_CLIP_BYTES, t as MIME_CANDIDATES, S as STOP_GRACE_MS, T as TIMESLICE_MS, V as V3ChecksPayload, u as V3GateFactor, v as V3GateQuality, w as V3GateThresholds, x as V3GateTick, y as V3GateTickInput, z as V3TelemetryEvent, A as V3_GATE_DEFAULTS, B as VIDEO_BPS, H as buildLivenessV2FormData, I as cameraPreflight, J as classifyDevice, L as extForMime, N as isClipTooLarge, O as isMediaRecorderSupported, P as mapGetUserMediaError, Q as pickMimeType, R as probeDevice } from '../capture-session-v3-CAoWM8iT.cjs';
1
+ import { C as CameraErrorKind } from '../capture-session-v3-COIO_F2w.cjs';
2
+ export { a as CLIP_MS, b as CaptureArtifacts, c as CaptureErrorKind, d as CaptureSessionEvents, e as CaptureSessionV3, f as CaptureSessionV3Events, g as CaptureSessionV3Options, h as CaptureState, i as ClipError, j as ClipErrorKind, k as ClipRecorder, l as ClipResult, D as DEFAULT_CLIP_MIME, m as DEVICE_PROFILES, n as DeviceClass, o as DeviceProbe, p as DeviceProfile, q as DeviceProfiler, E as EscalationClipArtifact, r as EscalationHook, F as FaceGateV3, G as GateChecks, K as KEYFRAME_CANDIDATES, s as KEYFRAME_WINDOW_MS, M as MAX_CLIP_BYTES, t as MIME_CANDIDATES, S as STOP_GRACE_MS, T as TIMESLICE_MS, V as V3ChecksPayload, u as V3GateFactor, v as V3GateQuality, w as V3GateThresholds, x as V3GateTick, y as V3GateTickInput, z as V3TelemetryEvent, A as V3_GATE_DEFAULTS, B as VIDEO_BPS, H as buildLivenessV2FormData, I as cameraPreflight, J as classifyDevice, L as extForMime, N as isClipTooLarge, O as isMediaRecorderSupported, P as mapGetUserMediaError, Q as pickMimeType, R as probeDevice } from '../capture-session-v3-COIO_F2w.cjs';
3
3
  export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, I as IN_CIRCLE_FACTOR, b as buildCaptureConstraints, d as detectIsMobile } from '../capture-constraints-BujkZcfb.cjs';
4
4
  export { C as CreateDetectorOptions, D as DEFAULT_TIER_ORDER, a as DEFAULT_V3_ASSET_BASE_URL, b as Detector, c as DetectorLadderError, F as FaceObservation, d as createDetector, i as intrinsicSize, t as toStreamPixels } from '../detect-worker-CKXHlXx9.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
- import { C as CameraErrorKind } from '../capture-session-v3-BJ8ciaWl.js';
2
- export { a as CLIP_MS, b as CaptureArtifacts, c as CaptureErrorKind, d as CaptureSessionEvents, e as CaptureSessionV3, f as CaptureSessionV3Events, g as CaptureSessionV3Options, h as CaptureState, i as ClipError, j as ClipErrorKind, k as ClipRecorder, l as ClipResult, D as DEFAULT_CLIP_MIME, m as DEVICE_PROFILES, n as DeviceClass, o as DeviceProbe, p as DeviceProfile, q as DeviceProfiler, E as EscalationClipArtifact, r as EscalationHook, F as FaceGateV3, G as GateChecks, K as KEYFRAME_CANDIDATES, s as KEYFRAME_WINDOW_MS, M as MAX_CLIP_BYTES, t as MIME_CANDIDATES, S as STOP_GRACE_MS, T as TIMESLICE_MS, V as V3ChecksPayload, u as V3GateFactor, v as V3GateQuality, w as V3GateThresholds, x as V3GateTick, y as V3GateTickInput, z as V3TelemetryEvent, A as V3_GATE_DEFAULTS, B as VIDEO_BPS, H as buildLivenessV2FormData, I as cameraPreflight, J as classifyDevice, L as extForMime, N as isClipTooLarge, O as isMediaRecorderSupported, P as mapGetUserMediaError, Q as pickMimeType, R as probeDevice } from '../capture-session-v3-BJ8ciaWl.js';
1
+ import { C as CameraErrorKind } from '../capture-session-v3-CvIfcwST.js';
2
+ export { a as CLIP_MS, b as CaptureArtifacts, c as CaptureErrorKind, d as CaptureSessionEvents, e as CaptureSessionV3, f as CaptureSessionV3Events, g as CaptureSessionV3Options, h as CaptureState, i as ClipError, j as ClipErrorKind, k as ClipRecorder, l as ClipResult, D as DEFAULT_CLIP_MIME, m as DEVICE_PROFILES, n as DeviceClass, o as DeviceProbe, p as DeviceProfile, q as DeviceProfiler, E as EscalationClipArtifact, r as EscalationHook, F as FaceGateV3, G as GateChecks, K as KEYFRAME_CANDIDATES, s as KEYFRAME_WINDOW_MS, M as MAX_CLIP_BYTES, t as MIME_CANDIDATES, S as STOP_GRACE_MS, T as TIMESLICE_MS, V as V3ChecksPayload, u as V3GateFactor, v as V3GateQuality, w as V3GateThresholds, x as V3GateTick, y as V3GateTickInput, z as V3TelemetryEvent, A as V3_GATE_DEFAULTS, B as VIDEO_BPS, H as buildLivenessV2FormData, I as cameraPreflight, J as classifyDevice, L as extForMime, N as isClipTooLarge, O as isMediaRecorderSupported, P as mapGetUserMediaError, Q as pickMimeType, R as probeDevice } from '../capture-session-v3-CvIfcwST.js';
3
3
  export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, I as IN_CIRCLE_FACTOR, b as buildCaptureConstraints, d as detectIsMobile } from '../capture-constraints-BujkZcfb.js';
4
4
  export { C as CreateDetectorOptions, D as DEFAULT_TIER_ORDER, a as DEFAULT_V3_ASSET_BASE_URL, b as Detector, c as DetectorLadderError, F as FaceObservation, d as createDetector, i as intrinsicSize, t as toStreamPixels } from '../detect-worker-CKXHlXx9.js';
5
5
 
@@ -31,7 +31,7 @@ import {
31
31
  mapGetUserMediaError,
32
32
  pickMimeType,
33
33
  probeDevice
34
- } from "../chunk-LOTAJDRE.js";
34
+ } from "../chunk-7TC6TOZ4.js";
35
35
  import {
36
36
  DEFAULT_TIER_ORDER,
37
37
  DEFAULT_V3_ASSET_BASE_URL,
@@ -1,4 +1,4 @@
1
- import { h as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1 } from './capture-session-v3-CAoWM8iT.cjs';
1
+ import { h as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1 } from './capture-session-v3-COIO_F2w.cjs';
2
2
  import { C as CheckReason, c as HostedSessionView, g as HostedClient, A as AttestationInput, h as SessionView, b as CheckType } from './hosted-client-BpvBqu9f.cjs';
3
3
 
4
4
  /** Gate guidance code. `'hold'` is emitted while the clip records. */
@@ -1,4 +1,4 @@
1
- import { h as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1 } from './capture-session-v3-BJ8ciaWl.js';
1
+ import { h as CaptureState$1, f as CaptureSessionV3Events, g as CaptureSessionV3Options, c as CaptureErrorKind$1 } from './capture-session-v3-CvIfcwST.js';
2
2
  import { C as CheckReason, c as HostedSessionView, g as HostedClient, A as AttestationInput, h as SessionView, b as CheckType } from './hosted-client-BpvBqu9f.js';
3
3
 
4
4
  /** Gate guidance code. `'hold'` is emitted while the clip records. */
package/dist/index.cjs CHANGED
@@ -862,10 +862,12 @@ var V3_GATE_DEFAULTS = Object.freeze({
862
862
  MOTION_TAU_S: 0.4,
863
863
  MOTION_DEADBAND_IOD_PER_S: 0.1,
864
864
  READY_WINDOW_MS: 500,
865
- // 0.7→0.75 with the trimmed window: trimming forgives exactly ONE flaky
866
- // tick; the raised mean keeps a SECOND bad tick (a real sustained wobble)
867
- // from diluting through at 10 Hz cadences.
868
- READY_MEAN_Q: 0.75,
865
+ // (READY_MEAN_Q, the former 0.75 window MEAN, is gone — 2026-10-17 field
866
+ // bug: a steady q anywhere in [Q_GOOD, 0.75) saturated p at 1, passed every
867
+ // guide ("hold still") and could never reach the mean, so the ring sat full
868
+ // and green with nothing recording. Readiness now checks the window against
869
+ // Q_GOOD, which keeps the one-flaky-tick forgiveness and the second-bad-tick
870
+ // block without a dead band above the rise threshold.)
869
871
  GUIDE_SIZE: 0.6,
870
872
  GUIDE_CENTERING: 0.6,
871
873
  GUIDE_POSE: 0.6,
@@ -943,8 +945,7 @@ var FaceGateV3 = class {
943
945
  const worstIndex = windowSamples.indexOf(worst);
944
946
  windowSamples = windowSamples.filter((_, index) => index !== worstIndex);
945
947
  }
946
- const windowMean = windowSamples.reduce((sum, value) => sum + value, 0) / Math.max(1, windowSamples.length);
947
- const ready = this.p >= 1 && windowMean >= this.t.READY_MEAN_Q;
948
+ const ready = this.p >= 1 && windowSamples.every((sample) => sample >= this.t.Q_GOOD);
948
949
  return {
949
950
  at: timestampMs,
950
951
  q,
@@ -1562,6 +1563,14 @@ function createLivenessCaptureInternal(options, internals = {}) {
1562
1563
  let animations = "full";
1563
1564
  let recordingStartedAt = null;
1564
1565
  let frozenAt = null;
1566
+ let frameWidth = 0;
1567
+ let frameHeight = 0;
1568
+ const latchFrameSize = () => {
1569
+ if (options.video.videoWidth > 0 && options.video.videoHeight > 0) {
1570
+ frameWidth = options.video.videoWidth;
1571
+ frameHeight = options.video.videoHeight;
1572
+ }
1573
+ };
1565
1574
  const setState = (next) => {
1566
1575
  state = next;
1567
1576
  emitter.emit("state", next);
@@ -1582,10 +1591,13 @@ function createLivenessCaptureInternal(options, internals = {}) {
1582
1591
  faceDetected = false;
1583
1592
  recordingStartedAt = null;
1584
1593
  frozenAt = null;
1594
+ frameWidth = 0;
1595
+ frameHeight = 0;
1585
1596
  }
1586
1597
  setState(next);
1587
1598
  syncProfile();
1588
1599
  if (next === "recording") {
1600
+ latchFrameSize();
1589
1601
  recordingStartedAt = now();
1590
1602
  hint = "hold";
1591
1603
  progress = 1;
@@ -1593,6 +1605,7 @@ function createLivenessCaptureInternal(options, internals = {}) {
1593
1605
  }
1594
1606
  }),
1595
1607
  engine.on("checks", (payload) => {
1608
+ latchFrameSize();
1596
1609
  progress = payload.progress;
1597
1610
  faceDetected = payload.factors.presence > 0;
1598
1611
  emitGate();
@@ -1612,8 +1625,8 @@ function createLivenessCaptureInternal(options, internals = {}) {
1612
1625
  keyframe: artifacts.keyframe,
1613
1626
  ...artifacts.clip !== void 0 ? { clip: artifacts.clip } : {},
1614
1627
  ...artifacts.clipMimeType !== void 0 ? { clipMime: artifacts.clipMimeType } : {},
1615
- width: options.video.videoWidth,
1616
- height: options.video.videoHeight,
1628
+ width: options.video.videoWidth || frameWidth,
1629
+ height: options.video.videoHeight || frameHeight,
1617
1630
  ...clipMs !== void 0 ? { clipMs } : {},
1618
1631
  captureChannel: detectIsMobile() ? "mobile" : "desktop",
1619
1632
  ...degraded ? { degraded: "NO_RECORDER" } : {}