@prosopo/provider 5.6.4 → 5.8.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 (119) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +23 -22
  2. package/.turbo/turbo-build$colon$tsc.log +28 -25
  3. package/.turbo/turbo-build.log +24 -23
  4. package/CHANGELOG.md +207 -0
  5. package/dist/api/blacklistRequestInspector.d.ts +4 -3
  6. package/dist/api/blacklistRequestInspector.d.ts.map +1 -1
  7. package/dist/api/blacklistRequestInspector.js +32 -30
  8. package/dist/api/blacklistRequestInspector.js.map +1 -1
  9. package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.d.ts +0 -1
  10. package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.d.ts.map +1 -1
  11. package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js +1 -9
  12. package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js.map +1 -1
  13. package/dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.d.ts.map +1 -1
  14. package/dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js +1 -49
  15. package/dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js.map +1 -1
  16. package/dist/api/captcha/getFrictionlessCaptchaChallenge/handler.d.ts.map +1 -1
  17. package/dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js +3 -3
  18. package/dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js.map +1 -1
  19. package/dist/api/captcha/getImageCaptchaChallenge.d.ts.map +1 -1
  20. package/dist/api/captcha/getImageCaptchaChallenge.js +2 -2
  21. package/dist/api/captcha/getImageCaptchaChallenge.js.map +1 -1
  22. package/dist/api/captcha/getPoWCaptchaChallenge.d.ts.map +1 -1
  23. package/dist/api/captcha/getPoWCaptchaChallenge.js +2 -2
  24. package/dist/api/captcha/getPoWCaptchaChallenge.js.map +1 -1
  25. package/dist/api/captcha/getPuzzleCaptchaChallenge.d.ts.map +1 -1
  26. package/dist/api/captcha/getPuzzleCaptchaChallenge.js +2 -2
  27. package/dist/api/captcha/getPuzzleCaptchaChallenge.js.map +1 -1
  28. package/dist/api/captcha/submitPoWCaptchaSolution.d.ts.map +1 -1
  29. package/dist/api/captcha/submitPoWCaptchaSolution.js +2 -1
  30. package/dist/api/captcha/submitPoWCaptchaSolution.js.map +1 -1
  31. package/dist/api/verify.d.ts.map +1 -1
  32. package/dist/api/verify.js +1 -1
  33. package/dist/api/verify.js.map +1 -1
  34. package/dist/cjs/api/blacklistRequestInspector.cjs +31 -28
  35. package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/constants.cjs +0 -9
  36. package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.cjs +0 -48
  37. package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/handler.cjs +2 -2
  38. package/dist/cjs/api/captcha/getImageCaptchaChallenge.cjs +1 -1
  39. package/dist/cjs/api/captcha/getPoWCaptchaChallenge.cjs +1 -1
  40. package/dist/cjs/api/captcha/getPuzzleCaptchaChallenge.cjs +1 -1
  41. package/dist/cjs/api/captcha/submitPoWCaptchaSolution.cjs +3 -2
  42. package/dist/cjs/api/verify.cjs +1 -1
  43. package/dist/cjs/index.cjs +1 -0
  44. package/dist/cjs/tasks/captchaManager.cjs +3 -3
  45. package/dist/cjs/tasks/frictionless/frictionlessTasks.cjs +3 -5
  46. package/dist/cjs/tasks/frictionless/frictionlessTasksUtils.cjs +30 -1
  47. package/dist/cjs/tasks/imgCaptcha/imgCaptchaTasks.cjs +9 -9
  48. package/dist/cjs/tasks/puzzle/puzzleDifficulty.cjs +13 -170
  49. package/dist/cjs/tasks/puzzle/puzzleRenderer.cjs +2 -2
  50. package/dist/cjs/tasks/spam/checkTrafficFilter.cjs +2 -8
  51. package/dist/cjs/util.cjs +5 -1
  52. package/dist/index.js +2 -2
  53. package/dist/tasks/captchaManager.d.ts +1 -1
  54. package/dist/tasks/captchaManager.d.ts.map +1 -1
  55. package/dist/tasks/captchaManager.js +4 -4
  56. package/dist/tasks/captchaManager.js.map +1 -1
  57. package/dist/tasks/frictionless/frictionlessTasks.d.ts +1 -2
  58. package/dist/tasks/frictionless/frictionlessTasks.d.ts.map +1 -1
  59. package/dist/tasks/frictionless/frictionlessTasks.js +2 -4
  60. package/dist/tasks/frictionless/frictionlessTasks.js.map +1 -1
  61. package/dist/tasks/frictionless/frictionlessTasksUtils.d.ts.map +1 -1
  62. package/dist/tasks/frictionless/frictionlessTasksUtils.js +30 -1
  63. package/dist/tasks/frictionless/frictionlessTasksUtils.js.map +1 -1
  64. package/dist/tasks/imgCaptcha/imgCaptchaTasks.d.ts +1 -2
  65. package/dist/tasks/imgCaptcha/imgCaptchaTasks.d.ts.map +1 -1
  66. package/dist/tasks/imgCaptcha/imgCaptchaTasks.js +9 -10
  67. package/dist/tasks/imgCaptcha/imgCaptchaTasks.js.map +1 -1
  68. package/dist/tasks/puzzle/puzzleDifficulty.d.ts +0 -17
  69. package/dist/tasks/puzzle/puzzleDifficulty.d.ts.map +1 -1
  70. package/dist/tasks/puzzle/puzzleDifficulty.js +11 -164
  71. package/dist/tasks/puzzle/puzzleDifficulty.js.map +1 -1
  72. package/dist/tasks/puzzle/puzzleRenderer.d.ts.map +1 -1
  73. package/dist/tasks/puzzle/puzzleRenderer.js +1 -1
  74. package/dist/tasks/puzzle/puzzleRenderer.js.map +1 -1
  75. package/dist/tasks/spam/checkTrafficFilter.d.ts +1 -1
  76. package/dist/tasks/spam/checkTrafficFilter.d.ts.map +1 -1
  77. package/dist/tasks/spam/checkTrafficFilter.js +3 -9
  78. package/dist/tasks/spam/checkTrafficFilter.js.map +1 -1
  79. package/dist/tests/integration/api/admin/apiRegisterSiteKeyEndpoint.integration.test.js +1 -19
  80. package/dist/tests/integration/api/admin/apiRegisterSiteKeyEndpoint.integration.test.js.map +1 -1
  81. package/dist/tests/integration/api/admin/apiRegisterSiteKeysEndpoint.integration.test.js +1 -10
  82. package/dist/tests/integration/api/admin/apiRegisterSiteKeysEndpoint.integration.test.js.map +1 -1
  83. package/dist/tests/integration/api/blacklistRequestInspector.integration.test.js +16 -16
  84. package/dist/tests/integration/api/blacklistRequestInspector.integration.test.js.map +1 -1
  85. package/dist/tests/integration/api/blacklistRequestInspector.storm.integration.test.js +5 -5
  86. package/dist/tests/integration/api/blacklistRequestInspector.storm.integration.test.js.map +1 -1
  87. package/dist/tests/integration/clientSettingsPersistence.integration.test.js +1 -15
  88. package/dist/tests/integration/clientSettingsPersistence.integration.test.js.map +1 -1
  89. package/dist/tests/unit/api/blacklistRequestInspector.unit.test.js +185 -19
  90. package/dist/tests/unit/api/blacklistRequestInspector.unit.test.js.map +1 -1
  91. package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/constants.unit.test.js +1 -30
  92. package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/constants.unit.test.js.map +1 -1
  93. package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.unit.test.js +0 -6
  94. package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.unit.test.js.map +1 -1
  95. package/dist/tests/unit/api/getFrictionlessCaptchaChallenge.unit.test.js +5 -62
  96. package/dist/tests/unit/api/getFrictionlessCaptchaChallenge.unit.test.js.map +1 -1
  97. package/dist/tests/unit/tasks/captchaManager.unit.test.js +1 -10
  98. package/dist/tests/unit/tasks/captchaManager.unit.test.js.map +1 -1
  99. package/dist/tests/unit/tasks/client/clientTasks.unit.test.js +3 -23
  100. package/dist/tests/unit/tasks/client/clientTasks.unit.test.js.map +1 -1
  101. package/dist/tests/unit/tasks/frictionless/frictionlessTasksUtils.unit.test.js +64 -0
  102. package/dist/tests/unit/tasks/frictionless/frictionlessTasksUtils.unit.test.js.map +1 -1
  103. package/dist/tests/unit/tasks/imgCaptcha/imgCaptchaTasks.unit.test.js +18 -48
  104. package/dist/tests/unit/tasks/imgCaptcha/imgCaptchaTasks.unit.test.js.map +1 -1
  105. package/dist/tests/unit/tasks/puzzleDifficulty.unit.test.js +2 -53
  106. package/dist/tests/unit/tasks/puzzleDifficulty.unit.test.js.map +1 -1
  107. package/dist/util.d.ts.map +1 -1
  108. package/dist/util.js +5 -1
  109. package/dist/util.js.map +1 -1
  110. package/package.json +32 -31
  111. package/dist/api/captcha/contextAwareValidation.d.ts +0 -5
  112. package/dist/api/captcha/contextAwareValidation.d.ts.map +0 -1
  113. package/dist/api/captcha/contextAwareValidation.js +0 -45
  114. package/dist/api/captcha/contextAwareValidation.js.map +0 -1
  115. package/dist/cjs/api/captcha/contextAwareValidation.cjs +0 -47
  116. package/dist/tests/unit/api/contextAwareValidation.unit.test.d.ts +0 -2
  117. package/dist/tests/unit/api/contextAwareValidation.unit.test.d.ts.map +0 -1
  118. package/dist/tests/unit/api/contextAwareValidation.unit.test.js +0 -105
  119. package/dist/tests/unit/api/contextAwareValidation.unit.test.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/provider@5.6.4 build:cjs
