@kya-os/checkpoint-shared 1.10.0 → 1.11.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 (187) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/dist/base64url-BbVG8f-v.js +65 -0
  3. package/dist/base64url-D2MvsR20.mjs +49 -0
  4. package/dist/base64url-D2MvsR20.mjs.map +1 -0
  5. package/dist/beacon-forward-secret/index.d.mts +4 -0
  6. package/dist/beacon-forward-secret/index.d.mts.map +1 -0
  7. package/dist/beacon-forward-secret/index.d.ts +4 -0
  8. package/dist/beacon-forward-secret/index.d.ts.map +1 -0
  9. package/dist/beacon-forward-secret/index.js +15 -0
  10. package/dist/beacon-forward-secret/index.mjs +15 -0
  11. package/dist/beacon-forward-secret/index.mjs.map +1 -0
  12. package/dist/beacon-types/index.d.mts +53 -1
  13. package/dist/beacon-types/index.d.mts.map +1 -1
  14. package/dist/beacon-types/index.d.ts +53 -1
  15. package/dist/beacon-types/index.d.ts.map +1 -1
  16. package/dist/beacon-types/index.js +86 -1
  17. package/dist/beacon-types/index.mjs +77 -2
  18. package/dist/beacon-types/index.mjs.map +1 -1
  19. package/dist/{browser-posture-5fPrsxx7.d.mts → browser-posture-WPk0kl9u.d.mts} +18 -1
  20. package/dist/browser-posture-WPk0kl9u.d.mts.map +1 -0
  21. package/dist/{browser-posture-CCR1kh5e.d.ts → browser-posture-_y6BcdXw.d.ts} +18 -1
  22. package/dist/browser-posture-_y6BcdXw.d.ts.map +1 -0
  23. package/dist/browser-posture-cookie.mjs.map +1 -1
  24. package/dist/browser-posture-proof-verifier.js +136 -5
  25. package/dist/browser-posture-proof-verifier.mjs +134 -2
  26. package/dist/browser-posture-proof-verifier.mjs.map +1 -0
  27. package/dist/browser-posture-proof.d.mts +1 -1
  28. package/dist/browser-posture-proof.d.ts +1 -1
  29. package/dist/browser-posture-proof.js +1 -1
  30. package/dist/browser-posture-proof.mjs +1 -1
  31. package/dist/browser-posture-report.d.mts +17 -0
  32. package/dist/browser-posture-report.d.mts.map +1 -1
  33. package/dist/browser-posture-report.d.ts +17 -0
  34. package/dist/browser-posture-report.d.ts.map +1 -1
  35. package/dist/browser-posture.d.mts +1 -1
  36. package/dist/browser-posture.d.ts +1 -1
  37. package/dist/browser-posture.js +18 -1
  38. package/dist/browser-posture.mjs +18 -1
  39. package/dist/browser-posture.mjs.map +1 -1
  40. package/dist/browser.d.mts +10 -0
  41. package/dist/browser.d.mts.map +1 -1
  42. package/dist/browser.d.ts +10 -0
  43. package/dist/browser.d.ts.map +1 -1
  44. package/dist/browser.js +1 -1
  45. package/dist/browser.mjs +1 -1
  46. package/dist/browser.mjs.map +1 -1
  47. package/dist/canonical-signer/index.d.mts.map +1 -1
  48. package/dist/canonical-signer/index.d.ts.map +1 -1
  49. package/dist/canonical-signer/index.js +0 -4
  50. package/dist/canonical-signer/index.mjs +0 -4
  51. package/dist/canonical-signer/index.mjs.map +1 -1
  52. package/dist/{client-ip-B7w-uHfS.d.ts → client-ip-8KneiMK0.d.mts} +12 -2
  53. package/dist/{client-ip-B7w-uHfS.d.mts.map → client-ip-8KneiMK0.d.mts.map} +1 -1
  54. package/dist/{client-ip-B7w-uHfS.d.mts → client-ip-8KneiMK0.d.ts} +12 -2
  55. package/dist/{client-ip-B7w-uHfS.d.ts.map → client-ip-8KneiMK0.d.ts.map} +1 -1
  56. package/dist/{client-ip-B8wFzJ5f.js → client-ip-BEmLC4I4.js} +71 -0
  57. package/dist/{client-ip-DIJyr6px.mjs → client-ip-DlHx7GGh.mjs} +61 -2
  58. package/dist/client-ip-DlHx7GGh.mjs.map +1 -0
  59. package/dist/client-ip.d.mts +2 -2
  60. package/dist/client-ip.d.ts +2 -2
  61. package/dist/client-ip.js +3 -1
  62. package/dist/client-ip.mjs +2 -2
  63. package/dist/deploy/index.d.mts.map +1 -1
  64. package/dist/deploy/index.d.ts.map +1 -1
  65. package/dist/deploy/index.js +5 -1
  66. package/dist/deploy/index.mjs +5 -1
  67. package/dist/deploy/index.mjs.map +1 -1
  68. package/dist/{detection-reason-mapping-CQexNvR7.d.ts → detection-reason-mapping-BemDaDED.d.mts} +5 -2
  69. package/dist/detection-reason-mapping-BemDaDED.d.mts.map +1 -0
  70. package/dist/{detection-reason-mapping-CQexNvR7.d.mts → detection-reason-mapping-BemDaDED.d.ts} +5 -2
  71. package/dist/detection-reason-mapping-BemDaDED.d.ts.map +1 -0
  72. package/dist/{detection-reason-mapping-B9RSkOs8.js → detection-reason-mapping-BxYaQ8kb.js} +33 -8
  73. package/dist/{detection-reason-mapping-BGymWIPl.mjs → detection-reason-mapping-j-7bXsVb.mjs} +29 -10
  74. package/dist/detection-reason-mapping-j-7bXsVb.mjs.map +1 -0
  75. package/dist/errors/index.d.mts +4 -0
  76. package/dist/errors/index.d.mts.map +1 -1
  77. package/dist/errors/index.d.ts +4 -0
  78. package/dist/errors/index.d.ts.map +1 -1
  79. package/dist/errors/index.js +24 -8
  80. package/dist/errors/index.mjs +24 -8
  81. package/dist/errors/index.mjs.map +1 -1
  82. package/dist/{fetcher-CZfLcbRZ.d.mts → fetcher-CTKz07jg.d.mts} +12 -2
  83. package/dist/fetcher-CTKz07jg.d.mts.map +1 -0
  84. package/dist/{fetcher-CCw4Q95g.d.ts → fetcher-DCr920hx.d.ts} +12 -2
  85. package/dist/fetcher-DCr920hx.d.ts.map +1 -0
  86. package/dist/gateway-client-ip.js +1 -1
  87. package/dist/gateway-client-ip.mjs +1 -1
  88. package/dist/identity-cookie/index.d.mts +14 -0
  89. package/dist/identity-cookie/index.d.mts.map +1 -0
  90. package/dist/identity-cookie/index.d.ts +14 -0
  91. package/dist/identity-cookie/index.d.ts.map +1 -0
  92. package/dist/identity-cookie/index.js +45 -0
  93. package/dist/identity-cookie/index.mjs +43 -0
  94. package/dist/identity-cookie/index.mjs.map +1 -0
  95. package/dist/index.d.mts +598 -142
  96. package/dist/index.d.mts.map +1 -1
  97. package/dist/index.d.ts +598 -142
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +793 -198
  100. package/dist/index.mjs +743 -188
  101. package/dist/index.mjs.map +1 -1
  102. package/dist/kya-http.d.mts +2 -2
  103. package/dist/kya-http.d.ts +2 -2
  104. package/dist/kya-http.js +2 -1
  105. package/dist/kya-http.mjs +2 -2
  106. package/dist/mcpi/dashboard-config/index.mjs.map +1 -1
  107. package/dist/patterns-CdTh7LU2.d.mts +35 -0
  108. package/dist/patterns-CdTh7LU2.d.mts.map +1 -0
  109. package/dist/patterns-CdTh7LU2.d.ts +35 -0
  110. package/dist/patterns-CdTh7LU2.d.ts.map +1 -0
  111. package/dist/{patterns-CiMpbdAF.js → patterns-CnNxRnaK.js} +3 -130
  112. package/dist/{patterns-D4OAsNQY.mjs → patterns-CpRk9R3M.mjs} +5 -96
  113. package/dist/patterns-CpRk9R3M.mjs.map +1 -0
  114. package/dist/patterns.d.mts +2 -2
  115. package/dist/patterns.d.ts +2 -2
  116. package/dist/patterns.js +1 -7
  117. package/dist/patterns.mjs +2 -2
  118. package/dist/policy/fetcher.d.mts +2 -2
  119. package/dist/policy/fetcher.d.ts +2 -2
  120. package/dist/policy/fetcher.js +100 -8
  121. package/dist/policy/fetcher.mjs +99 -9
  122. package/dist/policy/fetcher.mjs.map +1 -1
  123. package/dist/proxy-assertion-mapping-BVwXVSMZ.mjs +81 -0
  124. package/dist/proxy-assertion-mapping-BVwXVSMZ.mjs.map +1 -0
  125. package/dist/proxy-assertion-mapping-BxhENrcY.d.mts +70 -0
  126. package/dist/proxy-assertion-mapping-BxhENrcY.d.mts.map +1 -0
  127. package/dist/proxy-assertion-mapping-D64AyZfG.js +85 -0
  128. package/dist/proxy-assertion-mapping-DhAynFqG.d.ts +70 -0
  129. package/dist/proxy-assertion-mapping-DhAynFqG.d.ts.map +1 -0
  130. package/dist/proxy-assertions.d.mts +2 -0
  131. package/dist/proxy-assertions.d.ts +2 -0
  132. package/dist/proxy-assertions.js +4 -0
  133. package/dist/proxy-assertions.mjs +3 -0
  134. package/dist/reason-codes.d.mts +2 -2
  135. package/dist/reason-codes.d.ts +2 -2
  136. package/dist/reason-codes.js +3 -2
  137. package/dist/reason-codes.mjs +2 -2
  138. package/dist/{registered-sid-CnWIU_l1.d.ts → registered-sid-BgDhdj2l.d.mts} +13 -2
  139. package/dist/registered-sid-BgDhdj2l.d.mts.map +1 -0
  140. package/dist/{registered-sid-CnWIU_l1.d.mts → registered-sid-BgDhdj2l.d.ts} +13 -2
  141. package/dist/registered-sid-BgDhdj2l.d.ts.map +1 -0
  142. package/dist/{registered-sid-BZfDOfXy.js → registered-sid-DG1tSSvl.js} +67 -12
  143. package/dist/{registered-sid-CS9V8nPr.mjs → registered-sid-D__xiDPu.mjs} +63 -14
  144. package/dist/registered-sid-D__xiDPu.mjs.map +1 -0
  145. package/dist/timezone-country-B6PkDyNP.d.mts +15 -0
  146. package/dist/timezone-country-B6PkDyNP.d.mts.map +1 -0
  147. package/dist/timezone-country-B6PkDyNP.d.ts +15 -0
  148. package/dist/timezone-country-B6PkDyNP.d.ts.map +1 -0
  149. package/dist/timezone-country-CROxU2Tl.js +505 -0
  150. package/dist/timezone-country-CrrnkOdy.mjs +489 -0
  151. package/dist/timezone-country-CrrnkOdy.mjs.map +1 -0
  152. package/dist/timezone-country.d.mts +2 -0
  153. package/dist/timezone-country.d.ts +2 -0
  154. package/dist/timezone-country.js +6 -0
  155. package/dist/timezone-country.mjs +3 -0
  156. package/dist/tool-protection/index.mjs.map +1 -1
  157. package/fixtures/detection/cloudflare-alias-parity.json +383 -0
  158. package/fixtures/detection/reason-codes.json +3 -1
  159. package/fixtures/detection/signal-exposure-example.json +1 -1
  160. package/fixtures/iana-tzdata/backward +375 -0
  161. package/fixtures/iana-tzdata/renamed-zones.json +21 -0
  162. package/fixtures/iana-tzdata/version +1 -0
  163. package/fixtures/iana-tzdata/zone.tab +448 -0
  164. package/fixtures/workbench/management-session.v1.json +20 -0
  165. package/fixtures/workbench/model-credentials.v1.json +8 -0
  166. package/fixtures/workbench/task-grant.v1.json +37 -0
  167. package/package.json +25 -3
  168. package/src/data/compiled/merged-rules.json +9 -7
  169. package/dist/browser-posture-5fPrsxx7.d.mts.map +0 -1
  170. package/dist/browser-posture-CCR1kh5e.d.ts.map +0 -1
  171. package/dist/browser-posture-proof-verifier-DvsOmFrM.js +0 -202
  172. package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs +0 -180
  173. package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs.map +0 -1
  174. package/dist/client-ip-DIJyr6px.mjs.map +0 -1
  175. package/dist/detection-reason-mapping-BGymWIPl.mjs.map +0 -1
  176. package/dist/detection-reason-mapping-CQexNvR7.d.mts.map +0 -1
  177. package/dist/detection-reason-mapping-CQexNvR7.d.ts.map +0 -1
  178. package/dist/fetcher-CCw4Q95g.d.ts.map +0 -1
  179. package/dist/fetcher-CZfLcbRZ.d.mts.map +0 -1
  180. package/dist/patterns-Bp40cwh2.d.mts +0 -110
  181. package/dist/patterns-Bp40cwh2.d.mts.map +0 -1
  182. package/dist/patterns-Bp40cwh2.d.ts +0 -110
  183. package/dist/patterns-Bp40cwh2.d.ts.map +0 -1
  184. package/dist/patterns-D4OAsNQY.mjs.map +0 -1
  185. package/dist/registered-sid-CS9V8nPr.mjs.map +0 -1
  186. package/dist/registered-sid-CnWIU_l1.d.mts.map +0 -1
  187. package/dist/registered-sid-CnWIU_l1.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -28,21 +28,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
 
29
29
  //#endregion
30
30
  const require_schemas = require('./schemas-BlScS1it.js');
31
- const require_detection_reason_mapping = require('./detection-reason-mapping-B9RSkOs8.js');
31
+ const require_proxy_assertion_mapping = require('./proxy-assertion-mapping-D64AyZfG.js');
32
+ const require_detection_reason_mapping = require('./detection-reason-mapping-BxYaQ8kb.js');
32
33
  const require_ruleset_hash = require('./ruleset-hash-Cmv8MSO5.js');
33
34
  const require_verification = require('./verification-BAw9N8Pt.js');
34
35
  const require_agent_catalog = require('./agent-catalog.js');
35
- const require_patterns = require('./patterns-CiMpbdAF.js');
36
+ const require_patterns = require('./patterns-CnNxRnaK.js');
36
37
  const require_posture_origins = require('./posture-origins-Ci6k4Zh1.js');
37
38
  const require_host_adapter = require('./host-adapter-bWftXA9T.js');
38
- const require_client_ip = require('./client-ip-B8wFzJ5f.js');
39
+ const require_client_ip = require('./client-ip-BEmLC4I4.js');
39
40
  const require_schemas$1 = require('./schemas-Cm4C4Z5G.js');
40
41
  const require_engine_enforcing = require('./engine-enforcing-AYEcgNsb.js');
41
42
  const require_step_up = require('./step-up-Bp8RAQwv.js');
42
43
  const require_policy_fetcher = require('./policy/fetcher.js');
43
44
  const require_kya_http_error_codes = require('./kya-http-error-codes-B4rUmUEI.js');
44
- const require_registered_sid = require('./registered-sid-BZfDOfXy.js');
45
+ const require_registered_sid = require('./registered-sid-DG1tSSvl.js');
45
46
  const require_default_sign_in_host = require('./default-sign-in-host.js');
