@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,52 @@
1
+ //#region src/core/detection-reason-codes.d.ts
2
+ declare const DETECTION_REASON_CODES: {
3
+ readonly SIGNATURE_VERIFIED: "detection/signature-verified";
4
+ readonly DELEGATION_VERIFIED: "detection/delegation-verified";
5
+ readonly MCP_I_VERIFIED: "detection/mcp-i-verified";
6
+ readonly DID_SIGNATURE_VERIFIED: "detection/did-signature-verified";
7
+ readonly RFC9421_SIGNATURE_VERIFIED: "detection/rfc9421-signature-verified";
8
+ readonly TIER1_ATTRIBUTION_VERIFIED: "detection/tier1-attribution-verified";
9
+ readonly A2A_VERIFIED: "detection/a2a-verified";
10
+ readonly VERIFICATION_ERROR: "detection/verification-error";
11
+ readonly UA_PATTERN_MATCH: "detection/ua-pattern-match";
12
+ readonly HEADER_HEURISTIC: "detection/header-heuristic";
13
+ readonly IP_HEURISTIC: "detection/ip-heuristic";
14
+ readonly VENDOR_IP_CORROBORATED: "detection/vendor-ip-corroborated";
15
+ readonly IP_INTELLIGENCE_PROXY_SIGNAL: "detection/ip-intelligence-proxy-signal";
16
+ readonly JA4_FINGERPRINT_MATCH: "detection/ja4-fingerprint-match";
17
+ readonly CLIENT_INTEGRITY_FAILURE: "detection/client-integrity-failure";
18
+ readonly UA_TLS_MISMATCH: "detection/ua-tls-mismatch";
19
+ readonly CLIENT_ATTRIBUTE_SIGNAL: "detection/client-attribute-signal";
20
+ readonly BEHAVIORAL_SIGNAL: "detection/behavioral-signal";
21
+ readonly MCP_I_SIGNAL: "detection/mcp-i-signal";
22
+ readonly KYA_HTTP_BINDING_SIGNAL: "detection/kya-http-binding-signal";
23
+ readonly KYA_DELEGATION_BEARER_SIGNAL: "detection/kya-delegation-bearer-signal";
24
+ readonly A2A_CARD_SIGNAL: "detection/a2a-card-signal";
25
+ readonly SCANNER_MISCLASSIFICATION_HINT_SIGNAL: "detection/scanner-misclassification-hint-signal";
26
+ readonly CLIENT_HEADLESS_ESCALATION_SIGNAL: "detection/client-headless-escalation-signal";
27
+ readonly CLOUDFLARE_BOT_MANAGEMENT_SIGNAL: "detection/cloudflare-bot-management-signal";
28
+ readonly SESSION_VELOCITY_SIGNAL: "detection/session-velocity-signal";
29
+ readonly TIER1_ATTRIBUTION_SIGNAL: "detection/tier1-attribution-signal";
30
+ readonly AI_CRAWLER_FLAG: "detection/ai-crawler-flag";
31
+ readonly ZERO_EVIDENCE_HUMAN: "detection/zero-evidence-human";
32
+ readonly INCOMPLETE_DATA_OVERRIDE: "detection/incomplete-data-override";
33
+ readonly CLASSIFIED_WITHOUT_SIGNAL_EVIDENCE: "detection/classified-without-signal-evidence";
34
+ };
35
+ type DetectionReasonCode = (typeof DETECTION_REASON_CODES)[keyof typeof DETECTION_REASON_CODES];
36
+ //#endregion
37
+ //#region src/core/detection-reason-mapping.d.ts
38
+ interface ReasonCodeDetectionFacts {
39
+ verificationMethod?: string | null;
40
+ signals?: ReadonlyArray<{
41
+ source: string;
42
+ }> | null;
43
+ isAiCrawler?: boolean | null;
44
+ detectionClass?: string | null;
45
+ }
46
+ declare function mapDetectionToReasonCodes(detail: ReasonCodeDetectionFacts): DetectionReasonCode[];
47
+ declare const MAX_REASON_CODES_ON_WIRE = 5;
48
+ declare const MAX_REASON_CODES_HEADER_BYTES = 256;
49
+ declare function formatReasonCodesHeader(codes: readonly DetectionReasonCode[]): string;
50
+ //#endregion
51
+ export { mapDetectionToReasonCodes as a, formatReasonCodesHeader as i, MAX_REASON_CODES_ON_WIRE as n, DETECTION_REASON_CODES as o, ReasonCodeDetectionFacts as r, DetectionReasonCode as s, MAX_REASON_CODES_HEADER_BYTES as t };
52
+ //# sourceMappingURL=detection-reason-mapping-CQexNvR7.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detection-reason-mapping-CQexNvR7.d.ts","names":[],"sources":["../src/core/detection-reason-codes.ts","../src/core/detection-reason-mapping.ts"],"mappings":";cAmCa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2ED,8BACF,qCAAqC;;;UC9E9B;EAEf;EAEA,UAAU;IAAgB;;EAE1B;EAEA;;iBAqEc,0BAA0B,QAAQ,2BAA2B;cA0EhE;cAEA;iBAYG,wBAAwB,gBAAgB"}
@@ -0,0 +1,39 @@
1
+ //#region src/policy/challenge-type.ts
2
+ /**
3
+ * Normalize a wire `challengeType` to the kind every renderer must treat it
4
+ * as. Absent or unrecognized (a future engine-added kind) falls closed to
5
+ * `'delegation'`, the pre-existing MCP-I Level 2+ handshake every renderer
6
+ * already understands; it is never thrown or silently dropped. Kept apart
7
+ * from the policy schemas (`./schemas.ts`, Zod) so request-path code can take
8
+ * it from the `./policy/enforcement` lean entry.
9
+ */
10
+ function normalizeChallengeType(challengeType) {
11
+ return challengeType === "browser_integrity" || challengeType === "human_step_up" ? challengeType : "delegation";
12
+ }
13
+
14
+ //#endregion
15
+ //#region src/policy/engine-enforcing.ts
16
+ /**
17
+ * The act-gate for a composed policy: the engine acts on it only when engine
18
+ * enforcement is switched on and the policy is not disabled. Otherwise the
19
+ * composed policy is at most shadow-evaluated. Kept apart from `schemas.ts`,
20
+ * which builds Zod schemas when it loads, so request-time callers can use it
21
+ * without loading Zod.
22
+ */
23
+ function isEngineEnforcing(flags) {
24
+ return flags.engineEnforcementEnabled === true && flags.enabled !== false;
25
+ }
26
+
27
+ //#endregion
28
+ Object.defineProperty(exports, 'isEngineEnforcing', {
29
+ enumerable: true,
30
+ get: function () {
31
+ return isEngineEnforcing;
32
+ }
33
+ });
34
+ Object.defineProperty(exports, 'normalizeChallengeType', {
35
+ enumerable: true,
36
+ get: function () {
37
+ return normalizeChallengeType;
38
+ }
39
+ });
@@ -0,0 +1,29 @@
1
+ //#region src/policy/challenge-type.ts
2
+ /**
3
+ * Normalize a wire `challengeType` to the kind every renderer must treat it
4
+ * as. Absent or unrecognized (a future engine-added kind) falls closed to
5
+ * `'delegation'`, the pre-existing MCP-I Level 2+ handshake every renderer
6
+ * already understands; it is never thrown or silently dropped. Kept apart
7
+ * from the policy schemas (`./schemas.ts`, Zod) so request-path code can take
8
+ * it from the `./policy/enforcement` lean entry.
9
+ */
10
+ function normalizeChallengeType(challengeType) {
11
+ return challengeType === "browser_integrity" || challengeType === "human_step_up" ? challengeType : "delegation";
12
+ }
13
+
14
+ //#endregion
15
+ //#region src/policy/engine-enforcing.ts
16
+ /**
17
+ * The act-gate for a composed policy: the engine acts on it only when engine
18
+ * enforcement is switched on and the policy is not disabled. Otherwise the
19
+ * composed policy is at most shadow-evaluated. Kept apart from `schemas.ts`,
20
+ * which builds Zod schemas when it loads, so request-time callers can use it
21
+ * without loading Zod.
22
+ */
23
+ function isEngineEnforcing(flags) {
24
+ return flags.engineEnforcementEnabled === true && flags.enabled !== false;
25
+ }
26
+
27
+ //#endregion
28
+ export { normalizeChallengeType as n, isEngineEnforcing as t };
29
+ //# sourceMappingURL=engine-enforcing-B5eNfCpG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-enforcing-B5eNfCpG.mjs","names":[],"sources":["../src/policy/challenge-type.ts","../src/policy/engine-enforcing.ts"],"sourcesContent":["/**\n * Normalize a wire `challengeType` to the kind every renderer must treat it\n * as. Absent or unrecognized (a future engine-added kind) falls closed to\n * `'delegation'`, the pre-existing MCP-I Level 2+ handshake every renderer\n * already understands; it is never thrown or silently dropped. Kept apart\n * from the policy schemas (`./schemas.ts`, Zod) so request-path code can take\n * it from the `./policy/enforcement` lean entry.\n */\nexport function normalizeChallengeType(\n challengeType: string | undefined\n): 'delegation' | 'browser_integrity' | 'human_step_up' {\n return challengeType === 'browser_integrity' || challengeType === 'human_step_up'\n ? challengeType\n : 'delegation';\n}\n","/**\n * The act-gate for a composed policy: the engine acts on it only when engine\n * enforcement is switched on and the policy is not disabled. Otherwise the\n * composed policy is at most shadow-evaluated. Kept apart from `schemas.ts`,\n * which builds Zod schemas when it loads, so request-time callers can use it\n * without loading Zod.\n */\nexport function isEngineEnforcing(flags: {\n engineEnforcementEnabled?: boolean | null;\n enabled?: boolean | null;\n}): boolean {\n return flags.engineEnforcementEnabled === true && flags.enabled !== false;\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,uBACd,eACsD;CACtD,OAAO,kBAAkB,uBAAuB,kBAAkB,kBAC9D,gBACA;AACN;;;;;;;;;;;ACPA,SAAgB,kBAAkB,OAGtB;CACV,OAAO,MAAM,6BAA6B,QAAQ,MAAM,YAAY;AACtE"}
@@ -0,0 +1,11 @@
1
+ //#region src/policy/challenge-type.d.ts
2
+ declare function normalizeChallengeType(challengeType: string | undefined): 'delegation' | 'browser_integrity' | 'human_step_up';
3
+ //#endregion
4
+ //#region src/policy/engine-enforcing.d.ts
5
+ declare function isEngineEnforcing(flags: {
6
+ engineEnforcementEnabled?: boolean | null;
7
+ enabled?: boolean | null;
8
+ }): boolean;
9
+ //#endregion
10
+ export { normalizeChallengeType as n, isEngineEnforcing as t };
11
+ //# sourceMappingURL=engine-enforcing-DiOclGqf.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-enforcing-DiOclGqf.d.mts","names":[],"sources":["../src/policy/challenge-type.ts","../src/policy/engine-enforcing.ts"],"mappings":";iBAQgB,uBACd;;;iBCFc,kBAAkB;EAChC;EACA"}
@@ -0,0 +1,11 @@
1
+ //#region src/policy/challenge-type.d.ts
2
+ declare function normalizeChallengeType(challengeType: string | undefined): 'delegation' | 'browser_integrity' | 'human_step_up';
3
+ //#endregion
4
+ //#region src/policy/engine-enforcing.d.ts
5
+ declare function isEngineEnforcing(flags: {
6
+ engineEnforcementEnabled?: boolean | null;
7
+ enabled?: boolean | null;
8
+ }): boolean;
9
+ //#endregion
10
+ export { normalizeChallengeType as n, isEngineEnforcing as t };
11
+ //# sourceMappingURL=engine-enforcing-DiOclGqf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-enforcing-DiOclGqf.d.ts","names":[],"sources":["../src/policy/challenge-type.ts","../src/policy/engine-enforcing.ts"],"mappings":";iBAQgB,uBACd;;;iBCFc,kBAAkB;EAChC;EACA"}
@@ -0,0 +1,2 @@
1
+ import { t as RULESET_HASH_REGEX } from "./ruleset-hash-IRN5eI9H.mjs";
2
+ export { RULESET_HASH_REGEX };
@@ -0,0 +1,2 @@
1
+ import { t as RULESET_HASH_REGEX } from "./ruleset-hash-IRN5eI9H.js";
2
+ export { RULESET_HASH_REGEX };
@@ -0,0 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_ruleset_hash = require('./ruleset-hash-Cmv8MSO5.js');
3
+
4
+ exports.RULESET_HASH_REGEX = require_ruleset_hash.RULESET_HASH_REGEX;
@@ -0,0 +1,3 @@
1
+ import { t as RULESET_HASH_REGEX } from "./ruleset-hash-QQIaLuPi.mjs";
2
+
3
+ export { RULESET_HASH_REGEX };
@@ -127,10 +127,14 @@ export declare const ERROR_CODES: {
127
127
  readonly LOWERCASE_PROOF_VALIDATION_ERROR: "proof_validation_error";
128
128
  readonly LOWERCASE_INSUFFICIENT_SCOPES: "insufficient_scopes";
129
129
  readonly LOWERCASE_DELEGATION_VALIDATION_ERROR: "delegation_validation_error";
130
+ readonly GRANT_PREDATES_ISSUANCE_CORE: "grant_predates_issuance_core";
130
131
  readonly LOWERCASE_INVALID_HTTP_REGISTRATION: "invalid_http_registration";
132
+ readonly LOWERCASE_POLICY_REVISION_MISMATCH: "policy_revision_mismatch";
133
+ readonly LOWERCASE_POLICY_REVISION_GRACE_UNAVAILABLE: "policy_revision_grace_unavailable";
131
134
  readonly LOWERCASE_AUTHORIZATION_HOST_UNAVAILABLE: "authorization_host_unavailable";
132
135
  readonly LOWERCASE_INVALID_JSON: "invalid_json";
133
136
  readonly LOWERCASE_VALIDATION_ERROR: "validation_error";
137
+ readonly LOWERCASE_INVALID_CURSOR: "invalid_cursor";
134
138
  readonly BARE_VALIDATION_ERROR: "VALIDATION_ERROR";
135
139
  readonly BARE_INTERNAL_ERROR: "INTERNAL_ERROR";
136
140
  readonly BARE_INVALID_REQUEST: "INVALID_REQUEST";
@@ -165,6 +169,7 @@ export declare const ERROR_CODES: {
165
169
  readonly CONTENT_TYPE_NOT_SUPPORTED: "API_CONTENT_TYPE_NOT_SUPPORTED";
166
170
  readonly RESPONSE_TOO_LARGE: "API_RESPONSE_TOO_LARGE";
167
171
  readonly REQUEST_TOO_LARGE: "API_REQUEST_TOO_LARGE";
172
+ readonly ENDPOINT_RETIRED: "API_ENDPOINT_RETIRED";
168
173
  readonly PIXEL_NOT_FOUND: "PIXEL_NOT_FOUND";
169
174
  readonly PIXEL_DISABLED: "PIXEL_DISABLED";
170
175
  readonly PIXEL_CONFIGURATION_ERROR: "PIXEL_CONFIGURATION_ERROR";
@@ -193,6 +198,7 @@ export declare const ERROR_CODES: {
193
198
  readonly TRANSACTION_FAILED: "TRANSACTION_FAILED";
194
199
  readonly DELETE_FAILED: "DELETE_FAILED";
195
200
  readonly PARTITION_RETIREMENT_IN_PROGRESS: "PARTITION_RETIREMENT_IN_PROGRESS";
201
+ readonly FLY_CLEANUP_FAILED: "FLY_CLEANUP_FAILED";
196
202
  readonly CONNECTION_FAILED: "NETWORK_CONNECTION_FAILED";
197
203
  readonly TIMEOUT: "NETWORK_TIMEOUT";
198
204
  readonly DNS_RESOLUTION_FAILED: "NETWORK_DNS_FAILED";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/constants/errors.ts","../../src/constants/pick-error-codes.ts"],"mappings":";qBAkXa;;;;;;;;;;;;;;;;;;;;;;qBA4FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BD,oBAAoB,0BAA0B;qBAK7C,gBAAgB,OAAO;qBA8UvB,oBAAoB,QAAQ,OAAO;;;KC3zBpC,4BAA4B;KAE5B,iBAAiB,mBAAmB,8BACpC,KAAK,oBAAoB,aAAa;wBAUlC,qBAAqB,mBAAmB,gBACtD,MAAM,IACL,iBAAiB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/constants/errors.ts","../../src/constants/pick-error-codes.ts"],"mappings":";qBA+Xa;;;;;;;;;;;;;;;;;;;;;;qBA4FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BD,oBAAoB,0BAA0B;qBAK7C,gBAAgB,OAAO;qBAyVvB,oBAAoB,QAAQ,OAAO;;;KCn1BpC,4BAA4B;KAE5B,iBAAiB,mBAAmB,8BACpC,KAAK,oBAAoB,aAAa;wBAUlC,qBAAqB,mBAAmB,gBACtD,MAAM,IACL,iBAAiB"}
@@ -127,10 +127,14 @@ export declare const ERROR_CODES: {
127
127
  readonly LOWERCASE_PROOF_VALIDATION_ERROR: "proof_validation_error";
128
128
  readonly LOWERCASE_INSUFFICIENT_SCOPES: "insufficient_scopes";
129
129
  readonly LOWERCASE_DELEGATION_VALIDATION_ERROR: "delegation_validation_error";
130
+ readonly GRANT_PREDATES_ISSUANCE_CORE: "grant_predates_issuance_core";
130
131
  readonly LOWERCASE_INVALID_HTTP_REGISTRATION: "invalid_http_registration";
132
+ readonly LOWERCASE_POLICY_REVISION_MISMATCH: "policy_revision_mismatch";
133
+ readonly LOWERCASE_POLICY_REVISION_GRACE_UNAVAILABLE: "policy_revision_grace_unavailable";
131
134
  readonly LOWERCASE_AUTHORIZATION_HOST_UNAVAILABLE: "authorization_host_unavailable";
132
135
  readonly LOWERCASE_INVALID_JSON: "invalid_json";
133
136
  readonly LOWERCASE_VALIDATION_ERROR: "validation_error";
137
+ readonly LOWERCASE_INVALID_CURSOR: "invalid_cursor";
134
138
  readonly BARE_VALIDATION_ERROR: "VALIDATION_ERROR";
135
139
  readonly BARE_INTERNAL_ERROR: "INTERNAL_ERROR";
136
140
  readonly BARE_INVALID_REQUEST: "INVALID_REQUEST";
@@ -165,6 +169,7 @@ export declare const ERROR_CODES: {
165
169
  readonly CONTENT_TYPE_NOT_SUPPORTED: "API_CONTENT_TYPE_NOT_SUPPORTED";
166
170
  readonly RESPONSE_TOO_LARGE: "API_RESPONSE_TOO_LARGE";
167
171
  readonly REQUEST_TOO_LARGE: "API_REQUEST_TOO_LARGE";
172
+ readonly ENDPOINT_RETIRED: "API_ENDPOINT_RETIRED";
168
173
  readonly PIXEL_NOT_FOUND: "PIXEL_NOT_FOUND";
169
174
  readonly PIXEL_DISABLED: "PIXEL_DISABLED";
170
175
  readonly PIXEL_CONFIGURATION_ERROR: "PIXEL_CONFIGURATION_ERROR";
@@ -193,6 +198,7 @@ export declare const ERROR_CODES: {
193
198
  readonly TRANSACTION_FAILED: "TRANSACTION_FAILED";
194
199
  readonly DELETE_FAILED: "DELETE_FAILED";
195
200
  readonly PARTITION_RETIREMENT_IN_PROGRESS: "PARTITION_RETIREMENT_IN_PROGRESS";
201
+ readonly FLY_CLEANUP_FAILED: "FLY_CLEANUP_FAILED";
196
202
  readonly CONNECTION_FAILED: "NETWORK_CONNECTION_FAILED";
197
203
  readonly TIMEOUT: "NETWORK_TIMEOUT";
198
204
  readonly DNS_RESOLUTION_FAILED: "NETWORK_DNS_FAILED";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/constants/errors.ts","../../src/constants/pick-error-codes.ts"],"mappings":";qBAkXa;;;;;;;;;;;;;;;;;;;;;;qBA4FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BD,oBAAoB,0BAA0B;qBAK7C,gBAAgB,OAAO;qBA8UvB,oBAAoB,QAAQ,OAAO;;;KC3zBpC,4BAA4B;KAE5B,iBAAiB,mBAAmB,8BACpC,KAAK,oBAAoB,aAAa;wBAUlC,qBAAqB,mBAAmB,gBACtD,MAAM,IACL,iBAAiB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/constants/errors.ts","../../src/constants/pick-error-codes.ts"],"mappings":";qBA+Xa;;;;;;;;;;;;;;;;;;;;;;qBA4FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BD,oBAAoB,0BAA0B;qBAK7C,gBAAgB,OAAO;qBAyVvB,oBAAoB,QAAQ,OAAO;;;KCn1BpC,4BAA4B;KAE5B,iBAAiB,mBAAmB,8BACpC,KAAK,oBAAoB,aAAa;wBAUlC,qBAAqB,mBAAmB,gBACtD,MAAM,IACL,iBAAiB"}
@@ -96,7 +96,8 @@ const INTERNAL_ERRORS = {
96
96
  SERVICE_UNAVAILABLE_TRANSIENT: "SERVICE_UNAVAILABLE_TRANSIENT",
97
97
  TRANSACTION_FAILED: "TRANSACTION_FAILED",
98
98
  DELETE_FAILED: "DELETE_FAILED",
99
- PARTITION_RETIREMENT_IN_PROGRESS: "PARTITION_RETIREMENT_IN_PROGRESS"
99
+ PARTITION_RETIREMENT_IN_PROGRESS: "PARTITION_RETIREMENT_IN_PROGRESS",
100
+ FLY_CLEANUP_FAILED: "FLY_CLEANUP_FAILED"
100
101
  };
101
102
  /**
102
103
  * Session Error Codes
@@ -134,7 +135,8 @@ const API_ERRORS = {
134
135
  VERSION_NOT_SUPPORTED: "API_VERSION_NOT_SUPPORTED",
135
136
  CONTENT_TYPE_NOT_SUPPORTED: "API_CONTENT_TYPE_NOT_SUPPORTED",
136
137
  RESPONSE_TOO_LARGE: "API_RESPONSE_TOO_LARGE",
137
- REQUEST_TOO_LARGE: "API_REQUEST_TOO_LARGE"
138
+ REQUEST_TOO_LARGE: "API_REQUEST_TOO_LARGE",
139
+ ENDPOINT_RETIRED: "API_ENDPOINT_RETIRED"
138
140
  };
139
141
  /**
140
142
  * Billing Error Codes
@@ -207,12 +209,17 @@ const BARE_ERRORS = {
207
209
  * Lowercase Error Codes
208
210
  *
209
211
  * Lowercase wire strings are the SPEC-EVENTS wire format used by
210
- * /api/v1/kya-os/events and reused by the bouncer family. Keyed by value
211
- * with a LOWERCASE_ prefix.
212
+ * /api/v1/kya-os/events and /api/v1/kya-os/revocations, and reused by the
213
+ * bouncer family. Keyed by value with a LOWERCASE_ prefix.
214
+ *
215
+ * `invalid_cursor` is the revocation feed's answer to a `since` it did not
216
+ * issue for the key's project; consumers drop their cursor and read the feed
217
+ * from the start on exactly this code.
212
218
  */
213
219
  const LOWERCASE_ERRORS = {
214
220
  LOWERCASE_INVALID_JSON: "invalid_json",
215
- LOWERCASE_VALIDATION_ERROR: "validation_error"
221
+ LOWERCASE_VALIDATION_ERROR: "validation_error",
222
+ LOWERCASE_INVALID_CURSOR: "invalid_cursor"
216
223
  };
217
224
  /**
218
225
  * Bouncer Error Codes (lower-case wire format)
@@ -249,7 +256,10 @@ const BOUNCER_LOWERCASE_ERRORS = {
249
256
  LOWERCASE_PROOF_VALIDATION_ERROR: "proof_validation_error",
250
257
  LOWERCASE_INSUFFICIENT_SCOPES: "insufficient_scopes",
251
258
  LOWERCASE_DELEGATION_VALIDATION_ERROR: "delegation_validation_error",
259
+ GRANT_PREDATES_ISSUANCE_CORE: "grant_predates_issuance_core",
252
260
  LOWERCASE_INVALID_HTTP_REGISTRATION: "invalid_http_registration",
261
+ LOWERCASE_POLICY_REVISION_MISMATCH: "policy_revision_mismatch",
262
+ LOWERCASE_POLICY_REVISION_GRACE_UNAVAILABLE: "policy_revision_grace_unavailable",
253
263
  LOWERCASE_AUTHORIZATION_HOST_UNAVAILABLE: "authorization_host_unavailable"
254
264
  };
255
265
  /**
@@ -498,9 +508,10 @@ const ERROR_MESSAGES = {
498
508
  [INTERNAL_ERRORS.PROCESSING_ERROR]: "Processing error",
499
509
  [INTERNAL_ERRORS.UNKNOWN_ERROR]: "An unknown error occurred",
500
510
  [INTERNAL_ERRORS.SERVICE_UNAVAILABLE_TRANSIENT]: "A dependency is temporarily unavailable. Retry shortly.",
501
- [INTERNAL_ERRORS.TRANSACTION_FAILED]: "The deletion failed because of a database error. Nothing was deleted.",
511
+ [INTERNAL_ERRORS.TRANSACTION_FAILED]: "The deletion failed because of a database error. The project was not deleted.",
502
512
  [INTERNAL_ERRORS.DELETE_FAILED]: "Failed to delete project",
503
513
  [INTERNAL_ERRORS.PARTITION_RETIREMENT_IN_PROGRESS]: "The project data is being archived. Retry shortly.",
514
+ [INTERNAL_ERRORS.FLY_CLEANUP_FAILED]: "Couldn't stop a managed agent's machine, so the delete was refused. Retry the delete.",
504
515
  [SESSION_ERRORS.SESSION_NOT_FOUND]: "Session not found",
505
516
  [SESSION_ERRORS.SESSION_EXPIRED]: "Session has expired",
506
517
  [SESSION_ERRORS.SESSION_INVALID]: "Session is invalid",
@@ -524,6 +535,7 @@ const ERROR_MESSAGES = {
524
535
  [API_ERRORS.CONTENT_TYPE_NOT_SUPPORTED]: "Content type not supported",
525
536
  [API_ERRORS.RESPONSE_TOO_LARGE]: "Response exceeds maximum size",
526
537
  [API_ERRORS.REQUEST_TOO_LARGE]: "Request exceeds maximum size",
538
+ [API_ERRORS.ENDPOINT_RETIRED]: "This endpoint has been retired",
527
539
  [BILLING_ERRORS.LIMIT_EXCEEDED]: "Billing limit exceeded",
528
540
  [BILLING_ERRORS.BILLING_SUSPENDED]: "Account billing suspended",
529
541
  [BILLING_ERRORS.BILLING_GRACE_PERIOD]: "Account in billing grace period",
@@ -554,6 +566,7 @@ const ERROR_MESSAGES = {
554
566
  [BARE_ERRORS.BARE_FORBIDDEN]: "Forbidden",
555
567
  [LOWERCASE_ERRORS.LOWERCASE_INVALID_JSON]: "Request body must be valid JSON",
556
568
  [LOWERCASE_ERRORS.LOWERCASE_VALIDATION_ERROR]: "Invalid request body",
569
+ [LOWERCASE_ERRORS.LOWERCASE_INVALID_CURSOR]: "The cursor was not issued by this feed for this project; read from the start",
557
570
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_NO_PROJECT]: "API key is not associated with a project",
558
571
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_MISSING_AGENT_DID]: "agent_did query parameter is required",
559
572
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_NOT_CONFIGURED]: "Bouncer is not configured for this project",
@@ -579,7 +592,10 @@ const ERROR_MESSAGES = {
579
592
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_PROOF_VALIDATION_ERROR]: "Proof validation failed",
580
593
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INSUFFICIENT_SCOPES]: "Missing required scopes",
581
594
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_DELEGATION_VALIDATION_ERROR]: "Delegation validation failed",
595
+ [BOUNCER_LOWERCASE_ERRORS.GRANT_PREDATES_ISSUANCE_CORE]: "The grant predates the issuance core; authorize again",
582
596
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INVALID_HTTP_REGISTRATION]: "Invalid or unsupported native HTTP registration",
597
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_MISMATCH]: "The registered tool protection revision is not the one served to this project",
598
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_GRACE_UNAVAILABLE]: "The audit record for a registration on the previous tool protection revision could not be written; retry the registration",
583
599
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AUTHORIZATION_HOST_UNAVAILABLE]: "Authorization host is a project deployment that cannot currently serve consent",
584
600
  [OAUTH_LOWERCASE_ERRORS.LOWERCASE_INVALID_REQUEST]: "Invalid request body",
585
601
  [OAUTH_LOWERCASE_ERRORS.LOWERCASE_UNSUPPORTED_GRANT_TYPE]: "Only authorization_code grant type is supported",
@@ -688,6 +704,7 @@ const ERROR_STATUS_CODES = {
688
704
  [BARE_ERRORS.BARE_INVALID_DATE]: 400,
689
705
  [LOWERCASE_ERRORS.LOWERCASE_INVALID_JSON]: 400,
690
706
  [LOWERCASE_ERRORS.LOWERCASE_VALIDATION_ERROR]: 400,
707
+ [LOWERCASE_ERRORS.LOWERCASE_INVALID_CURSOR]: 400,
691
708
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_NO_PROJECT]: 400,
692
709
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_MISSING_AGENT_DID]: 400,
693
710
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_NOT_CONFIGURED]: 400,
@@ -738,6 +755,8 @@ const ERROR_STATUS_CODES = {
738
755
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_FORBIDDEN]: 403,
739
756
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AGENT_DENIED]: 403,
740
757
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INSUFFICIENT_SCOPES]: 403,
758
+ [BOUNCER_LOWERCASE_ERRORS.GRANT_PREDATES_ISSUANCE_CORE]: 409,
759
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_MISMATCH]: 409,
741
760
  [AUDIT_PROTOCOL_ERRORS.AUDIT_UNAUTHORIZED_SUBMISSION]: 403,
742
761
  [KYAOS_PROTOCOL_ERRORS.KYAOS_SLASH_ISSUER_FORBIDDEN]: 403,
743
762
  [KYAOS_PROTOCOL_ERRORS.KYAOS_SLASH_SCOPE_INSUFFICIENT]: 403,
@@ -759,6 +778,7 @@ const ERROR_STATUS_CODES = {
759
778
  [GATEWAY_VAULT_ERRORS.OAUTH_EXPIRED]: 403,
760
779
  [PERMISSION_ERRORS.RESOURCE_NOT_FOUND]: 404,
761
780
  [API_ERRORS.ENDPOINT_NOT_FOUND]: 404,
781
+ [API_ERRORS.ENDPOINT_RETIRED]: 410,
762
782
  [PIXEL_ERRORS.PIXEL_NOT_FOUND]: 404,
763
783
  [SESSION_ERRORS.SESSION_NOT_FOUND]: 404,
764
784
  [DEPLOY_ERRORS.USER_NOT_FOUND]: 404,
@@ -830,10 +850,12 @@ const ERROR_STATUS_CODES = {
830
850
  [AUDIT_PROTOCOL_ERRORS.AUDIT_MIRROR_OUT_OF_ORDER]: 500,
831
851
  [GATEWAY_VAULT_ERRORS.GATEWAY_NOT_CONFIGURED]: 500,
832
852
  [NETWORK_ERRORS.UPSTREAM_ERROR]: 502,
853
+ [INTERNAL_ERRORS.FLY_CLEANUP_FAILED]: 502,
833
854
  [INTERNAL_ERRORS.INITIALIZATION_ERROR]: 503,
834
855
  [INTERNAL_ERRORS.SERVICE_UNAVAILABLE_TRANSIENT]: 503,
835
856
  [INTERNAL_ERRORS.PARTITION_RETIREMENT_IN_PROGRESS]: 503,
836
857
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AUTHORIZATION_HOST_UNAVAILABLE]: 503,
858
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_GRACE_UNAVAILABLE]: 503,
837
859
  [OAUTH_LOWERCASE_ERRORS.LOWERCASE_OAUTH_UNAVAILABLE]: 503,
838
860
  [AUDIT_PROTOCOL_ERRORS.AUDIT_INVALID_CONFIGURATION]: 503,
839
861
  [AUDIT_PROTOCOL_ERRORS.AUDIT_JOURNAL_FAILURE]: 503,
@@ -95,7 +95,8 @@ const INTERNAL_ERRORS = {
95
95
  SERVICE_UNAVAILABLE_TRANSIENT: "SERVICE_UNAVAILABLE_TRANSIENT",
96
96
  TRANSACTION_FAILED: "TRANSACTION_FAILED",
97
97
  DELETE_FAILED: "DELETE_FAILED",
98
- PARTITION_RETIREMENT_IN_PROGRESS: "PARTITION_RETIREMENT_IN_PROGRESS"
98
+ PARTITION_RETIREMENT_IN_PROGRESS: "PARTITION_RETIREMENT_IN_PROGRESS",
99
+ FLY_CLEANUP_FAILED: "FLY_CLEANUP_FAILED"
99
100
  };
100
101
  /**
101
102
  * Session Error Codes
@@ -133,7 +134,8 @@ const API_ERRORS = {
133
134
  VERSION_NOT_SUPPORTED: "API_VERSION_NOT_SUPPORTED",
134
135
  CONTENT_TYPE_NOT_SUPPORTED: "API_CONTENT_TYPE_NOT_SUPPORTED",
135
136
  RESPONSE_TOO_LARGE: "API_RESPONSE_TOO_LARGE",
136
- REQUEST_TOO_LARGE: "API_REQUEST_TOO_LARGE"
137
+ REQUEST_TOO_LARGE: "API_REQUEST_TOO_LARGE",
138
+ ENDPOINT_RETIRED: "API_ENDPOINT_RETIRED"
137
139
  };
138
140
  /**
139
141
  * Billing Error Codes
@@ -206,12 +208,17 @@ const BARE_ERRORS = {
206
208
  * Lowercase Error Codes
207
209
  *
208
210
  * Lowercase wire strings are the SPEC-EVENTS wire format used by
209
- * /api/v1/kya-os/events and reused by the bouncer family. Keyed by value
210
- * with a LOWERCASE_ prefix.
211
+ * /api/v1/kya-os/events and /api/v1/kya-os/revocations, and reused by the
212
+ * bouncer family. Keyed by value with a LOWERCASE_ prefix.
213
+ *
214
+ * `invalid_cursor` is the revocation feed's answer to a `since` it did not
215
+ * issue for the key's project; consumers drop their cursor and read the feed
216
+ * from the start on exactly this code.
211
217
  */
212
218
  const LOWERCASE_ERRORS = {
213
219
  LOWERCASE_INVALID_JSON: "invalid_json",
214
- LOWERCASE_VALIDATION_ERROR: "validation_error"
220
+ LOWERCASE_VALIDATION_ERROR: "validation_error",
221
+ LOWERCASE_INVALID_CURSOR: "invalid_cursor"
215
222
  };
216
223
  /**
217
224
  * Bouncer Error Codes (lower-case wire format)
@@ -248,7 +255,10 @@ const BOUNCER_LOWERCASE_ERRORS = {
248
255
  LOWERCASE_PROOF_VALIDATION_ERROR: "proof_validation_error",
249
256
  LOWERCASE_INSUFFICIENT_SCOPES: "insufficient_scopes",
250
257
  LOWERCASE_DELEGATION_VALIDATION_ERROR: "delegation_validation_error",
258
+ GRANT_PREDATES_ISSUANCE_CORE: "grant_predates_issuance_core",
251
259
  LOWERCASE_INVALID_HTTP_REGISTRATION: "invalid_http_registration",
260
+ LOWERCASE_POLICY_REVISION_MISMATCH: "policy_revision_mismatch",
261
+ LOWERCASE_POLICY_REVISION_GRACE_UNAVAILABLE: "policy_revision_grace_unavailable",
252
262
  LOWERCASE_AUTHORIZATION_HOST_UNAVAILABLE: "authorization_host_unavailable"
253
263
  };
254
264
  /**
@@ -497,9 +507,10 @@ const ERROR_MESSAGES = {
497
507
  [INTERNAL_ERRORS.PROCESSING_ERROR]: "Processing error",
498
508
  [INTERNAL_ERRORS.UNKNOWN_ERROR]: "An unknown error occurred",
499
509
  [INTERNAL_ERRORS.SERVICE_UNAVAILABLE_TRANSIENT]: "A dependency is temporarily unavailable. Retry shortly.",
500
- [INTERNAL_ERRORS.TRANSACTION_FAILED]: "The deletion failed because of a database error. Nothing was deleted.",
510
+ [INTERNAL_ERRORS.TRANSACTION_FAILED]: "The deletion failed because of a database error. The project was not deleted.",
501
511
  [INTERNAL_ERRORS.DELETE_FAILED]: "Failed to delete project",
502
512
  [INTERNAL_ERRORS.PARTITION_RETIREMENT_IN_PROGRESS]: "The project data is being archived. Retry shortly.",
513
+ [INTERNAL_ERRORS.FLY_CLEANUP_FAILED]: "Couldn't stop a managed agent's machine, so the delete was refused. Retry the delete.",
503
514
  [SESSION_ERRORS.SESSION_NOT_FOUND]: "Session not found",
504
515
  [SESSION_ERRORS.SESSION_EXPIRED]: "Session has expired",
505
516
  [SESSION_ERRORS.SESSION_INVALID]: "Session is invalid",
@@ -523,6 +534,7 @@ const ERROR_MESSAGES = {
523
534
  [API_ERRORS.CONTENT_TYPE_NOT_SUPPORTED]: "Content type not supported",
524
535
  [API_ERRORS.RESPONSE_TOO_LARGE]: "Response exceeds maximum size",
525
536
  [API_ERRORS.REQUEST_TOO_LARGE]: "Request exceeds maximum size",
537
+ [API_ERRORS.ENDPOINT_RETIRED]: "This endpoint has been retired",
526
538
  [BILLING_ERRORS.LIMIT_EXCEEDED]: "Billing limit exceeded",
527
539
  [BILLING_ERRORS.BILLING_SUSPENDED]: "Account billing suspended",
528
540
  [BILLING_ERRORS.BILLING_GRACE_PERIOD]: "Account in billing grace period",
@@ -553,6 +565,7 @@ const ERROR_MESSAGES = {
553
565
  [BARE_ERRORS.BARE_FORBIDDEN]: "Forbidden",
554
566
  [LOWERCASE_ERRORS.LOWERCASE_INVALID_JSON]: "Request body must be valid JSON",
555
567
  [LOWERCASE_ERRORS.LOWERCASE_VALIDATION_ERROR]: "Invalid request body",
568
+ [LOWERCASE_ERRORS.LOWERCASE_INVALID_CURSOR]: "The cursor was not issued by this feed for this project; read from the start",
556
569
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_NO_PROJECT]: "API key is not associated with a project",
557
570
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_MISSING_AGENT_DID]: "agent_did query parameter is required",
558
571
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_NOT_CONFIGURED]: "Bouncer is not configured for this project",
@@ -578,7 +591,10 @@ const ERROR_MESSAGES = {
578
591
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_PROOF_VALIDATION_ERROR]: "Proof validation failed",
579
592
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INSUFFICIENT_SCOPES]: "Missing required scopes",
580
593
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_DELEGATION_VALIDATION_ERROR]: "Delegation validation failed",
594
+ [BOUNCER_LOWERCASE_ERRORS.GRANT_PREDATES_ISSUANCE_CORE]: "The grant predates the issuance core; authorize again",
581
595
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INVALID_HTTP_REGISTRATION]: "Invalid or unsupported native HTTP registration",
596
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_MISMATCH]: "The registered tool protection revision is not the one served to this project",
597
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_GRACE_UNAVAILABLE]: "The audit record for a registration on the previous tool protection revision could not be written; retry the registration",
582
598
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AUTHORIZATION_HOST_UNAVAILABLE]: "Authorization host is a project deployment that cannot currently serve consent",
583
599
  [OAUTH_LOWERCASE_ERRORS.LOWERCASE_INVALID_REQUEST]: "Invalid request body",
584
600
  [OAUTH_LOWERCASE_ERRORS.LOWERCASE_UNSUPPORTED_GRANT_TYPE]: "Only authorization_code grant type is supported",
@@ -687,6 +703,7 @@ const ERROR_STATUS_CODES = {
687
703
  [BARE_ERRORS.BARE_INVALID_DATE]: 400,
688
704
  [LOWERCASE_ERRORS.LOWERCASE_INVALID_JSON]: 400,
689
705
  [LOWERCASE_ERRORS.LOWERCASE_VALIDATION_ERROR]: 400,
706
+ [LOWERCASE_ERRORS.LOWERCASE_INVALID_CURSOR]: 400,
690
707
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_NO_PROJECT]: 400,
691
708
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_MISSING_AGENT_DID]: 400,
692
709
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_NOT_CONFIGURED]: 400,
@@ -737,6 +754,8 @@ const ERROR_STATUS_CODES = {
737
754
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_FORBIDDEN]: 403,
738
755
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AGENT_DENIED]: 403,
739
756
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_INSUFFICIENT_SCOPES]: 403,
757
+ [BOUNCER_LOWERCASE_ERRORS.GRANT_PREDATES_ISSUANCE_CORE]: 409,
758
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_MISMATCH]: 409,
740
759
  [AUDIT_PROTOCOL_ERRORS.AUDIT_UNAUTHORIZED_SUBMISSION]: 403,
741
760
  [KYAOS_PROTOCOL_ERRORS.KYAOS_SLASH_ISSUER_FORBIDDEN]: 403,
742
761
  [KYAOS_PROTOCOL_ERRORS.KYAOS_SLASH_SCOPE_INSUFFICIENT]: 403,
@@ -758,6 +777,7 @@ const ERROR_STATUS_CODES = {
758
777
  [GATEWAY_VAULT_ERRORS.OAUTH_EXPIRED]: 403,
759
778
  [PERMISSION_ERRORS.RESOURCE_NOT_FOUND]: 404,
760
779
  [API_ERRORS.ENDPOINT_NOT_FOUND]: 404,
780
+ [API_ERRORS.ENDPOINT_RETIRED]: 410,
761
781
  [PIXEL_ERRORS.PIXEL_NOT_FOUND]: 404,
762
782
  [SESSION_ERRORS.SESSION_NOT_FOUND]: 404,
763
783
  [DEPLOY_ERRORS.USER_NOT_FOUND]: 404,
@@ -829,10 +849,12 @@ const ERROR_STATUS_CODES = {
829
849
  [AUDIT_PROTOCOL_ERRORS.AUDIT_MIRROR_OUT_OF_ORDER]: 500,
830
850
  [GATEWAY_VAULT_ERRORS.GATEWAY_NOT_CONFIGURED]: 500,
831
851
  [NETWORK_ERRORS.UPSTREAM_ERROR]: 502,
852
+ [INTERNAL_ERRORS.FLY_CLEANUP_FAILED]: 502,
832
853
  [INTERNAL_ERRORS.INITIALIZATION_ERROR]: 503,
833
854
  [INTERNAL_ERRORS.SERVICE_UNAVAILABLE_TRANSIENT]: 503,
834
855
  [INTERNAL_ERRORS.PARTITION_RETIREMENT_IN_PROGRESS]: 503,
835
856
  [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_AUTHORIZATION_HOST_UNAVAILABLE]: 503,
857
+ [BOUNCER_LOWERCASE_ERRORS.LOWERCASE_POLICY_REVISION_GRACE_UNAVAILABLE]: 503,
836
858
  [OAUTH_LOWERCASE_ERRORS.LOWERCASE_OAUTH_UNAVAILABLE]: 503,
837
859
  [AUDIT_PROTOCOL_ERRORS.AUDIT_INVALID_CONFIGURATION]: 503,
838
860
  [AUDIT_PROTOCOL_ERRORS.AUDIT_JOURNAL_FAILURE]: 503,