@idmission/websdk-core 0.2.0-rc.2 → 0.5.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.
Files changed (209) hide show
  1. package/README.md +27 -1
  2. package/dist/attestation/clientAttestation.d.ts +5 -0
  3. package/dist/attestation/clientAttestation.d.ts.map +1 -1
  4. package/dist/attestation/clientAttestation.js +4 -4
  5. package/dist/attestation/collectClientAttestation.d.ts +3 -1
  6. package/dist/attestation/collectClientAttestation.d.ts.map +1 -1
  7. package/dist/attestation/collectClientAttestation.js +4 -3
  8. package/dist/camera/acquireCamera.d.ts +5 -0
  9. package/dist/camera/acquireCamera.d.ts.map +1 -1
  10. package/dist/camera/acquireCamera.js +25 -5
  11. package/dist/captureProgress/actor.d.ts +30 -0
  12. package/dist/captureProgress/actor.d.ts.map +1 -0
  13. package/dist/captureProgress/actor.js +754 -0
  14. package/dist/captureProgress/encoder.d.ts +7 -0
  15. package/dist/captureProgress/encoder.d.ts.map +1 -0
  16. package/dist/captureProgress/encoder.js +195 -0
  17. package/dist/captureProgress/index.d.ts +4 -0
  18. package/dist/captureProgress/index.d.ts.map +1 -0
  19. package/dist/captureProgress/index.js +45 -0
  20. package/dist/captureProgress/internal.d.ts +3 -0
  21. package/dist/captureProgress/internal.d.ts.map +1 -0
  22. package/dist/captureProgress/internal.js +1 -0
  23. package/dist/captureProgress/protocol.d.ts +224 -0
  24. package/dist/captureProgress/protocol.d.ts.map +1 -0
  25. package/dist/captureProgress/protocol.js +106 -0
  26. package/dist/captureProgress/recorder.d.ts +32 -0
  27. package/dist/captureProgress/recorder.d.ts.map +1 -0
  28. package/dist/captureProgress/recorder.js +554 -0
  29. package/dist/captureProgress/transport.d.ts +33 -0
  30. package/dist/captureProgress/transport.d.ts.map +1 -0
  31. package/dist/captureProgress/transport.js +109 -0
  32. package/dist/captureProgress/types.d.ts +35 -0
  33. package/dist/captureProgress/types.d.ts.map +1 -0
  34. package/dist/captureProgress/types.js +27 -0
  35. package/dist/client/IdmissionClient.d.ts +8 -1
  36. package/dist/client/IdmissionClient.d.ts.map +1 -1
  37. package/dist/client/IdmissionClient.js +96 -27
  38. package/dist/client/approval.d.ts +15 -0
  39. package/dist/client/approval.d.ts.map +1 -0
  40. package/dist/client/approval.js +19 -0
  41. package/dist/client/artifacts.d.ts +2 -0
  42. package/dist/client/artifacts.d.ts.map +1 -1
  43. package/dist/client/documentFileMetadata.d.ts +13 -0
  44. package/dist/client/documentFileMetadata.d.ts.map +1 -0
  45. package/dist/client/documentFileMetadata.js +51 -0
  46. package/dist/client/index.d.ts +3 -0
  47. package/dist/client/index.d.ts.map +1 -1
  48. package/dist/client/index.js +2 -0
  49. package/dist/client/payload.d.ts +3 -0
  50. package/dist/client/payload.d.ts.map +1 -1
  51. package/dist/client/payload.js +3 -1
  52. package/dist/client/submissionMetadata.d.ts +4 -1
  53. package/dist/client/submissionMetadata.d.ts.map +1 -1
  54. package/dist/client/submissionMetadata.js +13 -8
  55. package/dist/client/types.d.ts +8 -0
  56. package/dist/client/types.d.ts.map +1 -1
  57. package/dist/client/validateSession.d.ts +2 -0
  58. package/dist/client/validateSession.d.ts.map +1 -1
  59. package/dist/client/validateSession.js +53 -24
  60. package/dist/documentCapture/autoCaptureEngine.d.ts +106 -0
  61. package/dist/documentCapture/autoCaptureEngine.d.ts.map +1 -0
  62. package/dist/documentCapture/autoCaptureEngine.js +475 -0
  63. package/dist/documentCapture/autoCaptureGeometry.d.ts +514 -0
  64. package/dist/documentCapture/autoCaptureGeometry.d.ts.map +1 -0
  65. package/dist/documentCapture/autoCaptureGeometry.js +475 -0
  66. package/dist/documentCapture/autoCaptureGuidance.d.ts +61 -0
  67. package/dist/documentCapture/autoCaptureGuidance.d.ts.map +1 -0
  68. package/dist/documentCapture/autoCaptureGuidance.js +73 -0
  69. package/dist/documentCapture/autoCaptureMetadata.d.ts +193 -0
  70. package/dist/documentCapture/autoCaptureMetadata.d.ts.map +1 -0
  71. package/dist/documentCapture/autoCaptureMetadata.js +200 -0
  72. package/dist/documentCapture/autoCaptureOptions.d.ts +211 -0
  73. package/dist/documentCapture/autoCaptureOptions.d.ts.map +1 -0
  74. package/dist/documentCapture/autoCaptureOptions.js +177 -0
  75. package/dist/documentCapture/autoCaptureShutter.d.ts +162 -0
  76. package/dist/documentCapture/autoCaptureShutter.d.ts.map +1 -0
  77. package/dist/documentCapture/autoCaptureShutter.js +183 -0
  78. package/dist/documentCapture/controller.d.ts +38 -1
  79. package/dist/documentCapture/controller.d.ts.map +1 -1
  80. package/dist/documentCapture/controller.js +620 -40
  81. package/dist/documentCapture/index.d.ts +8 -2
  82. package/dist/documentCapture/index.d.ts.map +1 -1
  83. package/dist/documentCapture/index.js +6 -0
  84. package/dist/documentCapture/reducer.d.ts +26 -1
  85. package/dist/documentCapture/reducer.d.ts.map +1 -1
  86. package/dist/documentCapture/reducer.js +43 -0
  87. package/dist/documentCapture/state.d.ts +118 -0
  88. package/dist/documentCapture/state.d.ts.map +1 -1
  89. package/dist/documentCapture/state.js +24 -0
  90. package/dist/idCapture/controller.d.ts +24 -1
  91. package/dist/idCapture/controller.d.ts.map +1 -1
  92. package/dist/idCapture/controller.js +111 -13
  93. package/dist/idCapture/index.d.ts +1 -1
  94. package/dist/idCapture/index.d.ts.map +1 -1
  95. package/dist/idCapture/index.js +12 -1
  96. package/dist/idCapture/pipeline.d.ts +30 -0
  97. package/dist/idCapture/pipeline.d.ts.map +1 -1
  98. package/dist/idCapture/pipeline.js +33 -10
  99. package/dist/idCapture/state.d.ts +1 -3
  100. package/dist/idCapture/state.d.ts.map +1 -1
  101. package/dist/idCapture/submit.d.ts.map +1 -1
  102. package/dist/idCapture/submit.js +35 -1
  103. package/dist/idCapture/types.d.ts +2 -0
  104. package/dist/idCapture/types.d.ts.map +1 -1
  105. package/dist/index.d.ts +2 -0
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +1 -0
  108. package/dist/liveness/challengeGeometry.d.ts +48 -17
  109. package/dist/liveness/challengeGeometry.d.ts.map +1 -1
  110. package/dist/liveness/challengeGeometry.js +101 -54
  111. package/dist/models/DocumentDetection.d.ts +29 -1
  112. package/dist/models/DocumentDetection.d.ts.map +1 -1
  113. package/dist/models/DocumentDetection.js +75 -7
  114. package/dist/models/defaults/DocumentDetectorLiteRT.d.ts +2 -2
  115. package/dist/models/defaults/DocumentDetectorLiteRT.d.ts.map +1 -1
  116. package/dist/models/defaults/DocumentDetectorLiteRT.js +27 -2
  117. package/dist/models/defaults/HandLandmarkLiteRT.d.ts +3 -0
  118. package/dist/models/defaults/HandLandmarkLiteRT.d.ts.map +1 -0
  119. package/dist/models/defaults/HandLandmarkLiteRT.js +5 -0
  120. package/dist/models/defaults/IrisLandmarkLiteRT.d.ts +3 -0
  121. package/dist/models/defaults/IrisLandmarkLiteRT.d.ts.map +1 -0
  122. package/dist/models/defaults/IrisLandmarkLiteRT.js +5 -0
  123. package/dist/models/defaults/PalmDetectionLiteRT.d.ts +3 -0
  124. package/dist/models/defaults/PalmDetectionLiteRT.d.ts.map +1 -0
  125. package/dist/models/defaults/PalmDetectionLiteRT.js +5 -0
  126. package/dist/models/defaults/PoaDocumentDetectorLiteRT.d.ts +3 -0
  127. package/dist/models/defaults/PoaDocumentDetectorLiteRT.d.ts.map +1 -0
  128. package/dist/models/defaults/PoaDocumentDetectorLiteRT.js +19 -0
  129. package/dist/models/defaults/index.d.ts +13 -1
  130. package/dist/models/defaults/index.d.ts.map +1 -1
  131. package/dist/models/defaults/index.js +16 -0
  132. package/dist/models/preloadModels.d.ts +24 -16
  133. package/dist/models/preloadModels.d.ts.map +1 -1
  134. package/dist/models/preloadModels.js +33 -3
  135. package/dist/models/providers/litert/FaceLandmarker.d.ts +8 -1
  136. package/dist/models/providers/litert/FaceLandmarker.d.ts.map +1 -1
  137. package/dist/models/providers/litert/FaceLandmarker.js +95 -3
  138. package/dist/models/providers/litert/HandOverFaceDetector.d.ts +27 -0
  139. package/dist/models/providers/litert/HandOverFaceDetector.d.ts.map +1 -0
  140. package/dist/models/providers/litert/HandOverFaceDetector.js +162 -0
  141. package/dist/models/providers/litert/blazeFacePrePost.js +4 -2
  142. package/dist/models/providers/litert/docDetectPrePost.d.ts.map +1 -1
  143. package/dist/models/providers/litert/docDetectPrePost.js +20 -3
  144. package/dist/models/providers/litert/handLandmarkPrePost.d.ts +20 -0
  145. package/dist/models/providers/litert/handLandmarkPrePost.d.ts.map +1 -0
  146. package/dist/models/providers/litert/handLandmarkPrePost.js +72 -0
  147. package/dist/models/providers/litert/handOverFace.d.ts +44 -0
  148. package/dist/models/providers/litert/handOverFace.d.ts.map +1 -0
  149. package/dist/models/providers/litert/handOverFace.js +139 -0
  150. package/dist/models/providers/litert/irisPrePost.d.ts +38 -0
  151. package/dist/models/providers/litert/irisPrePost.d.ts.map +1 -0
  152. package/dist/models/providers/litert/irisPrePost.js +101 -0
  153. package/dist/models/providers/litert/palmPrePost.d.ts +55 -0
  154. package/dist/models/providers/litert/palmPrePost.d.ts.map +1 -0
  155. package/dist/models/providers/litert/palmPrePost.js +151 -0
  156. package/dist/sdkVersions.d.ts +18 -0
  157. package/dist/sdkVersions.d.ts.map +1 -0
  158. package/dist/sdkVersions.js +8 -0
  159. package/dist/selfieCapture/captureQuality.d.ts +43 -0
  160. package/dist/selfieCapture/captureQuality.d.ts.map +1 -0
  161. package/dist/selfieCapture/captureQuality.js +87 -0
  162. package/dist/selfieCapture/challengeRunner.d.ts +9 -2
  163. package/dist/selfieCapture/challengeRunner.d.ts.map +1 -1
  164. package/dist/selfieCapture/challengeRunner.js +2 -5
  165. package/dist/selfieCapture/controller.d.ts +62 -1
  166. package/dist/selfieCapture/controller.d.ts.map +1 -1
  167. package/dist/selfieCapture/controller.js +470 -105
  168. package/dist/selfieCapture/faceTracking.d.ts +69 -1
  169. package/dist/selfieCapture/faceTracking.d.ts.map +1 -1
  170. package/dist/selfieCapture/faceTracking.js +134 -6
  171. package/dist/selfieCapture/guidance.d.ts +64 -0
  172. package/dist/selfieCapture/guidance.d.ts.map +1 -1
  173. package/dist/selfieCapture/guidance.js +74 -0
  174. package/dist/selfieCapture/index.d.ts +4 -3
  175. package/dist/selfieCapture/index.d.ts.map +1 -1
  176. package/dist/selfieCapture/index.js +2 -2
  177. package/dist/selfieCapture/livenessMachine.d.ts +2 -0
  178. package/dist/selfieCapture/livenessMachine.d.ts.map +1 -1
  179. package/dist/selfieCapture/livenessMachine.js +8 -0
  180. package/dist/selfieCapture/pipeline.d.ts +8 -0
  181. package/dist/selfieCapture/pipeline.d.ts.map +1 -1
  182. package/dist/selfieCapture/pipeline.js +2 -2
  183. package/dist/selfieCapture/reducer.d.ts +7 -0
  184. package/dist/selfieCapture/reducer.d.ts.map +1 -1
  185. package/dist/selfieCapture/reducer.js +45 -4
  186. package/dist/selfieCapture/state.d.ts +6 -0
  187. package/dist/selfieCapture/state.d.ts.map +1 -1
  188. package/dist/selfieCapture/state.js +1 -0
  189. package/dist/signature/frameDecode.d.ts.map +1 -1
  190. package/dist/signature/frameDecode.js +29 -0
  191. package/dist/signature/metadata.d.ts +10 -1
  192. package/dist/signature/metadata.d.ts.map +1 -1
  193. package/dist/signature/quality.d.ts +14 -6
  194. package/dist/signature/quality.d.ts.map +1 -1
  195. package/dist/signature/quality.js +13 -4
  196. package/dist/signatureCapture/controller.d.ts +2 -1
  197. package/dist/signatureCapture/controller.d.ts.map +1 -1
  198. package/dist/signatureCapture/controller.js +118 -23
  199. package/dist/signatureCapture/pipeline.d.ts +14 -2
  200. package/dist/signatureCapture/pipeline.d.ts.map +1 -1
  201. package/dist/signatureCapture/pipeline.js +36 -8
  202. package/dist/signatureCapture/state.d.ts +15 -0
  203. package/dist/signatureCapture/state.d.ts.map +1 -1
  204. package/dist/version.d.ts +1 -1
  205. package/dist/version.d.ts.map +1 -1
  206. package/dist/version.js +1 -1
  207. package/dist/videoIdCapture/controller.d.ts.map +1 -1
  208. package/dist/videoIdCapture/controller.js +64 -3
  209. package/package.json +10 -2