47
+ const require_timezone_country = require('./timezone-country-CROxU2Tl.js');
48
+ const require_base64url = require('./base64url-BbVG8f-v.js');
46
49
  let _noble_hashes_sha2_js = require("@noble/hashes/sha2.js");
47
50
  let _noble_hashes_utils_js = require("@noble/hashes/utils.js");
48
51
  let js_yaml = require("js-yaml");
@@ -111,79 +114,6 @@ const ProxyAssertionSchema = require_schemas.object({
111
114
  fraudProbability: require_schemas.number().min(0).max(1).nullable(),
112
115
  proxyClass: require_schemas._enum(["datacenter", "unknown"]).optional()
113
116
  }).strict();
114
- const knownKinds = /* @__PURE__ */ new Set([
115
- "tor_exit",
116
- "published_vpn_exit",
117
- "observed_proxy",
118
- "suspected_residential_proxy",
119
- "privacy_relay",
120
- "local_tunnel",
121
- "hosting"
122
- ]);
123
- /**
124
- * The default admits only confirmed, current assertions. maxmind_legacy preserves
125
- * existing vendor positives without claiming that its undated optional file is fresh.
126
- * Uncertain evidence never produces a confirmed-clean false Boolean.
127
- */
128
- function mapProxyAssertions(proxyAssertions, nowSeconds, collectionState, compatibility = "confirmed_current") {
129
- const states = [collectionState];
130
- const eligible = [];
131
- for (const assertion of proxyAssertions) {
132
- if (!knownKinds.has(assertion.kind)) {
133
- states.push("unsupported");
134
- continue;
135
- }
136
- states.push(assertion.collectionState);
137
- if (assertion.collectionState !== "current" && assertion.collectionState !== "insufficient_support") {
138
- states.push(assertion.collectionState);
139
- continue;
140
- }
141
- const dated = assertion.observedAt !== null && assertion.expiresAt !== null;
142
- const current = dated && assertion.observedAt <= nowSeconds && assertion.expiresAt > nowSeconds;
143
- if (dated && !current) {
144
- states.push("stale");
145
- continue;
146
- }
147
- const confirmed = assertion.evidenceGrade === "confirmed" && assertion.collectionState === "current" && current;
148
- const legacy = compatibility === "maxmind_legacy" && assertion.source === "maxmind-anonymous-ip" && assertion.evidenceGrade === "vendor_reported" && assertion.collectionState === "insufficient_support" && assertion.observedAt === null && assertion.expiresAt === null;
149
- if (confirmed || legacy) eligible.push(assertion);
150
- else states.push("insufficient_support");
151
- }
152
- for (const assertion of eligible) if (assertion.membership === "present" && eligible.some((other) => other.kind === assertion.kind && other.membership === "absent")) states.push("conflicting");
153
- if (proxyAssertions.length === 0) states.push("insufficient_support");
154
- const proxyCollectionState = [
155
- "conflicting",
156
- "unsupported",
157
- "unavailable",
158
- "stale",
159
- "insufficient_support",
160
- "current"
161
- ].find((state) => states.includes(state));
162
- const blocked = proxyCollectionState !== "current" && proxyCollectionState !== "insufficient_support";
163
- const positive = eligible.filter((assertion) => assertion.membership === "present");
164
- const preferred = [
165
- positive.find((assertion) => assertion.kind === "tor_exit"),
166
- positive.find((assertion) => assertion.kind === "published_vpn_exit"),
167
- positive.find((assertion) => assertion.kind === "suspected_residential_proxy"),
168
- positive.find((assertion) => assertion.kind === "observed_proxy" && assertion.proxyClass === "datacenter"),
169
- positive.find((assertion) => assertion.kind === "observed_proxy")
170
- ].find(Boolean);
171
- const types = {
172
- tor_exit: "tor",
173
- published_vpn_exit: "vpn",
174
- suspected_residential_proxy: "residential_proxy",
175
- observed_proxy: preferred?.proxyClass === "datacenter" ? "datacenter" : "unknown"
176
- };
177
- return {
178
- proxy: !blocked && preferred ? {
179
- isProxy: true,
180
- proxyType: types[preferred.kind],
181
- confidence: preferred.membershipConfidence ?? (preferred.evidenceGrade === "vendor_reported" ? 90 : 0)
182
- } : void 0,
183
- proxyAssertions,
184
- proxyCollectionState
185
- };
186
- }
187
117
 
188
118
  //#endregion
189
119
  //#region src/core/risk-score.ts
@@ -528,6 +458,29 @@ const ProxyTypeSchema = require_schemas._enum([
528
458
  "residential_proxy",
529
459
  "unknown"
530
460
  ]);
461
+ const ReportedProxyTypeSchema = require_schemas._enum([
462
+ "vpn",
463
+ "tor",
464
+ "hosting",
465
+ "residential"
466
+ ]);
467
+ const REPORTED_PROXY_TYPE = {
468
+ vpn: "vpn",
469
+ tor: "tor",
470
+ datacenter: "hosting",
471
+ residential_proxy: "residential",
472
+ unknown: void 0
473
+ };
474
+ function reportedProxyType(proxyType) {
475
+ return REPORTED_PROXY_TYPE[proxyType];
476
+ }
477
+ const IpRoutingTypeSchema = require_schemas._enum([
478
+ "cellular",
479
+ "satellite",
480
+ "datacenter",
481
+ "fixed",
482
+ "anonymizer"
483
+ ]);
531
484
  /**
532
485
  * Host-supplied proxy/anonymization verdict for a request's `trueIp`.
533
486
  * Mirrors the Rust `ProxyInfo` (`rust/crates/kya-os-engine/src/types.rs`).
@@ -540,6 +493,17 @@ const ProxyInfoSchema = require_schemas.object({
540
493
  /** Provider confidence in the proxy verdict, 0-100. */
541
494
  confidence: require_schemas.number().int().min(0).max(100)
542
495
  });
496
+ const IpReputationSchema = require_schemas.object({
497
+ attackSource: require_schemas.boolean().optional(),
498
+ spamSource: require_schemas.boolean().optional(),
499
+ lists: require_schemas.array(require_schemas.string()),
500
+ asOf: require_schemas.number().int().positive()
501
+ });
502
+ const IpEventCountsSchema = require_schemas.object({
503
+ lastHour: require_schemas.number().int().nonnegative(),
504
+ lastDay: require_schemas.number().int().nonnegative(),
505
+ asOf: require_schemas.number().int().positive()
506
+ });
543
507
  /**
544
508
  * Host-supplied network / IP-intelligence context for a request's
545
509
  * `trueIp`. Legacy fields mirror the Rust `NetworkContext` and appear on
@@ -560,7 +524,9 @@ const NetworkContextSchema = require_schemas.object({
560
524
  * Older Rust readers do not echo these additive fields.
561
525
  */
562
526
  proxyAssertions: require_schemas.array(ProxyAssertionSchema).optional(),
563
- proxyCollectionState: ProxyCollectionStateSchema.optional()
527
+ proxyCollectionState: ProxyCollectionStateSchema.optional(),
528
+ ipRoutingType: IpRoutingTypeSchema.optional(),
529
+ ipReputation: IpReputationSchema.optional()
564
530
  });
565
531
  /**
566
532
  * Descriptive detection detail from the engine.
@@ -1141,6 +1107,26 @@ const VerdictEvidenceSchema = require_schemas.object({
1141
1107
  function signalContribution(signal) {
1142
1108
  return signal.weight * (signal.confidence / 100);
1143
1109
  }
1110
+ const SCANNER_MISCLASSIFICATION_HINT_SOURCE = "scanner_misclassification_hint";
1111
+ const CLOUDFLARE_BOT_MANAGEMENT_SOURCE = "transport.cloudflare_bot_management";
1112
+ function cloudflareBotScore(signal) {
1113
+ const score = signal.metadata?.cf_bot_score;
1114
+ return typeof score === "number" && Number.isInteger(score) && score >= 0 ? score : void 0;
1115
+ }
1116
+ function cloudflareRootScores(signals) {
1117
+ const scores = /* @__PURE__ */ new Set();
1118
+ for (const signal of signals) {
1119
+ if (signal.source !== CLOUDFLARE_BOT_MANAGEMENT_SOURCE) continue;
1120
+ const score = cloudflareBotScore(signal);
1121
+ if (score !== void 0) scores.add(score);
1122
+ }
1123
+ return scores;
1124
+ }
1125
+ function isAliasedCloudflareHint(signal, rootScores) {
1126
+ if (signal.source !== SCANNER_MISCLASSIFICATION_HINT_SOURCE) return false;
1127
+ const score = cloudflareBotScore(signal);
1128
+ return score !== void 0 && rootScores.has(score);
1129
+ }
1144
1130
  /**
1145
1131
  * Builds the verdict's evidence list from the engine's raw detection
1146
1132
  * signals — allow or block, live or shadow, persisted or not: this is a
@@ -1163,18 +1149,18 @@ function signalContribution(signal) {
1163
1149
  */
1164
1150
  function buildVerdictEvidence(signals) {
1165
1151
  if (!signals || signals.length === 0) return [];
1166
- const entries = [];
1152
+ const parsedSignals = [];
1167
1153
  for (const raw of signals) {
1168
1154
  const parsed = DetectionSignalSchema.safeParse(raw);
1169
- if (!parsed.success) continue;
1170
- const signal = parsed.data;
1171
- entries.push({
1172
- signal: signal.source,
1173
- plane: signal.signalType,
1174
- weight: signal.weight,
1175
- probabilityContribution: signalContribution(signal)
1176
- });
1155
+ if (parsed.success) parsedSignals.push(parsed.data);
1177
1156
  }
1157
+ const rootScores = cloudflareRootScores(parsedSignals);
1158
+ const entries = parsedSignals.map((signal) => ({
1159
+ signal: signal.source,
1160
+ plane: signal.signalType,
1161
+ weight: signal.weight,
1162
+ probabilityContribution: isAliasedCloudflareHint(signal, rootScores) ? 0 : signalContribution(signal)
1163
+ }));
1178
1164
  entries.sort((a, b) => {
1179
1165
  if (a.plane !== b.plane) return a.plane < b.plane ? -1 : 1;
1180
1166
  if (a.signal !== b.signal) return a.signal < b.signal ? -1 : 1;
@@ -1718,57 +1704,6 @@ const SUSPICIOUS_HEADERS = {
1718
1704
  //#endregion
1719
1705
  //#region src/constants/bots.ts
1720
1706
  /**
1721
- * Traditional Bot Constants and Types
1722
- *
1723
- * These are NON-AI bots like search engines, crawlers, and SEO tools.
1724
- * AI agents (Claude, GPT, etc.) should be in agents.ts
1725
- */
1726
- /**
1727
- * Traditional bot types (not AI agents)
1728
- */
1729
- const BotTypeSchema = require_schemas._enum([
1730
- "search_engine",
1731
- "social_media",
1732
- "seo_tool",
1733
- "crawler",
1734
- "scraper",
1735
- "monitoring",
1736
- "security_scanner",
1737
- "unknown_bot"
1738
- ]);
1739
- /**
1740
- * Trusted traditional bots that can be cached
1741
- * These are well-known, legitimate bots with stable patterns
1742
- * NOT for AI agents - those should never be cached
1743
- */
1744
- const TRUSTED_BOTS = [
1745
- "googlebot",
1746
- "bingbot",
1747
- "slurp",
1748
- "duckduckbot",
1749
- "baiduspider",
1750
- "yandexbot",
1751
- "applebot",
1752
- "facebookexternalhit",
1753
- "twitterbot",
1754
- "linkedinbot",
1755
- "whatsapp",
1756
- "semrushbot",
1757
- "ahrefsbot",
1758
- "mj12bot",
1759
- "dotbot"
1760
- ];
1761
- /**
1762
- * Bot pattern for traditional bot matching
1763
- */
1764
- const BotPatternSchema = require_schemas.object({
1765
- id: require_schemas.string(),
1766
- type: BotTypeSchema,
1767
- name: require_schemas.string(),
1768
- patterns: require_schemas.array(require_schemas.string()),
1769
- confidence: require_schemas.number().min(0).max(1).default(.8)
1770
- });
1771
- /**
1772
1707
  * Traditional bot patterns.
1773
1708
  *
1774
1709
  * NAME VOCABULARY: `name` MUST be the detection engine's pattern name — the
@@ -1863,21 +1798,6 @@ const TRADITIONAL_BOT_PATTERNS = [
1863
1798
  confidence: .7
1864
1799
  }
1865
1800
  ];
1866
- /**
1867
- * Check if a user agent is a traditional bot (not AI agent)
1868
- */
1869
- function isTraditionalBot(userAgent) {
1870
- const lowerUA = userAgent.toLowerCase();
1871
- return TRUSTED_BOTS.some((bot) => lowerUA.includes(bot));
1872
- }
1873
- /**
1874
- * Get bot type from user agent
1875
- */
1876
- function getBotType(userAgent) {
1877
- const lowerUA = userAgent.toLowerCase();
1878
- for (const pattern of TRADITIONAL_BOT_PATTERNS) if (pattern.patterns.some((p) => lowerUA.includes(p.toLowerCase()))) return pattern.type;
1879
- return null;
1880
- }
1881
1801
 
1882
1802
  //#endregion
1883
1803
  //#region src/constants/delegation.ts
@@ -2020,7 +1940,8 @@ const INTERNAL_ERRORS = {
2020
1940
  TRANSACTION_FAILED: "TRANSACTION_FAILED",
2021
1941
  DELETE_FAILED: "DELETE_FAILED",
2022
1942
  PARTITION_RETIREMENT_IN_PROGRESS: "PARTITION_RETIREMENT_IN_PROGRESS",
2023
- FLY_CLEANUP_FAILED: "FLY_CLEANUP_FAILED"
1943
+ FLY_CLEANUP_FAILED: "FLY_CLEANUP_FAILED",
1944
+ REQUEST_TIMEOUT: "REQUEST_TIMEOUT"
2024
1945
  };
2025
1946
  /**
2026
1947
  * Session Error Codes
@@ -2059,7 +1980,8 @@ const API_ERRORS = {
2059
1980
  CONTENT_TYPE_NOT_SUPPORTED: "API_CONTENT_TYPE_NOT_SUPPORTED",
2060
1981
  RESPONSE_TOO_LARGE: "API_RESPONSE_TOO_LARGE",
2061
1982
  REQUEST_TOO_LARGE: "API_REQUEST_TOO_LARGE",
2062
- ENDPOINT_RETIRED: "API_ENDPOINT_RETIRED"
1983
+ ENDPOINT_RETIRED: "API_ENDPOINT_RETIRED",
1984
+ VERDICT_NOT_STORED: "VERDICT_NOT_STORED"
2063
1985
  };
2064
1986
  /**
2065
1987
  * Billing Error Codes
@@ -2179,6 +2101,7 @@ const BOUNCER_LOWERCASE_ERRORS = {
2179
2101
  LOWERCASE_PROOF_VALIDATION_ERROR: "proof_validation_error",
2180
2102
  LOWERCASE_INSUFFICIENT_SCOPES: "insufficient_scopes",
2181
2103
  LOWERCASE_DELEGATION_VALIDATION_ERROR: "delegation_validation_error",
2104
+ LOWERCASE_AUTHORIZATION_TOO_WEAK: "authorization_too_weak",
2182
2105
  GRANT_PREDATES_ISSUANCE_CORE: "grant_predates_issuance_core",
2183
2106
  LOWERCASE_INVALID_HTTP_REGISTRATION: "invalid_http_registration",
2184
2107
  LOWERCASE_POLICY_REVISION_MISMATCH: "policy_revision_mismatch",
@@ -2188,11 +2111,15 @@ const BOUNCER_LOWERCASE_ERRORS = {
2188
2111
  /**
2189
2112
  * Delegation OAuth Error Codes (lower-case wire format)
2190
2113
  *
2191
- * Emitted by the bouncer authorize, oauth/start, oauth/callback and
2192
- * oauth/token routes and the shared OAuth rate limiter. Several reuse RFC
2193
- * 6749 vocabulary (`invalid_request`, `invalid_grant`,
2194
- * `unsupported_grant_type`) but travel in the bouncer `{success, error}`
2195
- * envelope, not an RFC 6749 body. Keyed by value with a LOWERCASE_ prefix.
2114
+ * Emitted by the bouncer v1 routes (authorize, the OAuth and credential
2115
+ * starts, the OAuth callback, sessions and delegations) and the shared OAuth
2116
+ * rate limiter. Several reuse RFC 6749 vocabulary (`invalid_request`,
2117
+ * `invalid_grant`) but travel in the bouncer `{success, error}` envelope,
2118
+ * not an RFC 6749 body. Keyed by value with a LOWERCASE_ prefix.
2119
+ *
2120
+ * `unsupported_grant_type` and `invalid_delegation` belonged to the bouncer
2121
+ * `oauth/token` code exchange, which is gone; nothing emits them, and they
2122
+ * stay published until a deprecation removes them.
2196
2123
  */
2197
2124
  const OAUTH_LOWERCASE_ERRORS = {
2198
2125
  LOWERCASE_INVALID_REQUEST: "invalid_request",
@@ -2237,6 +2164,7 @@ const AUDIT_ERRORS = {
2237
2164
  AUDIT_CREDENTIAL_REQUIRED: "AUDIT_CREDENTIAL_REQUIRED",
2238
2165
  AUDIT_REQUEST_TOO_LARGE: "AUDIT_REQUEST_TOO_LARGE",
2239
2166
  AUDIT_INVALID_JSON: "AUDIT_INVALID_JSON",
2167
+ AUDIT_REQUEST_TIMEOUT: "AUDIT_REQUEST_TIMEOUT",
2240
2168
  AUDIT_INVALID_CREDENTIAL: "AUDIT_INVALID_CREDENTIAL",
2241
2169
  AUDIT_RATE_LIMITED: "AUDIT_RATE_LIMITED",
2242
2170
  AUDIT_INVALID_SUBMISSION: "AUDIT_INVALID_SUBMISSION",
@@ -2435,6 +2363,7 @@ const ERROR_MESSAGES = {
2435
2363
  [INTERNAL_ERRORS.DELETE_FAILED]: "Failed to delete project",
2436
2364
  [INTERNAL_ERRORS.PARTITION_RETIREMENT_IN_PROGRESS]: "The project data is being archived. Retry shortly.",
2437
2365
  [INTERNAL_ERRORS.FLY_CLEANUP_FAILED]: "Couldn't stop a managed agent's machine, so the delete was refused. Retry the delete.",
2366
+ [INTERNAL_ERRORS.REQUEST_TIMEOUT]: "The request body did not arrive in time",
2438
2367
  [SESSION_ERRORS.SESSION_NOT_FOUND]: "Session not found",
2439
2368
  [SESSION_ERRORS.SESSION_EXPIRED]: "Session has expired",
2440
2369
  [SESSION_ERRORS.SESSION_INVALID]: "Session is invalid",
@@ -2459,6 +2388,7 @@ const ERROR_MESSAGES = {
2459
2388
  [API_ERRORS.RESPONSE_TOO_LARGE]: "Response exceeds maximum size",
2460
2389
  [API_ERRORS.REQUEST_TOO_LARGE]: "Request exceeds maximum size",
2461
2390
  [API_ERRORS.ENDPOINT_RETIRED]: "This endpoint has been retired",
2391
+ [API_ERRORS.VERDICT_NOT_STORED]: "The verdict could not be stored",
2462
2392
  [BILLING_ERRORS.LIMIT_EXCEEDED]: "Billing limit exceeded",
2463
2393
  [BILLING_ERRORS.BILLING_SUSPENDED]: "Account billing suspended",
2464
2394
  [BILLING_ERRORS.BILLING_GRACE_PERIOD]: "Account in billing grace period",
@@ -2515,6 +2445,7 @@ const ERROR_MESSAGES = {
2515
2445
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_PROOF_VALIDATION_ERROR]: "Proof validation failed",
2516
2446
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INSUFFICIENT_SCOPES]: "Missing required scopes",
2517
2447
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_DELEGATION_VALIDATION_ERROR]: "Delegation validation failed",
2448
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AUTHORIZATION_TOO_WEAK]: "A tool these scopes open needs a sign-in, so a consent-only grant cannot open it",
2518
2449
  [BOUNCER_LOWERCASE_ERRORS.GRANT_PREDATES_ISSUANCE_CORE]: "The grant predates the issuance core; authorize again",
2519
2450
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INVALID_HTTP_REGISTRATION]: "Invalid or unsupported native HTTP registration",
2520
2451
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_MISMATCH]: "The registered tool protection revision is not the one served to this project",
@@ -2545,6 +2476,7 @@ const ERROR_MESSAGES = {
2545
2476
  [AUDIT_ERRORS.AUDIT_CREDENTIAL_REQUIRED]: "A source-bound audit ingest credential is required",
2546
2477
  [AUDIT_ERRORS.AUDIT_REQUEST_TOO_LARGE]: "Audit submission exceeds 6291456 bytes",
2547
2478
  [AUDIT_ERRORS.AUDIT_INVALID_JSON]: "Request body must be valid JSON",
2479
+ [AUDIT_ERRORS.AUDIT_REQUEST_TIMEOUT]: "Audit submission body did not arrive in time",
2548
2480
  [AUDIT_ERRORS.AUDIT_INVALID_CREDENTIAL]: "Invalid audit ingest credential",
2549
2481
  [AUDIT_ERRORS.AUDIT_RATE_LIMITED]: "Audit ingest rate limit exceeded",
2550
2482
  [AUDIT_ERRORS.AUDIT_INVALID_SUBMISSION]: "Invalid audit recorder submission envelope",
@@ -2678,6 +2610,7 @@ const ERROR_STATUS_CODES = {
2678
2610
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_FORBIDDEN]: 403,
2679
2611
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AGENT_DENIED]: 403,
2680
2612
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INSUFFICIENT_SCOPES]: 403,
2613
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AUTHORIZATION_TOO_WEAK]: 403,
2681
2614
  [BOUNCER_LOWERCASE_ERRORS.GRANT_PREDATES_ISSUANCE_CORE]: 409,
2682
2615
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_MISMATCH]: 409,
2683
2616
  [AUDIT_PROTOCOL_ERRORS.AUDIT_UNAUTHORIZED_SUBMISSION]: 403,
