failproofai 1.0.4-beta.8 → 1.0.4

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 (245) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +5 -5
  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 -2
  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 +7 -7
  12. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
  13. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  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 +2 -2
  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 +14 -14
  22. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  23. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
  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.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/audit/run/route.js +4 -4
  27. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +1 -1
  34. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/audit/page/build-manifest.json +2 -2
  36. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +4 -37
  37. package/.next/standalone/.next/server/app/audit/page.js +2 -2
  38. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/index.html +1 -1
  41. package/.next/standalone/.next/server/app/index.rsc +14 -14
  42. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
  43. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
  44. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  45. package/.next/standalone/.next/server/app/page/build-manifest.json +2 -2
  46. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  47. package/.next/standalone/.next/server/app/page.js +2 -2
  48. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  50. package/.next/standalone/.next/server/app/policies/page/build-manifest.json +2 -2
  51. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
  52. package/.next/standalone/.next/server/app/policies/page.js +4 -4
  53. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +2 -2
  56. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  57. package/.next/standalone/.next/server/app/project/[name]/page.js +4 -4
  58. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +2 -2
  61. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  62. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  63. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +5 -5
  64. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/projects/page/build-manifest.json +2 -2
  67. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  68. package/.next/standalone/.next/server/app/projects/page.js +3 -3
  69. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/settings/page/build-manifest.json +2 -2
  72. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -15
  73. package/.next/standalone/.next/server/app/settings/page.js +4 -4
  74. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/chunks/{[externals]__0hmcwgg._.js → [externals]__0-9ti7z._.js} +1 -1
  77. package/.next/standalone/.next/server/chunks/{[externals]__14b7cc6._.js → [externals]__0u3wrvq._.js} +1 -1
  78. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-219ec._.js +3 -0
  79. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04_h-a5._.js +3 -0
  80. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08dchfu._.js +1 -1
  81. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
  82. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rv7m0k._.js +1 -1
  83. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17g9wh7._.js +1 -1
  84. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1le9jqc._.js +3 -0
  85. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1legmza._.js +1 -1
  86. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1p-qi2t._.js +5 -0
  87. package/.next/standalone/.next/server/chunks/_0tovk6q._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/_0trp3yc._.js +1 -1
  89. package/.next/standalone/.next/server/chunks/{_1_eakl4._.js → _1-akg6w._.js} +2 -2
  90. package/.next/standalone/.next/server/chunks/_1ek68ln._.js +10 -10
  91. package/.next/standalone/.next/server/chunks/_1vslkoe._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/lib_telemetry_ts_0dctyyw._.js +1 -1
  93. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
  94. package/.next/standalone/.next/server/chunks/src_hooks_fp-home_ts_09kv0bn._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__187jks6._.js → [root-of-the-server]__00-s7h8._.js} +1 -1
  96. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +4 -0
  97. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +4 -0
  98. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +4 -0
  99. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1fa1jd9._.js → [root-of-the-server]__09flfsx._.js} +2 -2
  100. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +4 -0
  101. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +4 -0
  102. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0kokc8z._.js → [root-of-the-server]__0n_lxhg._.js} +1 -1
  103. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +4 -0
  105. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +6 -0
  106. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1kpd1za._.js → [root-of-the-server]__190won8._.js} +1 -1
  107. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ctpynv._.js +3 -0
  108. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1nq7ivq._.js +3 -0
  109. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +4 -0
  110. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00y9ww2._.js → [root-of-the-server]__1sc84bb._.js} +2 -21
  111. package/.next/standalone/.next/server/chunks/ssr/_02yoeej._.js +3 -0
  112. package/.next/standalone/.next/server/chunks/ssr/{_00bqkhj._.js → _04rbnaq._.js} +2 -2
  113. package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
  114. package/.next/standalone/.next/server/chunks/ssr/{_0s-77v5._.js → _0h_douw._.js} +1 -1
  115. package/.next/standalone/.next/server/chunks/ssr/_1_ozgif._.js +1 -1
  116. package/.next/standalone/.next/server/chunks/ssr/_1ddpc5g._.js +1 -1
  117. package/.next/standalone/.next/server/chunks/ssr/_1es2j7i._.js +14 -51
  118. package/.next/standalone/.next/server/chunks/ssr/{_14c6q09._.js → _1if9ixi._.js} +2 -21
  119. package/.next/standalone/.next/server/chunks/ssr/{_07t3jol._.js → _1u8-lu2._.js} +2 -2
  120. package/.next/standalone/.next/server/chunks/ssr/_1ylae7o._.js +3 -0
  121. package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +3 -0
  122. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +2 -2
  123. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +69 -1
  124. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
  125. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
  126. package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +1 -1
  127. package/.next/standalone/.next/server/chunks/ssr/lib_openclaw-projects_ts_0qxq3bp._.js +1 -1
  128. package/.next/standalone/.next/server/chunks/ssr/node_modules_13n822a._.js +1 -1
  129. package/.next/standalone/.next/server/chunks/ssr/node_modules_html-to-image_es_index_1ao30b1.js +3 -0
  130. package/.next/standalone/.next/server/chunks/ssr/src_hooks_builtin-policies_ts_09j2ndl._.js +1 -1
  131. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-config_ts_04t589g._.js +1 -1
  132. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +1 -1
  133. package/.next/standalone/.next/server/middleware-build-manifest.js +5 -5
  134. package/.next/standalone/.next/server/pages/404.html +1 -1
  135. package/.next/standalone/.next/server/pages/500.html +1 -1
  136. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/server-reference-manifest.json +21 -65
  138. package/.next/standalone/.next/static/chunks/{1302duobnz07l.js → 0-tyrpwuc3lla.js} +1 -1
  139. package/.next/standalone/.next/static/chunks/0ca7octhod0g2.js +69 -0
  140. package/.next/standalone/.next/static/chunks/0u64yey446k4f.css +1 -0
  141. package/.next/standalone/.next/static/chunks/{2n85g-crgcx5j.js → 1j6o9min_6qa9.js} +1 -1
  142. package/.next/standalone/.next/static/chunks/27cl8h-c2w7cd.js +1 -0
  143. package/.next/standalone/.next/static/chunks/{0jpd8dv2vk930.css → 29-iqnp9v_axt.css} +1 -1
  144. package/.next/standalone/.next/static/chunks/{3uyhmm01g64k4.css → 2k9f4tyv04809.css} +0 -1
  145. package/.next/standalone/.next/static/chunks/{1chm9piluggc-.js → 2lwipmv5etc8m.js} +1 -1
  146. package/.next/standalone/.next/static/chunks/2pd16tn5qmx13.js +1 -0
  147. package/.next/standalone/.next/static/chunks/{2ukucf6g-kbs5.js → 2u8vh73tpw28_.js} +1 -1
  148. package/.next/standalone/.next/static/chunks/{1_x7pqemw5n_w.js → 31u94yukw9fz-.js} +1 -1
  149. package/.next/standalone/.next/static/chunks/{2mizt96igig1y.js → 3p9_8x5ezce-9.js} +1 -1
  150. package/.next/standalone/.next/static/chunks/3qfoeqhy5l10x.js +1 -0
  151. package/.next/standalone/.next/static/chunks/{0vm4wdx3w-2_w.js → 3tjji451hrgc0.js} +1 -1
  152. package/.next/standalone/.next/static/chunks/3zkg2s2vzxc3d.js +1 -0
  153. package/.next/standalone/.next/static/chunks/{turbopack-3s3c-u_u_l0u9.js → turbopack-3p73obe0xmrxm.js} +1 -1
  154. package/.next/standalone/.opencode/plugins/failproofai.mjs +27 -51
  155. package/.next/standalone/app/actions/get-scheduled-audit.ts +0 -5
  156. package/.next/standalone/app/actions/update-scheduled-audit.ts +57 -18
  157. package/.next/standalone/app/api/auth/status/route.ts +2 -3
  158. package/.next/standalone/app/audit/_components/audit-dashboard.tsx +34 -140
  159. package/.next/standalone/app/audit/_components/audit-poster.tsx +10 -29
  160. package/.next/standalone/app/audit/_components/come-back-better-section.tsx +1 -6
  161. package/.next/standalone/app/audit/_components/empty-state.tsx +1 -4
  162. package/.next/standalone/app/audit/_components/how-to-improve-section.tsx +5 -19
  163. package/.next/standalone/app/audit/_components/share-templates.ts +44 -110
  164. package/.next/standalone/app/audit/audit-styles.css +1 -132
  165. package/.next/standalone/app/settings/page.tsx +1 -1
  166. package/.next/standalone/app/settings/settings-client.tsx +45 -50
  167. package/.next/standalone/lib/auth/api-server-client.ts +5 -33
  168. package/.next/standalone/lib/claude-sessions.ts +27 -101
  169. package/.next/standalone/lib/codex-sessions.ts +4 -20
  170. package/.next/standalone/lib/copilot-sessions.ts +1 -32
  171. package/.next/standalone/lib/cursor-sessions.ts +5 -62
  172. package/.next/standalone/lib/download-session.ts +13 -58
  173. package/.next/standalone/lib/openclaw-projects.ts +18 -54
  174. package/.next/standalone/lib/openclaw-sessions.ts +17 -75
  175. package/.next/standalone/lib/sqlite-reader.ts +1 -78
  176. package/.next/standalone/package.json +9 -9
  177. package/.next/standalone/server.js +1 -1
  178. package/bin/failproofai.mjs +1 -1
  179. package/dist/cli.mjs +664 -2121
  180. package/dist/worker.mjs +105 -422
  181. package/lib/auth/api-server-client.ts +5 -33
  182. package/lib/claude-sessions.ts +27 -101
  183. package/lib/codex-sessions.ts +4 -20
  184. package/lib/copilot-sessions.ts +1 -32
  185. package/lib/cursor-sessions.ts +5 -62
  186. package/lib/download-session.ts +13 -58
  187. package/lib/openclaw-projects.ts +18 -54
  188. package/lib/openclaw-sessions.ts +17 -75
  189. package/lib/sqlite-reader.ts +1 -78
  190. package/package.json +9 -9
  191. package/pi-extension/index.ts +5 -50
  192. package/src/audit/cache.ts +0 -6
  193. package/src/audit/cli-adapters/claude.ts +0 -13
  194. package/src/audit/cli-login.ts +1 -4
  195. package/src/audit/cli.ts +7 -157
  196. package/src/audit/harm-report.ts +4 -111
  197. package/src/audit/index.ts +15 -286
  198. package/src/audit/machine-store.ts +9 -8
  199. package/src/audit/redact-example.ts +15 -324
  200. package/src/audit/report-harm.ts +37 -33
  201. package/src/audit/report.ts +3 -6
  202. package/src/audit/schedule-cli.ts +33 -54
  203. package/src/audit/scoring.ts +0 -49
  204. package/src/audit/types.ts +0 -52
  205. package/src/hooks/builtin-policies.ts +2 -67
  206. package/src/hooks/configure-wizard.ts +0 -55
  207. package/src/hooks/fp-config.ts +48 -83
  208. package/src/hooks/fp-home.ts +0 -27
  209. package/src/hooks/integrations.ts +14 -51
  210. package/src/hooks/uninstall-cli.ts +2 -17
  211. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0faqz9x._.js +0 -22
  212. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zyc_nm._.js +0 -3
  213. package/.next/standalone/.next/server/chunks/[root-of-the-server]__112b4go._.js +0 -24
  214. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1l71g3y._.js +0 -22
  215. package/.next/standalone/.next/server/chunks/lib_openclaw-projects_ts_0gc-p24._.js +0 -3
  216. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-4ja6q._.js +0 -4
  217. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00cr3xu._.js +0 -4
  218. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04px77e._.js +0 -4
  219. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0egr5s1._.js +0 -6
  220. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0i0l1di._.js +0 -4
  221. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n2txhk._.js +0 -3
  222. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0r3c1_0._.js +0 -4
  223. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__17xnxlx._.js +0 -4
  224. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ckpmkk._.js +0 -4
  225. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1kaotix._.js +0 -22
  226. package/.next/standalone/.next/server/chunks/ssr/_04ng_6x._.js +0 -3
  227. package/.next/standalone/.next/server/chunks/ssr/_0l2hi_d._.js +0 -3
  228. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_rerun-button_tsx_0blihgw._.js +0 -3
  229. package/.next/standalone/.next/static/chunks/0igq884ziuv-8.js +0 -1
  230. package/.next/standalone/.next/static/chunks/349jkb79v5g6z.js +0 -1
  231. package/.next/standalone/.next/static/chunks/3a4gth64hwtwf.js +0 -1
  232. package/.next/standalone/app/actions/get-leaks.ts +0 -104
  233. package/.next/standalone/app/audit/_components/leak-section.tsx +0 -192
  234. package/.next/standalone/lib/openclaw-db.ts +0 -271
  235. package/lib/openclaw-db.ts +0 -271
  236. package/src/audit/desktop-notify.ts +0 -420
  237. package/src/audit/leak-fingerprint.ts +0 -198
  238. package/src/audit/leak-record.ts +0 -248
  239. package/src/audit/leak-scan.ts +0 -268
  240. package/src/audit/leak-store.ts +0 -220
  241. package/src/audit/macos-notifier.ts +0 -298
  242. package/src/hooks/notice.ts +0 -24
  243. /package/.next/standalone/.next/static/{DNhaAH8iPGH0tIuxee5_2 → dg8VQ7Ejlo0Qsh_x92oIt}/_buildManifest.js +0 -0
  244. /package/.next/standalone/.next/static/{DNhaAH8iPGH0tIuxee5_2 → dg8VQ7Ejlo0Qsh_x92oIt}/_clientMiddlewareManifest.js +0 -0
  245. /package/.next/standalone/.next/static/{DNhaAH8iPGH0tIuxee5_2 → dg8VQ7Ejlo0Qsh_x92oIt}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ module.exports=[63460,a=>{"use strict";let b,c=(b=0,()=>(b+=1,`u${`0000${(1679616*Math.random()|0).toString(36)}`.slice(-4)}${b}`));function d(a){let b=[];for(let c=0,d=a.length;c<d;c++)b.push(a[c]);return b}let e=null;function f(a={}){return e||(e=a.includeStyleProperties?a.includeStyleProperties:d(window.getComputedStyle(document.documentElement)))}function g(a,b){let c=(a.ownerDocument.defaultView||window).getComputedStyle(a).getPropertyValue(b);return c?parseFloat(c.replace("px","")):0}function h(a,b={}){let c,d,e,f;return{width:b.width||(c=g(a,"border-left-width"),d=g(a,"border-right-width"),a.clientWidth+c+d),height:b.height||(e=g(a,"border-top-width"),f=g(a,"border-bottom-width"),a.clientHeight+e+f)}}function i(a){return new Promise((b,c)=>{let d=new Image;d.onload=()=>{d.decode().then(()=>{requestAnimationFrame(()=>b(d))})},d.onerror=c,d.crossOrigin="anonymous",d.decoding="async",d.src=a})}async function j(a){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(a)).then(encodeURIComponent).then(a=>`data:image/svg+xml;charset=utf-8,${a}`)}async function k(a,b,c){let d="http://www.w3.org/2000/svg",e=document.createElementNS(d,"svg"),f=document.createElementNS(d,"foreignObject");return e.setAttribute("width",`${b}`),e.setAttribute("height",`${c}`),e.setAttribute("viewBox",`0 0 ${b} ${c}`),f.setAttribute("width","100%"),f.setAttribute("height","100%"),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("externalResourcesRequired","true"),e.appendChild(f),f.appendChild(a),j(e)}let l=(a,b)=>{if(a instanceof b)return!0;let c=Object.getPrototypeOf(a);return null!==c&&(c.constructor.name===b.name||l(c,b))};function m(a,b,d,e){let g,h,i,j=window.getComputedStyle(a,d),k=j.getPropertyValue("content");if(""===k||"none"===k)return;let l=c();try{b.className=`${b.className} ${l}`}catch(a){return}let m=document.createElement("style");m.appendChild((g=`.${l}:${d}`,i=j.cssText?(h=j.getPropertyValue("content"),`${j.cssText} content: '${h.replace(/'|"/g,"")}';`):f(e).map(a=>{let b=j.getPropertyValue(a),c=j.getPropertyPriority(a);return`${a}: ${b}${c?" !important":""};`}).join(" "),document.createTextNode(`${g}{${i}}`))),b.appendChild(m)}let n="application/font-woff",o="image/jpeg",p={woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:o,jpeg:o,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function q(a){let b;return p[((b=/\.([^./]*?)$/g.exec(a))?b[1]:"").toLowerCase()]||""}function r(a){return -1!==a.search(/^(data:)/)}function s(a,b){return`data:${b};base64,${a}`}async function t(a,b,c){let d=await fetch(a,b);if(404===d.status)throw Error(`Resource "${d.url}" not found`);let e=await d.blob();return new Promise((a,b)=>{let f=new FileReader;f.onerror=b,f.onloadend=()=>{try{a(c({res:d,result:f.result}))}catch(a){b(a)}},f.readAsDataURL(e)})}let u={};async function v(a,b,c){var d,e,f;let g,h,i=(d=a,e=b,f=c.includeQueryParams,h=d.replace(/\?.*/,""),f&&(h=d),/ttf|otf|eot|woff2?/i.test(h)&&(h=h.replace(/.*\//,"")),e?`[${e}]${h}`:h);if(null!=u[i])return u[i];c.cacheBust&&(a+=(/\?/.test(a)?"&":"?")+new Date().getTime());try{let d=await t(a,c.fetchRequestInit,({res:a,result:c})=>(b||(b=a.headers.get("Content-Type")||""),c.split(/,/)[1]));g=s(d,b)}catch(d){g=c.imagePlaceholder||"";let b=`Failed to fetch resource: ${a}`;d&&(b="string"==typeof d?d:d.message),b&&console.warn(b)}return u[i]=g,g}async function w(a){let b=a.toDataURL();return"data:,"===b?a.cloneNode(!1):i(b)}async function x(a,b){if(a.currentSrc){let b=document.createElement("canvas"),c=b.getContext("2d");return b.width=a.clientWidth,b.height=a.clientHeight,null==c||c.drawImage(a,0,0,b.width,b.height),i(b.toDataURL())}let c=a.poster,d=q(c);return i(await v(c,d,b))}async function y(a,b){var c;try{if(null==(c=null==a?void 0:a.contentDocument)?void 0:c.body)return await D(a.contentDocument.body,b,!0)}catch(a){}return a.cloneNode(!1)}async function z(a,b){return l(a,HTMLCanvasElement)?w(a):l(a,HTMLVideoElement)?x(a,b):l(a,HTMLIFrameElement)?y(a,b):a.cloneNode(A(a))}let A=a=>null!=a.tagName&&"SVG"===a.tagName.toUpperCase();async function B(a,b,c){var e,f;if(A(b))return b;let g=[];return 0===(g=null!=a.tagName&&"SLOT"===a.tagName.toUpperCase()&&a.assignedNodes?d(a.assignedNodes()):l(a,HTMLIFrameElement)&&(null==(e=a.contentDocument)?void 0:e.body)?d(a.contentDocument.body.childNodes):d((null!=(f=a.shadowRoot)?f:a).childNodes)).length||l(a,HTMLVideoElement)||await g.reduce((a,d)=>a.then(()=>D(d,c)).then(a=>{a&&b.appendChild(a)}),Promise.resolve()),b}async function C(a,b){let c=a.querySelectorAll?a.querySelectorAll("use"):[];if(0===c.length)return a;let d={};for(let e=0;e<c.length;e++){let f=c[e].getAttribute("xlink:href");if(f){let c=a.querySelector(f),e=document.querySelector(f);c||!e||d[f]||(d[f]=await D(e,b,!0))}}let e=Object.values(d);if(e.length){let b="http://www.w3.org/1999/xhtml",c=document.createElementNS(b,"svg");c.setAttribute("xmlns",b),c.style.position="absolute",c.style.width="0",c.style.height="0",c.style.overflow="hidden",c.style.display="none";let d=document.createElementNS(b,"defs");c.appendChild(d);for(let a=0;a<e.length;a++)d.appendChild(e[a]);a.appendChild(c)}return a}async function D(a,b,c){return c||!b.filter||b.filter(a)?Promise.resolve(a).then(a=>z(a,b)).then(c=>B(a,c,b)).then(c=>(function(a,b,c){if(l(b,Element)&&(!function(a,b,c){let d=b.style;if(!d)return;let e=window.getComputedStyle(a);e.cssText?(d.cssText=e.cssText,d.transformOrigin=e.transformOrigin):f(c).forEach(c=>{let f=e.getPropertyValue(c);if("font-size"===c&&f.endsWith("px")){let a=Math.floor(parseFloat(f.substring(0,f.length-2)))-.1;f=`${a}px`}l(a,HTMLIFrameElement)&&"display"===c&&"inline"===f&&(f="block"),"d"===c&&b.getAttribute("d")&&(f=`path(${b.getAttribute("d")})`),d.setProperty(c,f,e.getPropertyPriority(c))})}(a,b,c),m(a,b,":before",c),m(a,b,":after",c),l(a,HTMLTextAreaElement)&&(b.innerHTML=a.value),l(a,HTMLInputElement)&&b.setAttribute("value",a.value),l(a,HTMLSelectElement))){let c=Array.from(b.children).find(b=>a.value===b.getAttribute("value"));c&&c.setAttribute("selected","")}return b})(a,c,b)).then(a=>C(a,b)):null}let E=/url\((['"]?)([^'"]+?)\1\)/g,F=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,G=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;async function H(a,b,c,d,e){try{let f,g,h=c?function(a,b){if(a.match(/^[a-z]+:\/\//i))return a;if(a.match(/^\/\//))return window.location.protocol+a;if(a.match(/^[a-z]+:/i))return a;let c=document.implementation.createHTMLDocument(),d=c.createElement("base"),e=c.createElement("a");return c.head.appendChild(d),c.body.appendChild(e),b&&(d.href=b),e.href=a,e.href}(b,c):b,i=q(b);if(e){let a=await e(h);f=s(a,i)}else f=await v(h,i,d);return a.replace((g=b.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1"),RegExp(`(url\\(['"]?)(${g})(['"]?\\))`,"g")),`$1${f}$3`)}catch(a){}return a}function I(a){return -1!==a.search(E)}async function J(a,b,c){let d;if(!I(a))return a;let e=function(a,{preferredFontFormat:b}){return b?a.replace(G,a=>{for(;;){let[c,,d]=F.exec(a)||[];if(!d)return"";if(d===b)return`src: ${c};`}}):a}(a,c);return(d=[],e.replace(E,(a,b,c)=>(d.push(c),a)),d.filter(a=>!r(a))).reduce((a,d)=>a.then(a=>H(a,d,b,c)),Promise.resolve(e))}async function K(a,b,c){var d;let e=null==(d=b.style)?void 0:d.getPropertyValue(a);if(e){let d=await J(e,null,c);return b.style.setProperty(a,d,b.style.getPropertyPriority(a)),!0}return!1}async function L(a,b){await K("background",a,b)||await K("background-image",a,b),await K("mask",a,b)||await K("-webkit-mask",a,b)||await K("mask-image",a,b)||await K("-webkit-mask-image",a,b)}async function M(a,b){let c=l(a,HTMLImageElement);if(!(c&&!r(a.src))&&!(l(a,SVGImageElement)&&!r(a.href.baseVal)))return;let d=c?a.src:a.href.baseVal,e=await v(d,q(d),b);await new Promise((d,f)=>{a.onload=d,a.onerror=b.onImageErrorHandler?(...a)=>{try{d(b.onImageErrorHandler(...a))}catch(a){f(a)}}:f,a.decode&&(a.decode=d),"lazy"===a.loading&&(a.loading="eager"),c?(a.srcset="",a.src=e):a.href.baseVal=e})}async function N(a,b){let c=d(a.childNodes).map(a=>O(a,b));await Promise.all(c).then(()=>a)}async function O(a,b){l(a,Element)&&(await L(a,b),await M(a,b),await N(a,b))}let P={};async function Q(a){let b=P[a];if(null!=b)return b;let c=await fetch(a);return b={url:a,cssText:await c.text()},P[a]=b,b}async function R(a,b){let c=a.cssText,d=/url\(["']?([^"')]+)["']?\)/g;return Promise.all((c.match(/url\([^)]+\)/g)||[]).map(async e=>{let f=e.replace(d,"$1");return f.startsWith("https://")||(f=new URL(f,a.url).href),t(f,b.fetchRequestInit,({result:a})=>(c=c.replace(e,`url(${a})`),[e,a]))})).then(()=>c)}function S(a){if(null==a)return[];let b=[],c=a.replace(/(\/\*[\s\S]*?\*\/)/gi,""),d=RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let a=d.exec(c);if(null===a)break;b.push(a[0])}c=c.replace(d,"");let e=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,f=RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let a=e.exec(c);if(null===a){if(null===(a=f.exec(c)))break;e.lastIndex=f.lastIndex}else f.lastIndex=e.lastIndex;b.push(a[0])}return b}async function T(a,b){let c=[],e=[];return a.forEach(c=>{if("cssRules"in c)try{d(c.cssRules||[]).forEach((a,d)=>{if(a.type===CSSRule.IMPORT_RULE){let f=d+1,g=a.href,h=Q(g).then(a=>R(a,b)).then(a=>S(a).forEach(a=>{try{c.insertRule(a,a.startsWith("@import")?f+=1:c.cssRules.length)}catch(b){console.error("Error inserting rule from remote css",{rule:a,error:b})}})).catch(a=>{console.error("Error loading remote css",a.toString())});e.push(h)}})}catch(f){let d=a.find(a=>null==a.href)||document.styleSheets[0];null!=c.href&&e.push(Q(c.href).then(a=>R(a,b)).then(a=>S(a).forEach(a=>{d.insertRule(a,d.cssRules.length)})).catch(a=>{console.error("Error loading remote stylesheet",a)})),console.error("Error inlining remote css file",f)}}),Promise.all(e).then(()=>(a.forEach(a=>{if("cssRules"in a)try{d(a.cssRules||[]).forEach(a=>{c.push(a)})}catch(b){console.error(`Error while reading CSS rules from ${a.href}`,b)}}),c))}async function U(a,b){if(null==a.ownerDocument)throw Error("Provided element is not within a Document");let c=d(a.ownerDocument.styleSheets);return(await T(c,b)).filter(a=>a.type===CSSRule.FONT_FACE_RULE).filter(a=>I(a.style.getPropertyValue("src")))}function V(a){return a.trim().replace(/["']/g,"")}async function W(a,b){let c,d=await U(a,b),e=(c=new Set,!function a(b){(b.style.fontFamily||getComputedStyle(b).fontFamily).split(",").forEach(a=>{c.add(V(a))}),Array.from(b.children).forEach(b=>{b instanceof HTMLElement&&a(b)})}(a),c);return(await Promise.all(d.filter(a=>e.has(V(a.style.fontFamily))).map(a=>{let c=a.parentStyleSheet?a.parentStyleSheet.href:null;return J(a.cssText,c,b)}))).join("\n")}async function X(a,b){let c=null!=b.fontEmbedCSS?b.fontEmbedCSS:b.skipFonts?null:await W(a,b);if(c){let b=document.createElement("style"),d=document.createTextNode(c);b.appendChild(d),a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)}}async function Y(a,b={}){let{width:c,height:d}=h(a,b),e=await D(a,b,!0);return await X(e,b),await O(e,b),!function(a,b){let{style:c}=a;b.backgroundColor&&(c.backgroundColor=b.backgroundColor),b.width&&(c.width=`${b.width}px`),b.height&&(c.height=`${b.height}px`);let d=b.style;null!=d&&Object.keys(d).forEach(a=>{c[a]=d[a]})}(e,b),await k(e,c,d)}async function Z(a,b={}){let{width:c,height:d}=h(a,b),e=await Y(a,b),f=await i(e),g=document.createElement("canvas"),j=g.getContext("2d"),k=b.pixelRatio||function(){let a,b;try{b=process}catch(a){}let c=b&&b.env?b.env.devicePixelRatio:null;return c&&Number.isNaN(a=parseInt(c,10))&&(a=1),a||window.devicePixelRatio||1}(),l=b.canvasWidth||c,m=b.canvasHeight||d;return g.width=l*k,g.height=m*k,!b.skipAutoScale&&(g.width>16384||g.height>16384)&&(g.width>16384&&g.height>16384?g.width>g.height?(g.height*=16384/g.width,g.width=16384):(g.width*=16384/g.height,g.height=16384):g.width>16384?(g.height*=16384/g.width,g.width=16384):(g.width*=16384/g.height,g.height=16384)),g.style.width=`${l}`,g.style.height=`${m}`,b.backgroundColor&&(j.fillStyle=b.backgroundColor,j.fillRect(0,0,g.width,g.height)),j.drawImage(f,0,0,g.width,g.height),g}async function $(a,b={}){let c=await Z(a,b);return await function(a,b={}){return new Promise(a.toBlob?c=>{a.toBlob(c,b.type?b.type:"image/png",b.quality?b.quality:1)}:c=>{let d=window.atob(a.toDataURL(b.type?b.type:void 0,b.quality?b.quality:void 0).split(",")[1]),e=d.length,f=new Uint8Array(e);for(let a=0;a<e;a+=1)f[a]=d.charCodeAt(a);c(new Blob([f],{type:b.type?b.type:"image/png"}))})}(c)}a.s(["toBlob",0,$],63460)}];
2
+
3
+ //# sourceMappingURL=node_modules_html-to-image_es_index_1ao30b1.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[92956,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(12714),e=a.i(74533),f=a.i(60526);let g=[{name:"sanitize-jwt",description:"Stop Claude from reading JWTs in tool responses",displayTitle:"Redacted JWT tokens from tool output",impact:"Stops the agent from echoing auth tokens it saw in command output.",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize"},{name:"sanitize-api-keys",description:"Stop Claude from reading API keys (OpenAI, Anthropic, GitHub, AWS, Stripe, Google) in tool responses",displayTitle:"Redacted API keys from tool output",impact:"Catches OpenAI / Anthropic / GitHub / AWS / Stripe / Google keys before the model sees them.",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize",params:{additionalPatterns:{type:"pattern[]",description:"Additional API key patterns to scrub, each with { regex, label }",default:[]}}},{name:"sanitize-connection-strings",description:"Stop Claude from reading database connection strings with embedded credentials in tool responses",displayTitle:"Redacted database connection strings from tool output",impact:"Strips embedded DB credentials before they reach the model context.",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize"},{name:"sanitize-private-key-content",description:"Stop Claude from reading PEM private key content in tool responses",displayTitle:"Redacted PEM private keys from tool output",impact:"Prevents private key bodies from being echoed into chat context.",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize"},{name:"sanitize-bearer-tokens",displayTitle:"Redacted bearer tokens from tool output",impact:"Strips Authorization: Bearer values before they hit the model.",description:"Stop Claude from reading Authorization Bearer tokens in tool responses",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize"},{name:"protect-env-vars",displayTitle:"Tried to dump environment variables to chat",impact:"Env vars often contain secrets; blocking `env` / `printenv` keeps them out of the model context.",description:"Prevent commands that read environment variables",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!0,category:"Environment"},{name:"block-env-files",displayTitle:"Tried to read or write a .env file",impact:"`.env` files routinely contain API keys and DB credentials.",description:"Block reading/writing .env files",match:{events:["PreToolUse"]},defaultEnabled:!0,category:"Environment"},{name:"block-read-outside-cwd",displayTitle:"Tried to read files outside your project directory",impact:"Stops the agent from peeking at neighboring repos or your home directory.",description:"Block file reads outside the session working directory",match:{events:["PreToolUse"],toolNames:["Read","Glob","Grep","Bash"]},defaultEnabled:!1,category:"Environment",params:{allowPaths:{type:"string[]",description:"Absolute paths outside cwd that are allowed to be read",default:[]}}},{name:"block-sudo",displayTitle:"Tried to run a command with sudo",impact:"Sudo gives the agent root — blocked unless explicitly allow-listed.",description:"Block sudo commands",match:{events:["PreToolUse","PermissionRequest"],toolNames:["Bash"]},defaultEnabled:!0,category:"Dangerous Commands",params:{allowPatterns:{type:"string[]",description:"Sudo command patterns to allow, matched token-by-token (e.g. 'sudo systemctl status')",default:[]}}},{name:"block-curl-pipe-sh",displayTitle:"Tried to pipe a downloaded script straight to a shell",impact:"`curl ... | sh` runs unverified remote code on your machine.",description:"Block piping downloads to shell",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!0,category:"Dangerous Commands"},{name:"block-rm-rf",displayTitle:"Tried to recursively delete a system path",impact:"Catches catastrophic `rm -rf /` and Windows equivalents.",description:"Prevent catastrophic deletions",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Dangerous Commands",params:{allowPaths:{type:"string[]",description:"Paths that are allowed to be recursively deleted",default:[]}}},{name:"block-failproofai-commands",displayTitle:"Tried to disable, pause or modify failproofai itself",impact:"An agent that can pause or remove enforcement can switch off every other policy.",description:"Block failproofai CLI commands, self-pause and uninstallation",match:{events:["PreToolUse","PermissionRequest"],toolNames:["Bash","Write","Edit","NotebookEdit"]},defaultEnabled:!0,alwaysOn:!0,category:"Dangerous Commands"},{name:"block-kubectl",displayTitle:"Tried to run a Kubernetes command",impact:"kubectl can change live cluster state — gated unless allow-listed.",description:"Block kubectl commands (Kubernetes cluster mutations)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"kubectl command patterns to allow, matched token-by-token (e.g. 'kubectl get *', 'kubectl describe *')",default:[]}}},{name:"block-terraform",displayTitle:"Tried to run a Terraform/OpenTofu command",impact:"Terraform mutates real infrastructure — gated unless allow-listed.",description:"Block terraform and tofu (OpenTofu) commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"terraform/tofu command patterns to allow (e.g. 'terraform plan', 'terraform validate')",default:[]}}},{name:"block-aws-cli",displayTitle:"Tried to run an AWS CLI command",impact:"AWS CLI can spend money or break prod — gated.",description:"Block aws CLI commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"aws CLI command patterns to allow (e.g. 'aws s3 ls *', 'aws sts get-caller-identity')",default:[]}}},{name:"block-gcloud",displayTitle:"Tried to run a Google Cloud command",impact:"gcloud can spend money or break prod — gated.",description:"Block gcloud (Google Cloud) CLI commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"gcloud command patterns to allow (e.g. 'gcloud auth list', 'gcloud config list')",default:[]}}},{name:"block-az-cli",displayTitle:"Tried to run an Azure CLI command",impact:"az can spend money or break prod — gated.",description:"Block az (Azure) CLI commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"az CLI command patterns to allow (e.g. 'az account show', 'az group list')",default:[]}}},{name:"block-helm",displayTitle:"Tried to run a Helm command",impact:"Helm releases mutate cluster state — gated.",description:"Block helm commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"helm command patterns to allow (e.g. 'helm list', 'helm status *')",default:[]}}},{name:"block-gh-pipeline",displayTitle:"Tried to run a privileged GitHub CLI pipeline command",impact:"Catches `gh workflow run`, `gh pr merge`, `gh secret set`, etc.",description:"Block gh CLI pipeline-trigger subcommands (workflow run, run rerun/cancel, pr merge, release create/delete, cache delete, secret set/delete)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"gh pipeline command patterns to allow (e.g. specific scripted invocations); read-only gh subcommands like 'gh pr view' and 'gh run list' are not matched by this policy",default:[]}}},{name:"block-secrets-write",displayTitle:"Tried to write a secret-key file",impact:"Stops the agent from creating `.pem`, `id_rsa`, `credentials.json`, etc.",description:"Block writing secret key files",match:{events:["PreToolUse"],toolNames:["Write"]},defaultEnabled:!1,category:"Dangerous Commands",params:{additionalPatterns:{type:"string[]",description:"Additional filename patterns (substrings) to block",default:[]}}},{name:"block-push-master",displayTitle:"Tried to push directly to main/master",impact:"Direct pushes to a protected branch bypass review.",description:"Block pushing to main/master",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!0,category:"Git",params:{protectedBranches:{type:"string[]",description:"Branch names to protect from direct pushes",default:["main","master"]}}},{name:"block-force-push",displayTitle:"Tried to force-push",impact:"Force-pushes rewrite history and can clobber teammates' work.",description:"Prevent force-pushing to any branch",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git"},{name:"block-work-on-main",displayTitle:"Tried to commit or merge on main/master",impact:"Work should land via PR — direct commits skip review.",description:"Block git commits and merges on main/master branch",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git",params:{protectedBranches:{type:"string[]",description:"Branch names where commits/merges are blocked",default:["main","master"]}}},{name:"warn-git-amend",displayTitle:"Used git commit --amend",impact:"Amending after a push rewrites history that others may have pulled.",description:"Warns before amending git commits, which rewrites history",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git"},{name:"warn-git-stash-drop",displayTitle:"Tried to drop or clear git stash",impact:"Stash deletions are permanent and silent.",description:"Warns before permanently deleting stashed changes",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git"},{name:"warn-all-files-staged",displayTitle:"Staged all files with git add -A / .",impact:"Wide stages routinely catch generated files or secrets you didn't intend to commit.",description:"Warns before staging all working tree files with git add -A / . / --all",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git"},{name:"warn-destructive-sql",displayTitle:"Ran destructive SQL (DROP / TRUNCATE / DELETE without WHERE)",impact:"Easy way to wipe a table by accident.",description:"Warn before executing destructive SQL (DROP/TRUNCATE/DELETE without WHERE) via database clients",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Database"},{name:"warn-schema-alteration",displayTitle:"Altered a database schema column",impact:"ALTER TABLE operations can lock tables and break readers.",description:"Warns before SQL schema changes (ALTER TABLE with column or rename operations)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Database"},{name:"warn-package-publish",displayTitle:"Tried to publish a package",impact:"Publishes are irreversible — `npm publish` / `cargo publish` shouldn't happen without intent.",description:"Warn before publishing packages to public registries (npm, PyPI, crates.io, RubyGems, etc.)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Packages & System"},{name:"warn-global-package-install",displayTitle:"Installed a package globally",impact:"`npm i -g`, `cargo install`, `pip --user` pollute your machine outside the project.",description:"Warns before installing packages globally (npm -g, cargo install, etc.)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Packages & System"},{name:"prefer-package-manager",displayTitle:"Used a non-preferred package manager",impact:"Mixing package managers creates lockfile churn for your team.",description:"Blocks non-preferred package managers and tells Claude to use an allowed one (e.g., uv instead of pip)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Packages & System",params:{allowed:{type:"string[]",description:"Allowed package manager names (e.g. ['uv', 'bun']). Any detected manager not in this list is blocked.",default:[]},blocked:{type:"string[]",description:"Additional manager names to block beyond the built-in list (e.g. ['pdm', 'pipx']).",default:[]}}},{name:"warn-large-file-write",displayTitle:"Wrote a file larger than the configured threshold",impact:"Catches accidentally large file writes (logs, binaries, model dumps).",description:"Warn before writing files larger than 1MB (configurable via thresholdKb param)",match:{events:["PreToolUse"],toolNames:["Write"]},defaultEnabled:!1,category:"Packages & System",params:{thresholdKb:{type:"number",description:"File size threshold in KB above which a warning is issued",default:1024}}},{name:"warn-background-process",displayTitle:"Started a long-lived background process",impact:"Catches `nohup` / `&` / `screen` / `tmux` / `disown` patterns that the agent often forgets to clean up.",description:"Warns before starting detached or background processes",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Packages & System"},{name:"warn-repeated-tool-calls",displayTitle:"Called the same tool 3+ times with identical arguments",impact:"Usually a sign of a stuck loop burning tokens.",description:"Warn when the same tool is called 3+ times with identical parameters",match:{events:["PreToolUse"]},defaultEnabled:!1,category:"AI Behavior"},{name:"require-commit-before-stop",displayTitle:"Stopped with uncommitted changes",impact:"Work not in a commit is invisible to teammates and easy to lose.",description:"Require all changes to be committed before Claude stops",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow"},{name:"require-push-before-stop",displayTitle:"Stopped with unpushed commits",impact:"Local-only commits won't trigger CI or be reviewable.",description:"Require all commits to be pushed to remote before Claude stops",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow",params:{remote:{type:"string",description:"Remote name to push to (default: origin)",default:"origin"},baseBranch:{type:"string",description:"Base branch to compare against (default: main)",default:"main"}}},{name:"require-pr-before-stop",displayTitle:"Stopped without a PR for the branch",impact:"Branches without PRs don't get reviewed.",description:"Require a pull request to exist for the current branch before Claude stops",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow",params:{baseBranch:{type:"string",description:"Base branch to compare against (default: main)",default:"main"}}},{name:"require-no-conflicts-before-stop",displayTitle:"Stopped with a branch that conflicts with main",impact:"Conflicting branches can't merge — surface them early.",description:"Require the current branch to merge cleanly with the base branch before Claude stops",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow",params:{baseBranch:{type:"string",description:"Base branch to check for conflicts against (default: main)",default:"main"}}},{name:"require-ci-green-before-stop",displayTitle:"Stopped with failing CI",impact:"Failing CI blocks deploy.",description:"Require CI checks to pass on the current HEAD commit before Claude stops (ignores stale runs on prior commits)",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow"}];function h(a){return a?{decision:"allow",reason:a}:{decision:"allow"}}function i(a){return{decision:"deny",reason:a}}function j(a){return{decision:"instruct",reason:a}}var k=a.i(10695);let l=function(a){let c=a.replaceAll("\\","/");for(let a of[".claude",".codex",".copilot",".cursor",".opencode",".pi",".gemini"]){let d=(0,b.join)((0,f.homedir)(),a).replaceAll("\\","/");if(c===d||c.startsWith(d+"/"))return!0}for(let a of[(0,b.join)(".config","opencode"),(0,b.join)(".local","share","opencode")]){let d=(0,b.join)((0,f.homedir)(),a).replaceAll("\\","/");if(c===d||c.startsWith(d+"/"))return!0}return!1},m=function(a){return!!(/[\\/]\.claude[\\/]settings(?:\.[^/\\]+)?\.json$/.test(a)||/[\\/]\.codex[\\/]hooks\.json$/.test(a)||/[\\/]\.copilot[\\/]hooks[\\/][^/\\]+\.json$/.test(a)||/[\\/]\.github[\\/]hooks[\\/][^/\\]+\.json$/.test(a)||/[\\/]\.cursor[\\/]hooks\.json$/.test(a)||/[\\/]\.opencode[\\/]opencode\.jsonc?$/.test(a)||/[\\/]\.opencode[\\/]plugins[\\/][^/\\]+\.(?:mjs|js|ts)$/.test(a)||/[\\/]\.config[\\/]opencode[\\/]opencode\.jsonc?$/.test(a)||/[\\/]\.config[\\/]opencode[\\/]config\.json$/.test(a)||/[\\/]\.config[\\/]opencode[\\/]plugins[\\/][^/\\]+\.(?:mjs|js|ts)$/.test(a)||/[\\/]\.pi[\\/](?:agent[\\/])?settings\.json$/.test(a)||/[\\/]\.pi[\\/](?:agent[\\/])?extensions[\\/]/.test(a)||/[\\/]\.gemini[\\/]settings\.json$/.test(a)||/[\\/]\.gemini[\\/]config[\\/]hooks\.json$/.test(a))};function n(a){return a.toolInput?.command??""}function o(a){return a.toolInput?.file_path??""}function p(a){return a.trim().split(/\s+/).map(a=>a.replace(/^['"]|['"]$/g,""))}let q=new Set(["&&","||","|",";"]),r=/[;&<>`$()\\]/,s=/eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}/,t=[[/sk-ant-api03-[A-Za-z0-9\-_]{20,}/,"Anthropic API key"],[/sk-ant-oat01-[A-Za-z0-9\-_]{20,}/,"Anthropic OAuth token"],[/sk-ant-[A-Za-z0-9\-_]{20,}/,"Anthropic API key"],[/sk-proj-[A-Za-z0-9\-_]{20,}/,"OpenAI project API key"],[/(?<!\w)sk-svcacct-[A-Za-z0-9\-_]{20,}/,"OpenAI service-account key"],[/(?<!\w)sk-admin-[A-Za-z0-9\-_]{20,}/,"OpenAI admin key"],[/sk-or-v1-[A-Za-z0-9\-_]{20,}/,"OpenRouter API key"],[/sk-[A-Za-z0-9]{20,}/,"OpenAI-compatible key (issuer unknown)"],[/github_pat_[A-Za-z0-9_]{82}/,"GitHub fine-grained token"],[/ghp_[A-Za-z0-9]{36}/,"GitHub personal access token"],[/gho_[A-Za-z0-9]{36}/,"GitHub OAuth token"],[/ghu_[A-Za-z0-9]{36}/,"GitHub user-to-server token"],[/ghs_[A-Za-z0-9]{36}/,"GitHub server-to-server token"],[/ghr_[A-Za-z0-9]{36}/,"GitHub refresh token"],[/glpat-[A-Za-z0-9\-_]{20,}/,"GitLab personal access token"],[/AKIA[A-Z0-9]{16}/,"AWS access key ID"],[/ASIA[A-Z0-9]{16}/,"AWS temporary access key ID"],[/sk_live_[A-Za-z0-9]{24,}/,"Stripe live secret key"],[/sk_test_[A-Za-z0-9]{24,}/,"Stripe test secret key"],[/rk_live_[A-Za-z0-9]{24,}/,"Stripe restricted key"],[/AIza[0-9A-Za-z\-_]{35}/,"Google API key"],[/\d{8,10}:[A-Za-z0-9_-]{35}/,"Telegram bot token"],[/xox[baprs]-[A-Za-z0-9-]{10,}/,"Slack token"],[/xapp-[0-9]-[A-Za-z0-9-]{10,}/,"Slack app-level token"],[/hf_[A-Za-z0-9]{30,}/,"Hugging Face token"],[/gsk_[A-Za-z0-9]{40,}/,"Groq API key"],[/r8_[A-Za-z0-9]{30,}/,"Replicate token"],[/xai-[A-Za-z0-9]{40,}/,"xAI API key"],[/npm_[A-Za-z0-9]{36}/,"npm access token"],[/dop_v1_[a-f0-9]{64}/,"DigitalOcean token"],[/shpat_[a-fA-F0-9]{32}/,"Shopify access token"],[/sb_secret_[A-Za-z0-9\-_]{20,}/,"Supabase secret key"],[/sbp_[a-f0-9]{40}/,"Supabase personal token"]],u=/(?:postgresql|postgres|mysql|mongodb(?:\+srv)?|redis|amqps?|smtps?):\/\/[^@\s]+@/,v=/-----BEGIN (?:[A-Z]+ )?PRIVATE KEY-----/,w=/Authorization:\s*Bearer\s+[A-Za-z0-9\-._~+/]{20,}/i;[...t];let x=/\b(?:psql|mysql|sqlite3|pgcli|clickhouse-client)\b/,y=/\b(?:DROP\s+(?:TABLE|DATABASE|SCHEMA)|TRUNCATE\b)/i,z=/\bDELETE\s+FROM\b/i,A=/\bWHERE\b/i,B=/\bALTER\s+TABLE\b[\s\S]*\b(?:DROP\s+COLUMN|ADD\s+COLUMN|RENAME\s+(?:COLUMN|TO)|MODIFY\s+COLUMN)\b/i,C=/(?:npm\s+publish|bun\s+publish|pnpm\s+publish|yarn\s+npm\s+publish|twine\s+upload|poetry\s+publish|cargo\s+publish|gem\s+push)\b/,D=/(?:^|\s|;|&&|\|\|)(?:env|printenv)(?:\s|$|;|&&|\|)/,E=/echo\s+.*\$\{?[A-Za-z_]/,F=/(?:^|\s|;|&&|\|\|)export\s+\w+/,G=/\$env:[A-Za-z_]/i,H=/(?:Get-ChildItem|dir|gci|ls)\s+Env:/i,I=/\[Environment\]::GetEnvironment/i,J=/echo\s+%[A-Za-z_]/i,K=/(?:^|[\\/])\.env(?:\.|$)/,L=/\.env(?:\b|\s|$|\.)/,M=/Start-Process\s+.*-Verb\s+RunAs/i,N=/(?:^|;|&&|\|\|)\s*runas\s/i,O=/(?:curl|wget)\s.*\|\s*(?:sh|bash|zsh|dash|ksh|csh|tcsh|fish|ash)\b/,P=/[;&|\n\r(){}`]+/,Q=new Set(["npx","bunx","pnpx","npm","pnpm","yarn","dlx","exec","run","eval","node","bun","deno","env","command","builtin","nohup","setsid","time","timeout","nice","stdbuf","xargs","sudo","doas","sh","bash","zsh","dash","ksh","fish","ash"]),R=/(?:^|\/)failproofai[^/]*$/,S=/failproofai\/(?:dist\/(?:cli|index)\.mjs|bin\/failproofai\.mjs)$/,T=/^(?:config|configure|setup)$/,U=/^--pause(?:=|$)/,V=/^[A-Za-z_][A-Za-z0-9_]*=/,W=/^\d+[a-z]*$/i;function X(a){let b=a.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g,"$$$1"),c=null,d=new Set;for(let[,a,c]of b.matchAll(/(?:^|[\s;&|])([A-Za-z_][A-Za-z0-9_]*)=("[^"]*"|'[^']*'|[^\s;&|]+)/g)){let b=c.replace(/^["']|["']$/g,"");(R.test(b)||S.test(b))&&d.add(a)}let e=a=>{let b=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(a);return!!b&&d.has(b[1])};for(let a of b.split(P)){let b=a.split(/\s+/).filter(Boolean),d=0;for(;d<b.length;){let a=b[d];if(!(V.test(a)||a.startsWith("-")||a.startsWith(">")||a.startsWith("<")||W.test(a)||Q.has(a.slice(a.lastIndexOf("/")+1))))break;d++}if(d>=b.length||!R.test(b[d])&&!S.test(b[d])&&!e(b[d]))continue;let f=b.slice(d+1),g=f.findIndex(a=>T.test(a));if(-1!==g&&f.slice(g+1).some(a=>U.test(a)))return"pause";c="cli"}return c}let Y=/(?:Invoke-WebRequest|iwr|Invoke-RestMethod|irm)\s+.*\|\s*(?:Invoke-Expression|iex)/i,Z=/^-[a-zA-Z]*f[a-zA-Z]*$/,$=["--force-with-lease","--force-if-includes"],_=/\.(?:pem|key)$/,aa=/id_rsa/,ab=/credentials/,ac=/git\s+(commit|merge|rebase|cherry-pick)\b/,ad=/\.failproofai(?:\/|\b)/,ae=new Set(["cat","bat","less","more","head","tail","nl","strings","xxd","od","jq","yq","diff","cmp","wc","sort","uniq","column","awk","cut","ls","dir","tree","stat","file","du","df","readlink","realpath","basename","dirname","pwd","test","find","grep","egrep","fgrep","rg","ag","ack","md5sum","sha1sum","sha256sum","shasum","cksum","cd","pushd","popd","cp","rsync","install","tee","sed","true","false",":","echo","printf","[","[[","]","]]","test","read","for","select","case","done","fi","esac"]),af=new Set(["do","then","else","elif","if","while","until","!"]),ag=/(?:^|[\s(])(?:while|until|for|select)\s/,ah=new Set(["cp","rsync","install"]),ai=new Set(["tee"]),aj=new Set(["uniq","xxd"]),ak={sort:["-o","--output"],tree:["-o","--output"],curl:["-o","--output","--output-dir","-D","--dump-header","--trace","--trace-ascii"]},al=new Set(["-fprint","-fprint0","-fprintf","-fls"]),am=new Set(["cat","bat","head","tail","nl","strings","xxd","od","jq","yq","wc","ls","stat","file","du","readlink","realpath","basename","dirname","grep","egrep","fgrep","rg","md5sum","sha1sum","sha256sum","shasum","cksum","echo","printf","true",":"]),an=new Set(["clean","rm","restore","checkout","reset","stash"]),ao=new Set(["-C","-c","--git-dir","--work-tree","--namespace","--exec-path"]),ap=new Set(["git","gh","glab","echo","printf","curl","code","open"]),aq=new Set(["-exec","-execdir","-ok","-okdir"]),ar=/\|\||&&|[;\n\r&]+/,as=/\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?/g,at=[".failproofai","~/.failproofai","$HOME/.failproofai","${HOME}/.failproofai","/root/.failproofai","/home/u/.failproofai","/Users/u/.failproofai"],au=[".config",".cache",".local",".git",".npm",".ssh",".bashrc","node_modules","dist","build","target","coverage","tmp","src","~/.config","~/.cache","$HOME/.config","${HOME}/.cache","/home/u/.config","/Users/u/.config","/root/.cache","/tmp/build","a","foo.txt","test-failures"];function av(a){if(!ax.test(a))return!1;for(let b of function(a){let b=[a];for(let c=0;c<24;c++){let c=[],d=!1;for(let a of b){let b=function(a){let b=a.indexOf("{");if(-1===b)return null;let c=0,d=[],e="";for(let f=b;f<a.length;f++){let g=a[f];if("{"===g){if(1==++c)continue}else if("}"===g){if(0==--c)return d.push(e),{start:b,end:f,alternatives:d}}else if(","===g&&1===c){d.push(e),e="";continue}e+=g}return null}(a);if(!b){c.push(a);continue}for(let e of(d=!0,b.alternatives))c.push(a.slice(0,b.start)+e+a.slice(b.end+1))}if(!d)return c;if(c.length>4096)return[aw(a)];b=c}return b.map(aw)}(a))if(function(a){if(ad.test(a))return!0;let b=a.split("/");for(let a=1;a<=b.length;a++)if(function(a){let b;if(!ax.test(a))return!1;let c="^"+function a(b){let c="";for(let d=0;d<b.length;d++){let e=function(b,c){let d=b[c];if(!"?*+@!".includes(d)||"("!==b[c+1])return null;let e=[],f="",g=0,h=c+1;for(;h<b.length;h++){let a=b[h];if("("===a){if(1==++g)continue}else if(")"===a){if(0==--g){e.push(f);break}}else if("|"===a&&1===g){e.push(f),f="";continue}f+=a}if(h>=b.length)return null;if("!"===d)return{source:"[^/]*",end:h};let i=e.map(b=>a(b)).join("|");return{source:`(?:${i})${"?"===d?"?":"*"===d?"*":"+"===d?"+":""}`,end:h}}(b,d);if(e){c+=e.source,d=e.end;continue}let f=b[d];if("*"===f)c+="[^/]*";else if("?"===f)c+="[^/]";else if("["===f){let a=function(a,b){let c=b+1,d=!1;("!"===a[c]||"^"===a[c])&&(d=!0,c++);let e="";for("]"===a[c]&&(e+="]",c++);c<a.length&&"]"!==a[c];){let b="["===a[c]?a[c+1]:void 0;if(":"===b||"."===b||"="===b){let d=a.indexOf(`${b}]`,c+2);if(-1!==d){e+=a.slice(c,d+2),c=d+2;continue}}e+=a[c],c++}if(c>=a.length)return null;if(/\[[.=:]/.test(e))return{source:"[^/]",end:c};let f=e.replace(/[\\\]]/g,"\\$&");return 0===f.length?{source:"[^/]",end:c}:{source:`[${d?"^":""}${f}]`,end:c}}(b,d);if(!a){c+="\\[";continue}c+=a.source,d=a.end}else c+=f.replace(/[.+^${}()|\\\]]/g,"\\$&")}return c}(a);try{b=RegExp(c+"$")}catch{return!1}return!!at.some(a=>b.test(a))&&!au.some(a=>b.test(a))}(b.slice(0,a).join("/")))return!0;return!1}(b))return!0;return!1}function aw(a){let b="",c=0;for(let d of a){if("{"===d){0===c&&(b+="*"),c++;continue}if("}"===d){c>0&&c--;continue}0===c&&(b+=d)}return b}let ax=/[*?[{]|[@+!]\(/;function ay(a){let b=[];for(let c=0;c<a.length;c++){if("`"===a[c]){let d=a.indexOf("`",c+1);if(-1===d)break;b.push(a.slice(c+1,d)),c=d;continue}if("$"!==a[c]||"("!==a[c+1])continue;let d=1,e=c+2;for(;e<a.length&&d>0;e++)"("===a[e]?d++:")"===a[e]&&d--;0===d&&b.push(a.slice(c+2,e-1)),c=e-1}return b}let az=/\d*>{1,2}\|?\s*("[^"]*"|'[^']*'|[^\s;&|<>]+)/g;function aA(a){return a.replace(/^[(){}'"]+|[(){}'"]+$/g,"")}function aB(a){let b=aA(a);return b.slice(b.lastIndexOf("/")+1)}function aC(a,b=0){if(0===b){let b=ay(a);for(let a=0;a<b.length&&a<64;a++){if(aC(b[a],1))return!0;b.push(...ay(b[a]))}}let c=[...a.matchAll(/(?:^|[\s;&|(])(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=("[^"]*"|'[^']*'|[^\s;&|)]+)/g)].map(([,a,b])=>[a,b.replace(/^["']|["']$/g,"")]),d=new Set;for(let a=0;a<c.length+1;a++){let a=d.size;for(let[a,b]of c)(ad.test(b)||[...b.matchAll(as)].some(([,a])=>d.has(a)))&&d.add(a);if(d.size===a)break}let e=a=>{if(ad.test(a))return!0;for(let[,b]of a.matchAll(as))if(d.has(b))return!0;return a.split(/\s+/).some(a=>{var b;let c;return c=(b=a.replace(/^['"]+|['"]+$/g,"")).replace(/^[()]+|[()]+$/g,""),av(b)||c!==b&&av(c)})},f=!1,g=0,h=null,i=!1;for(let b of a.split(ar)){if(!b.trim())continue;let a=b.split("|"),c=e(b)||f||i;if(c&&ag.test(b)&&(i=!0),/(?:^|\s)done(?:\s|$)/.test(b)&&(i=!1),c){for(let[,a]of b.matchAll(az))if(e(a.replace(/^["']|["']$/g,"")))return!0}for(let b of a){g+=(b.match(/\(/g)??[]).length;let a=function(a){let b=a.trim().split(/\s+/).map(aA).filter(Boolean),c=0;for(;c<b.length;){let a=b[c];if(/^\d*(?:>{1,2}\|?|<{1,3})/.test(a)){c+=/^\d*(?:>{1,2}\|?|<{1,3})$/.test(a)?2:1;continue}if(!(V.test(a)||a.startsWith("-")||W.test(a)||af.has(a)||Q.has(aB(a))))break;c++}return b.slice(c)}(b),d=a.length>0?aB(a[0]):"";if("cd"===d||"pushd"===d){let b=a.slice(1).find(a=>!a.startsWith("-"));h=(f=void 0!==b&&e(b))?g:null}else if("popd"===d)f=!1,h=null;else if(c&&a.length>0&&function(a,b){if(0===a.length)return!1;let c=aB(a[0]),d=a.slice(1);if("find"===c)return!!(d.some(a=>"-delete"===a)||d.some(a=>al.has(a)))||d.some((a,b)=>aq.has(a)&&!am.has(aB(d[b+1]??"")));if("sed"===c)return!!d.some(a=>a.startsWith("-i")||a.startsWith("--in-place"))||d.some((a,c)=>/(?:^|[;}/\s])w$/.test(a)&&b(d[c+1]??""))||d.some(a=>/(?:^|[;}/\s])w\s*\S*\.failproofai/.test(a));if("awk"===c||"gawk"===c||"mawk"===c)return d.some(a=>/system\s*\(|\|\s*["']|\|&/.test(a));if(ah.has(c)){if(d.includes("--remove-source-files")&&d.some(a=>b(a)))return!0;let a=d.findIndex(a=>"-t"===a||"--target-directory"===a);if(-1!==a&&b(d[a+1]??"")||d.some(a=>a.startsWith("--target-directory=")&&b(a)))return!0;let c=d.filter(a=>!a.startsWith("-")),e=c[c.length-1];return void 0!==e&&b(e)}if(ai.has(c))return d.some(a=>!a.startsWith("-")&&b(a));if(aj.has(c)){let a=d.filter(a=>!a.startsWith("-"));return a.length>1&&b(a[a.length-1])}if("git"===c){let a=function(a){for(let b=0;b<a.length;b++){let c=a[b];if(ao.has(c)){b++;continue}if(!c.startsWith("-"))return c}}(d);return void 0!==a&&an.has(a)}return!!function(a,b,c){let d=ak[a];if(!d)return!1;for(let a=0;a<b.length;a++){let e=b[a];if(d.find(a=>a.startsWith("--")&&e.startsWith(`${a}=`))&&c(e))return!0;let f=/^-[A-Za-z]*[oD]$/.test(e)&&d.includes(`-${e[e.length-1]}`);if((d.includes(e)||f)&&c(b[a+1]??""))return!0}return!1}(c,d,b)||!(ae.has(c)||ap.has(c))}(a,e))return!0;g-=(b.match(/\)/g)??[]).length,null!==h&&g<h&&(f=!1,h=null)}}return!1}let aD=/(?:npm\s+(?:uninstall|remove|un|r)\s.*failproofai|bun\s+remove\s.*failproofai|yarn\s+global\s+remove\s+failproofai|pnpm\s+(?:remove|uninstall|un)\s.*failproofai)/,aE=/\bgit\s+commit\b.*--amend\b/,aF=/\bgit\s+stash\s+(?:drop|clear)\b/,aG=/\bgit\s+add\s+(?:-A\b|--all\b|\.(?:\s|$|;|&&|\|\|))/,aH=/\bnpm\s+(?:install|i)\b(?=.*(?:\s-g\b|--global\b))/,aI=/\byarn\s+global\s+add\b/,aJ=/\bpnpm\s+(?:add|install|i)\b(?=.*(?:\s-g\b|--global\b))/,aK=/\bbun\s+(?:install|add)\b(?=.*(?:\s-g\b|--global\b))/,aL=/\bcargo\s+install\b/,aM=/\bpip(?:3)?\s+install\b(?=.*(?:--user\b|--break-system-packages\b))/,aN={pip:[/\bpip\b/,/\bpip3\b/,/\bpython3?\s+-m\s+pip\b/],npm:[/\bnpm\b/,/\bnpx\b/],yarn:[/\byarn\b/],pnpm:[/\bpnpm\b/,/\bpnpx\b/],bun:[/\bbun\b/,/\bbunx\b/],uv:[/\buv\b/],poetry:[/\bpoetry\b/],pipenv:[/\bpipenv\b/],conda:[/\bconda\b/],cargo:[/\bcargo\b/]},aO=/\bnohup\s+\S/,aP=/\bscreen\s+-[A-Za-z]*d[A-Za-z]*\b/,aQ=/\btmux\s+(?:new-session|new)\b[^|&;]*-d\b/,aR=/\bdisown\b/,aS=/(?<![&|])\s?&\s*(?:$|#|;)/,aT=/(?:^|[;\n]|&&|\|\|?|&)\s*kubectl(?:\s|$)/,aU=/(?:^|[;\n]|&&|\|\|?|&)\s*(?:terraform|tofu)(?:\s|$)/,aV=/(?:^|[;\n]|&&|\|\|?|&)\s*aws(?:\s|$)/,aW=/(?:^|[;\n]|&&|\|\|?|&)\s*gcloud(?:\s|$)/,aX=/(?:^|[;\n]|&&|\|\|?|&)\s*az(?:\s|$)/,aY=/(?:^|[;\n]|&&|\|\|?|&)\s*helm(?:\s|$)/,aZ=/(?:^|[;\n]|&&|\|\|?|&)\s*gh\s+(?:workflow\s+(?:run|enable|disable)|run\s+(?:rerun|cancel)|pr\s+merge|release\s+(?:create|delete)|cache\s+delete|secret\s+(?:set|delete))\b/,a$=new Map;function a_(a){try{let d=function(a){try{return(0,c.statSync)((0,b.join)(a,".git","HEAD")).mtimeMs}catch{return null}}(a),f=a$.get(a);if(f&&null!==d&&f.headMtimeMs===d)return f.branch||null;let g=(0,e.execSync)("git rev-parse --abbrev-ref HEAD",{cwd:a,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}).trim();return null!==d&&(a$.size>=500&&a$.clear(),a$.set(a,{branch:g,headMtimeMs:d})),g||null}catch{return null}}function a0(a,b){let c=p(a),d=p(b);return!(c.length<d.length||c.some(a=>q.has(a))||c.some(a=>r.test(a)))&&d.every((a,b)=>"*"===a||a===c[b])}let a1=/^-{1,2}c$/;function a2(a){return a.split(/&&|\|\||[|;\n]/).map(a=>a.trim()).filter(a=>/^git\s+push\s/.test(a)).map(a=>a.replace(/^git\s+push\s+/,""))}let a3=/^(?:~[A-Za-z0-9_.-]*|\$HOME|\$\{HOME\})(?=$|\/)/,a4=/^(?:\/\S*\/)?rm$/,a5=/^(?:\/\S*\/)?find$/,a6=/^-(?:exec|execdir|ok|okdir)$/,a7=/^-(?:[HLP]|D|O\d*)$/,a8=/^(?:-|\\?[(!])/,a9=["/tmp","/var/tmp"];function ba(a){let b=a.match(/^(?:~|\$HOME|\$\{HOME\})(?=$|\/)/);return b?(0,f.homedir)()+a.slice(b[0].length):a}function bb(a){return a.replace(/\/\*$/,"").replace(/\/+$/,"")}function bc(a){let b=a.replace(/^['"]|['"]$/g,"");if(""===b)return!1;let c=b.match(a3);if(!c&&/^[$`]/.test(b))return!0;let d=c?b.slice(c[0].length):b.startsWith("/")?b:null;if(null===d)return!1;let e=bb(d).split("/").filter(Boolean);return!(!c&&a9.some(a=>`/${e.join("/")}`.startsWith(`${a}/`)))&&e.length<=2}function bd(a){let b=p(a),c=b.findIndex(a=>a5.test(a));if(c>=0){let a=b.slice(c+1),d=a.findIndex(a=>a6.test(a));if(a.includes("-delete")||d>=0&&a4.test(a[d+1]??"")){let b=0;for(;b<a.length&&a7.test(a[b]);)b+="-D"===a[b]?2:1;let c=a.slice(b),d=c.findIndex(a=>a8.test(a));return d<0?c:c.slice(0,d)}}let d=b.findIndex(a=>a4.test(a));if(d>=0){let a=b.slice(d+1),c=a.filter(a=>/^-[^-]/.test(a)).join(""),e=a.filter(a=>/^--/.test(a)),f=/r/i.test(c)||e.some(a=>/^--recursive$/i.test(a)),g=/f/.test(c)||e.some(a=>/^--force$/i.test(a));if(f&&g)return a.filter(a=>!a.startsWith("-"))}return null}function be(a){return a.split(/&&|\|\||[|;\n]/).map(a=>a.trim()).filter(a=>""!==a)}let bf=/(?:^|;|&&|\|\||\|)\s*(?:ls|find|cat|head|tail|less|more|wc|file|stat|tree|du)\s/;function bg(a,b,c){if("Bash"!==a.toolName)return h();let d=n(a);return!b.test(d)||(a.params?.allowPatterns??[]).some(a=>a0(d,a))?h():i(c)}let bh=/\s*(?:&&|\|\||\||;)\s*/;function bi(a){return a.session?.permissionMode==="plan"}let bj={"sanitize-jwt":function(a){let b=JSON.stringify(a.payload);return s.test(b)?{decision:"deny",reason:"JWT token detected in tool output",message:"[REDACTED: JWT token removed by failproofai]"}:h()},"sanitize-api-keys":function(a){let b=JSON.stringify(a.payload);for(let[a,c]of t)if(a.test(b))return{decision:"deny",reason:`${c} detected in tool output`,message:`[REDACTED: ${c} removed by failproofai]`};for(let{regex:c,label:d}of a.params?.additionalPatterns??[])try{if(new RegExp(c).test(b))return{decision:"deny",reason:`${d} detected in tool output`,message:`[REDACTED: ${d} removed by failproofai]`}}catch{(0,k.hookLogWarn)(`additionalPatterns: invalid regex "${c}", skipping`)}return h()},"sanitize-connection-strings":function(a){let b=JSON.stringify(a.payload);return u.test(b)?{decision:"deny",reason:"Database connection string with credentials detected in tool output",message:"[REDACTED: connection string removed by failproofai]"}:h()},"sanitize-private-key-content":function(a){let b=JSON.stringify(a.payload);return v.test(b)?{decision:"deny",reason:"Private key content detected in tool output",message:"[REDACTED: private key content removed by failproofai]"}:h()},"sanitize-bearer-tokens":function(a){let b=JSON.stringify(a.payload);return w.test(b)?{decision:"deny",reason:"Bearer token detected in tool output",message:"[REDACTED: Bearer token removed by failproofai]"}:h()},"protect-env-vars":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return D.test(b)?i("Command reads environment variables"):E.test(b)?i("Command echoes environment variable"):F.test(b)?i("Command exports environment variable"):G.test(b)?i("Command reads environment variable via PowerShell"):H.test(b)?i("Command reads environment variables via PowerShell"):I.test(b)?i("Command reads environment variable via .NET"):J.test(b)?i("Command echoes environment variable via cmd"):h()},"block-env-files":function(a){let b=n(a),c=o(a);return c&&K.test(c)?i("Access to .env file blocked"):"Bash"===a.toolName&&L.test(b)?i("Command references .env file"):h()},"block-read-outside-cwd":function(a){let c=process.env.CLAUDE_PROJECT_DIR||a.session?.cwd;if(!c)return h();let d=a.params?.allowPaths??[];if("Bash"===a.toolName){let e=n(a);if(!bf.test(e))return h();let g=function(a){let c,d=[],e=/(?<![a-zA-Z0-9_.\-~\\*?:=])(?:~\/[^\s;|&"'()\[\]{}]*|~(?=\s|$|[;|&"'()\[\]{}])|\/[^\s;|&"'()\[\]{}]*)/g;function g(a){let c;for(e.lastIndex=0;null!==(c=e.exec(a));){let a=c[0];"~"===a?a=(0,f.homedir)():a.startsWith("~/")&&(a=(0,b.join)((0,f.homedir)(),a.slice(2))),d.push(a)}}let h=a.length,i=!1,j=!1;for(let b=0;b<a.length;b++){let c=a[b];if('"'!==c||j)if("'"!==c||i){if("|"===c&&!i&&!j){h=b;break}}else j=!j;else i=!i}let k=a.slice(0,h),l=/"([^"]*)"|'([^']*)'/g;for(;null!==(c=l.exec(k));){let a=c[1]??c[2]??"";/[*?\[\]^$+()\\]/.test(a)||g(a)}return g(a.replace(/"[^"]*"/g,a=>" ".repeat(a.length)).replace(/'[^']*'/g,a=>" ".repeat(a.length))),d}(e),j=c.endsWith("/")?c:c+"/";for(let a of g){let e=(0,b.resolve)(c,a);if(m(e))return i(`Reading agent settings file blocked: ${e}`);if(!l(e)&&"/dev/null"!==e&&e!==c&&!e.startsWith(j)){if(d.some(a=>e===a||e.startsWith(a.endsWith("/")?a:a+"/")))continue;return i(`Bash read outside project directory blocked: ${e}`)}}return h()}let e=o(a),g=a.toolInput?.path??"",j=e||g;if(!j)return h();let k=(0,b.resolve)(c,j);if(m(k))return i(`Reading agent settings file blocked: ${k}`);if(l(k)||"/dev/null"===k)return h();let p=c.endsWith("/")?c:c+"/";return k===c||k.startsWith(p)?h():d.some(a=>k===a||k.startsWith(a.endsWith("/")?a:a+"/"))?h():i(`Access outside project directory blocked: ${k}`)},"block-sudo":function(a){if("Bash"!==a.toolName)return h();let b=n(a).trimStart();return function a(b,c=0){for(let d of function(a){let b=[],c=[],d="",e=null,f=()=>{d&&c.push(d),d=""},g=()=>{f(),c.length&&b.push(c),c=[]};for(let b=0;b<a.length;b++){let c=a[b];if(e){if("\\"===c&&'"'===e&&b+1<a.length){d+=a[++b];continue}if(c===e){e=null;continue}d+=c;continue}if("\\"===c&&b+1<a.length){d+=a[++b];continue}if('"'===c||"'"===c){e=c;continue}if(/\s/.test(c)){f();continue}if(/[;&|\n\r(){}`]/.test(c)){g();continue}d+=c}return g(),b}(b)){let b=0;for(;b<d.length;){let e=d[b],f=e.slice(e.lastIndexOf("/")+1);if("sudo"===f||"doas"===f)return!0;if(!(V.test(e)||e.startsWith("-")||e.startsWith(">")||e.startsWith("<")||W.test(e)||Q.has(f)))break;if(a1.test(e)&&c<3&&b+1<d.length&&a(d[b+1],c+1))return!0;b++}}return!1}(b)?(a.params?.allowPatterns??[]).some(a=>a0(b,a))?h():i("sudo commands are blocked"):M.test(b)?i("Elevated process launch is blocked"):N.test(b)?i("runas elevation is blocked"):h()},"block-curl-pipe-sh":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return O.test(b)?i("Piping downloads to shell is blocked"):Y.test(b)?i("Piping downloads to Invoke-Expression is blocked"):h()},"block-rm-rf":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return be(b).some(a=>{let b=bd(a);return null!==b&&b.some(bc)})?!function(a,b){if(0===b.length)return!1;let c=b.map(a=>bb(ba(a))||"/"),d=!1;for(let e of be(a)){let a=bd(e);if(null!==a)for(let f of(d=!0,a)){let a=bb(ba(f))||"/";if(!c.some(b=>a===b||a.startsWith(b+"/"))&&!b.some(a=>{let b=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return RegExp(`${b}(?:[/"'\\s/*]|$)`).test(e)}))return!1}}return d}(b,a.params?.allowPaths??[])?i("Catastrophic deletion blocked"):h():/Remove-Item\s+.*-Recurse.*-Force.*(?:[A-Z]:\\(?:\s|$)|\\\*)/i.test(b)||/(?:rd|rmdir)\s+\/s\s+\/q\s+[A-Z]:\\/i.test(b)?i("Catastrophic deletion blocked"):h()},"block-failproofai-commands":function(a){if("Write"===a.toolName||"Edit"===a.toolName||"NotebookEdit"===a.toolName){let b=o(a)||(a.toolInput?.notebook_path??"");return ad.test(b)?i("Writing to failproofai's own state would switch enforcement off. If a policy is blocking legitimate work, say so and let the operator decide."):h()}if("Bash"!==a.toolName)return h();let b=n(a),c=b.replace(/\\\r?\n/g,"").replace(/\$'((?:[^'\\]|\\.)*)'/g,(a,b)=>b.replace(/\\(x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{1,4}|U[0-9A-Fa-f]{1,8}|[0-7]{1,3}|.)/g,(a,b)=>{try{if("x"===b[0])return String.fromCharCode(parseInt(b.slice(1),16));if("u"===b[0]||"U"===b[0])return String.fromCodePoint(parseInt(b.slice(1),16));if(/^[0-7]+$/.test(b))return String.fromCharCode(parseInt(b,8))}catch{return b}return({a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:" ",v:"\v","\\":"\\","'":"'",'"':'"',"?":"?"})[b]??b})).replace(/\\(.)/g,"$1").replace(/['"]/g,""),d=X(b)??X(c);return"pause"===d?i("Pausing failproofai enforcement is a human action, not an agent one. If a policy is blocking legitimate work, say so and let the operator decide."):"cli"===d?i("Running failproofai CLI commands is blocked"):aD.test(b)||aD.test(c)?i("Uninstalling failproofai is blocked"):aC(b)||aC(c)?i("Deleting, moving or overwriting failproofai's own state would switch enforcement off. If a policy is blocking legitimate work, say so and let the operator decide."):h()},"block-kubectl":function(a){return bg(a,aT,"kubectl commands are blocked")},"block-terraform":function(a){return bg(a,aU,"terraform/tofu commands are blocked")},"block-aws-cli":function(a){return bg(a,aV,"aws CLI commands are blocked")},"block-gcloud":function(a){return bg(a,aW,"gcloud commands are blocked")},"block-az-cli":function(a){return bg(a,aX,"az (Azure) CLI commands are blocked")},"block-helm":function(a){return bg(a,aY,"helm commands are blocked")},"block-gh-pipeline":function(a){return bg(a,aZ,"gh pipeline-trigger commands are blocked")},"block-secrets-write":function(a){if("Write"!==a.toolName)return h();let b=o(a);if(_.test(b)||aa.test(b)||ab.test(b))return i("Writing secret key files is blocked");for(let c of a.params?.additionalPatterns??[])if(b.includes(c))return i(`Writing blocked file pattern: ${c}`);return h()},"block-push-master":function(a){if("Bash"!==a.toolName)return h();let b=a.params?.protectedBranches??["main","master"];if(0===b.length)return h();let c=a2(n(a)),d=RegExp(`\\b(?:${b.map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`);return c.some(a=>d.test(a))?i(`Pushing to ${b.join("/")} is blocked`):h()},"block-force-push":function(a){if("Bash"!==a.toolName)return h();for(let b of a2(n(a))){let a=!1;for(let c of b.split(/\s+/)){if("--"===c){a=!0;continue}if(!a&&function(a){return"--force"===a||!$.some(b=>a.startsWith(b))&&(!!a.startsWith("--force")||Z.test(a))}(c))return i("Force-pushing is blocked")}}return h()},"block-work-on-main":function(a){if("Bash"!==a.toolName)return h();let b=n(a).match(ac);if(!b)return h();let c=a.session?.cwd;if(!c)return h();let d=a_(c);return d&&(a.params?.protectedBranches??["main","master"]).includes(d)?i(`Git ${b[1]} on ${d} is blocked. Create a feature branch first.`):h()},"warn-git-amend":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aE.test(b)?j("STOP: This command amends the last commit, which rewrites git history. If this commit has already been pushed to a shared branch, this will cause divergence for other contributors. Confirm with the user before executing."):h()},"warn-git-stash-drop":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aF.test(b)?j("STOP: This command permanently deletes stashed changes (git stash drop/clear). Stash entries cannot be recovered after deletion. Confirm with the user before executing."):h()},"warn-all-files-staged":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aG.test(b)?j("STOP: This command stages all files in the working tree (git add -A / --all / .). This may inadvertently include build artifacts, generated files, or sensitive files not covered by .gitignore. Confirm with the user before executing."):h()},"warn-destructive-sql":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return x.test(b)&&(y.test(b)||z.test(b)&&!A.test(b))?j("STOP: This command contains destructive SQL (DROP/TRUNCATE/DELETE). Confirm with the user before executing."):h()},"warn-schema-alteration":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return x.test(b)&&B.test(b)?j("STOP: This command contains a schema-altering SQL statement (ALTER TABLE with column or rename operation). Schema changes on production databases are irreversible or disruptive. Confirm with the user before executing."):h()},"warn-package-publish":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return C.test(b)?j("STOP: This command publishes a package to a public registry. Confirm with the user that this is intentional."):h()},"warn-global-package-install":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aH.test(b)||aI.test(b)||aJ.test(b)||aK.test(b)||aL.test(b)||aM.test(b)?j("STOP: This command installs a package globally, which modifies the system-wide environment outside the project. This can conflict with other projects or system tools. Confirm with the user before executing."):h()},"prefer-package-manager":function(a){if("Bash"!==a.toolName)return h();let b=n(a);if(!b)return h();let c=a.params?.allowed??[];if(0===c.length)return h();let d=new Set(c.map(a=>a.toLowerCase())),e=a.params?.blocked??[],f=c.join(", ");for(let a of b.split(bh)){let b=a.trim();if(!b)continue;let c=!1;for(let a of d){let d=aN[a];if(d){for(let a of d)if(a.test(b)){c=!0;break}if(c)break}}if(!c){for(let[a,c]of Object.entries(aN))if(!d.has(a)){for(let d of c)if(d.test(b))return i(`"${a}" is not an allowed package manager. Allowed package managers for this project: ${f}. Rewrite this command using an allowed package manager.`)}for(let a of e){let c=a.toLowerCase();if(!d.has(c)&&RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(b))return i(`"${c}" is not an allowed package manager. Allowed package managers for this project: ${f}. Rewrite this command using an allowed package manager.`)}}}return h()},"warn-large-file-write":function(a){if("Write"!==a.toolName)return h();let b=a.toolInput?.content;if("string"!=typeof b)return h();let c=a.params?.thresholdKb??1024;return b.length>1024*c?j(`STOP: You are writing a file larger than ${c}KB (${Math.round(b.length/1024)}KB). This is unusually large. Confirm this is intentional before proceeding.`):h()},"warn-background-process":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aO.test(b)||aP.test(b)||aQ.test(b)||aR.test(b)||aS.test(b)?j("STOP: This command starts a background or detached process (nohup, screen -d, tmux -d, or trailing &). Background processes persist after Claude's session and may be difficult to track or stop. Confirm with the user before executing."):h()},"warn-repeated-tool-calls":async function a(a){let b=a.session?.transcriptPath;if(!b||!a.toolName||!a.toolInput)return h();let c=`${b}.tool-calls.json`,e=JSON.stringify({tool:a.toolName,input:a.toolInput}),f={};try{let a=await (0,d.readFile)(c,"utf8");f=JSON.parse(a)}catch{}let g=f[e]??0;if(g>=3)return j(`STOP: You have already called ${a.toolName} ${g} times with identical parameters. This is wasteful and unproductive. Do NOT repeat this call — use a different approach or ask the user for clarification.`);f[e]=g+1;try{let a=JSON.stringify(f);a.length<=65536&&await (0,d.writeFile)(c,a,"utf8")}catch{}return h()},"require-commit-before-stop":function(a){if(bi(a))return h("Plan mode — no changes made, skipping commit check.");let b=a.session?.cwd;if(!b)return h("No working directory available, skipping commit check.");try{if((0,e.execSync)("git status --porcelain",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim().length>0)return i("You have uncommitted changes in the working directory. Commit all changes now.");return h("All changes are committed.")}catch{return h("Not a git repository, skipping commit check.")}},"require-push-before-stop":function(a){if(bi(a))return h("Plan mode — no changes made, skipping push check.");let b=a.session?.cwd;if(!b)return h("No working directory available, skipping push check.");try{if(!(0,e.execSync)("git remote",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}).trim())return h("No git remote configured, skipping push check.");let c=a.params?.remote??"origin",d=a_(b);if(!d||"HEAD"===d)return h("Detached HEAD, skipping push check.");let f=a.params?.baseBranch??"main";if(d===f)return h(`On base branch "${f}", skipping push check.`);try{if(!(0,e.execFileSync)("git",["log",`${c}/${f}..HEAD`,"--oneline"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim())return h(`No commits ahead of ${c}/${f}, skipping push check.`);if(!(0,e.execFileSync)("git",["diff","--stat",`${c}/${f}`,"HEAD"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim())return h(`No file changes compared to ${c}/${f}, skipping push check.`)}catch{}let g=!1;try{(0,e.execFileSync)("git",["rev-parse","--verify",`${c}/${d}`],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}),g=!0}catch{}if(!g)return i(`Branch "${d}" has not been pushed to remote "${c}". Run now: git push -u ${c} ${d}`);let j=(0,e.execFileSync)("git",["log",`${c}/${d}..HEAD`,"--oneline"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim();if(j.length>0){let a=j.split("\n").length;return i(`You have ${a} unpushed commit${a>1?"s":""} on branch "${d}". Run now: git push`)}return h(`All commits pushed to "${c}".`)}catch{return h("Could not check push status, skipping.")}},"require-pr-before-stop":function(a){if(bi(a))return h("Plan mode — no changes made, skipping PR check.");let b=a.session?.cwd;if(!b)return h("No working directory available, skipping PR check.");try{let c;try{(0,e.execSync)("gh --version",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3})}catch{return h("GitHub CLI (gh) not installed, skipping PR check.")}let d=a_(b);if(!d||"HEAD"===d)return h("Detached HEAD, skipping PR check.");let f=a.params?.baseBranch??"main";if(d===f)return h(`On base branch "${f}", skipping PR check.`);try{if(!(0,e.execFileSync)("git",["log",`origin/${f}..HEAD`,"--oneline"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim())return h(`No commits ahead of origin/${f}, skipping PR check.`);if(!(0,e.execFileSync)("git",["diff","--stat",`origin/${f}`,"HEAD"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim())return h(`No file changes compared to origin/${f}, skipping PR check.`)}catch{}try{c=(0,e.execSync)("gh pr view --json number,url,state",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim()}catch{return i(`No pull request found for branch "${d}". Run now: gh pr create`)}let g=JSON.parse(c);if("OPEN"===g.state)return h(`PR #${g.number} exists: ${g.url}`);if("MERGED"===g.state)return h(`PR #${g.number} was merged: ${g.url}. Switch off this branch (e.g. 'git checkout ${f} && git pull') before stopping again.`);return i(`Pull request for branch "${d}" is ${g.state.toLowerCase()}. Run now: gh pr create`)}catch{return h("Could not check PR status, skipping.")}},"require-no-conflicts-before-stop":function(a){let b,c;if(bi(a))return h("Plan mode — no changes made, skipping conflict check.");let d=a.session?.cwd;if(!d)return h("No working directory available, skipping conflict check.");let f=a_(d);if(!f||"HEAD"===f)return h("Detached HEAD, skipping conflict check.");let g=a.params?.baseBranch??"main";if(f===g)return h(`On base branch "${g}", skipping conflict check.`);try{(0,e.execSync)("gh --version",{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3})}catch{return h("gh CLI not installed, skipping conflict check.")}try{b=(0,e.execSync)("gh pr view --json mergeable,number,url,state",{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim()}catch{return h("No pull request found for branch, skipping conflict check.")}try{c=JSON.parse(b)}catch{return h("Could not parse gh pr view output, skipping conflict check.")}if("OPEN"!==c.state)return h(`PR #${c.number} is ${c.state.toLowerCase()}; skipping conflict check.`);try{(0,e.execFileSync)("git",["rev-parse","--verify",`origin/${g}`],{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}),(0,e.execFileSync)("git",["log",`origin/${g}..HEAD`,"--oneline"],{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim()&&(0,e.execFileSync)("git",["merge-tree","--write-tree","--name-only",`origin/${g}`,"HEAD"],{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:1e4})}catch(a){if(1===a.status){let b=("string"==typeof a.stdout?a.stdout:a.stdout?.toString("utf8")??"").trim().split("\n"),c=[];for(let a=1;a<b.length;a++){let d=b[a];if(""===d)break;c.push(d)}let d=c.length?c.join(", "):"one or more files";return i(`Branch "${f}" has merge conflicts with ${g} in: ${d}. Rebase or merge origin/${g} now and resolve the conflicts.`)}}return"CONFLICTING"===c.mergeable?i(`PR #${c.number} has merge conflicts per GitHub (${c.url}). Rebase or merge origin/${g} now and resolve the conflicts.`):"UNKNOWN"===c.mergeable?i(`GitHub is still computing mergeability for PR #${c.number} (${c.url}). Wait ~10 seconds, then re-check with \`gh pr view --json mergeable\` before attempting to stop again.`):h(`PR #${c.number} merges cleanly per GitHub.`)},"require-ci-green-before-stop":function(a){if(bi(a))return h("Plan mode — no changes made, skipping CI check.");let b=a.session?.cwd;if(!b)return h("No working directory available, skipping CI check.");try{try{(0,e.execSync)("gh --version",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3})}catch{return h("GitHub CLI (gh) not installed, skipping CI check.")}let a=a_(b);if(!a||"HEAD"===a)return h("Detached HEAD, skipping CI check.");let c=function(a){try{return(0,e.execSync)("git rev-parse HEAD",{cwd:a,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}).trim()||null}catch{return null}}(b),d=[];try{let f=(0,e.execFileSync)("gh",["run","list","--branch",a,"--limit","20","--json","status,conclusion,name,headSha"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim();if(f&&"[]"!==f){let a=JSON.parse(f),b=c?a.filter(a=>a.headSha===c):a,e=new Set;d=b.filter(a=>!e.has(a.name)&&(e.add(a.name),!0))}}catch{}let f=[],g=[];c&&(f=function(a,b){try{let c=(0,e.execFileSync)("gh",["api",`repos/{owner}/{repo}/commits/${b}/check-runs`,"--jq",'.check_runs | map(select(.app.slug != "github-actions")) | map({name: .name, status: .status, conclusion: (.conclusion // "")})'],{cwd:a,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim();if(!c||"[]"===c)return[];return JSON.parse(c)}catch{return[]}}(b,c),g=function(a,b){try{let c=(0,e.execFileSync)("gh",["api",`repos/{owner}/{repo}/commits/${b}/statuses`,"--jq","map({name: .context, state: .state}) | unique_by(.name)"],{cwd:a,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim();if(!c||"[]"===c)return[];return JSON.parse(c).map(a=>({name:a.name,status:"pending"===a.state?"in_progress":"completed",conclusion:"pending"===a.state?"":"success"===a.state?"success":"failure"}))}catch{return[]}}(b,c));let j=[...d,...f,...g];if(0===j.length)return h(`No CI runs found for branch "${a}".`);let k=j.filter(a=>"completed"===a.status&&"success"!==a.conclusion&&"skipped"!==a.conclusion&&"cancelled"!==a.conclusion&&"neutral"!==a.conclusion);if(k.length>0){let b=k.map(a=>`"${a.name}"`).join(", ");return i(`CI checks are failing on branch "${a}": ${b}. Fix the failing checks now.`)}let l=j.filter(a=>"in_progress"===a.status||"queued"===a.status||"waiting"===a.status);if(l.length>0){let b=l.map(a=>`"${a.name}"`).join(", ");return i(`CI checks are still running on branch "${a}": ${b}. Wait for all checks to complete, then verify they pass.`)}return h(`All CI checks passed on branch "${a}".`)}catch{return h("Could not check CI status, skipping.")}}},bk=new Set(Object.keys(bj)),bl=g.filter(a=>!bk.has(a.name)).map(a=>a.name);if(bl.length>0)throw Error(`failproofai: builtin policies missing an implementation: ${bl.join(", ")}`);let bm=new Set(g.map(a=>a.name)),bn=[...bk].filter(a=>!bm.has(a));if(bn.length>0)throw Error(`failproofai: policy implementations with no catalog entry: ${bn.join(", ")}`);let bo=g.map(a=>({...a,fn:bj[a.name]}));a.s(["BUILTIN_POLICIES",0,bo],92956)}];
1
+ module.exports=[92956,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(12714),e=a.i(74533),f=a.i(60526);let g=[{name:"sanitize-jwt",description:"Stop Claude from reading JWTs in tool responses",displayTitle:"Redacted JWT tokens from tool output",impact:"Stops the agent from echoing auth tokens it saw in command output.",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize"},{name:"sanitize-api-keys",description:"Stop Claude from reading API keys (OpenAI, Anthropic, GitHub, AWS, Stripe, Google) in tool responses",displayTitle:"Redacted API keys from tool output",impact:"Catches OpenAI / Anthropic / GitHub / AWS / Stripe / Google keys before the model sees them.",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize",params:{additionalPatterns:{type:"pattern[]",description:"Additional API key patterns to scrub, each with { regex, label }",default:[]}}},{name:"sanitize-connection-strings",description:"Stop Claude from reading database connection strings with embedded credentials in tool responses",displayTitle:"Redacted database connection strings from tool output",impact:"Strips embedded DB credentials before they reach the model context.",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize"},{name:"sanitize-private-key-content",description:"Stop Claude from reading PEM private key content in tool responses",displayTitle:"Redacted PEM private keys from tool output",impact:"Prevents private key bodies from being echoed into chat context.",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize"},{name:"sanitize-bearer-tokens",displayTitle:"Redacted bearer tokens from tool output",impact:"Strips Authorization: Bearer values before they hit the model.",description:"Stop Claude from reading Authorization Bearer tokens in tool responses",match:{events:["PostToolUse"]},defaultEnabled:!0,category:"Sanitize"},{name:"protect-env-vars",displayTitle:"Tried to dump environment variables to chat",impact:"Env vars often contain secrets; blocking `env` / `printenv` keeps them out of the model context.",description:"Prevent commands that read environment variables",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!0,category:"Environment"},{name:"block-env-files",displayTitle:"Tried to read or write a .env file",impact:"`.env` files routinely contain API keys and DB credentials.",description:"Block reading/writing .env files",match:{events:["PreToolUse"]},defaultEnabled:!0,category:"Environment"},{name:"block-read-outside-cwd",displayTitle:"Tried to read files outside your project directory",impact:"Stops the agent from peeking at neighboring repos or your home directory.",description:"Block file reads outside the session working directory",match:{events:["PreToolUse"],toolNames:["Read","Glob","Grep","Bash"]},defaultEnabled:!1,category:"Environment",params:{allowPaths:{type:"string[]",description:"Absolute paths outside cwd that are allowed to be read",default:[]}}},{name:"block-sudo",displayTitle:"Tried to run a command with sudo",impact:"Sudo gives the agent root — blocked unless explicitly allow-listed.",description:"Block sudo commands",match:{events:["PreToolUse","PermissionRequest"],toolNames:["Bash"]},defaultEnabled:!0,category:"Dangerous Commands",params:{allowPatterns:{type:"string[]",description:"Sudo command patterns to allow, matched token-by-token (e.g. 'sudo systemctl status')",default:[]}}},{name:"block-curl-pipe-sh",displayTitle:"Tried to pipe a downloaded script straight to a shell",impact:"`curl ... | sh` runs unverified remote code on your machine.",description:"Block piping downloads to shell",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!0,category:"Dangerous Commands"},{name:"block-rm-rf",displayTitle:"Tried to recursively delete a system path",impact:"Catches catastrophic `rm -rf /` and Windows equivalents.",description:"Prevent catastrophic deletions",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Dangerous Commands",params:{allowPaths:{type:"string[]",description:"Paths that are allowed to be recursively deleted",default:[]}}},{name:"block-failproofai-commands",displayTitle:"Tried to disable, pause or modify failproofai itself",impact:"An agent that can pause or remove enforcement can switch off every other policy.",description:"Block failproofai CLI commands, self-pause and uninstallation",match:{events:["PreToolUse","PermissionRequest"],toolNames:["Bash","Write","Edit","NotebookEdit"]},defaultEnabled:!0,alwaysOn:!0,category:"Dangerous Commands"},{name:"block-kubectl",displayTitle:"Tried to run a Kubernetes command",impact:"kubectl can change live cluster state — gated unless allow-listed.",description:"Block kubectl commands (Kubernetes cluster mutations)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"kubectl command patterns to allow, matched token-by-token (e.g. 'kubectl get *', 'kubectl describe *')",default:[]}}},{name:"block-terraform",displayTitle:"Tried to run a Terraform/OpenTofu command",impact:"Terraform mutates real infrastructure — gated unless allow-listed.",description:"Block terraform and tofu (OpenTofu) commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"terraform/tofu command patterns to allow (e.g. 'terraform plan', 'terraform validate')",default:[]}}},{name:"block-aws-cli",displayTitle:"Tried to run an AWS CLI command",impact:"AWS CLI can spend money or break prod — gated.",description:"Block aws CLI commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"aws CLI command patterns to allow (e.g. 'aws s3 ls *', 'aws sts get-caller-identity')",default:[]}}},{name:"block-gcloud",displayTitle:"Tried to run a Google Cloud command",impact:"gcloud can spend money or break prod — gated.",description:"Block gcloud (Google Cloud) CLI commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"gcloud command patterns to allow (e.g. 'gcloud auth list', 'gcloud config list')",default:[]}}},{name:"block-az-cli",displayTitle:"Tried to run an Azure CLI command",impact:"az can spend money or break prod — gated.",description:"Block az (Azure) CLI commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"az CLI command patterns to allow (e.g. 'az account show', 'az group list')",default:[]}}},{name:"block-helm",displayTitle:"Tried to run a Helm command",impact:"Helm releases mutate cluster state — gated.",description:"Block helm commands",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"helm command patterns to allow (e.g. 'helm list', 'helm status *')",default:[]}}},{name:"block-gh-pipeline",displayTitle:"Tried to run a privileged GitHub CLI pipeline command",impact:"Catches `gh workflow run`, `gh pr merge`, `gh secret set`, etc.",description:"Block gh CLI pipeline-trigger subcommands (workflow run, run rerun/cancel, pr merge, release create/delete, cache delete, secret set/delete)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Infra Commands",params:{allowPatterns:{type:"string[]",description:"gh pipeline command patterns to allow (e.g. specific scripted invocations); read-only gh subcommands like 'gh pr view' and 'gh run list' are not matched by this policy",default:[]}}},{name:"block-secrets-write",displayTitle:"Tried to write a secret-key file",impact:"Stops the agent from creating `.pem`, `id_rsa`, `credentials.json`, etc.",description:"Block writing secret key files",match:{events:["PreToolUse"],toolNames:["Write"]},defaultEnabled:!1,category:"Dangerous Commands",params:{additionalPatterns:{type:"string[]",description:"Additional filename patterns (substrings) to block",default:[]}}},{name:"block-push-master",displayTitle:"Tried to push directly to main/master",impact:"Direct pushes to a protected branch bypass review.",description:"Block pushing to main/master",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!0,category:"Git",params:{protectedBranches:{type:"string[]",description:"Branch names to protect from direct pushes",default:["main","master"]}}},{name:"block-force-push",displayTitle:"Tried to force-push",impact:"Force-pushes rewrite history and can clobber teammates' work.",description:"Prevent force-pushing to any branch",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git"},{name:"block-work-on-main",displayTitle:"Tried to commit or merge on main/master",impact:"Work should land via PR — direct commits skip review.",description:"Block git commits and merges on main/master branch",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git",params:{protectedBranches:{type:"string[]",description:"Branch names where commits/merges are blocked",default:["main","master"]}}},{name:"warn-git-amend",displayTitle:"Used git commit --amend",impact:"Amending after a push rewrites history that others may have pulled.",description:"Warns before amending git commits, which rewrites history",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git"},{name:"warn-git-stash-drop",displayTitle:"Tried to drop or clear git stash",impact:"Stash deletions are permanent and silent.",description:"Warns before permanently deleting stashed changes",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git"},{name:"warn-all-files-staged",displayTitle:"Staged all files with git add -A / .",impact:"Wide stages routinely catch generated files or secrets you didn't intend to commit.",description:"Warns before staging all working tree files with git add -A / . / --all",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Git"},{name:"warn-destructive-sql",displayTitle:"Ran destructive SQL (DROP / TRUNCATE / DELETE without WHERE)",impact:"Easy way to wipe a table by accident.",description:"Warn before executing destructive SQL (DROP/TRUNCATE/DELETE without WHERE) via database clients",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Database"},{name:"warn-schema-alteration",displayTitle:"Altered a database schema column",impact:"ALTER TABLE operations can lock tables and break readers.",description:"Warns before SQL schema changes (ALTER TABLE with column or rename operations)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Database"},{name:"warn-package-publish",displayTitle:"Tried to publish a package",impact:"Publishes are irreversible — `npm publish` / `cargo publish` shouldn't happen without intent.",description:"Warn before publishing packages to public registries (npm, PyPI, crates.io, RubyGems, etc.)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Packages & System"},{name:"warn-global-package-install",displayTitle:"Installed a package globally",impact:"`npm i -g`, `cargo install`, `pip --user` pollute your machine outside the project.",description:"Warns before installing packages globally (npm -g, cargo install, etc.)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Packages & System"},{name:"prefer-package-manager",displayTitle:"Used a non-preferred package manager",impact:"Mixing package managers creates lockfile churn for your team.",description:"Blocks non-preferred package managers and tells Claude to use an allowed one (e.g., uv instead of pip)",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Packages & System",params:{allowed:{type:"string[]",description:"Allowed package manager names (e.g. ['uv', 'bun']). Any detected manager not in this list is blocked.",default:[]},blocked:{type:"string[]",description:"Additional manager names to block beyond the built-in list (e.g. ['pdm', 'pipx']).",default:[]}}},{name:"warn-large-file-write",displayTitle:"Wrote a file larger than the configured threshold",impact:"Catches accidentally large file writes (logs, binaries, model dumps).",description:"Warn before writing files larger than 1MB (configurable via thresholdKb param)",match:{events:["PreToolUse"],toolNames:["Write"]},defaultEnabled:!1,category:"Packages & System",params:{thresholdKb:{type:"number",description:"File size threshold in KB above which a warning is issued",default:1024}}},{name:"warn-background-process",displayTitle:"Started a long-lived background process",impact:"Catches `nohup` / `&` / `screen` / `tmux` / `disown` patterns that the agent often forgets to clean up.",description:"Warns before starting detached or background processes",match:{events:["PreToolUse"],toolNames:["Bash"]},defaultEnabled:!1,category:"Packages & System"},{name:"warn-repeated-tool-calls",displayTitle:"Called the same tool 3+ times with identical arguments",impact:"Usually a sign of a stuck loop burning tokens.",description:"Warn when the same tool is called 3+ times with identical parameters",match:{events:["PreToolUse"]},defaultEnabled:!1,category:"AI Behavior"},{name:"require-commit-before-stop",displayTitle:"Stopped with uncommitted changes",impact:"Work not in a commit is invisible to teammates and easy to lose.",description:"Require all changes to be committed before Claude stops",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow"},{name:"require-push-before-stop",displayTitle:"Stopped with unpushed commits",impact:"Local-only commits won't trigger CI or be reviewable.",description:"Require all commits to be pushed to remote before Claude stops",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow",params:{remote:{type:"string",description:"Remote name to push to (default: origin)",default:"origin"},baseBranch:{type:"string",description:"Base branch to compare against (default: main)",default:"main"}}},{name:"require-pr-before-stop",displayTitle:"Stopped without a PR for the branch",impact:"Branches without PRs don't get reviewed.",description:"Require a pull request to exist for the current branch before Claude stops",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow",params:{baseBranch:{type:"string",description:"Base branch to compare against (default: main)",default:"main"}}},{name:"require-no-conflicts-before-stop",displayTitle:"Stopped with a branch that conflicts with main",impact:"Conflicting branches can't merge — surface them early.",description:"Require the current branch to merge cleanly with the base branch before Claude stops",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow",params:{baseBranch:{type:"string",description:"Base branch to check for conflicts against (default: main)",default:"main"}}},{name:"require-ci-green-before-stop",displayTitle:"Stopped with failing CI",impact:"Failing CI blocks deploy.",description:"Require CI checks to pass on the current HEAD commit before Claude stops (ignores stale runs on prior commits)",match:{events:["Stop"]},defaultEnabled:!1,category:"Workflow"}];function h(a){return a?{decision:"allow",reason:a}:{decision:"allow"}}function i(a){return{decision:"deny",reason:a}}function j(a){return{decision:"instruct",reason:a}}var k=a.i(10695);let l=function(a){let c=a.replaceAll("\\","/");for(let a of[".claude",".codex",".copilot",".cursor",".opencode",".pi",".gemini"]){let d=(0,b.join)((0,f.homedir)(),a).replaceAll("\\","/");if(c===d||c.startsWith(d+"/"))return!0}for(let a of[(0,b.join)(".config","opencode"),(0,b.join)(".local","share","opencode")]){let d=(0,b.join)((0,f.homedir)(),a).replaceAll("\\","/");if(c===d||c.startsWith(d+"/"))return!0}return!1},m=function(a){return!!(/[\\/]\.claude[\\/]settings(?:\.[^/\\]+)?\.json$/.test(a)||/[\\/]\.codex[\\/]hooks\.json$/.test(a)||/[\\/]\.copilot[\\/]hooks[\\/][^/\\]+\.json$/.test(a)||/[\\/]\.github[\\/]hooks[\\/][^/\\]+\.json$/.test(a)||/[\\/]\.cursor[\\/]hooks\.json$/.test(a)||/[\\/]\.opencode[\\/]opencode\.jsonc?$/.test(a)||/[\\/]\.opencode[\\/]plugins[\\/][^/\\]+\.(?:mjs|js|ts)$/.test(a)||/[\\/]\.config[\\/]opencode[\\/]opencode\.jsonc?$/.test(a)||/[\\/]\.config[\\/]opencode[\\/]config\.json$/.test(a)||/[\\/]\.config[\\/]opencode[\\/]plugins[\\/][^/\\]+\.(?:mjs|js|ts)$/.test(a)||/[\\/]\.pi[\\/](?:agent[\\/])?settings\.json$/.test(a)||/[\\/]\.pi[\\/](?:agent[\\/])?extensions[\\/]/.test(a)||/[\\/]\.gemini[\\/]settings\.json$/.test(a)||/[\\/]\.gemini[\\/]config[\\/]hooks\.json$/.test(a))};function n(a){return a.toolInput?.command??""}function o(a){return a.toolInput?.file_path??""}function p(a){return a.trim().split(/\s+/).map(a=>a.replace(/^['"]|['"]$/g,""))}let q=new Set(["&&","||","|",";"]),r=/[;&<>`$()\\]/,s=/eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}/,t=[[/sk-ant-[A-Za-z0-9\-_]{20,}/,"Anthropic API key"],[/sk-proj-[A-Za-z0-9\-_]{20,}/,"OpenAI project API key"],[/sk-[A-Za-z0-9]{20,}/,"OpenAI API key"],[/ghp_[A-Za-z0-9]{36}/,"GitHub personal access token"],[/github_pat_[A-Za-z0-9_]{82}/,"GitHub fine-grained token"],[/AKIA[A-Z0-9]{16}/,"AWS access key ID"],[/sk_live_[A-Za-z0-9]{24,}/,"Stripe live secret key"],[/sk_test_[A-Za-z0-9]{24,}/,"Stripe test secret key"],[/AIza[0-9A-Za-z\-_]{35}/,"Google API key"]],u=/(?:postgresql|postgres|mysql|mongodb(?:\+srv)?|redis|amqps?|smtps?):\/\/[^@\s]+@/,v=/-----BEGIN (?:[A-Z]+ )?PRIVATE KEY-----/,w=/Authorization:\s*Bearer\s+[A-Za-z0-9\-._~+/]{20,}/i;[...t];let x=/\b(?:psql|mysql|sqlite3|pgcli|clickhouse-client)\b/,y=/\b(?:DROP\s+(?:TABLE|DATABASE|SCHEMA)|TRUNCATE\b)/i,z=/\bDELETE\s+FROM\b/i,A=/\bWHERE\b/i,B=/\bALTER\s+TABLE\b[\s\S]*\b(?:DROP\s+COLUMN|ADD\s+COLUMN|RENAME\s+(?:COLUMN|TO)|MODIFY\s+COLUMN)\b/i,C=/(?:npm\s+publish|bun\s+publish|pnpm\s+publish|yarn\s+npm\s+publish|twine\s+upload|poetry\s+publish|cargo\s+publish|gem\s+push)\b/,D=/(?:^|\s|;|&&|\|\|)(?:env|printenv)(?:\s|$|;|&&|\|)/,E=/echo\s+.*\$\{?[A-Za-z_]/,F=/(?:^|\s|;|&&|\|\|)export\s+\w+/,G=/\$env:[A-Za-z_]/i,H=/(?:Get-ChildItem|dir|gci|ls)\s+Env:/i,I=/\[Environment\]::GetEnvironment/i,J=/echo\s+%[A-Za-z_]/i,K=/(?:^|[\\/])\.env(?:\.|$)/,L=/\.env(?:\b|\s|$|\.)/,M=/Start-Process\s+.*-Verb\s+RunAs/i,N=/(?:^|;|&&|\|\|)\s*runas\s/i,O=/(?:curl|wget)\s.*\|\s*(?:sh|bash|zsh|dash|ksh|csh|tcsh|fish|ash)\b/,P=/[;&|\n\r(){}`]+/,Q=new Set(["npx","bunx","pnpx","npm","pnpm","yarn","dlx","exec","run","eval","node","bun","deno","env","command","builtin","nohup","setsid","time","timeout","nice","stdbuf","xargs","sudo","doas","sh","bash","zsh","dash","ksh","fish","ash"]),R=/(?:^|\/)failproofai[^/]*$/,S=/failproofai\/(?:dist\/(?:cli|index)\.mjs|bin\/failproofai\.mjs)$/,T=/^(?:config|configure|setup)$/,U=/^--pause(?:=|$)/,V=/^[A-Za-z_][A-Za-z0-9_]*=/,W=/^\d+[a-z]*$/i;function X(a){let b=a.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g,"$$$1"),c=null,d=new Set;for(let[,a,c]of b.matchAll(/(?:^|[\s;&|])([A-Za-z_][A-Za-z0-9_]*)=("[^"]*"|'[^']*'|[^\s;&|]+)/g)){let b=c.replace(/^["']|["']$/g,"");(R.test(b)||S.test(b))&&d.add(a)}let e=a=>{let b=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(a);return!!b&&d.has(b[1])};for(let a of b.split(P)){let b=a.split(/\s+/).filter(Boolean),d=0;for(;d<b.length;){let a=b[d];if(!(V.test(a)||a.startsWith("-")||a.startsWith(">")||a.startsWith("<")||W.test(a)||Q.has(a.slice(a.lastIndexOf("/")+1))))break;d++}if(d>=b.length||!R.test(b[d])&&!S.test(b[d])&&!e(b[d]))continue;let f=b.slice(d+1),g=f.findIndex(a=>T.test(a));if(-1!==g&&f.slice(g+1).some(a=>U.test(a)))return"pause";c="cli"}return c}let Y=/(?:Invoke-WebRequest|iwr|Invoke-RestMethod|irm)\s+.*\|\s*(?:Invoke-Expression|iex)/i,Z=/^-[a-zA-Z]*f[a-zA-Z]*$/,$=["--force-with-lease","--force-if-includes"],_=/\.(?:pem|key)$/,aa=/id_rsa/,ab=/credentials/,ac=/git\s+(commit|merge|rebase|cherry-pick)\b/,ad=/\.failproofai(?:\/|\b)/,ae=new Set(["cat","bat","less","more","head","tail","nl","strings","xxd","od","jq","yq","diff","cmp","wc","sort","uniq","column","awk","cut","ls","dir","tree","stat","file","du","df","readlink","realpath","basename","dirname","pwd","test","find","grep","egrep","fgrep","rg","ag","ack","md5sum","sha1sum","sha256sum","shasum","cksum","cd","pushd","popd","cp","rsync","install","tee","sed","true","false",":","echo","printf","[","[[","]","]]","test","read","for","select","case","done","fi","esac"]),af=new Set(["do","then","else","elif","if","while","until","!"]),ag=/(?:^|[\s(])(?:while|until|for|select)\s/,ah=new Set(["cp","rsync","install"]),ai=new Set(["tee"]),aj=new Set(["uniq","xxd"]),ak={sort:["-o","--output"],tree:["-o","--output"],curl:["-o","--output","--output-dir","-D","--dump-header","--trace","--trace-ascii"]},al=new Set(["-fprint","-fprint0","-fprintf","-fls"]),am=new Set(["cat","bat","head","tail","nl","strings","xxd","od","jq","yq","wc","ls","stat","file","du","readlink","realpath","basename","dirname","grep","egrep","fgrep","rg","md5sum","sha1sum","sha256sum","shasum","cksum","echo","printf","true",":"]),an=new Set(["clean","rm","restore","checkout","reset","stash"]),ao=new Set(["-C","-c","--git-dir","--work-tree","--namespace","--exec-path"]),ap=new Set(["git","gh","glab","echo","printf","curl","code","open"]),aq=new Set(["-exec","-execdir","-ok","-okdir"]),ar=/\|\||&&|[;\n\r&]+/,as=/\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?/g,at=[".failproofai","~/.failproofai","$HOME/.failproofai","${HOME}/.failproofai","/root/.failproofai","/home/u/.failproofai","/Users/u/.failproofai"],au=[".config",".cache",".local",".git",".npm",".ssh",".bashrc","node_modules","dist","build","target","coverage","tmp","src","~/.config","~/.cache","$HOME/.config","${HOME}/.cache","/home/u/.config","/Users/u/.config","/root/.cache","/tmp/build","a","foo.txt","test-failures"];function av(a){if(!ax.test(a))return!1;for(let b of function(a){let b=[a];for(let c=0;c<24;c++){let c=[],d=!1;for(let a of b){let b=function(a){let b=a.indexOf("{");if(-1===b)return null;let c=0,d=[],e="";for(let f=b;f<a.length;f++){let g=a[f];if("{"===g){if(1==++c)continue}else if("}"===g){if(0==--c)return d.push(e),{start:b,end:f,alternatives:d}}else if(","===g&&1===c){d.push(e),e="";continue}e+=g}return null}(a);if(!b){c.push(a);continue}for(let e of(d=!0,b.alternatives))c.push(a.slice(0,b.start)+e+a.slice(b.end+1))}if(!d)return c;if(c.length>4096)return[aw(a)];b=c}return b.map(aw)}(a))if(function(a){if(ad.test(a))return!0;let b=a.split("/");for(let a=1;a<=b.length;a++)if(function(a){let b;if(!ax.test(a))return!1;let c="^"+function a(b){let c="";for(let d=0;d<b.length;d++){let e=function(b,c){let d=b[c];if(!"?*+@!".includes(d)||"("!==b[c+1])return null;let e=[],f="",g=0,h=c+1;for(;h<b.length;h++){let a=b[h];if("("===a){if(1==++g)continue}else if(")"===a){if(0==--g){e.push(f);break}}else if("|"===a&&1===g){e.push(f),f="";continue}f+=a}if(h>=b.length)return null;if("!"===d)return{source:"[^/]*",end:h};let i=e.map(b=>a(b)).join("|");return{source:`(?:${i})${"?"===d?"?":"*"===d?"*":"+"===d?"+":""}`,end:h}}(b,d);if(e){c+=e.source,d=e.end;continue}let f=b[d];if("*"===f)c+="[^/]*";else if("?"===f)c+="[^/]";else if("["===f){let a=function(a,b){let c=b+1,d=!1;("!"===a[c]||"^"===a[c])&&(d=!0,c++);let e="";for("]"===a[c]&&(e+="]",c++);c<a.length&&"]"!==a[c];){let b="["===a[c]?a[c+1]:void 0;if(":"===b||"."===b||"="===b){let d=a.indexOf(`${b}]`,c+2);if(-1!==d){e+=a.slice(c,d+2),c=d+2;continue}}e+=a[c],c++}if(c>=a.length)return null;if(/\[[.=:]/.test(e))return{source:"[^/]",end:c};let f=e.replace(/[\\\]]/g,"\\$&");return 0===f.length?{source:"[^/]",end:c}:{source:`[${d?"^":""}${f}]`,end:c}}(b,d);if(!a){c+="\\[";continue}c+=a.source,d=a.end}else c+=f.replace(/[.+^${}()|\\\]]/g,"\\$&")}return c}(a);try{b=RegExp(c+"$")}catch{return!1}return!!at.some(a=>b.test(a))&&!au.some(a=>b.test(a))}(b.slice(0,a).join("/")))return!0;return!1}(b))return!0;return!1}function aw(a){let b="",c=0;for(let d of a){if("{"===d){0===c&&(b+="*"),c++;continue}if("}"===d){c>0&&c--;continue}0===c&&(b+=d)}return b}let ax=/[*?[{]|[@+!]\(/;function ay(a){let b=[];for(let c=0;c<a.length;c++){if("`"===a[c]){let d=a.indexOf("`",c+1);if(-1===d)break;b.push(a.slice(c+1,d)),c=d;continue}if("$"!==a[c]||"("!==a[c+1])continue;let d=1,e=c+2;for(;e<a.length&&d>0;e++)"("===a[e]?d++:")"===a[e]&&d--;0===d&&b.push(a.slice(c+2,e-1)),c=e-1}return b}let az=/\d*>{1,2}\|?\s*("[^"]*"|'[^']*'|[^\s;&|<>]+)/g;function aA(a){return a.replace(/^[(){}'"]+|[(){}'"]+$/g,"")}function aB(a){let b=aA(a);return b.slice(b.lastIndexOf("/")+1)}function aC(a,b=0){if(0===b){let b=ay(a);for(let a=0;a<b.length&&a<64;a++){if(aC(b[a],1))return!0;b.push(...ay(b[a]))}}let c=[...a.matchAll(/(?:^|[\s;&|(])(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=("[^"]*"|'[^']*'|[^\s;&|)]+)/g)].map(([,a,b])=>[a,b.replace(/^["']|["']$/g,"")]),d=new Set;for(let a=0;a<c.length+1;a++){let a=d.size;for(let[a,b]of c)(ad.test(b)||[...b.matchAll(as)].some(([,a])=>d.has(a)))&&d.add(a);if(d.size===a)break}let e=a=>{if(ad.test(a))return!0;for(let[,b]of a.matchAll(as))if(d.has(b))return!0;return a.split(/\s+/).some(a=>{var b;let c;return c=(b=a.replace(/^['"]+|['"]+$/g,"")).replace(/^[()]+|[()]+$/g,""),av(b)||c!==b&&av(c)})},f=!1,g=0,h=null,i=!1;for(let b of a.split(ar)){if(!b.trim())continue;let a=b.split("|"),c=e(b)||f||i;if(c&&ag.test(b)&&(i=!0),/(?:^|\s)done(?:\s|$)/.test(b)&&(i=!1),c){for(let[,a]of b.matchAll(az))if(e(a.replace(/^["']|["']$/g,"")))return!0}for(let b of a){g+=(b.match(/\(/g)??[]).length;let a=function(a){let b=a.trim().split(/\s+/).map(aA).filter(Boolean),c=0;for(;c<b.length;){let a=b[c];if(/^\d*(?:>{1,2}\|?|<{1,3})/.test(a)){c+=/^\d*(?:>{1,2}\|?|<{1,3})$/.test(a)?2:1;continue}if(!(V.test(a)||a.startsWith("-")||W.test(a)||af.has(a)||Q.has(aB(a))))break;c++}return b.slice(c)}(b),d=a.length>0?aB(a[0]):"";if("cd"===d||"pushd"===d){let b=a.slice(1).find(a=>!a.startsWith("-"));h=(f=void 0!==b&&e(b))?g:null}else if("popd"===d)f=!1,h=null;else if(c&&a.length>0&&function(a,b){if(0===a.length)return!1;let c=aB(a[0]),d=a.slice(1);if("find"===c)return!!(d.some(a=>"-delete"===a)||d.some(a=>al.has(a)))||d.some((a,b)=>aq.has(a)&&!am.has(aB(d[b+1]??"")));if("sed"===c)return!!d.some(a=>a.startsWith("-i")||a.startsWith("--in-place"))||d.some((a,c)=>/(?:^|[;}/\s])w$/.test(a)&&b(d[c+1]??""))||d.some(a=>/(?:^|[;}/\s])w\s*\S*\.failproofai/.test(a));if("awk"===c||"gawk"===c||"mawk"===c)return d.some(a=>/system\s*\(|\|\s*["']|\|&/.test(a));if(ah.has(c)){if(d.includes("--remove-source-files")&&d.some(a=>b(a)))return!0;let a=d.findIndex(a=>"-t"===a||"--target-directory"===a);if(-1!==a&&b(d[a+1]??"")||d.some(a=>a.startsWith("--target-directory=")&&b(a)))return!0;let c=d.filter(a=>!a.startsWith("-")),e=c[c.length-1];return void 0!==e&&b(e)}if(ai.has(c))return d.some(a=>!a.startsWith("-")&&b(a));if(aj.has(c)){let a=d.filter(a=>!a.startsWith("-"));return a.length>1&&b(a[a.length-1])}if("git"===c){let a=function(a){for(let b=0;b<a.length;b++){let c=a[b];if(ao.has(c)){b++;continue}if(!c.startsWith("-"))return c}}(d);return void 0!==a&&an.has(a)}return!!function(a,b,c){let d=ak[a];if(!d)return!1;for(let a=0;a<b.length;a++){let e=b[a];if(d.find(a=>a.startsWith("--")&&e.startsWith(`${a}=`))&&c(e))return!0;let f=/^-[A-Za-z]*[oD]$/.test(e)&&d.includes(`-${e[e.length-1]}`);if((d.includes(e)||f)&&c(b[a+1]??""))return!0}return!1}(c,d,b)||!(ae.has(c)||ap.has(c))}(a,e))return!0;g-=(b.match(/\)/g)??[]).length,null!==h&&g<h&&(f=!1,h=null)}}return!1}let aD=/(?:npm\s+(?:uninstall|remove|un|r)\s.*failproofai|bun\s+remove\s.*failproofai|yarn\s+global\s+remove\s+failproofai|pnpm\s+(?:remove|uninstall|un)\s.*failproofai)/,aE=/\bgit\s+commit\b.*--amend\b/,aF=/\bgit\s+stash\s+(?:drop|clear)\b/,aG=/\bgit\s+add\s+(?:-A\b|--all\b|\.(?:\s|$|;|&&|\|\|))/,aH=/\bnpm\s+(?:install|i)\b(?=.*(?:\s-g\b|--global\b))/,aI=/\byarn\s+global\s+add\b/,aJ=/\bpnpm\s+(?:add|install|i)\b(?=.*(?:\s-g\b|--global\b))/,aK=/\bbun\s+(?:install|add)\b(?=.*(?:\s-g\b|--global\b))/,aL=/\bcargo\s+install\b/,aM=/\bpip(?:3)?\s+install\b(?=.*(?:--user\b|--break-system-packages\b))/,aN={pip:[/\bpip\b/,/\bpip3\b/,/\bpython3?\s+-m\s+pip\b/],npm:[/\bnpm\b/,/\bnpx\b/],yarn:[/\byarn\b/],pnpm:[/\bpnpm\b/,/\bpnpx\b/],bun:[/\bbun\b/,/\bbunx\b/],uv:[/\buv\b/],poetry:[/\bpoetry\b/],pipenv:[/\bpipenv\b/],conda:[/\bconda\b/],cargo:[/\bcargo\b/]},aO=/\bnohup\s+\S/,aP=/\bscreen\s+-[A-Za-z]*d[A-Za-z]*\b/,aQ=/\btmux\s+(?:new-session|new)\b[^|&;]*-d\b/,aR=/\bdisown\b/,aS=/(?<![&|])\s?&\s*(?:$|#|;)/,aT=/(?:^|[;\n]|&&|\|\|?|&)\s*kubectl(?:\s|$)/,aU=/(?:^|[;\n]|&&|\|\|?|&)\s*(?:terraform|tofu)(?:\s|$)/,aV=/(?:^|[;\n]|&&|\|\|?|&)\s*aws(?:\s|$)/,aW=/(?:^|[;\n]|&&|\|\|?|&)\s*gcloud(?:\s|$)/,aX=/(?:^|[;\n]|&&|\|\|?|&)\s*az(?:\s|$)/,aY=/(?:^|[;\n]|&&|\|\|?|&)\s*helm(?:\s|$)/,aZ=/(?:^|[;\n]|&&|\|\|?|&)\s*gh\s+(?:workflow\s+(?:run|enable|disable)|run\s+(?:rerun|cancel)|pr\s+merge|release\s+(?:create|delete)|cache\s+delete|secret\s+(?:set|delete))\b/,a$=new Map;function a_(a){try{let d=function(a){try{return(0,c.statSync)((0,b.join)(a,".git","HEAD")).mtimeMs}catch{return null}}(a),f=a$.get(a);if(f&&null!==d&&f.headMtimeMs===d)return f.branch||null;let g=(0,e.execSync)("git rev-parse --abbrev-ref HEAD",{cwd:a,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}).trim();return null!==d&&(a$.size>=500&&a$.clear(),a$.set(a,{branch:g,headMtimeMs:d})),g||null}catch{return null}}function a0(a,b){let c=p(a),d=p(b);return!(c.length<d.length||c.some(a=>q.has(a))||c.some(a=>r.test(a)))&&d.every((a,b)=>"*"===a||a===c[b])}let a1=/^-{1,2}c$/;function a2(a){return a.split(/&&|\|\||[|;\n]/).map(a=>a.trim()).filter(a=>/^git\s+push\s/.test(a)).map(a=>a.replace(/^git\s+push\s+/,""))}let a3=/^(?:~[A-Za-z0-9_.-]*|\$HOME|\$\{HOME\})(?=$|\/)/,a4=/^(?:\/\S*\/)?rm$/,a5=/^(?:\/\S*\/)?find$/,a6=/^-(?:exec|execdir|ok|okdir)$/,a7=/^-(?:[HLP]|D|O\d*)$/,a8=/^(?:-|\\?[(!])/,a9=["/tmp","/var/tmp"];function ba(a){let b=a.match(/^(?:~|\$HOME|\$\{HOME\})(?=$|\/)/);return b?(0,f.homedir)()+a.slice(b[0].length):a}function bb(a){return a.replace(/\/\*$/,"").replace(/\/+$/,"")}function bc(a){let b=a.replace(/^['"]|['"]$/g,"");if(""===b)return!1;let c=b.match(a3);if(!c&&/^[$`]/.test(b))return!0;let d=c?b.slice(c[0].length):b.startsWith("/")?b:null;if(null===d)return!1;let e=bb(d).split("/").filter(Boolean);return!(!c&&a9.some(a=>`/${e.join("/")}`.startsWith(`${a}/`)))&&e.length<=2}function bd(a){let b=p(a),c=b.findIndex(a=>a5.test(a));if(c>=0){let a=b.slice(c+1),d=a.findIndex(a=>a6.test(a));if(a.includes("-delete")||d>=0&&a4.test(a[d+1]??"")){let b=0;for(;b<a.length&&a7.test(a[b]);)b+="-D"===a[b]?2:1;let c=a.slice(b),d=c.findIndex(a=>a8.test(a));return d<0?c:c.slice(0,d)}}let d=b.findIndex(a=>a4.test(a));if(d>=0){let a=b.slice(d+1),c=a.filter(a=>/^-[^-]/.test(a)).join(""),e=a.filter(a=>/^--/.test(a)),f=/r/i.test(c)||e.some(a=>/^--recursive$/i.test(a)),g=/f/.test(c)||e.some(a=>/^--force$/i.test(a));if(f&&g)return a.filter(a=>!a.startsWith("-"))}return null}function be(a){return a.split(/&&|\|\||[|;\n]/).map(a=>a.trim()).filter(a=>""!==a)}let bf=/(?:^|;|&&|\|\||\|)\s*(?:ls|find|cat|head|tail|less|more|wc|file|stat|tree|du)\s/;function bg(a,b,c){if("Bash"!==a.toolName)return h();let d=n(a);return!b.test(d)||(a.params?.allowPatterns??[]).some(a=>a0(d,a))?h():i(c)}let bh=/\s*(?:&&|\|\||\||;)\s*/;function bi(a){return a.session?.permissionMode==="plan"}let bj={"sanitize-jwt":function(a){let b=JSON.stringify(a.payload);return s.test(b)?{decision:"deny",reason:"JWT token detected in tool output",message:"[REDACTED: JWT token removed by failproofai]"}:h()},"sanitize-api-keys":function(a){let b=JSON.stringify(a.payload);for(let[a,c]of t)if(a.test(b))return{decision:"deny",reason:`${c} detected in tool output`,message:`[REDACTED: ${c} removed by failproofai]`};for(let{regex:c,label:d}of a.params?.additionalPatterns??[])try{if(new RegExp(c).test(b))return{decision:"deny",reason:`${d} detected in tool output`,message:`[REDACTED: ${d} removed by failproofai]`}}catch{(0,k.hookLogWarn)(`additionalPatterns: invalid regex "${c}", skipping`)}return h()},"sanitize-connection-strings":function(a){let b=JSON.stringify(a.payload);return u.test(b)?{decision:"deny",reason:"Database connection string with credentials detected in tool output",message:"[REDACTED: connection string removed by failproofai]"}:h()},"sanitize-private-key-content":function(a){let b=JSON.stringify(a.payload);return v.test(b)?{decision:"deny",reason:"Private key content detected in tool output",message:"[REDACTED: private key content removed by failproofai]"}:h()},"sanitize-bearer-tokens":function(a){let b=JSON.stringify(a.payload);return w.test(b)?{decision:"deny",reason:"Bearer token detected in tool output",message:"[REDACTED: Bearer token removed by failproofai]"}:h()},"protect-env-vars":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return D.test(b)?i("Command reads environment variables"):E.test(b)?i("Command echoes environment variable"):F.test(b)?i("Command exports environment variable"):G.test(b)?i("Command reads environment variable via PowerShell"):H.test(b)?i("Command reads environment variables via PowerShell"):I.test(b)?i("Command reads environment variable via .NET"):J.test(b)?i("Command echoes environment variable via cmd"):h()},"block-env-files":function(a){let b=n(a),c=o(a);return c&&K.test(c)?i("Access to .env file blocked"):"Bash"===a.toolName&&L.test(b)?i("Command references .env file"):h()},"block-read-outside-cwd":function(a){let c=process.env.CLAUDE_PROJECT_DIR||a.session?.cwd;if(!c)return h();let d=a.params?.allowPaths??[];if("Bash"===a.toolName){let e=n(a);if(!bf.test(e))return h();let g=function(a){let c,d=[],e=/(?<![a-zA-Z0-9_.\-~\\*?:=])(?:~\/[^\s;|&"'()\[\]{}]*|~(?=\s|$|[;|&"'()\[\]{}])|\/[^\s;|&"'()\[\]{}]*)/g;function g(a){let c;for(e.lastIndex=0;null!==(c=e.exec(a));){let a=c[0];"~"===a?a=(0,f.homedir)():a.startsWith("~/")&&(a=(0,b.join)((0,f.homedir)(),a.slice(2))),d.push(a)}}let h=a.length,i=!1,j=!1;for(let b=0;b<a.length;b++){let c=a[b];if('"'!==c||j)if("'"!==c||i){if("|"===c&&!i&&!j){h=b;break}}else j=!j;else i=!i}let k=a.slice(0,h),l=/"([^"]*)"|'([^']*)'/g;for(;null!==(c=l.exec(k));){let a=c[1]??c[2]??"";/[*?\[\]^$+()\\]/.test(a)||g(a)}return g(a.replace(/"[^"]*"/g,a=>" ".repeat(a.length)).replace(/'[^']*'/g,a=>" ".repeat(a.length))),d}(e),j=c.endsWith("/")?c:c+"/";for(let a of g){let e=(0,b.resolve)(c,a);if(m(e))return i(`Reading agent settings file blocked: ${e}`);if(!l(e)&&"/dev/null"!==e&&e!==c&&!e.startsWith(j)){if(d.some(a=>e===a||e.startsWith(a.endsWith("/")?a:a+"/")))continue;return i(`Bash read outside project directory blocked: ${e}`)}}return h()}let e=o(a),g=a.toolInput?.path??"",j=e||g;if(!j)return h();let k=(0,b.resolve)(c,j);if(m(k))return i(`Reading agent settings file blocked: ${k}`);if(l(k)||"/dev/null"===k)return h();let p=c.endsWith("/")?c:c+"/";return k===c||k.startsWith(p)?h():d.some(a=>k===a||k.startsWith(a.endsWith("/")?a:a+"/"))?h():i(`Access outside project directory blocked: ${k}`)},"block-sudo":function(a){if("Bash"!==a.toolName)return h();let b=n(a).trimStart();return function a(b,c=0){for(let d of function(a){let b=[],c=[],d="",e=null,f=()=>{d&&c.push(d),d=""},g=()=>{f(),c.length&&b.push(c),c=[]};for(let b=0;b<a.length;b++){let c=a[b];if(e){if("\\"===c&&'"'===e&&b+1<a.length){d+=a[++b];continue}if(c===e){e=null;continue}d+=c;continue}if("\\"===c&&b+1<a.length){d+=a[++b];continue}if('"'===c||"'"===c){e=c;continue}if(/\s/.test(c)){f();continue}if(/[;&|\n\r(){}`]/.test(c)){g();continue}d+=c}return g(),b}(b)){let b=0;for(;b<d.length;){let e=d[b],f=e.slice(e.lastIndexOf("/")+1);if("sudo"===f||"doas"===f)return!0;if(!(V.test(e)||e.startsWith("-")||e.startsWith(">")||e.startsWith("<")||W.test(e)||Q.has(f)))break;if(a1.test(e)&&c<3&&b+1<d.length&&a(d[b+1],c+1))return!0;b++}}return!1}(b)?(a.params?.allowPatterns??[]).some(a=>a0(b,a))?h():i("sudo commands are blocked"):M.test(b)?i("Elevated process launch is blocked"):N.test(b)?i("runas elevation is blocked"):h()},"block-curl-pipe-sh":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return O.test(b)?i("Piping downloads to shell is blocked"):Y.test(b)?i("Piping downloads to Invoke-Expression is blocked"):h()},"block-rm-rf":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return be(b).some(a=>{let b=bd(a);return null!==b&&b.some(bc)})?!function(a,b){if(0===b.length)return!1;let c=b.map(a=>bb(ba(a))||"/"),d=!1;for(let e of be(a)){let a=bd(e);if(null!==a)for(let f of(d=!0,a)){let a=bb(ba(f))||"/";if(!c.some(b=>a===b||a.startsWith(b+"/"))&&!b.some(a=>{let b=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return RegExp(`${b}(?:[/"'\\s/*]|$)`).test(e)}))return!1}}return d}(b,a.params?.allowPaths??[])?i("Catastrophic deletion blocked"):h():/Remove-Item\s+.*-Recurse.*-Force.*(?:[A-Z]:\\(?:\s|$)|\\\*)/i.test(b)||/(?:rd|rmdir)\s+\/s\s+\/q\s+[A-Z]:\\/i.test(b)?i("Catastrophic deletion blocked"):h()},"block-failproofai-commands":function(a){if("Write"===a.toolName||"Edit"===a.toolName||"NotebookEdit"===a.toolName){let b=o(a)||(a.toolInput?.notebook_path??"");return ad.test(b)?i("Writing to failproofai's own state would switch enforcement off. If a policy is blocking legitimate work, say so and let the operator decide."):h()}if("Bash"!==a.toolName)return h();let b=n(a),c=b.replace(/\\\r?\n/g,"").replace(/\$'((?:[^'\\]|\\.)*)'/g,(a,b)=>b.replace(/\\(x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{1,4}|U[0-9A-Fa-f]{1,8}|[0-7]{1,3}|.)/g,(a,b)=>{try{if("x"===b[0])return String.fromCharCode(parseInt(b.slice(1),16));if("u"===b[0]||"U"===b[0])return String.fromCodePoint(parseInt(b.slice(1),16));if(/^[0-7]+$/.test(b))return String.fromCharCode(parseInt(b,8))}catch{return b}return({a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:" ",v:"\v","\\":"\\","'":"'",'"':'"',"?":"?"})[b]??b})).replace(/\\(.)/g,"$1").replace(/['"]/g,""),d=X(b)??X(c);return"pause"===d?i("Pausing failproofai enforcement is a human action, not an agent one. If a policy is blocking legitimate work, say so and let the operator decide."):"cli"===d?i("Running failproofai CLI commands is blocked"):aD.test(b)||aD.test(c)?i("Uninstalling failproofai is blocked"):aC(b)||aC(c)?i("Deleting, moving or overwriting failproofai's own state would switch enforcement off. If a policy is blocking legitimate work, say so and let the operator decide."):h()},"block-kubectl":function(a){return bg(a,aT,"kubectl commands are blocked")},"block-terraform":function(a){return bg(a,aU,"terraform/tofu commands are blocked")},"block-aws-cli":function(a){return bg(a,aV,"aws CLI commands are blocked")},"block-gcloud":function(a){return bg(a,aW,"gcloud commands are blocked")},"block-az-cli":function(a){return bg(a,aX,"az (Azure) CLI commands are blocked")},"block-helm":function(a){return bg(a,aY,"helm commands are blocked")},"block-gh-pipeline":function(a){return bg(a,aZ,"gh pipeline-trigger commands are blocked")},"block-secrets-write":function(a){if("Write"!==a.toolName)return h();let b=o(a);if(_.test(b)||aa.test(b)||ab.test(b))return i("Writing secret key files is blocked");for(let c of a.params?.additionalPatterns??[])if(b.includes(c))return i(`Writing blocked file pattern: ${c}`);return h()},"block-push-master":function(a){if("Bash"!==a.toolName)return h();let b=a.params?.protectedBranches??["main","master"];if(0===b.length)return h();let c=a2(n(a)),d=RegExp(`\\b(?:${b.map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`);return c.some(a=>d.test(a))?i(`Pushing to ${b.join("/")} is blocked`):h()},"block-force-push":function(a){if("Bash"!==a.toolName)return h();for(let b of a2(n(a))){let a=!1;for(let c of b.split(/\s+/)){if("--"===c){a=!0;continue}if(!a&&function(a){return"--force"===a||!$.some(b=>a.startsWith(b))&&(!!a.startsWith("--force")||Z.test(a))}(c))return i("Force-pushing is blocked")}}return h()},"block-work-on-main":function(a){if("Bash"!==a.toolName)return h();let b=n(a).match(ac);if(!b)return h();let c=a.session?.cwd;if(!c)return h();let d=a_(c);return d&&(a.params?.protectedBranches??["main","master"]).includes(d)?i(`Git ${b[1]} on ${d} is blocked. Create a feature branch first.`):h()},"warn-git-amend":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aE.test(b)?j("STOP: This command amends the last commit, which rewrites git history. If this commit has already been pushed to a shared branch, this will cause divergence for other contributors. Confirm with the user before executing."):h()},"warn-git-stash-drop":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aF.test(b)?j("STOP: This command permanently deletes stashed changes (git stash drop/clear). Stash entries cannot be recovered after deletion. Confirm with the user before executing."):h()},"warn-all-files-staged":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aG.test(b)?j("STOP: This command stages all files in the working tree (git add -A / --all / .). This may inadvertently include build artifacts, generated files, or sensitive files not covered by .gitignore. Confirm with the user before executing."):h()},"warn-destructive-sql":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return x.test(b)&&(y.test(b)||z.test(b)&&!A.test(b))?j("STOP: This command contains destructive SQL (DROP/TRUNCATE/DELETE). Confirm with the user before executing."):h()},"warn-schema-alteration":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return x.test(b)&&B.test(b)?j("STOP: This command contains a schema-altering SQL statement (ALTER TABLE with column or rename operation). Schema changes on production databases are irreversible or disruptive. Confirm with the user before executing."):h()},"warn-package-publish":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return C.test(b)?j("STOP: This command publishes a package to a public registry. Confirm with the user that this is intentional."):h()},"warn-global-package-install":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aH.test(b)||aI.test(b)||aJ.test(b)||aK.test(b)||aL.test(b)||aM.test(b)?j("STOP: This command installs a package globally, which modifies the system-wide environment outside the project. This can conflict with other projects or system tools. Confirm with the user before executing."):h()},"prefer-package-manager":function(a){if("Bash"!==a.toolName)return h();let b=n(a);if(!b)return h();let c=a.params?.allowed??[];if(0===c.length)return h();let d=new Set(c.map(a=>a.toLowerCase())),e=a.params?.blocked??[],f=c.join(", ");for(let a of b.split(bh)){let b=a.trim();if(!b)continue;let c=!1;for(let a of d){let d=aN[a];if(d){for(let a of d)if(a.test(b)){c=!0;break}if(c)break}}if(!c){for(let[a,c]of Object.entries(aN))if(!d.has(a)){for(let d of c)if(d.test(b))return i(`"${a}" is not an allowed package manager. Allowed package managers for this project: ${f}. Rewrite this command using an allowed package manager.`)}for(let a of e){let c=a.toLowerCase();if(!d.has(c)&&RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(b))return i(`"${c}" is not an allowed package manager. Allowed package managers for this project: ${f}. Rewrite this command using an allowed package manager.`)}}}return h()},"warn-large-file-write":function(a){if("Write"!==a.toolName)return h();let b=a.toolInput?.content;if("string"!=typeof b)return h();let c=a.params?.thresholdKb??1024;return b.length>1024*c?j(`STOP: You are writing a file larger than ${c}KB (${Math.round(b.length/1024)}KB). This is unusually large. Confirm this is intentional before proceeding.`):h()},"warn-background-process":function(a){if("Bash"!==a.toolName)return h();let b=n(a);return aO.test(b)||aP.test(b)||aQ.test(b)||aR.test(b)||aS.test(b)?j("STOP: This command starts a background or detached process (nohup, screen -d, tmux -d, or trailing &). Background processes persist after Claude's session and may be difficult to track or stop. Confirm with the user before executing."):h()},"warn-repeated-tool-calls":async function a(a){let b=a.session?.transcriptPath;if(!b||!a.toolName||!a.toolInput)return h();let c=`${b}.tool-calls.json`,e=JSON.stringify({tool:a.toolName,input:a.toolInput}),f={};try{let a=await (0,d.readFile)(c,"utf8");f=JSON.parse(a)}catch{}let g=f[e]??0;if(g>=3)return j(`STOP: You have already called ${a.toolName} ${g} times with identical parameters. This is wasteful and unproductive. Do NOT repeat this call — use a different approach or ask the user for clarification.`);f[e]=g+1;try{let a=JSON.stringify(f);a.length<=65536&&await (0,d.writeFile)(c,a,"utf8")}catch{}return h()},"require-commit-before-stop":function(a){if(bi(a))return h("Plan mode — no changes made, skipping commit check.");let b=a.session?.cwd;if(!b)return h("No working directory available, skipping commit check.");try{if((0,e.execSync)("git status --porcelain",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim().length>0)return i("You have uncommitted changes in the working directory. Commit all changes now.");return h("All changes are committed.")}catch{return h("Not a git repository, skipping commit check.")}},"require-push-before-stop":function(a){if(bi(a))return h("Plan mode — no changes made, skipping push check.");let b=a.session?.cwd;if(!b)return h("No working directory available, skipping push check.");try{if(!(0,e.execSync)("git remote",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}).trim())return h("No git remote configured, skipping push check.");let c=a.params?.remote??"origin",d=a_(b);if(!d||"HEAD"===d)return h("Detached HEAD, skipping push check.");let f=a.params?.baseBranch??"main";if(d===f)return h(`On base branch "${f}", skipping push check.`);try{if(!(0,e.execFileSync)("git",["log",`${c}/${f}..HEAD`,"--oneline"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim())return h(`No commits ahead of ${c}/${f}, skipping push check.`);if(!(0,e.execFileSync)("git",["diff","--stat",`${c}/${f}`,"HEAD"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim())return h(`No file changes compared to ${c}/${f}, skipping push check.`)}catch{}let g=!1;try{(0,e.execFileSync)("git",["rev-parse","--verify",`${c}/${d}`],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}),g=!0}catch{}if(!g)return i(`Branch "${d}" has not been pushed to remote "${c}". Run now: git push -u ${c} ${d}`);let j=(0,e.execFileSync)("git",["log",`${c}/${d}..HEAD`,"--oneline"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim();if(j.length>0){let a=j.split("\n").length;return i(`You have ${a} unpushed commit${a>1?"s":""} on branch "${d}". Run now: git push`)}return h(`All commits pushed to "${c}".`)}catch{return h("Could not check push status, skipping.")}},"require-pr-before-stop":function(a){if(bi(a))return h("Plan mode — no changes made, skipping PR check.");let b=a.session?.cwd;if(!b)return h("No working directory available, skipping PR check.");try{let c;try{(0,e.execSync)("gh --version",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3})}catch{return h("GitHub CLI (gh) not installed, skipping PR check.")}let d=a_(b);if(!d||"HEAD"===d)return h("Detached HEAD, skipping PR check.");let f=a.params?.baseBranch??"main";if(d===f)return h(`On base branch "${f}", skipping PR check.`);try{if(!(0,e.execFileSync)("git",["log",`origin/${f}..HEAD`,"--oneline"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim())return h(`No commits ahead of origin/${f}, skipping PR check.`);if(!(0,e.execFileSync)("git",["diff","--stat",`origin/${f}`,"HEAD"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim())return h(`No file changes compared to origin/${f}, skipping PR check.`)}catch{}try{c=(0,e.execSync)("gh pr view --json number,url,state",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim()}catch{return i(`No pull request found for branch "${d}". Run now: gh pr create`)}let g=JSON.parse(c);if("OPEN"===g.state)return h(`PR #${g.number} exists: ${g.url}`);if("MERGED"===g.state)return h(`PR #${g.number} was merged: ${g.url}. Switch off this branch (e.g. 'git checkout ${f} && git pull') before stopping again.`);return i(`Pull request for branch "${d}" is ${g.state.toLowerCase()}. Run now: gh pr create`)}catch{return h("Could not check PR status, skipping.")}},"require-no-conflicts-before-stop":function(a){let b,c;if(bi(a))return h("Plan mode — no changes made, skipping conflict check.");let d=a.session?.cwd;if(!d)return h("No working directory available, skipping conflict check.");let f=a_(d);if(!f||"HEAD"===f)return h("Detached HEAD, skipping conflict check.");let g=a.params?.baseBranch??"main";if(f===g)return h(`On base branch "${g}", skipping conflict check.`);try{(0,e.execSync)("gh --version",{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3})}catch{return h("gh CLI not installed, skipping conflict check.")}try{b=(0,e.execSync)("gh pr view --json mergeable,number,url,state",{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim()}catch{return h("No pull request found for branch, skipping conflict check.")}try{c=JSON.parse(b)}catch{return h("Could not parse gh pr view output, skipping conflict check.")}if("OPEN"!==c.state)return h(`PR #${c.number} is ${c.state.toLowerCase()}; skipping conflict check.`);try{(0,e.execFileSync)("git",["rev-parse","--verify",`origin/${g}`],{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}),(0,e.execFileSync)("git",["log",`origin/${g}..HEAD`,"--oneline"],{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:5e3}).trim()&&(0,e.execFileSync)("git",["merge-tree","--write-tree","--name-only",`origin/${g}`,"HEAD"],{cwd:d,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:1e4})}catch(a){if(1===a.status){let b=("string"==typeof a.stdout?a.stdout:a.stdout?.toString("utf8")??"").trim().split("\n"),c=[];for(let a=1;a<b.length;a++){let d=b[a];if(""===d)break;c.push(d)}let d=c.length?c.join(", "):"one or more files";return i(`Branch "${f}" has merge conflicts with ${g} in: ${d}. Rebase or merge origin/${g} now and resolve the conflicts.`)}}return"CONFLICTING"===c.mergeable?i(`PR #${c.number} has merge conflicts per GitHub (${c.url}). Rebase or merge origin/${g} now and resolve the conflicts.`):"UNKNOWN"===c.mergeable?i(`GitHub is still computing mergeability for PR #${c.number} (${c.url}). Wait ~10 seconds, then re-check with \`gh pr view --json mergeable\` before attempting to stop again.`):h(`PR #${c.number} merges cleanly per GitHub.`)},"require-ci-green-before-stop":function(a){if(bi(a))return h("Plan mode — no changes made, skipping CI check.");let b=a.session?.cwd;if(!b)return h("No working directory available, skipping CI check.");try{try{(0,e.execSync)("gh --version",{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3})}catch{return h("GitHub CLI (gh) not installed, skipping CI check.")}let a=a_(b);if(!a||"HEAD"===a)return h("Detached HEAD, skipping CI check.");let c=function(a){try{return(0,e.execSync)("git rev-parse HEAD",{cwd:a,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:3e3}).trim()||null}catch{return null}}(b),d=[];try{let f=(0,e.execFileSync)("gh",["run","list","--branch",a,"--limit","20","--json","status,conclusion,name,headSha"],{cwd:b,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim();if(f&&"[]"!==f){let a=JSON.parse(f),b=c?a.filter(a=>a.headSha===c):a,e=new Set;d=b.filter(a=>!e.has(a.name)&&(e.add(a.name),!0))}}catch{}let f=[],g=[];c&&(f=function(a,b){try{let c=(0,e.execFileSync)("gh",["api",`repos/{owner}/{repo}/commits/${b}/check-runs`,"--jq",'.check_runs | map(select(.app.slug != "github-actions")) | map({name: .name, status: .status, conclusion: (.conclusion // "")})'],{cwd:a,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim();if(!c||"[]"===c)return[];return JSON.parse(c)}catch{return[]}}(b,c),g=function(a,b){try{let c=(0,e.execFileSync)("gh",["api",`repos/{owner}/{repo}/commits/${b}/statuses`,"--jq","map({name: .context, state: .state}) | unique_by(.name)"],{cwd:a,encoding:"utf8",stdio:["pipe","pipe","pipe"],timeout:15e3}).trim();if(!c||"[]"===c)return[];return JSON.parse(c).map(a=>({name:a.name,status:"pending"===a.state?"in_progress":"completed",conclusion:"pending"===a.state?"":"success"===a.state?"success":"failure"}))}catch{return[]}}(b,c));let j=[...d,...f,...g];if(0===j.length)return h(`No CI runs found for branch "${a}".`);let k=j.filter(a=>"completed"===a.status&&"success"!==a.conclusion&&"skipped"!==a.conclusion&&"cancelled"!==a.conclusion&&"neutral"!==a.conclusion);if(k.length>0){let b=k.map(a=>`"${a.name}"`).join(", ");return i(`CI checks are failing on branch "${a}": ${b}. Fix the failing checks now.`)}let l=j.filter(a=>"in_progress"===a.status||"queued"===a.status||"waiting"===a.status);if(l.length>0){let b=l.map(a=>`"${a.name}"`).join(", ");return i(`CI checks are still running on branch "${a}": ${b}. Wait for all checks to complete, then verify they pass.`)}return h(`All CI checks passed on branch "${a}".`)}catch{return h("Could not check CI status, skipping.")}}},bk=new Set(Object.keys(bj)),bl=g.filter(a=>!bk.has(a.name)).map(a=>a.name);if(bl.length>0)throw Error(`failproofai: builtin policies missing an implementation: ${bl.join(", ")}`);let bm=new Set(g.map(a=>a.name)),bn=[...bk].filter(a=>!bm.has(a));if(bn.length>0)throw Error(`failproofai: policy implementations with no catalog entry: ${bn.join(", ")}`);let bo=g.map(a=>({...a,fn:bj[a.name]}));a.s(["BUILTIN_POLICIES",0,bo],92956)}];
2
2
 
3
3
  //# sourceMappingURL=src_hooks_builtin-policies_ts_09j2ndl._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[21572,a=>{"use strict";var b=a.i(2157),c=a.i(50227),d=a.i(75818);let e={mode:"oss",daemon:{configured:!1},collector:{sessions:!1,hooks:!0,hooksVerbosity:"decisions",redact:"minimal",environment:"local"},telemetry:{enabled:!0},audit:{auto:!1,notify:!0,intervalDays:7}};function f(){let a={};try{let c=JSON.parse((0,b.readFileSync)((0,d.configFile)(),"utf8"));c&&"object"==typeof c&&!Array.isArray(c)&&(a=c)}catch{}return{raw:a,config:g()}}function g(){try{var a;let c,e,f,g,h,i;return a=JSON.parse((0,b.readFileSync)((0,d.configFile)(),"utf8")),c=a.mode?.kind,e=a.daemon??{},f=a.collector??{},g=a.telemetry??{},i=(h=!!a.audit&&"object"==typeof a.audit&&!Array.isArray(a.audit))?a.audit:{},{mode:"cloud"===c?"cloud":"oss",daemon:{configured:!0===e.configured},collector:{sessions:!0===f.sessions,hooks:!1!==f.hooks,hooksVerbosity:"all"===f.hooks_verbosity||"off"===f.hooks_verbosity?f.hooks_verbosity:"decisions",redact:"off"===f.redact?"off":"minimal",environment:"string"==typeof f.environment?f.environment:"local",machineId:"string"==typeof f.machine_id?f.machine_id:void 0,sources:function(a){if(!a||"object"!=typeof a||Array.isArray(a))return;let b={};for(let[c,d]of Object.entries(a)){if(!d||"object"!=typeof d||Array.isArray(d))continue;let a=d.extra_paths;if(!Array.isArray(a))continue;let e=a.filter(a=>"string"==typeof a&&""!==a.trim());e.length>0&&(b[c]={extraPaths:e})}return Object.keys(b).length>0?b:void 0}(f.sources)},telemetry:{enabled:!1!==g.enabled},audit:{auto:h&&!1!==i.auto,notify:!1!==i.notify,intervalDays:function(a){if("number"!=typeof a||!Number.isFinite(a))return 7;let b=Math.floor(a);return b<1?7:Math.min(b,90)}(i.interval_days),reportsConsentedAt:"number"==typeof i.reports_consented_at&&Number.isFinite(i.reports_consented_at)?i.reports_consented_at:void 0}}}catch{return structuredClone(e)}}let h=[["mode","kind"],["daemon","configured"],["collector","sessions"],["collector","hooks"],["collector","hooks_verbosity"],["collector","redact"],["collector","environment"],["collector","machine_id"],["collector","sources","*","extra_paths"],["telemetry","enabled"],["audit","auto"],["audit","notify"],["audit","interval_days"],["audit","reports_consented_at"]],i=a=>"object"==typeof a&&null!==a&&!Array.isArray(a);a.s(["readConfig",0,g,"updateConfig",0,function(a){var e,g;let{raw:j,config:k}=f(),l={mode:a.mode??k.mode,daemon:{...k.daemon,...a.daemon},collector:{...k.collector,...a.collector},telemetry:{...k.telemetry,...a.telemetry},audit:{...k.audit,...a.audit}},m=l.collector,n={mode:{kind:l.mode},daemon:{configured:l.daemon.configured},collector:{sessions:m.sessions,hooks:m.hooks,hooks_verbosity:m.hooksVerbosity,redact:m.redact,environment:m.environment,...m.machineId?{machine_id:m.machineId}:{},...Object.entries(m.sources??{}).some(([,a])=>a.extraPaths?.length)?{sources:Object.fromEntries(Object.entries(m.sources??{}).filter(([,a])=>a.extraPaths?.length).map(([a,b])=>[a,{extra_paths:b.extraPaths}]))}:{}},...l.telemetry.enabled?{}:{telemetry:{enabled:!1}},audit:{auto:l.audit.auto,notify:l.audit.notify,interval_days:l.audit.intervalDays,...void 0===l.audit.reportsConsentedAt?{}:{reports_consented_at:l.audit.reportsConsentedAt}}},o=structuredClone(j??f().raw);for(let a of h)!function a(b,c){let[d,...e]=c;if(void 0!==d)for(let c of"*"===d?Object.keys(b):[d]){if(0===e.length){delete b[c];continue}let d=b[c];i(d)&&(a(d,e),0===Object.keys(d).length&&delete b[c])}}(o,a);return!function a(b,c){for(let[d,e]of Object.entries(c)){let c=b[d];i(c)&&i(e)?a(c,e):b[d]=e}}(o,n),e=(0,d.configFile)(),g=`${JSON.stringify(o,null,2)}
1
+ module.exports=[21572,a=>{"use strict";var b=a.i(2157),c=a.i(50227),d=a.i(75818);let e={mode:"oss",daemon:{configured:!1},collector:{sessions:!1,hooks:!0,hooksVerbosity:"decisions",redact:"minimal",environment:"local"},telemetry:{enabled:!0},audit:{auto:!1,intervalDays:7}};function f(){let a={};try{let c=JSON.parse((0,b.readFileSync)((0,d.configFile)(),"utf8"));c&&"object"==typeof c&&!Array.isArray(c)&&(a=c)}catch{}return{raw:a,config:g()}}function g(){try{var a;let c,e,f,g,h;return a=JSON.parse((0,b.readFileSync)((0,d.configFile)(),"utf8")),c=a.mode?.kind,e=a.daemon??{},f=a.collector??{},g=a.telemetry??{},h=a.audit??{},{mode:"cloud"===c?"cloud":"oss",daemon:{configured:!0===e.configured},collector:{sessions:!0===f.sessions,hooks:!1!==f.hooks,hooksVerbosity:"all"===f.hooks_verbosity||"off"===f.hooks_verbosity?f.hooks_verbosity:"decisions",redact:"off"===f.redact?"off":"minimal",environment:"string"==typeof f.environment?f.environment:"local",machineId:"string"==typeof f.machine_id?f.machine_id:void 0,sources:function(a){if(!a||"object"!=typeof a||Array.isArray(a))return;let b={};for(let[c,d]of Object.entries(a)){if(!d||"object"!=typeof d||Array.isArray(d))continue;let a=d.extra_paths;if(!Array.isArray(a))continue;let e=a.filter(a=>"string"==typeof a&&""!==a.trim());e.length>0&&(b[c]={extraPaths:e})}return Object.keys(b).length>0?b:void 0}(f.sources)},telemetry:{enabled:!1!==g.enabled},audit:{auto:!0===h.auto,intervalDays:function(a){if("number"!=typeof a||!Number.isFinite(a))return 7;let b=Math.floor(a);return b<1?7:Math.min(b,90)}(h.interval_days),reportsConsentedAt:"number"==typeof h.reports_consented_at&&Number.isFinite(h.reports_consented_at)?h.reports_consented_at:void 0}}}catch{return structuredClone(e)}}let h=[["mode","kind"],["daemon","configured"],["collector","sessions"],["collector","hooks"],["collector","hooks_verbosity"],["collector","redact"],["collector","environment"],["collector","machine_id"],["collector","sources","*","extra_paths"],["telemetry","enabled"],["audit","auto"],["audit","interval_days"],["audit","reports_consented_at"]],i=a=>"object"==typeof a&&null!==a&&!Array.isArray(a);a.s(["readConfig",0,g,"updateConfig",0,function(a){var e,g;let{raw:j,config:k}=f(),l={mode:a.mode??k.mode,daemon:{...k.daemon,...a.daemon},collector:{...k.collector,...a.collector},telemetry:{...k.telemetry,...a.telemetry},audit:{...k.audit,...a.audit}},m=l.collector,n={mode:{kind:l.mode},daemon:{configured:l.daemon.configured},collector:{sessions:m.sessions,hooks:m.hooks,hooks_verbosity:m.hooksVerbosity,redact:m.redact,environment:m.environment,...m.machineId?{machine_id:m.machineId}:{},...Object.entries(m.sources??{}).some(([,a])=>a.extraPaths?.length)?{sources:Object.fromEntries(Object.entries(m.sources??{}).filter(([,a])=>a.extraPaths?.length).map(([a,b])=>[a,{extra_paths:b.extraPaths}]))}:{}},...l.telemetry.enabled?{}:{telemetry:{enabled:!1}},audit:{auto:l.audit.auto,interval_days:l.audit.intervalDays,...void 0===l.audit.reportsConsentedAt?{}:{reports_consented_at:l.audit.reportsConsentedAt}}},o=structuredClone(j??f().raw);for(let a of h)!function a(b,c){let[d,...e]=c;if(void 0!==d)for(let c of"*"===d?Object.keys(b):[d]){if(0===e.length){delete b[c];continue}let d=b[c];i(d)&&(a(d,e),0===Object.keys(d).length&&delete b[c])}}(o,a);return!function a(b,c){for(let[d,e]of Object.entries(c)){let c=b[d];i(c)&&i(e)?a(c,e):b[d]=e}}(o,n),e=(0,d.configFile)(),g=`${JSON.stringify(o,null,2)}
2
2
  `,(0,b.mkdirSync)((0,c.dirname)(e),{recursive:!0}),(0,b.writeFileSync)(e,g,"utf8"),l}])}];
3
3
 
4
4
  //# sourceMappingURL=src_hooks_fp-config_ts_04t589g._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[75818,a=>{"use strict";var b=a.i(60526),c=a.i(50227);function d(a){return a?(0,c.resolve)(a,".failproofai"):process.env.FAILPROOFAI_HOME||(0,c.resolve)((0,b.homedir)(),".failproofai")}let e=(a,...b)=>a?(0,c.resolve)(d(a),...b):((...a)=>(0,c.resolve)(d(),...a))(...b),f=a=>e(a,"policies"),g=a=>(0,c.resolve)(f(a),"packs");a.s(["auditDashboardFile",0,a=>(0,c.resolve)(e(a,"audit"),"dashboard.json"),"auditLeakIdentityFile",0,a=>(0,c.resolve)(e(a,"audit"),"leak-identity.json"),"auditLeaksFile",0,a=>(0,c.resolve)(e(a,"audit"),"leaks.json"),"auditScheduleFile",0,a=>(0,c.resolve)(e(a,"audit"),"schedule.json"),"auditSessionFile",0,a=>(0,c.resolve)(e(a,"audit"),"session.json"),"codexSessionPathsFile",0,a=>(0,c.resolve)(e(a,"state"),"codex-session-paths.json"),"configFile",0,a=>e(a,"config.json"),"customPoliciesDir",0,f,"daemonSocket",0,()=>process.env.FAILPROOFAI_DAEMON_SOCKET||(0,c.resolve)(e(void 0,"run"),"failproofaid.sock"),"globalPolicyConfigFile",0,a=>e(a,"policies-config.json"),"hookActivityDir",0,a=>e(a,"hook-activity"),"logsDir",0,a=>e(a,"logs"),"packsDir",0,g,"packsInstalledFile",0,a=>(0,c.resolve)(g(a),"installed.json"),"sessionPauseDir",0,()=>(0,c.resolve)(e(void 0,"state"),"sessions"),"shimsDir",0,a=>(0,c.resolve)(e(a,"state"),"shims"),"telemetryIdFile",0,a=>(0,c.resolve)(e(a,"state"),"telemetry-id")])}];
1
+ module.exports=[75818,a=>{"use strict";var b=a.i(60526),c=a.i(50227);function d(a){return a?(0,c.resolve)(a,".failproofai"):process.env.FAILPROOFAI_HOME||(0,c.resolve)((0,b.homedir)(),".failproofai")}let e=(a,...b)=>a?(0,c.resolve)(d(a),...b):((...a)=>(0,c.resolve)(d(),...a))(...b),f=a=>e(a,"policies"),g=a=>(0,c.resolve)(f(a),"packs");a.s(["auditDashboardFile",0,a=>(0,c.resolve)(e(a,"audit"),"dashboard.json"),"auditScheduleFile",0,a=>(0,c.resolve)(e(a,"audit"),"schedule.json"),"auditSessionFile",0,a=>(0,c.resolve)(e(a,"audit"),"session.json"),"codexSessionPathsFile",0,a=>(0,c.resolve)(e(a,"state"),"codex-session-paths.json"),"configFile",0,a=>e(a,"config.json"),"customPoliciesDir",0,f,"daemonSocket",0,()=>process.env.FAILPROOFAI_DAEMON_SOCKET||(0,c.resolve)(e(void 0,"run"),"failproofaid.sock"),"globalPolicyConfigFile",0,a=>e(a,"policies-config.json"),"hookActivityDir",0,a=>e(a,"hook-activity"),"logsDir",0,a=>e(a,"logs"),"migrationsDir",0,a=>e(a,"migrations"),"packsDir",0,g,"packsInstalledFile",0,a=>(0,c.resolve)(g(a),"installed.json"),"sessionPauseDir",0,()=>(0,c.resolve)(e(void 0,"state"),"sessions"),"shimsDir",0,a=>(0,c.resolve)(e(a,"state"),"shims"),"telemetryIdFile",0,a=>(0,c.resolve)(e(a,"state"),"telemetry-id")])}];
2
2
 
3
3
  //# sourceMappingURL=src_hooks_fp-home_ts_0je3xkv._.js.map
@@ -7,16 +7,16 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/0cz1d0mv5g_q7.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/DNhaAH8iPGH0tIuxee5_2/_buildManifest.js",
11
- "static/DNhaAH8iPGH0tIuxee5_2/_ssgManifest.js",
12
- "static/DNhaAH8iPGH0tIuxee5_2/_clientMiddlewareManifest.js"
10
+ "static/dg8VQ7Ejlo0Qsh_x92oIt/_buildManifest.js",
11
+ "static/dg8VQ7Ejlo0Qsh_x92oIt/_ssgManifest.js",
12
+ "static/dg8VQ7Ejlo0Qsh_x92oIt/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/1c6aptmytnu6q.js",
16
16
  "static/chunks/2yuzx8716maf0.js",
17
- "static/chunks/2zafgs90r_leq.js",
18
17
  "static/chunks/3i8rg2fv9nd6e.js",
19
- "static/chunks/turbopack-3s3c-u_u_l0u9.js"
18
+ "static/chunks/2zafgs90r_leq.js",
19
+ "static/chunks/turbopack-3p73obe0xmrxm.js"
20
20
  ],
21
21
  "rootMainFilesTree": {},
22
22
  "pagesChunkGroupBootstrapParams": {},
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="image" href="/logo.svg"/><link rel="stylesheet" href="/_next/static/chunks/0qmsunv04x4na.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/1c6aptmytnu6q.js"/><script src="/_next/static/chunks/2yuzx8716maf0.js" async=""></script><script src="/_next/static/chunks/2zafgs90r_leq.js" async=""></script><script src="/_next/static/chunks/3i8rg2fv9nd6e.js" async=""></script><script src="/_next/static/chunks/turbopack-3s3c-u_u_l0u9.js" async=""></script><script src="/_next/static/chunks/1eyl7fzkmnkf_.js" async=""></script><script src="/_next/static/chunks/2lvr2pt70qn14.js" async=""></script><script src="/_next/static/chunks/3a4gth64hwtwf.js" async=""></script><script src="/_next/static/chunks/3xpjn3cdgm-7m.js" async=""></script><script src="/_next/static/chunks/1302duobnz07l.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Failproof AI - Hooks &amp; Project Monitor</title><meta name="description" content="Open-source hooks, policies, and project visualization for Claude Code &amp; Agents SDK"/><link rel="icon" href="/icon.svg"/><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body class="antialiased"><div hidden=""><!--$--><!--/$--></div><header class="app-header"><a href="https://github.com/failproofai/failproofai" target="_blank" rel="noopener noreferrer" class="h-brand" style="flex:none" aria-label="failproof ai · GitHub"><img src="/logo.svg" alt="failproof_ai" style="height:18px;display:block;flex-shrink:0"/></a><nav class="tabs" style="border:none;padding:0;gap:0"><a class="tab" href="/projects">projects</a><a class="tab" href="/policies">policies</a><a class="tab" href="/audit">audit</a></nav><div style="flex:1"></div><div class="h-meta"><span class="h-version">v<!-- -->1.0.4-beta.8</span></div><div class="h-actions"><div class="inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5"><button title="Refresh" class="inline-flex items-center justify-center rounded-md p-1.5 transition-colors text-muted-foreground hover:text-foreground hover:bg-muted"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw w-3.5 h-3.5" aria-hidden="true"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></svg></button><div class="w-px h-4 bg-border"></div><div class="inline-flex items-center gap-0.5" role="group" aria-label="Auto-refresh interval"><button aria-pressed="true" class="px-2 py-1 text-[11px] font-medium rounded-md transition-colors bg-background text-foreground shadow-sm">Off</button><button aria-pressed="false" class="px-2 py-1 text-[11px] font-medium rounded-md transition-colors text-muted-foreground hover:text-foreground hover:bg-muted">5s</button><button aria-pressed="false" class="px-2 py-1 text-[11px] font-medium rounded-md transition-colors text-muted-foreground hover:text-foreground hover:bg-muted">10s</button><button aria-pressed="false" class="px-2 py-1 text-[11px] font-medium rounded-md transition-colors text-muted-foreground hover:text-foreground hover:bg-muted">30s</button></div></div><span style="width:1px;height:18px;background:var(--line);margin:0 6px"></span><a class="h-icon-btn" aria-label="settings" title="settings" href="/settings"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings w-3.5 h-3.5" aria-hidden="true"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"></path><circle cx="12" cy="12" r="3"></circle></svg></a><span style="width:1px;height:18px;background:var(--line);margin:0 6px"></span><div class="relative"><button class="justify-center rounded-md text-sm font-medium transition-[background-color,color,box-shadow,border-color] duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50 disabled:pointer-events-none hover:bg-muted h-9 px-3 relative z-50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground" type="button" aria-expanded="false" aria-haspopup="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-git-branch h-4 w-4" aria-hidden="true"><path d="M15 6a9 9 0 0 0-9 9V3"></path><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle></svg><span class="hidden sm:inline text-xs whitespace-nowrap">Reach Us</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-3 w-3 transition-transform" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button></div></div></header><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><div class="fixed bottom-4 right-4 z-50 flex flex-col gap-2"></div><script src="/_next/static/chunks/1c6aptmytnu6q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[12344,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"PostHogProvider\"]\n3:I[97917,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"GlobalErrorListeners\"]\n4:I[85881,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"AutoRefreshProvider\"]\n5:I[63780,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"Navbar\"]\n6:I[39756,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"default\"]\n7:I[8821,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\",\"/_next/static/chunks/3xpjn3cdgm-7m.js\"],\"default\"]\n8:I[37457,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"default\"]\n9:I[55574,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"Toaster\"]\na:I[97367,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"OutletBoundary\"]\nb:\"$Sreact.suspense\"\ne:I[97367,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"ViewportBoundary\"]\n10:I[97367,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"MetadataBoundary\"]\n12:I[53348,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\",\"/_next/static/chunks/1302duobnz07l.js\"],\"default\"]\n:HL[\"/_next/static/chunks/0qmsunv04x4na.css\",\"style\"]\nd:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0qmsunv04x4na.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/2lvr2pt70qn14.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/3a4gth64hwtwf.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[\"$\",\"body\",null,{\"className\":\"antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{}],[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{\"disabledPages\":[]}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$7\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/3xpjn3cdgm-7m.js\",\"async\":true}]],\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],[\"$\",\"$L9\",null,{}]]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:1:props:children:1:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:1:props:children:1:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:1:props:children:1:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:1:props:children:1:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$La\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@c\"}]}]]}],{},null,false,null]},null,false,\"$d\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L10\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L11\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0qmsunv04x4na.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"DNhaAH8iPGH0tIuxee5_2\"}\n"])</script><script>self.__next_f.push([1,"d:C\nf:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"13:I[27201,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/3a4gth64hwtwf.js\"],\"IconMark\"]\nc:null\n11:[[\"$\",\"title\",\"0\",{\"children\":\"Failproof AI - Hooks \u0026 Project Monitor\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Open-source hooks, policies, and project visualization for Claude Code \u0026 Agents SDK\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg\"}],[\"$\",\"$L13\",\"3\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="image" href="/logo.svg"/><link rel="stylesheet" href="/_next/static/chunks/0qmsunv04x4na.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/1c6aptmytnu6q.js"/><script src="/_next/static/chunks/2yuzx8716maf0.js" async=""></script><script src="/_next/static/chunks/3i8rg2fv9nd6e.js" async=""></script><script src="/_next/static/chunks/2zafgs90r_leq.js" async=""></script><script src="/_next/static/chunks/turbopack-3p73obe0xmrxm.js" async=""></script><script src="/_next/static/chunks/1eyl7fzkmnkf_.js" async=""></script><script src="/_next/static/chunks/2lvr2pt70qn14.js" async=""></script><script src="/_next/static/chunks/2pd16tn5qmx13.js" async=""></script><script src="/_next/static/chunks/3xpjn3cdgm-7m.js" async=""></script><script src="/_next/static/chunks/0-tyrpwuc3lla.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Failproof AI - Hooks &amp; Project Monitor</title><meta name="description" content="Open-source hooks, policies, and project visualization for Claude Code &amp; Agents SDK"/><link rel="icon" href="/icon.svg"/><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body class="antialiased"><div hidden=""><!--$--><!--/$--></div><header class="app-header"><a href="https://github.com/failproofai/failproofai" target="_blank" rel="noopener noreferrer" class="h-brand" style="flex:none" aria-label="failproof ai · GitHub"><img src="/logo.svg" alt="failproof_ai" style="height:18px;display:block;flex-shrink:0"/></a><nav class="tabs" style="border:none;padding:0;gap:0"><a class="tab" href="/projects">projects</a><a class="tab" href="/policies">policies</a><a class="tab" href="/audit">audit</a></nav><div style="flex:1"></div><div class="h-meta"><span class="h-version">v<!-- -->1.0.4</span></div><div class="h-actions"><div class="inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5"><button title="Refresh" class="inline-flex items-center justify-center rounded-md p-1.5 transition-colors text-muted-foreground hover:text-foreground hover:bg-muted"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw w-3.5 h-3.5" aria-hidden="true"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></svg></button><div class="w-px h-4 bg-border"></div><div class="inline-flex items-center gap-0.5" role="group" aria-label="Auto-refresh interval"><button aria-pressed="true" class="px-2 py-1 text-[11px] font-medium rounded-md transition-colors bg-background text-foreground shadow-sm">Off</button><button aria-pressed="false" class="px-2 py-1 text-[11px] font-medium rounded-md transition-colors text-muted-foreground hover:text-foreground hover:bg-muted">5s</button><button aria-pressed="false" class="px-2 py-1 text-[11px] font-medium rounded-md transition-colors text-muted-foreground hover:text-foreground hover:bg-muted">10s</button><button aria-pressed="false" class="px-2 py-1 text-[11px] font-medium rounded-md transition-colors text-muted-foreground hover:text-foreground hover:bg-muted">30s</button></div></div><span style="width:1px;height:18px;background:var(--line);margin:0 6px"></span><a class="h-icon-btn" aria-label="settings" title="settings" href="/settings"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings w-3.5 h-3.5" aria-hidden="true"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"></path><circle cx="12" cy="12" r="3"></circle></svg></a><span style="width:1px;height:18px;background:var(--line);margin:0 6px"></span><div class="relative"><button class="justify-center rounded-md text-sm font-medium transition-[background-color,color,box-shadow,border-color] duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:opacity-50 disabled:pointer-events-none hover:bg-muted h-9 px-3 relative z-50 flex items-center gap-1.5 text-muted-foreground hover:text-foreground" type="button" aria-expanded="false" aria-haspopup="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-git-branch h-4 w-4" aria-hidden="true"><path d="M15 6a9 9 0 0 0-9 9V3"></path><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle></svg><span class="hidden sm:inline text-xs whitespace-nowrap">Reach Us</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down h-3 w-3 transition-transform" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button></div></div></header><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><div class="fixed bottom-4 right-4 z-50 flex flex-col gap-2"></div><script src="/_next/static/chunks/1c6aptmytnu6q.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[12344,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"PostHogProvider\"]\n3:I[97917,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"GlobalErrorListeners\"]\n4:I[85881,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"AutoRefreshProvider\"]\n5:I[63780,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"Navbar\"]\n6:I[39756,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"default\"]\n7:I[8821,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\",\"/_next/static/chunks/3xpjn3cdgm-7m.js\"],\"default\"]\n8:I[37457,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"default\"]\n9:I[55574,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"Toaster\"]\na:I[97367,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"OutletBoundary\"]\nb:\"$Sreact.suspense\"\ne:I[97367,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"ViewportBoundary\"]\n10:I[97367,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"MetadataBoundary\"]\n12:I[53348,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\",\"/_next/static/chunks/0-tyrpwuc3lla.js\"],\"default\"]\n:HL[\"/_next/static/chunks/0qmsunv04x4na.css\",\"style\"]\nd:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0qmsunv04x4na.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/2lvr2pt70qn14.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/2pd16tn5qmx13.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[\"$\",\"body\",null,{\"className\":\"antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"$L3\",null,{}],[\"$\",\"$L4\",null,{\"children\":[[\"$\",\"$L5\",null,{\"disabledPages\":[]}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$7\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/3xpjn3cdgm-7m.js\",\"async\":true}]],\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],[\"$\",\"$L9\",null,{}]]}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:1:props:children:1:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:1:props:children:1:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:1:props:children:1:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:1:props:children:1:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$La\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@c\"}]}]]}],{},null,false,null]},null,false,\"$d\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L10\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L11\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0qmsunv04x4na.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"dg8VQ7Ejlo0Qsh_x92oIt\"}\n"])</script><script>self.__next_f.push([1,"d:C\nf:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"13:I[27201,[\"/_next/static/chunks/1eyl7fzkmnkf_.js\",\"/_next/static/chunks/2lvr2pt70qn14.js\",\"/_next/static/chunks/2pd16tn5qmx13.js\"],\"IconMark\"]\nc:null\n11:[[\"$\",\"title\",\"0\",{\"children\":\"Failproof AI - Hooks \u0026 Project Monitor\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Open-source hooks, policies, and project visualization for Claude Code \u0026 Agents SDK\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg\"}],[\"$\",\"$L13\",\"3\",{}]]\n"])</script></body></html>