2
+ > @prosopo/provider@5.8.0 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -22,6 +22,7 @@ ViteCommonJSConfig: .
22
22
  '/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
23
23
  '/home/runner/work/captcha/captcha/packages/types-env/tsconfig.json',
24
24
  '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
25
+ '/home/runner/work/captcha/captcha/packages/captcha-severity/tsconfig.json',
25
26
  '/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
26
27
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
27
28
  '/home/runner/work/captcha/captcha/packages/puzzle-assets/tsconfig.json'
@@ -46,6 +47,7 @@ ViteCommonJSConfig: .
46
47
  '@prosopo/api',
47
48
  '@prosopo/types-env',
48
49
  '@prosopo/keyring',
50
+ '@prosopo/captcha-severity',
49
51
  '@prosopo/datasets',
50
52
  '@prosopo/load-balancer',
51
53
  '@prosopo/puzzle-assets'
@@ -55,7 +57,7 @@ ViteCommonJSConfig: .
55
57
  vite v8.1.5 building ssr environment for production...
56
58
  Bundle build started
57
59
  
58
- ✓ 108 modules transformed.
60
+ ✓ 107 modules transformed.
59
61
  rendering chunks...
60
62
  computing gzip size...
61
63
  dist/cjs/tasks/index.cjs 0.08 kB │ gzip: 0.07 kB
@@ -71,7 +73,6 @@ dist/cjs/utils/hashUserIp.cjs 0
71
73
  dist/cjs/api/testSiteKey.cjs 0.65 kB │ gzip: 0.32 kB
72
74
  dist/cjs/utils/hashUserAgent.cjs 0.66 kB │ gzip: 0.40 kB
73
75
  dist/cjs/api/validateAddress.cjs 0.80 kB │ gzip: 0.36 kB
74
- dist/cjs/tasks/frictionless/frictionlessTasksUtils.cjs 0.85 kB │ gzip: 0.43 kB
75
76
  dist/cjs/api/ja4.cjs 0.85 kB │ gzip: 0.47 kB
76
77
  dist/cjs/api/dnsEventUrl.cjs 0.85 kB │ gzip: 0.46 kB
77
78
  dist/cjs/tasks/dataset/datasetTasks.cjs 0.92 kB │ gzip: 0.41 kB
@@ -82,6 +83,7 @@ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/sessionDedup.cjs 1
82
83
  dist/cjs/tasks/powCaptcha/powTasksUtils.cjs 1.05 kB │ gzip: 0.50 kB
83
84
  dist/cjs/api/admin/apiRegisterSiteKeyEndpoint.cjs 1.07 kB │ gzip: 0.48 kB
84
85
  dist/cjs/api/admin/apiRegisterSiteKeysEndpoint.cjs 1.14 kB │ gzip: 0.52 kB
86
+ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/constants.cjs 1.15 kB │ gzip: 0.60 kB
85
87
  dist/cjs/utils/normalizeRequestIp.cjs 1.16 kB │ gzip: 0.52 kB
86
88
  dist/cjs/api/admin/apiRemoveSiteKeysEndpoint.cjs 1.16 kB │ gzip: 0.50 kB
87
89
  dist/cjs/api/admin/apiRemoveSiteKeyEndpoint.cjs 1.17 kB │ gzip: 0.50 kB
@@ -94,7 +96,6 @@ dist/cjs/api/admin/apiRemoveAllDecisionMachinesEndpoint.cjs 1
94
96
  dist/cjs/tasks/puzzle/backgroundBuffer.cjs 1.37 kB │ gzip: 0.52 kB
95
97
  dist/cjs/pairs.cjs 1.39 kB │ gzip: 0.60 kB
96
98
  dist/cjs/tasks/dataset/datasetTasksUtils.cjs 1.42 kB │ gzip: 0.49 kB
97
- dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/constants.cjs 1.42 kB │ gzip: 0.66 kB
98
99
  dist/cjs/utils/clientMetaData.cjs 1.48 kB │ gzip: 0.72 kB
99
100
  dist/cjs/compositeIpAddress.cjs 1.55 kB │ gzip: 0.57 kB
100
101
  dist/cjs/tasks/detection/getBotScore.cjs 1.55 kB │ gzip: 0.55 kB