@@ -2721,6 +2654,8 @@ const ERROR_STATUS_CODES = {
2721
2654
  [GATEWAY_VAULT_ERRORS.CREDENTIALS_NOT_CONFIGURED]: 404,
2722
2655
  [VAULT_ERRORS.NO_AGENT_KEY]: 404,
2723
2656
  [API_ERRORS.METHOD_NOT_ALLOWED]: 405,
2657
+ [AUDIT_ERRORS.AUDIT_REQUEST_TIMEOUT]: 408,
2658
+ [INTERNAL_ERRORS.REQUEST_TIMEOUT]: 408,
2724
2659
  [RESOURCE_ERRORS.CONFLICT]: 409,
2725
2660
  [AUDIT_PROTOCOL_ERRORS.AUDIT_LEDGER_MISMATCH]: 409,
2726
2661
  [AUDIT_PROTOCOL_ERRORS.AUDIT_EPOCH_MISMATCH]: 409,
@@ -2785,7 +2720,8 @@ const ERROR_STATUS_CODES = {
2785
2720
  [AUDIT_PROTOCOL_ERRORS.AUDIT_APPEND_CONFLICT_EXHAUSTED]: 503,
2786
2721
  [KYAOS_PROTOCOL_ERRORS.KYAOS_SLASH_AUTHORIZATION_HOST_UNAVAILABLE]: 503,
2787
2722
  [KYAOS_PROTOCOL_ERRORS.KYAOS_SLASH_POLICY_UNAVAILABLE]: 503,
2788
- [NETWORK_ERRORS.TIMEOUT]: 504
2723
+ [NETWORK_ERRORS.TIMEOUT]: 504,
2724
+ [API_ERRORS.VERDICT_NOT_STORED]: 504
2789
2725
  };
2790
2726
  /**
2791
2727
  * Create a standardized error object
@@ -2932,6 +2868,23 @@ const DETECTION_LIMITS = {
2932
2868
  cacheTTL: 3600,
2933
2869
  maxConcurrentDetections: 1e3
2934
2870
  };
2871
+ const DETECTION_REQUEST_LIMITS = {
2872
+ userAgent: 2048,
2873
+ url: 8192,
2874
+ method: 16,
2875
+ requestId: 128,
2876
+ headerCount: 100,
2877
+ headerName: 256,
2878
+ headerValue: 8192,
2879
+ /** All header names and values together, in characters. */
2880
+ headerBytes: 32768,
2881
+ /** Entries in each behavioral event array. */
2882
+ behavioralEvents: 2e3,
2883
+ /** A keyboard event's `key`; a DOM key value is a few dozen characters at most. */
2884
+ eventKey: 64,
2885
+ /** A click event's `target`. */
2886
+ eventTarget: 1024
2887
+ };
2935
2888
  /**
2936
2889
  * Database Limits
2937
2890
  */
