failproofai 1.0.13-beta.3 → 1.0.14

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 (382) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +44 -44
  3. package/.next/standalone/.next/prerender-manifest.json +4 -4
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +6 -6
  6. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page.js +2 -3
  8. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
  12. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  13. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  14. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +6 -6
  16. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page.js +3 -4
  18. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.rsc +6 -6
  22. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +6 -6
  23. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  24. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  25. package/.next/standalone/.next/server/app/api/audit/invite/route.js +3 -4
  26. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/audit/run/route.js +22 -23
  28. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/audit/status/route.js +2 -3
  30. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/auth/login-request/route.js +4 -5
  32. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js +4 -5
  34. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/auth/logout/route.js +4 -5
  36. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/auth/status/route.js +3 -4
  38. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +2 -3
  40. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/audit/page/build-manifest.json +6 -6
  42. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  43. package/.next/standalone/.next/server/app/audit/page.js +5 -6
  44. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/index.html +1 -1
  47. package/.next/standalone/.next/server/app/index.rsc +6 -6
  48. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  49. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +6 -6
  50. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  51. package/.next/standalone/.next/server/app/page/build-manifest.json +6 -6
  52. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  53. package/.next/standalone/.next/server/app/page.js +4 -5
  54. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/app/policies/page/build-manifest.json +6 -6
  57. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
  58. package/.next/standalone/.next/server/app/policies/page.js +4 -5
  59. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +6 -6
  62. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  63. package/.next/standalone/.next/server/app/project/[name]/page.js +20 -21
  64. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +6 -6
  67. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  68. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  69. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +8 -9
  70. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/projects/page/build-manifest.json +6 -6
  73. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  74. package/.next/standalone/.next/server/app/projects/page.js +6 -7
  75. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/settings/page/build-manifest.json +6 -6
  78. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  79. package/.next/standalone/.next/server/app/settings/page.js +3 -4
  80. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  81. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1a2d0ewycsp6k._.js → [externals]__0h0p9dmv_e7r7._.js} +2 -2
  83. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1am_1tz0o0aqz._.js → [externals]__1_407huhlmj1m._.js} +2 -2
  84. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__031qp1lkow_kc._.js → [externals]__1rlxpymm37wel._.js} +2 -2
  85. package/.next/standalone/.next/server/chunks/[root-of-the-server]__03s1za0hn71yp._.js +1 -1
  86. package/.next/standalone/.next/server/chunks/[root-of-the-server]__048f1wnr8pysf._.js +63 -0
  87. package/.next/standalone/.next/server/chunks/[root-of-the-server]__07a0sa6fuw5_b._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l-oi4gdtmlo5._.js +3 -0
  89. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0spt0kv8azrpl._.js +1 -1
  90. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0yvyp5b7jmlc4._.js +1 -1
  91. package/.next/standalone/.next/server/chunks/[root-of-the-server]__145vo_drnuvas._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1lh8c0mmhdrbj._.js +1 -1
  93. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1oclamblhzhrf._.js +7 -7
  94. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1qjnp3fa0e5g3._.js +3 -0
  95. package/.next/standalone/.next/server/chunks/[turbopack]_runtime.js +7 -9
  96. package/.next/standalone/.next/server/chunks/_02sa8fcu9_9xo._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/_09dz7xva4ce_2._.js +18 -18
  98. package/.next/standalone/.next/server/chunks/_0hf5q4xzyg40j._.js +1 -1
  99. package/.next/standalone/.next/server/chunks/_0tovk6q0miud6._.js +1 -1
  100. package/.next/standalone/.next/server/chunks/_0trp3ycqv17cl._.js +1 -1
  101. package/.next/standalone/.next/server/chunks/_1-2owkp-1_987._.js +1 -1
  102. package/.next/standalone/.next/server/chunks/_13ltj8a9z92o8._.js +1 -1
  103. package/.next/standalone/.next/server/chunks/_15k37au70vjvg._.js +1 -1
  104. package/.next/standalone/.next/server/chunks/_18rfu4__wjhwb._.js +1 -1
  105. package/.next/standalone/.next/server/chunks/_19011-u44143j._.js +1 -1
  106. package/.next/standalone/.next/server/chunks/_1ek68lnh2daur._.js +2 -2
  107. package/.next/standalone/.next/server/chunks/_1fz8m31sndkcu._.js +1 -1
  108. package/.next/standalone/.next/server/chunks/_1ogwigfb0163w._.js +1 -1
  109. package/.next/standalone/.next/server/chunks/_1vslkoe35wok6._.js +1 -1
  110. package/.next/standalone/.next/server/chunks/lib_11qmqmccehybz._.js +1 -1
  111. package/.next/standalone/.next/server/chunks/lib_1sezqnatvr8j-._.js +1 -1
  112. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oigsgz07._.js +1 -2
  113. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p77cu37y._.js +1 -2
  114. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4vkpxxu7._.js +1 -1
  115. package/.next/standalone/.next/server/chunks/src_hooks_0_em82s16zfym._.js +2 -2
  116. package/.next/standalone/.next/server/chunks/ssr/[externals]__0ilfh9mfnzsth._.js +3 -0
  117. package/.next/standalone/.next/server/chunks/ssr/[externals]__0ohnuzsaozaca._.js +3 -0
  118. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__097i34ct1o88x._.js → [externals]__12qr51qgrrt6o._.js} +2 -2
  119. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__021vebe-4il8s._.js +1 -1
  120. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08ch3staq3ejw._.js +1 -1
  121. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bigvy9xmv2ka._.js +1 -1
  122. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0evgy902m9h5e._.js +1 -1
  123. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ezoipo-r7_5k._.js +14 -0
  124. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h1jw32uvrhh0._.js +1 -1
  125. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h86bl2qf0k_o._.js +1 -1
  126. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pia5h3p8re4c._.js +1 -1
  127. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10v5cyxvj64j4._.js → [root-of-the-server]__0tfnj3v_mp6rv._.js} +1 -1
  128. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-9s1nsw-5q8o._.js +1 -1
  129. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-ey9fgesfbc0._.js +1 -1
  130. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15bi9em2xe0x2._.js +1 -1
  131. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15usvs-ms-0hf._.js +1 -1
  132. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16gb3_92zvk5x._.js +1 -1
  133. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1avi2kypusyb_._.js +1 -1
  134. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__20dt376-socef._.js → [root-of-the-server]__1e00l_e_8r_-g._.js} +1 -1
  135. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1mc9-zlnh656_._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ob2uzmms1adf._.js +1 -1
  137. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r7drlqli-ado._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ed1zh4scn7-k._.js → [root-of-the-server]__1tq3x9i_3_860._.js} +1 -1
  139. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1utel1l1-u64v._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1vofkb2oq7p7e._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1vxwetblyf8vp._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1xwr4hi-on27i._.js +3 -0
  143. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__2158020r_amn9._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/[turbopack]_runtime.js +7 -9
  145. package/.next/standalone/.next/server/chunks/ssr/_0-f9uotv7v2n9._.js +1 -1
  146. package/.next/standalone/.next/server/chunks/ssr/_00e4_rvim31u_._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/ssr/_0bseae9u7g98r._.js +1 -1
  148. package/.next/standalone/.next/server/chunks/ssr/_0eoura3_9gjb-._.js +2 -2
  149. package/.next/standalone/.next/server/chunks/ssr/_0kqw2_f1ywmpo._.js +1 -1
  150. package/.next/standalone/.next/server/chunks/ssr/_0mouhaflye1ro._.js +1 -1
  151. package/.next/standalone/.next/server/chunks/ssr/_0ouu886szh6yj._.js +10 -10
  152. package/.next/standalone/.next/server/chunks/ssr/_0p1cb69sml__f._.js +3 -0
  153. package/.next/standalone/.next/server/chunks/ssr/_0pedwblqdoh58._.js +1 -1
  154. package/.next/standalone/.next/server/chunks/ssr/_0tfqha481f033._.js +2 -2
  155. package/.next/standalone/.next/server/chunks/ssr/_1_ozgifqv1ssi._.js +1 -1
  156. package/.next/standalone/.next/server/chunks/ssr/_1a516zcgtqius._.js +1 -1
  157. package/.next/standalone/.next/server/chunks/ssr/_1ddpc5gj57uuf._.js +1 -1
  158. package/.next/standalone/.next/server/chunks/ssr/_1djqs9i27e4kg._.js +1 -1
  159. package/.next/standalone/.next/server/chunks/ssr/_1ew6ra24vt-ij._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/_1or8gixmrpv5i._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/ssr/_1s8zk-upxzp00._.js +1 -1
  162. package/.next/standalone/.next/server/chunks/ssr/_1u9tpla2o6utw._.js +1 -1
  163. package/.next/standalone/.next/server/chunks/ssr/_1v4_ul3sj2lq_._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/_1y3xzro8ca8t6._.js +1 -1
  165. package/.next/standalone/.next/server/chunks/ssr/_20hn4gn87nsjc._.js +1 -1
  166. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo5_vm5f.js +2 -2
  167. package/.next/standalone/.next/server/chunks/ssr/app_087bt9wus25zs._.js +1 -1
  168. package/.next/standalone/.next/server/chunks/ssr/app_0trz6ik19xz5_._.js +1 -1
  169. package/.next/standalone/.next/server/chunks/ssr/app_1fvisnppn1unv._.js +1 -1
  170. package/.next/standalone/.next/server/chunks/ssr/app_209u41o446my6._.js +1 -1
  171. package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9snixb5fd-._.js +1 -1
  172. package/.next/standalone/.next/server/chunks/ssr/app_audit_0hku_y73ischw._.js +1 -1
  173. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47q0xq5w._.js +1 -1
  174. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x33jqb6._.js +1 -1
  175. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpcz0uxur._.js +1 -1
  176. package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h47jmhhd._.js +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/lib_16jvhmthj_k3a._.js +1 -1
  178. package/.next/standalone/.next/server/chunks/ssr/node_modules_05vgn62--7c5e._.js +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/node_modules_0dad4au22rq0p._.js +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +2 -2
  181. package/.next/standalone/.next/server/chunks/ssr/node_modules_0ptcnmeaxvd_a._.js +2 -2
  182. package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_1p-is71j0j7fb.js → node_modules_html-to-image_es_index_0r9i9nq3-ei-l.js} +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_0bz67659f5z-3._.js +4 -4
  184. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0-amwqbrge23p._.js +6 -0
  185. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0ocrceo0c9psx._.js +4 -4
  186. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1alv566ojmz5j._.js +4 -4
  187. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1et9oq9q9-y3v._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1khq67j4vo9y4._.js +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_shared_lib_0ftnv26hg1lry._.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dagmbznysrc2._.js +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuznb72p7z._.js +1 -2
  193. package/.next/standalone/.next/server/chunks/ssr/package_json_[json]_cjs_013tntikdft59._.js +1 -1
  194. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0-q0ummbuhlg5._.js +1 -1
  195. package/.next/standalone/.next/server/chunks/ssr/src_hooks_06kzv9ddabn3_._.js +2 -2
  196. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0agdmptetetdt._.js +2 -2
  197. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0g194syq7r7ql._.js +1 -1
  198. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0mdwgjisv4fub._.js +2 -2
  199. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1cv9_c4l1tzrm._.js +2 -2
  200. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1kx9e0dx_1-8o._.js +1 -1
  201. package/.next/standalone/.next/server/middleware-build-manifest.js +44 -44
  202. package/.next/standalone/.next/server/pages/404.html +1 -1
  203. package/.next/standalone/.next/server/pages/500.html +1 -1
  204. package/.next/standalone/.next/server/preview-props.json +3 -3
  205. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  206. package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
  207. package/.next/standalone/.next/static/chunks/0tiuj32d-qcy3.js +1 -0
  208. package/.next/standalone/.next/static/chunks/0ztuix-ip2oiv.js +1 -0
  209. package/.next/standalone/.next/static/chunks/{0h7mkux811w5b.js → 107jrtkeylnrv.js} +1 -1
  210. package/.next/standalone/.next/static/chunks/110hwwc6agsr8.js +1 -0
  211. package/.next/standalone/.next/static/chunks/19e9khxgv8fb8.js +1 -0
  212. package/.next/standalone/.next/static/chunks/1dudxmlwx2n3q.js +1 -0
  213. package/.next/standalone/.next/static/chunks/1i9zuw01f0ogt.js +22 -0
  214. package/.next/standalone/.next/static/chunks/2codb6nb412m9.js +1 -0
  215. package/.next/standalone/.next/static/chunks/2hqfk_jgesiw2.js +1 -0
  216. package/.next/standalone/.next/static/chunks/2k6xp6kdy7lmd.js +1 -0
  217. package/.next/standalone/.next/static/chunks/2maurwweshrsj.js +1 -0
  218. package/.next/standalone/.next/static/chunks/2wh64znsc_mo2.js +1 -0
  219. package/.next/standalone/.next/static/chunks/2wye36b3mbzpa.js +31 -0
  220. package/.next/standalone/.next/static/chunks/{2sthn8c56n9m_.js → 2zlfhyqvlvf7o.js} +1 -1
  221. package/.next/standalone/.next/static/chunks/3hk5y4kny2ktd.js +1 -0
  222. package/.next/standalone/.next/static/chunks/3i_9ugyh1q1o1.js +1 -0
  223. package/.next/standalone/.next/static/chunks/3o30fiw7llng3.js +1 -0
  224. package/.next/standalone/.next/static/chunks/3v49ogp389dun.js +1 -0
  225. package/.next/standalone/.next/static/chunks/41ujrab732qi3.css +2 -0
  226. package/.next/standalone/.next/static/chunks/435eshlryosz1.js +1 -0
  227. package/.next/standalone/.next/static/chunks/436g_rqa42mr7.js +1 -0
  228. package/.next/standalone/.next/static/chunks/436nql0jk__xy.js +1 -0
  229. package/.next/standalone/.next/static/chunks/{turbopack-3-ry682tkyiqk.js → turbopack-2u1d16houkiyo.js} +1 -1
  230. package/.next/standalone/SECURITY.md +19 -4
  231. package/.next/standalone/fp-cloud-cli/CHANGELOG.md +13 -3
  232. package/.next/standalone/fp-cloud-cli/README.md +14 -7
  233. package/.next/standalone/fp-cloud-cli/fp_cli/_version.py +1 -1
  234. package/.next/standalone/fp-cloud-cli/fp_cli/app.py +2 -8
  235. package/.next/standalone/fp-cloud-cli/fp_cli/auth.py +325 -3
  236. package/.next/standalone/fp-cloud-cli/fp_cli/cloud_output.py +3 -3
  237. package/.next/standalone/fp-cloud-cli/fp_cli/commands/account_cmds.py +1 -11
  238. package/.next/standalone/fp-cloud-cli/fp_cli/commands/auth_cmds.py +218 -51
  239. package/.next/standalone/fp-cloud-cli/fp_cli/commands/orgs_cmds.py +1 -1
  240. package/.next/standalone/fp-cloud-cli/fp_cli/output.py +112 -135
  241. package/.next/standalone/fp-cloud-cli/fp_cli/permissions.py +10 -1
  242. package/.next/standalone/fp-cloud-cli/fp_cli/select.py +85 -6
  243. package/.next/standalone/fp-cloud-cli/fp_cli/theme.py +21 -21
  244. package/.next/standalone/fp-cloud-cli/pyproject.toml +1 -1
  245. package/.next/standalone/fp-cloud-cli/skill/SKILL.md +4 -4
  246. package/.next/standalone/fp-cloud-cli/skill/references/commands.md +4 -4
  247. package/.next/standalone/fp-cloud-cli/tests/fake_cloud_smoke.py +2 -2
  248. package/.next/standalone/fp-cloud-cli/tests/test_browser_login.py +943 -0
  249. package/.next/standalone/fp-cloud-cli/tests/test_cloud_account.py +0 -2
  250. package/.next/standalone/fp-cloud-cli/tests/test_cloud_agent.py +4 -8
  251. package/.next/standalone/fp-cloud-cli/tests/test_cloud_human_views.py +0 -4
  252. package/.next/standalone/fp-cloud-cli/tests/test_commands.py +3 -3
  253. package/.next/standalone/fp-cloud-cli/tests/test_dashboards_agent.py +3 -3
  254. package/.next/standalone/fp-cloud-cli/tests/test_facets.py +1 -1
  255. package/.next/standalone/fp-cloud-cli/tests/test_keys_queries.py +19 -2
  256. package/.next/standalone/fp-cloud-cli/tests/test_operator.py +1 -1
  257. package/.next/standalone/fp-cloud-cli/tests/test_orgs.py +1 -1
  258. package/.next/standalone/fp-cloud-cli/tests/test_output.py +19 -19
  259. package/.next/standalone/fp-cloud-cli/tests/test_round4_behaviour.py +3 -2
  260. package/.next/standalone/fp-cloud-cli/tests/test_screen_language.py +86 -25
  261. package/.next/standalone/fp-cloud-cli/tests/test_whoami.py +1 -1
  262. package/.next/standalone/fp-cloud-cli/uv.lock +200 -13
  263. package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
  264. package/.next/standalone/node_modules/@next/env/package.json +1 -1
  265. package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
  266. package/.next/standalone/node_modules/next/dist/compiled/fast-jwt/index.js +3 -0
  267. package/.next/standalone/node_modules/next/dist/compiled/fast-jwt/package.json +1 -0
  268. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +23 -23
  269. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +23 -23
  270. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +1 -1
  271. package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +7 -7
  272. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  273. package/.next/standalone/node_modules/next/dist/server/api-utils/node/api-resolver.js +8 -5
  274. package/.next/standalone/node_modules/next/dist/server/api-utils/node/try-get-preview-data.js +8 -2
  275. package/.next/standalone/node_modules/next/dist/server/app-render/app-render.js +52 -14
  276. package/.next/standalone/node_modules/next/dist/server/app-render/async-local-storage.js +1 -1
  277. package/.next/standalone/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +19 -3
  278. package/.next/standalone/node_modules/next/dist/server/app-render/turbopack-bootstrap-script.js +50 -0
  279. package/.next/standalone/node_modules/next/dist/server/base-server.js +8 -0
  280. package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
  281. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +59 -10
  282. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  283. package/.next/standalone/node_modules/next/dist/server/dev/turbopack-utils.js +15 -0
  284. package/.next/standalone/node_modules/next/dist/server/image-optimizer/detect-content-type.js +24 -20
  285. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  286. package/.next/standalone/node_modules/next/dist/server/lib/dev-bundler-service.js +3 -0
  287. package/.next/standalone/node_modules/next/dist/server/lib/router-server.js +1 -1
  288. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
  289. package/.next/standalone/node_modules/next/dist/server/lib/trace/tracer.js +1 -1
  290. package/.next/standalone/node_modules/next/dist/server/next-server.js +10 -2
  291. package/.next/standalone/node_modules/next/dist/server/render.js +2 -2
  292. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/parse-request-headers.js +1 -2
  293. package/.next/standalone/node_modules/next/dist/server/send-response.js +12 -0
  294. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +69 -6
  295. package/.next/standalone/node_modules/next/dist/server/web/adapter.js +5 -1
  296. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  297. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  298. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
  299. package/.next/standalone/node_modules/next/package.json +10 -10
  300. package/.next/standalone/package.json +13 -12
  301. package/.next/standalone/sdk/python/skill/SKILL.md +5 -0
  302. package/.next/standalone/sdk/python/uv.lock +83 -51
  303. package/.next/standalone/sdk/typescript/CHANGELOG.md +48 -5
  304. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package-lock.json +0 -9
  305. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package.json +2 -1
  306. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package-lock.json +72 -44
  307. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package.json +2 -1
  308. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/package-lock.json +72 -44
  309. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.12/package.json +3 -0
  310. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package-lock.json +18 -332
  311. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-0/package.json +4 -2
  312. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package-lock.json +925 -296
  313. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package.json +3 -8
  314. package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/package-lock.json +279 -277
  315. package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/package.json +2 -2
  316. package/.next/standalone/sdk/typescript/package-lock.json +31 -61
  317. package/.next/standalone/sdk/typescript/package.json +3 -0
  318. package/.next/standalone/server.js +1 -1
  319. package/dist/cli.mjs +443 -245
  320. package/dist/worker.mjs +30 -2
  321. package/hermes-plugin/plugin.yaml +1 -1
  322. package/openclaw-plugin/daemon-client.js +254 -0
  323. package/openclaw-plugin/hooks.js +187 -0
  324. package/openclaw-plugin/index.js +17 -211
  325. package/package.json +13 -12
  326. package/src/hooks/antigravity-path-guard.ts +73 -0
  327. package/src/hooks/daemon-service.ts +188 -18
  328. package/src/hooks/delivery-health.ts +11 -1
  329. package/src/hooks/enforcement-capability.ts +1 -1
  330. package/src/hooks/handler.ts +24 -0
  331. package/src/hooks/integrations.ts +5 -2
  332. package/src/hooks/shell-quote.ts +9 -0
  333. package/src/hooks/uninstall-cli.ts +30 -8
  334. package/.next/standalone/.next/server/chunks/[root-of-the-server]__038kwryp970nh._.js +0 -3
  335. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08atcie7jzswm._.js +0 -3
  336. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0car70pylmvor._.js +0 -3
  337. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1j6kfp0vzu5rw._.js +0 -3
  338. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1l0ayum_hqqsw._.js +0 -3
  339. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1o9rznwc0w7og._.js +0 -3
  340. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1v1-l-83czzsr._.js +0 -63
  341. package/.next/standalone/.next/server/chunks/node_modules_@opentelemetry_api_build_esm_index_0oo58a7rymoxh.js +0 -3
  342. package/.next/standalone/.next/server/chunks/node_modules_@opentelemetry_api_build_esm_index_1jp9ij0_ddtgk.js +0 -3
  343. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__070rqh7scntiu._.js +0 -3
  344. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__075uro8t92s0_._.js +0 -14
  345. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0alpzjn3450sr._.js +0 -3
  346. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0aup10z2o8zc1._.js +0 -3
  347. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bioghlkjf7s7._.js +0 -3
  348. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nhm28v58ty9z._.js +0 -3
  349. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vse4qi496ol-._.js +0 -3
  350. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__190xwrr5zrfi3._.js +0 -3
  351. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1guwlpkyurdn9._.js +0 -3
  352. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1k96jctukf65_._.js +0 -3
  353. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1sj-wn2jp6va5._.js +0 -3
  354. package/.next/standalone/.next/server/chunks/ssr/_1tcvpgd7hugnx._.js +0 -3
  355. package/.next/standalone/.next/server/chunks/ssr/node_modules_@opentelemetry_api_build_esm_index_0ntwr8lzj6p2i.js +0 -3
  356. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +0 -6
  357. package/.next/standalone/.next/static/chunks/095l2av-xsus2.js +0 -1
  358. package/.next/standalone/.next/static/chunks/1024g0jaymm46.js +0 -1
  359. package/.next/standalone/.next/static/chunks/165ezyyx0j1ft.js +0 -22
  360. package/.next/standalone/.next/static/chunks/19l5hbzn475am.js +0 -1
  361. package/.next/standalone/.next/static/chunks/1s__s2o5zcfcy.js +0 -1
  362. package/.next/standalone/.next/static/chunks/1uxq_gbvdti30.js +0 -1
  363. package/.next/standalone/.next/static/chunks/26c4gmdpsthv6.css +0 -2
  364. package/.next/standalone/.next/static/chunks/2_sj5ssr_m_wm.js +0 -1
  365. package/.next/standalone/.next/static/chunks/2ojf3r8g4tn7s.js +0 -1
  366. package/.next/standalone/.next/static/chunks/2tjfp9dirxnku.js +0 -1
  367. package/.next/standalone/.next/static/chunks/2zyrjasvbmwpq.js +0 -1
  368. package/.next/standalone/.next/static/chunks/31fan-ze541d1.js +0 -1
  369. package/.next/standalone/.next/static/chunks/32s3y34p0t2pe.js +0 -1
  370. package/.next/standalone/.next/static/chunks/36re0fegaocq-.js +0 -1
  371. package/.next/standalone/.next/static/chunks/3eonfpk9jyceg.js +0 -1
  372. package/.next/standalone/.next/static/chunks/3fhk60ouw_ae6.js +0 -1
  373. package/.next/standalone/.next/static/chunks/3m9g1l6-yh0s3.js +0 -1
  374. package/.next/standalone/.next/static/chunks/3uaguc-tbu_ik.js +0 -1
  375. package/.next/standalone/.next/static/chunks/3xgxl1s_in776.js +0 -31
  376. package/.next/standalone/.next/static/chunks/3zwff_ax3hust.js +0 -1
  377. package/.next/standalone/node_modules/next/dist/compiled/jsonwebtoken/index.js +0 -11
  378. package/.next/standalone/node_modules/next/dist/compiled/jsonwebtoken/package.json +0 -1
  379. package/.next/standalone/node_modules/next/dist/lib/semver-noop.js +0 -18
  380. /package/.next/standalone/.next/static/{fHR90vZ5ls7d-K8cH9hxe → -iBiSmrLiylRKLAg77zlQ}/_buildManifest.js +0 -0
  381. /package/.next/standalone/.next/static/{fHR90vZ5ls7d-K8cH9hxe → -iBiSmrLiylRKLAg77zlQ}/_clientMiddlewareManifest.js +0 -0
  382. /package/.next/standalone/.next/static/{fHR90vZ5ls7d-K8cH9hxe → -iBiSmrLiylRKLAg77zlQ}/_ssgManifest.js +0 -0