@@ -112,16 +113,17 @@ dist/cjs/utils/honeypot/phraseBank.cjs 1
112
113
  dist/cjs/api/handshakeTimingMiddleware.cjs 1.88 kB │ gzip: 0.71 kB
113
114
  dist/cjs/api/admin/apiClearAllCountersEndpoint.cjs 2.01 kB │ gzip: 0.78 kB
114
115
  dist/cjs/api/captcha/assignDetectorBundle.cjs 2.03 kB │ gzip: 0.86 kB
115
- dist/cjs/api/captcha/contextAwareValidation.cjs 2.09 kB │ gzip: 0.90 kB
116
116
  dist/cjs/tasks/spam/updateSpamEmailDomains.cjs 2.12 kB │ gzip: 0.85 kB
117
117
  dist/cjs/tasks/frictionless/routingMachine.cjs 2.17 kB │ gzip: 0.91 kB
118
118
  dist/cjs/api/public.cjs 2.18 kB │ gzip: 0.91 kB
119
119
  dist/cjs/migrations/frictionlessLadder.cjs 2.19 kB │ gzip: 0.95 kB
120
120
  dist/cjs/tasks/puzzle/stratifiedSampler.cjs 2.20 kB │ gzip: 1.08 kB
121
+ dist/cjs/tasks/frictionless/frictionlessTasksUtils.cjs 2.21 kB │ gzip: 1.10 kB
121
122
  dist/cjs/tasks/captchaTypeSelection.cjs 2.44 kB │ gzip: 1.04 kB
122
123
  dist/cjs/api/admin/apiDnsEventEndpoint.cjs 2.59 kB │ gzip: 1.00 kB
123
124
  dist/cjs/utils/dns.cjs 2.66 kB │ gzip: 1.02 kB
124
125
  dist/cjs/api/forwardVerify.cjs 2.66 kB │ gzip: 1.12 kB
126
+ dist/cjs/tasks/puzzle/puzzleDifficulty.cjs 2.66 kB │ gzip: 1.10 kB
125
127
  dist/cjs/api/captcha/checkSpamEmail.cjs 2.73 kB │ gzip: 0.95 kB
126
128
  dist/cjs/api/captcha/submitPuzzleCaptchaSolution.cjs 2.77 kB │ gzip: 0.99 kB
127
129
  dist/cjs/api/captcha/maintenanceModeResponses.cjs 2.91 kB │ gzip: 0.77 kB
@@ -134,40 +136,39 @@ dist/cjs/services/ipComparison.cjs 3
134
136
  dist/cjs/tasks/spam/evaluateEmailSpamRules.cjs 4.03 kB │ gzip: 1.60 kB
135
137
  dist/cjs/tasks/spam/checkSpamEmail.cjs 4.14 kB │ gzip: 1.14 kB
136
138
  dist/cjs/api/captcha/trafficFilterRequestTime.cjs 4.17 kB │ gzip: 1.53 kB
137
- dist/cjs/tasks/puzzle/puzzleRenderer.cjs 4.24 kB │ gzip: 1.51 kB
139
+ dist/cjs/tasks/puzzle/puzzleRenderer.cjs 4.25 kB │ gzip: 1.51 kB
138
140
  dist/cjs/api/hardBlockVerdictCache.cjs 4.27 kB │ gzip: 1.70 kB
139
141
  dist/cjs/api/captcha.cjs 4.51 kB │ gzip: 1.40 kB
140
142
  dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.cjs 4.56 kB │ gzip: 1.07 kB
141
143
  dist/cjs/tasks/dnsEvent/enrichDnsEvent.cjs 4.84 kB │ gzip: 1.74 kB
142
- dist/cjs/index.cjs 4.85 kB │ gzip: 1.01 kB
144
+ dist/cjs/index.cjs 4.95 kB │ gzip: 1.03 kB
143
145
  dist/cjs/tasks/tasks.cjs 5.07 kB │ gzip: 1.57 kB
144
146
  dist/cjs/util/usageCounters.cjs 5.72 kB │ gzip: 2.03 kB
145
- dist/cjs/tasks/puzzle/puzzleDifficulty.cjs 5.78 kB │ gzip: 2.05 kB
146
- dist/cjs/api/captcha/getPoWCaptchaChallenge.cjs 6.65 kB │ gzip: 1.87 kB
147
- dist/cjs/api/captcha/getImageCaptchaChallenge.cjs 6.98 kB │ gzip: 1.99 kB
148
- dist/cjs/api/captcha/getPuzzleCaptchaChallenge.cjs 7.48 kB │ gzip: 2.00 kB
147
+ dist/cjs/api/captcha/getPoWCaptchaChallenge.cjs 6.73 kB │ gzip: 1.89 kB
148
+ dist/cjs/api/captcha/getImageCaptchaChallenge.cjs 7.06 kB │ gzip: 2.01 kB
149
+ dist/cjs/tasks/spam/checkTrafficFilter.cjs 7.47 kB │ gzip: 2.48 kB
149
150
  dist/cjs/api/metrics.cjs 7.51 kB │ gzip: 2.12 kB
150
- dist/cjs/tasks/spam/checkTrafficFilter.cjs 7.65 kB │ gzip: 2.55 kB
151
+ dist/cjs/api/captcha/getPuzzleCaptchaChallenge.cjs 7.56 kB │ gzip: 2.03 kB
151
152
  dist/cjs/tasks/detection/bundlePool.cjs 8.72 kB │ gzip: 3.26 kB
152
- dist/cjs/api/captcha/submitPoWCaptchaSolution.cjs 8.85 kB │ gzip: 2.66 kB
153
+ dist/cjs/api/captcha/submitPoWCaptchaSolution.cjs 8.93 kB │ gzip: 2.68 kB
154
+ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.cjs 10.33 kB │ gzip: 1.82 kB
153
155
  dist/cjs/api/startProviderApi.cjs 11.62 kB │ gzip: 3.70 kB
154
156
  dist/cjs/tasks/client/clientTasks.cjs 11.73 kB │ gzip: 3.04 kB
155
157
  dist/cjs/tasks/decisionMachine/decisionMachineRunner.cjs 12.32 kB │ gzip: 3.81 kB
156
- dist/cjs/api/blacklistRequestInspector.cjs 12.41 kB │ gzip: 4.31 kB
157
- dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.cjs 12.47 kB │ gzip: 2.26 kB
158
- dist/cjs/util.cjs 13.25 kB │ gzip: 3.22 kB
159
- dist/cjs/api/verify.cjs 13.86 kB │ gzip: 2.60 kB
160
- dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/handler.cjs 18.33 kB │ gzip: 4.30 kB
161
- dist/cjs/tasks/frictionless/frictionlessTasks.cjs 20.34 kB │ gzip: 5.38 kB
162
- dist/cjs/tasks/captchaManager.cjs 22.33 kB │ gzip: 6.35 kB
158
+ dist/cjs/api/blacklistRequestInspector.cjs 13.02 kB │ gzip: 4.39 kB
159
+ dist/cjs/util.cjs 13.33 kB │ gzip: 3.24 kB
160
+ dist/cjs/api/verify.cjs 13.81 kB │ gzip: 2.58 kB
161
+ dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/handler.cjs 18.49 kB │ gzip: 4.32 kB
162
+ dist/cjs/tasks/frictionless/frictionlessTasks.cjs 20.29 kB │ gzip: 5.36 kB
163
+ dist/cjs/tasks/captchaManager.cjs 22.43 kB │ gzip: 6.38 kB
163
164
  dist/cjs/tasks/puzzleCaptcha/puzzleTasks.cjs 24.03 kB │ gzip: 5.15 kB
