failproofai 1.0.12 → 1.0.13-beta.2

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 (302) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +13 -13
  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 +2 -2
  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 -1
  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 +2 -2
  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 +4 -3
  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 +3 -3
  22. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  23. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  24. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  25. package/.next/standalone/.next/server/app/api/audit/invite/route.js +6 -5
  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 +27 -26
  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 +4 -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 +6 -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 +6 -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 +6 -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 +6 -5
  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 +4 -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 +2 -2
  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 +7 -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 +3 -3
  48. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  49. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  50. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  51. package/.next/standalone/.next/server/app/page/build-manifest.json +2 -2
  52. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  53. package/.next/standalone/.next/server/app/page.js +6 -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 +2 -2
  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 +5 -4
  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 +2 -2
  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 +21 -20
  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 +2 -2
  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 +10 -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 +2 -2
  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 +7 -6
  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 +2 -2
  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 +6 -5
  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/{[externals]__0vt9i6fqinjne._.js → [externals]__1h83uo-b1b6-2._.js} +1 -1
  83. package/.next/standalone/.next/server/chunks/[externals]__214wn4wh2x79y._.js +3 -0
  84. package/.next/standalone/.next/server/chunks/{[externals]__1rlxpymm37wel._.js → [root-of-the-server]__031qp1lkow_kc._.js} +2 -2
  85. package/.next/standalone/.next/server/chunks/[root-of-the-server]__038kwryp970nh._.js +3 -0
  86. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0_hsnj_a2mvl_._.js → [root-of-the-server]__03s1za0hn71yp._.js} +2 -2
  87. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0wg9dk8x8bnau._.js → [root-of-the-server]__07a0sa6fuw5_b._.js} +2 -2
  88. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08atcie7jzswm._.js +3 -0
  89. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08dchfudh2_4f._.js +1 -1
  90. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0car70pylmvor._.js +3 -0
  91. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0spt0kv8azrpl._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__12kq3x-h7t7i1._.js → [root-of-the-server]__0yvyp5b7jmlc4._.js} +2 -2
  93. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__02vous7mpi2xm._.js → [root-of-the-server]__145vo_drnuvas._.js} +2 -2
  94. package/.next/standalone/.next/server/chunks/{[externals]__0h0p9dmv_e7r7._.js → [root-of-the-server]__1a2d0ewycsp6k._.js} +2 -2
  95. package/.next/standalone/.next/server/chunks/{[externals]__1_407huhlmj1m._.js → [root-of-the-server]__1am_1tz0o0aqz._.js} +2 -2
  96. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__03i5o4a840guz._.js → [root-of-the-server]__1gxfzuvpyw30j._.js} +1 -1
  97. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1j6kfp0vzu5rw._.js +3 -0
  98. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1l0ayum_hqqsw._.js +3 -0
  99. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1lh8c0mmhdrbj._.js +3 -0
  100. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1o9rznwc0w7og._.js +3 -0
  101. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0f_4g-vazrvxv._.js → [root-of-the-server]__1o_622x0fglpr._.js} +1 -1
  102. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1oclamblhzhrf._.js +68 -0
  103. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1v1-l-83czzsr._.js +63 -0
  104. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1a5zkndjwlc13._.js → [root-of-the-server]__1wwi53kkqhnfi._.js} +1 -1
  105. package/.next/standalone/.next/server/chunks/{_1y590mjzpkbos._.js → _02sa8fcu9_9xo._.js} +2 -2
  106. package/.next/standalone/.next/server/chunks/_0tovk6q0miud6._.js +1 -1
  107. package/.next/standalone/.next/server/chunks/_0trp3ycqv17cl._.js +1 -1
  108. package/.next/standalone/.next/server/chunks/_1-2owkp-1_987._.js +1 -1
  109. package/.next/standalone/.next/server/chunks/_13ltj8a9z92o8._.js +1 -1
  110. package/.next/standalone/.next/server/chunks/_15k37au70vjvg._.js +1 -1
  111. package/.next/standalone/.next/server/chunks/_18rfu4__wjhwb._.js +1 -1
  112. package/.next/standalone/.next/server/chunks/_1ek68lnh2daur._.js +2 -2
  113. package/.next/standalone/.next/server/chunks/_1fz8m31sndkcu._.js +1 -1
  114. package/.next/standalone/.next/server/chunks/_1ogwigfb0163w._.js +1 -1
  115. package/.next/standalone/.next/server/chunks/_1vslkoe35wok6._.js +1 -1
  116. package/.next/standalone/.next/server/chunks/node_modules_@opentelemetry_api_build_esm_index_0oo58a7rymoxh.js +3 -0
  117. package/.next/standalone/.next/server/chunks/node_modules_@opentelemetry_api_build_esm_index_1jp9ij0_ddtgk.js +3 -0
  118. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oigsgz07._.js +2 -2
  119. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p77cu37y._.js +2 -2
  120. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4vkpxxu7._.js +1 -1
  121. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ffu2-38y03ic._.js → [root-of-the-server]__021vebe-4il8s._.js} +1 -1
  122. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__075uro8t92s0_._.js +14 -0
  123. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08ch3staq3ejw._.js +1 -1
  124. package/.next/standalone/.next/server/chunks/ssr/{[externals]__12qr51qgrrt6o._.js → [root-of-the-server]__097i34ct1o88x._.js} +2 -2
  125. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0alpzjn3450sr._.js +3 -0
  126. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0aup10z2o8zc1._.js +3 -0
  127. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bigvy9xmv2ka._.js +1 -1
  128. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bioghlkjf7s7._.js +3 -0
  129. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__01j58mdcdw0vn._.js → [root-of-the-server]__0ed1zh4scn7-k._.js} +1 -1
  130. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0naevg4bcoh54._.js → [root-of-the-server]__0evgy902m9h5e._.js} +2 -2
  131. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h86bl2qf0k_o._.js +1 -1
  132. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nhm28v58ty9z._.js +3 -0
  133. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pia5h3p8re4c._.js +1 -1
  134. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vse4qi496ol-._.js +3 -0
  135. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__17r4zrwanhp6r._.js → [root-of-the-server]__0yb3u36xjy3b9._.js} +1 -1
  136. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0g8b0kyorya-t._.js → [root-of-the-server]__0ywj2u6ovfm_5._.js} +1 -1
  137. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-ey9fgesfbc0._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0zn1d4blhd3bu._.js → [root-of-the-server]__10v5cyxvj64j4._.js} +1 -1
  139. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15usvs-ms-0hf._.js +1 -1
  140. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16gb3_92zvk5x._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__190xwrr5zrfi3._.js +3 -0
  142. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__167mipqmjprq5._.js → [root-of-the-server]__19nvo1qfswchs._.js} +2 -2
  143. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1avi2kypusyb_._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1vx7o8ukefudh._.js → [root-of-the-server]__1guwlpkyurdn9._.js} +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1k96jctukf65_._.js +3 -0
  146. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r7drlqli-ado._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1sj-wn2jp6va5._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1vofkb2oq7p7e._.js +1 -1
  149. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1s2-ck3k3rsoo._.js → [root-of-the-server]__20dt376-socef._.js} +1 -1
  150. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1lnfv02ucky7m._.js → [root-of-the-server]__2158020r_amn9._.js} +1 -1
  151. package/.next/standalone/.next/server/chunks/ssr/_0eoura3_9gjb-._.js +1 -1
  152. package/.next/standalone/.next/server/chunks/ssr/_0pedwblqdoh58._.js +1 -1
  153. package/.next/standalone/.next/server/chunks/ssr/_1_ozgifqv1ssi._.js +1 -1
  154. package/.next/standalone/.next/server/chunks/ssr/_1djqs9i27e4kg._.js +1 -1
  155. package/.next/standalone/.next/server/chunks/ssr/{_1d98fyfrcaqhy._.js → _1nvqg4si0splb._.js} +2 -2
  156. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo5_vm5f.js +2 -2
  157. package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9snixb5fd-._.js +1 -1
  158. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47q0xq5w._.js +1 -1
  159. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x33jqb6._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpcz0uxur._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h47jmhhd._.js +1 -1
  162. package/.next/standalone/.next/server/chunks/ssr/{node_modules_09s4n108bqreq._.js → node_modules_0ptcnmeaxvd_a._.js} +22 -2
  163. package/.next/standalone/.next/server/chunks/ssr/node_modules_@opentelemetry_api_build_esm_index_0ntwr8lzj6p2i.js +3 -0
  164. package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_0tqc05n832v7a.js → node_modules_html-to-image_es_index_1gk40bvx2bftt.js} +1 -1
  165. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_0bz67659f5z-3._.js +32 -0
  166. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +3 -3
  167. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0ocrceo0c9psx._.js +32 -0
  168. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1alv566ojmz5j._.js +32 -0
  169. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1khq67j4vo9y4._.js +3 -0
  170. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_shared_lib_0ftnv26hg1lry._.js +3 -0
  171. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dagmbznysrc2._.js +1 -1
  172. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuznb72p7z._.js +2 -2
  173. package/.next/standalone/.next/server/chunks/ssr/package_json_[json]_cjs_013tntikdft59._.js +1 -1
  174. package/.next/standalone/.next/server/middleware-build-manifest.js +13 -13
  175. package/.next/standalone/.next/server/middleware.js +2 -2
  176. package/.next/standalone/.next/server/pages/404.html +1 -1
  177. package/.next/standalone/.next/server/pages/500.html +1 -1
  178. package/.next/standalone/.next/server/preview-props.json +3 -3
  179. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  180. package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
  181. package/.next/standalone/.next/static/chunks/061bksch79zq2.js +1 -0
  182. package/.next/standalone/.next/static/chunks/{0wobqgosirs8p.js → 1l9lji2he-mbw.js} +1 -1
  183. package/.next/standalone/.next/static/chunks/{1kduj74-715jh.js → 1mkf3bas1g5ka.js} +1 -1
  184. package/.next/standalone/.next/static/chunks/22gs9785ug-vp.js +1 -0
  185. package/.next/standalone/.next/static/chunks/{0el9n3h9_zp5m.js → 2f9-xdgd1o3r5.js} +1 -1
  186. package/.next/standalone/.next/static/chunks/{0umzct31duk5g.js → 2q-6h4rclnu98.js} +1 -1
  187. package/.next/standalone/.next/static/chunks/{27cavoc8paelg.js → 2x-77r0k0xm3b.js} +1 -1
  188. package/.next/standalone/.next/static/chunks/2xox4fr0q-ftn.js +1 -0
  189. package/.next/standalone/.next/static/chunks/3lgxb73wehfv2.js +1 -0
  190. package/.next/standalone/.next/static/chunks/{063al_q720fkj.js → 3xgxl1s_in776.js} +2 -2
  191. package/.next/standalone/.next/static/chunks/44rukkkzacqkl.js +6 -0
  192. package/.next/standalone/SECURITY.md +20 -4
  193. package/.next/standalone/fp-cloud-cli/CHANGELOG.md +15 -1
  194. package/.next/standalone/fp-cloud-cli/fp_cli/_version.py +1 -1
  195. package/.next/standalone/fp-cloud-cli/uv.lock +4 -4
  196. package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
  197. package/.next/standalone/node_modules/@next/env/package.json +1 -1
  198. package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
  199. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +24 -24
  200. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +26 -26
  201. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +3 -3
  202. package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +13 -13
  203. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  204. package/.next/standalone/node_modules/next/dist/server/app-render/app-render.js +41 -40
  205. package/.next/standalone/node_modules/next/dist/server/app-render/async-local-storage.js +1 -1
  206. package/.next/standalone/node_modules/next/dist/server/app-render/dynamic-rendering-validation.js +814 -0
  207. package/.next/standalone/node_modules/next/dist/server/app-render/dynamic-rendering.js +1 -799
  208. package/.next/standalone/node_modules/next/dist/server/base-server.js +39 -5
  209. package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
  210. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  211. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  212. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  213. package/.next/standalone/node_modules/next/dist/server/lib/dedupe-fetch.js +4 -43
  214. package/.next/standalone/node_modules/next/dist/server/lib/patch-fetch-symbol.js +13 -0
  215. package/.next/standalone/node_modules/next/dist/server/lib/patch-fetch.js +3 -7
  216. package/.next/standalone/node_modules/next/dist/server/lib/router-server.js +3 -3
  217. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js +77 -12
  218. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
  219. package/.next/standalone/node_modules/next/dist/server/lib/trace/constants.js +12 -0
  220. package/.next/standalone/node_modules/next/dist/server/lib/trace/tracer.js +30 -14
  221. package/.next/standalone/node_modules/next/dist/server/next-server.js +10 -11
  222. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/pages-handler.js +29 -23
  223. package/.next/standalone/node_modules/next/dist/server/route-modules/route-module.js +85 -8
  224. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +1 -1
  225. package/.next/standalone/node_modules/next/dist/server/web/adapter.js +124 -65
  226. package/.next/standalone/node_modules/next/dist/server/web/forward-trace-context.js +102 -0
  227. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  228. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  229. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
  230. package/.next/standalone/node_modules/next/package.json +10 -10
  231. package/.next/standalone/node_modules/react/cjs/react.production.js +1 -1
  232. package/.next/standalone/node_modules/react/package.json +1 -1
  233. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1 -1
  234. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1 -1
  235. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +31 -27
  236. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +33 -27
  237. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +38 -30
  238. package/.next/standalone/node_modules/react-dom/cjs/react-dom.production.js +1 -1
  239. package/.next/standalone/node_modules/react-dom/package.json +2 -2
  240. package/.next/standalone/package.json +10 -10
  241. package/.next/standalone/sdk/python/CHANGELOG.md +8 -4
  242. package/.next/standalone/sdk/python/failproofai_sdk/evaluator/source.py +2 -2
  243. package/.next/standalone/sdk/python/pyproject.toml +2 -7
  244. package/.next/standalone/sdk/python/skill/references/frameworks.md +0 -15
  245. package/.next/standalone/sdk/python/tests/test_docs.py +1 -4
  246. package/.next/standalone/sdk/python/tests/test_evaluator_source.py +1 -1
  247. package/.next/standalone/sdk/python/tests/test_packaging.py +4 -7
  248. package/.next/standalone/sdk/python/tests/test_zero_dependencies.py +2 -13
  249. package/.next/standalone/sdk/python/uv.lock +40 -902
  250. package/.next/standalone/sdk/typescript/CHANGELOG.md +52 -0
  251. package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/package-lock.json +176 -68
  252. package/.next/standalone/sdk/typescript/integration/fixtures/ai-4/package.json +2 -2
  253. package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/package-lock.json +3 -3
  254. package/.next/standalone/sdk/typescript/integration/fixtures/ai-5/package.json +1 -1
  255. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-0.3/package-lock.json +115 -98
  256. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-0.3/package.json +3 -3
  257. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package-lock.json +4 -4
  258. package/.next/standalone/sdk/typescript/integration/fixtures/langchain-dup-core/package.json +1 -1
  259. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package-lock.json +171 -149
  260. package/.next/standalone/sdk/typescript/integration/fixtures/llamaindex-0.11/package.json +5 -2
  261. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package-lock.json +27 -15
  262. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package.json +2 -1
  263. package/.next/standalone/sdk/typescript/integration/fixtures/runtimes/deno-npm.ts +1 -1
  264. package/.next/standalone/server.js +1 -1
  265. package/README.md +0 -6
  266. package/dist/cli.mjs +369 -221
  267. package/dist/worker.mjs +1 -1
  268. package/hermes-plugin/plugin.yaml +1 -1
  269. package/package.json +10 -10
  270. package/scripts/sync-agent-cli-harnesses-prompt.md +26 -31
  271. package/src/hooks/daemon-service.ts +168 -3
  272. package/src/hooks/uninstall-cli.ts +3 -0
  273. package/.next/standalone/.codex/hooks.json +0 -76
  274. package/.next/standalone/.cursor/hooks.json +0 -47
  275. package/.next/standalone/.factory/hooks.json +0 -112
  276. package/.next/standalone/.next/server/chunks/[externals]__1x24dzcbbq6-g._.js +0 -3
  277. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0__a_je8fsn65._.js +0 -3
  278. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l-oi4gdtmlo5._.js +0 -3
  279. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t9ufnv5hi2hq._.js +0 -327
  280. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1aaw59g-5uty7._.js +0 -322
  281. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1hqpg6vgmfexv._.js +0 -3
  282. package/.next/standalone/.next/server/chunks/ssr/[externals]__0ilfh9mfnzsth._.js +0 -3
  283. package/.next/standalone/.next/server/chunks/ssr/[externals]__0ohnuzsaozaca._.js +0 -3
  284. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pwj2h2efe5f-._.js +0 -14
  285. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_0zuikgt2xho-v._.js +0 -271
  286. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_158jo-9mwvgad._.js +0 -291
  287. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_19r82zsxo2jj1._.js +0 -291
  288. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1dupwucoqt5qm._.js +0 -3
  289. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_shared_lib_03w27x2kh17_8._.js +0 -23
  290. package/.next/standalone/.next/static/chunks/0k7g_8x3o6gd-.js +0 -1
  291. package/.next/standalone/.next/static/chunks/12rug3jilwqzs.js +0 -1
  292. package/.next/standalone/.next/static/chunks/2701amhrbsbot.js +0 -1
  293. package/.next/standalone/.next/static/chunks/2ve23a7keupjw.js +0 -1
  294. package/.next/standalone/.next/static/chunks/3bv6xaoitjpnh.js +0 -6
  295. package/.next/standalone/.opencode/opencode.json +0 -4
  296. package/.next/standalone/.opencode/plugins/failproofai.mjs +0 -210
  297. package/.next/standalone/.pi/settings.json +0 -5
  298. package/.next/standalone/node_modules/react/cjs/react.development.js +0 -1330
  299. package/scripts/dev-hook.mjs +0 -333
  300. /package/.next/standalone/.next/static/{D7LY1YSrw96ZxKSpxxrFw → TdOlUedz_AHC-0Ops67a_}/_buildManifest.js +0 -0
  301. /package/.next/standalone/.next/static/{D7LY1YSrw96ZxKSpxxrFw → TdOlUedz_AHC-0Ops67a_}/_clientMiddlewareManifest.js +0 -0
  302. /package/.next/standalone/.next/static/{D7LY1YSrw96ZxKSpxxrFw → TdOlUedz_AHC-0Ops67a_}/_ssgManifest.js +0 -0