@@ -4,230 +4,36 @@
4
4
  * Loaded in-process by the gateway (registered via `plugins.load.paths` +
5
5
  * `plugins.entries.failproofai` in ~/.openclaw/openclaw.json). It subscribes to
6
6
  * OpenClaw's typed PLUGIN hooks — the only surface that can block; OpenClaw's
7
- * file-based "internal hooks" are observation-only — and forwards each to the
8
- * failproofai binary as `failproofai --hook <event> --cli openclaw`. failproofai
9
- * prints a flat `{permission, reason}` verdict on stdout; this shim maps it to
10
- * each hook's native return shape. On before_tool_call, an `instruct` verdict
11
- * uses a one-shot blockReason as OpenClaw's model-visible instruction channel;
12
- * retries from the same session/policy are allowed for a short window.
7
+ * file-based "internal hooks" are observation-only — and asks failproofaid for
8
+ * each verdict over its Unix socket (daemon-client.js), the way the Hermes
9
+ * plugin does. The daemon answers with the flat `{permission, reason}` verdict
10
+ * `failproofai --hook <event> --cli openclaw` prints; hooks.js maps it to each
11
+ * hook's native return shape. On before_tool_call, an `instruct` verdict uses a
12
+ * one-shot blockReason as OpenClaw's model-visible instruction channel; retries
13
+ * from the same session/policy are allowed for a short window.
13
14
  *