164
165
  dist/cjs/tasks/powCaptcha/powTasks.cjs 24.84 kB │ gzip: 5.97 kB
165
- dist/cjs/tasks/imgCaptcha/imgCaptchaTasks.cjs 28.41 kB │ gzip: 6.47 kB
166
+ dist/cjs/tasks/imgCaptcha/imgCaptchaTasks.cjs 27.96 kB │ gzip: 6.37 kB
166
167
  dist/cjs/tasks/detection/decodeBehavior.cjs 32.24 kB │ gzip: 10.32 kB
167
168
  dist/cjs/tasks/detection/decodeSimd.cjs 36.03 kB │ gzip: 11.96 kB
168
169
  dist/cjs/tasks/detection/decodePayload.cjs 49.79 kB │ gzip: 16.98 kB
169
170
 
170
- ✓ built in 113ms
171
+ ✓ built in 191ms
171
172
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodeBehavior.js to /home/runner/work/captcha/captcha/packages/provider/dist/cjs/tasks/detection/decodeBehavior.js
172
173
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodePayload.js to /home/runner/work/captcha/captcha/packages/provider/dist/cjs/tasks/detection/decodePayload.js
173
174
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodeSimd.js to /home/runner/work/captcha/captcha/packages/provider/dist/cjs/tasks/detection/decodeSimd.js
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/provider@5.6.4 build:tsc
2
+ > @prosopo/provider@5.8.0 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 1:56:54 PM - Projects in this build:
5
+ 1:16:06 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../util/tsconfig.json
8
8
  * ../logger/tsconfig.json
@@ -21,54 +21,57 @@
21
21
  * ../types-env/tsconfig.json
22
22
  * ../env/tsconfig.json
23
23
  * ../api-express-router/tsconfig.json
24
+ * ../captcha-severity/tsconfig.json
24
25
  * ../datasets/tsconfig.json
25
26
  * ../load-balancer/tsconfig.json
26
27
  * ../puzzle-assets/tsconfig.json
27
28
  * tsconfig.json
28
29
 
29
- 1:56:54 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
30
+ 1:16:06 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
30
31
 
31
- 1:56:54 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
32
+ 1:16:06 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
32
33
 
33
- 1:56:54 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
34
+ 1:16:06 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
34
35
 
35
- 1:56:54 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/index.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
36
+ 1:16:06 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
36
37
 
37
- 1:56:54 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
38
+ 1:16:06 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
38
39
 
39
- 1:56:54 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
40
+ 1:16:06 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
40
41
 
41
- 1:56:54 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/index.ts' is older than output '../types/tsconfig.tsbuildinfo'
42
+ 1:16:06 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
42
43
 
43
- 1:56:54 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
44
+ 1:16:06 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
44
45
 
45
- 1:56:54 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
46
+ 1:16:06 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
46
47
 
47
- 1:56:54 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
48
+ 1:16:06 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
48
49
 
49
- 1:56:54 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
50
+ 1:16:06 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
50
51
 
51
- 1:56:54 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/rule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
52
+ 1:16:06 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
52
53
 
53
- 1:56:54 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/index.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
54
+ 1:16:06 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types.test-d.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
54
55
 
55
- 1:56:54 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/mongoGlobalSetup.ts' is older than output '../database/tsconfig.tsbuildinfo'
56
+ 1:16:06 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/unit/captchaLabel.unit.test.ts' is older than output '../database/tsconfig.tsbuildinfo'
56
57
 
57
- 1:56:54 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
58
+ 1:16:06 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.test.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
58
59
 
59
- 1:56:54 PM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/index.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
60
+ 1:16:06 PM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/env.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
60
61
 
61
- 1:56:54 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/index.ts' is older than output '../env/tsconfig.tsbuildinfo'
62
+ 1:16:06 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/index.ts' is older than output '../env/tsconfig.tsbuildinfo'
62
63
 
63
- 1:56:54 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/tests/unit/testDoubles.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
64
+ 1:16:06 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/errorHandler.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
64
65
 
65
- 1:56:54 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
66
+ 1:16:06 PM - Project '../captcha-severity/tsconfig.json' is up to date because newest input '../captcha-severity/src/index.test.ts' is older than output '../captcha-severity/tsconfig.tsbuildinfo'
66
67
 
67
- 1:56:54 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
68
+ 1:16:06 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/dataset.unit.test.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
68
69
 
69
- 1:56:54 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/background.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
70
+ 1:16:06 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
70
71
 
71
- 1:56:54 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
72
+ 1:16:06 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/background.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
72
73
 
73
- 1:56:54 PM - Building project '/home/runner/work/captcha/captcha/packages/provider/tsconfig.json'...
74
+ 1:16:06 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
75
+
76
+ 1:16:06 PM - Building project '/home/runner/work/captcha/captcha/packages/provider/tsconfig.json'...
74
77
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/provider@5.6.4 build
2
+ > @prosopo/provider@5.8.0 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/provider@5.6.4 build:cross-env
6
+ > @prosopo/provider@5.8.0 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -26,6 +26,7 @@ ViteEsmConfig: .
26
26
  '/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
27
27
  '/home/runner/work/captcha/captcha/packages/types-env/tsconfig.json',
28
28
  '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
29
+ '/home/runner/work/captcha/captcha/packages/captcha-severity/tsconfig.json',
29
30
  '/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
30
31
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
31
32
  '/home/runner/work/captcha/captcha/packages/puzzle-assets/tsconfig.json'
@@ -50,6 +51,7 @@ ViteEsmConfig: .
50
51
  '@prosopo/api',
51
52
  '@prosopo/types-env',
52
53
  '@prosopo/keyring',
54
+ '@prosopo/captcha-severity',
53
55
  '@prosopo/datasets',
54
56
  '@prosopo/load-balancer',
55
57
  '@prosopo/puzzle-assets'
@@ -59,7 +61,7 @@ ViteEsmConfig: .
59
61
  vite v8.1.5 building ssr environment for production...
60
62
  Bundle build started
61
63
  
62
- ✓ 108 modules transformed.
64
+ ✓ 107 modules transformed.
63
65
  rendering chunks...
64
66
  computing gzip size...
65
67
  dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
@@ -76,7 +78,6 @@ dist/utils/hashUserIp.js 0.52 k
76
78
  dist/api/testSiteKey.js 0.56 kB │ gzip: 0.30 kB
77
79
  dist/utils/hashUserAgent.js 0.63 kB │ gzip: 0.39 kB
78
80
  dist/api/validateAddress.js 0.70 kB │ gzip: 0.33 kB
79
- dist/tasks/frictionless/frictionlessTasksUtils.js 0.79 kB │ gzip: 0.42 kB
80
81
  dist/api/dnsEventUrl.js 0.80 kB │ gzip: 0.44 kB