@@ -3267,14 +3220,22 @@ const BehavioralAnalysisSchema = require_schemas.object({
3267
3220
  * API request schemas
3268
3221
  */
3269
3222
  /**
3270
- * Detection API request
3223
+ * Detection API request. Only `method`, which the caller sets, is capped here.
3224
+ * Every other field is relayed from the visitor's request or browser, and each
3225
+ * route that takes it applies its own size limits:
3226
+ * - `/api/v1/detect` refuses a relayed field over its limit with 400
3227
+ * (`DetectRequestLimitsSchema`, apps/web/app/api/v1/detect/limits.ts).
3228
+ * - `/api/v1/verdict`, which takes `behavioralData` and `options` from this
3229
+ * schema, cuts an over-limit value and reports the cut.
3230
+ * The enforce routes (`/api/v1/enforce` and the gateway's `/__detect/enforce`)
3231
+ * take a request of their own and never refuse a relayed field for its size.
3271
3232
  */
3272
3233
  const DetectionRequestSchema = require_schemas.object({
3273
3234
  userAgent: require_schemas.string(),
3274
3235
  ipAddress: require_schemas.string().optional(),
3275
3236
  headers: require_schemas.record(require_schemas.string(), require_schemas.string()).optional(),
3276
3237
  url: require_schemas.string().optional(),
3277
- method: require_schemas.string().optional(),
3238
+ method: require_schemas.string().max(DETECTION_REQUEST_LIMITS.method).optional(),
3278
3239
  behavioralData: BehavioralDataSchema.optional(),
3279
3240
  options: require_schemas.object({
3280
3241
  mode: require_schemas._enum([
@@ -5174,7 +5135,8 @@ const KNOWN_PATTERN_BY_NAME_OR_ID = buildKnownPatternLookup(KNOWN_AGENT_PATTERNS
5174
5135
  * {@link TrafficTaxonomyBucket}. An unidentified agent (`agent_type` null,
5175
5136
  * stored as 'Unknown' by the rollup) falls to the class fallback, so an
5176
5137
  * `ai_agent`-classed unidentified row counts as an AI agent and a
5177
- * `bot`-classed one as other automation.
5138
+ * `bot`-classed one as other automation. Never `unidentified`: that bucket
5139
+ * is what remains of a total once every classified row is counted.
5178
5140
  */
5179
5141
  function classifyAgentTaxonomy(agentType, detectionClass) {
5180
5142
  if (detectionClass === "human") return "human";
@@ -5226,6 +5188,134 @@ const UserSchema = require_schemas.object({
5226
5188
  createdAt: require_schemas.date(),
5227
5189
  updatedAt: require_schemas.date()
5228
5190
  });
5191
+ const RequestFlagLabelMatrixEntrySchema = require_schemas.object({
5192
+ flag: require_schemas.string().min(1).max(64),
5193
+ clientId: require_schemas.string().min(1).max(128).optional(),
5194
+ tier: require_schemas.string().min(1).max(64).optional(),
5195
+ label: require_schemas.boolean(),
5196
+ weight: require_schemas.number().int().min(0).max(100).optional(),
5197
+ minAccountAddresses: require_schemas.number().int().min(1).max(16).optional()
5198
+ });
5199
+ const RequestFlagLabelMatrixSchema = require_schemas.array(RequestFlagLabelMatrixEntrySchema).max(100);
5200
+ const REQUEST_LABELLING_FLAGS = [
5201
+ "page_load_on_json_post",
5202
+ "client_hint_contradiction",
5203
+ "upgrade_insecure_requests_on_json_post",
5204
+ "account_network_rotation",
5205
+ "account_impossible_travel",
5206
+ "pre_zstd_headers_on_modern_chrome",
5207
+ "grease_brand_mismatch",
5208
+ "bare_product_agent_template",
5209
+ "missing_ua_gzip_chrome",
5210
+ "gzip_only_hinted_chrome",
5211
+ "zh_cn_cross_site_windows_chrome",
5212
+ "country_spread",
5213
+ "old_chrome",
5214
+ "shared_network",
5215
+ "minute_aligned",
5216
+ "account_hour_volume",
5217
+ "account_convicted",
5218
+ "network_convicted",
5219
+ "no_human_proof",
5220
+ "device_type_contradiction",
5221
+ "pool_address",
5222
+ "ip_convicted",
5223
+ "account_many_apps",
5224
+ "account_rapid_country_rotation",
5225
+ "account_many_countries",
5226
+ "gzip_only_browser_with_evidence",
5227
+ "account_three_state",
5228
+ "account_two_jump",
5229
+ "shared_clock_slot",
5230
+ "stable_minute_offset",
5231
+ "aligned_minute_batch",
5232
+ "chrome_without_hints_or_language_on_hosting",
5233
+ "stale_safari_16_business_hosting",
5234
+ "library_ua_on_web_client",
5235
+ "automation_ua_on_web_client",
5236
+ "truncated_browser_ua",
5237
+ "safari_without_priority_business_hosting",
5238
+ "mobile_app_new_account_abroad",
5239
+ "team_trial_new_account",
5240
+ "round_the_clock",
5241
+ "many_templates",
5242
+ "template_minute_arc",
5243
+ "linked_rare_header",
5244
+ "app_ua_on_web",
5245
+ "session_age_96h",
5246
+ "signup_cohort_abroad",
5247
+ "wave_template_young_account",
5248
+ "guest_scatter",
5249
+ "ua_new",
5250
+ "ua_young",
5251
+ "email_fan"
5252
+ ];
5253
+ const REQUEST_FLAG_KINDS = [
5254
+ "behaviour",
5255
+ "header-template",
5256
+ "address"
5257
+ ];
5258
+ const REQUEST_LABELLING_FLAG_KINDS = {
5259
+ page_load_on_json_post: "header-template",
5260
+ client_hint_contradiction: "header-template",
5261
+ upgrade_insecure_requests_on_json_post: "header-template",
5262
+ account_network_rotation: "behaviour",
5263
+ account_impossible_travel: "behaviour",
5264
+ pre_zstd_headers_on_modern_chrome: "header-template",
5265
+ grease_brand_mismatch: "header-template",
5266
+ bare_product_agent_template: "header-template",
5267
+ missing_ua_gzip_chrome: "header-template",
5268
+ zh_cn_cross_site_windows_chrome: "header-template",
5269
+ country_spread: "behaviour",
5270
+ old_chrome: "header-template",
5271
+ shared_network: "behaviour",
5272
+ minute_aligned: "behaviour",
5273
+ account_convicted: "behaviour",
5274
+ network_convicted: "behaviour",
5275
+ no_human_proof: "behaviour",
5276
+ device_type_contradiction: "header-template",
5277
+ pool_address: "address",
5278
+ ip_convicted: "address",
5279
+ account_many_apps: "address",
5280
+ account_rapid_country_rotation: "behaviour",
5281
+ account_many_countries: "behaviour",
5282
+ account_hour_volume: "behaviour",
5283
+ gzip_only_browser_with_evidence: "address",
5284
+ account_three_state: "behaviour",
5285
+ account_two_jump: "behaviour",
5286
+ shared_clock_slot: "behaviour",
5287
+ stable_minute_offset: "behaviour",
5288
+ aligned_minute_batch: "behaviour",
5289
+ chrome_without_hints_or_language_on_hosting: "header-template",
5290
+ gzip_only_hinted_chrome: "header-template",
5291
+ stale_safari_16_business_hosting: "header-template",
5292
+ library_ua_on_web_client: "header-template",
5293
+ automation_ua_on_web_client: "header-template",
5294
+ truncated_browser_ua: "header-template",
5295
+ safari_without_priority_business_hosting: "header-template",
5296
+ mobile_app_new_account_abroad: "behaviour",
5297
+ team_trial_new_account: "behaviour",
5298
+ round_the_clock: "behaviour",
5299
+ many_templates: "behaviour",
5300
+ template_minute_arc: "behaviour",
5301
+ linked_rare_header: "behaviour",
5302
+ app_ua_on_web: "header-template",
5303
+ session_age_96h: "behaviour",
5304
+ signup_cohort_abroad: "behaviour",
5305
+ wave_template_young_account: "behaviour",
5306
+ guest_scatter: "behaviour",
5307
+ ua_new: "behaviour",
5308
+ ua_young: "behaviour",
5309
+ email_fan: "behaviour"
5310
+ };
5311
+ const RequestFlagLabelMatrixWriteSchema = require_schemas.array(RequestFlagLabelMatrixEntrySchema.extend({ flag: require_schemas._enum(REQUEST_LABELLING_FLAGS) }).refine(({ flag, clientId, label }) => clientId === void 0 || label || REQUEST_LABELLING_FLAG_KINDS[flag] !== "behaviour", {
5312
+ path: ["flag"],
5313
+ error: "a client-scoped label:false entry does not apply to behaviour flags"
5314
+ })).max(100);
5315
+ const EventCountLimitsSettingSchema = require_schemas.object({
5316
+ lastHour: require_schemas.number().int().nonnegative().optional(),
5317
+ lastDay: require_schemas.number().int().nonnegative().optional()
5318
+ });
5229
5319
  /**
5230
5320
  * Project Settings
5231
5321
  */
@@ -5240,6 +5330,17 @@ const ProjectSettingsSchema = require_schemas.object({
5240
5330
  webhookUrl: require_schemas.string().url().optional(),
5241
5331
  webhookSecret: require_schemas.string().optional(),
5242
5332
  beaconRateLimitPerMinute: require_schemas.number().int().positive().optional(),
5333
+ rateLimitExempt: require_schemas.boolean().optional(),
5334
+ requestFlagLabel: require_schemas.boolean().optional(),
5335
+ requestFlagTwoJumpShadow: require_schemas.boolean().optional(),
5336
+ requestFlagOwnClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
5337
+ requestFlagWebClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
5338
+ requestFlagSizedClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
5339
+ requestFlagControlClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
5340
+ requestFlagBrowserRelayClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
5341
+ requestFlagMobileAppClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
5342
+ requestFlagLabelMatrix: RequestFlagLabelMatrixSchema.optional(),
5343
+ eventCountLimits: EventCountLimitsSettingSchema.optional(),
5243
5344
  postureOrigins: require_schemas.array(require_schemas.string()).optional(),
5244
5345
  postureReportPaths: require_schemas.array(require_schemas.string()).optional(),
5245
5346
  beaconIngestMode: require_schemas._enum(["origin", "worker"]).optional()
@@ -5593,7 +5694,6 @@ const OAuth2ProviderSchema = BaseAuthProviderSchema.extend({
5593
5694
  *
5594
5695
  * Supports:
5595
5696
  * - JSON token responses (JWT, Bearer tokens)
5596
- * - Cookie-based sessions (like HardwareWorld)
5597
5697
  * - Custom response validation
5598
5698
  */
5599
5699
  const CredentialProviderSchema = BaseAuthProviderSchema.extend({
@@ -5627,8 +5727,8 @@ const CredentialProviderSchema = BaseAuthProviderSchema.extend({
5627
5727
  apiHeaders: require_schemas.record(require_schemas.string(), require_schemas.string()).optional(),
5628
5728
  consentOverrides: require_schemas.object({
5629
5729
  branding: require_schemas.object({
5630
- primaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color (e.g., #2563EB)").optional(),
5631
- secondaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color (e.g., #DBEAFE)").optional(),
5730
+ primaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional(),
5731
+ secondaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional(),
5632
5732
  logoUrl: httpUrlSchema(500).optional(),
5633
5733
  companyName: require_schemas.string().max(255).optional(),
5634
5734
  theme: require_schemas._enum([
@@ -5693,16 +5793,34 @@ const CRISPBudgetSchema = require_schemas.object({
5693
5793
  /**
5694
5794
  * Consent Branding Configuration
5695
5795
  */
5796
+ /**
5797
+ * An optional consent page colour, `#rrggbb` like the primary and secondary,
5798
+ * with the same error. The error names the form, not an example colour, so
5799
+ * the schema holds no colour literal.
5800
+ */
5801
+ const pageColorSchema = () => require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional();
5696
5802
  const ConsentBrandingSchema = require_schemas.object({
5697
- primaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color (e.g., #2563EB)").optional(),
5698
- secondaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color (e.g., #DBEAFE)").optional(),
5803
+ primaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional(),
5804
+ secondaryColor: require_schemas.string().regex(hexColorRegex, "Color must be a valid hex color in #RRGGBB form").optional(),
5699
5805
  logoUrl: httpUrlSchema(500).optional(),
5700
5806
  companyName: require_schemas.string().max(255).optional(),
5701
5807
  theme: require_schemas._enum([
5702
5808
  "light",
5703
5809
  "dark",
5704
5810
  "auto"
5705
- ]).optional()
5811
+ ]).optional(),
5812
+ /** The card the page draws its steps on. */
5813
+ surfaceColor: pageColorSchema(),
5814
+ /** The panels inside the card: the grant notice and the boxes of facts. */
5815
+ panelColor: pageColorSchema(),
5816
+ /** The lines around the card and its panels. */
5817
+ borderColor: pageColorSchema(),
5818
+ /** The page's text. */
5819
+ textColor: pageColorSchema(),
5820
+ /** The quieter text: labels and notes. */
5821
+ mutedTextColor: pageColorSchema(),
5822
+ /** The keyboard focus ring. */
5823
+ focusColor: pageColorSchema()
5706
5824
  });
5707
5825
  /**
5708
5826
  * Consent Terms Configuration
@@ -5851,10 +5969,20 @@ const MAX_SCOPE_LABELS = 50;
5851
5969
  * scope grantable (`allowedScopesFor` does not read it) and carries no Cedar.
5852
5970
  */
5853
5971
  const ConsentScopeLabelsSchema = require_schemas.record(require_schemas.string().min(1).max(120), require_schemas.string().min(1).max(80)).refine((labels) => Object.keys(labels).length <= MAX_SCOPE_LABELS, `At most ${MAX_SCOPE_LABELS} scope labels`);
5972
+ /** A consent policy names a handful of assurance providers; this only bounds the stored map. */
5973
+ const MAX_ASSURANCE_NOTES = 20;
5974
+ /**
5975
+ * The brand's words for what a permission's check involves, keyed by the
5976
+ * assurance provider id (`registry:fr-rpps`). A project that chooses
5977
+ * permissions before checks shows it on the row before the check runs. Copy
5978
+ * only: it never adds, removes or orders a check.
5979
+ */
5980
+ const ConsentAssuranceNotesSchema = require_schemas.record(require_schemas.string().min(1).max(80), require_schemas.string().min(1).max(120)).refine((notes) => Object.keys(notes).length <= MAX_ASSURANCE_NOTES, `At most ${MAX_ASSURANCE_NOTES} assurance notes`);
5854
5981
  /**
5855
5982
  * Full Consent Configuration
5856
5983
  */
5857
5984
  const ConsentConfigSchema = require_schemas.object({
5985
+ chooseThenProveEnabled: require_schemas.boolean().optional(),
5858
5986
  branding: ConsentBrandingSchema.optional(),
5859
5987
  terms: ConsentTermsSchema.optional(),
5860
5988
  ui: ConsentUISchema.optional(),
@@ -5870,7 +5998,8 @@ const ConsentConfigSchema = require_schemas.object({
5870
5998
  inactivityDays: require_schemas.number().int().min(1).max(3650).optional(),
5871
5999
  authorizationHost: require_schemas.string().min(1).max(255).optional(),
5872
6000
  signInCopy: ConsentSignInCopySchema.optional(),
5873
- scopeLabels: ConsentScopeLabelsSchema.optional()
6001
+ scopeLabels: ConsentScopeLabelsSchema.optional(),
6002
+ assuranceNotes: ConsentAssuranceNotesSchema.optional()
5874
6003
  });
5875
6004
  /**
5876
6005
  * Bouncer Config (for GET response)
@@ -6452,6 +6581,17 @@ const UpdateProjectSchema = require_schemas.object({
6452
6581
  webhookUrl: require_schemas.string().url().optional(),
6453
6582
  webhookSecret: require_schemas.string().optional(),
6454
6583
  beaconRateLimitPerMinute: require_schemas.number().int().positive().optional(),
6584
+ rateLimitExempt: require_schemas.boolean().optional(),
6585
+ requestFlagLabel: require_schemas.boolean().optional(),
6586
+ requestFlagTwoJumpShadow: require_schemas.boolean().optional(),
6587
+ requestFlagOwnClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
6588
+ requestFlagWebClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
6589
+ requestFlagSizedClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
6590
+ requestFlagControlClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
6591
+ requestFlagBrowserRelayClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
6592
+ requestFlagMobileAppClients: require_schemas.array(require_schemas.string().min(1)).max(100).optional(),
6593
+ requestFlagLabelMatrix: RequestFlagLabelMatrixWriteSchema.optional(),
6594
+ eventCountLimits: EventCountLimitsSettingSchema.optional(),
6455
6595
  postureOrigins: PostureOriginsSchema.optional(),
6456
6596
  postureReportPaths: PostureReportPathsSchema.optional()
6457
6597
  }).optional()
@@ -6775,8 +6915,6 @@ const HomeRailRollupsRequestSchema = require_schemas.object({ organizationId: Or
6775
6915
  //#region src/api/signal-exposure.ts
6776
6916
  /**
6777
6917
  * Detection signal exposure: the wire shape of the "full signal set"
6778
- * block on the `/api/v1/enforce` detection response (KYA-1107, "Adobe
6779
- * Golden Snapshot").
6780
6918
  *
6781
6919
  * Every enforce detection payload carries these fields in addition to the
6782
6920
  * condensed summary fields. Additive only: consumers must ignore keys they
@@ -7433,7 +7571,11 @@ const HeartbeatResponseSchema = require_schemas.object({
7433
7571
  ack: require_schemas.literal(true),
7434
7572
  /** Pending commands for the compute process to execute */
7435
7573
  commands: require_schemas.array(ComputeCommandSchema).default([]),
7436
- /** ISO timestamp of last config change (compute compares to detect updates) */
7574
+ /**
7575
+ * ISO timestamp of the last config change. A change is applied when the heartbeat returns
7576
+ * `update_config`, which a tier change withholds while the agent is in use, so this can be
7577
+ * newer than the config the gateway runs.
7578
+ */
7437
7579
  configUpdatedAt: require_schemas.string().datetime().optional()
7438
7580
  });
7439
7581
  /**
@@ -8315,7 +8457,12 @@ function isLegitimateCategory(category) {
8315
8457
  ].includes(category);
8316
8458
  }
8317
8459
  /**
8318
- * Get display color for agent category (for UI)
8460
+ * Display colour for an agent category (for UI), as a hex value.
8461
+ *
8462
+ * Part of this package's published API: npm consumers paint it in their own
8463
+ * dashboards, charts and email, outside any Checkpoint stylesheet, so it
8464
+ * stays a literal hex rather than a design-system `var()` reference, which
8465
+ * would resolve to nothing there.
8319
8466
  */
8320
8467
  function getCategoryColor(category) {
8321
8468
  return {
@@ -8548,12 +8695,17 @@ const INSTALLATION_TYPES = [
8548
8695
  "dns_gateway",
8549
8696
  "beacon"
8550
8697
  ];
8551
- /** The four buckets the admin overview classifies every traffic event into. */
8698
+ /**
8699
+ * The buckets the admin overview classifies every traffic event into.
8700
+ * `unidentified` holds the incomplete_data events the engine could not
8701
+ * classify, so the buckets add up to the total.
8702
+ */
8552
8703
  const TRAFFIC_TAXONOMY_BUCKETS = [
8553
8704
  "human",
8554
8705
  "ai_agent",
8555
8706
  "ai_crawler",
8556
- "other_automation"
8707
+ "other_automation",
8708
+ "unidentified"
8557
8709
  ];
8558
8710
  /** Order is precedence: a user matching several rules is attributed to the first. */
8559
8711
  const EXCLUSION_BUCKETS = [
@@ -8613,14 +8765,20 @@ const ADMIN_TRUSTED_METRICS = [
8613
8765
  * row, none of its members is a counted person (`no_counted_members`).
8614
8766
  */
8615
8767
  const ADMIN_ORG_EXCLUSION_REASONS = ["test_org", "no_counted_members"];
8616
- /** `counted`, or the first rule that left the account out (user buckets take precedence). */
8768
+ /**
8769
+ * `counted`; `invited`, a teammate's invitee on a signup metric; or the first
8770
+ * rule that left the account out. User buckets take precedence over the org
8771
+ * reasons, and over `invited`: an invitee on the exclusion lists reads as
8772
+ * excluded, so each account is in exactly one part of its split.
8773
+ */
8617
8774
  const ADMIN_ACCOUNT_STATUSES = [
8618
8775
  "counted",
8776
+ "invited",
8619
8777
  ...EXCLUSION_BUCKETS,
8620
8778
  ...ADMIN_ORG_EXCLUSION_REASONS
8621
8779
  ];
8622
8780
  /** GET /api/admin/overview/accounts query. */
8623
- /** Drill-down status filter: everyone, any exclusion, or one status. */
8781
+ /** Drill-down status filter: everyone, any exclusion (never `invited`), or one status. */
8624
8782
  const ADMIN_ACCOUNTS_STATUS_FILTERS = [
8625
8783
  "all",
8626
8784
  "excluded",
@@ -8637,6 +8795,191 @@ const adminAccountsQuerySchema = require_schemas.object({
8637
8795
  status: require_schemas._enum(ADMIN_ACCOUNTS_STATUS_FILTERS).default("all")
8638
8796
  });
8639
8797
 
8798
+ //#endregion
8799
+ //#region src/data/generated/verdict-rules-digest.json
8800
+ var sha256$3 = "0aae838abc1d38eb7541bb360a570809cb95d05e59a857e852bff145b7503291";
8801
+
8802
+ //#endregion
8803
+ //#region src/verdict-rules/default.json
8804
+ var default_default = {
8805
+ schema: 1,
8806
+ version: 0,
8807
+ tuning: {
8808
+ "currentChromeMajor": 156,
8809
+ "oldChromeMajorLag": 11,
8810
+ "bareTemplateMinCalls": 3,
8811
+ "bareTemplateMinAddresses": 3,
8812
+ "accountHourVolumeCalls": 16,
8813
+ "behaviourIpCount": 3,
8814
+ "spreadWindowCalls": 2,
8815
+ "spreadWindowCountries": 2,
8816
+ "networksInHourMin": 3,
8817
+ "clientAppsMin": 5,
8818
+ "poolAppsMin": 2,
8819
+ "rapidCountryMin": 3,
8820
+ "manyCountriesMin": 3,
8821
+ "highCallVolumeLine": 60,
8822
+ "minuteAlignedWindowMs": 200,
8823
+ "webEditorHandoffWindowMs": 72e5,
8824
+ "minuteAlignedWeight": .3,
8825
+ "accountHistoryBandMedium": .35,
8826
+ "accountHistoryBandHigh": .6,
8827
+ "countryWeights": {
8828
+ "two": .3,
8829
+ "three": .6
8830
+ },
8831
+ "rotationDistanceKm": 1200,
8832
+ "rotationGapMs": 9e5,
8833
+ "rotationIspCount": 3,
8834
+ "stateApartKm": 300,
8835
+ "twoJumpLegKm": 1e3,
8836
+ "twoJumpPriorMaxAgeMs": 36e5,
8837
+ "minuteBatch": {
8838
+ "memoryMs": 72e5,
8839
+ "timeoutMs": 75,
8840
+ "observations": 12,
8841
+ "spanMs": 2e3
8842
+ },
8843
+ "minutePhase": {
8844
+ "memoryMs": 72e5,
8845
+ "timeoutMs": 75,
8846
+ "observations": 12,
8847
+ "spanMs": 1e3,
8848
+ "clockSkewMs": 5e3
8849
+ },
8850
+ "scheduler": {
8851
+ "memoryMs": 72e5,
8852
+ "timeoutMs": 75,
8853
+ "reorderToleranceMs": 1e3,
8854
+ "clockSkewMs": 5e3,
8855
+ "burstGapMs": 5e3,
8856
+ "burstSpanMs": 3e3,
8857
+ "burstMinAccounts": 8,
8858
+ "periodToleranceMs": 3e3,
8859
+ "coreMinAccounts": 5
8860
+ },
8861
+ "publicAccessPointAccounts": 8,
8862
+ "networkAccountWeights": {
8863
+ "fixed_line": {
8864
+ "publicAccessPoint": .7,
8865
+ "steps": [{
8866
+ "accounts": 5,
8867
+ "weight": .5
8868
+ }, {
8869
+ "accounts": 3,
8870
+ "weight": .3
8871
+ }]
8872
+ },
8873
+ "unrouted_isp": {
8874
+ "publicAccessPoint": .5,
8875
+ "steps": [{
8876
+ "accounts": 5,
8877
+ "weight": .3
8878
+ }, {
8879
+ "accounts": 3,
8880
+ "weight": .15
8881
+ }]
8882
+ },
8883
+ "hosting": {
8884
+ "publicAccessPoint": .3,
8885
+ "steps": [{
8886
+ "accounts": 5,
8887
+ "weight": .2
8888
+ }, {
8889
+ "accounts": 3,
8890
+ "weight": .1
8891
+ }]
8892
+ }
8893
+ },
8894
+ "headerContradictionWeights": {
8895
+ "page_load_on_json_post": .3,
8896
+ "client_hint_contradiction": .33,
8897
+ "browser_headers_without_user_agent": .16,
8898
+ "hosting_on_unpaid_tier": .16,
8899
+ "pre_zstd_headers_on_modern_chrome": .16
8900
+ },
8901
+ "populationFloorWeight": .1,
8902
+ "ja4VersionMismatchWeight": .75,
8903
+ "velocityEscalationFloors": {
8904
+ "requestCount": 150,
8905
+ "requestsPerMinute": 120
8906
+ },
8907
+ "zstdAndPriorityFromMajor": 124,
8908
+ "greaseMajorRange": {
8909
+ "from": 120,
8910
+ "to": 157
8911
+ },
8912
+ "missingUaGzipChromeMinimumMajor": 124,
8913
+ "establishedAgeDays": 365,
8914
+ "newAccountAgeDays": 30,
8915
+ "maxAccountAgeDays": 36500
8916
+ }
8917
+ };
8918
+
8919
+ //#endregion
8920
+ //#region src/verdict-rules/compiled.ts
8921
+ const deepFreeze = (value) => {
8922
+ if (value instanceof Object) {
8923
+ Object.values(value).forEach(deepFreeze);
8924
+ Object.freeze(value);
8925
+ }
8926
+ return value;
8927
+ };
8928
+ const compileEmbeddedVerdictRules = (rules) => deepFreeze({
8929
+ source: "embedded",
8930
+ version: rules.version,
8931
+ tuning: rules.tuning
8932
+ });
8933
+ const embeddedVerdictRules = compileEmbeddedVerdictRules(structuredClone(default_default));
8934
+ const embeddedVerdictRulesSha256 = sha256$3;
8935
+
8936
+ //#endregion
8937
+ //#region src/session-velocity-partition.ts
8938
+ const SESSION_VELOCITY_BUCKET_SECONDS = 300;
8939
+ const SESSION_VELOCITY_BUCKET_MS = 300 * 1e3;
8940
+ const SESSION_VELOCITY_PARTITIONS = 32;
8941
+ const SESSION_VELOCITY_SKETCH_ROWS = 4;
8942
+ const SESSION_VELOCITY_SKETCH_COLUMN_HEX_DIGITS = 3;
8943
+ const SESSION_VELOCITY_SKETCH_COLUMNS = 16 ** 3;
8944
+ const SESSION_VELOCITY_SKETCH_COUNTER_MAX = 65535;
8945
+ const SESSION_VELOCITY_WRITE_COUNTER_INDEX = 4 * SESSION_VELOCITY_SKETCH_COLUMNS / 2;
8946
+ const SESSION_VELOCITY_EXPIRY_SKEW_SECONDS = 30;
8947
+ const VELOCITY_ESCALATION_FLOORS = embeddedVerdictRules.tuning.velocityEscalationFloors;
8948
+ function sessionVelocityBucket(nowMs) {
8949
+ return Math.floor(nowMs / SESSION_VELOCITY_BUCKET_MS);
8950
+ }
8951
+ function sessionVelocityBucketStart(nowMs) {
8952
+ return sessionVelocityBucket(nowMs) * SESSION_VELOCITY_BUCKET_MS;
8953
+ }
8954
+ function sessionVelocityExpirySeconds(nowMs, bucketMs = SESSION_VELOCITY_BUCKET_MS, skewSeconds = 30) {
8955
+ const bucketEnd = (Math.floor(nowMs / bucketMs) + 1) * bucketMs;
8956
+ return Math.ceil((bucketEnd - nowMs) / 1e3) + skewSeconds;
8957
+ }
8958
+ function verdictShardIndexFor(projectId, sessionId, count) {
8959
+ const text = `${projectId}\u0000${sessionId}`;
8960
+ let hash = 2166136261;
8961
+ for (let index = 0; index < text.length; index += 1) {
8962
+ hash ^= text.charCodeAt(index);
8963
+ hash = Math.imul(hash, 16777619);
8964
+ }
8965
+ hash ^= hash >>> 16;
8966
+ hash = Math.imul(hash, 2246822507);
8967
+ hash ^= hash >>> 13;
8968
+ hash = Math.imul(hash, 3266489909);
8969
+ hash ^= hash >>> 16;
8970
+ return (hash >>> 0) % count;
8971
+ }
8972
+ function sessionVelocityPartition(projectId, sessionId) {
8973
+ return verdictShardIndexFor(projectId, sessionId, 32);
8974
+ }
8975
+ function sessionVelocitySketchCells(clientHash, hexDigits = 3, columns = 16 ** hexDigits) {
8976
+ return Array.from({ length: 4 }, (_, row) => {
8977
+ const start = row * hexDigits;
8978
+ const column = Number.parseInt(clientHash.slice(start, start + hexDigits), 16) % columns;
8979
+ return row * columns + column;
8980
+ });
8981
+ }
8982
+
8640
8983
  //#endregion
8641
8984
  //#region src/utils/agent-runtime-label.ts
8642
8985
  /**
@@ -9949,7 +10292,7 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9949
10292
  "lastUpdated": "2025-01-10T00:00:00Z"
9950
10293
  }
9951
10294
  ],
9952
- "hash": "e1421f0f43d84f10a8093fedbeb9b47eaa8998b2407da9564d8b74637251ad08"
10295
+ "hash": "7d7efc9019a20794764cb9977b744c7a8c31386b5ee0567dde81fd42f61f294e"
9953
10296
  },
9954
10297
  "rules": {
9955
10298
  "userAgents": {
@@ -10005,7 +10348,8 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10005
10348
  "patterns": [
10006
10349
  "facebookexternalhit",
10007
10350
  "facebookcatalog",
10008
- "FacebookBot"
10351
+ "FacebookBot",
10352
+ "meta-externalads"
10009
10353
  ],
10010
10354
  "confidence": .9,
10011
10355
  "description": "Meta/Facebook web crawlers for link previews and training",
@@ -10024,7 +10368,7 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10024
10368
  "category": "scraper"
10025
10369
  },
10026
10370
  "bytedance_crawler": {
10027
- "patterns": ["Bytespider", "ByteDance"],
10371
+ "patterns": ["Bytespider", "@bytedance.com"],
10028
10372
  "confidence": .85,
10029
10373
  "description": "ByteDance/TikTok web crawler",
10030
10374
  "category": "scraper"
@@ -10276,7 +10620,7 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10276
10620
  "category": "ai_assistant"
10277
10621
  },
10278
10622
  "meta_ai": {
10279
- "patterns": ["Meta-ExternalAgent"],
10623
+ "patterns": ["Meta-ExternalAgent", "Meta-ExternalFetcher"],
10280
10624
  "confidence": .95,
10281
10625
  "category": "scraper",
10282
10626
  "description": "Meta AI assistant"
@@ -10313,7 +10657,9 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10313
10657
  "Mediapartners-Google",
10314
10658
  "Google-InspectionTool",
10315
10659
  "GoogleOther",
10316
- "Google-Read-Aloud"
10660
+ "Google-Read-Aloud",
10661
+ "Google-Site-Verification",
10662
+ "Google-CWS"
10317
10663
  ],
10318
10664
  "confidence": .95,
10319
10665
  "description": "Google search crawler and related bots",
@@ -10337,7 +10683,7 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10337
10683
  "duckduckgo": {
10338
10684
  "patterns": [
10339
10685
  "DuckDuckBot",
10340
- "DuckDuckGo",
10686
+ "DuckAssistBot",
10341
10687
  "DuckDuckGo-Favicons-Bot",
10342
10688
  "DuckDuckGoImageProxy"
10343
10689
  ],
@@ -10395,7 +10741,6 @@ var require_merged_rules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10395
10741
  },
10396
10742
  "sogoubot": {
10397
10743
  "patterns": [
10398
- "Sogou",
10399
10744
  "Sogou web spider",
10400
10745
  "Sogou inst spider",
10401
10746
  "Sogou spider"
@@ -13505,6 +13850,216 @@ const CliPairingExchangeDataSchema = require_schemas.object({
13505
13850
  dashboardUrl: require_schemas.string().url()
13506
13851
  }).strict();
13507
13852
 
13853
+ //#endregion
13854
+ //#region src/verdict-dictionaries.ts
13855
+ const SPOOL_DICTIONARY_S1 = "{\"request_flags\":[\"page_load_on_json_post\",\"client_hint_contradiction\",\"browser_headers_without_user_agent\",\"hosting_on_unpaid_tier\",\"pre_zstd_headers_on_modern_chrome\",\"upgrade_insecure_requests_on_json_post\",\"hosting_network\",\"tor\",\"vpn\",\"apple_private_relay\",\"old_chrome\",\"grease_brand_mismatch\",\"language_region_mismatch\",\"bare_product_agent_template\",\"missing_ua_gzip_chrome\",\"gzip_only_hinted_chrome\",\"http_client_user_agent\",\"zh_cn_cross_site_windows_chrome\",\"gzip_only_browser_with_evidence\",\"chrome_without_hints_or_language_on_hosting\",\"no_human_proof\",\"guest_cors_population\",\"device_type_contradiction\",\"served_bot_memory\",\"geo_witness_memory\",\"dispersed_burst\",\"account_age_new\",\"email_unverified\",\"account_country_mismatch\",\"email_disposable\",\"email_role\",\"email_private_relay\",\"account_network_rotation\",\"account_impossible_travel\",\"country_spread\",\"shared_network\",\"minute_aligned\",\"account_hour_volume\",\"account_convicted\",\"network_convicted\",\"pool_address\",\"ip_convicted\",\"account_many_apps\",\"account_rapid_country_rotation\",\"account_many_countries\"],\"label_matrix\":[{\"flag\":\"page_load_on_json_post\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"client_hint_contradiction\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"upgrade_insecure_requests_on_json_post\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_network_rotation\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_impossible_travel\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"pre_zstd_headers_on_modern_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"grease_brand_mismatch\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"bare_product_agent_template\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"missing_ua_gzip_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"gzip_only_hinted_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"zh_cn_cross_site_windows_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"country_spread\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"old_chrome\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"shared_network\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"minute_aligned\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_hour_volume\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_convicted\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"network_convicted\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"no_human_proof\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"device_type_contradiction\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"pool_address\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"ip_convicted\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_many_apps\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_rapid_country_rotation\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"account_many_countries\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"gzip_only_browser_with_evidence\",\"label\":true,\"scope\":\"client+tier\"},{\"flag\":\"chrome_without_hints_or_language_on_hosting\",\"label\":true,\"scope\":\"client+tier\"}],\"label_gates\":[{\"flag\":\"shared_network\",\"gate\":\"established_header_only\"}],\"fraud_label\":{\"flags\":[\"page_load_on_json_post\",\"client_hint_contradiction\",\"upgrade_insecure_requests_on_json_post\",\"account_network_rotation\",\"account_impossible_travel\",\"pre_zstd_headers_on_modern_chrome\",\"grease_brand_mismatch\",\"bare_product_agent_template\",\"missing_ua_gzip_chrome\",\"gzip_only_hinted_chrome\",\"zh_cn_cross_site_windows_chrome\",\"country_spread\",\"old_chrome\",\"shared_network\",\"minute_aligned\",\"account_hour_volume\",\"account_convicted\",\"network_convicted\",\"no_human_proof\",\"device_type_contradiction\",\"pool_address\",\"ip_convicted\",\"account_many_apps\",\"account_rapid_country_rotation\",\"account_many_countries\",\"gzip_only_browser_with_evidence\",\"chrome_without_hints_or_language_on_hosting\"],\"count\":27,\"signals\":[{\"signal\":\"page_load_on_json_post\",\"tier\":\"evidence\"},{\"signal\":\"client_hint_contradiction\",\"tier\":\"evidence\"},{\"signal\":\"upgrade_insecure_requests_on_json_post\",\"tier\":\"evidence\"},{\"signal\":\"account_network_rotation\",\"tier\":\"evidence\"},{\"signal\":\"account_impossible_travel\",\"tier\":\"evidence\"},{\"signal\":\"pre_zstd_headers_on_modern_chrome\",\"tier\":\"evidence\"},{\"signal\":\"grease_brand_mismatch\",\"tier\":\"population\"},{\"signal\":\"bare_product_agent_template\",\"tier\":\"population\"},{\"signal\":\"missing_ua_gzip_chrome\",\"tier\":\"population\"},{\"signal\":\"gzip_only_hinted_chrome\",\"tier\":\"population\"},{\"signal\":\"zh_cn_cross_site_windows_chrome\",\"tier\":\"population\"},{\"signal\":\"country_spread\",\"tier\":\"evidence\"},{\"signal\":\"old_chrome\",\"tier\":\"population\"},{\"signal\":\"shared_network\",\"tier\":\"evidence\"},{\"signal\":\"minute_aligned\",\"tier\":\"evidence\"},{\"signal\":\"account_hour_volume\",\"tier\":\"evidence\"},{\"signal\":\"account_convicted\",\"tier\":\"evidence\"},{\"signal\":\"network_convicted\",\"tier\":\"evidence\"},{\"signal\":\"no_human_proof\",\"tier\":\"population\"},{\"signal\":\"device_type_contradiction\",\"tier\":\"evidence\"},{\"signal\":\"pool_address\",\"tier\":\"evidence\"},{\"signal\":\"ip_convicted\",\"tier\":\"evidence\"},{\"signal\":\"account_many_apps\",\"tier\":\"evidence\"},{\"signal\":\"account_rapid_country_rotation\",\"tier\":\"evidence\"},{\"signal\":\"account_many_countries\",\"tier\":\"evidence\"},{\"signal\":\"gzip_only_browser_with_evidence\",\"tier\":\"population\"},{\"signal\":\"chrome_without_hints_or_language_on_hosting\",\"tier\":\"population\"}]},\"attributes\":{\"emailVerified\":\"true\",\"accountAgeDays\":\"36500\",\"accountCountry\":\"US\",\"deviceType\":\"desktop\"},\"servedNetwork\":{\"publicAccessPoint\":true},\"servedEnvironment\":{\"incognito\":true,\"privacySettings\":true,\"virtualMachine\":true,\"developerTools\":true,\"tampering\":true,\"antiDetect\":true,\"osMismatch\":true,\"mitm\":true},\"guest_cors\":{\"status\":\"matched\",\"carried\":true},\"accountHistory\":{\"calls\":16,\"countries\":1,\"ips\":1,\"rapidCountries\":3,\"hourCountries\":3,\"noAddressReuse\":true,\"aligned\":0,\"exactGap\":false,\"alignedNow\":false,\"networkAccounts\":1,\"networkCapped\":false,\"rotation\":null,\"residentialIsps\":0,\"accountConvicted\":true,\"networkConvicted\":true,\"ipConvicted\":true,\"poolMarked\":true,\"clientApps\":8,\"tier\":\"free\",\"addressClass\":\"fixed_line\",\"signals\":[],\"flags\":[\"account_hour_volume\",\"account_rapid_country_rotation\",\"account_many_countries\",\"account_convicted\",\"network_convicted\",\"pool_address\",\"ip_convicted\",\"account_many_apps\"],\"weight\":0,\"score\":0,\"band\":null}}\"reasonCodes\":\"reasons\":\"label_gates\":\"gate\":\"count\":\"attributes\":\"emailVerified\":\"accountAgeDays\":\"accountCountry\":\"deviceType\":\"email\":\"servedNetwork\":\"publicAccessPoint\":\"servedEnvironment\":\"incognito\":\"privacySettings\":\"virtualMachine\":\"developerTools\":\"tampering\":\"antiDetect\":\"osMismatch\":\"mitm\":\"guest_cors\":\"status\":\"carried\":\"accountConvicted\":\"networkConvicted\":\"ipConvicted\":\"poolMarked\":\"clientApps\":\"request_flags\":\"accountHistory\":\"calls\":\"countries\":\"ips\":\"rapidCountries\":\"hourCountries\":\"noAddressReuse\":\"aligned\":\"exactGap\":\"alignedNow\":\"networkAccounts\":\"networkCapped\":\"rotation\":\"residentialIsps\":\"addressClass\":\"weight\":\"score\":\"band\":\"fraud_label\":\"label_matrix\":\"signals\":\"flags\":\"label\":\"scope\":\"signal\":\"flag\":\"tier\":\"free\",\"fixed_line\",\"page_load_on_json_post\",\"client_hint_contradiction\",\"browser_headers_without_user_agent\",\"hosting_on_unpaid_tier\",\"pre_zstd_headers_on_modern_chrome\",\"upgrade_insecure_requests_on_json_post\",\"hosting_network\",\"tor\",\"vpn\",\"apple_private_relay\",\"old_chrome\",\"grease_brand_mismatch\",\"language_region_mismatch\",\"bare_product_agent_template\",\"missing_ua_gzip_chrome\",\"gzip_only_hinted_chrome\",\"http_client_user_agent\",\"zh_cn_cross_site_windows_chrome\",\"gzip_only_browser_with_evidence\",\"no_human_proof\",\"guest_cors_population\",\"device_type_contradiction\",\"served_bot_memory\",\"geo_witness_memory\",\"dispersed_burst\",\"account_age_new\",\"email_unverified\",\"account_country_mismatch\",\"email_disposable\",\"email_role\",\"email_private_relay\",\"account_network_rotation\",\"account_impossible_travel\",\"country_spread\",\"shared_network\",\"minute_aligned\",\"account_hour_volume\",\"account_convicted\",\"network_convicted\",\"pool_address\",\"ip_convicted\",\"account_many_apps\",\"account_rapid_country_rotation\",\"account_many_countries\",\"established_header_only\",\"evidence\",\"population\",\"true\",\"desktop\",\"matched\",\"chrome_without_hints_or_language_on_hosting\"";
13856
+ const VERDICT_DICTIONARIES = {
13857
+ r1: "[\"User-Agent matched known agent pattern: ChatGPT\",\"ai_agent\",\"incomplete_data\",\"medium\",\"none\",\"not_agent\",\"scraper\",\"unknown\"]{\"version\":1,\"kind\":\"verdict\",\"projectId\":\"\",\"detectionId\":\"\",\"createdAt\":\"\",\"dedupeKey\":\"\",\"row\":{\"ja4\":null,\"geoAsn\":null,\"geoIsp\":null,\"network\":null,\"signals\":null,\"userId\":null,\"geoCity\":null,\"isAgent\":true,\"metadata\":{\"url\":\"\",\"path\":\"\",\"method\":\"POST\",\"source\":\"middleware\",\"isAgent\":true,\"posture\":{\"status\":\"absent\"},\"reasons\":[\"Request did not carry enough signal to classify confidently\"],\"agentType\":\"\",\"enforcement\":{\"action\":\"allow\",\"reason\":\"enforcement_disabled\",\"signals\":[{\"source\":\"user_agent_pattern\",\"weight\":1,\"confidence\":95,\"signalType\":\"pattern\",\"explanation\":\"User-Agent matched known agent pattern: ChatGPT\",\"metadata\":{\"window_seconds\":300,\"requests_per_minute\":0,\"request_count_in_window\":1}}],\"evidence\":[{\"plane\":\"pattern\",\"signal\":\"user_agent_pattern\",\"weight\":1,\"probabilityContribution\":0}],\"agentName\":\"\",\"latencyMs\":16},\"priorIsAgent\":true,\"engineIsAgent\":false,\"postureOutcome\":{\"status\":\"absent\"},\"clientSessionId\":true,\"fusedFromPriorSession\":true,\"shadow_scoring_algorithm\":\"noisy-or-v1\",\"shadow_calibration_method\":\"platt\",\"shadow_noisy_or_confidence\":0,\"shadow_calibrated_confidence\":0,\"riskLevel\":\"high\",\"isAiCrawler\":false,\"verificationMethod\":\"pattern\",\"detection_basis\":\"no_evidence\"},\"pixelId\":\"\",\"buildSha\":null,\"deviceId\":null,\"policyId\":null,\"agentType\":\"\",\"confidence\":100,\"geoRegion\":null,\"ipAddress\":\"\",\"latencyMs\":16,\"projectId\":\"\",\"riskScore\":0,\"sessionId\":\"\",\"userAgent\":\"\",\"engineName\":\"checkpoint-engine-wasm\",\"geoCountry\":null,\"userTraits\":null,\"requestPath\":\"\",\"rulesetHash\":\"\",\"agentTypeId\":null,\"engineExtras\":null,\"agentCategory\":\"ai_assistant\",\"correlationId\":\"\",\"engineVersion\":\"\",\"detectionClass\":\"bot\",\"rulesetVersion\":\"\",\"registryVersion\":null,\"consolidatedSessionId\":\"\"},\"session\":{\"organizationId\":\"\",\"outcome\":\"unverified_agent\",\"verification\":{\"tier\":1,\"vendor\":null,\"protocol\":null,\"source\":null},\"signalStrength\":\"weak\"}}",
13858
+ a1: "[\"Automation Tools\",\"Bot\",\"IncompleteData\",\"Request did not carry enough signal to classify confidently\",\"User-Agent matched known agent pattern: ChatGPT\",\"behavioral\",\"bot\",\"detection/session-velocity-signal\",\"high\",\"incomplete_data\",\"low\",\"none\",\"not_agent\",\"session_velocity\"]{\"success\":true,\"data\":{\"sessionId\":\"\",\"correlationId\":\"\",\"recommendedAction\":\"allow\",\"reason\":\"enforcement_disabled\",\"verdict\":{\"isAgent\":true,\"detectionClass\":\"ai_agent\",\"confidence\":100,\"agentName\":\"\",\"agentType\":\"\",\"reasons\":[\"User-Agent matched known agent pattern: ChatGPT\"],\"basis\":\"no_evidence\"},\"fusedFromPriorSession\":false,\"posture\":{\"status\":\"absent\"},\"detection\":{\"isAgent\":true,\"isBot\":true,\"confidence\":100,\"detectionClass\":{\"type\":\"AiAgent\",\"agentType\":\"\",\"botType\":\"\",\"legitimacy\":\"Suspicious\"},\"signals\":[{\"signalType\":\"pattern\",\"confidence\":95,\"weight\":1,\"source\":\"user_agent_pattern\",\"explanation\":\"1 requests observed from this client in a 300s window (session-velocity heuristic, first-pass scaling, not yet fitted to measured traffic)\",\"metadata\":{\"request_count_in_window\":1,\"requests_per_minute\":0,\"window_seconds\":300}}],\"reasonCodes\":[\"detection/ua-pattern-match\"],\"confidenceLevel\":\"very_high\",\"isAiCrawler\":false,\"riskScore\":0,\"riskScoreSource\":\"uncalibrated\",\"reasons\":[\"User-Agent matched known agent pattern: ChatGPT\"],\"detectedAgent\":{\"type\":\"AI\",\"name\":\"ChatGPT\"},\"agentType\":\"\",\"botType\":\"ChatGPT\",\"verificationMethod\":\"pattern\",\"riskLevel\":\"medium\",\"assurance\":\"anonymous\",\"metadata\":{\"processingTime\":23,\"detection_basis\":\"no_evidence\"},\"timestamp\":\"\"},\"metadata\":{\"processingTime\":23,\"wasmUsed\":true,\"cacheHit\":false}}}",
13859
+ s1: SPOOL_DICTIONARY_S1,
13860
+ s2: `${SPOOL_DICTIONARY_S1},"stale_safari_16_business_hosting","library_ua_on_web_client","automation_ua_on_web_client","truncated_browser_ua","round_the_clock","template_minute_arc","linked_rare_header","new_asn_template","new_country_asn_template","signup_cohort_abroad","mobile_app_new_account_abroad","wave_template_young_account","safari_without_priority_business_hosting","team_trial_new_account","carried":true},"device":{"source":"cookie","recallId":"rc1:"},"carried":true},"device":{"id":"","source":"issued","recallId":"rc1:"},"accountHistory":{"hours":16,"calls":16,"countries":1,"ips":1,"rapidCountries":3`
13861
+ };
13862
+ function isVerdictDictionaryId(id) {
13863
+ return Object.hasOwn(VERDICT_DICTIONARIES, id);
13864
+ }
13865
+
13866
+ //#endregion
13867
+ //#region src/request-flag-registry.ts
13868
+ const REQUEST_FLAG_BITS_VERSION = 1;
13869
+ const REQUEST_FLAG_REGISTRY = [
13870
+ "page_load_on_json_post",
13871
+ "client_hint_contradiction",
13872
+ "browser_headers_without_user_agent",
13873
+ "hosting_on_unpaid_tier",
13874
+ "pre_zstd_headers_on_modern_chrome",
13875
+ "account_three_state",
13876
+ "account_two_jump",
13877
+ "shared_clock_slot",
13878
+ "stable_minute_offset",
13879
+ "aligned_minute_batch",
13880
+ "account_state_rotation",
13881
+ "upgrade_insecure_requests_on_json_post",
13882
+ "hosting_network",
13883
+ "tor",
13884
+ "vpn",
13885
+ "apple_private_relay",
13886
+ "old_chrome",
13887
+ "grease_brand_mismatch",
13888
+ "language_region_mismatch",
13889
+ "bare_product_agent_template",
13890
+ "missing_ua_gzip_chrome",
13891
+ "gzip_only_hinted_chrome",
13892
+ "http_client_user_agent",
13893
+ "zh_cn_cross_site_windows_chrome",
13894
+ "gzip_only_browser_with_evidence",
13895
+ "chrome_without_hints_or_language_on_hosting",
13896
+ "sec_fetch_user_on_background_request",
13897
+ "hosting_old_profile_fingerprint",
13898
+ "no_human_proof",
13899
+ "guest_cors_population",
13900
+ "native_handoff_after_forged_web_editor",
13901
+ "device_type_contradiction",
13902
+ "served_bot_memory",
13903
+ "geo_witness_memory",
13904
+ "dispersed_burst",
13905
+ "account_high_call_volume",
13906
+ "paired_account_coordination",
13907
+ "account_age_new",
13908
+ "email_unverified",
13909
+ "account_country_mismatch",
13910
+ "email_disposable",
13911
+ "email_role",
13912
+ "email_private_relay",
13913
+ "account_network_rotation",
13914
+ "account_impossible_travel",
13915
+ "country_spread",
13916
+ "shared_network",
13917
+ "minute_aligned",
13918
+ "account_convicted",
13919
+ "network_convicted",
13920
+ "pool_address",
13921
+ "ip_convicted",
13922
+ "account_many_apps",
13923
+ "account_rapid_country_rotation",
13924
+ "account_many_countries",
13925
+ "account_hour_volume",
13926
+ "stale_safari_16_business_hosting",
13927
+ "library_ua_on_web_client",
13928
+ "automation_ua_on_web_client",
13929
+ "truncated_browser_ua",
13930
+ "round_the_clock",
13931
+ "template_minute_arc",
13932
+ "linked_rare_header",
13933
+ "new_asn_template",
13934
+ "new_country_asn_template",
13935
+ "signup_cohort_abroad",
13936
+ "mobile_app_new_account_abroad",
13937
+ "wave_template_young_account",
13938
+ "safari_without_priority_business_hosting",
13939
+ "team_trial_new_account",
13940
+ "many_templates",
13941
+ "stale_safari_16",
13942
+ "mobile_app_on_hosting",
13943
+ "ua_new",
13944
+ "ua_young",
13945
+ "email_fan",
13946
+ "heavy_days",
13947
+ "country_days",
13948
+ "night_days",
13949
+ "net_pingpong",
13950
+ "lang_3way",
13951
+ "net24_days_15",
13952
+ "interleave_country_30m",
13953
+ "night_16_50",
13954
+ "sibling_client",
13955
+ "guest_scatter",
13956
+ "burst_5",
13957
+ "app_ua_on_web",
13958
+ "session_age_96h",
13959
+ "bare_lang_chromium",
13960
+ "rapid_pairs",
13961
+ "young_paid_business_hosting_heavy_8",
13962
+ "safari_26_without_priority",
13963
+ "old_account_abroad_new_country",
13964
+ "rtc16_two_days",
13965
+ "rtc20_prior_carry_7d",
13966
+ "template_majority_b_95",
13967
+ "same_template_3_clients",
13968
+ "two_operators_10s",
13969
+ "script_defaults_browser_ua",
13970
+ "agent_carry_web",
13971
+ "sync_group3",
13972
+ "aged_batch_lang",
13973
+ "two_addresses_10s",
13974
+ "flip_ladder",
13975
+ "flip_ua_10s",
13976
+ "storage_access_header",
13977
+ "account_all_new",
13978
+ "node_defaults_browser_ua",
13979
+ "oprot3",
13980
+ "oprot4",
13981
+ "oprotapp3",
13982
+ "noreuse4",
13983
+ "noreuse3",
13984
+ "apps4",
13985
+ "wnoreuse5"
13986
+ ];
13987
+
13988
+ //#endregion
13989
+ //#region src/request-flag-bits.ts
13990
+ const REQUEST_FLAG_BITS_FIELD = "request_flag_bits";
13991
+ const UNKNOWN_FLAG_BIT_PREFIX = "bit:";
13992
+ const FLAG_INDEX = new Map(REQUEST_FLAG_REGISTRY.map((name, index) => [name, index]));
13993
+ const VERSION_PATTERN = /^\d+$/;
13994
+ const PAYLOAD_PATTERN = /^[A-Za-z0-9_-]*$/;
13995
+ const BITS_PER_BYTE = 8;
13996
+ function packRequestFlags(flags) {
13997
+ const indexes = /* @__PURE__ */ new Set();
13998
+ const rest = [];
13999
+ for (const flag of flags) {
14000
+ const index = FLAG_INDEX.get(flag);
14001
+ if (index === void 0) rest.push(flag);
14002
+ else indexes.add(index);
14003
+ }
14004
+ if (indexes.size === 0) return {
14005
+ bits: "",
14006
+ rest
14007
+ };
14008
+ const used = Math.floor(Math.max(...indexes) / BITS_PER_BYTE) + 1;
14009
+ const bytes = Uint8Array.from({ length: used }, (_, byte) => {
14010
+ let value = 0;
14011
+ for (let bit = 0; bit < BITS_PER_BYTE; bit += 1) if (indexes.has(byte * BITS_PER_BYTE + bit)) value |= 1 << bit;
14012
+ return value;
14013
+ });
14014
+ return {
14015
+ bits: `${1}:${require_base64url.bytesToBase64Url(bytes)}`,
14016
+ rest
14017
+ };
14018
+ }
14019
+ function unpackRequestFlags(bits) {
14020
+ const separator = bits.indexOf(":");
14021
+ const versionText = bits.slice(0, separator);
14022
+ const payload = bits.slice(separator + 1);
14023
+ if (separator < 1 || !VERSION_PATTERN.test(versionText) || !PAYLOAD_PATTERN.test(payload)) return { failure: "corrupt" };
14024
+ const version = Number(versionText);
14025
+ if (version !== 1) return {
14026
+ failure: "version",
14027
+ version
14028
+ };
14029
+ let bytes;
14030
+ try {
14031
+ bytes = require_base64url.base64UrlToBytes(payload);
14032
+ } catch {
14033
+ return { failure: "corrupt" };
14034
+ }
14035
+ const flags = [];
14036
+ bytes.forEach((byte, offset) => {
14037
+ for (let bit = 0; bit < BITS_PER_BYTE; bit += 1) {
14038
+ if ((byte & 1 << bit) === 0) continue;
14039
+ const index = offset * BITS_PER_BYTE + bit;
14040
+ flags.push(REQUEST_FLAG_REGISTRY[index] ?? `${"bit:"}${index}`);
14041
+ }
14042
+ });
14043
+ return { flags };
14044
+ }
14045
+
14046
+ //#endregion
14047
+ //#region src/verdict-rules/bounds.ts
14048
+ const VERDICT_RULES_BOUNDS = {
14049
+ greatCircleKm: 20040,
14050
+ shadowMemoryMs: 72e5,
14051
+ shadowHistoryMs: 36e5,
14052
+ shadowTimeoutMs: 75,
14053
+ shadowWriteDeadlineMs: 150,
14054
+ shadowClockSkewMs: 5e3,
14055
+ shadowObservations: 12,
14056
+ minutePeriodMs: 6e4,
14057
+ twoJumpPriorAgeMs: 36e5,
14058
+ schedulerAccounts: 64,
14059
+ schedulerReorderToleranceMs: 1e3,
14060
+ schedulerPatternSlackMs: 1e4
14061
+ };
14062
+
13508
14063
  //#endregion
13509
14064
  //#region src/index.ts
13510
14065
  const VERSION = "0.1.0";
@@ -13582,7 +14137,6 @@ exports.BLOCKED_PATH = require_host_adapter.BLOCKED_PATH;
13582
14137
  exports.BOT_USER_AGENT_PATTERNS = BOT_USER_AGENT_PATTERNS;
13583
14138
  exports.BOUNCER_LOWERCASE_ERRORS = BOUNCER_LOWERCASE_ERRORS;
13584
14139
  exports.BOUNCER_UPPERCASE_ERRORS = BOUNCER_UPPERCASE_ERRORS;
13585
- exports.BROWSER_PATTERNS = require_patterns.BROWSER_PATTERNS;
13586
14140
  exports.BULK_ERROR_CODES = BULK_ERROR_CODES;
13587
14141
  exports.BaseAuthProviderSchema = BaseAuthProviderSchema;
13588
14142
  exports.BaseBulkRequestSchema = BaseBulkRequestSchema;
@@ -13598,8 +14152,6 @@ exports.BehavioralThresholdSchema = BehavioralThresholdSchema;
13598
14152
  exports.BindingStatusSchema = BindingStatusSchema;
13599
14153
  exports.BlockEventSchema = BlockEventSchema;
13600
14154
  exports.BlockReasonSchema = require_schemas$1.BlockReasonSchema;
13601
- exports.BotPatternSchema = BotPatternSchema;
13602
- exports.BotTypeSchema = BotTypeSchema;
13603
14155
  exports.BouncerConfigSchema = BouncerConfigSchema;
13604
14156
  exports.BulkDeletePreviewStatsSchema = BulkDeletePreviewStatsSchema;
13605
14157
  exports.BulkDeleteResponseSchema = BulkDeleteResponseSchema;
@@ -13651,6 +14203,7 @@ exports.ConfigureLinearInstallationV2Schema = ConfigureLinearInstallationV2Schem
13651
14203
  exports.ConfigureTaskSourceInstallationSchema = ConfigureTaskSourceInstallationSchema;
13652
14204
  exports.ConfiguredProviderSchema = ConfiguredProviderSchema;
13653
14205
  exports.ConsentAgentMetadataSchema = ConsentAgentMetadataSchema;
14206
+ exports.ConsentAssuranceNotesSchema = ConsentAssuranceNotesSchema;
13654
14207
  exports.ConsentBrandingSchema = ConsentBrandingSchema;
13655
14208
  exports.ConsentCapabilityGroupSchema = ConsentCapabilityGroupSchema;
13656
14209
  exports.ConsentCapabilitySchema = ConsentCapabilitySchema;
@@ -13690,6 +14243,7 @@ exports.DEPLOY_STEPS = DEPLOY_STEPS;
13690
14243
  exports.DETECTION_ERRORS = DETECTION_ERRORS;
13691
14244
  exports.DETECTION_LIMITS = DETECTION_LIMITS;
13692
14245
  exports.DETECTION_REASON_CODES = require_detection_reason_mapping.DETECTION_REASON_CODES;
14246
+ exports.DETECTION_REQUEST_LIMITS = DETECTION_REQUEST_LIMITS;
13693
14247
  exports.DashboardStatsRequestSchema = DashboardStatsRequestSchema;
13694
14248
  exports.DatabaseDetectionMetadataSchema = DatabaseDetectionMetadataSchema;
13695
14249
  exports.DecisionSchema = require_schemas$1.DecisionSchema;
@@ -13751,6 +14305,7 @@ exports.EnforcementModeSchema = require_schemas$1.EnforcementModeSchema;
13751
14305
  exports.EngineInfoSchema = EngineInfoSchema;
13752
14306
  exports.EnrollWorkloadSchema = EnrollWorkloadSchema;
13753
14307
  exports.ErrorResponseSchema = ErrorResponseSchema;
14308
+ exports.EventCountLimitsSettingSchema = EventCountLimitsSettingSchema;
13754
14309
  exports.EventTrackingRequestSchema = EventTrackingRequestSchema;
13755
14310
  exports.EventTrackingResponseSchema = EventTrackingResponseSchema;
13756
14311
  exports.ExportAnalyticsSchema = ExportAnalyticsSchema;
@@ -13770,7 +14325,6 @@ exports.GrowthConfigurationThresholdsSchema = GrowthConfigurationThresholdsSchem
13770
14325
  exports.GrowthConfigurationUpdateSchema = GrowthConfigurationUpdateSchema;
13771
14326
  exports.GrowthOpportunitiesQuerySchema = GrowthOpportunitiesQuerySchema;
13772
14327
  exports.GrowthOpportunityUpdateSchema = GrowthOpportunityUpdateSchema;
13773
- exports.HEADER_PATTERNS = require_patterns.HEADER_PATTERNS;
13774
14328
  exports.HeaderRuleSchema = HeaderRuleSchema;
13775
14329
  exports.HeaderRulesSchema = HeaderRulesSchema;
13776
14330
  exports.HealthResponseSchema = HealthResponseSchema;
@@ -13787,8 +14341,11 @@ exports.ImmutableArtifactLocatorSchema = ImmutableArtifactLocatorSchema;
13787
14341
  exports.ImportIssueV2Schema = ImportIssueV2Schema;
13788
14342
  exports.InstructPayloadSchema = require_schemas$1.InstructPayloadSchema;
13789
14343
  exports.IntegrationTypeSchema = IntegrationTypeSchema;
14344
+ exports.IpEventCountsSchema = IpEventCountsSchema;
13790
14345
  exports.IpRangeCollectionSchema = IpRangeCollectionSchema;
13791
14346
  exports.IpRangeRuleSchema = IpRangeRuleSchema;
14347
+ exports.IpReputationSchema = IpReputationSchema;
14348
+ exports.IpRoutingTypeSchema = IpRoutingTypeSchema;
13792
14349
  exports.IssueTaskGrantSchema = IssueTaskGrantSchema;
13793
14350
  exports.JafarParseError = JafarParseError;
13794
14351
  exports.KNOWN_AGENT_PATTERNS = KNOWN_AGENT_PATTERNS;
@@ -13834,7 +14391,6 @@ exports.MAX_TASK_GRANT_DEPTH = MAX_TASK_GRANT_DEPTH;
13834
14391
  exports.MCPI_HASHED_USER_ID_PREFIX = MCPI_HASHED_USER_ID_PREFIX;
13835
14392
  exports.MCPI_ORG_DID_HOST = MCPI_ORG_DID_HOST;
13836
14393
  exports.MCP_CLIENT_DID_HOST = MCP_CLIENT_DID_HOST;
13837
- exports.MOBILE_PATTERNS = require_patterns.MOBILE_PATTERNS;
13838
14394
  exports.ManagementAccessTokenSchema = ManagementAccessTokenSchema;
13839
14395
  exports.ManagementAuthorizeQuerySchema = ManagementAuthorizeQuerySchema;
13840
14396
  exports.ManagementConsentContextSchema = ManagementConsentContextSchema;
@@ -13889,7 +14445,6 @@ exports.OAuthProviderMetadataSchema = OAuthProviderMetadataSchema;
13889
14445
  exports.OAuthProviderTypeSchema = OAuthProviderTypeSchema;
13890
14446
  exports.OAuthProvidersMapSchema = OAuthProvidersMapSchema;
13891
14447
  exports.OAuthTokensResponseSchema = OAuthTokensResponseSchema;
13892
- exports.OS_PATTERNS = require_patterns.OS_PATTERNS;
13893
14448
  exports.OrganizationErrorCode = OrganizationErrorCode;
13894
14449
  exports.OrganizationIdSchema = OrganizationIdSchema;
13895
14450
  exports.OrganizationRoleSchema = OrganizationRoleSchema;
@@ -13923,6 +14478,7 @@ exports.PixelsBulkDeleteItemSchema = PixelsBulkDeleteItemSchema;
13923
14478
  exports.PixelsBulkRequestSchema = PixelsBulkRequestSchema;
13924
14479
  exports.PixelsBulkUpdateItemSchema = PixelsBulkUpdateItemSchema;
13925
14480
  exports.PixelsQuerySchema = PixelsQuerySchema;
14481
+ exports.PolicyAuthError = require_policy_fetcher.PolicyAuthError;
13926
14482
  exports.PolicyConditionSchema = require_schemas$1.PolicyConditionSchema;
13927
14483
  exports.PolicyConfigSchema = require_schemas$1.PolicyConfigSchema;
13928
14484
  exports.PolicyFetcher = require_policy_fetcher.PolicyFetcher;
@@ -13960,6 +14516,12 @@ exports.READABLE_TEXT_MESSAGE = READABLE_TEXT_MESSAGE;
13960
14516
  exports.REGISTERED_SID_MAX_LENGTH = require_registered_sid.REGISTERED_SID_MAX_LENGTH;
13961
14517
  exports.REPORT_AI_AGENT_NAMES = REPORT_AI_AGENT_NAMES;
13962
14518
  exports.REPORT_AI_CRAWLER_NAMES = REPORT_AI_CRAWLER_NAMES;
14519
+ exports.REQUEST_FLAG_BITS_FIELD = REQUEST_FLAG_BITS_FIELD;
14520
+ exports.REQUEST_FLAG_BITS_VERSION = REQUEST_FLAG_BITS_VERSION;
14521
+ exports.REQUEST_FLAG_KINDS = REQUEST_FLAG_KINDS;
14522
+ exports.REQUEST_FLAG_REGISTRY = REQUEST_FLAG_REGISTRY;
14523
+ exports.REQUEST_LABELLING_FLAGS = REQUEST_LABELLING_FLAGS;
14524
+ exports.REQUEST_LABELLING_FLAG_KINDS = REQUEST_LABELLING_FLAG_KINDS;
13963
14525
  exports.RESOURCE_ERRORS = RESOURCE_ERRORS;
13964
14526
  exports.RULESET_HASH_REGEX = require_ruleset_hash.RULESET_HASH_REGEX;
13965
14527
  exports.RULE_CATEGORIES = RULE_CATEGORIES;
@@ -13981,8 +14543,12 @@ exports.ReportedAgentSchema = ReportedAgentSchema;
13981
14543
  exports.ReportedDelegationSchema = ReportedDelegationSchema;
13982
14544
  exports.ReportedIdentitySchema = ReportedIdentitySchema;
13983
14545
  exports.ReportedPrincipalSchema = ReportedPrincipalSchema;
14546
+ exports.ReportedProxyTypeSchema = ReportedProxyTypeSchema;
13984
14547
  exports.RepositoryIdentitySchema = RepositoryIdentitySchema;
13985
14548
  exports.RequestContextSchema = RequestContextSchema;
14549
+ exports.RequestFlagLabelMatrixEntrySchema = RequestFlagLabelMatrixEntrySchema;
14550
+ exports.RequestFlagLabelMatrixSchema = RequestFlagLabelMatrixSchema;
14551
+ exports.RequestFlagLabelMatrixWriteSchema = RequestFlagLabelMatrixWriteSchema;
13986
14552
  exports.RevokeModelCredentialSchema = RevokeModelCredentialSchema;
13987
14553
  exports.RevokeProvisionQuerySchema = RevokeProvisionQuerySchema;
13988
14554
  exports.RevokeProvisionResponseSchema = RevokeProvisionResponseSchema;
@@ -14003,11 +14569,19 @@ exports.SECURITY_LIMITS = SECURITY_LIMITS;
14003
14569
  exports.SERVICE_TRAFFIC_KEYS = SERVICE_TRAFFIC_KEYS;
14004
14570
  exports.SESSION_ERRORS = SESSION_ERRORS;
14005
14571
  exports.SESSION_LIMITS = SESSION_LIMITS;
14572
+ exports.SESSION_VELOCITY_BUCKET_MS = SESSION_VELOCITY_BUCKET_MS;
14573
+ exports.SESSION_VELOCITY_BUCKET_SECONDS = SESSION_VELOCITY_BUCKET_SECONDS;
14574
+ exports.SESSION_VELOCITY_EXPIRY_SKEW_SECONDS = SESSION_VELOCITY_EXPIRY_SKEW_SECONDS;
14575
+ exports.SESSION_VELOCITY_PARTITIONS = SESSION_VELOCITY_PARTITIONS;
14576
+ exports.SESSION_VELOCITY_SKETCH_COLUMNS = SESSION_VELOCITY_SKETCH_COLUMNS;
14577
+ exports.SESSION_VELOCITY_SKETCH_COLUMN_HEX_DIGITS = SESSION_VELOCITY_SKETCH_COLUMN_HEX_DIGITS;
14578
+ exports.SESSION_VELOCITY_SKETCH_COUNTER_MAX = SESSION_VELOCITY_SKETCH_COUNTER_MAX;
14579
+ exports.SESSION_VELOCITY_SKETCH_ROWS = SESSION_VELOCITY_SKETCH_ROWS;
14580
+ exports.SESSION_VELOCITY_WRITE_COUNTER_INDEX = SESSION_VELOCITY_WRITE_COUNTER_INDEX;
14006
14581
  exports.SHADOW_NOISY_OR_CONFIDENCE_KEY = SHADOW_NOISY_OR_CONFIDENCE_KEY;
14007
14582
  exports.SID_ATTRIBUTABLE_RESULT = require_registered_sid.SID_ATTRIBUTABLE_RESULT;
14008
14583
  exports.SLUG_REGEX = SLUG_REGEX;
14009
14584
  exports.SUSPICIOUS_HEADERS = SUSPICIOUS_HEADERS;
14010
- exports.SUSPICIOUS_PATTERNS = require_patterns.SUSPICIOUS_PATTERNS;
14011
14585
  exports.ScopeSchema = ScopeSchema;
14012
14586
  exports.ScrollEventSchema = ScrollEventSchema;
14013
14587
  exports.SdkSessionDataSchema = SdkSessionDataSchema;
@@ -14033,11 +14607,11 @@ exports.StatsUpdateEventSchema = StatsUpdateEventSchema;
14033
14607
  exports.SuggestedActionSchema = require_schemas$1.SuggestedActionSchema;
14034
14608
  exports.TASK_ADMISSION_PROTOCOLS = TASK_ADMISSION_PROTOCOLS;
14035
14609
  exports.TASK_ADMISSION_RESEND = TASK_ADMISSION_RESEND;
14610
+ exports.TIMEZONE_COUNTRY_MAP = require_timezone_country.TIMEZONE_COUNTRY_MAP;
14036
14611
  exports.TIME_WINDOWS = TIME_WINDOWS;
14037
14612
  exports.TLSFingerprintSchema = TLSFingerprintSchema;
14038
14613
  exports.TRADITIONAL_BOT_PATTERNS = TRADITIONAL_BOT_PATTERNS;
14039
14614
  exports.TRAFFIC_TAXONOMY_BUCKETS = TRAFFIC_TAXONOMY_BUCKETS;
14040
- exports.TRUSTED_BOTS = TRUSTED_BOTS;
14041
14615
  exports.TaskAdmissionProtocolSchema = TaskAdmissionProtocolSchema;
14042
14616
  exports.TaskGrantAdmissionRequestSchema = TaskGrantAdmissionRequestSchema;
14043
14617
  exports.TaskGrantAdmissionSchema = TaskGrantAdmissionSchema;
@@ -14094,9 +14668,9 @@ exports.TrackDependencyV2Schema = TrackDependencyV2Schema;
14094
14668
  exports.TrackingReadinessReasonCodeSchema = TrackingReadinessReasonCodeSchema;
14095
14669
  exports.TrackingReadinessSchema = TrackingReadinessSchema;
14096
14670
  exports.UNCALIBRATED_NOISY_OR_PRIOR = UNCALIBRATED_NOISY_OR_PRIOR;
14671
+ exports.UNKNOWN_FLAG_BIT_PREFIX = UNKNOWN_FLAG_BIT_PREFIX;
14097
14672
  exports.UNNAMED_AGENT_LABEL = UNNAMED_AGENT_LABEL;
14098
14673
  exports.UPDATE_FREQUENCIES = UPDATE_FREQUENCIES;
14099
- exports.USER_AGENT_PATTERNS = require_patterns.USER_AGENT_PATTERNS;
14100
14674
  exports.UUID_PATTERN = require_patterns.UUID_PATTERN;
14101
14675
  exports.UpdateApiKeySchema = UpdateApiKeySchema;
14102
14676
  exports.UpdateBouncerConfigSchema = UpdateBouncerConfigSchema;
@@ -14112,7 +14686,10 @@ exports.VALIDATION_ERRORS = VALIDATION_ERRORS;
14112
14686
  exports.VALIDATION_MODES = VALIDATION_MODES;
14113
14687
  exports.VALIDATION_PATTERNS = require_patterns.VALIDATION_PATTERNS;
14114
14688
  exports.VAULT_ERRORS = VAULT_ERRORS;
14689
+ exports.VELOCITY_ESCALATION_FLOORS = VELOCITY_ESCALATION_FLOORS;
14115
14690
  exports.VERDICT_COOKIE_NAME = require_host_adapter.VERDICT_COOKIE_NAME;
14691
+ exports.VERDICT_DICTIONARIES = VERDICT_DICTIONARIES;
14692
+ exports.VERDICT_RULES_BOUNDS = VERDICT_RULES_BOUNDS;
14116
14693
  exports.VERSION = VERSION;
14117
14694
  exports.VerdictEvidenceSchema = VerdictEvidenceSchema;
14118
14695
  exports.VerificationRequestSchema = VerificationRequestSchema;
@@ -14151,9 +14728,12 @@ exports.buildKnownPatternLookup = buildKnownPatternLookup;
14151
14728
  exports.buildVerdictEvidence = buildVerdictEvidence;
14152
14729
  exports.calculateDeployProgress = calculateDeployProgress;
14153
14730
  exports.cedarQuotedValueRegExp = require_step_up.cedarQuotedValueRegExp;
14731
+ exports.checkTimezoneCountryContradiction = require_timezone_country.checkTimezoneCountryContradiction;
14154
14732
  exports.classifyAgentTaxonomy = classifyAgentTaxonomy;
14155
14733
  exports.classifyResponseShape = require_host_adapter.classifyResponseShape;
14156
14734
  exports.claudeRuntimeLabel = claudeRuntimeLabel;
14735
+ exports.compareForwardedChainShadow = require_client_ip.compareForwardedChainShadow;
14736
+ exports.compileEmbeddedVerdictRules = compileEmbeddedVerdictRules;
14157
14737
  exports.compressIpv6 = require_client_ip.compressIpv6;
14158
14738
  exports.computeEntropyConfidence = computeEntropyConfidence;
14159
14739
  exports.contractDigest = contractDigest;
@@ -14175,6 +14755,8 @@ exports.deriveMcpiUserDid = deriveMcpiUserDid;
14175
14755
  exports.deriveVerdict = require_host_adapter.deriveVerdict;
14176
14756
  exports.detectionClassToEnum = require_host_adapter.detectionClassToEnum;
14177
14757
  exports.discoveredToolSchema = discoveredToolSchema;
14758
+ exports.embeddedVerdictRules = embeddedVerdictRules;
14759
+ exports.embeddedVerdictRulesSha256 = embeddedVerdictRulesSha256;
14178
14760
  exports.encodeDidKeyEd25519 = encodeDidKeyEd25519;
14179
14761
  exports.encodeEd25519PublicKeyMultibase = encodeEd25519PublicKeyMultibase;
14180
14762
  exports.encodeVerdictCookie = require_host_adapter.encodeVerdictCookie;
@@ -14198,7 +14780,6 @@ exports.gatewayInternalToolsListSchema = gatewayInternalToolsListSchema;
14198
14780
  exports.gatewayToolCallSchema = gatewayToolCallSchema;
14199
14781
  exports.generateDelegationSid = require_host_adapter.generateDelegationSid;
14200
14782
  exports.generateTestId = generateTestId;
14201
- exports.getBotType = getBotType;
14202
14783
  exports.getCategoryBadgeVariant = getCategoryBadgeVariant;
14203
14784
  exports.getCategoryColor = getCategoryColor;
14204
14785
  exports.getConfidenceLevel = getConfidenceLevel;
@@ -14231,18 +14812,19 @@ exports.isLegitimateCategory = isLegitimateCategory;
14231
14812
  exports.isLimitExceeded = isLimitExceeded;
14232
14813
  exports.isMcpiOrgKeyId = isMcpiOrgKeyId;
14233
14814
  exports.isNonNavigablePolicyId = require_step_up.isNonNavigablePolicyId;
14815
+ exports.isPolicyAuthError = require_policy_fetcher.isPolicyAuthError;
14234
14816
  exports.isPolicyUnavailableError = require_policy_fetcher.isPolicyUnavailableError;
14235
14817
  exports.isPrivateOrReservedHost = isPrivateOrReservedHost;
14236
- exports.isTraditionalBot = isTraditionalBot;
14237
14818
  exports.isUnderAuthDomain = require_default_sign_in_host.isUnderAuthDomain;
14238
14819
  exports.isValidAuthorizationHost = isValidAuthorizationHost;
14239
14820
  exports.isValidMcpiOrgSlug = isValidMcpiOrgSlug;
14821
+ exports.isVerdictDictionaryId = isVerdictDictionaryId;
14240
14822
  exports.lintMissingBaselinePermit = lintMissingBaselinePermit;
14241
14823
  exports.lintUnnarrowedDenyRules = lintUnnarrowedDenyRules;
14242
14824
  exports.loadRulesAsync = loadRulesAsync;
14243
14825
  exports.mapDetectionToReasonCodes = require_detection_reason_mapping.mapDetectionToReasonCodes;
14244
14826
  exports.mapLegacyAuthType = mapLegacyAuthType;
14245
- exports.mapProxyAssertions = mapProxyAssertions;
14827
+ exports.mapProxyAssertions = require_proxy_assertion_mapping.mapProxyAssertions;
14246
14828
  exports.mapToLegacyAuthType = mapToLegacyAuthType;
14247
14829
  exports.matchPath = require_step_up.matchPath;
14248
14830
  exports.mcpiOrgKeyFragment = mcpiOrgKeyFragment;
@@ -14263,6 +14845,7 @@ exports.normalizePostureReportPath = normalizePostureReportPath;
14263
14845
  exports.normalizeStoredAllowedDomain = normalizeStoredAllowedDomain;
14264
14846
  exports.normalizeWireMethod = require_verification.normalizeWireMethod;
14265
14847
  exports.oauthClientSchema = oauthClientSchema;
14848
+ exports.packRequestFlags = packRequestFlags;
14266
14849
  exports.parseAcceptedArtifactRevision = parseAcceptedArtifactRevision;
14267
14850
  exports.parseCedarStatements = require_step_up.parseCedarStatements;
14268
14851
  exports.parseClaimVerification = parseClaimVerification;
@@ -14280,9 +14863,12 @@ exports.projectResetRequestSchema = projectResetRequestSchema;
14280
14863
  exports.readBodyBounded = require_registered_sid.readBodyBounded;
14281
14864
  exports.readPostureReportPathsSetting = readPostureReportPathsSetting;
14282
14865
  exports.readableText = readableText;
14866
+ exports.reasonCodeForSignalSource = require_detection_reason_mapping.reasonCodeForSignalSource;
14283
14867
  exports.reconstructConfidenceFromEvidence = reconstructConfidenceFromEvidence;
14284
14868
  exports.refineClaudeDisplayLabel = refineClaudeDisplayLabel;
14285
14869
  exports.refineSessionGrainClaudeLabel = refineSessionGrainClaudeLabel;
14870
+ exports.relayedRequestTarget = require_registered_sid.relayedRequestTarget;
14871
+ exports.reportedProxyType = reportedProxyType;
14286
14872
  exports.requestCarriesDelegationProof = require_registered_sid.requestCarriesDelegationProof;
14287
14873
  exports.requestDeclaresBody = require_registered_sid.requestDeclaresBody;
14288
14874
  exports.requestPresentedCredential = require_registered_sid.requestPresentedCredential;
@@ -14293,7 +14879,9 @@ exports.resolveAuthorizationHost = resolveAuthorizationHost;
14293
14879
  exports.resolveBotSignals = require_host_adapter.resolveBotSignals;
14294
14880
  exports.resolveChallengeContext = require_host_adapter.resolveChallengeContext;
14295
14881
  exports.resolveClientIp = require_client_ip.resolveClientIp;
14882
+ exports.resolveForwardedChainShadow = require_client_ip.resolveForwardedChainShadow;
14296
14883
  exports.resolveObservedClientAddress = require_client_ip.resolveObservedClientAddress;
14884
+ exports.resolveTimezoneCountry = require_timezone_country.resolveTimezoneCountry;
14297
14885
  exports.resolveTrustedDelegationRoots = resolveTrustedDelegationRoots;
14298
14886
  exports.riskScoreColumnValue = riskScoreColumnValue;
14299
14887
  exports.riskScoreFromMetadata = riskScoreFromMetadata;
@@ -14302,6 +14890,11 @@ exports.safeParsePolicyConfig = require_schemas$1.safeParsePolicyConfig;
14302
14890
  exports.safeUrl = safeUrl;
14303
14891
  exports.selectBodyReadable200 = require_host_adapter.selectBodyReadable200;
14304
14892
  exports.serveBodyReadable200 = require_host_adapter.serveBodyReadable200;
14893
+ exports.sessionVelocityBucket = sessionVelocityBucket;
14894
+ exports.sessionVelocityBucketStart = sessionVelocityBucketStart;
14895
+ exports.sessionVelocityExpirySeconds = sessionVelocityExpirySeconds;
14896
+ exports.sessionVelocityPartition = sessionVelocityPartition;
14897
+ exports.sessionVelocitySketchCells = sessionVelocitySketchCells;
14305
14898
  exports.splitCedarBlocks = require_step_up.splitCedarBlocks;
14306
14899
  exports.statementApplies = require_step_up.statementApplies;
14307
14900
  exports.statementId = require_step_up.statementId;
@@ -14317,6 +14910,7 @@ exports.toCoarseReasonKind = toCoarseReasonKind;
14317
14910
  exports.toPercent = toPercent;
14318
14911
  exports.toStoredCorrelationId = toStoredCorrelationId;
14319
14912
  exports.unescapeCedarString = require_step_up.unescapeCedarString;
14913
+ exports.unpackRequestFlags = unpackRequestFlags;
14320
14914
  exports.updateStepsState = updateStepsState;
14321
14915
  exports.upstreamDiscoveryErrorSchema = upstreamDiscoveryErrorSchema;
14322
14916
  exports.upstreamServerInputSchema = upstreamServerInputSchema;
@@ -14332,6 +14926,7 @@ exports.vaultResolveErrorSchema = vaultResolveErrorSchema;
14332
14926
  exports.vaultResolveMetaSchema = vaultResolveMetaSchema;
14333
14927
  exports.vaultResolveResponseSchema = vaultResolveResponseSchema;
14334
14928
  exports.vaultResolveSuccessSchema = vaultResolveSuccessSchema;
14929
+ exports.verdictShardIndexFor = verdictShardIndexFor;
14335
14930
  exports.verifyContractRecordIdentity = verifyContractRecordIdentity;
14336
14931
  exports.withNoEvidenceExclusion = require_step_up.withNoEvidenceExclusion;
14337
14932
  exports.withoutTrailingDots = require_default_sign_in_host.withoutTrailingDots;