14
15
  * Marker comment for failproofai's installer detection (do not remove):
15
16
  * __failproofai_hook__: true
16
17
  *
17
- * Design notes (verified live against openclaw v2026.7.1):
18
- * • ASYNC spawn, never spawnSync — the gateway is a long-running multi-channel
19
- * process; a synchronous spawn on every hook would stall every channel.
20
- * 30s guard timer; fail-open on any error (never block on infra failure).
21
- * • Raw forwarding — we send the raw tool name / params and a Claude-shaped
22
- * stdin (params→tool_input, toolName→tool_name, transcriptPath→
23
- * transcript_path, stopHookActive→stop_hook_active, sessionKey→session_id).
24
- * The binary canonicalizes via OPENCLAW_* maps (single source of truth); the
25
- * shim ships NO inline maps (unlike the OpenCode/Pi shims).
18
+ * Design notes:
19
+ * • No process per hook, and no path outside this directory. OpenClaw ≥
20
+ * 2026.9.6 imports plugins from a copy under ~/.openclaw/tmp/plugin-captures,
21
+ * so a CLI located relative to this file is not there; the shim that spawned
22
+ * one allowed every call once that started. Every module here imports only
23
+ * node built-ins and its siblings.
24
+ * • Non-blocking — the gateway is a long-running multi-channel process, so all
25
+ * I/O is async; a synchronous call on every hook would stall every channel.
26
26
  * • No top-level `await` — OpenClaw's plugin loader rejects it; all async work