81
82
  dist/api/ja4.js 0.80 kB │ gzip: 0.44 kB
82
83
  dist/tasks/dataset/datasetTasks.js 0.85 kB │ gzip: 0.39 kB
@@ -85,6 +86,7 @@ dist/api/headerCheckMiddleware.js 0.91 k
85
86
  dist/api/captcha/getFrictionlessCaptchaChallenge/honeypotResponse.js 0.95 kB │ gzip: 0.51 kB
86
87
  dist/api/admin/apiRegisterSiteKeyEndpoint.js 1.00 kB │ gzip: 0.46 kB
87
88
  dist/api/captcha/getFrictionlessCaptchaChallenge/sessionDedup.js 1.01 kB │ gzip: 0.45 kB
89
+ dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js 1.04 kB │ gzip: 0.57 kB
88
90
  dist/api/admin/apiRemoveSiteKeysEndpoint.js 1.07 kB │ gzip: 0.48 kB
89
91
  dist/api/admin/apiRegisterSiteKeysEndpoint.js 1.08 kB │ gzip: 0.50 kB
90
92
  dist/api/admin/apiRemoveSiteKeyEndpoint.js 1.08 kB │ gzip: 0.48 kB
@@ -96,7 +98,6 @@ dist/schedulers/getClientList.js 1.19 k
96
98
  dist/tasks/puzzle/backgroundBuffer.js 1.20 kB │ gzip: 0.50 kB
97
99
  dist/api/admin/apiGetDecisionMachineEndpoint.js 1.26 kB │ gzip: 0.50 kB
98
100
  dist/api/admin/apiRemoveAllDecisionMachinesEndpoint.js 1.27 kB │ gzip: 0.51 kB
99
- dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js 1.27 kB │ gzip: 0.63 kB
100
101
  dist/api/admin/apiRemoveDecisionMachineEndpoint.js 1.29 kB │ gzip: 0.51 kB
101
102
  dist/tasks/dataset/datasetTasksUtils.js 1.30 kB │ gzip: 0.48 kB
102
103
  dist/compositeIpAddress.js 1.36 kB │ gzip: 0.55 kB
@@ -118,25 +119,26 @@ dist/tasks/spam/updateSpamEmailDomains.js 1.87 k
118
119
  dist/api/admin/apiClearAllCountersEndpoint.js 1.89 kB │ gzip: 0.76 kB
119
120
  dist/api/public.js 1.90 kB │ gzip: 0.83 kB
120
121
  dist/api/captcha/assignDetectorBundle.js 1.90 kB │ gzip: 0.84 kB
121
- dist/api/captcha/contextAwareValidation.js 1.99 kB │ gzip: 0.88 kB
122
122
  dist/migrations/frictionlessLadder.js 2.12 kB │ gzip: 0.93 kB
123
123
  dist/tasks/puzzle/stratifiedSampler.js 2.14 kB │ gzip: 1.07 kB
124
124
  dist/tasks/frictionless/routingMachine.js 2.16 kB │ gzip: 0.91 kB
125
+ dist/tasks/frictionless/frictionlessTasksUtils.js 2.16 kB │ gzip: 1.09 kB
125
126
  dist/api/captcha/maintenanceModeResponses.js 2.16 kB │ gzip: 0.73 kB
126
127
  dist/tasks/captchaTypeSelection.js 2.22 kB │ gzip: 1.03 kB
127
128
  dist/utils/dns.js 2.36 kB │ gzip: 0.95 kB
128
129
  dist/api/admin/apiDnsEventEndpoint.js 2.43 kB │ gzip: 0.96 kB
129
130
  dist/api/captcha/checkSpamEmail.js 2.47 kB │ gzip: 0.91 kB
131
+ dist/tasks/puzzle/puzzleDifficulty.js 2.50 kB │ gzip: 1.09 kB
130
132
  dist/api/captcha/submitPuzzleCaptchaSolution.js 2.55 kB │ gzip: 0.96 kB
131
133
  dist/api/forwardVerify.js 2.59 kB │ gzip: 1.10 kB
132
134
  dist/api/captcha/submitImageCaptchaSolution.js 2.59 kB │ gzip: 1.00 kB
133
135
  dist/api/admin/apiAdminRoutesProvider.js 2.78 kB │ gzip: 0.55 kB
134
- dist/index.js 2.86 kB │ gzip: 0.78 kB
136
+ dist/index.js 2.92 kB │ gzip: 0.80 kB
135
137
  dist/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.js 3.39 kB │ gzip: 1.32 kB
136
138
  dist/api/domainMiddleware.js 3.52 kB │ gzip: 1.22 kB
137
139
  dist/api/rawTlsSignalsMiddleware.js 3.69 kB │ gzip: 1.13 kB
138
140
  dist/tasks/spam/evaluateEmailSpamRules.js 3.84 kB │ gzip: 1.59 kB
139
- dist/tasks/puzzle/puzzleRenderer.js 3.90 kB │ gzip: 1.49 kB
141
+ dist/tasks/puzzle/puzzleRenderer.js 3.91 kB │ gzip: 1.49 kB
140
142
  dist/api/captcha/trafficFilterRequestTime.js 3.94 kB │ gzip: 1.51 kB
141
143
  dist/services/ipComparison.js 3.96 kB │ gzip: 1.19 kB
142
144
  dist/api/captcha.js 4.05 kB │ gzip: 1.31 kB
@@ -145,33 +147,32 @@ dist/api/hardBlockVerdictCache.js 4.14 k
145
147
  dist/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.js 4.35 kB │ gzip: 1.07 kB
146
148
  dist/tasks/tasks.js 4.69 kB │ gzip: 1.51 kB
147
149
  dist/tasks/dnsEvent/enrichDnsEvent.js 4.71 kB │ gzip: 1.72 kB
148
- dist/tasks/puzzle/puzzleDifficulty.js 5.50 kB │ gzip: 2.02 kB
149
150
  dist/util/usageCounters.js 5.65 kB │ gzip: 2.01 kB
150
- dist/api/captcha/getPoWCaptchaChallenge.js 6.02 kB │ gzip: 1.81 kB
151
- dist/api/captcha/getImageCaptchaChallenge.js 6.28 kB │ gzip: 1.94 kB
152
- dist/api/captcha/getPuzzleCaptchaChallenge.js 6.77 kB │ gzip: 1.95 kB
151
+ dist/api/captcha/getPoWCaptchaChallenge.js 6.09 kB │ gzip: 1.83 kB
152
+ dist/api/captcha/getImageCaptchaChallenge.js 6.35 kB │ gzip: 1.96 kB
153
+ dist/api/captcha/getPuzzleCaptchaChallenge.js 6.84 kB │ gzip: 1.97 kB
153
154
  dist/api/metrics.js 6.96 kB │ gzip: 2.09 kB
154
- dist/tasks/spam/checkTrafficFilter.js 7.32 kB │ gzip: 2.53 kB
155
+ dist/tasks/spam/checkTrafficFilter.js 7.16 kB │ gzip: 2.45 kB
155
156
  dist/tasks/detection/bundlePool.js 8.30 kB │ gzip: 3.21 kB