package/dist/worker.mjs CHANGED
@@ -1166,7 +1166,7 @@ function instruct(reason) {
1166
1166
  }
1167
1167
 
1168
1168
  // package.json
1169
- var version = "1.0.12";
1169
+ var version = "1.0.13-beta.2";
1170
1170
  var init_package = () => {};
1171
1171
 
1172
1172
  // src/hooks/agent-targets.ts
@@ -1,5 +1,5 @@
1
1
  name: failproofai
2
- version: 1.0.12
2
+ version: 1.0.13-beta.2
3
3
  description: Real-time FailproofAI policy enforcement for Hermes
4
4
  manifest_version: 2
5
5
  api_version: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "failproofai",
3
- "version": "1.0.12",
3
+ "version": "1.0.13-beta.2",
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",
@@ -81,7 +81,7 @@
81
81
  "access": "public"
82
82
  },
83
83
  "devDependencies": {
84
- "@anthropic-ai/sdk": "^0.135.0",
84
+ "@anthropic-ai/sdk": "^1.3.0",
85
85
  "@mdx-js/mdx": "^3.1.1",
86
86
  "@tailwindcss/postcss": "^4.3.1",
87
87
  "@tanstack/react-virtual": "^3.14.10",
@@ -126,15 +126,15 @@
126
126
  "browserslist": "4.28.8"
127
127
  },
