failproofai 1.0.1 → 1.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +6 -6
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page.js +2 -2
  7. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  11. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
  12. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  13. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
  16. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
  20. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
  21. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +14 -14
  22. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/.next/standalone/.next/server/app/api/audit/invite/route.js +3 -2
  24. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/audit/run/route.js +5 -4
  26. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/auth/login-request/route.js +2 -2
  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 +4 -3
  31. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/auth/logout/route.js +4 -4
  33. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/auth/status/route.js +4 -4
  35. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  38. package/.next/standalone/.next/server/app/audit/page.js +2 -2
  39. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/index.html +1 -1
  42. package/.next/standalone/.next/server/app/index.rsc +15 -15
  43. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +14 -14
  44. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  45. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +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/server-reference-manifest.json +66 -22
  51. package/.next/standalone/.next/server/app/policies/page.js +5 -4
  52. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  55. package/.next/standalone/.next/server/app/project/[name]/page.js +2 -2
  56. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  59. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  60. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +2 -2
  61. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  64. package/.next/standalone/.next/server/app/projects/page.js +2 -2
  65. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  67. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
  68. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  69. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/chunks/{[externals]__1qzqcio._.js → [externals]__0e32-7c._.js} +1 -1
  72. package/.next/standalone/.next/server/chunks/[externals]__1s462yl._.js +3 -0
  73. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01eqny5._.js +3 -0
  74. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_0xu5z._.js +1 -1
  75. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1p8poxd._.js → [root-of-the-server]__0igxt32._.js} +2 -2
  76. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0neqlu-._.js +3 -0
  77. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +3 -0
  78. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t9oqnn._.js +3 -0
  79. package/.next/standalone/.next/server/chunks/_0bs-v8p._.js +3 -0
  80. package/.next/standalone/.next/server/chunks/_0tovk6q._.js +3 -0
  81. package/.next/standalone/.next/server/chunks/_0trp3yc._.js +3 -0
  82. package/.next/standalone/.next/server/chunks/_185gyk9._.js +3 -0
  83. package/.next/standalone/.next/server/chunks/_1ek68ln._.js +5 -6
  84. package/.next/standalone/.next/server/chunks/lib_telemetry-id_ts_1k8gj9o._.js +3 -0
  85. package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_09d5c79._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_04op_ou._.js} +1 -1
  86. package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_1d2g73o._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dr20uz._.js} +1 -1
  87. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/src_hooks_0xbw3bu._.js +12 -0
  89. package/.next/standalone/.next/server/chunks/src_hooks_fp-home_ts_09kv0bn._.js +1 -1
  90. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +4 -0
  91. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +4 -0
  92. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +4 -0
  93. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0spkm68._.js → [root-of-the-server]__07gm3zl._.js} +21 -20
  94. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +4 -0
  95. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +4 -0
  96. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +4 -0
  98. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +6 -0
  99. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07tbbf3._.js → [root-of-the-server]__0zig5sv._.js} +2 -2
  100. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__192nhvh._.js +5 -0
  101. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +4 -0
  102. package/.next/standalone/.next/server/chunks/ssr/{_0lvyuv4._.js → _00e9tnf._.js} +2 -2
  103. package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/{_0u5zauv._.js → _12l4a_k._.js} +1 -1
  105. package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +1 -1
  106. package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
  107. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +13 -13
  108. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
  109. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +2 -2
  110. package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +1 -1
  111. package/.next/standalone/.next/server/chunks/ssr/src_hooks_08o7bqo._.js +10 -0
  112. package/.next/standalone/.next/server/chunks/ssr/src_hooks_builtin-policies_ts_09j2ndl._.js +1 -1
  113. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +1 -1
  114. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  115. package/.next/standalone/.next/server/middleware.js +1 -1
  116. package/.next/standalone/.next/server/pages/404.html +1 -1
  117. package/.next/standalone/.next/server/pages/500.html +1 -1
  118. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  119. package/.next/standalone/.next/server/server-reference-manifest.json +71 -27
  120. package/.next/standalone/.next/static/chunks/{37fcpc36x9gpe.js → 0eqky-7n7dgdm.js} +1 -1
  121. package/.next/standalone/.next/static/chunks/{1ide1wl2f7zi1.js → 0sa9v5mhc8861.js} +13 -13
  122. package/.next/standalone/.next/static/chunks/1mfzsja6ftim5.css +2 -0
  123. package/.next/standalone/.next/static/chunks/{3k7mxbp9hiom0.js → 1nuqytbta44af.js} +1 -1
  124. package/.next/standalone/.next/static/chunks/1sl2xmn9inx3y.js +6 -0
  125. package/.next/standalone/.next/static/chunks/{2_2lhuojq2xop.js → 2aawsjld9ied_.js} +1 -1
  126. package/.next/standalone/.next/static/chunks/2gn7ut4svofm2.js +1 -0
  127. package/.next/standalone/.next/static/chunks/{31s1smp-g7gks.js → 2hs7ycvsav7v2.js} +1 -1
  128. package/.next/standalone/.next/static/chunks/{0k5050ezjvv49.js → 2i2yt3hzjredm.js} +1 -1
  129. package/.next/standalone/.next/static/chunks/{3c808qrfcq0im.js → 35xg6retpe6rp.js} +1 -1
  130. package/.next/standalone/.next/static/chunks/{2zpp1we2jv6tb.js → 3y54nw0i7dsjl.js} +1 -1
  131. package/.next/standalone/SECURITY.md +5 -4
  132. package/.next/standalone/app/actions/get-hooks-config.ts +108 -17
  133. package/.next/standalone/app/actions/pack-actions.ts +153 -0
  134. package/.next/standalone/app/audit/_components/run-progress.tsx +1 -1
  135. package/.next/standalone/app/audit/_components/share-templates.ts +13 -13
  136. package/.next/standalone/app/policies/hooks-client.tsx +320 -14
  137. package/.next/standalone/components/navbar.tsx +2 -28
  138. package/.next/standalone/components/reach-developers.tsx +8 -1
  139. package/.next/standalone/docs-old/agenteye/python-sdk-skill.mdx +1 -1
  140. package/.next/standalone/docs-old/agenteye/python-sdk.mdx +59 -35
  141. package/.next/standalone/docs-old/i18n/README.ar.md +1 -0
  142. package/.next/standalone/docs-old/i18n/README.de.md +1 -0
  143. package/.next/standalone/docs-old/i18n/README.es.md +1 -0
  144. package/.next/standalone/docs-old/i18n/README.fr.md +1 -0
  145. package/.next/standalone/docs-old/i18n/README.he.md +1 -0
  146. package/.next/standalone/docs-old/i18n/README.hi.md +1 -0
  147. package/.next/standalone/docs-old/i18n/README.it.md +1 -0
  148. package/.next/standalone/docs-old/i18n/README.ja.md +1 -0
  149. package/.next/standalone/docs-old/i18n/README.ko.md +1 -0
  150. package/.next/standalone/docs-old/i18n/README.pt-br.md +1 -0
  151. package/.next/standalone/docs-old/i18n/README.ru.md +1 -0
  152. package/.next/standalone/docs-old/i18n/README.tr.md +1 -0
  153. package/.next/standalone/docs-old/i18n/README.vi.md +1 -0
  154. package/.next/standalone/docs-old/i18n/README.zh.md +1 -0
  155. package/.next/standalone/fp-cloud-cli/CHANGELOG.md +431 -0
  156. package/.next/standalone/fp-cloud-cli/LICENSE +42 -0
  157. package/.next/standalone/fp-cloud-cli/MANIFEST.in +10 -0
  158. package/.next/standalone/fp-cloud-cli/README.md +259 -0
  159. package/.next/standalone/fp-cloud-cli/fp_cli/__init__.py +10 -0
  160. package/.next/standalone/fp-cloud-cli/fp_cli/__main__.py +4 -0
  161. package/.next/standalone/fp-cloud-cli/fp_cli/_click_compat.py +64 -0
  162. package/.next/standalone/fp-cloud-cli/fp_cli/_context.py +332 -0
  163. package/.next/standalone/fp-cloud-cli/fp_cli/_version.py +1 -0
  164. package/.next/standalone/fp-cloud-cli/fp_cli/analytics.py +432 -0
  165. package/.next/standalone/fp-cloud-cli/fp_cli/analytics_config.py +77 -0
  166. package/.next/standalone/fp-cloud-cli/fp_cli/analytics_registry.py +83 -0
  167. package/.next/standalone/fp-cloud-cli/fp_cli/app.py +492 -0
  168. package/.next/standalone/fp-cloud-cli/fp_cli/auth.py +160 -0
  169. package/.next/standalone/fp-cloud-cli/fp_cli/client.py +1694 -0
  170. package/.next/standalone/fp-cloud-cli/fp_cli/commands/__init__.py +0 -0
  171. package/.next/standalone/fp-cloud-cli/fp_cli/commands/_write.py +214 -0
  172. package/.next/standalone/fp-cloud-cli/fp_cli/commands/agent_cmds.py +407 -0
  173. package/.next/standalone/fp-cloud-cli/fp_cli/commands/alerts_cmds.py +445 -0
  174. package/.next/standalone/fp-cloud-cli/fp_cli/commands/audits_cmds.py +1054 -0
  175. package/.next/standalone/fp-cloud-cli/fp_cli/commands/auth_cmds.py +512 -0
  176. package/.next/standalone/fp-cloud-cli/fp_cli/commands/errors_cmds.py +190 -0
  177. package/.next/standalone/fp-cloud-cli/fp_cli/commands/evals_cmds.py +161 -0
  178. package/.next/standalone/fp-cloud-cli/fp_cli/commands/events_cmds.py +159 -0
  179. package/.next/standalone/fp-cloud-cli/fp_cli/commands/fleet_cmds.py +416 -0
  180. package/.next/standalone/fp-cloud-cli/fp_cli/commands/guardrails_cmds.py +148 -0
  181. package/.next/standalone/fp-cloud-cli/fp_cli/commands/incidents_cmds.py +472 -0
  182. package/.next/standalone/fp-cloud-cli/fp_cli/commands/keys_cmds.py +407 -0
  183. package/.next/standalone/fp-cloud-cli/fp_cli/commands/list_cmds.py +63 -0
  184. package/.next/standalone/fp-cloud-cli/fp_cli/commands/orgs_cmds.py +319 -0
  185. package/.next/standalone/fp-cloud-cli/fp_cli/commands/policies_cmds.py +499 -0
  186. package/.next/standalone/fp-cloud-cli/fp_cli/commands/queries_cmds.py +378 -0
  187. package/.next/standalone/fp-cloud-cli/fp_cli/commands/sessions_cmds.py +151 -0
  188. package/.next/standalone/fp-cloud-cli/fp_cli/commands/settings_cmds.py +150 -0
  189. package/.next/standalone/fp-cloud-cli/fp_cli/commands/usage_cmds.py +35 -0
  190. package/.next/standalone/fp-cloud-cli/fp_cli/commands/users_cmds.py +404 -0
  191. package/.next/standalone/fp-cloud-cli/fp_cli/config.py +330 -0
  192. package/.next/standalone/fp-cloud-cli/fp_cli/dates.py +78 -0
  193. package/.next/standalone/fp-cloud-cli/fp_cli/enforcement.py +345 -0
  194. package/.next/standalone/fp-cloud-cli/fp_cli/errors.py +98 -0
  195. package/.next/standalone/fp-cloud-cli/fp_cli/models.py +891 -0
  196. package/.next/standalone/fp-cloud-cli/fp_cli/orgs.py +30 -0
  197. package/.next/standalone/fp-cloud-cli/fp_cli/output.py +6593 -0
  198. package/.next/standalone/fp-cloud-cli/fp_cli/permissions.py +208 -0
  199. package/.next/standalone/fp-cloud-cli/fp_cli/policy_check.py +290 -0
  200. package/.next/standalone/fp-cloud-cli/fp_cli/py.typed +0 -0
  201. package/.next/standalone/fp-cloud-cli/fp_cli/select.py +322 -0
  202. package/.next/standalone/fp-cloud-cli/fp_cli/theme.py +53 -0
  203. package/.next/standalone/fp-cloud-cli/pyproject.toml +106 -0
  204. package/.next/standalone/fp-cloud-cli/skill/SKILL.md +302 -0
  205. package/.next/standalone/fp-cloud-cli/skill/agents/openai.yaml +8 -0
  206. package/.next/standalone/fp-cloud-cli/skill/references/commands.md +254 -0
  207. package/.next/standalone/fp-cloud-cli/tests/__init__.py +0 -0
  208. package/.next/standalone/fp-cloud-cli/tests/conftest.py +92 -0
  209. package/.next/standalone/fp-cloud-cli/tests/test_alerting.py +644 -0
  210. package/.next/standalone/fp-cloud-cli/tests/test_analytics.py +385 -0
  211. package/.next/standalone/fp-cloud-cli/tests/test_audits.py +950 -0
  212. package/.next/standalone/fp-cloud-cli/tests/test_auth.py +98 -0
  213. package/.next/standalone/fp-cloud-cli/tests/test_auth_mode.py +272 -0
  214. package/.next/standalone/fp-cloud-cli/tests/test_click_compat.py +118 -0
  215. package/.next/standalone/fp-cloud-cli/tests/test_client.py +299 -0
  216. package/.next/standalone/fp-cloud-cli/tests/test_commands.py +814 -0
  217. package/.next/standalone/fp-cloud-cli/tests/test_config.py +99 -0
  218. package/.next/standalone/fp-cloud-cli/tests/test_dashboards_agent.py +340 -0
  219. package/.next/standalone/fp-cloud-cli/tests/test_dates.py +76 -0
  220. package/.next/standalone/fp-cloud-cli/tests/test_enforcement_logic.py +481 -0
  221. package/.next/standalone/fp-cloud-cli/tests/test_facets.py +170 -0
  222. package/.next/standalone/fp-cloud-cli/tests/test_failproofai_home.py +722 -0
  223. package/.next/standalone/fp-cloud-cli/tests/test_fp_home_contract.py +198 -0
  224. package/.next/standalone/fp-cloud-cli/tests/test_hardening.py +186 -0
  225. package/.next/standalone/fp-cloud-cli/tests/test_help_table_coverage.py +127 -0
  226. package/.next/standalone/fp-cloud-cli/tests/test_keys_queries.py +496 -0
  227. package/.next/standalone/fp-cloud-cli/tests/test_list.py +59 -0
  228. package/.next/standalone/fp-cloud-cli/tests/test_multivalue.py +183 -0
  229. package/.next/standalone/fp-cloud-cli/tests/test_no_customer_identifiers.py +168 -0
  230. package/.next/standalone/fp-cloud-cli/tests/test_operator.py +492 -0
  231. package/.next/standalone/fp-cloud-cli/tests/test_orgs.py +692 -0
  232. package/.next/standalone/fp-cloud-cli/tests/test_output.py +1732 -0
  233. package/.next/standalone/fp-cloud-cli/tests/test_policy_check.py +191 -0
  234. package/.next/standalone/fp-cloud-cli/tests/test_readme_matches_reality.py +125 -0
  235. package/.next/standalone/fp-cloud-cli/tests/test_review_fixes.py +161 -0
  236. package/.next/standalone/fp-cloud-cli/tests/test_telemetry_completeness.py +90 -0
  237. package/.next/standalone/fp-cloud-cli/tests/test_usage.py +115 -0
  238. package/.next/standalone/fp-cloud-cli/tests/test_v1_origin_diagnostic.py +70 -0
  239. package/.next/standalone/fp-cloud-cli/tests/test_v1_routing.py +214 -0
  240. package/.next/standalone/fp-cloud-cli/tests/test_whoami.py +104 -0
  241. package/.next/standalone/fp-cloud-cli/uv.lock +552 -0
  242. package/.next/standalone/package.json +29 -22
  243. package/.next/standalone/sdk/python/CHANGELOG.md +70 -0
  244. package/.next/standalone/sdk/python/LICENSE +42 -0
  245. package/.next/standalone/sdk/python/MANIFEST.in +21 -0
  246. package/.next/standalone/sdk/python/README.md +466 -0
  247. package/.next/standalone/sdk/python/docs/README.md +249 -0
  248. package/.next/standalone/sdk/python/docs/_shared/README.md +43 -0
  249. package/.next/standalone/sdk/python/docs/_shared/__init__.py +195 -0
  250. package/.next/standalone/sdk/python/docs/crewai/README.md +328 -0
  251. package/.next/standalone/sdk/python/docs/crewai/examples/quickstart.py +61 -0
  252. package/.next/standalone/sdk/python/docs/crewai/examples/research_crew.py +92 -0
  253. package/.next/standalone/sdk/python/docs/langgraph/README.md +481 -0
  254. package/.next/standalone/sdk/python/docs/langgraph/examples/quickstart.py +51 -0
  255. package/.next/standalone/sdk/python/docs/langgraph/examples/research_agent.py +86 -0
  256. package/.next/standalone/sdk/python/docs/langgraph/examples/supervisor_handoff.py +83 -0
  257. package/.next/standalone/sdk/python/docs/llama_index/README.md +332 -0
  258. package/.next/standalone/sdk/python/docs/llama_index/examples/quickstart.py +62 -0
  259. package/.next/standalone/sdk/python/docs/llama_index/examples/research_agent.py +93 -0
  260. package/.next/standalone/sdk/python/docs/manual/README.md +491 -0
  261. package/.next/standalone/sdk/python/docs/manual/examples/quickstart.py +57 -0
  262. package/.next/standalone/sdk/python/docs/manual/examples/research_agent.py +133 -0
  263. package/.next/standalone/sdk/python/docs/pydantic_ai/README.md +323 -0
  264. package/.next/standalone/sdk/python/docs/pydantic_ai/examples/quickstart.py +48 -0
  265. package/.next/standalone/sdk/python/docs/pydantic_ai/examples/research_agent.py +94 -0
  266. package/.next/standalone/sdk/python/failproofai_sdk/__init__.py +131 -0
  267. package/.next/standalone/sdk/python/failproofai_sdk/_context.py +218 -0
  268. package/.next/standalone/sdk/python/failproofai_sdk/_environment.py +78 -0
  269. package/.next/standalone/sdk/python/failproofai_sdk/_events.py +752 -0
  270. package/.next/standalone/sdk/python/failproofai_sdk/_resolver.py +118 -0
  271. package/.next/standalone/sdk/python/failproofai_sdk/_runtime.py +21 -0
  272. package/.next/standalone/sdk/python/failproofai_sdk/_schema.py +317 -0
  273. package/.next/standalone/sdk/python/failproofai_sdk/_scopes.py +422 -0
  274. package/.next/standalone/sdk/python/failproofai_sdk/_version.py +1 -0
  275. package/.next/standalone/sdk/python/failproofai_sdk/_writer.py +750 -0
  276. package/.next/standalone/sdk/python/failproofai_sdk/integrations/__init__.py +274 -0
  277. package/.next/standalone/sdk/python/failproofai_sdk/integrations/_compat.py +247 -0
  278. package/.next/standalone/sdk/python/failproofai_sdk/integrations/_core.py +1076 -0
  279. package/.next/standalone/sdk/python/failproofai_sdk/integrations/crewai.py +1669 -0
  280. package/.next/standalone/sdk/python/failproofai_sdk/integrations/langchain.py +2151 -0
  281. package/.next/standalone/sdk/python/failproofai_sdk/integrations/llama_index.py +1588 -0
  282. package/.next/standalone/sdk/python/failproofai_sdk/integrations/pydantic_ai.py +977 -0
  283. package/.next/standalone/sdk/python/failproofai_sdk/py.typed +0 -0
  284. package/.next/standalone/sdk/python/pyproject.toml +92 -0
  285. package/.next/standalone/sdk/python/skill/SKILL.md +399 -0
  286. package/.next/standalone/sdk/python/skill/agents/openai.yaml +8 -0
  287. package/.next/standalone/sdk/python/skill/references/events.md +234 -0
  288. package/.next/standalone/sdk/python/skill/references/frameworks.md +314 -0
  289. package/.next/standalone/sdk/python/skill/references/install.md +100 -0
  290. package/.next/standalone/sdk/python/skill/references/integration.md +352 -0
  291. package/.next/standalone/sdk/python/tests/__init__.py +0 -0
  292. package/.next/standalone/sdk/python/tests/conftest.py +169 -0
  293. package/.next/standalone/sdk/python/tests/integrations/__init__.py +6 -0
  294. package/.next/standalone/sdk/python/tests/integrations/test_crewai.py +1299 -0
  295. package/.next/standalone/sdk/python/tests/integrations/test_langchain.py +2338 -0
  296. package/.next/standalone/sdk/python/tests/integrations/test_llama_index.py +1576 -0
  297. package/.next/standalone/sdk/python/tests/integrations/test_pydantic_ai.py +1102 -0
  298. package/.next/standalone/sdk/python/tests/test_context.py +410 -0
  299. package/.next/standalone/sdk/python/tests/test_docs.py +411 -0
  300. package/.next/standalone/sdk/python/tests/test_durability.py +1352 -0
  301. package/.next/standalone/sdk/python/tests/test_encoding.py +571 -0
  302. package/.next/standalone/sdk/python/tests/test_integrations.py +1127 -0
  303. package/.next/standalone/sdk/python/tests/test_no_customer_identifiers.py +214 -0
  304. package/.next/standalone/sdk/python/tests/test_packaging.py +185 -0
  305. package/.next/standalone/sdk/python/tests/test_resolver_umbrella.py +178 -0
  306. package/.next/standalone/sdk/python/tests/test_scopes.py +487 -0
  307. package/.next/standalone/sdk/python/tests/test_sdk.py +923 -0
  308. package/.next/standalone/sdk/python/tests/test_server_contract.py +650 -0
  309. package/.next/standalone/sdk/python/tests/test_site_docs.py +371 -0
  310. package/.next/standalone/sdk/python/tests/test_skill_snippets.py +165 -0
  311. package/.next/standalone/sdk/python/tests/test_spool_contract.py +287 -0
  312. package/.next/standalone/sdk/python/tests/test_spool_creation.py +360 -0
  313. package/.next/standalone/sdk/python/tests/test_wire_format.py +279 -0
  314. package/.next/standalone/sdk/python/tests/test_zero_dependencies.py +378 -0
  315. package/.next/standalone/sdk/python/uv.lock +6005 -0
  316. package/.next/standalone/server.js +1 -1
  317. package/README.md +77 -21
  318. package/bin/failproofai.mjs +145 -11
  319. package/dist/cli.mjs +4482 -2205
  320. package/dist/index.js +5 -5
  321. package/dist/worker.mjs +2399 -1978
  322. package/package.json +29 -22
  323. package/policy-pack/SHA256SUMS +2 -0
  324. package/policy-pack/failproofai-pack.json +732 -0
  325. package/policy-pack/failproofai-pack.mjs +2017 -0
  326. package/scripts/build-policy-pack.mjs +121 -0
  327. package/scripts/changelog-section.py +77 -0
  328. package/scripts/prune-standalone.mjs +3 -0
  329. package/scripts/python-version.py +232 -0
  330. package/scripts/translate-docs/cli.ts +21 -0
  331. package/scripts/translate-docs/mintlify-nav.ts +85 -13
  332. package/scripts/translate-docs/translator.ts +66 -11
  333. package/src/audit/cache.ts +40 -3
  334. package/src/audit/cli.ts +1 -1
  335. package/src/audit/index.ts +1 -1
  336. package/src/audit/replay.ts +89 -3
  337. package/src/audit/report.ts +5 -5
  338. package/src/audit/schedule-cli.ts +49 -53
  339. package/src/hooks/builtin-policies.ts +217 -579
  340. package/src/hooks/cloud-enrollment-cli.ts +66 -27
  341. package/src/hooks/cloud-managed-policies.ts +6 -1
  342. package/src/hooks/configure-wizard.ts +1 -1
  343. package/src/hooks/custom-hooks-loader.ts +89 -6
  344. package/src/hooks/fp-home.ts +92 -4
  345. package/src/hooks/fp-reset.ts +26 -2
  346. package/src/hooks/handler.ts +181 -11
  347. package/src/hooks/harness-cli.ts +79 -25
  348. package/src/hooks/hook-activity-store.ts +13 -3
  349. package/src/hooks/install-prompt.ts +25 -3
  350. package/src/hooks/manager.ts +418 -172
  351. package/src/hooks/migrations.ts +2 -2
  352. package/src/hooks/pack-cli.ts +505 -0
  353. package/src/hooks/pack-failclosed.ts +189 -0
  354. package/src/hooks/pack-manifest.ts +344 -0
  355. package/src/hooks/pack-store.ts +930 -0
  356. package/src/hooks/policy-catalog.ts +535 -0
  357. package/src/hooks/policy-evaluator.ts +24 -16
  358. package/src/hooks/policy-presets.ts +4 -2
  359. package/src/hooks/policy-registry.ts +8 -2
  360. package/src/hooks/policy-types.ts +26 -0
  361. package/src/hooks/session-pause-cli.ts +33 -9
  362. package/src/hooks/tui.ts +570 -0
  363. package/src/hooks/types.ts +15 -1
  364. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_usx0j._.js +0 -3
  365. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_zk340._.js +0 -3
  366. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0agdw2a._.js +0 -3
  367. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d1u_na._.js +0 -3
  368. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oy4kxb._.js +0 -3
  369. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zf034w._.js +0 -3
  370. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1tvn4wf._.js +0 -3
  371. package/.next/standalone/.next/server/chunks/_0lxbzdq._.js +0 -3
  372. package/.next/standalone/.next/server/chunks/_1ger0a2._.js +0 -3
  373. package/.next/standalone/.next/server/chunks/_1zuiiy3._.js +0 -3
  374. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_1iiwm5e._.js +0 -3
  375. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kc8_v5._.js +0 -4
  376. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kgy9da._.js +0 -4
  377. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mhqk5a._.js +0 -4
  378. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pltpn8._.js +0 -4
  379. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qkcyf-._.js +0 -4
  380. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w0x_ok._.js +0 -4
  381. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1_dfocn._.js +0 -4
  382. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1bfex62._.js +0 -5
  383. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1kzapg5._.js +0 -6
  384. package/.next/standalone/.next/static/chunks/36fw6yk1s6x_f.js +0 -1
  385. package/.next/standalone/.next/static/chunks/3tzq0260n17ae.js +0 -6
  386. package/.next/standalone/.next/static/chunks/3wq9x0c-7ld5d.css +0 -2
  387. /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → nwbyWT06Ud0XdXOrVJyvS}/_buildManifest.js +0 -0
  388. /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → nwbyWT06Ud0XdXOrVJyvS}/_clientMiddlewareManifest.js +0 -0
  389. /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → nwbyWT06Ud0XdXOrVJyvS}/_ssgManifest.js +0 -0