156
- dist/api/captcha/submitPoWCaptchaSolution.js 8.37 kB │ gzip: 2.62 kB
157
+ dist/api/captcha/submitPoWCaptchaSolution.js 8.41 kB │ gzip: 2.63 kB
158
+ dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js 9.36 kB │ gzip: 1.80 kB
157
159
  dist/api/startProviderApi.js 9.93 kB │ gzip: 3.42 kB
158
160
  dist/tasks/client/clientTasks.js 11.27 kB │ gzip: 3.00 kB
159
- dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js 11.34 kB │ gzip: 2.23 kB
160
- dist/api/blacklistRequestInspector.js 11.85 kB │ gzip: 4.28 kB
161
161
  dist/tasks/decisionMachine/decisionMachineRunner.js 11.93 kB │ gzip: 3.75 kB
162
- dist/api/verify.js 12.52 kB │ gzip: 2.49 kB
163
- dist/util.js 12.57 kB │ gzip: 3.17 kB
164
- dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js 17.12 kB │ gzip: 4.21 kB
165
- dist/tasks/frictionless/frictionlessTasks.js 19.85 kB │ gzip: 5.35 kB
166
- dist/tasks/captchaManager.js 21.82 kB │ gzip: 6.29 kB
162
+ dist/api/blacklistRequestInspector.js 12.38 kB │ gzip: 4.35 kB
163
+ dist/api/verify.js 12.48 kB │ gzip: 2.48 kB
164
+ dist/util.js 12.65 kB │ gzip: 3.18 kB
165
+ dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js 17.24 kB │ gzip: 4.23 kB
166
+ dist/tasks/frictionless/frictionlessTasks.js 19.77 kB │ gzip: 5.32 kB
167
+ dist/tasks/captchaManager.js 21.92 kB │ gzip: 6.32 kB
167
168
  dist/tasks/puzzleCaptcha/puzzleTasks.js 22.62 kB │ gzip: 5.11 kB
168
169
  dist/tasks/powCaptcha/powTasks.js 23.47 kB │ gzip: 5.93 kB
169
- dist/tasks/imgCaptcha/imgCaptchaTasks.js 26.97 kB │ gzip: 6.43 kB
170
+ dist/tasks/imgCaptcha/imgCaptchaTasks.js 26.44 kB │ gzip: 6.30 kB
170
171
  dist/tasks/detection/decodeBehavior.js 32.26 kB │ gzip: 10.34 kB
171
172
  dist/tasks/detection/decodeSimd.js 36.06 kB │ gzip: 12.00 kB
172
173
  dist/tasks/detection/decodePayload.js 49.69 kB │ gzip: 16.96 kB
173
174
 
174
- ✓ built in 103ms
175
+ ✓ built in 143ms
175
176
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodeBehavior.js to /home/runner/work/captcha/captcha/packages/provider/dist/tasks/detection/decodeBehavior.js
176
177
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodePayload.js to /home/runner/work/captcha/captcha/packages/provider/dist/tasks/detection/decodePayload.js
177
178
  [copy-plugin] copying /home/runner/work/captcha/captcha/packages/provider/src/tasks/detection/decodeSimd.js to /home/runner/work/captcha/captcha/packages/provider/dist/tasks/detection/decodeSimd.js
package/CHANGELOG.md CHANGED
@@ -1,5 +1,212 @@
1
1
  # @prosopo/provider
2
2
 