128
128
  "optionalDependencies": {
129
- "@failproofai/failproofaid-linux-x64": "1.0.12",
130
- "@failproofai/failproofaid-linux-arm64": "1.0.12",
131
- "@failproofai/failproofaid-darwin-x64": "1.0.12",
132
- "@failproofai/failproofaid-darwin-arm64": "1.0.12"
129
+ "@failproofai/failproofaid-linux-x64": "1.0.13-beta.2",
130
+ "@failproofai/failproofaid-linux-arm64": "1.0.13-beta.2",
131
+ "@failproofai/failproofaid-darwin-x64": "1.0.13-beta.2",
132
+ "@failproofai/failproofaid-darwin-arm64": "1.0.13-beta.2"
133
133
  },
134
134
  "failproofaidBinaries": {
135
- "linux-x64": "3b379ce2b03dd8a74393daed2c3120309f591fe6433e0c939d70c7b20da55be7",
136
- "linux-arm64": "bd77d7fee68dc2723fb57cc9c7fcf957b7e939c797e61b099c412263880aa16e",
137
- "darwin-x64": "fce3faab9406b1c2267955f0e07d04ef7a2b7a0b007e12ecd144fcfef563ebc8",
138
- "darwin-arm64": "765732f8f64aa3d3dbd98e93b1aba71fc02956f65baeb73b08447b37fac3a17b"
135
+ "linux-x64": "8301567948ddf752b6db30ed5998e62139df4c7e1669b280159a83a9b951b94c",
136
+ "linux-arm64": "ad53ec24d7c09b2dbc07b792c0739dc1e5f443fdb9a795174d3a40453f90bbcf",
137
+ "darwin-x64": "e4e65a1071a5793bafb73625dc49d211ff19d7e0d8c03c804959d1357aebea1e",
138
+ "darwin-arm64": "78aa90272e2ace07ac3648a419b961f8d8bfe56c7fd3a0193d3579085d77e9cb"
139
139
  }