@@ -0,0 +1,535 @@
1
+ /**
2
+ * The builtin policy CATALOG: what each policy is, never what it does.
3
+ *
4
+ * Split out of `builtin-policies.ts` so the metadata every consumer actually
5
+ * reads — the setup picker, `failproofai policies`, the presets, the audit
6
+ * report, the dashboard's server action — can be listed, searched and rendered
7
+ * without loading a single policy implementation. That is what lets a machine
8
+ * browse the catalog offline while the executable half moves to a fetched pack.
9
+ *
10
+ * ## Rules this file lives by
11
+ *
12
+ * - **Pure data.** No functions, no RegExp, no computed values. Every entry is
13
+ * a literal, so this module can be read, serialized, and eventually shipped
14
+ * as a manifest rather than as code.
15
+ * - **No value import from `builtin-policies.ts`.** Type-only imports are fine.
16
+ * `policy-evaluator.ts` builds `POLICY_PARAMS_MAP` from `BUILTIN_POLICIES` at
17
+ * MODULE SCOPE, so an import cycle here is a ReferenceError under ESM and a
18
+ * `.filter of undefined` under the CJS bundle — thrown at import time, on the
19
+ * hook critical path.
20
+ * - **Order is load-bearing and must not be sorted or regrouped.** Policy
21
+ * evaluation short-circuits on the first deny, so this array's order decides
22
+ * which policy name reaches the agent, the activity log, PostHog and the audit
23
+ * report. First appearance of each `category` is also what orders the sections
24
+ * in the TUI picker and the dashboard.
25
+ * - **Absent optionals stay absent.** `beta`, `alwaysOn` and `params` are read
26
+ * with `in` and `undefined` checks; default-filling them changes behaviour and
27
+ * fails existing tests.
28
+ *
29
+ * `params.default` values are handed to policies BY REFERENCE, so this must stay
30
+ * one module-level const — never a factory minting fresh defaults per call.
31
+ */
32
+ import type { PolicyCatalogEntry, PolicyParamsSchema } from "./policy-types";
33
+
34
+ export const POLICY_CATALOG: PolicyCatalogEntry[] = [
35
+ {
36
+ name: "sanitize-jwt",
37
+ description: "Stop Claude from reading JWTs in tool responses",
38
+ displayTitle: "Redacted JWT tokens from tool output",
39
+ impact: "Stops the agent from echoing auth tokens it saw in command output.",
40
+ match: { events: ["PostToolUse"] },
41
+ defaultEnabled: true,
42
+ category: "Sanitize",
43
+ },
44
+ {
45
+ name: "sanitize-api-keys",
46
+ description: "Stop Claude from reading API keys (OpenAI, Anthropic, GitHub, AWS, Stripe, Google) in tool responses",
47
+ displayTitle: "Redacted API keys from tool output",
48
+ impact: "Catches OpenAI / Anthropic / GitHub / AWS / Stripe / Google keys before the model sees them.",
49
+ match: { events: ["PostToolUse"] },
50
+ defaultEnabled: true,
51
+ category: "Sanitize",
52
+ params: {
53
+ additionalPatterns: {
54
+ type: "pattern[]",
55
+ description: "Additional API key patterns to scrub, each with { regex, label }",
56
+ default: [],
57
+ },
58
+ } satisfies PolicyParamsSchema,
59
+ },
60
+ {
61
+ name: "sanitize-connection-strings",
62
+ description: "Stop Claude from reading database connection strings with embedded credentials in tool responses",
63
+ displayTitle: "Redacted database connection strings from tool output",
64
+ impact: "Strips embedded DB credentials before they reach the model context.",
65
+ match: { events: ["PostToolUse"] },
66
+ defaultEnabled: true,
67
+ category: "Sanitize",
68
+ },
69
+ {
70
+ name: "sanitize-private-key-content",
71
+ description: "Stop Claude from reading PEM private key content in tool responses",
72
+ displayTitle: "Redacted PEM private keys from tool output",
73
+ impact: "Prevents private key bodies from being echoed into chat context.",
74
+ match: { events: ["PostToolUse"] },
75
+ defaultEnabled: true,
76
+ category: "Sanitize",
77
+ },
78
+ {
79
+ name: "sanitize-bearer-tokens",
80
+ displayTitle: "Redacted bearer tokens from tool output",
81
+ impact: "Strips Authorization: Bearer values before they hit the model.",
82
+ description: "Stop Claude from reading Authorization Bearer tokens in tool responses",
83
+ match: { events: ["PostToolUse"] },
84
+ defaultEnabled: true,
85
+ category: "Sanitize",
86
+ },
87
+ {
88
+ name: "protect-env-vars",
89
+ displayTitle: "Tried to dump environment variables to chat",
90
+ impact: "Env vars often contain secrets; blocking `env` / `printenv` keeps them out of the model context.",
91
+ description: "Prevent commands that read environment variables",
92
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
93
+ defaultEnabled: true,
94
+ category: "Environment",
95
+ },
96
+ {
97
+ name: "block-env-files",
98
+ displayTitle: "Tried to read or write a .env file",
99
+ impact: "`.env` files routinely contain API keys and DB credentials.",
100
+ description: "Block reading/writing .env files",
101
+ match: { events: ["PreToolUse"] },
102
+ defaultEnabled: true,
103
+ category: "Environment",
104
+ },
105
+ {
106
+ name: "block-read-outside-cwd",
107
+ displayTitle: "Tried to read files outside your project directory",
108
+ impact: "Stops the agent from peeking at neighboring repos or your home directory.",
109
+ description: "Block file reads outside the session working directory",
110
+ match: { events: ["PreToolUse"], toolNames: ["Read", "Glob", "Grep", "Bash"] },
111
+ defaultEnabled: false,
112
+ category: "Environment",
113
+ params: {
114
+ allowPaths: {
115
+ type: "string[]",
116
+ description: "Absolute paths outside cwd that are allowed to be read",
117
+ default: [],
118
+ },
119
+ } satisfies PolicyParamsSchema,
120
+ },
121
+ {
122
+ name: "block-sudo",
123
+ displayTitle: "Tried to run a command with sudo",
124
+ impact: "Sudo gives the agent root — blocked unless explicitly allow-listed.",
125
+ description: "Block sudo commands",
126
+ // PermissionRequest is Codex's escalation-approval event; fire the same
127
+ // sudo guard there so Codex sandbox bypasses are blocked too.
128
+ match: { events: ["PreToolUse", "PermissionRequest"], toolNames: ["Bash"] },
129
+ defaultEnabled: true,
130
+ category: "Dangerous Commands",
131
+ params: {
132
+ allowPatterns: {
133
+ type: "string[]",
134
+ description: "Sudo command patterns to allow, matched token-by-token (e.g. 'sudo systemctl status')",
135
+ default: [],
136
+ },
137
+ } satisfies PolicyParamsSchema,
138
+ },
139
+ {
140
+ name: "block-curl-pipe-sh",
141
+ displayTitle: "Tried to pipe a downloaded script straight to a shell",
142
+ impact: "`curl ... | sh` runs unverified remote code on your machine.",
143
+ description: "Block piping downloads to shell",
144
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
145
+ defaultEnabled: true,
146
+ category: "Dangerous Commands",
147
+ },
148
+ {
149
+ name: "block-rm-rf",
150
+ displayTitle: "Tried to recursively delete a system path",
151
+ impact: "Catches catastrophic `rm -rf /` and Windows equivalents.",
152
+ description: "Prevent catastrophic deletions",
153
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
154
+ defaultEnabled: false,
155
+ category: "Dangerous Commands",
156
+ params: {
157
+ allowPaths: {
158
+ type: "string[]",
159
+ description: "Paths that are allowed to be recursively deleted",
160
+ default: [],
161
+ },
162
+ } satisfies PolicyParamsSchema,
163
+ },
164
+ {
165
+ name: "block-failproofai-commands",
166
+ displayTitle: "Tried to disable, pause or modify failproofai itself",
167
+ impact: "An agent that can pause or remove enforcement can switch off every other policy.",
168
+ description: "Block failproofai CLI commands, self-pause and uninstallation",
169
+ // PermissionRequest is carried over from the merged-in `block-self-pause`.
170
+ // It is a real enforcement point on Copilot and Devin, and dropping it would
171
+ // have left this guard blind on both.
172
+ match: { events: ["PreToolUse", "PermissionRequest"], toolNames: ["Bash"] },
173
+ defaultEnabled: true,
174
+ alwaysOn: true,
175
+ category: "Dangerous Commands",
176
+ },
177
+ {
178
+ name: "block-kubectl",
179
+ displayTitle: "Tried to run a Kubernetes command",
180
+ impact: "kubectl can change live cluster state — gated unless allow-listed.",
181
+ description: "Block kubectl commands (Kubernetes cluster mutations)",
182
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
183
+ defaultEnabled: false,
184
+ category: "Infra Commands",
185
+ params: {
186
+ allowPatterns: {
187
+ type: "string[]",
188
+ description: "kubectl command patterns to allow, matched token-by-token (e.g. 'kubectl get *', 'kubectl describe *')",
189
+ default: [],
190
+ },
191
+ } satisfies PolicyParamsSchema,
192
+ },
193
+ {
194
+ name: "block-terraform",
195
+ displayTitle: "Tried to run a Terraform/OpenTofu command",
196
+ impact: "Terraform mutates real infrastructure — gated unless allow-listed.",
197
+ description: "Block terraform and tofu (OpenTofu) commands",
198
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
199
+ defaultEnabled: false,
200
+ category: "Infra Commands",
201
+ params: {
202
+ allowPatterns: {
203
+ type: "string[]",
204
+ description: "terraform/tofu command patterns to allow (e.g. 'terraform plan', 'terraform validate')",
205
+ default: [],
206
+ },
207
+ } satisfies PolicyParamsSchema,
208
+ },
209
+ {
210
+ name: "block-aws-cli",
211
+ displayTitle: "Tried to run an AWS CLI command",
212
+ impact: "AWS CLI can spend money or break prod — gated.",
213
+ description: "Block aws CLI commands",
214
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
215
+ defaultEnabled: false,
216
+ category: "Infra Commands",
217
+ params: {
218
+ allowPatterns: {
219
+ type: "string[]",
220
+ description: "aws CLI command patterns to allow (e.g. 'aws s3 ls *', 'aws sts get-caller-identity')",
221
+ default: [],
222
+ },
223
+ } satisfies PolicyParamsSchema,
224
+ },
225
+ {
226
+ name: "block-gcloud",
227
+ displayTitle: "Tried to run a Google Cloud command",
228
+ impact: "gcloud can spend money or break prod — gated.",
229
+ description: "Block gcloud (Google Cloud) CLI commands",
230
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
231
+ defaultEnabled: false,
232
+ category: "Infra Commands",
233
+ params: {
234
+ allowPatterns: {
235
+ type: "string[]",
236
+ description: "gcloud command patterns to allow (e.g. 'gcloud auth list', 'gcloud config list')",
237
+ default: [],
238
+ },
239
+ } satisfies PolicyParamsSchema,
240
+ },
241
+ {
242
+ name: "block-az-cli",
243
+ displayTitle: "Tried to run an Azure CLI command",
244
+ impact: "az can spend money or break prod — gated.",
245
+ description: "Block az (Azure) CLI commands",
246
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
247
+ defaultEnabled: false,
248
+ category: "Infra Commands",
249
+ params: {
250
+ allowPatterns: {
251
+ type: "string[]",
252
+ description: "az CLI command patterns to allow (e.g. 'az account show', 'az group list')",
253
+ default: [],
254
+ },
255
+ } satisfies PolicyParamsSchema,
256
+ },
257
+ {
258
+ name: "block-helm",
259
+ displayTitle: "Tried to run a Helm command",
260
+ impact: "Helm releases mutate cluster state — gated.",
261
+ description: "Block helm commands",
262
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
263
+ defaultEnabled: false,
264
+ category: "Infra Commands",
265
+ params: {
266
+ allowPatterns: {
267
+ type: "string[]",
268
+ description: "helm command patterns to allow (e.g. 'helm list', 'helm status *')",
269
+ default: [],
270
+ },
271
+ } satisfies PolicyParamsSchema,
272
+ },
273
+ {
274
+ name: "block-gh-pipeline",
275
+ displayTitle: "Tried to run a privileged GitHub CLI pipeline command",
276
+ impact: "Catches `gh workflow run`, `gh pr merge`, `gh secret set`, etc.",
277
+ description: "Block gh CLI pipeline-trigger subcommands (workflow run, run rerun/cancel, pr merge, release create/delete, cache delete, secret set/delete)",
278
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
279
+ defaultEnabled: false,
280
+ category: "Infra Commands",
281
+ params: {
282
+ allowPatterns: {
283
+ type: "string[]",
284
+ 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",
285
+ default: [],
286
+ },
287
+ } satisfies PolicyParamsSchema,
288
+ },
289
+ {
290
+ name: "block-secrets-write",
291
+ displayTitle: "Tried to write a secret-key file",
292
+ impact: "Stops the agent from creating `.pem`, `id_rsa`, `credentials.json`, etc.",
293
+ description: "Block writing secret key files",
294
+ match: { events: ["PreToolUse"], toolNames: ["Write"] },
295
+ defaultEnabled: false,
296
+ category: "Dangerous Commands",
297
+ params: {
298
+ additionalPatterns: {
299
+ type: "string[]",
300
+ description: "Additional filename patterns (substrings) to block",
301
+ default: [],
302
+ },
303
+ } satisfies PolicyParamsSchema,
304
+ },
305
+ {
306
+ name: "block-push-master",
307
+ displayTitle: "Tried to push directly to main/master",
308
+ impact: "Direct pushes to a protected branch bypass review.",
309
+ description: "Block pushing to main/master",
310
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
311
+ defaultEnabled: true,
312
+ category: "Git",
313
+ params: {
314
+ protectedBranches: {
315
+ type: "string[]",
316
+ description: "Branch names to protect from direct pushes",
317
+ default: ["main", "master"],
318
+ },
319
+ } satisfies PolicyParamsSchema,
320
+ },
321
+ {
322
+ name: "block-force-push",
323
+ displayTitle: "Tried to force-push",
324
+ impact: "Force-pushes rewrite history and can clobber teammates' work.",
325
+ description: "Prevent force-pushing to any branch",
326
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
327
+ defaultEnabled: false,
328
+ category: "Git",
329
+ },
330
+ {
331
+ name: "block-work-on-main",
332
+ displayTitle: "Tried to commit or merge on main/master",
333
+ impact: "Work should land via PR — direct commits skip review.",
334
+ description: "Block git commits and merges on main/master branch",
335
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
336
+ defaultEnabled: false,
337
+ category: "Git",
338
+ params: {
339
+ protectedBranches: {
340
+ type: "string[]",
341
+ description: "Branch names where commits/merges are blocked",
342
+ default: ["main", "master"],
343
+ },
344
+ } satisfies PolicyParamsSchema,
345
+ },
346
+ {
347
+ name: "warn-git-amend",
348
+ displayTitle: "Used git commit --amend",
349
+ impact: "Amending after a push rewrites history that others may have pulled.",
350
+ description: "Warns before amending git commits, which rewrites history",
351
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
352
+ defaultEnabled: false,
353
+ category: "Git",
354
+ },
355
+ {
356
+ name: "warn-git-stash-drop",
357
+ displayTitle: "Tried to drop or clear git stash",
358
+ impact: "Stash deletions are permanent and silent.",
359
+ description: "Warns before permanently deleting stashed changes",
360
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
361
+ defaultEnabled: false,
362
+ category: "Git",
363
+ },
364
+ {
365
+ name: "warn-all-files-staged",
366
+ displayTitle: "Staged all files with git add -A / .",
367
+ impact: "Wide stages routinely catch generated files or secrets you didn't intend to commit.",
368
+ description: "Warns before staging all working tree files with git add -A / . / --all",
369
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
370
+ defaultEnabled: false,
371
+ category: "Git",
372
+ },
373
+ {
374
+ name: "warn-destructive-sql",
375
+ displayTitle: "Ran destructive SQL (DROP / TRUNCATE / DELETE without WHERE)",
376
+ impact: "Easy way to wipe a table by accident.",
377
+ description: "Warn before executing destructive SQL (DROP/TRUNCATE/DELETE without WHERE) via database clients",
378
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
379
+ defaultEnabled: false,
380
+ category: "Database",
381
+ },
382
+ {
383
+ name: "warn-schema-alteration",
384
+ displayTitle: "Altered a database schema column",
385
+ impact: "ALTER TABLE operations can lock tables and break readers.",
386
+ description: "Warns before SQL schema changes (ALTER TABLE with column or rename operations)",
387
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
388
+ defaultEnabled: false,
389
+ category: "Database",
390
+ },
391
+ {
392
+ name: "warn-package-publish",
393
+ displayTitle: "Tried to publish a package",
394
+ impact: "Publishes are irreversible — `npm publish` / `cargo publish` shouldn't happen without intent.",
395
+ description: "Warn before publishing packages to public registries (npm, PyPI, crates.io, RubyGems, etc.)",
396
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
397
+ defaultEnabled: false,
398
+ category: "Packages & System",
399
+ },
400
+ {
401
+ name: "warn-global-package-install",
402
+ displayTitle: "Installed a package globally",
403
+ impact: "`npm i -g`, `cargo install`, `pip --user` pollute your machine outside the project.",
404
+ description: "Warns before installing packages globally (npm -g, cargo install, etc.)",
405
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
406
+ defaultEnabled: false,
407
+ category: "Packages & System",
408
+ },
409
+ {
410
+ name: "prefer-package-manager",
411
+ displayTitle: "Used a non-preferred package manager",
412
+ impact: "Mixing package managers creates lockfile churn for your team.",
413
+ description: "Blocks non-preferred package managers and tells Claude to use an allowed one (e.g., uv instead of pip)",
414
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
415
+ defaultEnabled: false,
416
+ category: "Packages & System",
417
+ params: {
418
+ allowed: {
419
+ type: "string[]",
420
+ description: "Allowed package manager names (e.g. ['uv', 'bun']). Any detected manager not in this list is blocked.",
421
+ default: [],
422
+ },
423
+ blocked: {
424
+ type: "string[]",
425
+ description: "Additional manager names to block beyond the built-in list (e.g. ['pdm', 'pipx']).",
426
+ default: [],
427
+ },
428
+ } satisfies PolicyParamsSchema,
429
+ },
430
+ {
431
+ name: "warn-large-file-write",
432
+ displayTitle: "Wrote a file larger than the configured threshold",
433
+ impact: "Catches accidentally large file writes (logs, binaries, model dumps).",
434
+ description: "Warn before writing files larger than 1MB (configurable via thresholdKb param)",
435
+ match: { events: ["PreToolUse"], toolNames: ["Write"] },
436
+ defaultEnabled: false,
437
+ category: "Packages & System",
438
+ params: {
439
+ thresholdKb: {
440
+ type: "number",
441
+ description: "File size threshold in KB above which a warning is issued",
442
+ default: 1024,
443
+ },
444
+ } satisfies PolicyParamsSchema,
445
+ },
446
+ {
447
+ name: "warn-background-process",
448
+ displayTitle: "Started a long-lived background process",
449
+ impact: "Catches `nohup` / `&` / `screen` / `tmux` / `disown` patterns that the agent often forgets to clean up.",
450
+ description: "Warns before starting detached or background processes",
451
+ match: { events: ["PreToolUse"], toolNames: ["Bash"] },
452
+ defaultEnabled: false,
453
+ category: "Packages & System",
454
+ },
455
+ {
456
+ name: "warn-repeated-tool-calls",
457
+ displayTitle: "Called the same tool 3+ times with identical arguments",
458
+ impact: "Usually a sign of a stuck loop burning tokens.",
459
+ description: "Warn when the same tool is called 3+ times with identical parameters",
460
+ match: { events: ["PreToolUse"] },
461
+ defaultEnabled: false,
462
+ category: "AI Behavior",
463
+ },
464
+ {
465
+ name: "require-commit-before-stop",
466
+ displayTitle: "Stopped with uncommitted changes",
467
+ impact: "Work not in a commit is invisible to teammates and easy to lose.",
468
+ description: "Require all changes to be committed before Claude stops",
469
+ match: { events: ["Stop"] },
470
+ defaultEnabled: false,
471
+ category: "Workflow",
472
+ },
473
+ {
474
+ name: "require-push-before-stop",
475
+ displayTitle: "Stopped with unpushed commits",
476
+ impact: "Local-only commits won't trigger CI or be reviewable.",
477
+ description: "Require all commits to be pushed to remote before Claude stops",
478
+ match: { events: ["Stop"] },
479
+ defaultEnabled: false,
480
+ category: "Workflow",
481
+ params: {
482
+ remote: {
483
+ type: "string",
484
+ description: "Remote name to push to (default: origin)",
485
+ default: "origin",
486
+ },
487
+ baseBranch: {
488
+ type: "string",
489
+ description: "Base branch to compare against (default: main)",
490
+ default: "main",
491
+ },
492
+ } satisfies PolicyParamsSchema,
493
+ },
494
+ {
495
+ name: "require-pr-before-stop",
496
+ displayTitle: "Stopped without a PR for the branch",
497
+ impact: "Branches without PRs don't get reviewed.",
498
+ description: "Require a pull request to exist for the current branch before Claude stops",
499
+ match: { events: ["Stop"] },
500
+ defaultEnabled: false,
501
+ category: "Workflow",
502
+ params: {
503
+ baseBranch: {
504
+ type: "string",
505
+ description: "Base branch to compare against (default: main)",
506
+ default: "main",
507
+ },
508
+ } satisfies PolicyParamsSchema,
509
+ },
510
+ {
511
+ name: "require-no-conflicts-before-stop",
512
+ displayTitle: "Stopped with a branch that conflicts with main",
513
+ impact: "Conflicting branches can't merge — surface them early.",
514
+ description: "Require the current branch to merge cleanly with the base branch before Claude stops",
515
+ match: { events: ["Stop"] },
516
+ defaultEnabled: false,
517
+ category: "Workflow",
518
+ params: {
519
+ baseBranch: {
520
+ type: "string",
521
+ description: "Base branch to check for conflicts against (default: main)",
522
+ default: "main",
523
+ },
524
+ } satisfies PolicyParamsSchema,
525
+ },
526
+ {
527
+ name: "require-ci-green-before-stop",
528
+ displayTitle: "Stopped with failing CI",
529
+ impact: "Failing CI blocks deploy.",
530
+ description: "Require CI checks to pass on the current HEAD commit before Claude stops (ignores stale runs on prior commits)",
531
+ match: { events: ["Stop"] },
532
+ defaultEnabled: false,
533
+ category: "Workflow",
534
+ },
535
+ ];
@@ -4,8 +4,7 @@
4
4
  */