27
27
  * happens inside register()'s handlers.
28
- *
29
- * Binary resolution mirrors pi-extension/index.ts: prefer the bundled
30
- * dist/cli.mjs (node-compatible), fall back to bin/failproofai.mjs with bun for
31
- * dev; honor FAILPROOFAI_BINARY_OVERRIDE. Paths resolve relative to this file
32
- * via import.meta.url (the gateway spawns plugins with an undefined cwd).
33
28
  */
34
29
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
35
- import { spawn } from "node:child_process";
36
- import { existsSync } from "node:fs";
37
- import { resolve, dirname } from "node:path";
38
- import { fileURLToPath } from "node:url";
39
- import { createInstructRetryGate, mapBeforeToolVerdict } from "./instruct-retry-gate.js";
40
- import { createWorkspaceContext } from "./workspace-context.js";
41
-
42
- const HERE = dirname(fileURLToPath(import.meta.url));
43
- const DIST_BIN = resolve(HERE, "..", "dist", "cli.mjs");
44
- const SRC_BIN = resolve(HERE, "..", "bin", "failproofai.mjs");
45
- const instructRetryGate = createInstructRetryGate();
46
- const workspaceContext = createWorkspaceContext();
47
-
48
- function resolveSpawn() {
49
- if (process.env.FAILPROOFAI_BINARY_OVERRIDE) {
50
- return { cmd: "node", args: [process.env.FAILPROOFAI_BINARY_OVERRIDE] };
51
- }
52
- if (existsSync(DIST_BIN)) {
53
- return { cmd: "node", args: [DIST_BIN] };
54
- }
55
- return { cmd: "bun", args: [SRC_BIN] };
56
- }
57
-
58
- function debug(msg) {
59
- if (process.env.FAILPROOFAI_OPENCLAW_DEBUG === "1") {
60
- process.stderr.write(`[failproofai-openclaw-shim] ${msg}\n`);
61
- }
62
- }
63
-
64
- /**
65
- * Spawn `failproofai --hook <rawEvent> --cli openclaw`, write the JSON payload
66
- * to stdin, and resolve the parsed flat `{permission, reason}` verdict. Async +
67
- * fail-open: any spawn/parse error or timeout resolves to `{permission:"allow"}`
68
- * so a failproofai fault never blocks the gateway.
69
- */
70
- function callPolicy(rawEvent, payload) {
71
- return new Promise((done) => {
72
- const { cmd, args } = resolveSpawn();
73
- let child;
74
- try {
75
- child = spawn(cmd, [...args, "--hook", rawEvent, "--cli", "openclaw"], {
76
- stdio: ["pipe", "pipe", "pipe"],
77
- });
78
- } catch (err) {
79
- debug(`spawn threw: ${err && err.message ? err.message : String(err)}`);
80
- done({ permission: "allow" });
81
- return;
82
- }
83
- let out = "";
84
- let settled = false;
85
- const finish = (verdict) => {
86
- if (settled) return;
87
- settled = true;
88
- clearTimeout(timer);
89
- done(verdict);
90
- };
91
- const timer = setTimeout(() => {
92
- debug(`timeout on ${rawEvent}; killing child`);
93
- try { child.kill(); } catch { /* ignore */ }
94
- finish({ permission: "allow" });
95
- }, 30_000);
96
- child.stdout.on("data", (d) => { out += d; });
97
- child.on("error", (err) => {
98
- debug(`child error: ${err && err.message ? err.message : String(err)}`);
99
- finish({ permission: "allow" });
100
- });
101
- child.on("close", () => {
102
- const stdout = out.trim();
103
- if (!stdout) { finish({ permission: "allow" }); return; }
104
- try {
105
- finish(JSON.parse(stdout));
106
- } catch (err) {
107
- debug(`parse error: ${err && err.message ? err.message : String(err)}`);
108
- finish({ permission: "allow" });
109
- }
110
- });
111
- try {
112
- child.stdin.end(JSON.stringify(payload));
113
- } catch (err) {
114
- debug(`stdin write failed: ${err && err.message ? err.message : String(err)}`);
115
- finish({ permission: "allow" });
116
- }
117
- });
118
- }
119
-
120
- /** Claude-shaped stdin base. Extra keys are ignored by the binary's payload
121
- * parser; they're forwarded for future use / activity attribution. */
122
- function baseMeta(payload, ctx, config) {
123
- const p = payload || {};
124
- const c = ctx || {};
125
- return {
126
- session_id: c.sessionId ?? p.sessionId ?? c.sessionKey ?? p.sessionKey,
127
- cwd: workspaceContext.resolveWorkspace(p, c, config) ?? process.cwd(),
128
- transcript_path: p.transcriptPath,
129
- stop_hook_active: p.stopHookActive === true,
130
- openclaw: {
131
- agentId: c.agentId,
132
- sessionKey: c.sessionKey ?? p.sessionKey,
133
- runId: c.runId ?? p.runId,
134
- provider: p.provider,
135
- model: p.model,
136
- },
137
- };
138
- }
30
+ import { registerFailproofaiHooks } from "./hooks.js";
139
31
 
