@kya-os/checkpoint-shared 1.7.0 → 1.9.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 (277) hide show
  1. package/CHANGELOG.md +159 -9
  2. package/README.md +24 -7
  3. package/dist/agent-catalog.d.mts +12 -0
  4. package/dist/agent-catalog.d.mts.map +1 -0
  5. package/dist/agent-catalog.d.ts +12 -0
  6. package/dist/agent-catalog.d.ts.map +1 -0
  7. package/dist/agent-catalog.js +105 -0
  8. package/dist/agent-catalog.mjs +105 -0
  9. package/dist/agent-catalog.mjs.map +1 -0
  10. package/dist/beacon-nonce/index.d.mts +1 -0
  11. package/dist/beacon-nonce/index.d.mts.map +1 -1
  12. package/dist/beacon-nonce/index.d.ts +1 -0
  13. package/dist/beacon-nonce/index.d.ts.map +1 -1
  14. package/dist/beacon-nonce/index.js +9 -3
  15. package/dist/beacon-nonce/index.mjs +9 -4
  16. package/dist/beacon-nonce/index.mjs.map +1 -1
  17. package/dist/beacon-types/index.d.mts +41 -1
  18. package/dist/beacon-types/index.d.mts.map +1 -1
  19. package/dist/beacon-types/index.d.ts +41 -1
  20. package/dist/beacon-types/index.d.ts.map +1 -1
  21. package/dist/beacon-types/index.js +153 -4
  22. package/dist/beacon-types/index.mjs +139 -4
  23. package/dist/beacon-types/index.mjs.map +1 -1
  24. package/dist/{browser-posture-BLhw-MON.d.mts → browser-posture-5fPrsxx7.d.mts} +6 -6
  25. package/dist/{browser-posture-BLhw-MON.d.mts.map → browser-posture-5fPrsxx7.d.mts.map} +1 -1
  26. package/dist/{browser-posture-B8YiPa5c.d.ts → browser-posture-CCR1kh5e.d.ts} +6 -6
  27. package/dist/{browser-posture-B8YiPa5c.d.ts.map → browser-posture-CCR1kh5e.d.ts.map} +1 -1
  28. package/dist/browser-posture-cookie.js +1 -1
  29. package/dist/browser-posture-cookie.mjs +1 -1
  30. package/dist/browser-posture-cookie.mjs.map +1 -1
  31. package/dist/browser-posture-proof-verifier-DvsOmFrM.js +202 -0
  32. package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs +180 -0
  33. package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs.map +1 -0
  34. package/dist/browser-posture-proof-verifier.d.mts +25 -0
  35. package/dist/browser-posture-proof-verifier.d.mts.map +1 -0
  36. package/dist/browser-posture-proof-verifier.d.ts +25 -0
  37. package/dist/browser-posture-proof-verifier.d.ts.map +1 -0
  38. package/dist/browser-posture-proof-verifier.js +7 -0
  39. package/dist/browser-posture-proof-verifier.mjs +3 -0
  40. package/dist/browser-posture-proof.d.mts +4 -5
  41. package/dist/browser-posture-proof.d.mts.map +1 -1
  42. package/dist/browser-posture-proof.d.ts +4 -5
  43. package/dist/browser-posture-proof.d.ts.map +1 -1
  44. package/dist/browser-posture-proof.js +10 -79
  45. package/dist/browser-posture-proof.mjs +6 -77
  46. package/dist/browser-posture-proof.mjs.map +1 -1
  47. package/dist/browser-posture.d.mts +1 -1
  48. package/dist/browser-posture.d.ts +1 -1
  49. package/dist/browser-posture.js +6 -5
  50. package/dist/browser-posture.mjs +4 -3
  51. package/dist/browser-posture.mjs.map +1 -1
  52. package/dist/browser.d.mts +25 -286
  53. package/dist/browser.d.mts.map +1 -1
  54. package/dist/browser.d.ts +25 -286
  55. package/dist/browser.d.ts.map +1 -1
  56. package/dist/browser.js +1 -1
  57. package/dist/browser.mjs +1 -1
  58. package/dist/browser.mjs.map +1 -1
  59. package/dist/canonical-signer/index.js +30 -28
  60. package/dist/canonical-signer/index.mjs +31 -1
  61. package/dist/canonical-signer/index.mjs.map +1 -1
  62. package/dist/clearance.d.mts +1 -1
  63. package/dist/clearance.d.ts +1 -1
  64. package/dist/clearance.js +2 -2
  65. package/dist/clearance.mjs +2 -2
  66. package/dist/client-ip-B7w-uHfS.d.mts +55 -0
  67. package/dist/client-ip-B7w-uHfS.d.mts.map +1 -0
  68. package/dist/client-ip-B7w-uHfS.d.ts +55 -0
  69. package/dist/client-ip-B7w-uHfS.d.ts.map +1 -0
  70. package/dist/{client-ip-CW6pRyLf.js → client-ip-B8wFzJ5f.js} +117 -7
  71. package/dist/{client-ip-B2Xeo-GK.mjs → client-ip-DIJyr6px.mjs} +113 -9
  72. package/dist/client-ip-DIJyr6px.mjs.map +1 -0
  73. package/dist/client-ip.d.mts +2 -2
  74. package/dist/client-ip.d.ts +2 -2
  75. package/dist/client-ip.js +3 -2
  76. package/dist/client-ip.mjs +2 -2
  77. package/dist/consent-handoff.d.mts +0 -3
  78. package/dist/consent-handoff.d.mts.map +1 -1
  79. package/dist/consent-handoff.d.ts +0 -3
  80. package/dist/consent-handoff.d.ts.map +1 -1
  81. package/dist/consent-handoff.mjs.map +1 -1
  82. package/dist/default-sign-in-host.d.mts +10 -0
  83. package/dist/default-sign-in-host.d.mts.map +1 -0
  84. package/dist/default-sign-in-host.d.ts +10 -0
  85. package/dist/default-sign-in-host.d.ts.map +1 -0
  86. package/dist/default-sign-in-host.js +72 -0
  87. package/dist/default-sign-in-host.mjs +66 -0
  88. package/dist/default-sign-in-host.mjs.map +1 -0
  89. package/dist/detection-reason-mapping-B9RSkOs8.js +277 -0
  90. package/dist/detection-reason-mapping-BGymWIPl.mjs +249 -0
  91. package/dist/detection-reason-mapping-BGymWIPl.mjs.map +1 -0
  92. package/dist/detection-reason-mapping-CQexNvR7.d.mts +52 -0
  93. package/dist/detection-reason-mapping-CQexNvR7.d.mts.map +1 -0
  94. package/dist/detection-reason-mapping-CQexNvR7.d.ts +52 -0
  95. package/dist/detection-reason-mapping-CQexNvR7.d.ts.map +1 -0
  96. package/dist/engine-enforcing-AYEcgNsb.js +39 -0
  97. package/dist/engine-enforcing-B5eNfCpG.mjs +29 -0
  98. package/dist/engine-enforcing-B5eNfCpG.mjs.map +1 -0
  99. package/dist/engine-enforcing-DiOclGqf.d.mts +11 -0
  100. package/dist/engine-enforcing-DiOclGqf.d.mts.map +1 -0
  101. package/dist/engine-enforcing-DiOclGqf.d.ts +11 -0
  102. package/dist/engine-enforcing-DiOclGqf.d.ts.map +1 -0
  103. package/dist/engine-info.d.mts +2 -0
  104. package/dist/engine-info.d.ts +2 -0
  105. package/dist/engine-info.js +4 -0
  106. package/dist/engine-info.mjs +3 -0
  107. package/dist/errors/index.d.mts +6 -0
  108. package/dist/errors/index.d.mts.map +1 -1
  109. package/dist/errors/index.d.ts +6 -0
  110. package/dist/errors/index.d.ts.map +1 -1
  111. package/dist/errors/index.js +28 -6
  112. package/dist/errors/index.mjs +28 -6
  113. package/dist/errors/index.mjs.map +1 -1
  114. package/dist/{external-B7WI9FyQ.d.ts → external-m3Kmafwj.d.mts} +2 -2
  115. package/dist/{external-B7WI9FyQ.d.mts.map → external-m3Kmafwj.d.mts.map} +1 -1
  116. package/dist/{external-B7WI9FyQ.d.mts → external-m3Kmafwj.d.ts} +2 -2
  117. package/dist/{external-B7WI9FyQ.d.ts.map → external-m3Kmafwj.d.ts.map} +1 -1
  118. package/dist/fetcher-C8qvwdnA.d.ts +44 -0
  119. package/dist/fetcher-C8qvwdnA.d.ts.map +1 -0
  120. package/dist/fetcher-D2vjr7jB.d.mts +44 -0
  121. package/dist/fetcher-D2vjr7jB.d.mts.map +1 -0
  122. package/dist/gateway-client-ip.d.mts +1 -3
  123. package/dist/gateway-client-ip.d.mts.map +1 -1
  124. package/dist/gateway-client-ip.d.ts +1 -3
  125. package/dist/gateway-client-ip.d.ts.map +1 -1
  126. package/dist/gateway-client-ip.js +2 -2
  127. package/dist/gateway-client-ip.mjs +2 -2
  128. package/dist/gateway-client-ip.mjs.map +1 -1
  129. package/dist/host-adapter/index.d.mts +2 -2
  130. package/dist/host-adapter/index.d.ts +2 -2
  131. package/dist/host-adapter/index.js +2 -1
  132. package/dist/host-adapter/index.mjs +2 -2
  133. package/dist/{host-adapter-C-4IxmqM.mjs → host-adapter-BKdQHwbi.mjs} +56 -3
  134. package/dist/{host-adapter-C-4IxmqM.mjs.map → host-adapter-BKdQHwbi.mjs.map} +1 -1
  135. package/dist/{host-adapter-CwW9YB0U.js → host-adapter-bWftXA9T.js} +60 -1
  136. package/dist/index-DnFsmr_o.d.ts +156 -0
  137. package/dist/index-DnFsmr_o.d.ts.map +1 -0
  138. package/dist/index-rvw5Bz-r.d.mts +156 -0
  139. package/dist/index-rvw5Bz-r.d.mts.map +1 -0
  140. package/dist/index.d.mts +6681 -11335
  141. package/dist/index.d.mts.map +1 -1
  142. package/dist/index.d.ts +6681 -11335
  143. package/dist/index.d.ts.map +1 -1
  144. package/dist/index.js +2322 -6900
  145. package/dist/index.mjs +2236 -6574
  146. package/dist/index.mjs.map +1 -1
  147. package/dist/{kya-http-error-codes-UYb1zpGM.js → kya-http-error-codes-B4rUmUEI.js} +2 -0
  148. package/dist/{kya-http-error-codes-7ewV5RuK.d.ts → kya-http-error-codes-C14E4gi3.d.mts} +2 -1
  149. package/dist/kya-http-error-codes-C14E4gi3.d.mts.map +1 -0
  150. package/dist/{kya-http-error-codes-7ewV5RuK.d.mts → kya-http-error-codes-C14E4gi3.d.ts} +2 -1
  151. package/dist/kya-http-error-codes-C14E4gi3.d.ts.map +1 -0
  152. package/dist/{kya-http-error-codes-C2JiWPsi.mjs → kya-http-error-codes-DSBrxNry.mjs} +3 -1
  153. package/dist/kya-http-error-codes-DSBrxNry.mjs.map +1 -0
  154. package/dist/kya-http.d.mts +3 -3
  155. package/dist/kya-http.d.ts +3 -3
  156. package/dist/kya-http.js +10 -2
  157. package/dist/kya-http.mjs +4 -3
  158. package/dist/mcpi/dashboard-config/index.d.mts.map +1 -1
  159. package/dist/mcpi/dashboard-config/index.d.ts.map +1 -1
  160. package/dist/mcpi/dashboard-config/index.mjs.map +1 -1
  161. package/dist/mcpi/status-list/index.d.mts +72 -0
  162. package/dist/mcpi/status-list/index.d.mts.map +1 -0
  163. package/dist/mcpi/status-list/index.d.ts +72 -0
  164. package/dist/mcpi/status-list/index.d.ts.map +1 -0
  165. package/dist/mcpi/status-list/index.js +703 -0
  166. package/dist/mcpi/status-list/index.mjs +684 -0
  167. package/dist/mcpi/status-list/index.mjs.map +1 -0
  168. package/dist/patterns-Bp40cwh2.d.mts +110 -0
  169. package/dist/patterns-Bp40cwh2.d.mts.map +1 -0
  170. package/dist/patterns-Bp40cwh2.d.ts +110 -0
  171. package/dist/patterns-Bp40cwh2.d.ts.map +1 -0
  172. package/dist/patterns-CiMpbdAF.js +243 -0
  173. package/dist/patterns-D4OAsNQY.mjs +173 -0
  174. package/dist/patterns-D4OAsNQY.mjs.map +1 -0
  175. package/dist/patterns.d.mts +2 -0
  176. package/dist/patterns.d.ts +2 -0
  177. package/dist/patterns.js +15 -0
  178. package/dist/patterns.mjs +3 -0
  179. package/dist/policy/enforcement.d.mts +3 -2
  180. package/dist/policy/enforcement.d.ts +3 -2
  181. package/dist/policy/enforcement.js +8 -2
  182. package/dist/policy/enforcement.mjs +3 -2
  183. package/dist/policy/fetcher.d.mts +2 -0
  184. package/dist/policy/fetcher.d.ts +2 -0
  185. package/dist/policy/fetcher.js +240 -0
  186. package/dist/policy/fetcher.mjs +238 -0
  187. package/dist/policy/fetcher.mjs.map +1 -0
  188. package/dist/policy/schemas.d.mts +3 -0
  189. package/dist/policy/schemas.d.ts +3 -0
  190. package/dist/policy/schemas.js +27 -0
  191. package/dist/policy/schemas.mjs +4 -0
  192. package/dist/{posture-origins-Ba83O0cD.mjs → posture-origins-Ci6k4Zh1.js} +24 -173
  193. package/dist/{posture-origins-CdVOdiMT.js → posture-origins-DGyS4Vuk.mjs} +2 -267
  194. package/dist/posture-origins-DGyS4Vuk.mjs.map +1 -0
  195. package/dist/{project-verification-key-BccT12tQ.js → project-verification-key-B-L3D2nC.js} +1 -1
  196. package/dist/{project-verification-key-66N4edKn.mjs → project-verification-key-CWXdu3-n.mjs} +2 -2
  197. package/dist/{project-verification-key-66N4edKn.mjs.map → project-verification-key-CWXdu3-n.mjs.map} +1 -1
  198. package/dist/provider-registry.d.mts +2 -0
  199. package/dist/provider-registry.d.ts +2 -0
  200. package/dist/provider-registry.js +51 -0
  201. package/dist/provider-registry.mjs +3 -0
  202. package/dist/reason-codes.d.mts +2 -0
  203. package/dist/reason-codes.d.ts +2 -0
  204. package/dist/reason-codes.js +8 -0
  205. package/dist/reason-codes.mjs +3 -0
  206. package/dist/{registered-sid-hUl-bvM5.mjs → registered-sid-26hNxp6t.mjs} +11 -2
  207. package/dist/registered-sid-26hNxp6t.mjs.map +1 -0
  208. package/dist/registered-sid-D6KCaT1E.d.mts +33 -0
  209. package/dist/registered-sid-D6KCaT1E.d.mts.map +1 -0
  210. package/dist/registered-sid-D6KCaT1E.d.ts +33 -0
  211. package/dist/registered-sid-D6KCaT1E.d.ts.map +1 -0
  212. package/dist/{registered-sid-eLCNZvIF.js → registered-sid-DVGTSH0L.js} +15 -0
  213. package/dist/ruleset-hash-Cmv8MSO5.js +34 -0
  214. package/dist/ruleset-hash-IRN5eI9H.d.mts +5 -0
  215. package/dist/ruleset-hash-IRN5eI9H.d.mts.map +1 -0
  216. package/dist/ruleset-hash-IRN5eI9H.d.ts +5 -0
  217. package/dist/ruleset-hash-IRN5eI9H.d.ts.map +1 -0
  218. package/dist/ruleset-hash-QQIaLuPi.mjs +30 -0
  219. package/dist/ruleset-hash-QQIaLuPi.mjs.map +1 -0
  220. package/dist/{schemas-YhagYDx_.js → schemas-BlScS1it.js} +0 -20
  221. package/dist/{index-HaqfPtaL.d.ts → schemas-CGKHzcMV.d.ts} +23 -195
  222. package/dist/schemas-CGKHzcMV.d.ts.map +1 -0
  223. package/dist/schemas-Cm4C4Z5G.js +703 -0
  224. package/dist/schemas-DPIT8usF.mjs +525 -0
  225. package/dist/schemas-DPIT8usF.mjs.map +1 -0
  226. package/dist/{schemas-7qodsG-Z.mjs → schemas-IHAhH3gV.mjs} +2 -16
  227. package/dist/schemas-IHAhH3gV.mjs.map +1 -0
  228. package/dist/{index-B7rTovHa.d.mts → schemas-m-GqyfyO.d.mts} +23 -195
  229. package/dist/schemas-m-GqyfyO.d.mts.map +1 -0
  230. package/dist/{step-up-COlmWJN8.mjs → step-up-BK0oBi11.mjs} +91 -41
  231. package/dist/step-up-BK0oBi11.mjs.map +1 -0
  232. package/dist/{step-up-C2d8C20x.js → step-up-Bp8RAQwv.js} +117 -55
  233. package/dist/{step-up-BjP--hG-.d.mts → step-up-Bz12gYKT.d.mts} +28 -12
  234. package/dist/step-up-Bz12gYKT.d.mts.map +1 -0
  235. package/dist/{step-up-BjP--hG-.d.ts → step-up-Bz12gYKT.d.ts} +28 -12
  236. package/dist/step-up-Bz12gYKT.d.ts.map +1 -0
  237. package/dist/test-fixtures/index.d.mts +4 -4
  238. package/dist/test-fixtures/index.d.mts.map +1 -1
  239. package/dist/test-fixtures/index.d.ts +4 -4
  240. package/dist/test-fixtures/index.d.ts.map +1 -1
  241. package/dist/test-fixtures/index.js +4 -4
  242. package/dist/test-fixtures/index.mjs +4 -4
  243. package/dist/test-fixtures/index.mjs.map +1 -1
  244. package/dist/tool-protection/index.d.mts +12 -0
  245. package/dist/tool-protection/index.d.mts.map +1 -1
  246. package/dist/tool-protection/index.d.ts +12 -0
  247. package/dist/tool-protection/index.d.ts.map +1 -1
  248. package/dist/tool-protection/index.js +46 -0
  249. package/dist/tool-protection/index.mjs +44 -1
  250. package/dist/tool-protection/index.mjs.map +1 -1
  251. package/dist/verification-BAw9N8Pt.js +181 -0
  252. package/dist/verification-Cvvv86TT.mjs +123 -0
  253. package/dist/verification-Cvvv86TT.mjs.map +1 -0
  254. package/fixtures/client-ip-resolution.n01.json +101 -0
  255. package/fixtures/kya-http/error-codes.json +2 -1
  256. package/fixtures/reviewer-grant-revocation.v1.json +53 -81
  257. package/package.json +55 -4
  258. package/dist/client-ip-B2Xeo-GK.mjs.map +0 -1
  259. package/dist/client-ip-DFamiNoz.d.mts +0 -34
  260. package/dist/client-ip-DFamiNoz.d.mts.map +0 -1
  261. package/dist/client-ip-DFamiNoz.d.ts +0 -34
  262. package/dist/client-ip-DFamiNoz.d.ts.map +0 -1
  263. package/dist/index-B7rTovHa.d.mts.map +0 -1
  264. package/dist/index-HaqfPtaL.d.ts.map +0 -1
  265. package/dist/kya-http-error-codes-7ewV5RuK.d.mts.map +0 -1
  266. package/dist/kya-http-error-codes-7ewV5RuK.d.ts.map +0 -1
  267. package/dist/kya-http-error-codes-C2JiWPsi.mjs.map +0 -1
  268. package/dist/posture-origins-Ba83O0cD.mjs.map +0 -1
  269. package/dist/registered-sid-D3g-gZQF.d.mts +0 -11
  270. package/dist/registered-sid-D3g-gZQF.d.mts.map +0 -1
  271. package/dist/registered-sid-D3g-gZQF.d.ts +0 -11
  272. package/dist/registered-sid-D3g-gZQF.d.ts.map +0 -1
  273. package/dist/registered-sid-hUl-bvM5.mjs.map +0 -1
  274. package/dist/schemas-7qodsG-Z.mjs.map +0 -1
  275. package/dist/step-up-BjP--hG-.d.mts.map +0 -1
  276. package/dist/step-up-BjP--hG-.d.ts.map +0 -1
  277. package/dist/step-up-COlmWJN8.mjs.map +0 -1
