@incodetech/core 0.0.0-dev-20260717-8aab9f6d → 0.0.0-dev-20260717-17d23610

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.
Files changed (58) hide show
  1. package/dist/authentication.d.ts +2 -2
  2. package/dist/authentication.esm.js +2 -2
  3. package/dist/{authenticationManager-G-k-13Fe.d.ts → authenticationManager-BCm7eGoK.d.ts} +1 -1
  4. package/dist/{authenticationManager-CCsoE3a3.esm.js → authenticationManager-C5nO8GhV.esm.js} +2 -2
  5. package/dist/{authenticationStateMachine-DfscLUkp.esm.js → authenticationStateMachine-C2Rxpvux.esm.js} +2 -2
  6. package/dist/consent.d.ts +1 -1
  7. package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
  8. package/dist/curp-validation.d.ts +1 -1
  9. package/dist/{curpValidationManager--HSBTwOy.d.ts → curpValidationManager-DRQrbEhj.d.ts} +1 -1
  10. package/dist/{deepsightLoader-Dv4RBBlg.esm.js → deepsightLoader-OXrP5BZB.esm.js} +1 -1
  11. package/dist/document-upload.d.ts +4 -4
  12. package/dist/ekyb.d.ts +1 -1
  13. package/dist/ekyb.esm.js +2 -2
  14. package/dist/{ekybManager-CwzaAdjM.esm.js → ekybManager-CQEK0tV2.esm.js} +1 -1
  15. package/dist/{ekybStateMachine-BOG89tFg.esm.js → ekybStateMachine-Di32xFWm.esm.js} +1 -1
  16. package/dist/extensibility.d.ts +8 -8
  17. package/dist/extensibility.esm.js +6 -6
  18. package/dist/{faceCaptureManagerFactory-BWD3O4Eg.d.ts → faceCaptureManagerFactory-DPf1rRsd.d.ts} +2 -2
  19. package/dist/{faceCaptureManagerFactory-aKmM3ism.esm.js → faceCaptureManagerFactory-DWbsV9Hb.esm.js} +1 -1
  20. package/dist/{faceCaptureSetup-CbLgaydb.esm.js → faceCaptureSetup-D0OgPQ4h.esm.js} +2 -2
  21. package/dist/flow-events.d.ts +1 -1
  22. package/dist/flow.d.ts +2 -2
  23. package/dist/flow.esm.js +1 -1
  24. package/dist/{flowServices-CaH1ElaI.esm.js → flowServices-VcegkvP8.esm.js} +2 -2
  25. package/dist/home.d.ts +1 -1
  26. package/dist/id.d.ts +1 -1
  27. package/dist/id.esm.js +2 -2
  28. package/dist/{idCaptureManager-Cmcwu1iM.d.ts → idCaptureManager-QSB3ejX0.d.ts} +1 -1
  29. package/dist/{idCaptureManager-Cni6kB_4.esm.js → idCaptureManager-qzGxTU-i.esm.js} +1 -1
  30. package/dist/{idCaptureStateMachine-CZWjw6Qa.esm.js → idCaptureStateMachine-5NIUTkyD.esm.js} +5 -5
  31. package/dist/{index-DQ2fdqoI.d.ts → index-Ci9wEPiD.d.ts} +1 -1
  32. package/dist/index.esm.js +1 -1
  33. package/dist/mandatory-consent.d.ts +1 -1
  34. package/dist/{mandatoryConsentManager-Bztc-cm2.d.ts → mandatoryConsentManager-BYyb8A34.d.ts} +5 -5
  35. package/dist/{onDeviceFaceResults-wRyQ24qM.esm.js → onDeviceFaceResults-BCVwIXUb.esm.js} +1 -1
  36. package/dist/personhood.d.ts +1 -1
  37. package/dist/personhood.esm.js +2 -2
  38. package/dist/{recordingService-5by5uVOf.esm.js → recordingService-DmC3aGiF.esm.js} +1 -1
  39. package/dist/selfie.d.ts +3 -3
  40. package/dist/selfie.esm.js +5 -5
  41. package/dist/{selfieUploadService-B4LnSIf6.esm.js → selfieErrorUtils-wgI_IxO1.esm.js} +20 -1
  42. package/dist/{selfieManager-D57f1R4V.esm.js → selfieManager-BpKCOb4e.esm.js} +2 -2
  43. package/dist/{selfieManager-CN8wJ14s.d.ts → selfieManager-Dq9wNlcg.d.ts} +1 -1
  44. package/dist/{selfieStateMachine-nqQV3aNZ.esm.js → selfieStateMachine-O16pT4th.esm.js} +3 -13
  45. package/dist/session-Cc3O3VPK.esm.js +1 -0
  46. package/dist/session.d.ts +1 -1
  47. package/dist/session.esm.js +2 -2
  48. package/dist/{sessionInitializer-CCiF0nzE.esm.js → sessionInitializer-DNt98Rr1.esm.js} +1 -1
  49. package/dist/{setup-DmEcArzU.esm.js → setup-BEpnb0QN.esm.js} +1 -1
  50. package/dist/{types-BnEHzP1K.d.ts → types-BjTTkLmd.d.ts} +1 -1
  51. package/dist/{types-ctqh-iS4.d.ts → types-DMMk51Ec.d.ts} +1 -1
  52. package/dist/video-selfie.d.ts +39 -20
  53. package/dist/video-selfie.esm.js +307 -57
  54. package/dist/wasm.esm.js +1 -1
  55. package/dist/workflow.d.ts +5 -5
  56. package/dist/workflow.esm.js +5 -5
  57. package/package.json +3 -3
  58. package/dist/session-dUSz_co4.esm.js +0 -1