@@ -0,0 +1,514 @@
1
+ import type { DetectedObject, DetectedObjectBox } from '../models/DocumentDetection';
2
+ import type { PoaGuidanceDiagnostics } from './autoCaptureGuidance';
3
+ /**
4
+ * The two-sided window on `fill`, seeded by #343 and fixed by #380 on real
5
+ * frames.
6
+ *
7
+ * THE TWO SIDES NOW MEASURE AGAINST DIFFERENT RECTANGLES. `FILL_MIN` is still
8
+ * taken against the GUIDE RECT: it asks whether the page is big enough to read,
9
+ * relative to the box the applicant was asked to fill. `FILL_MAX` is taken
10
+ * against the whole CAMERA FRAME, because the saved image is the whole frame
11
+ * (see `defaultCaptureFrame` in controller.ts). Against the guide it forced the
12
+ * page to fit inside the A4 box — on a 16:9 webcam a column ~40% of the width —
13
+ * though everything around the box is saved too.
14
+ *
15
+ * It is not redundant with `touchesFrameEdge`, and the proof is the two live
16
+ * desktop captures below: pages clipped top and bottom whose boxes stop 0.87%
17
+ * SHORT of the frame edges, so the clamp never fires. Camera-relative they read
18
+ * 0.983. The re-seated 0.975 sits between those and the largest camera-relative
19
+ * fill any frame reaches while clearing every other check on the saved device
20
+ * recordings (0.974 of 270), so it keeps rejecting the clips and costs no
21
+ * capture there. That gap is ~0.01 wide, like #380's — an operating point, not
22
+ * a separation.
23
+ *
24
+ * The #380 notes below describe the guide-relative 0.99 it replaces.
25
+ *
26
+ * `FILL_MAX` is the anti-crop gate: a capture zoomed into the address block has
27
+ * paper edge to edge, so its fill runs to ~1.0 while a complete sheet on
28
+ * #343's ground truth reads 0.720-0.974. `FILL_MAX` also has to absorb the skew
29
+ * budget (~0.03-0.05 at 10°), which #343 chose to spend here rather than gate
30
+ * or de-skew.
31
+ *
32
+ * `FILL_MIN` is the only thing between an applicant and a sharp unreadable
33
+ * capture — #344 found focus stays flat at 0.86-0.93 on a sheet shrunk to 0.4
34
+ * linear, because the crop IS the box, so focus can never catch "too far".
35
+ *
36
+ * **Fixed by #380** on 4 real handheld recordings (1079x1920 iPhone, printed
37
+ * Carta invoice, 17.5 fps, ~1000 frames), measured on frames that also pass
38
+ * stability — the only population the gate ever acts on:
39
+ *
40
+ * FILL_MAX 0.99 complete sheets reach p95 0.987 / max 0.996, a held capture
41
+ * cropped to the address block reads min 0.994 with 64 of 77
42
+ * frames pinned at exactly 1.0000. At 0.99, 0% of the crop
43
+ * passes and 3.7% of complete frames are rejected. #343's seed
44
+ * survived contact with a phone.
45
+ * FILL_MIN 0.70 the seed of 0.55 accepted **100%** of the too-far frames.
46
+ * A sheet held at a distance where its address is unreadable
47
+ * reads 0.574-0.593; readable framings bottom out at 0.710.
48
+ * At 0.70: 0% of readable rejected, 7.9% of too-far accepted
49
+ * (all of them transition frames, none from the held segment).
50
+ *
51
+ * Both distributions OVERLAP — complete max 0.996 against crop min 0.994,
52
+ * readable min 0.710 against too-far max 0.721. These are operating points in
53
+ * a ~0.01-wide gap, not separators, and that is the honest description of what
54
+ * this quantity can do. #380's simulation is what makes them defensible: over
55
+ * all four recordings the gate fires within a second on a good frame and never
56
+ * fires while the sheet is cropped.
57
+ *
58
+ * Measured on ONE phone, ONE sheet, Carta only (no A4 was available) — and the
59
+ * skew budget #343 estimated at 0.03-0.05 is still UNMEASURED, which matters
60
+ * because FILL_MAX has only 3.7% margin and tilt eats exactly that.
61
+ */
62
+ export declare const POA_FILL_MAX = 0.975;
63
+ export declare const POA_FILL_MIN = 0.7;
64
+ /**
65
+ * Focus floor, seeded by #344 in a POA-SPECIFIC slot rather than reusing
66
+ * `defaultFocusThresholds.singlePage` — that slot is keyed by
67
+ * `detectedDocumentType` and #361 established class 22 still owns paper IDs,
68
+ * and its 0.3 mobile value was a verbatim copy of the idCard entry (`55e1d527`,
69
+ * 2024-12-12) that was never tuned: it passes 5 of 11 visibly-blurred frames.
70
+ * 11 real POA captures score 0.871-0.921, so 0.6 left 1.45x headroom.
71
+ *
72
+ * **#380 took the fallback.** #344's corpus is stills an applicant chose to
73
+ * send; live handheld frames sit lower. On the 272 frames of #380's recordings
74
+ * that would have captured but for focus, 0.6 rejects 4.8% and 0.5 rejects
75
+ * 1.8%, with p05 at 0.670 — 0.6 is biting into the live tail. The distribution
76
+ * is bimodal (motion-blurred frames land at 0.29-0.50), so 0.5 still catches
77
+ * everything genuinely blurred.
78
+ */
79
+ export declare const POA_FOCUS_THRESHOLDS: {
80
+ readonly desktop: 0;
81
+ readonly mobile: 0.5;
82
+ };
83
+ /**
84
+ * Confidence floor before a box is trusted for geometry at all. Mirrors
85
+ * `passportBooklet.ts`'s MIN_BOOKLET_SCORE: the detector emits low-score false
86
+ * positives that would otherwise corrupt every margin below.
87
+ *
88
+ * **Raised from 0.3 to 0.55 by #380, and this is the single most consequential
89
+ * constant on this page.** At 0.3 a box scoring 0.31 is trusted exactly as much
90
+ * as one scoring 0.85 — and the low-scoring boxes are the SPILLED ones, which
91
+ * #343 established are geometrically indistinguishable from a correct box
92
+ * (both are large, both have small margins) and cannot be told apart by any
93
+ * fill threshold. #380 watched that leak: on a recording of a sheet held too
94
+ * far away to read, the fill window alone still let 6 frames through to
95
+ * capture, every one of them on a POA box scoring under 0.50.
96
+ *
97
+ * 0.55 closes that leak completely at zero cost — across #380's four
98
+ * recordings the two well-framed ones still fire at 0.0s and 0.8s, unchanged.
99
+ * The margin is thin (readable holds have a p05 of 0.563), so this is an
100
+ * operating point on one device; the DIRECTION — that 0.3 is far too low to
101
+ * gate a capture on — is the durable part.
102
+ */
103
+ export declare const POA_MIN_SCORE = 0.55;
104
+ /**
105
+ * Labels the framing geometry may be measured on, in priority order.
106
+ *
107
+ * `POA` (LiteRT class 23) is the specialized class, but #342 established that
108
+ * the class is only a "there is paper here" trigger — it holds ~0.81-0.83 on a
109
+ * sheet cropped to a quarter of its area — so the anti-crop guarantee rests
110
+ * entirely on the geometry below. The fallbacks let the same instrument run
111
+ * against the SHIPPING detector, which has no POA class, so the overlay is
112
+ * useful before #354 lands the official export.
113
+ *
114
+ * `Document back` is in the list because real POA sheets read as one. On a
115
+ * printed utility bill the detector routinely scores it ABOVE the POA class
116
+ * (0.73 vs 0.59 on the sheet that prompted this), which is unsurprising: a
117
+ * dense page of text and a card back look alike to a detector trained mostly
118
+ * on IDs. Without it, a frame where POA dipped under `POA_MIN_SCORE` fell all
119
+ * the way through to "no document detected" while the model was confidently
120
+ * looking straight at the page.
121
+ *
122
+ * It does NOT widen what an applicant can submit, which is the objection to
123
+ * check before extending this list: `Document` is already the last fallback,
124
+ * so a generic ID document has always qualified. Excluding only the BACK of
125
+ * one was an asymmetry, not a guard. Nothing here classifies the document —
126
+ * that is the backend's job — and auto-capture is assistance, not enforcement
127
+ * (#345): the cost of a wrong label is a well-framed photo of the wrong page,
128
+ * which is exactly what the manual shutter produces today.
129
+ *
130
+ * Order matters and this goes LAST: priority is by label, so `POA` still wins
131
+ * whenever it clears the floor, and this only decides frames that would
132
+ * otherwise have had no target at all.
133
+ */
134
+ export declare const POA_TARGET_LABELS: readonly string[];
135
+ /** Structural input (matches `passportBooklet.ts`): fixtures pass plain strings. */
136
+ type DetectedObjectLike = {
137
+ box: DetectedObjectBox;
138
+ label: string;
139
+ score: number;
140
+ };
141
+ /**
142
+ * Every gate the loop can fail, in the provisional precedence order the
143
+ * overlay renders them in.
144
+ *
145
+ * `tooClose` leads because "move back" is what the AMEX failure needs. It and
146
+ * `tooFar` are the two sides of #343's one window, and on `fill` alone they
147
+ * cannot both fire — but frame-edge contact can put a small sliver of sheet in
148
+ * both at once. `tooClose` winning is then the correct instruction: moving
149
+ * closer cannot bring paper that is off the frame back into view. Stability and focus sit last because they are meaningless until the
150
+ * sheet is framed — and #344 made `outOfFocus`-last a REQUIREMENT rather than
151
+ * a preference: focus is only computed on a frame that already has a box, and
152
+ * the score is non-monotonic, recovering at severe blur.
153
+ *
154
+ * Ruled by #345. `notStable` sits ABOVE `outOfFocus`, reversing the earlier
155
+ * provisional order, on #383's finding that sub-0.5 focus frames carry REAL
156
+ * motion (box IoU 0.910 vs 0.967, detection 0.664 vs 0.738): on paper a focus
157
+ * failure IS a motion failure, so "hold still" is the instruction that fixes
158
+ * it and "out of focus" is a paraphrase the applicant cannot act on
159
+ * differently. It also matches `idCapture`, which ends NOT_STABLE ->
160
+ * OUT_OF_FOCUS.
161
+ *
162
+ * `outOfFocus`-last is additionally STRUCTURAL, not a preference:
163
+ * `focusThresholdMet` initialises `false` and is only assigned inside the
164
+ * good-frame branch, so promoting focus up the ladder would report "out of
165
+ * focus" on frames where focus was never measured.
166
+ *
167
+ * `noDocument` and `tooFar` stay separate codes even though they always
168
+ * co-fire — an empty fill window returns `tooFar: true` by design, because the
169
+ * hard detection floor makes "no box" the far end of the range rather than an
170
+ * error. Distinct codes cost nothing and give the capture metadata a real
171
+ * distinction; they deliberately do NOT share a string (#346).
172
+ */
173
+ export declare const POA_GATE_ORDER: readonly ["noDocument", "tooClose", "tooFar", "notStable", "outOfFocus"];
174
+ export type PoaGate = (typeof POA_GATE_ORDER)[number];
175
+ /**
176
+ * Raw framing geometry for ONE frame. No verdicts and no thresholds: after
177
+ * #343 there is exactly one gated quantity (`fill`) and it is gated on an
178
+ * aggregate, so a per-frame boolean here would be a second, disagreeing source
179
+ * of truth. See `computePoaFillWindow`.
180
+ *
181
+ * Margins are signed fractions of the frame dimension — negative means the box
182
+ * runs off that edge. They are READINGS: #343 deleted the margin gate, and
183
+ * they survive only so #345 can say WHICH WAY to move once `fill` says the
184
+ * framing is wrong. Reported unrounded because the differences that matter are
185
+ * ~1% of frame.
186
+ */
187
+ export type PoaFraming = {
188
+ leftMargin: number;
189
+ rightMargin: number;
190
+ topMargin: number;
191
+ bottomMargin: number;
192
+ /**
193
+ * The binding edge. Gates NOTHING — kept because #342, #343 and #353's
194
+ * device pass are all recorded in this quantity, so dropping it would
195
+ * silently break comparability with every number already on the map.
196
+ */
197
+ minMargin: number;
198
+ /** The gated quantity: the LARGER of the two components (#343). */
199
+ fill: number;
200
+ fillWidth: number;
201
+ fillHeight: number;
202
+ };
203
+ /**
204
+ * Measure one detected box against the frame. Pure, and verdict-free.
205
+ */
206
+ /** A rectangle in camera-frame pixels. */
207
+ export type FrameRect = {
208
+ x: number;
209
+ y: number;
210
+ width: number;
211
+ height: number;
212
+ };
213
+ /**
214
+ * The rectangle the applicant is actually asked to fill.
215
+ *
216
+ * This is the largest CENTRED sub-rect of the camera frame matching the guide
217
+ * box's aspect ratio, and gating on it rather than on the raw frame is the
218
+ * whole point:
219
+ *
220
+ * - Under `snapToGuides` (the default) the feed is sized to the guide rect
221
+ * under `object-fit: cover`, so this IS the pixels on screen. On a 9:16
222
+ * phone at A4 that is 100% of frame width by 79.5% of height; on a 16:9
223
+ * webcam it is 39.8% of WIDTH by 100% of height.
224
+ * - Under `fullscreen` the guide box is drawn inside a full-bleed feed, so
225
+ * this is a close approximation of it rather than exactly it — still far
226
+ * better than grading the whole frame.
227
+ *
228
+ * Grading the raw frame instead made `max(fillWidth, fillHeight)` pick the
229
+ * axis the applicant does not control on any landscape camera: a sheet filling
230
+ * a portrait guide box read `fillHeight ≈ 0.98` and passed, while
231
+ * `fillWidth ≈ 0.49` — half the capture being background — was never looked at.
232
+ * It also meant the submitted image contained pixels the applicant never saw.
233
+ *
234
+ * With no `aspectRatio` there is no guide to fill, so the frame is the rect.
235
+ */
236
+ export declare function computeGuideRect(frameWidth: number, frameHeight: number, aspectRatio?: number): FrameRect;
237
+ /**
238
+ * Measure a detection box against the guide rect.
239
+ *
240
+ * Margins and fills are fractions OF THE GUIDE RECT, so a sheet wider than the
241
+ * guide reads `fill > 1` and a sheet spilling past an edge reads a NEGATIVE
242
+ * margin. Both are wanted: they are what makes "it does not fit in the box"
243
+ * trip `FILL_MAX` instead of quietly passing.
244
+ */
245
+ export declare function computePoaFraming(box: DetectedObjectBox, rect: FrameRect): PoaFraming;
246
+ /**
247
+ * How close to a camera-frame edge a box coordinate may sit and still count as
248
+ * touching it, as a fraction of that axis.
249
+ *
250
+ * FLOAT SAFETY, NOT A TUNING KNOB. The LiteRT decoder clamps every coordinate
251
+ * to the frame, so a box over paper that continues past the edge lands on the
252
+ * edge EXACTLY; this only absorbs rounding. It is about a pixel on a 1080-wide
253
+ * frame.
254
+ *
255
+ * Deliberately not widened to a box-encoding grid step. On the five saved
256
+ * #380-era device recordings, frames passing today's gate go from 66 rejected
257
+ * at the exact clamp to 134 at one grid step — and every one of the extra 68 is
258
+ * a sheet whose edge IS inside the frame, which is friction with nothing bought.
259
+ */
260
+ export declare const POA_FRAME_EDGE_EPSILON = 0.001;
261
+ /**
262
+ * Whether a detection box touches an edge of the CAMERA frame — the paper
263
+ * continues past what the camera can see.
264
+ *
265
+ * `fill` cannot see this. It measures how big the box is, and a sheet slid
266
+ * sideways off the frame just produces a narrower box: the detector clamps to
267
+ * the frame, and on a portrait phone an A4 guide spans the camera's full width,
268
+ * so on that axis `fillW` can never exceed 1.0 however much paper is hidden.
269
+ * `max(fillW, fillH)` then hands the verdict to the other axis. Replayed
270
+ * through the gate, a sheet with HALF its width off the frame read `fill 0.90`
271
+ * and captured — which is what demo testers reported, and what #380's crop
272
+ * recording never exercised: it zoomed in on the address block, putting paper
273
+ * edge to edge on both axes.
274
+ *
275
+ * Not the per-edge margin gate #343 deleted. That measured distance to the
276
+ * GUIDE rect, where the complete-vs-clipped separation was a third of a grid
277
+ * step and drowned in quantization. This asks a yes/no question the decoder's
278
+ * clamp answers exactly — the box is on the frame edge or it is not.
279
+ */
280
+ export declare function touchesFrameEdge(box: DetectedObjectBox, frameWidth: number, frameHeight: number): boolean;
281
+ /**
282
+ * #343's gate: one two-sided window on `fill`, read on an AGGREGATE rather
283
+ * than on the instantaneous frame.
284
+ *
285
+ * Aggregation is not smoothing for its own sake. Every int8 export's box
286
+ * encodings sit on a grid (official POA 0.16679), so handheld tremor dithers
287
+ * `fill` across 2-3 grid cells and a bare threshold re-crosses on a sheet that
288
+ * is not moving. #343 measured a 12-frame mean cutting that spread ~3.5x, and
289
+ * ruled that aggregating the QUANTITY beats N-of-M on the verdict, which only
290
+ * slows the oscillation down. The window is the same length as the IoU
291
+ * stability window the engine already keeps.
292
+ *
293
+ * `spread` is the deliverable, not decoration: whether hysteresis is owed ON
294
+ * TOP of aggregation is #380's open question, and it is answerable only from
295
+ * how far `instant` actually roams on real handheld video.
296
+ */
297
+ export type PoaFillWindow = {
298
+ /**
299
+ * Mean `fill` against the GUIDE RECT across the window — what `fillMin` is
300
+ * compared with.
301
+ */
302
+ mean: number;
303
+ /**
304
+ * Mean `fill` against the CAMERA FRAME across the window — what `fillMax` is
305
+ * compared with, because the saved image is the whole frame. Optional so a
306
+ * hand-built window still type-checks; absent reads as `mean`.
307
+ */
308
+ frameMean?: number;
309
+ /** This frame's `fill`, before aggregation. */
310
+ instant: number;
311
+ min: number;
312
+ max: number;
313
+ /** Peak-to-peak across the window — the dither #380 has to measure. */
314
+ spread: number;
315
+ framesTracked: number;
316
+ framesNeeded: number;
317
+ /** In-force constants, carried so the overlay never has to guess them. */
318
+ fillMin: number;
319
+ fillMax: number;
320
+ /**
321
+ * Some box in the window touched a camera-frame edge — see
322
+ * `touchesFrameEdge`. Reported on its own so a `tooClose` with `fill` in
323
+ * range is explained rather than looking like a wrong threshold.
324
+ *
325
+ * OPTIONAL even though `computePoaFillWindow` always sets it, for the same
326
+ * reason as `captureMetadata` in state.ts: this type ships from the public
327
+ * `documentCapture` entry, building one is a supported consumer pattern
328
+ * (fixtures, mocked diagnostics), and a required field would break every
329
+ * such literal in a patch release. Read absent as `false`.
330
+ */
331
+ frameEdgeContact?: boolean;
332
+ /**
333
+ * Cropped — the AMEX failure. Move back. Either the sheet is bigger than the
334
+ * guide (`mean > fillMax`) or it runs off the frame (`frameEdgeContact`).
335
+ */
336
+ tooClose: boolean;
337
+ /** Too far away, or below the detection floor. Move closer. */
338
+ tooFar: boolean;
339
+ };
340
+ /**
341
+ * `fillMin` / `fillMax` are REQUIRED so this function reads no constant of its
342
+ * own. `resolveAutoCapture` is the single place the defaults are applied
343
+ * (#340); a `?? POA_FILL_MIN` here would be a second one, free to drift.
344
+ */
345
+ export type PoaFillWindowOptions = {
346
+ fillMin: number;
347
+ fillMax: number;
348
+ framesNeeded?: number;
349
+ };
350
+ /**
351
+ * Aggregate a window of `fill` readings, newest first, and take the verdict.
352
+ *
353
+ * The verdict is taken on however many frames are present rather than waiting
354
+ * for a full window: the window fills in under a second, and `notStable`
355
+ * already holds the capture until the IoU window is complete, so a second
356
+ * "not enough frames" state would only be a way for the two to disagree.
357
+ *
358
+ * `edgeContacts` is `touchesFrameEdge` per frame, same order and same window.
359
+ * ANY contact in the window trips `tooClose`, not just this frame's: on the
360
+ * saved device recordings contact flickers, with 15 frames that miss the edge
361
+ * sitting inside contact episodes. A per-frame check would let a crop through
362
+ * on exactly those frames, and the burst window would bank one.
363
+ *
364
+ * `frameFills` is `fill` measured against the camera frame, same order and
365
+ * window; `fillMax` is compared with its mean. It defaults to `fills`, which is
366
+ * exact whenever the guide rect is the whole frame.
367
+ */
368
+ export declare function computePoaFillWindow(fills: readonly number[], options: PoaFillWindowOptions, edgeContacts?: readonly boolean[], frameFills?: readonly number[]): PoaFillWindow;
369
+ /**
370
+ * Peak score per emitted label.
371
+ *
372
+ * Keyed by the label STRING the model emitted rather than by a fixed set of
373
+ * per-class fields (IdCapture's `idCardFrontDetectionScore` &c.), so a class
374
+ * the map has not learned yet still shows up — as `class_23` if #354's export
375
+ * lands before the label map does. #341: this is why the still-open class
376
+ * question (#339) cannot ripple into the overlay's field list.
377
+ */
378
+ export declare function peakScoresByLabel(detectedObjects: readonly DetectedObjectLike[]): Record<string, number>;
379
+ export type PoaTarget = {
380
+ label: string;
381
+ score: number;
382
+ box: DetectedObjectBox;
383
+ };
384
+ /**
385
+ * Pick the box the framing geometry is measured on: the highest-scoring box
386
+ * carrying the first label in `labels` that has any candidate above
387
+ * `minScore`. Priority is by LABEL, not by score, so a stray high-confidence
388
+ * `Document` on a POA sheet cannot displace the POA box.
389
+ */
390
+ export declare function selectPoaTarget(detectedObjects: readonly DetectedObjectLike[], labels?: readonly string[], minScore?: number): PoaTarget | null;
391
+ export type PoaGateInputs = {
392
+ framing: PoaFraming | null;
393
+ fillWindow: PoaFillWindow;
394
+ focusThresholdMet: boolean | null;
395
+ isStable: boolean;
396
+ };
397
+ /**
398
+ * Every failing gate, in `POA_GATE_ORDER`. All of them, not just the winner:
399
+ * a one-message ladder is what #345 decides, and the operator needs to see
400
+ * what else was true when it decided.
401
+ *
402
+ * A `null` focus verdict means the focus model is not loaded (or #344 rules it
403
+ * out as a gate) — an absent signal is not a failing one.
404
+ */
405
+ /**
406
+ * The winning guidance code for this frame, or null when every gate passes.
407
+ *
408
+ * Exactly one code wins, and it is the first failure in `POA_GATE_ORDER`.
409
+ */
410
+ export declare function winningPoaGate(inputs: PoaGateInputs): PoaGate | null;
411
+ /**
412
+ * Whether this frame satisfies every gate — the shutter's whole condition.
413
+ *
414
+ * Derived from `failingPoaGates` rather than re-tested, so the thing the
415
+ * shutter fires on and the thing the overlay renders cannot disagree (#345).
416
+ *
417
+ * Thin only on its face: a satisfied frame already implies `stabilityFrames`
418
+ * consecutive frames of IoU >= the stability threshold PLUS a `stabilityFrames`
419
+ * mean of `fill` — roughly 0.7 s of evidence at 17.3 fps. The gates' own
420
+ * windows ARE the accumulator, which is why no second integrator is stacked on
421
+ * top of them.
422
+ */
423
+ export declare function isAutoCaptureSatisfied(inputs: PoaGateInputs): boolean;
424
+ export declare function failingPoaGates(inputs: PoaGateInputs): PoaGate[];
425
+ /**
426
+ * Focus, with everything needed to argue about it. #344 asks whether the
427
+ * ID-card focus model separates a sharp sheet of paper from a blurry one at
428
+ * all; a bare score cannot answer that, so the in-force threshold and the
429
+ * platform branch that supplied it travel with it. #344 answered the question
430
+ * — paper is the STRONGEST substrate measured — and reseeded the threshold in
431
+ * `POA_FOCUS_THRESHOLDS`, where desktop is 0 and therefore passes
432
+ * unconditionally: invisible without `branch` on screen.
433
+ */
434
+ export type AutoCaptureFocusDiagnostics = {
435
+ score: number;
436
+ threshold: number;
437
+ branch: 'desktop' | 'mobile';
438
+ thresholdMet: boolean;
439
+ predictionTimeMs: number;
440
+ };
441
+ /**
442
+ * Stability, as the IoU tracker sees it. `iou` is the WORST pair in the
443
+ * window, which is the value the verdict is actually taken on; `framesTracked`
444
+ * vs `framesNeeded` is what distinguishes "moving" from "not enough frames
445
+ * yet", which look identical from the verdict alone.
446
+ */
447
+ export type AutoCaptureStabilityDiagnostics = {
448
+ worstIou: number | null;
449
+ threshold: number;
450
+ framesTracked: number;
451
+ framesNeeded: number;
452
+ isStable: boolean;
453
+ };
454
+ /**
455
+ * One frame's worth of instrument reading — the engine's entire public state
456
+ * surface.
457
+ *
458
+ * #341's governing constraint: `debug.tsx` only ever reads public controller
459
+ * state, so THIS TYPE IS the surface. Anything the overlay must show has to be
460
+ * here, and anything here is public API the spec (#347) has to keep.
461
+ */
462
+ export type AutoCaptureDiagnostics = {
463
+ /** `FrameLoop`'s frameId — the last rAF handle, not a counter (see FrameLoop.ts). */
464
+ frameId: number;
465
+ /** ms since the loop started, from `FrameLoop`'s `timeRunning`. */
466
+ timeRunning: number;
467
+ /** Every box above the model's score threshold, for the overlay's rectangles. */
468
+ detectedObjects: DetectedObject[];
469
+ /** Peak score per emitted label. */
470
+ scores: Record<string, number>;
471
+ /** The box framing was measured on, or null when nothing qualified. */
472
+ target: PoaTarget | null;
473
+ /** Confidence floor `target` had to clear. */
474
+ targetMinScore: number;
475
+ framing: PoaFraming | null;
476
+ /**
477
+ * #343's gate. Present on every frame, including frames with no box — an
478
+ * empty window is the far end of the range, not a missing reading.
479
+ */
480
+ fillWindow: PoaFillWindow;
481
+ /** null when the focus model is not loaded. */
482
+ focus: AutoCaptureFocusDiagnostics | null;
483
+ stability: AutoCaptureStabilityDiagnostics;
484
+ /** Every failing gate, in `POA_GATE_ORDER`. Empty means all gates pass. */
485
+ failingGates: PoaGate[];
486
+ /**
487
+ * `failingGates.length === 0` — the shutter's whole condition, carried here
488
+ * so a consumer never re-derives it and gets a different answer.
489
+ */
490
+ satisfied: boolean;
491
+ /**
492
+ * The message triple. With a 250 ms debounce and an 1800 ms hold, "wrong
493
+ * threshold" and "stuck message" are indistinguishable on glass without it.
494
+ */
495
+ guidance: PoaGuidanceDiagnostics;
496
+ /** Detector inference time for this frame, ms. */
497
+ detectionTimeMs: number;
498
+ /** Detections/second over the recent window — the honest loop rate. */
499
+ frameRate: number;
500
+ /** Dimensions of the canvas the detector actually ran on. */
501
+ frameWidth: number;
502
+ frameHeight: number;
503
+ /** The camera's decoded resolution. Differs from frame* if the loop downscales. */
504
+ videoWidth: number;
505
+ videoHeight: number;
506
+ /**
507
+ * The rectangle framing was measured against, in frame pixels — the guide
508
+ * box, not the frame, unless no `aspectRatio` was supplied. Reported so the
509
+ * overlay can draw the rectangle the numbers actually refer to.
510
+ */
511
+ guideRect: FrameRect;
512
+ };
513
+ export {};
514
+ //# sourceMappingURL=autoCaptureGeometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoCaptureGeometry.d.ts","sourceRoot":"","sources":["../../src/documentCapture/autoCaptureGeometry.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,eAAO,MAAM,YAAY,QAAQ,CAAA;AACjC,eAAO,MAAM,YAAY,MAAM,CAAA;AAC/B;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB;;;CAAuC,CAAA;AACxE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,aAAa,OAAO,CAAA;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAK9C,CAAA;AAED,oFAAoF;AACpF,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,iBAAiB,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,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