140
140
  }
@@ -13,11 +13,11 @@ pull request with the fix — or, if a sync PR is already open, comment on it in
13
13
  finish the work.
14
14
  - The entrypoint has **already cut a fresh branch** named `auto/sync-cli-harnesses-<UTC>`.
15
15
  Do all your work here; do **not** switch branches or work on `main`.
16
- - failproofai's own Stop hooks are active in this checkout. If you make commits, you
17
- will not be allowed to stop until you have **committed**, **pushed**, and **opened a
18
- PR** for them. If you make **no** commits (nothing to sync, or you only commented on
19
- an already-open sync PR), a clean working tree stops fine — so on those paths, do
20
- **not** edit any files.
16
+ - **You publish your own work.** If you edit files, you must **commit**, **push**, and
17
+ **open a PR** for them (Phase 3) before you stop — no hook does it for you, and the
18
+ entrypoint fails the run if you leave uncommitted changes. If you make **no**
19
+ commits (nothing to sync, or you only commented on an already-open sync PR), do
20
+ **not** edit any files, so the working tree stays clean.
21
21
  - Use ultracode / multi-agent orchestration: in Phase 1, fan out **one subagent per
22
22
  CLI** so the seven harnesses are checked in parallel.
23
23
 
@@ -48,23 +48,17 @@ For each verified CLI, compare the upstream docs to this repo across three scope
48
48
  `src/hooks/integrations.ts` (matcher-wrapper vs flat-array vs packages-array vs
49
49
  plugin registration; field names like `command` vs `bash`/`powershell`;
50
50
  `timeout` vs `timeoutSec` and its **unit** seconds-vs-ms; presence of `version`
51
- / `$schema` / `matcher`; the settings-file path) **and** the committed dogfood
52
- fixture on disk. The canonical worked example is git history / PR #482, which
53
- dropped an invalid top-level `version` field and fixed a `60000`ms→`60`s timeout
54
- unit in `.codex/hooks.json` by editing the writer, the fixture, and the tests
55
- together.
51
+ / `$schema` / `matcher`; the settings-file path). The canonical worked example is
52
+ git history / PR #482, which dropped an invalid top-level `version` field and
53
+ fixed a `60000`ms→`60`s timeout unit in the `.codex/hooks.json` writer by editing
54
+ the writer and the tests together.
56
55
 
57
56
  ## Reading rules
58
57
 