3
+ ## 5.8.0
4
+ ### Minor Changes
5
+
6
+ - e22d5fb: Add an arbitrary-header match dimension to user access policies.
7
+
8
+ A `Block` or `Restrict` rule can now target a named request header with an `equals`, `contains`, `notEquals`, `notContains`, `notEqualsAny` or `notContainsAny` operator. The negated operators back the portal's allow-list mode — block unless the header matches; the `*Any` pair carries a list of accepted values in `headerValue` so an allow-list over several values of the same header fires only when the header matches none of them (separate single-value rules would each fire on the other's value and block everything). Because substring `contains` and per-rule operators can't be expressed as a Redis TAG query — and an allow-list rule must still fire on a request that omits the header — the header condition is carried on the rule as `headerName`/`headerValue`/`headerOperator` and evaluated in code against the raw request headers, while an indexed `headerMatch` sentinel makes every header rule a matching candidate for every request. Header rules contribute one point to rule specificity ranking, mirroring the other scalar dimensions.
9
+
10
+ The raw request headers are a **required** argument of `getPrioritisedAccessRule` / `CaptchaManager.getPrioritisedAccessPolicies`, with no default. A negated header operator treats a missing header as "does not match", so a lookup that quietly ran with an empty header map would fire every allow-list rule on every request. Every lookup now passes them: the request-time block middleware, the verify-path hard-block check, the `/frictionless` policy and dedup lookups, and the image / PoW / puzzle challenge endpoints.
11
+
12
+ `getPrioritisedAccessRule` now caches only the candidate fetch and ranks per request, because the header verdict depends on data that is not part of the cache key. This also closes a latent gap where `os` was never part of `hardBlockCacheKey`, so a cached ranked list could serve one operating system's verdict to a request from another.
13
+
14
+ ### Patch Changes
15
+
16
+ - 6f57ee9: chore(deps-dev): bump @types/uuid from 10.0.0 to 11.0.0
17
+ - 6f57ee9: chore(deps): bump the npm-minor-and-patch group across 1 directory with 3 updates
18
+ - c59f8a6: Remove the account-wide commitment fallback from image captcha verification.
19
+
20
+ `verifyImageCaptchaSolution` fell back to `getDappUserCommitmentByAccount` when
21
+ the token carried no `commitmentId`, returning the first *approved* commitment
22
+ in the account's history — any age, any session.
23
+
24
+ That fallback predates the Procaptcha token (#1263, 2024-06-06), which has
25
+ carried `commitmentId` on every image solve since; `Manager.ts` sets it
26
+ unconditionally for this captcha type, and it is `optional()` on the schema only
27
+ because PoW shares the token shape and identifies its work by `challenge`.
28
+
29
+ It could only ever return the wrong record. For a returning user whose current
30
+ solve was not yet approved it produced an approved commitment from an earlier
31
+ visit, which carries no `clientSessionId`, so the session correlation compared
32
+ the live id against `undefined` and reported `CLIENT_SESSION_MISMATCH` — a token
33
+ replay that never happened. Observed in production at scale on the image
34
+ path while PoW, which resolves its exact challenge record, was unaffected.
35
+
36
+ Verification now requires a `commitmentId` and returns
37
+ `API.USER_NOT_VERIFIED_NO_SOLUTION` without one. A token that names no
38
+ commitment cannot be verified against one.
39
+ - Updated dependencies [f8a41fe]
40
+ - Updated dependencies [6f57ee9]
41
+ - Updated dependencies [6f57ee9]
42
+ - Updated dependencies [6f57ee9]
43
+ - Updated dependencies [6f57ee9]
44
+ - Updated dependencies [e22d5fb]
45
+ - Updated dependencies [9386e5e]
46
+ - Updated dependencies [6fd727c]
47
+ - Updated dependencies [b6918c0]
48
+ - Updated dependencies [d288371]
49
+ - @prosopo/database@4.0.28
50
+ - @prosopo/user-access-policy@3.13.0
51
+ - @prosopo/native-ja4@0.0.5
52
+ - @prosopo/native-merkle@0.0.5
53
+ - @prosopo/types@5.7.0
54
+ - @prosopo/util@3.3.9
55
+ - @prosopo/puzzle-assets@0.1.4
56
+ - @prosopo/types-database@5.4.1
57
+ - @prosopo/env@3.6.51
58
+ - @prosopo/api@4.1.6
59
+ - @prosopo/api-express-router@3.1.82
60
+ - @prosopo/api-route@2.6.58
61
+ - @prosopo/common@3.1.54
62
+ - @prosopo/datasets@3.1.78
63
+ - @prosopo/ipinfo@0.3.23
64
+ - @prosopo/keyring@2.9.85
65
+ - @prosopo/load-balancer@2.10.40
66
+ - @prosopo/logger@2.0.9
67
+ - @prosopo/redis-client@1.0.35
68
+ - @prosopo/types-env@2.10.45
69
+
70
+ ## 5.7.0
71
+ ### Minor Changes
72
+
73
+ - 8a670d3: Remove the provider-side context validation path.
74
+
75
+ The provider read a per-context baseline out of `clientcontextentropies` on the frictionless path and compared a session's head hash against it. The task that wrote that collection was removed from the provider on 2026-08-21, so the read has returned `undefined` ever since and the branch has been dead in every deployment since then. Computing and applying the baseline now happens off-provider.
76
+
77
+ Removed: `contextAwareValidation.ts`, the decision-machine branch that used it, `getClientContextEntropy` on the provider and its database method, the `clientContextEntropy` table registration, the unused `getRoundsFromSimScore` helper, and the `contextAwareEnabled` parameter threaded into image verification — which logged and then did nothing, its return commented out.
78
+
79
+ Also removes the per-site `settings.contextAware` block that configured it, along with `ContextAwareSchema`, `IContextAware`, `IContexts`, `ContextConfigSchema`, `contextAwareThresholdDefault` and `expandContexts`, the legacy `default`/`webview` context keys and their helpers, and `FrictionlessReason.CONTEXT_AWARE_VALIDATION_FAILED`. The site-key registration CLI no longer writes a `contextAware` default into new sites.
80
+
81
+ `ContextType`, `contextTypeFromSession` and `deviceContextTypes` stay — the off-provider work keys on them. `ClientContextEntropyRecord` and its schema stay for the same reason; only the provider's use of them goes.
82
+
83
+ No behaviour change: every path removed here was already inert.
84
+
85
+ ### Patch Changes
86
+
87
+ - 7fd6eb2: Add a `browser` match dimension to access rules.
88
+
89
+ Rules can now be scoped to the browser classified server-side from the request
90
+ User-Agent (`chrome`, `safari`, `firefox`, `edge`, `opera`, `samsung_internet`,
91
+ `wechat`, `facebook`, `instagram`, `ie`, `unknown`), mirroring the existing `os`
92
+ dimension. The classifier duplicates `@prosopo/decision-machines`' `uaClassify`
93
+ because the provider request path cannot depend on that package.
94
+
95
+ Also fixes `os` never getting its own probe on the Redis split-query hot path:
96
+ `SCALAR_USER_SCOPE_FIELDS` in `redisRulesSplitQuery` had not been updated when
97
+ the OS dimension landed, so an OS-only rule was reachable only via the
98
+ `no-user-scope` fall-through, competing for that probe's candidate budget
99
+ against genuine client-wide blocks.
100
+
101
+ The Redis index gains a `browser` TAG field. `createRedisIndex` hashes the index
102
+ definition and drops/recreates when the hash changes, so this needs no manual
103
+ migration — verified locally: the index came back carrying `browser` and the
104
+ stored hash moved to match.
105
+ - 424e467: Add `@prosopo/captcha-severity` and use it for the access rules and the traffic filter.
106
+
107
+ "Which captcha challenge is stricter" is one idea with several callers, and each answered it with its own table: the traffic filter combining multiple `challenge` matches on one request (`resolveChallengePolicy`), the access rules breaking ties between equally-specific rules (`ruleHarshness`), and downstream routing consumers. They agreed on the order — image > puzzle > pow > frictionless — but nothing held them to it, and they disagreed on the encoding.
108
+
109
+ The new package has **zero dependencies**, deliberately. Captcha types are string enums, so a plain `string` parameter accepts them without importing `CaptchaType` — and that import would not be free, because it lives in a module that pulls zod in for its schemas. Some consumers bundle this standalone under a hard source-size ceiling that a runtime dependency on the `@prosopo/types` barrel has breached before.
110
+
111
+ Two APIs, because "stricter" means two different things:
112
+
113
+ - `rankCaptchaType` / `isStricterCaptchaType` compare the **type alone**, for callers that choose the type independently of its settings — as the traffic filter does, picking the strictest type and then separately merging the hardest parameters from every matched category.
114
+ - `captchaPolicySeverity` / `isStricterCaptchaPolicy` compare a **whole policy**, type first and its own difficulty setting second, for callers where one complete policy must beat another and a tie on type alone would otherwise be decided by argument order.
115
+
116
+ **Fixes an ordering bug in the access rules.** `ruleHarshness` scored `base + solvedImagesCount` with tiers 10 apart, and `solvedImagesCount` is validated by `imageMaxRoundsFieldSchema` — `number().int().min(2)`, with no upper bound and an `imageMaxRounds` default of 32. A `Restrict[pow]` rule carrying 32 rounds therefore scored 42 and outranked a `Restrict[image]` rule at 30, exactly inverting the intended order; 11 rounds on a puzzle rule was enough to do it. The intra-type component is now clamped below the tier gap, so no setting can lift a rule over a stricter captcha type.
117
+
118
+ One further behaviour change: pow rules now break ties on `powDifficulty` rather than `solvedImagesCount`. Rule authoring drops `solvedImagesCount` for pow, so every pow rule previously scored at the bottom of its tier regardless of difficulty. Image and puzzle both keep `solvedImagesCount` — it is the severity currency they share, which the provider maps onto a puzzle difficulty level via `severityToPuzzleDifficulty` rather than treating as a literal round count.
119
+ - 89dd38a: chore(deps): batch the outstanding dependabot bumps into one upgrade
120
+
121
+ Rolls up dependabot PRs #3112, #3127-#3134 and #3159. Majors: `mongoose`
122
+ 8 -> 9, `bson` 6 -> 7, `@noble/curves` 1 -> 2, `@polkadot/util-crypto`
123
+ 13 -> 14, `@typegoose/auto-increment` 4 -> 5, `@babel/preset-env` 7 -> 8,
124
+ `@types/jsdom` 21 -> 30, `@types/bcrypt` 5 -> 6, `@actions/github` 6 -> 9,
125
+ `testcontainers` 11 -> 12. The rest are minor/patch.
126
+
127
+ Code changes the majors forced:
128
+ - `@noble/curves` v2 requires `.js` specifiers and renamed the point API,
129
+ so `secp256k1.ProjectivePoint.fromHex(...).toRawBytes()` becomes
130
+ `secp256k1.Point.fromBytes(...).toBytes()`, `RistrettoPoint` becomes
131
+ `ristretto255.Point`, and `abstract/utils` moves to `utils.js`.
132
+ - mongoose 9 drops `RootFilterQuery` (now `QueryFilter`), no longer sets
133
+ `background: true` on schema indexes by default, and no longer declares
134
+ `id` on `Document`, which un-hid a mismatch between
135
+ `updateDappUserCommitment`'s `Hash` parameter and the `string` `id` it
136
+ filters on.
137
+ - mongoose 9 rejects an aggregation-pipeline update (an array) unless the
138
+ call passes `updatePipeline: true`, so the six pipeline writes in
139
+ `ProviderDatabase` now opt in explicitly.
140
+ - mongoose 9's `castUpdate` throws on a `$setOnInsert` key inside `$set`.
141
+ `storeUserImageCaptchaSolution` passed its record straight in as the
142
+ update, and mongoose's `moveImmutableProperties` mutates that object on
143
+ an upsert -- adding the very `$setOnInsert` key the record then carried
144
+ into `CentralDbStreamer.streamImageRecord`. Image records stopped
145
+ reaching the central DB (the streamer is fire-and-forget, so it only
146
+ logged) and signup verification returned 500. The update is now an
147
+ explicit `$set` over a shallow copy.
148
+ - `@prosopo/database` moves from mongodb 6.20 to 7.5 to match the driver
149
+ mongoose 9 pulls, so bson 7 is the only copy resolvable in the package.
150
+ - `vitest`/`@vitest/coverage-v8` go to 4.1.11 alongside dependabot's
151
+ `@vitest/spy` bump; leaving them at 4.1.10 installed a second copy of
152
+ `@vitest/spy` and broke type inference in the provider test utils.
153
+ - 4810cb3: Fix `computeFrictionlessScore` returning `NaN` when `scoreComponents` carries a non-numeric field.
154
+
155
+ The score was summed with `Object.values(...).reduce((acc, val) => acc + val, 0)` over every defined value. `ScoreComponents` also carries two non-numeric diagnostic fields — `triggeredDetectors` (`number[]`) and `shadowDomPenalty` (`boolean`) — and neither has an arithmetic weight anywhere in the scoring path. `+` on an array coerces the accumulator to a string, so any numeric component summed *after* an array turned the running total into string concatenation and the final `Math.min(1, ...)` into `NaN`:
156
+
157
+ ```
158
+ 0.42 + [] -> "0.42"
159
+ "0.42" + 0.3 -> "0.420.3"
160
+ Math.min(1, "0.420.3") -> NaN
161
+ ```
162
+
163
+ This was reachable in production rather than theoretical. The Mongoose schema declares `triggeredDetectors` as an array path and Mongoose defaults array paths to `[]`, so the field is present on every session read back from the database even when the frictionless handler omitted it; the pow / puzzle / image tasks then spread `dnsAsymmetry` on afterwards, landing it after the array in key order. Every solve-time recompute on a session with `dnsAsymmetry > 0` produced `NaN`.
164
+
165
+ Only numeric values now contribute. `shadowDomPenalty` no longer silently adds a full `1.0` when true. A genuinely numeric `NaN` component still propagates — `typeof NaN === "number"`, so it survives the filter deliberately — because a score that cannot be computed must not read as a low one.
166
+
167
+ The recomputed value is not persisted (neither `sessions` nor `usercommitments` stores it) and no decide rule currently branches on `input.score`, so the impact to date was a `NaN` in the solve-time log line and in `DecisionMachineInput.score`.
168
+ - 3d2176d: Move the puzzle difficulty ladder into `@prosopo/captcha-severity`, so every consumer derives a difficulty from one table.
169
+
170
+ `PUZZLE_DIFFICULTY_LEVELS`, `MAX_AUTO_ESCALATION_LEVEL`, `MIN_DECOY_HOLE_DARKEN_MARGIN`, `clampDifficultyLevel` and `severityToPuzzleDifficulty` lived in `provider/src/tasks/puzzle/puzzleDifficulty.ts`, reachable only from inside the provider — the severity package's own docs described the ladder at length but did not hold it. Anything else that has to answer "what difficulty is this puzzle" had to restate the mapping, and the consumers that author and edit puzzle rules sit outside the provider.
171
+
172
+ They can import it now. The severity package already answers "which of these policies is stricter" off `solvedImagesCount`; the ladder answers what a puzzle policy carrying that number is actually served at, which is the same question one step further in.
173
+
174
+ Sampling a concrete render from a level's bands stays in the provider as `samplePuzzleDifficulty`: it needs `IPuzzleSettings` from `@prosopo/types` and a `node:crypto`-backed sampler, and the severity package's zero-dependency, browser-safe property is load-bearing for consumers that bundle it standalone.
175
+
176
+ Adds `puzzleDifficultyToSeverity`, the inverse of `severityToPuzzleDifficulty`. Writers need that direction — a rule editor turning a chosen difficulty into the field the rule carries, or rule authoring normalising a count inherited from the image path. Each level spans two rounds, so without a canonical value per level a writer picks between numbers that produce the identical puzzle, and the difference survives only to break severity ties arbitrarily. The round-trip is pinned by tests.
177
+
178
+ No behaviour change in the provider: same table, same thresholds, same clamping.
179
+ - Updated dependencies [7fd6eb2]
180
+ - Updated dependencies [424e467]
181
+ - Updated dependencies [1b77849]
182
+ - Updated dependencies [89dd38a]
183
+ - Updated dependencies [80f73c1]
184
+ - Updated dependencies [3d2176d]
185
+ - Updated dependencies [8fce190]
186
+ - Updated dependencies [8a670d3]
187
+ - @prosopo/user-access-policy@3.12.33
188
+ - @prosopo/captcha-severity@1.1.0
189
+ - @prosopo/util-crypto@13.5.31
190
+ - @prosopo/api@4.1.5
191
+ - @prosopo/api-express-router@3.1.81
192
+ - @prosopo/api-route@2.6.57
193
+ - @prosopo/common@3.1.53
194
+ - @prosopo/database@4.0.27
195
+ - @prosopo/datasets@3.1.77
196
+ - @prosopo/env@3.6.50
197
+ - @prosopo/ipinfo@0.3.22
198
+ - @prosopo/keyring@2.9.84
199
+ - @prosopo/load-balancer@2.10.39
200
+ - @prosopo/locale@3.4.1
201
+ - @prosopo/logger@2.0.8
202
+ - @prosopo/redis-client@1.0.34
203
+ - @prosopo/types@5.6.0
204
+ - @prosopo/types-database@5.4.0
205
+ - @prosopo/types-env@2.10.44
206
+ - @prosopo/util@3.3.8
207
+ - @prosopo/native-ja4@0.0.4
208
+ - @prosopo/native-merkle@0.0.4
209
+
3
210
  ## 5.6.4
4
211
  ### Patch Changes
5
212