@@ -0,0 +1,703 @@
1
+ const require_schemas = require('./schemas-BlScS1it.js');
2
+
3
+ //#region src/policy/constants.ts
4
+ /**
5
+ * Policy Constants
6
+ *
7
+ * Default values and constants for policy enforcement.
8
+ * Aligned with Rust types in agentshield-types/src/policy.rs
9
+ */
10
+ /**
11
+ * Available enforcement actions.
12
+ *
13
+ * **Vocab-1 migration (2026-05-13, see [[ADR-001]] amendment + Vocab-1
14
+ * #2501).** The old vocabulary mixed two orthogonal axes — `'allow'` /
15
+ * `'block'` (a Decision) and `'log'` (an EnforcementMode). The new
16
+ * vocabulary separates them:
17
+ *
18
+ * - **Decision** (the engine's verdict): one of
19
+ * `'permit' | 'block' | 'redirect' | 'challenge' | 'instruct'`.
20
+ * - **EnforcementMode** (whether the host wrapper acts on the verdict):
21
+ * one of `'enforce' | 'observe'` — see ENFORCEMENT_MODES below.
22
+ *
23
+ * `ALLOW` is kept as an alias for `PERMIT` during the cutover window
24
+ * (per [[checkpoint-engine-phase-1-cutover]] runbook Cutover-2 — drop
25
+ * after 30 days of zero `'allow'` writes). `LOG` is kept similarly —
26
+ * a stored `'log'` row should be read as Permit + Observe mode.
27
+ *
28
+ * Producers (SDK middleware, gateway worker) emit `'permit'` going
29
+ * forward. Consumers (dashboard, ingest validators) accept both during
30
+ * the alias period and alias `'allow'` → display "Permit".
31
+ */
32
+ const ENFORCEMENT_ACTIONS = {
33
+ /** New canonical name for "the engine permits this request through." */
34
+ PERMIT: "permit",
35
+ /**
36
+ * @deprecated Use PERMIT. Kept as wire alias for the Vocab-1
37
+ * cutover window. Drop after 30 days of zero stored writes.
38
+ */
39
+ ALLOW: "allow",
40
+ BLOCK: "block",
41
+ REDIRECT: "redirect",
42
+ CHALLENGE: "challenge",
43
+ /**
44
+ * @deprecated Pre-Vocab-1: a stored `'log'` action was "permit but
45
+ * record." Post-Vocab-1: the same shape is `action: 'permit'` +
46
+ * `mode: 'observe'` (orthogonal axes). Kept for read-back only;
47
+ * producers should not emit `'log'` after Vocab-1 lands.
48
+ */
49
+ LOG: "log",
50
+ INSTRUCT: "instruct"
51
+ };
52
+ /**
53
+ * EnforcementMode — orthogonal to EnforcementAction.
54
+ *
55
+ * Vocab-1 (2026-05-13) split "what to do" (the action / Decision) from
56
+ * "whether to act on it" (the mode). Customers — especially regulated
57
+ * enterprises — want a low-stakes evaluation ramp: install in Observe,
58
+ * watch the dashboard for two weeks to see what *would have been*
59
+ * blocked, then flip to Enforce. CISO-friendly.
60
+ *
61
+ * The host wrapper (Express middleware, Next.js middleware, .NET
62
+ * filter, Cloudflare Worker) reads the mode and:
63
+ *
64
+ * - **Enforce**: applies the Decision — returns 401/403 for Block,
65
+ * forwards Challenge headers, performs Redirect, etc.
66
+ * - **Observe**: passes the request through to the origin regardless
67
+ * of Decision, but records the would-have-been action in metadata
68
+ * so the dashboard can render "Would have been: Block(OutOfScope)"
69
+ * instead of "Block(OutOfScope)". Dash-1 (#2492) acceptance
70
+ * criterion mandates this rendering distinction.
71
+ */
72
+ const ENFORCEMENT_MODES = {
73
+ ENFORCE: "enforce",
74
+ OBSERVE: "observe"
75
+ };
76
+ /**
77
+ * Condition operators for policy rules
78
+ */
79
+ const CONDITION_OPERATORS = {
80
+ EQUALS: "equals",
81
+ NOT_EQUALS: "notEquals",
82
+ CONTAINS: "contains",
83
+ NOT_CONTAINS: "notContains",
84
+ STARTS_WITH: "startsWith",
85
+ ENDS_WITH: "endsWith",
86
+ GREATER_THAN: "greaterThan",
87
+ LESS_THAN: "lessThan",
88
+ GREATER_THAN_OR_EQUALS: "greaterThanOrEquals",
89
+ LESS_THAN_OR_EQUALS: "lessThanOrEquals",
90
+ MATCHES: "matches",
91
+ IN: "in",
92
+ NOT_IN: "notIn"
93
+ };
94
+ /**
95
+ * Fields that can be matched in policy conditions
96
+ */
97
+ const CONDITION_FIELDS = {
98
+ AGENT_TYPE: "agentType",
99
+ AGENT_NAME: "agentName",
100
+ AGENT_VENDOR: "agentVendor",
101
+ CLIENT_DID: "clientDid",
102
+ AGENT_DID: "agentDid",
103
+ CONFIDENCE: "confidence",
104
+ REPUTATION_SCORE: "reputationScore",
105
+ RISK_LEVEL: "riskLevel",
106
+ PATH: "path",
107
+ METHOD: "method",
108
+ ORIGIN: "origin",
109
+ USER_AGENT: "userAgent",
110
+ SIGNATURE_VERIFIED: "signatureVerified",
111
+ IS_AUTHENTICATED: "isAuthenticated",
112
+ HAS_VALID_DELEGATION: "hasValidDelegation"
113
+ };
114
+ /**
115
+ * Default threshold configuration
116
+ */
117
+ const DEFAULT_THRESHOLDS = {
118
+ confidenceThreshold: 80,
119
+ confidenceAction: ENFORCEMENT_ACTIONS.BLOCK,
120
+ minReputationScore: 0,
121
+ lowReputationAction: ENFORCEMENT_ACTIONS.CHALLENGE,
122
+ trustedReputationThreshold: 90,
123
+ trustSignedRequests: true
124
+ };
125
+ /**
126
+ * Default policy configuration
127
+ */
128
+ const DEFAULT_POLICY = {
129
+ version: "1.0.0",
130
+ enabled: true,
131
+ defaultAction: ENFORCEMENT_ACTIONS.PERMIT,
132
+ thresholds: DEFAULT_THRESHOLDS,
133
+ denyList: [],
134
+ allowList: [],
135
+ rules: [],
136
+ excludedPaths: []
137
+ };
138
+ /**
139
+ * Default rule priority (lower = higher priority)
140
+ */
141
+ const DEFAULT_RULE_PRIORITY = 100;
142
+ /**
143
+ * Cache TTL values (in seconds)
144
+ */
145
+ const CACHE_TTL = {
146
+ POLICY: 300,
147
+ API_KEY: 900
148
+ };
149
+ /**
150
+ * Policy version for schema migrations
151
+ */
152
+ const CURRENT_POLICY_VERSION = "1.0.0";
153
+
154
+ //#endregion
155
+ //#region src/policy/schemas.ts
156
+ /**
157
+ * Policy Zod Schemas
158
+ *
159
+ * Runtime validation schemas for policy configuration.
160
+ * Aligned with Rust types in agentshield-types/src/policy.rs
161
+ */
162
+ const EnforcementActionSchema = require_schemas._enum([
163
+ ENFORCEMENT_ACTIONS.PERMIT,
164
+ ENFORCEMENT_ACTIONS.BLOCK,
165
+ ENFORCEMENT_ACTIONS.REDIRECT,
166
+ ENFORCEMENT_ACTIONS.CHALLENGE,
167
+ ENFORCEMENT_ACTIONS.INSTRUCT,
168
+ ENFORCEMENT_ACTIONS.ALLOW,
169
+ ENFORCEMENT_ACTIONS.LOG
170
+ ]);
171
+ /**
172
+ * EnforcementMode — orthogonal to EnforcementAction. See
173
+ * `ENFORCEMENT_MODES` in constants.ts for the full rationale.
174
+ */
175
+ const EnforcementModeSchema = require_schemas._enum([ENFORCEMENT_MODES.ENFORCE, ENFORCEMENT_MODES.OBSERVE]);
176
+ /**
177
+ * Block reasons — priority order (Rust declaration order): Revoked >
178
+ * InvalidSignature > Unauthenticated > Expired > OutOfScope >
179
+ * LowReputation > PolicyDenied > AgentAttribution > ParseError >
180
+ * Tier3UAMatch. The engine returns the most-actionable reason; this
181
+ * schema accepts any of them. See TDD Spec Layer 1 for the priority
182
+ * rules and `rust/crates/kya-os-engine/src/types.rs` for the wire SSOT.
183
+ */
184
+ const BlockReasonSchema = require_schemas.discriminatedUnion("kind", [
185
+ require_schemas.object({ kind: require_schemas.literal("Revoked") }),
186
+ require_schemas.object({ kind: require_schemas.literal("InvalidSignature") }),
187
+ require_schemas.object({ kind: require_schemas.literal("Unauthenticated") }),
188
+ require_schemas.object({ kind: require_schemas.literal("Expired") }),
189
+ require_schemas.object({
190
+ kind: require_schemas.literal("OutOfScope"),
191
+ requested: require_schemas.string(),
192
+ granted: require_schemas.array(require_schemas.string())
193
+ }),
194
+ require_schemas.object({
195
+ kind: require_schemas.literal("LowReputation"),
196
+ score: require_schemas.number(),
197
+ threshold: require_schemas.number()
198
+ }),
199
+ require_schemas.object({
200
+ kind: require_schemas.literal("PolicyDenied"),
201
+ detail: require_schemas.string(),
202
+ policyId: require_schemas.string().optional()
203
+ }),
204
+ require_schemas.object({
205
+ kind: require_schemas.literal("AgentAttribution"),
206
+ vendor: require_schemas.string(),
207
+ tier: require_schemas.number().int(),
208
+ confidence: require_schemas.number().min(0).max(1)
209
+ }),
210
+ require_schemas.object({
211
+ kind: require_schemas.literal("ParseError"),
212
+ detail: require_schemas.string()
213
+ }),
214
+ require_schemas.object({
215
+ kind: require_schemas.literal("Tier3UAMatch"),
216
+ pattern_id: require_schemas.string(),
217
+ pattern_kind: require_schemas.string(),
218
+ confidence: require_schemas.number().int().min(0).max(100)
219
+ })
220
+ ]);
221
+ /**
222
+ * The draft-kya-http-02 §1 assurance ladder, monotone floor → top. These are
223
+ * the exact wire strings the merged kya-http fixtures pin
224
+ * (`packages/checkpoint-shared/fixtures/kya-http`, e.g. `min_assurance`); the
225
+ * Rust engine emits them on the verdict and reads them as `context.assurance`.
226
+ * Canonical SSOT for the assurance tier / `min_assurance` enum.
227
+ */
228
+ const AssuranceTierSchema = require_schemas._enum([
229
+ "anonymous",
230
+ "attested-bearer",
231
+ "key-bound",
232
+ "registered",
233
+ "delegated"
234
+ ]);
235
+ /**
236
+ * ChallengeParams MUST be the KYA-OS L2+ handshake envelope shape, not
237
+ * a parallel Checkpoint definition. Reusing the spec donated to DIF
238
+ * gives every KYA-OS implementer free interop with Checkpoint's
239
+ * Challenge flow. See [[ADR-001]] amendment.
240
+ */
241
+ const ChallengeParamsSchema = require_schemas.object({
242
+ nonce: require_schemas.string(),
243
+ audience: require_schemas.string(),
244
+ expiresAt: require_schemas.number(),
245
+ algorithmsAccepted: require_schemas.array(require_schemas.string()),
246
+ minAssurance: AssuranceTierSchema.optional(),
247
+ policyId: require_schemas.string().optional(),
248
+ challengeType: require_schemas.string().optional()
249
+ });
250
+ const RedirectTargetSchema = require_schemas.object({
251
+ url: require_schemas.string().url(),
252
+ reason: require_schemas.string(),
253
+ state: require_schemas.string().optional(),
254
+ policyId: require_schemas.string().optional()
255
+ });
256
+ const SuggestedActionSchema = require_schemas.discriminatedUnion("kind", [
257
+ require_schemas.object({
258
+ kind: require_schemas.literal("UseDifferentScope"),
259
+ scope: require_schemas.string()
260
+ }),
261
+ require_schemas.object({
262
+ kind: require_schemas.literal("UpdateRequestField"),
263
+ field: require_schemas.string(),
264
+ acceptedValues: require_schemas.array(require_schemas.string())
265
+ }),
266
+ require_schemas.object({
267
+ kind: require_schemas.literal("UpgradeProtocolVersion"),
268
+ version: require_schemas.string()
269
+ }),
270
+ require_schemas.object({
271
+ kind: require_schemas.literal("Other"),
272
+ code: require_schemas.string(),
273
+ detail: require_schemas.string()
274
+ })
275
+ ]);
276
+ const InstructPayloadSchema = require_schemas.object({
277
+ problem: require_schemas.string(),
278
+ title: require_schemas.string(),
279
+ suggestedActions: require_schemas.array(SuggestedActionSchema),
280
+ policyId: require_schemas.string().optional()
281
+ });
282
+ /**
283
+ * Decision — the Detect → Verify → **Decide** axis. Five variants
284
+ * with per-variant payload via discriminated union. Mirrors the Rust
285
+ * `Decision` enum (D-design #2484); the dashboard renders one badge
286
+ * per variant (see Dash-1 #2492). The wire-side EnforcementAction
287
+ * string above is the legacy flat encoding; this is the canonical
288
+ * structured replacement.
289
+ */
290
+ const DecisionSchema = require_schemas.discriminatedUnion("kind", [
291
+ require_schemas.object({
292
+ kind: require_schemas.literal("Permit"),
293
+ policyId: require_schemas.string().optional()
294
+ }),
295
+ require_schemas.object({
296
+ kind: require_schemas.literal("Block"),
297
+ reason: BlockReasonSchema
298
+ }),
299
+ require_schemas.object({
300
+ kind: require_schemas.literal("Challenge"),
301
+ params: ChallengeParamsSchema
302
+ }),
303
+ require_schemas.object({
304
+ kind: require_schemas.literal("Redirect"),
305
+ target: RedirectTargetSchema
306
+ }),
307
+ require_schemas.object({
308
+ kind: require_schemas.literal("Instruct"),
309
+ payload: InstructPayloadSchema
310
+ })
311
+ ]);
312
+ const ThresholdConfigSchema = require_schemas.object({
313
+ /** Detection confidence threshold (0-100) */
314
+ confidenceThreshold: require_schemas.number().min(0).max(100).default(DEFAULT_THRESHOLDS.confidenceThreshold),
315
+ /** Action to take when confidence threshold is exceeded */
316
+ confidenceAction: EnforcementActionSchema.default(DEFAULT_THRESHOLDS.confidenceAction),
317
+ /** Minimum reputation score (0-100) required to allow access */
318
+ minReputationScore: require_schemas.number().min(0).max(100).default(DEFAULT_THRESHOLDS.minReputationScore),
319
+ /** Action to take when reputation is below threshold */
320
+ lowReputationAction: EnforcementActionSchema.default(DEFAULT_THRESHOLDS.lowReputationAction),
321
+ /** High reputation score threshold (0-100) - trusted agents bypass other checks */
322
+ trustedReputationThreshold: require_schemas.number().min(0).max(100).default(DEFAULT_THRESHOLDS.trustedReputationThreshold),
323
+ /** Whether cryptographically signed requests bypass thresholds */
324
+ trustSignedRequests: require_schemas.boolean().default(DEFAULT_THRESHOLDS.trustSignedRequests)
325
+ });
326
+ const DenyListEntrySchema = require_schemas.object({
327
+ /** KYA-OS client DID */
328
+ clientDid: require_schemas.string().optional(),
329
+ /** Agent DID from KYA-OS identity */
330
+ agentDid: require_schemas.string().optional(),
331
+ /** Human-readable client name (e.g., "ChatGPT") */
332
+ clientName: require_schemas.string().optional(),
333
+ /** Agent type to block (e.g., "ai_agent", "bot") */
334
+ agentType: require_schemas.string().optional(),
335
+ /** Reason for denial */
336
+ reason: require_schemas.string().optional(),
337
+ /** ISO 8601 timestamp when entry was added */
338
+ blockedAt: require_schemas.string().optional(),
339
+ /** Who added this entry */
340
+ addedBy: require_schemas.string().optional(),
341
+ /** Whether this entry is currently active */
342
+ active: require_schemas.boolean().default(true),
343
+ /** Optional expiration date for temporary blocks */
344
+ expiresAt: require_schemas.string().optional()
345
+ });
346
+ const AllowListEntrySchema = require_schemas.object({
347
+ /** KYA-OS client DID */
348
+ clientDid: require_schemas.string().optional(),
349
+ /** Agent DID from KYA-OS identity */
350
+ agentDid: require_schemas.string().optional(),
351
+ /** Human-readable client name */
352
+ clientName: require_schemas.string().optional(),
353
+ /** Agent type to allow */
354
+ agentType: require_schemas.string().optional(),
355
+ /** Reason for allowing */
356
+ reason: require_schemas.string().optional(),
357
+ /** ISO 8601 timestamp when entry was added */
358
+ addedAt: require_schemas.string().optional(),
359
+ /** Who added this entry */
360
+ addedBy: require_schemas.string().optional()
361
+ });
362
+ const ConditionOperatorSchema = require_schemas._enum([
363
+ CONDITION_OPERATORS.EQUALS,
364
+ CONDITION_OPERATORS.NOT_EQUALS,
365
+ CONDITION_OPERATORS.CONTAINS,
366
+ CONDITION_OPERATORS.NOT_CONTAINS,
367
+ CONDITION_OPERATORS.STARTS_WITH,
368
+ CONDITION_OPERATORS.ENDS_WITH,
369
+ CONDITION_OPERATORS.GREATER_THAN,
370
+ CONDITION_OPERATORS.LESS_THAN,
371
+ CONDITION_OPERATORS.GREATER_THAN_OR_EQUALS,
372
+ CONDITION_OPERATORS.LESS_THAN_OR_EQUALS,
373
+ CONDITION_OPERATORS.MATCHES,
374
+ CONDITION_OPERATORS.IN,
375
+ CONDITION_OPERATORS.NOT_IN
376
+ ]);
377
+ const ConditionFieldSchema = require_schemas._enum([
378
+ CONDITION_FIELDS.AGENT_TYPE,
379
+ CONDITION_FIELDS.AGENT_NAME,
380
+ CONDITION_FIELDS.AGENT_VENDOR,
381
+ CONDITION_FIELDS.CLIENT_DID,
382
+ CONDITION_FIELDS.AGENT_DID,
383
+ CONDITION_FIELDS.CONFIDENCE,
384
+ CONDITION_FIELDS.REPUTATION_SCORE,
385
+ CONDITION_FIELDS.RISK_LEVEL,
386
+ CONDITION_FIELDS.PATH,
387
+ CONDITION_FIELDS.METHOD,
388
+ CONDITION_FIELDS.ORIGIN,
389
+ CONDITION_FIELDS.USER_AGENT,
390
+ CONDITION_FIELDS.SIGNATURE_VERIFIED,
391
+ CONDITION_FIELDS.IS_AUTHENTICATED,
392
+ CONDITION_FIELDS.HAS_VALID_DELEGATION
393
+ ]);
394
+ const ConditionValueSchema = require_schemas.union([
395
+ require_schemas.string(),
396
+ require_schemas.number(),
397
+ require_schemas.boolean(),
398
+ require_schemas.array(require_schemas.string())
399
+ ]);
400
+ const PolicyConditionSchema = require_schemas.object({
401
+ /** Field to match against */
402
+ field: ConditionFieldSchema,
403
+ /** Comparison operator */
404
+ operator: ConditionOperatorSchema,
405
+ /** Value to compare against */
406
+ value: ConditionValueSchema,
407
+ /** Whether this condition is case-insensitive */
408
+ caseInsensitive: require_schemas.boolean().optional()
409
+ });
410
+ const RuleMetadataSchema = require_schemas.object({
411
+ createdAt: require_schemas.string().optional(),
412
+ updatedAt: require_schemas.string().optional(),
413
+ createdBy: require_schemas.string().optional()
414
+ });
415
+ const PolicyRuleSchema = require_schemas.object({
416
+ /** Unique identifier for this rule */
417
+ id: require_schemas.string(),
418
+ /** Human-readable name */
419
+ name: require_schemas.string(),
420
+ /** Description of what this rule does */
421
+ description: require_schemas.string().optional(),
422
+ /** Priority (lower = higher priority, evaluated first) */
423
+ priority: require_schemas.number().int().default(100),
424
+ /** Conditions that must ALL match for this rule to apply (AND logic) */
425
+ conditions: require_schemas.array(PolicyConditionSchema),
426
+ /** Action to take when conditions match */
427
+ action: EnforcementActionSchema,
428
+ /** Redirect URL (required if action is 'redirect') */
429
+ redirectUrl: require_schemas.string().url().optional(),
430
+ /** Custom message to show/log */
431
+ message: require_schemas.string().optional(),
432
+ /** Whether this rule is currently active */
433
+ enabled: require_schemas.boolean().default(true),
434
+ /** Metadata for auditing */
435
+ metadata: RuleMetadataSchema.optional()
436
+ });
437
+ const PolicyMetadataSchema = require_schemas.object({
438
+ lastUpdated: require_schemas.string().optional(),
439
+ updatedBy: require_schemas.string().optional(),
440
+ policyId: require_schemas.string().optional()
441
+ });
442
+ const PolicyConfigSchema = require_schemas.object({
443
+ /** Schema version for migrations */
444
+ version: require_schemas.string().default(CURRENT_POLICY_VERSION),
445
+ /** Whether policy enforcement is enabled */
446
+ enabled: require_schemas.boolean().default(true),
447
+ /** Default action when no rules match. Updated to PERMIT (was ALLOW)
448
+ * per Vocab-1 (#2501); the wire still accepts both via the alias
449
+ * schema so existing stored policies continue to load. */
450
+ defaultAction: EnforcementActionSchema.default(ENFORCEMENT_ACTIONS.PERMIT),
451
+ /** Default redirect URL for redirect actions */
452
+ redirectUrl: require_schemas.string().url().optional(),
453
+ /** Threshold-based enforcement settings */
454
+ thresholds: ThresholdConfigSchema.prefault({}),
455
+ /** Deny list entries (checked after allow list, before rules) */
456
+ denyList: require_schemas.array(DenyListEntrySchema).default([]),
457
+ /** Allow list entries (exempt from all checks) */
458
+ allowList: require_schemas.array(AllowListEntrySchema).default([]),
459
+ /** Custom policy rules (evaluated by priority after threshold checks) */
460
+ rules: require_schemas.array(PolicyRuleSchema).default([]),
461
+ /** Paths to exclude from policy enforcement (glob patterns supported) */
462
+ excludedPaths: require_schemas.array(require_schemas.string()).default([]),
463
+ /** Paths to include (if set, only these paths are enforced) */
464
+ includedPaths: require_schemas.array(require_schemas.string()).optional(),
465
+ /** Metadata for the policy configuration */
466
+ metadata: PolicyMetadataSchema.optional(),
467
+ /**
468
+ * Composed policy source (Cedar today). `null`/absent → no composed policy
469
+ * (the runtime uses the structured fields). Empty/blank is treated as "no
470
+ * policy" by the engine path (an empty bundle compiles to deny-all), so the
471
+ * runtime MUST normalize blank → absent before handing it to the evaluator.
472
+ */
473
+ policySourceText: require_schemas.string().nullish(),
474
+ /**
475
+ * Language of `policySourceText`. `cedar` today; kept as a free string (not an
476
+ * enum) so a future Rego/OPA bundle flows through the same contract without a
477
+ * schema-version bump. A runtime enforces only languages it actually embeds.
478
+ */
479
+ policyLanguage: require_schemas.string().nullish(),
480
+ /**
481
+ * Hex sha256 of `policySourceText` as served by the SSOT — byte-identical to
482
+ * `policy_revisions.composed_blob_hash` (#3246 PR5). Runtimes ECHO it onto
483
+ * acted decisions (`enforcement.composedBlobHash`) and Delegation challenges
484
+ * (`challenge.composed_blob_hash`) as the point-in-time revision pin; they
485
+ * never hash locally. Absent/null → plane omits the pin (older dashboards).
486
+ */
487
+ policySourceHash: require_schemas.string().nullish(),
488
+ /**
489
+ * Whether the engine should ACT on the composed policy (deployed-to-enforce).
490
+ * False → the composed policy is at most shadow-evaluated; the structured
491
+ * path / bespoke decision governs. Mirrors the gateway worker's act-gate
492
+ * (`engineEnforcementEnabled === true && enabled !== false`).
493
+ */
494
+ engineEnforcementEnabled: require_schemas.boolean().optional().default(false),
495
+ /**
496
+ * Trusted Layer-2 delegation root DIDs for the project's org (P2 / DR-1),
497
+ * server-resolved by the policy API. A consuming middleware forwards these
498
+ * into the engine's `ContextSpec.trustedDelegationRoots` so L2 delegation
499
+ * chains are pinned to the org DID. Absent ⇒ omitted, and the engine rejects
500
+ * delegation. Optional (no default)
501
+ * so a policy without the field round-trips as `undefined`, matching the
502
+ * policy API's `PolicyResponse` shape and the orchestrator's omit-when-unset
503
+ * contract.
504
+ */
505
+ trustedDelegationRoots: require_schemas.array(require_schemas.string()).optional(),
506
+ /**
507
+ * The org's one OAuth authorization server issuer (RFC 8414 `issuer`), as the
508
+ * platform's IssuerContext computes it (`https://<branded host or platform>/oauth/<slug>`).
509
+ * A middleware that serves protected resource metadata advertises exactly
510
+ * this in `authorization_servers` and never builds an issuer URL itself.
511
+ * Absent ⇒ the platform could not resolve the org; serve no metadata.
512
+ */
513
+ authorizationServerIssuer: require_schemas.string().url().optional()
514
+ });
515
+ /**
516
+ * Safely parse a policy configuration (returns null on error)
517
+ */
518
+ function safeParsePolicyConfig(data) {
519
+ const result = PolicyConfigSchema.safeParse(data);
520
+ return result.success ? result.data : null;
521
+ }
522
+
523
+ //#endregion
524
+ Object.defineProperty(exports, 'AllowListEntrySchema', {
525
+ enumerable: true,
526
+ get: function () {
527
+ return AllowListEntrySchema;
528
+ }
529
+ });
530
+ Object.defineProperty(exports, 'AssuranceTierSchema', {
531
+ enumerable: true,
532
+ get: function () {
533
+ return AssuranceTierSchema;
534
+ }
535
+ });
536
+ Object.defineProperty(exports, 'BlockReasonSchema', {
537
+ enumerable: true,
538
+ get: function () {
539
+ return BlockReasonSchema;
540
+ }
541
+ });
542
+ Object.defineProperty(exports, 'CACHE_TTL', {
543
+ enumerable: true,
544
+ get: function () {
545
+ return CACHE_TTL;
546
+ }
547
+ });
548
+ Object.defineProperty(exports, 'CONDITION_FIELDS', {
549
+ enumerable: true,
550
+ get: function () {
551
+ return CONDITION_FIELDS;
552
+ }
553
+ });
554
+ Object.defineProperty(exports, 'CONDITION_OPERATORS', {
555
+ enumerable: true,
556
+ get: function () {
557
+ return CONDITION_OPERATORS;
558
+ }
559
+ });
560
+ Object.defineProperty(exports, 'CURRENT_POLICY_VERSION', {
561
+ enumerable: true,
562
+ get: function () {
563
+ return CURRENT_POLICY_VERSION;
564
+ }
565
+ });
566
+ Object.defineProperty(exports, 'ChallengeParamsSchema', {
567
+ enumerable: true,
568
+ get: function () {
569
+ return ChallengeParamsSchema;
570
+ }
571
+ });
572
+ Object.defineProperty(exports, 'ConditionFieldSchema', {
573
+ enumerable: true,
574
+ get: function () {
575
+ return ConditionFieldSchema;
576
+ }
577
+ });
578
+ Object.defineProperty(exports, 'ConditionOperatorSchema', {
579
+ enumerable: true,
580
+ get: function () {
581
+ return ConditionOperatorSchema;
582
+ }
583
+ });
584
+ Object.defineProperty(exports, 'ConditionValueSchema', {
585
+ enumerable: true,
586
+ get: function () {
587
+ return ConditionValueSchema;
588
+ }
589
+ });
590
+ Object.defineProperty(exports, 'DEFAULT_POLICY', {
591
+ enumerable: true,
592
+ get: function () {
593
+ return DEFAULT_POLICY;
594
+ }
595
+ });
596
+ Object.defineProperty(exports, 'DEFAULT_RULE_PRIORITY', {
597
+ enumerable: true,
598
+ get: function () {
599
+ return DEFAULT_RULE_PRIORITY;
600
+ }
601
+ });
602
+ Object.defineProperty(exports, 'DEFAULT_THRESHOLDS', {
603
+ enumerable: true,
604
+ get: function () {
605
+ return DEFAULT_THRESHOLDS;
606
+ }
607
+ });
608
+ Object.defineProperty(exports, 'DecisionSchema', {
609
+ enumerable: true,
610
+ get: function () {
611
+ return DecisionSchema;
612
+ }
613
+ });
614
+ Object.defineProperty(exports, 'DenyListEntrySchema', {
615
+ enumerable: true,
616
+ get: function () {
617
+ return DenyListEntrySchema;
618
+ }
619
+ });
620
+ Object.defineProperty(exports, 'ENFORCEMENT_ACTIONS', {
621
+ enumerable: true,
622
+ get: function () {
623
+ return ENFORCEMENT_ACTIONS;
624
+ }
625
+ });
626
+ Object.defineProperty(exports, 'ENFORCEMENT_MODES', {
627
+ enumerable: true,
628
+ get: function () {
629
+ return ENFORCEMENT_MODES;
630
+ }
631
+ });
632
+ Object.defineProperty(exports, 'EnforcementActionSchema', {
633
+ enumerable: true,
634
+ get: function () {
635
+ return EnforcementActionSchema;
636
+ }
637
+ });
638
+ Object.defineProperty(exports, 'EnforcementModeSchema', {
639
+ enumerable: true,
640
+ get: function () {
641
+ return EnforcementModeSchema;
642
+ }
643
+ });
644
+ Object.defineProperty(exports, 'InstructPayloadSchema', {
645
+ enumerable: true,
646
+ get: function () {
647
+ return InstructPayloadSchema;
648
+ }
649
+ });
650
+ Object.defineProperty(exports, 'PolicyConditionSchema', {
651
+ enumerable: true,
652
+ get: function () {
653
+ return PolicyConditionSchema;
654
+ }
655
+ });
656
+ Object.defineProperty(exports, 'PolicyConfigSchema', {
657
+ enumerable: true,
658
+ get: function () {
659
+ return PolicyConfigSchema;
660
+ }
661
+ });
662
+ Object.defineProperty(exports, 'PolicyMetadataSchema', {
663
+ enumerable: true,
664
+ get: function () {
665
+ return PolicyMetadataSchema;
666
+ }
667
+ });
668
+ Object.defineProperty(exports, 'PolicyRuleSchema', {
669
+ enumerable: true,
670
+ get: function () {
671
+ return PolicyRuleSchema;
672
+ }
673
+ });
674
+ Object.defineProperty(exports, 'RedirectTargetSchema', {
675
+ enumerable: true,
676
+ get: function () {
677
+ return RedirectTargetSchema;
678
+ }
679
+ });
680
+ Object.defineProperty(exports, 'RuleMetadataSchema', {
681
+ enumerable: true,
682
+ get: function () {
683
+ return RuleMetadataSchema;
684
+ }
685
+ });
686
+ Object.defineProperty(exports, 'SuggestedActionSchema', {
687
+ enumerable: true,
688
+ get: function () {
689
+ return SuggestedActionSchema;
690
+ }
691
+ });
692
+ Object.defineProperty(exports, 'ThresholdConfigSchema', {
693
+ enumerable: true,
694
+ get: function () {
695
+ return ThresholdConfigSchema;
696
+ }
697
+ });
698
+ Object.defineProperty(exports, 'safeParsePolicyConfig', {
699
+ enumerable: true,
700
+ get: function () {
701
+ return safeParsePolicyConfig;
702
+ }
703
+ });