59
- - This run relaxed two policies (`require-ci-green-before-stop`,
60
- `block-read-outside-cwd`) so you can read and edit the settings fixtures. Even so,
61
- when you only need to **inspect** a committed fixture, prefer
62
- `git show HEAD:<path>` (e.g. `git show HEAD:.codex/hooks.json`) — it is never
63
- blocked and is the reliable way to read `.claude/settings.json`, `.codex/hooks.json`,
64
- `.cursor/hooks.json`, `.github/hooks/failproofai.json`,
65
- `.pi/settings.json`, and `.opencode/*`.
66
- - Do **NOT** run `failproofai policies --install` (or any `failproofai` subcommand)
67
- to regenerate a fixture — it is blocked. Edit fixtures by hand.
58
+ - Do **NOT** run `failproofai policies --install` (or any `failproofai` subcommand):
59
+ it would write hook configs into this clone, and those must never land in the PR.
60
+ The settings-file shape lives in the writer in `src/hooks/integrations.ts` and its
61
+ tests — read and edit those.
68
62
 
69
63
  ## Phase 1 — Fan out one subagent per CLI
70
64
 
@@ -80,7 +74,7 @@ Spawn one subagent per CLI (seven, in parallel). Each subagent, for its CLI:
80
74
  2. Compare against this repo: the CLI's `*HOOK_EVENT_TYPES` array + paired
81
75
  `*EVENT_MAP` (scope 1); its `*_TOOL_MAP` / `*_TOOL_INPUT_MAP` and its branch in
82
76
  `src/hooks/policy-evaluator.ts` (scope 2); its literals in
83
- `src/hooks/integrations.ts` + its dogfood fixture read via `git show` (scope 3).
77
+ `src/hooks/integrations.ts` (scope 3).
84
78
  3. Return a structured report: `{ cli, status: up-to-date | drift | unverified,
85
79
  scope1: {added, removed}, scope2: {...}, scope3: {...}, sources: [...] }`.
86
80
 
@@ -102,7 +96,7 @@ surface is documented in the package source, not a clean enumeration).
102
96
 
103
97
  Merge the subagent reports into one list of detected drift. Then, **before you edit a
104
98
  single file**, decide which path you are on — editing first would leave uncommitted
105
- changes that block a clean stop on the comment / no-op paths below.
99
+ changes behind on the comment / no-op paths below, which fails the run.
106
100
 
107
101
  1. **No drift in any verified CLI** → do nothing: make no edits, open no PR, post no