140
32
  export default definePluginEntry({
141
33
  id: "failproofai",
142
34
  name: "failproofai",
143
35
  description: "Real-time policy enforcement for OpenClaw by failproofai",
144
36
  register(api) {
145
- // before_tool_call → PreToolUse. Deny always blocks. Instruct blocks the
146
- // first matching attempt only, using blockReason to give the model the
147
- // instruction, then permits retries from that session/policy for 5 minutes.
148
- api.on(
149
- "before_tool_call",
150
- async (payload, ctx) => {
151
- const p = payload || {};
152
- const verdict = await callPolicy("before_tool_call", {
153
- ...baseMeta(payload, ctx, api.config),
154
- tool_name: p.toolName,
155
- tool_input: p.params,
156
- hook_event_name: "before_tool_call",
157
- });
158
- return mapBeforeToolVerdict(verdict, payload, ctx, instructRetryGate);
159
- },
160
- { priority: 100, timeoutMs: 60_000 },
161
- );
162
-
163
- // before_agent_run → UserPromptSubmit. Deny: return {outcome:"block", reason}.
164
- api.on(
165
- "before_agent_run",
166
- async (payload, ctx) => {
167
- const p = payload || {};
168
- workspaceContext.remember(payload, ctx);
169
- const verdict = await callPolicy("before_agent_run", {
170
- ...baseMeta(payload, ctx, api.config),
171
- prompt: p.prompt,
172
- hook_event_name: "before_agent_run",
173
- });
174
- if (verdict.permission === "deny") {
175
- return { outcome: "block", reason: verdict.reason || "Blocked by failproofai" };
176
- }
177
- return undefined;
178
- },
179
- { priority: 100, timeoutMs: 60_000 },
180
- );
181
-
182
- // before_agent_finalize → Stop. The real turn-end gate: a deny becomes a
183
- // revise so the agent runs another pass. The evaluator supplies the
184
- // MANDATORY ACTION wording; the payload's stop_hook_active guards the
185
- // require-*-before-stop builtins against infinite loops.
186
- api.on(
187
- "before_agent_finalize",
188
- async (payload, ctx) => {
189
- const verdict = await callPolicy("before_agent_finalize", {
190
- ...baseMeta(payload, ctx, api.config),
191
- hook_event_name: "before_agent_finalize",
192
- });
193
- if (verdict.permission === "deny") {
194
- return { action: "revise", reason: verdict.reason || "Action required by failproofai" };
195
- }
196
- return undefined;
197
- },
198
- { priority: 100, timeoutMs: 60_000 },
199
- );
200
-
201
- // Observation hooks — await so activity ordering is stable, ignore verdict.
202
- // after_tool_call → PostToolUse; session_start/end → SessionStart/End;
203
- // subagent_ended → SubagentStop (obs only); before_compaction → PreCompact.
204
- for (const ev of [
205
- "after_tool_call",
206
- "session_start",
207
- "session_end",
208
- "subagent_ended",
209
- "before_compaction",
210
- ]) {
211
- api.on(
212
- ev,
213
- async (payload, ctx) => {
214
- const p = payload || {};
215
- await callPolicy(ev, {
216
- ...baseMeta(payload, ctx, api.config),
217
- tool_name: p.toolName,
218
- tool_input: p.params,
219
- tool_response: p.result,
220
- reason: p.reason,
221
- hook_event_name: ev,
222
- });
223
- if (ev === "session_end") {
224
- instructRetryGate.clear(payload, ctx);
225
- workspaceContext.clear(payload, ctx);
226
- }
227
- return undefined;
228
- },
229
- { priority: 100, timeoutMs: 60_000 },
230
- );
231
- }
37
+ registerFailproofaiHooks(api);
232
38
  },
233
39
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "failproofai",
3
- "version": "1.0.13-beta.3",
3
+ "version": "1.0.14",
4
4
  "description": "Observability and enforcement for AI agent harnesses. 40 built-in policies hooked into 12 of them — Claude Code, Codex, Cursor, Hermes, OpenClaw and more — blocking the tool call before it runs. Local dashboard included, no account needed.",
5
5
  "bin": {
6
6
  "failproofai": "./dist/cli.mjs",
@@ -88,14 +88,14 @@
88
88
  "@testing-library/jest-dom": "^7.0.0",
89
89
  "@testing-library/react": "^16.3.2",
90
90
  "@testing-library/user-event": "^14.6.5",
91
- "@types/node": "26.6.5",
91
+ "@types/node": "26.6.6",
92
92
  "@types/react": "19.3.0",
93
93
  "@types/react-dom": "^19.2.3",
94
94
  "@vitejs/plugin-react": "^6.1.0",
95
95
  "clsx": "^2.1.1",
96
96
  "eslint": "^10.9.0",
97
97
  "eslint-config-next": "^16.3.2",
98
- "jsdom": "^30.0.1",
98
+ "jsdom": "^31.0.0",
99
99
  "lucide-react": "^1.33.0",
100
100
  "next": "^16.3.8",
101
101
  "react": "^19.2.4",
@@ -123,18 +123,19 @@
123
123
  "brace-expansion": "5.0.12",
124
124
  "sharp": "0.35.5",
125
125
  "source-map-js": "1.2.2",
126
- "browserslist": "4.28.8"
126
+ "browserslist": "4.28.8",
127
+ "minimatch": "11.0.3"
127
128
  },
128
129
  "optionalDependencies": {
129
- "@failproofai/failproofaid-linux-x64": "1.0.13-beta.3",
130
- "@failproofai/failproofaid-linux-arm64": "1.0.13-beta.3",
131
- "@failproofai/failproofaid-darwin-x64": "1.0.13-beta.3",
132
- "@failproofai/failproofaid-darwin-arm64": "1.0.13-beta.3"
130
+ "@failproofai/failproofaid-linux-x64": "1.0.14",
131
+ "@failproofai/failproofaid-linux-arm64": "1.0.14",
132
+ "@failproofai/failproofaid-darwin-x64": "1.0.14",
133
+ "@failproofai/failproofaid-darwin-arm64": "1.0.14"
133
134
  },
134
135
  "failproofaidBinaries": {
135
- "linux-x64": "86f8b544b95d33b3464c916dff72e1a1436340d98c480dc8f83d1696dda1e5fe",
136
- "linux-arm64": "d09376e5608e1379c247087386473f4ff1fcaa264022e570cc00f2cbb66b09fb",
137
- "darwin-x64": "95f485247270fef7f4676e383ec586e339451c87dcd0480e1a12d721a62bec4b",
138
- "darwin-arm64": "f8c0d43dba6d78facb00a0a265c188238e50223aedab2c17b3e66c202edacf5d"
136
+ "linux-x64": "bd686a8ba981ea51189392376f43ac32ec785d0f01147cea2e4dde594b7750c8",
137
+ "linux-arm64": "04294f8cf6d5ea0325d4338cf5fc9a60c400b38b9496abf7e43dcdc1e6ee5180",
138
+ "darwin-x64": "d0eddda2163fd61c65389fdaea9dbf70aed82a492e2afc1095a28273bba629a7",
139
+ "darwin-arm64": "1663f332438fa6cc41da69c1cb351507509a07419c1349f6b29a9cf5b5c3a3ce"
139
140
  }
140
141
  }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Refuses an Antigravity file tool call whose path failproofai cannot read.
3
+ *
4
+ * Antigravity has renamed its file tools' path arguments between releases, and a
5
+ * key `ANTIGRAVITY_TOOL_INPUT_MAP` does not know leaves `file_path` empty. Every
6
+ * path policy then has nothing to check and allows the call, which is how #961
7
+ * stayed silent: `.env` was readable and writable with those policies enabled.
8
+ * Refusing is loud on the next rename, and allowing is a silent bypass.
9
+ *
10
+ * Registered by `handler.ts`, not declared as a builtin, for three reasons:
11
+ * - Policies come from packs, and a pack's copy of `block-env-files` is not
12
+ * this build's, so a check there would not reach most machines.
13
+ * - `block-failproofai-commands` runs everywhere but is pinned never to route
14
+ * on Read, because a guard that blocks diagnosis gets worked around. This
15
+ * refuses only a call nothing could check, not reading.
16
+ * - It is one CLI's contract, not a policy anyone would enable or configure.
17
+ *
18
+ * A tool NAME the map does not know still passes through, as on every CLI: an
19
+ * unknown name could be anything, and most of Antigravity's are not file tools.
20
+ *
21
+ * Registered only for a call that lacks a path, so every normal call's activity
22
+ * row and evaluation stay exactly as they were, with no entry for a check that
23
+ * had nothing to say.
24
+ */
25
+ import { deny, allow } from "./policy-helpers";
26
+ import type { PolicyContext, PolicyMatcher, PolicyResult } from "./policy-types";
27
+ import type { HookEventType } from "./types";
28
+
29
+ export const ANTIGRAVITY_PATH_GUARD_NAME = "failproofai/antigravity-file-path-required";
30
+
31
+ export const ANTIGRAVITY_PATH_GUARD_DESCRIPTION =
32
+ "Refuse an Antigravity file tool call with no file path failproofai can check.";
33
+
34
+ export const ANTIGRAVITY_PATH_GUARD_MATCH: PolicyMatcher = {
35
+ events: ["PreToolUse"],
36
+ toolNames: ["Read", "Write", "Edit"],
37
+ };
38
+
39
+ /**
40
+ * A pause is the way through: if Antigravity renames an argument, this refuses
41
+ * every file call until failproofai is updated, and the operator needs one. But a
42
+ * pause suspends local policy only, and Cloud policies keep running. A pathless
43
+ * call would slip past a Cloud path policy, so a local pause cannot lift this
44
+ * while one enforces. An `observe` Cloud policy decides nothing, so it does not
45
+ * count. Any enforcing policy counts, since a policy's source does not say
46
+ * whether it reads paths.
47
+ */
48
+ export function antigravityPathGuardActive(
49
+ paused: boolean,
50
+ cloudPolicies: ReadonlyArray<{ effect?: string }>,
51
+ ): boolean {
52
+ return !paused || cloudPolicies.some((p) => p.effect !== "observe");
53
+ }
54
+
55
+ /** Whether this canonicalized call is a file tool with no path anything could check. */
56
+ export function antigravityCallLacksPath(
57
+ eventType: HookEventType | string,
58
+ toolName: string | undefined,
59
+ toolInput: unknown,
60
+ ): boolean {
61
+ if (eventType !== "PreToolUse") return false;
62
+ if (!toolName || !ANTIGRAVITY_PATH_GUARD_MATCH.toolNames?.includes(toolName)) return false;
63
+ const path = (toolInput as Record<string, unknown> | null | undefined)?.file_path;
64
+ return typeof path !== "string" || path.trim() === "";
65
+ }
66
+
67
+ export function antigravityPathGuard(ctx: PolicyContext): PolicyResult {
68
+ if (!antigravityCallLacksPath(ctx.eventType, ctx.toolName, ctx.toolInput)) return allow();
69
+ return deny(
70
+ `failproofai could not find a file path in this ${ctx.toolName ?? "file"} call, so it cannot check it against your policies. ` +
71
+ "Your Antigravity version may have changed its tool arguments: update failproofai.",
72
+ );
73
+ }
@@ -13,16 +13,19 @@ import {
13
13
  mkdirSync,
14
14
  mkdtempSync,
15
15
  readFileSync,
16
+ readdirSync,
17
+ statSync,
16
18
  writeFileSync,
17
19
  unlinkSync,
18
20
  rmSync,
19
21
  } from "node:fs";
20
22
  import { homedir, tmpdir, userInfo } from "node:os";
21
- import { resolve } from "node:path";
23
+ import { dirname, resolve } from "node:path";
22
24
  import { execFileSync } from "node:child_process";
23
25
  import { hookLogWarn } from "./hook-logger";
24
26
  import { downloadFailproofaidBinary, installFromNpmPackage, installedBinaryPath } from "./daemon-download";
25
27
  import { logsDir } from "./fp-home";
28
+ import { shellQuote } from "./shell-quote";
26
29
  import { version } from "../../package.json";
27
30
  import { readVersionFile, updateConfig, writeVersionFile } from "./fp-config";
28
31
 
@@ -288,11 +291,6 @@ export function resolveCliCommand(): string | null {
288
291
  return `${shellQuote(process.execPath)} ${shellQuote(cliScript)}`;
289
292
  }
290
293
 
291
- /** POSIX single-quoting: everything is literal inside '…', and a literal
292
- * quote is closed, escaped and reopened. */
293
- function shellQuote(value: string): string {
294
- return `'${value.replace(/'/g, `'\\''`)}'`;
295
- }
296
294
 
297
295
  /**
298
296
  * The raw, unquoted path to the worker script the service will run — the same
@@ -413,6 +411,142 @@ function systemdUnitPath(user: string = serviceUser()): string {
413
411
  return resolve(systemdUnitDir(), systemdUnitName(user));
414
412
  }
415
413
 
414
+ /**
415
+ * Where a Linux install puts the copy of the daemon that systemd actually runs:
416
+ * `/opt/failproofai/<user>/bin/failproofaid-<version>`, root-owned.
417
+ *
418
+ * The binary is downloaded into `~/.failproofai/bin`, and a unit whose
419
+ * `ExecStart` points there works on Debian, Ubuntu and Mint — and on Fedora,
420
+ * RHEL, Rocky and Alma it never starts. Those ship SELinux enforcing, a file
421
+ * under a home directory is labelled `user_home_t`, and the targeted policy
422
+ * gives systemd (`init_t`) no execute permission on that type at all. The unit
423
+ * fails `203/EXEC Permission denied`, `waitForDaemonRunning()` times out, and
424
+ * `failproofai config` aborts at its very last step.
425
+ *
426
+ * The policy's generic `/opt/(.*\/)?bin(/.*)?` rule labels this path `bin_t`,
427
+ * which systemd may execute, and executing it moves the daemon into
428
+ * `unconfined_service_t` — the domain that may in turn run the worker's node
429
+ * from `~/.nvm` (also `user_home_t`) and accept hooks on the socket. So only
430
+ * the daemon binary moves; the worker command, the socket and the state under
431
+ * `~/.failproofai` stay where they are. Not `/usr/local/libexec`: both
432
+ * policies label that `usr_t`, which starts the daemon only through a
433
+ * secondary `init_t usr_t → unconfined_service_t` rule, where `bin_t` is the
434
+ * type the policy means for programs. Not `/usr/libexec` either: `/usr` is the
435
+ * package manager's, and read-only on Silverblue and CoreOS. All checked
436
+ * against the shipped policy on Fedora 41 and Rocky 9 with `matchpathcon` and
437
+ * `sesearch`.
438
+ *
439
+ * Per user for the same reason the unit name is: two people on one box may run
440
+ * different versions, and one's uninstall must not delete the other's binary.
441
+ * The `~/.failproofai/bin` copy is kept — `daemonVersionSkew()` and
442
+ * `refreshDaemonToCliVersion()` read the installed version from it.
443
+ *
444
+ * Redirectable for tests ONLY, like the unit directory.
445
+ */
446
+ function systemBinaryRoot(user: string = serviceUser()): string {
447
+ return resolve(process.env.FAILPROOFAI_SYSTEM_BIN_DIR || "/opt/failproofai", user);
448
+ }
449
+
450
+ function systemBinaryDir(): string {
451
+ return resolve(systemBinaryRoot(), "bin");
452
+ }
453
+
454
+ /** The system binary directory on Linux, for the manual-removal instructions. */
455
+ export function daemonSystemBinaryDir(): string | null {
456
+ return process.platform === "linux" ? systemBinaryRoot() : null;
457
+ }
458
+
459
+ /**
460
+ * The path systemd should start for `binaryPath`, or null when it should start
461
+ * `binaryPath` itself.
462
+ *
463
+ * Only a real file is copied. `FAILPROOFAI_DAEMON_BINARY` is "someone named a
464
+ * binary explicitly" and may be a command with arguments (this repo's own
465
+ * systemd tests use `/usr/bin/sleep infinity`), so it is started as given.
466
+ */
467
+ export function systemBinaryTarget(binaryPath: string): string | null {
468
+ if (process.platform !== "linux" || process.env.FAILPROOFAI_DAEMON_BINARY) return null;
469
+ try {
470
+ if (!statSync(binaryPath).isFile()) return null;
471
+ } catch {
472
+ return null;
473
+ }
474
+ return resolve(systemBinaryDir(), `failproofaid-${version}`);
475
+ }
476
+
477
+ /**
478
+ * Whether this kernel has SELinux enabled. `/sys/fs/selinux` is mounted only
479
+ * when it is, enforcing or permissive.
480
+ */
481
+ function selinuxEnabled(): boolean {
482
+ return existsSync("/sys/fs/selinux/enforce");
483
+ }
484
+
485
+ /**
486
+ * Copies the daemon binary into the system directory and returns the path the
487
+ * unit should start. Privileged; throws when the copy fails, which the caller
488
+ * reports as a failed install before any unit is written.
489
+ *
490
+ * Staged under a temp name and renamed into place, so a reinstall of the same
491
+ * version never writes into the file a running daemon was started from.
492
+ *
493
+ * `restorecon` afterwards, because a new file inherits the label of the
494
+ * directory it is created in, not the one the policy assigns to its path: the
495
+ * directories `install -d` creates under `/opt` (`usr_t`) come out `usr_t`
496
+ * too, never the `bin_t` the policy names for them.
497
+ */
498
+ function stageSystemBinary(binaryPath: string): string {
499
+ const target = systemBinaryTarget(binaryPath);
500
+ if (!target) return binaryPath;
501
+ const dir = systemBinaryDir();
502
+ const staging = `${target}.${process.pid}.tmp`;
503
+ runPrivileged("install", ["-d", "-m", "0755", dir]);
504
+ try {
505
+ runPrivileged("install", ["-m", "0755", binaryPath, staging]);
506
+ runPrivileged("mv", ["-f", staging, target]);
507
+ } catch (err) {
508
+ try {
509
+ runPrivileged("rm", ["-f", staging]);
510
+ } catch {
511
+ /* best-effort */
512
+ }
513
+ throw err;
514
+ }
515
+ if (selinuxEnabled()) {
516
+ const root = systemBinaryRoot();
517
+ try {
518
+ runPrivileged("restorecon", ["-R", root]);
519
+ } catch (err) {
520
+ // Not fatal here: a wrong label still surfaces as the daemon not
521
+ // reaching a running state, which fails the install with its status.
522
+ hookLogWarn(`restorecon on ${root} failed: ${err instanceof Error ? err.message : String(err)}`);
523
+ }
524
+ }
525
+ return target;
526
+ }
527
+
528
+ /**
529
+ * Removes system copies other than `current` and the most recent one before
530
+ * it — the same keep-one-for-rollback rule `pruneOldDaemonBinaries()` applies
531
+ * to `~/.failproofai/bin`. Best-effort; only called once the service runs
532
+ * `current`.
533
+ */
534
+ function pruneSystemBinaries(current: string): void {
535
+ try {
536
+ const dir = systemBinaryDir();
537
+ const stale = readdirSync(dir)
538
+ .filter((f) => f.startsWith("failproofaid-"))
539
+ .map((f) => resolve(dir, f))
540
+ .filter((p) => p !== current)
541
+ .map((p) => ({ p, mtime: statSync(p).mtimeMs }))
542
+ .sort((a, b) => b.mtime - a.mtime)
543
+ .slice(1);
544
+ for (const { p } of stale) runPrivileged("rm", ["-f", p]);
545
+ } catch {
546
+ // Nothing to prune, or no elevation left — leaving a file costs disk only.
547
+ }
548
+ }
549
+
416
550
  /**
417
551
  * The pre-1.0.0-beta.1 user-scope unit. Still removed on install and
418
552
  * uninstall: it holds the same flock the new service needs, so leaving one
@@ -792,8 +926,21 @@ function daemonInstallCommands(
792
926
  cliCmd: string | null,
793
927
  ): string[] {
794
928
  if (process.platform === "linux") {
929
+ const target = systemBinaryTarget(binaryPath);
930
+ const dir = systemBinaryDir();
931
+ const stage = target
932
+ ? [
933
+ // Quoted: a home directory may hold a space, and an unquoted path
934
+ // splits into words that stop this `&&`-joined recipe before the
935
+ // unit is ever written.
936
+ `sudo install -d -m 0755 ${shellQuote(dir)}`,
937
+ `sudo install -m 0755 ${shellQuote(binaryPath)} ${shellQuote(target)}`,
938
+ `{ sudo restorecon -R ${shellQuote(systemBinaryRoot())} 2>/dev/null || true; }`,
939
+ ]
940
+ : [];
795
941
  return [
796
- `sudo tee ${systemdUnitPath()} <<'EOF'\n${systemdUnitContents(binaryPath, workerCmd, cliCmd)}EOF`,
942
+ ...stage,
943
+ `sudo tee ${systemdUnitPath()} <<'EOF'\n${systemdUnitContents(target ?? binaryPath, workerCmd, cliCmd)}EOF`,
797
944
  "sudo systemctl daemon-reload",
798
945
  `sudo systemctl enable ${systemdUnitName()}`,
799
946
  // `restart`, not `enable --now`, for the reason the install path gives:
@@ -865,9 +1012,13 @@ export async function installDaemonService(): Promise<DaemonInstallResult> {
865
1012
  // never came up. Clear it first, every time.
866
1013
  removeLegacyUserService();
867
1014
 
1015
+ let execPath = binaryPath;
868
1016
  try {
869
1017
  if (process.platform === "linux") {
870
- writePrivilegedFile(systemdUnitPath(), systemdUnitContents(binaryPath, workerCmd, cliCmd));
1018
+ // Before the unit is written, so a copy that fails leaves the previous
1019
+ // unit and the daemon it runs untouched. See `systemBinaryDir()`.
1020
+ execPath = stageSystemBinary(binaryPath);
1021
+ writePrivilegedFile(systemdUnitPath(), systemdUnitContents(execPath, workerCmd, cliCmd));
871
1022
  runPrivileged("systemctl", ["daemon-reload"]);
872
1023
  // `enable` for boot persistence, then `restart` — NOT `enable --now`.
873
1024
  //
@@ -927,6 +1078,7 @@ export async function installDaemonService(): Promise<DaemonInstallResult> {
927
1078
  hookLogWarn(`daemon service install failed: ${reason}`);
928
1079
  return { installed: false, reason };
929
1080
  }
1081
+ if (execPath !== binaryPath) pruneSystemBinaries(execPath);
930
1082
 
931
1083
  // NOTE: this reports that the SERVICE is installed and running, which is all
932
1084
  // it can honestly claim. Whether the daemon can actually evaluate a hook is a
@@ -1671,17 +1823,35 @@ export async function uninstallDaemonService(): Promise<void> {
1671
1823
  try {
1672
1824
  if (process.platform === "linux") {
1673
1825
  const unitPath = systemdUnitPath();
1674
- if (!existsSync(unitPath)) return;
1675
- try {
1676
- runPrivileged("systemctl", ["disable", "--now", systemdUnitName()]);
1677
- } catch {
1678
- // Already stopped/not enabled — removing the unit is still the point.
1826
+ if (existsSync(unitPath)) {
1827
+ try {
1828
+ runPrivileged("systemctl", ["disable", "--now", systemdUnitName()]);
1829
+ } catch {
1830
+ // Already stopped/not enabled — removing the unit is still the point.
1831
+ }
1832
+ // Throws when it cannot elevate, which also skips the removal below:
1833
+ // a unit still on disk may yet start the binary under it.
1834
+ runPrivileged("rm", ["-f", unitPath]);
1835
+ try {
1836
+ runPrivileged("systemctl", ["daemon-reload"]);
1837
+ } catch {
1838
+ // Best-effort.
1839
+ }
1679
1840
  }
1680
- runPrivileged("rm", ["-f", unitPath]);
1681
- try {
1682
- runPrivileged("systemctl", ["daemon-reload"]);
1683
- } catch {
1684
- // Best-effort.
1841
+ // The copy systemd ran. After the unit is gone, so nothing enabled is
1842
+ // left pointing at a deleted file, and whether or not there was a unit to
1843
+ // remove: an install that failed after staging, or a unit deleted by hand,
1844
+ // leaves this behind with nothing else to clean it up. The directory is
1845
+ // per user, so no other user's unit can reference it. The shared parent
1846
+ // goes only if no other user's directory is in it.
1847
+ const binRoot = systemBinaryRoot();
1848
+ if (existsSync(binRoot)) {
1849
+ runPrivileged("rm", ["-rf", binRoot]);
1850
+ try {
1851
+ runPrivileged("rmdir", [dirname(binRoot)]);
1852
+ } catch {
1853
+ // Not empty — another user's daemon lives there.
1854
+ }
1685
1855
  }
1686
1856
  } else {
1687
1857
  const plistPath = launchdPlistPath();
@@ -66,7 +66,7 @@ export interface ParkedName {
66
66
  /**
67
67
  * Mirrors `ParkedName::parse` in `crates/fpai-collect/src/uploader.rs`.
68
68
  *
69
- * Suffixes are stripped right to left (`.cNNN` then `.aN`), and each is parsed
69
+ * Suffixes are stripped right to left (`.cNNN`, `.rN`, `.sN`, `.aN`), and each is parsed
70
70
  * rather than merely matched, which is what keeps a real spool name safe: a
71
71
  * base like `claude-...-0` has no numeric `.c`/`.a` to find, and anything that
72
72
  * looks like one but is not numeric stays part of the base.
@@ -90,6 +90,16 @@ export function parseParkedName(name: string): ParkedName {
90
90
  base = base.slice(0, cIdx);
91
91
  }
92
92
  }
93
+ // The CLI needs status and total attempts; the two rejection budgets are Rust-owned.
94
+ for (const suffix of [".r", ".s"]) {
95
+ const idx = base.lastIndexOf(suffix);
96
+ if (idx === -1) continue;
97
+ const raw = base.slice(idx + 2);
98
+ const n = Number(raw);
99
+ if (/^\+?\d+$/.test(raw) && Number.isInteger(n) && n >= 0 && n <= 0xffffffff) {
100
+ base = base.slice(0, idx);
101
+ }
102
+ }
93
103
  const aIdx = base.lastIndexOf(".a");
94
104
  if (aIdx !== -1) {
95
105
  const n = Number(base.slice(aIdx + 2));