@@ -1,9 +1,9 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-DAshwHhX.esm.js";
2
2
  import { n as eventModuleNames } from "./events-Dy8PyVO5.esm.js";
3
3
  import { o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-aKmM3ism.esm.js";
4
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-DWbsV9Hb.esm.js";
5
5
  import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
6
- import { t as selfieMachine } from "./selfieStateMachine-nqQV3aNZ.esm.js";
6
+ import { t as selfieMachine } from "./selfieStateMachine-O16pT4th.esm.js";
7
7
  //#region src/modules/selfie/selfieActor.ts
8
8
  function createSelfieActor(options) {
9
9
  const dependencies = options.dependencies ?? {
@@ -1,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-CQQ99QOI.js";
2
2
  import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
3
- import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-BWD3O4Eg.js";
3
+ import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-DPf1rRsd.js";
4
4
  //#region src/modules/selfie/selfieUploadService.d.ts
5
5
  type ProcessFaceImageType = 'selfie' | 'videoSelfie';
6
6
  type ProcessFaceResponse = {
@@ -1,19 +1,9 @@
1
1
  import { r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
2
2
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
3
- import { t as faceCaptureMachine } from "./faceCaptureSetup-CbLgaydb.esm.js";
4
- import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-wRyQ24qM.esm.js";
3
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-D0OgPQ4h.esm.js";
4
+ import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-BCVwIXUb.esm.js";
5
5
  import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
6
- import { n as uploadSelfie, t as processFace } from "./selfieUploadService-B4LnSIf6.esm.js";
7
- Object.values(FACE_ERROR_CODES);
8
- const validateUploadResponse = ({ config, response }) => {
9
- if (!response) return FACE_ERROR_CODES.SERVER;
10
- if (response.confidence !== 0) return FACE_ERROR_CODES.LIVENESS;
11
- if (config.validateBrightness && !response.isBright) return FACE_ERROR_CODES.BRIGHTNESS;
12
- if (config.validateLenses && response.hasLenses) return FACE_ERROR_CODES.LENSES;
13
- if (config.validateFaceMask && response.hasFaceMask) return FACE_ERROR_CODES.MASK;
14
- if (config.validateClosedEyes && response.hasClosedEyes) return FACE_ERROR_CODES.CLOSED_EYES;
15
- if (config.validateHeadCover && response.hasHeadCover) return FACE_ERROR_CODES.HEAD_COVER;
16
- };
6
+ import { i as uploadSelfie, n as validateUploadResponse, r as processFace } from "./selfieErrorUtils-wgI_IxO1.esm.js";
17
7
  /**
18
8
  * The selfie capture state machine.
19
9
  *
@@ -0,0 +1 @@
1
+ import "./sessionInitializer-DNt98Rr1.esm.js";
package/dist/session.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as RegulationTypes } from "./types-BnEHzP1K.js";
1
+ import { a as RegulationTypes } from "./types-BjTTkLmd.js";
2
2
  import { n as FinishStatus, r as GetFinishStatusFn, s as getFinishStatus } from "./flowCompletionService-BlAHsKyv.js";
3
3
  //#region src/internal/fingerprint/types.d.ts
4
4
  type DeviceFingerprintResult = {
@@ -1,8 +1,8 @@
1
1
  import { n as getApi } from "./api-BDTZNnca.esm.js";
2
2
  import { t as endpoints } from "./endpoints-DLQ0g4-R.esm.js";
3
- import { i as initializeSession } from "./sessionInitializer-CCiF0nzE.esm.js";
3
+ import { i as initializeSession } from "./sessionInitializer-DNt98Rr1.esm.js";
4
4
  import { r as toIncodeApiError, t as IncodeApiError } from "./apiError-B-PkYxln.esm.js";
5
- import "./session-dUSz_co4.esm.js";
5
+ import "./session-Cc3O3VPK.esm.js";
6
6
  import { n as getFinishStatus } from "./flowCompletionService-B30WLCxd.esm.js";
7
7
  //#region src/internal/session/sessionService.ts
8
8
  /**
@@ -1609,7 +1609,7 @@ function isBrowserSimulation(browserEnv) {
1609
1609
  }
1610
1610
  //#endregion
1611
1611
  //#region src/internal/version/sdkVersion.ts
1612
- const SDK_VERSION = "0.0.0-dev-20260717-8aab9f6d";
1612
+ const SDK_VERSION = "0.0.0-dev-20260717-17d23610";
1613
1613
  //#endregion
1614
1614
  //#region src/internal/fingerprint/fingerprintService.ts
1615
1615
  function formatOsVersion(os) {
@@ -6,7 +6,7 @@ import { i as upgradeToWasmHttpClient$1, n as installFreshHttpClient, r as reset
6
6
  import { _ as setAnalyticsBatcher, g as resetAnalyticsBatcher, h as getAnalyticsBatcher } from "./events-Dy8PyVO5.esm.js";
7
7
  import { t as endpoints } from "./endpoints-DLQ0g4-R.esm.js";
8
8
  import { r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-Bu6bL_CX.esm.js";
9
- import { a as resetSessionInit, i as initializeSession, o as setClientFingerprintEnabled, s as setClientIpLookupEnabled } from "./sessionInitializer-CCiF0nzE.esm.js";
9
+ import { a as resetSessionInit, i as initializeSession, o as setClientFingerprintEnabled, s as setClientIpLookupEnabled } from "./sessionInitializer-DNt98Rr1.esm.js";
10
10
  import { a as resetTRI, n as initializeTRI, o as resetTRIProviderInstance } from "./tri-4RsGrIt6.esm.js";
11
11
  //#region ../infra/src/wasm/wasmDefaults.ts
12
12
  const WASM_CDN_BASE_URL = "https://cdn.incodesmile.com/ml-wasm-kit-release";
@@ -284,7 +284,7 @@ type FlowModuleConfig = {
284
284
  compareBackOcrEnabled: boolean;
285
285
  checkVoiceConsent: boolean;
286
286
  voiceConsentQuestions: number;
287
- /** Max voice-consent submission attempts before the step gives up. Default 3. */
287
+ /** Max validation attempts for each capture and voice step. Default 3; `-1` means unlimited. */
288
288
  numberOfTries?: number;
289
289
  /** Whether the consent audio is validated by backend speech-to-text. Default true. */
290
290
  speechToTextCheck?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { n as WasmPipeline } from "./warmup-Dv2alr2-.js";
2
2
  import { a as MLProviderConfig, n as IRecordingCapability, t as IStorageCapability } from "./IStorageCapability-B8IGxCwe.js";
3
3
  import { t as AvatarAssetsOverrides } from "./IFaceAvatarCapability-BrL19G0s.js";
4
- import { n as Flow, s as SelfieConcealmentOption } from "./types-BnEHzP1K.js";
4
+ import { n as Flow, s as SelfieConcealmentOption } from "./types-BjTTkLmd.js";
5
5
  //#region ../infra/src/capabilities/IWasmUtilCapability.d.ts
6
6
  type WasmUtilConfig = MLProviderConfig & {
7
7
  pipelines?: WasmPipeline[];
@@ -3,8 +3,8 @@ import { A as StateMachine, _ as MachineContext, c as AnyEventObject, p as Event
3
3
  import "./StateMachine-EDpYWy0i.js";
4
4
  import "./Actor-iTq7YY48.js";
5
5
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
6
- import { i as FlowModuleConfig } from "./types-BnEHzP1K.js";
7
- import { n as DetectionStatus } from "./types-ctqh-iS4.js";
6
+ import { i as FlowModuleConfig } from "./types-BjTTkLmd.js";
7
+ import { n as DetectionStatus } from "./types-DMMk51Ec.js";
8
8
  //#region src/modules/video-selfie/types.d.ts
9
9
  /**
10
10
  * The capture steps a Video Selfie session can run, in flow order. Which steps
@@ -27,6 +27,9 @@ type VideoSelfieConfig = FlowModuleConfig['VIDEO_ONBOARDING'];
27
27
  type FacingMode = 'user' | 'environment';
28
28
  //#endregion
29
29
  //#region ../infra/src/media/CameraCompositor.d.ts
30
+ type CameraCompositorOptions = {
31
+ fps?: number;
32
+ };
30
33
  /**
31
34
  * Composites the *active* camera into a canvas and exposes the canvas as a
32
35
  * single, stable `MediaStream` to record. Switching cameras (front ↔ back)
@@ -40,16 +43,18 @@ type FacingMode = 'user' | 'environment';
40
43
  */
41
44
  declare class CameraCompositor {
42
45
  private readonly fps;
46
+ private readonly frameIntervalMs;
43
47
  private canvas;
44
48
  private ctx;
45
49
  private video;
46
- private rafId;
50
+ private frameRequestId;
51
+ private frameRequestKind;
52
+ private lastDrawTimeMs;
53
+ private lastVideoTimeSeconds;
47
54
  private audioTrack;
48
55
  private videoTrack;
49
56
  private composite;
50
- constructor(options?: {
51
- fps?: number;
52
- });
57
+ constructor(options?: CameraCompositorOptions);
53
58
  /**
54
59
  * Begin compositing `stream` and return the composite stream to record. The
55
60
  * stream's audio track (if any) is carried through unchanged across later
@@ -68,6 +73,10 @@ declare class CameraCompositor {
68
73
  stop(): void;
69
74
  private setVideoSource;
70
75
  private startDrawLoop;
76
+ private scheduleNextFrame;
77
+ private cancelDrawLoop;
78
+ private drawCurrentFrame;
79
+ private getBoundedDimensions;
71
80
  }
72
81
  //#endregion
73
82
  //#region src/internal/recordings/multipartRecordingService.d.ts
@@ -108,19 +117,27 @@ declare class MultipartRecordingService {
108
117
  //#endregion
109
118
  //#region src/modules/video-selfie/videoSelfieStepDetector.d.ts
110
119
  type VideoSelfieDetectionStatus = DetectionStatus | 'wrongSide';
120
+ type VideoSelfieValidationFailure = 'selfieVerificationFailed' | 'nameVerificationFailed' | 'photoVerificationFailed' | 'idTypeMismatch' | 'idScanFailed';
121
+ type StepDetectionResult = {
122
+ outcome: 'success';
123
+ } | {
124
+ outcome: 'validationFailed';
125
+ failure: VideoSelfieValidationFailure;
126
+ } | {
127
+ outcome: 'retryableFailure';
128
+ failure: 'idScanFailed';
129
+ };
111
130
  /**
112
131
  * Runs the WASM detection + backend validation for a single capture step over
113
- * the given camera stream. Resolves once the step is captured AND validated by
114
- * the backend (advance the flow), rejects on a terminal/validation failure
115
- * (retry), and never settles for steps that have no auto-capture yet (the UI
116
- * advances them manually).
132
+ * the given camera stream. Returns either success or a typed validation
133
+ * failure, rejects on technical failures, and never settles for manual steps.
117
134
  */
118
135
  type StepDetector = (params: {
119
136
  step: VideoSelfieStep;
120
137
  stream: MediaStream;
121
138
  signal: AbortSignal;
122
139
  onStatus?: (status: VideoSelfieDetectionStatus) => void;
123
- }) => Promise<void>;
140
+ }) => Promise<StepDetectionResult>;
124
141
  //#endregion
125
142
  //#region src/modules/video-selfie/videoSelfieRecordingMachine.d.ts
126
143
  type VideoSelfieRecordingDependencies = {
@@ -141,7 +158,7 @@ type CreateVideoSelfieRecordingActorOptions = {
141
158
  };
142
159
  //#endregion
143
160
  //#region src/modules/video-selfie/videoSelfieRecordingManager.d.ts
144
- type VideoSelfieRecordingStatus = 'idle' | 'starting' | 'recording' | 'flippingId' | 'switchingCamera' | 'finalizing' | 'success' | 'finished' | 'error' | 'aborted';
161
+ type VideoSelfieRecordingStatus = 'idle' | 'starting' | 'recording' | 'validationFeedback' | 'flippingId' | 'switchingCamera' | 'finalizing' | 'success' | 'finished' | 'error' | 'aborted';
145
162
  type VideoSelfieRecordingState = {
146
163
  /** Current lifecycle status. */
147
164
  status: VideoSelfieRecordingStatus;
@@ -154,14 +171,16 @@ type VideoSelfieRecordingState = {
154
171
  /** The active source camera (raw, per-step facing). */
155
172
  stream: MediaStream | undefined;
156
173
  /**
157
- * The composited output stream (what's recorded) — a single canvas-backed
158
- * stream that follows camera switches. Preferred for the preview: it has one
159
- * camera consumer (the compositor), avoiding the black second-`<video>` that
160
- * some devices show when the raw camera track is rendered twice.
174
+ * The composited recording output — a bounded canvas-backed stream that
175
+ * follows camera switches while the preview renders the raw source stream.
161
176
  */
162
177
  composite: MediaStream | undefined;
163
178
  /** Live per-step detection feedback (e.g. `tooFar`, `blur`, `detecting`). */
164
179
  detectionStatus: VideoSelfieDetectionStatus | undefined;
180
+ /** Validation failure shown during the current retry/exhaustion dwell. */
181
+ validationFailure: VideoSelfieValidationFailure | undefined;
182
+ /** Remaining validation attempts for the active capture step; `-1` means unlimited. */
183
+ attemptsRemaining: number;
165
184
  /** The completed upload id, available during `success` and `finished`. */
166
185
  recordingId: string | null;
167
186
  /** Failure detail, set when `status === 'error'`. */
@@ -181,6 +200,7 @@ declare function createVideoSelfieRecordingManager(options?: CreateVideoSelfieRe
181
200
  subscribe(listener: (state: VideoSelfieRecordingState) => void): () => void;
182
201
  /** Acquire the first camera, open the upload, and begin recording. */
183
202
  start(): void;
203
+ retry(): void;
184
204
  /**
185
205
  * Advance to the next step. Switches the camera when the next step's
186
206
  * facing mode differs; finalizes the upload on the last step.
@@ -324,10 +344,9 @@ declare function createConsentRecorder(): ConsentRecorder;
324
344
  * it starts in a non-final `running` state and never transitions, so the
325
345
  * orchestrated flow stays in `runningModule` until the UI advances it.
326
346
  *
327
- * **Completion contract:** the L2 `incode-video-selfie` web component MUST call
328
- * `flowManager.completeModule()` once the recording manager reaches `finished`
329
- * (success) or `error` (terminal failure). Until that event is sent, the flow
330
- * orchestrator remains in `runningModule` — this is intentional.
347
+ * **Completion contract:** the L2 `incode-video-selfie` web component calls
348
+ * `flowManager.completeModule()` once the recording manager reaches `finished`.
349
+ * Recoverable errors stay inside the module until the user retries.
331
350
  *
332
351
  * **Abort / unmount:** if the user closes the module or the web component
333
352
  * unmounts before completion, the orchestrated flow manager's existing close /