108
102
  comment. Stop. (`unverified` alone is not drift — the docs may just be unreachable
@@ -124,7 +118,7 @@ changes that block a clean stop on the comment / no-op paths below.
124
118
  > (hook-sync bot — please fold these into this PR rather than opening a second sync PR.)
125
119
 
126
120
  Never push commits to another PR's branch; only comment, and leave the working
127
- tree clean so this run stops cleanly.
121
+ tree clean.
128
122
 
129
123
  - **If no open sync PR exists → go to Phase 3** to apply the fixes and open one.
130
124
 
@@ -155,7 +149,7 @@ requires.
155
149
  an invalid field to remove, a wrong timeout unit, or a renamed tool id (the PR
156
150
  #482 class). When you do, move the whole quartet together, exactly like #482:
157
151
  the writer in `src/hooks/integrations.ts` (+ a shared helper if it dedupes
158
- logic), the committed dogfood fixture, the unit test in
152
+ logic), the unit test in
159
153
  `__tests__/hooks/integrations.test.ts`, and the e2e test in
160
154
  `__tests__/e2e/hooks/<cli>-integration.e2e.test.ts` — plus a `types.ts` comment
161
155
  if it documents the old shape.
@@ -176,11 +170,14 @@ version's section. There is no `## Unreleased` section. Use the `### Features` (
176
170
  ### Commit, push, open the PR
177
171
  1. Stage only the files you intentionally edited (never `git add -A`):
178
172
  `src/hooks/types.ts`, `src/hooks/integrations.ts`, `src/hooks/policy-evaluator.ts`,
179
- the touched `__tests__/...` files, the touched dogfood fixtures, and
180
- `CHANGELOG.md` — whichever actually changed.
173
+ the touched `__tests__/...` files, and `CHANGELOG.md` — whichever actually
174
+ changed.
181
175
  2. Commit (e.g. `feat: sync agent CLI harnesses with upstream docs`), then
182
176
  `git push -u origin "$(git branch --show-current)"`.
183
177
  3. `gh pr create --base main --title "[auto] sync agent CLI harnesses with upstream docs" --body "<body>"`.
178
+ 4. Confirm before you stop: `git status --porcelain` is empty, the branch is pushed,
179
+ and `gh pr list --head "$(git branch --show-current)"` shows the PR. If any of
180
+ these fails, fix it — nothing else will.
184
181
 
185
182
  The PR **body** must contain, in order:
186
183
 
@@ -205,12 +202,10 @@ The PR **body** must contain, in order:
205
202
  - **Only edit** these paths, and only where drift requires it: `src/hooks/types.ts`,
206
203
  `src/hooks/integrations.ts`, `src/hooks/policy-evaluator.ts`,
207
204
  `__tests__/hooks/manager.test.ts`, `__tests__/hooks/integrations.test.ts`,
208
- `__tests__/e2e/hooks/<cli>-integration.e2e.test.ts`, the seven dogfood fixtures
209
- (`.claude/settings.json`, `.codex/hooks.json`, `.cursor/hooks.json`,
210
- `.github/hooks/failproofai.json`, `.opencode/opencode.json`,
211
- `.opencode/plugins/failproofai.mjs`, `.pi/settings.json`),
212
- and `CHANGELOG.md`.
213
- - Do **NOT** edit `.failproofai/policies-config.json` (the entrypoint manages it),
205
+ `__tests__/e2e/hooks/<cli>-integration.e2e.test.ts`, and `CHANGELOG.md`.
206
+ - Do **NOT** create hook configs in this clone (`.claude/settings.json`,
207
+ `.codex/hooks.json`, `.cursor/hooks.json`, `.github/hooks/`, `.opencode/`,
208
+ `.pi/settings.json`, `.failproofai/`), and do **NOT** edit
214
209
  `src/hooks/handler.ts`, `src/hooks/manager.ts`, or any other source file.
215
210
  - Do **NOT** add entries to any `*EVENT_MAP`, `*_TOOL_MAP`, or `*_TOOL_INPUT_MAP`
216
211
  for newly-added items. Removing a key when its array entry is removed IS allowed
@@ -13,12 +13,14 @@ 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";
@@ -413,6 +415,142 @@ function systemdUnitPath(user: string = serviceUser()): string {
413
415
  return resolve(systemdUnitDir(), systemdUnitName(user));
414
416
  }
415
417
 
418
+ /**
419
+ * Where a Linux install puts the copy of the daemon that systemd actually runs:
420
+ * `/opt/failproofai/<user>/bin/failproofaid-<version>`, root-owned.
421
+ *
422
+ * The binary is downloaded into `~/.failproofai/bin`, and a unit whose
423
+ * `ExecStart` points there works on Debian, Ubuntu and Mint — and on Fedora,
424
+ * RHEL, Rocky and Alma it never starts. Those ship SELinux enforcing, a file
425
+ * under a home directory is labelled `user_home_t`, and the targeted policy
426
+ * gives systemd (`init_t`) no execute permission on that type at all. The unit
427
+ * fails `203/EXEC Permission denied`, `waitForDaemonRunning()` times out, and
428
+ * `failproofai config` aborts at its very last step.
429
+ *
430
+ * The policy's generic `/opt/(.*\/)?bin(/.*)?` rule labels this path `bin_t`,
431
+ * which systemd may execute, and executing it moves the daemon into
432
+ * `unconfined_service_t` — the domain that may in turn run the worker's node
433
+ * from `~/.nvm` (also `user_home_t`) and accept hooks on the socket. So only
434
+ * the daemon binary moves; the worker command, the socket and the state under
435
+ * `~/.failproofai` stay where they are. Not `/usr/local/libexec`: both
436
+ * policies label that `usr_t`, which starts the daemon only through a
437
+ * secondary `init_t usr_t → unconfined_service_t` rule, where `bin_t` is the
438
+ * type the policy means for programs. Not `/usr/libexec` either: `/usr` is the
439
+ * package manager's, and read-only on Silverblue and CoreOS. All checked
440
+ * against the shipped policy on Fedora 41 and Rocky 9 with `matchpathcon` and
441
+ * `sesearch`.
442
+ *
443
+ * Per user for the same reason the unit name is: two people on one box may run
444
+ * different versions, and one's uninstall must not delete the other's binary.
445
+ * The `~/.failproofai/bin` copy is kept — `daemonVersionSkew()` and
446
+ * `refreshDaemonToCliVersion()` read the installed version from it.
447
+ *
448
+ * Redirectable for tests ONLY, like the unit directory.
449
+ */
450
+ function systemBinaryRoot(user: string = serviceUser()): string {
451
+ return resolve(process.env.FAILPROOFAI_SYSTEM_BIN_DIR || "/opt/failproofai", user);
452
+ }
453
+
454
+ function systemBinaryDir(): string {
455
+ return resolve(systemBinaryRoot(), "bin");
456
+ }
457
+
458
+ /** The system binary directory on Linux, for the manual-removal instructions. */
459
+ export function daemonSystemBinaryDir(): string | null {
460
+ return process.platform === "linux" ? systemBinaryRoot() : null;
461
+ }
462
+
463
+ /**
464
+ * The path systemd should start for `binaryPath`, or null when it should start
465
+ * `binaryPath` itself.
466
+ *
467
+ * Only a real file is copied. `FAILPROOFAI_DAEMON_BINARY` is "someone named a
468
+ * binary explicitly" and may be a command with arguments (this repo's own
469
+ * systemd tests use `/usr/bin/sleep infinity`), so it is started as given.
470
+ */
471
+ export function systemBinaryTarget(binaryPath: string): string | null {
472
+ if (process.platform !== "linux" || process.env.FAILPROOFAI_DAEMON_BINARY) return null;
473
+ try {
474
+ if (!statSync(binaryPath).isFile()) return null;
475
+ } catch {
476
+ return null;
477
+ }
478
+ return resolve(systemBinaryDir(), `failproofaid-${version}`);
479
+ }
480
+
481
+ /**
482
+ * Whether this kernel has SELinux enabled. `/sys/fs/selinux` is mounted only
483
+ * when it is, enforcing or permissive.
484
+ */
485
+ function selinuxEnabled(): boolean {
486
+ return existsSync("/sys/fs/selinux/enforce");
487
+ }
488
+
489
+ /**
490
+ * Copies the daemon binary into the system directory and returns the path the
491
+ * unit should start. Privileged; throws when the copy fails, which the caller
492
+ * reports as a failed install before any unit is written.
493
+ *
494
+ * Staged under a temp name and renamed into place, so a reinstall of the same
495
+ * version never writes into the file a running daemon was started from.
496
+ *
497
+ * `restorecon` afterwards, because a new file inherits the label of the
498
+ * directory it is created in, not the one the policy assigns to its path: the
499
+ * directories `install -d` creates under `/opt` (`usr_t`) come out `usr_t`
500
+ * too, never the `bin_t` the policy names for them.
501
+ */
502
+ function stageSystemBinary(binaryPath: string): string {
503
+ const target = systemBinaryTarget(binaryPath);
504
+ if (!target) return binaryPath;
505
+ const dir = systemBinaryDir();
506
+ const staging = `${target}.${process.pid}.tmp`;
507
+ runPrivileged("install", ["-d", "-m", "0755", dir]);
508
+ try {
509
+ runPrivileged("install", ["-m", "0755", binaryPath, staging]);
510
+ runPrivileged("mv", ["-f", staging, target]);
511
+ } catch (err) {
512
+ try {
513
+ runPrivileged("rm", ["-f", staging]);
514
+ } catch {
515
+ /* best-effort */
516
+ }
517
+ throw err;
518
+ }
519
+ if (selinuxEnabled()) {
520
+ const root = systemBinaryRoot();
521
+ try {
522
+ runPrivileged("restorecon", ["-R", root]);
523
+ } catch (err) {
524
+ // Not fatal here: a wrong label still surfaces as the daemon not
525
+ // reaching a running state, which fails the install with its status.
526
+ hookLogWarn(`restorecon on ${root} failed: ${err instanceof Error ? err.message : String(err)}`);
527
+ }
528
+ }
529
+ return target;
530
+ }
531
+
532
+ /**
533
+ * Removes system copies other than `current` and the most recent one before
534
+ * it — the same keep-one-for-rollback rule `pruneOldDaemonBinaries()` applies
535
+ * to `~/.failproofai/bin`. Best-effort; only called once the service runs
536
+ * `current`.
537
+ */
538
+ function pruneSystemBinaries(current: string): void {
539
+ try {
540
+ const dir = systemBinaryDir();
541
+ const stale = readdirSync(dir)
542
+ .filter((f) => f.startsWith("failproofaid-"))
543
+ .map((f) => resolve(dir, f))
544
+ .filter((p) => p !== current)
545
+ .map((p) => ({ p, mtime: statSync(p).mtimeMs }))
546
+ .sort((a, b) => b.mtime - a.mtime)
547
+ .slice(1);
548
+ for (const { p } of stale) runPrivileged("rm", ["-f", p]);
549
+ } catch {
550
+ // Nothing to prune, or no elevation left — leaving a file costs disk only.
551
+ }
552
+ }
553
+
416
554
  /**
417
555
  * The pre-1.0.0-beta.1 user-scope unit. Still removed on install and
418
556
  * uninstall: it holds the same flock the new service needs, so leaving one
@@ -792,8 +930,18 @@ function daemonInstallCommands(
792
930
  cliCmd: string | null,
793
931
  ): string[] {
794
932
  if (process.platform === "linux") {
933
+ const target = systemBinaryTarget(binaryPath);
934
+ const dir = systemBinaryDir();
935
+ const stage = target
936
+ ? [
937
+ `sudo install -d -m 0755 ${dir}`,
938
+ `sudo install -m 0755 ${binaryPath} ${target}`,
939
+ `{ sudo restorecon -R ${systemBinaryRoot()} 2>/dev/null || true; }`,
940
+ ]
941
+ : [];
795
942
  return [
796
- `sudo tee ${systemdUnitPath()} <<'EOF'\n${systemdUnitContents(binaryPath, workerCmd, cliCmd)}EOF`,
943
+ ...stage,
944
+ `sudo tee ${systemdUnitPath()} <<'EOF'\n${systemdUnitContents(target ?? binaryPath, workerCmd, cliCmd)}EOF`,
797
945
  "sudo systemctl daemon-reload",
798
946
  `sudo systemctl enable ${systemdUnitName()}`,
799
947
  // `restart`, not `enable --now`, for the reason the install path gives:
@@ -865,9 +1013,13 @@ export async function installDaemonService(): Promise<DaemonInstallResult> {
865
1013
  // never came up. Clear it first, every time.
866
1014
  removeLegacyUserService();
867
1015
 
1016
+ let execPath = binaryPath;
868
1017
  try {
869
1018
  if (process.platform === "linux") {
870
- writePrivilegedFile(systemdUnitPath(), systemdUnitContents(binaryPath, workerCmd, cliCmd));
1019
+ // Before the unit is written, so a copy that fails leaves the previous
1020
+ // unit and the daemon it runs untouched. See `systemBinaryDir()`.
1021
+ execPath = stageSystemBinary(binaryPath);
1022
+ writePrivilegedFile(systemdUnitPath(), systemdUnitContents(execPath, workerCmd, cliCmd));
871
1023
  runPrivileged("systemctl", ["daemon-reload"]);
872
1024
  // `enable` for boot persistence, then `restart` — NOT `enable --now`.
873
1025
  //
@@ -927,6 +1079,7 @@ export async function installDaemonService(): Promise<DaemonInstallResult> {
927
1079
  hookLogWarn(`daemon service install failed: ${reason}`);
928
1080
  return { installed: false, reason };
929
1081
  }
1082
+ if (execPath !== binaryPath) pruneSystemBinaries(execPath);
930
1083
 
931
1084
  // NOTE: this reports that the SERVICE is installed and running, which is all
932
1085
  // it can honestly claim. Whether the daemon can actually evaluate a hook is a
@@ -1683,6 +1836,18 @@ export async function uninstallDaemonService(): Promise<void> {
1683
1836
  } catch {
1684
1837
  // Best-effort.
1685
1838
  }
1839
+ // The copy systemd ran. After the unit is gone, so nothing enabled is
1840
+ // left pointing at a deleted file. The shared parent goes only if no
1841
+ // other user's directory is in it.
1842
+ const binRoot = systemBinaryRoot();
1843
+ if (existsSync(binRoot)) {
1844
+ runPrivileged("rm", ["-rf", binRoot]);
1845
+ try {
1846
+ runPrivileged("rmdir", [dirname(binRoot)]);
1847
+ } catch {
1848
+ // Not empty — another user's daemon lives there.
1849
+ }
1850
+ }
1686
1851
  } else {
1687
1852
  const plistPath = launchdPlistPath();
1688
1853
  if (!existsSync(plistPath)) return;
@@ -39,6 +39,7 @@ import {
39
39
  daemonServiceFilePath,
40
40
  daemonServiceStatus,
41
41
  daemonStatusCommand,
42
+ daemonSystemBinaryDir,
42
43
  isDaemonSupportedPlatform,
43
44
  primeElevation,
44
45
  setDaemonConfigured,
@@ -417,10 +418,12 @@ function manualServiceRemoval(servicePath: string): string[] {
417
418
  return [`sudo launchctl unload -w ${servicePath}`, `sudo rm -f ${servicePath}`];
418
419
  }
419
420
  const unit = servicePath.split("/").pop() ?? servicePath;
421
+ const binDir = daemonSystemBinaryDir();
420
422
  return [
421
423
  `sudo systemctl disable --now ${unit}`,
422
424
  `sudo rm -f ${servicePath}`,
423
425
  `sudo systemctl daemon-reload`,
426
+ ...(binDir ? [`sudo rm -rf ${binDir}`] : []),
424
427
  ];
425
428
  }
426
429
 
@@ -1,76 +0,0 @@
1
- {
2
- "hooks": {
3
- "SessionStart": [
4
- {
5
- "hooks": [
6
- {
7
- "type": "command",
8
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook SessionStart --cli codex",
9
- "timeout": 60,
10
- "__failproofai_hook__": true
11
- }
12
- ]
13
- }
14
- ],
15
- "PreToolUse": [
16
- {
17
- "hooks": [
18
- {
19
- "type": "command",
20
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook PreToolUse --cli codex",
21
- "timeout": 60,
22
- "__failproofai_hook__": true
23
- }
24
- ]
25
- }
26
- ],
27
- "PermissionRequest": [
28
- {
29
- "hooks": [
30
- {
31
- "type": "command",
32
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook PermissionRequest --cli codex",
33
- "timeout": 60,
34
- "__failproofai_hook__": true
35
- }
36
- ]
37
- }
38
- ],
39
- "PostToolUse": [
40
- {
41
- "hooks": [
42
- {
43
- "type": "command",
44
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook PostToolUse --cli codex",
45
- "timeout": 60,
46
- "__failproofai_hook__": true
47
- }
48
- ]
49
- }
50
- ],
51
- "UserPromptSubmit": [
52
- {
53
- "hooks": [
54
- {
55
- "type": "command",
56
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook UserPromptSubmit --cli codex",
57
- "timeout": 60,
58
- "__failproofai_hook__": true
59
- }
60
- ]
61
- }
62
- ],
63
- "Stop": [
64
- {
65
- "hooks": [
66
- {
67
- "type": "command",
68
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 1; }; node scripts/dev-hook.mjs --hook Stop --cli codex",
69
- "timeout": 60,
70
- "__failproofai_hook__": true
71
- }
72
- ]
73
- }
74
- ]
75
- }
76
- }
@@ -1,47 +0,0 @@
1
- {
2
- "version": 1,
3
- "hooks": {
4
- "sessionStart": [
5
- {
6
- "type": "command",
7
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook sessionStart --cli cursor",
8
- "timeout": 60
9
- }
10
- ],
11
- "sessionEnd": [
12
- {
13
- "type": "command",
14
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook sessionEnd --cli cursor",
15
- "timeout": 60
16
- }
17
- ],
18
- "beforeSubmitPrompt": [
19
- {
20
- "type": "command",
21
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook beforeSubmitPrompt --cli cursor",
22
- "timeout": 60
23
- }
24
- ],
25
- "preToolUse": [
26
- {
27
- "type": "command",
28
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook preToolUse --cli cursor",
29
- "timeout": 60
30
- }
31
- ],
32
- "postToolUse": [
33
- {
34
- "type": "command",
35
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook postToolUse --cli cursor",
36
- "timeout": 60
37
- }
38
- ],
39
- "stop": [
40
- {
41
- "type": "command",
42
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 1; }; node scripts/dev-hook.mjs --hook stop --cli cursor",
43
- "timeout": 60
44
- }
45
- ]
46
- }
47
- }
@@ -1,112 +0,0 @@
1
- {
2
- "SessionStart": [
3
- {
4
- "hooks": [
5
- {
6
- "type": "command",
7
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook SessionStart --cli factory",
8
- "timeout": 30,
9
- "__failproofai_hook__": true
10
- }
11
- ]
12
- }
13
- ],
14
- "UserPromptSubmit": [
15
- {
16
- "hooks": [
17
- {
18
- "type": "command",
19
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook UserPromptSubmit --cli factory",
20
- "timeout": 30,
21
- "__failproofai_hook__": true
22
- }
23
- ]
24
- }
25
- ],
26
- "PreToolUse": [
27
- {
28
- "matcher": "*",
29
- "hooks": [
30
- {
31
- "type": "command",
32
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook PreToolUse --cli factory",
33
- "timeout": 30,
34
- "__failproofai_hook__": true
35
- }
36
- ]
37
- }
38
- ],
39
- "PostToolUse": [
40
- {
41
- "matcher": "*",
42
- "hooks": [
43
- {
44
- "type": "command",
45
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook PostToolUse --cli factory",
46
- "timeout": 30,
47
- "__failproofai_hook__": true
48
- }
49
- ]
50
- }
51
- ],
52
- "Notification": [
53
- {
54
- "hooks": [
55
- {
56
- "type": "command",
57
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook Notification --cli factory",
58
- "timeout": 30,
59
- "__failproofai_hook__": true
60
- }
61
- ]
62
- }
63
- ],
64
- "Stop": [
65
- {
66
- "hooks": [
67
- {
68
- "type": "command",
69
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 1; }; node scripts/dev-hook.mjs --hook Stop --cli factory",
70
- "timeout": 30,
71
- "__failproofai_hook__": true
72
- }
73
- ]
74
- }
75
- ],
76
- "SubagentStop": [
77
- {
78
- "hooks": [
79
- {
80
- "type": "command",
81
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 1; }; node scripts/dev-hook.mjs --hook SubagentStop --cli factory",
82
- "timeout": 30,
83
- "__failproofai_hook__": true
84
- }
85
- ]
86
- }
87
- ],
88
- "PreCompact": [
89
- {
90
- "hooks": [
91
- {
92
- "type": "command",
93
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook PreCompact --cli factory",
94
- "timeout": 30,
95
- "__failproofai_hook__": true
96
- }
97
- ]
98
- }
99
- ],
100
- "SessionEnd": [
101
- {
102
- "hooks": [
103
- {
104
- "type": "command",
105
- "command": "command -v node >/dev/null 2>&1 || { echo '[failproofai] node not found; install Node >=20.9' >&2; exit 2; }; node scripts/dev-hook.mjs --hook SessionEnd --cli factory",
106
- "timeout": 30,
107
- "__failproofai_hook__": true
108
- }
109
- ]
110
- }
111
- ]
112
- }
@@ -1,3 +0,0 @@
1
- module.exports=[54799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},20635,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},59043,(e,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},78500,(e,r,t)=>{r.exports=e.x("node:async_hooks",()=>require("node:async_hooks"))},50227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))}];
2
-
3
- //# sourceMappingURL=%5Bexternals%5D__1x24dzcbbq6-g._.js.map