5
5
  import type { HookEventType, SessionMetadata } from "./types";
6
6
  import type { PolicyContext, HooksConfig } from "./policy-types";
7
- import { BUILTIN_POLICIES } from "./builtin-policies";
8
- import { DEFAULT_POLICY_NAMESPACE, getPoliciesForEvent, normalizePolicyName } from "./policy-registry";
7
+ import { DEFAULT_POLICY_NAMESPACE, getPoliciesForEvent } from "./policy-registry";
9
8
  import { hookLogInfo, hookLogWarn } from "./hook-logger";
10
9
  import { trackHookEvent } from "./hook-telemetry";
11
10
  import { getInstanceId } from "../../lib/telemetry-id";
@@ -28,11 +27,6 @@ export interface EvaluationResult {
28
27
  decision: "allow" | "deny" | "instruct";
29
28
  }
30
29
 
31
- // Build a map from canonical policy name to its params schema (for injecting defaults).
32
- // Keyed by canonical name because registered policies always carry the canonical form.
33
- const POLICY_PARAMS_MAP = new Map(
34
- BUILTIN_POLICIES.filter((p) => p.params).map((p) => [normalizePolicyName(p.name), p.params!]),
35
- );
36
30
 
37
31
  /**
38
32
  * Look up policy params for a canonical policy name in the user config,
@@ -91,18 +85,25 @@ export async function evaluatePolicies(
91
85
  // Inject params: merge policyParams[policy.name] over schema defaults.
92
86
  // policy.name is canonical (e.g. "failproofai/block-force-push"); user
93
87
  // config keys may be flat or canonical — getConfigParamsFor accepts both.
94
- const schema = POLICY_PARAMS_MAP.get(policy.name);
88
+ // The schema comes off the REGISTERED policy, so a pack's or a cloud
89
+ // assignment's declared params work exactly like a builtin's. It used to be
90
+ // looked up in a map built from the builtin catalog, which could only ever
91
+ // describe policies compiled into this build.
92
+ const schema = policy.params;
93
+ const userParams = getConfigParamsFor(config, policy.name) ?? {};
95
94
  let ctx: PolicyContext;
96
95
  if (schema) {
97
- const userParams = getConfigParamsFor(config, policy.name) ?? {};
98
96
  const resolvedParams: Record<string, unknown> = {};
99
97
  for (const [key, spec] of Object.entries(schema)) {
100
98
  resolvedParams[key] = key in userParams ? userParams[key] : spec.default;
101
99
  }
102
100
  ctx = { ...baseCtx, params: resolvedParams };
103
101
  } else {
104
- // Custom hooks and policies without schema get empty params
105
- ctx = { ...baseCtx, params: {} };
102
+ // No schema means no defaults to merge but the user may still have
103
+ // configured params for it, and silently dropping what they wrote is how
104
+ // a policy ends up ignoring its own configuration. Absent config still
105
+ // yields `{}`, which is what every schema-less policy saw before.
106
+ ctx = { ...baseCtx, params: userParams };
106
107
  }
107
108
 
108
109
  let result: Awaited<ReturnType<typeof policy.fn>>;
@@ -111,11 +112,18 @@ export async function evaluatePolicies(
111
112
  } catch (err) {
112
113
  const msg = err instanceof Error ? err.message : String(err);
113
114
  hookLogWarn(`policy "${policy.name}" threw: ${msg}`);
114
- // Custom hooks are wrapped in handler.ts with their own try/catch that
115
- // emits custom_hook_error. Anything reaching here is a builtin policy
116
- // crash — track separately so we can surface regressions in builtins.
117
- const isCustom = policy.name.startsWith("custom/") || policy.name.startsWith(".failproofai-");
118
- if (!isCustom) {
115
+ // `policy_evaluation_error` exists to surface regressions in the policies
116
+ // WE compile in, so it must fire only for those.
117
+ //
118
+ // Tested positively — a builtin is exactly a policy in the `failproofai/`
119
+ // namespace — rather than by listing the prefixes that are not builtins.
120
+ // The list version enumerated `custom/` and `.failproofai-` only, so
121
+ // `cloud/…` and `pack/…` both failed it and reported a third party's
122
+ // crash as ours, under a publisher-controlled policy name. Reproduced
123
+ // exactly that way by an observe-mode pack on this branch. A positive test
124
+ // also means the NEXT source kind cannot re-open this by omission.
125
+ const isBuiltin = policy.name.startsWith(`${DEFAULT_POLICY_NAMESPACE}/`);
126
+ if (isBuiltin) {
119
127
  void trackHookEvent(getInstanceId(), "policy_evaluation_error", {
120
128
  policy_name: policy.name,
121
129
  event_type: eventType,
@@ -106,8 +106,10 @@ export const RECOMMENDED_POLICIES: readonly string[] = [
106
106
  "protect-env-vars",
107
107
  "block-env-files",
108
108
  "block-secrets-write",
109
- // The agent cannot disable its own guardrails.
110
- "block-self-pause",
109
+ // The agent cannot disable its own guardrails. `block-failproofai-commands`
110
+ // is `alwaysOn` and registers with or without this entry; it is listed anyway
111
+ // so Recommended reads as the complete set rather than quietly omitting the
112
+ // most important line in it.
111
113
  "block-failproofai-commands",
112
114
  // Commands that are unrecoverable when they are wrong.
113
115
  "block-sudo",
@@ -6,7 +6,7 @@
6
6
  * chunk splitting and remains a true singleton across dynamic imports.
7
7
  */
8
8
  import type { HookEventType } from "./types";
9
- import type { PolicyFunction, PolicyMatcher, RegisteredPolicy } from "./policy-types";
9
+ import type { PolicyFunction, PolicyMatcher, PolicyParamsSchema, RegisteredPolicy } from "./policy-types";
10
10
 
11
11
  const REGISTRY_KEY = "__FAILPROOFAI_POLICY_REGISTRY__";
12
12
  const INDEX_CACHE_KEY = "__FAILPROOFAI_POLICY_INDEX_CACHE__";
@@ -57,11 +57,17 @@ export function registerPolicy(
57
57
  fn: PolicyFunction,
58
58
  match: PolicyMatcher,
59
59
  priority: number = 0,
60
+ params?: PolicyParamsSchema,
60
61
  ): void {
61
62
  const canonical = normalizePolicyName(name);
62
63
  const registry = getRegistry();
63
64
  const idx = registry.findIndex((p) => p.name === canonical);
64
- const entry: RegisteredPolicy = { name: canonical, description, fn, match, priority };
65
+ const entry: RegisteredPolicy = {
66
+ name: canonical, description, fn, match, priority,
67
+ // Absent stays absent: `evaluatePolicies` distinguishes "declares a schema"
68
+ // from "declares none", and a spread `params: undefined` is neither.
69
+ ...(params ? { params } : {}),
70
+ };
65
71
  if (idx >= 0) {
66
72
  registry[idx] = entry;
67
73
  } else {