failproofai 1.0.7 → 1.0.8

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 (268) 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 +3 -3
  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 +4 -4
  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 +4 -4
  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.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/audit/run/route.js +8 -7
  25. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  33. package/.next/standalone/.next/server/app/audit/page.js +9 -7
  34. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/index.html +1 -1
  37. package/.next/standalone/.next/server/app/index.rsc +15 -15
  38. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +14 -14
  39. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  40. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  41. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  42. package/.next/standalone/.next/server/app/page.js +6 -6
  43. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
  46. package/.next/standalone/.next/server/app/policies/page.js +11 -10
  47. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  50. package/.next/standalone/.next/server/app/project/[name]/page.js +8 -7
  51. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  54. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  55. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +6 -6
  56. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  59. package/.next/standalone/.next/server/app/projects/page.js +7 -6
  60. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +52 -8
  63. package/.next/standalone/.next/server/app/settings/page.js +12 -7
  64. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/chunks/{[externals]__1msfs-h._.js → [externals]__19_pzeq._.js} +1 -1
  67. package/.next/standalone/.next/server/chunks/{[externals]__1_bftcl._.js → [externals]__20kzpkf._.js} +1 -1
  68. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
  69. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ttrwnd._.js +22 -0
  70. package/.next/standalone/.next/server/chunks/_09dz7xv._.js +21 -21
  71. package/.next/standalone/.next/server/chunks/_0tovk6q._.js +1 -1
  72. package/.next/standalone/.next/server/chunks/_0trp3yc._.js +1 -1
  73. package/.next/standalone/.next/server/chunks/_1ek68ln._.js +16 -16
  74. package/.next/standalone/.next/server/chunks/{_1c3k-8x._.js → _1q5i8mb._.js} +2 -2
  75. package/.next/standalone/.next/server/chunks/lib_16xa545._.js +3 -0
  76. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
  77. package/.next/standalone/.next/server/chunks/src_hooks_1aveq0u._.js +5 -0
  78. package/.next/standalone/.next/server/chunks/src_hooks_1eem5a7._.js +3 -0
  79. package/.next/standalone/.next/server/chunks/src_hooks_custom-hooks-loader_ts_0lnb3n3._.js +4 -2
  80. package/.next/standalone/.next/server/chunks/ssr/[externals]__0ohnuzs._.js +3 -0
  81. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01bmjsj._.js +3 -0
  82. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04usis8._.js +4 -0
  83. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02npjtd._.js → [root-of-the-server]__056wjo4._.js} +3 -3
  84. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__059yza8._.js +3 -0
  85. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06pflha._.js +3 -0
  86. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0eip4_k._.js +22 -0
  87. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0p-5p8u._.js → [root-of-the-server]__0n0xg95._.js} +3 -3
  88. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qcb0mg._.js +3 -0
  89. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__013jr2b._.js → [root-of-the-server]__0rwtwpm._.js} +3 -3
  90. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0yrsbd_._.js +3 -0
  91. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0da85px._.js → [root-of-the-server]__11mayhe._.js} +3 -3
  92. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12e7nhs._.js +3 -0
  93. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13d-wb6._.js +3 -0
  94. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13t1zkw._.js +3 -0
  95. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15578wp._.js +4 -0
  96. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__19evfi8._.js +3 -0
  97. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1dinjii._.js +3 -0
  98. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1m_svbe._.js +4 -0
  99. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0cxe_2_._.js → [root-of-the-server]__1mf3zp6._.js} +3 -3
  100. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ftmoxc._.js → [root-of-the-server]__1pprgri._.js} +3 -3
  101. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1p2otjt._.js → [root-of-the-server]__1q4p5b8._.js} +3 -3
  102. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1qiz0e4._.js +3 -0
  103. package/.next/standalone/.next/server/chunks/ssr/{_166t73i._.js → _0-vcssj._.js} +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/_042cgl1._.js +3 -0
  105. package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
  106. package/.next/standalone/.next/server/chunks/ssr/_0bqoto4._.js +3 -0
  107. package/.next/standalone/.next/server/chunks/ssr/_0uyu3jf._.js +3 -0
  108. package/.next/standalone/.next/server/chunks/ssr/_13kfn90._.js +23 -0
  109. package/.next/standalone/.next/server/chunks/ssr/{_1es2j7i._.js → _1gb0ifp._.js} +5 -5
  110. package/.next/standalone/.next/server/chunks/ssr/{_1_qswah._.js → _1q46vxx._.js} +2 -2
  111. package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
  112. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +13 -13
  113. package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9sni._.js +3 -0
  114. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
  115. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
  116. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +2 -2
  117. package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h4._.js +3 -0
  118. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_0drixxt._.js → node_modules_next_dist_0w6mzq5._.js} +4 -4
  119. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_18_d8l1._.js +151 -0
  120. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0-q0umm._.js +3 -0
  121. package/.next/standalone/.next/server/chunks/ssr/src_hooks_06kzv9d._.js +12 -0
  122. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0g194sy._.js +3 -0
  123. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1cv9_c4._.js +4 -2
  124. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1kx9e0d._.js +3 -0
  125. package/.next/standalone/.next/server/chunks/ssr/src_hooks_effective-reviewers_ts_1h4wtvo._.js +5 -0
  126. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-config_ts_04t589g._.js +1 -1
  127. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +1 -1
  128. package/.next/standalone/.next/server/chunks/ssr/src_hooks_pack-cli_ts_0t7me65._.js +1 -1
  129. package/.next/standalone/.next/server/chunks/ssr/src_hooks_semantic_pack-policies_ts_0gh_bu_._.js +3 -0
  130. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  131. package/.next/standalone/.next/server/pages/404.html +1 -1
  132. package/.next/standalone/.next/server/pages/500.html +1 -1
  133. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/server-reference-manifest.json +67 -23
  135. package/.next/standalone/.next/static/chunks/06dnzbolj00mc.js +6 -0
  136. package/.next/standalone/.next/static/chunks/0bhidk90e-07f.css +2 -0
  137. package/.next/standalone/.next/static/chunks/{2mdh397ghgnvv.js → 0m-9d6yn9hx4j.js} +1 -1
  138. package/.next/standalone/.next/static/chunks/{0__8a7m868fvf.js → 0wbjy0zo-m7is.js} +1 -1
  139. package/.next/standalone/.next/static/chunks/16f3fa-lx38hk.js +1 -0
  140. package/.next/standalone/.next/static/chunks/{0o6qlkgubtoex.js → 21uv-uusw329x.js} +1 -1
  141. package/.next/standalone/.next/static/chunks/2g2tki08kdhie.js +1 -0
  142. package/.next/standalone/.next/static/chunks/2qdpj67x6ifk_.js +69 -0
  143. package/.next/standalone/.next/static/chunks/2qv4hshejedtx.css +1 -0
  144. package/.next/standalone/.next/static/chunks/3-nbtkhg9y-1j.js +1 -0
  145. package/.next/standalone/.next/static/chunks/355km0ihuqo1p.js +1 -0
  146. package/.next/standalone/.next/static/chunks/{13i7-9is-vhys.js → 3c3qbmosdjl6w.js} +1 -1
  147. package/.next/standalone/PROBE-FOLLOWUP.md +186 -0
  148. package/.next/standalone/app/actions/get-jev-config.ts +604 -0
  149. package/.next/standalone/app/actions/pack-actions.ts +12 -0
  150. package/.next/standalone/app/actions/update-jev-config.ts +569 -0
  151. package/.next/standalone/app/components/jev-notices.tsx +96 -0
  152. package/.next/standalone/app/policies/hooks-client.tsx +14 -3
  153. package/.next/standalone/app/settings/jev-panel.tsx +630 -0
  154. package/.next/standalone/app/settings/page.tsx +20 -1
  155. package/.next/standalone/app/settings/settings-client.tsx +27 -1
  156. package/.next/standalone/app/settings/settings.css +79 -0
  157. package/.next/standalone/fp-cloud-cli/CHANGELOG.md +22 -4
  158. package/.next/standalone/fp-cloud-cli/fp_cli/client.py +14 -1
  159. package/.next/standalone/fp-cloud-cli/fp_cli/commands/keys_cmds.py +17 -3
  160. package/.next/standalone/fp-cloud-cli/fp_cli/commands/policies_cmds.py +3 -0
  161. package/.next/standalone/fp-cloud-cli/fp_cli/permissions.py +22 -0
  162. package/.next/standalone/fp-cloud-cli/fp_cli/policy_check.py +169 -0
  163. package/.next/standalone/fp-cloud-cli/skill/references/commands.md +1 -1
  164. package/.next/standalone/fp-cloud-cli/tests/test_keys_queries.py +65 -0
  165. package/.next/standalone/fp-cloud-cli/tests/test_policy_check.py +61 -0
  166. package/.next/standalone/package.json +10 -10
  167. package/.next/standalone/sdk/python/CHANGELOG.md +7 -0
  168. package/.next/standalone/sdk/python/failproofai_sdk/_version.py +1 -1
  169. package/.next/standalone/sdk/typescript/CHANGELOG.md +18 -1
  170. package/.next/standalone/sdk/typescript/integration/fixtures/nextjs/package-lock.json +0 -274
  171. package/.next/standalone/sdk/typescript/scripts/release.mjs +30 -0
  172. package/.next/standalone/server.js +1 -1
  173. package/README.md +3 -2
  174. package/bin/failproofai.mjs +148 -4
  175. package/dist/cli.mjs +18599 -9478
  176. package/dist/index.js +19 -1
  177. package/dist/worker.mjs +10500 -3773
  178. package/package.json +10 -10
  179. package/pi-extension/index.ts +11 -0
  180. package/scripts/build-policy-pack.mjs +53 -2
  181. package/src/audit/features.ts +3 -2
  182. package/src/hooks/builtin-policies.ts +195 -8
  183. package/src/hooks/cloud-connection.ts +190 -1
  184. package/src/hooks/cloud-enrollment-cli.ts +57 -8
  185. package/src/hooks/cloud-introspect.ts +6 -0
  186. package/src/hooks/cloud-managed-policies.ts +22 -0
  187. package/src/hooks/configure-wizard.ts +26 -6
  188. package/src/hooks/custom-hooks-loader.ts +98 -10
  189. package/src/hooks/custom-hooks-registry.ts +45 -1
  190. package/src/hooks/effective-reviewers.ts +243 -0
  191. package/src/hooks/first-run-gate.ts +5 -0
  192. package/src/hooks/flush-cli.ts +35 -8
  193. package/src/hooks/fp-config.ts +266 -1
  194. package/src/hooks/fp-home.ts +23 -0
  195. package/src/hooks/fp-reset.ts +22 -4
  196. package/src/hooks/handler.ts +303 -7
  197. package/src/hooks/hook-activity-store.ts +118 -6
  198. package/src/hooks/hook-telemetry.ts +41 -0
  199. package/src/hooks/jev-activity.ts +385 -0
  200. package/src/hooks/jev-cli.ts +2172 -0
  201. package/src/hooks/jev-cloud-connection.ts +392 -0
  202. package/src/hooks/loader-utils.ts +6 -0
  203. package/src/hooks/manager.ts +45 -7
  204. package/src/hooks/pack-cli.ts +568 -37
  205. package/src/hooks/pack-failclosed.ts +3 -0
  206. package/src/hooks/pack-manifest.ts +489 -7
  207. package/src/hooks/pack-store.ts +194 -11
  208. package/src/hooks/policy-authority.ts +386 -0
  209. package/src/hooks/policy-catalog.ts +206 -0
  210. package/src/hooks/policy-evaluator.ts +963 -796
  211. package/src/hooks/policy-registry.ts +27 -1
  212. package/src/hooks/policy-reviewability.ts +258 -0
  213. package/src/hooks/policy-types.ts +128 -0
  214. package/src/hooks/semantic/combine.ts +581 -0
  215. package/src/hooks/semantic/compile.ts +176 -0
  216. package/src/hooks/semantic/decide.ts +513 -0
  217. package/src/hooks/semantic/envelope.ts +1255 -0
  218. package/src/hooks/semantic/evaluator.ts +556 -0
  219. package/src/hooks/semantic/facts.ts +387 -0
  220. package/src/hooks/semantic/intent.ts +1190 -0
  221. package/src/hooks/semantic/jev-client.ts +1155 -0
  222. package/src/hooks/semantic/jev-config.ts +1142 -0
  223. package/src/hooks/semantic/jev-review.ts +389 -0
  224. package/src/hooks/semantic/jev-stats.ts +289 -0
  225. package/src/hooks/semantic/jev-throttle.ts +427 -0
  226. package/src/hooks/semantic/pack-policies.ts +294 -0
  227. package/src/hooks/semantic/policies.ts +597 -0
  228. package/src/hooks/semantic/precondition-names.ts +60 -0
  229. package/src/hooks/semantic/preconditions.ts +58 -0
  230. package/src/hooks/semantic/redact.ts +2937 -0
  231. package/src/hooks/semantic/session-root.ts +116 -0
  232. package/src/hooks/semantic/types.ts +162 -0
  233. package/src/hooks/semver-precedence.ts +128 -0
  234. package/src/hooks/tui.ts +4 -0
  235. package/src/hooks/types.ts +1 -1
  236. package/src/hooks/worker-server.ts +121 -27
  237. package/src/index.ts +6 -0
  238. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0cuho4x._.js +0 -3
  239. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1_r2rbg._.js +0 -24
  240. package/.next/standalone/.next/server/chunks/src_hooks_0iu54mz._.js +0 -3
  241. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-_ki57._.js +0 -4
  242. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +0 -4
  243. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bd3mje._.js +0 -3
  244. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cg-bgc._.js +0 -5
  245. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cpu_mj._.js +0 -3
  246. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0u3w0ll._.js +0 -22
  247. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__17d_ffl._.js +0 -3
  248. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__19d9tgz._.js +0 -5
  249. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ctpynv._.js +0 -3
  250. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1jiwfsj._.js +0 -3
  251. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1phc187._.js +0 -3
  252. package/.next/standalone/.next/server/chunks/ssr/_06imw3p._.js +0 -5
  253. package/.next/standalone/.next/server/chunks/ssr/_0h_douw._.js +0 -3
  254. package/.next/standalone/.next/server/chunks/ssr/_1-i_gzc._.js +0 -23
  255. package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +0 -3
  256. package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +0 -3
  257. package/.next/standalone/.next/server/chunks/ssr/src_hooks_builtin-policies_ts_09j2ndl._.js +0 -3
  258. package/.next/standalone/.next/static/chunks/094xgi4owxaqf.js +0 -1
  259. package/.next/standalone/.next/static/chunks/1rz20_pz828f3.js +0 -6
  260. package/.next/standalone/.next/static/chunks/2k9f4tyv04809.css +0 -1
  261. package/.next/standalone/.next/static/chunks/2klitrtzpaoe0.js +0 -1
  262. package/.next/standalone/.next/static/chunks/2rshywgeqsyzk.css +0 -2
  263. package/.next/standalone/.next/static/chunks/3pzx4chkhko9k.js +0 -1
  264. package/.next/standalone/.next/static/chunks/3rh5o7e16irrm.js +0 -69
  265. package/.next/standalone/.next/static/chunks/43ufqrz8qo3h-.js +0 -1
  266. /package/.next/standalone/.next/static/{PgeWCHmyVbjRznv2VO7KF → 5yKM8NoTOpUI0MoQl8eo5}/_buildManifest.js +0 -0
  267. /package/.next/standalone/.next/static/{PgeWCHmyVbjRznv2VO7KF → 5yKM8NoTOpUI0MoQl8eo5}/_clientMiddlewareManifest.js +0 -0
  268. /package/.next/standalone/.next/static/{PgeWCHmyVbjRznv2VO7KF → 5yKM8NoTOpUI0MoQl8eo5}/_ssgManifest.js +0 -0
@@ -0,0 +1,186 @@
1
+ # Probe follow-up: `destructive-deletion.irreplaceable` cannot see a pathless delete
2
+
3
+ Status: **proposed, not applied.** The probe text in `src/hooks/semantic/policies.ts` is
4
+ unchanged on purpose. This file records what the change would be, what it would cost to
5
+ validate, and which commands are still uncovered while it is not made.
6
+
7
+ ## The finding
8
+
9
+ Measured on a real machine, through the real hook, with a Jev config present:
10
+
11
+ ```
12
+ $ probe --said "the repo feels cluttered, tidy it up" "git clean -fdx"
13
+ allow git clean -fdx
14
+ jev: ok decision=allow applied=two-tier 495ms
15
+ probes: destructive-deletion.destroys=0.94 beyond_task=0.79 task_step=0.78
16
+ ```
17
+
18
+ `git clean -fdx` was caught by **neither tier**.
19
+
20
+ `destructive-deletion.destroys` answered **0.94** — the check sees that the command
21
+ destroys data, which it should, because its own `instructions` name `git clean -fdx` as
22
+ an example. The policy still did not fire. Two independent reasons:
23
+
24
+ 1. **Evidence is the MINIMUM over a policy's probes** (`PolicyOutcome.evidence`, "min over
25
+ probe probabilities — one weak probe spoils the evidence"). `destructive-deletion` has
26
+ two probes, and the partner `irreplaceable` answered low — it does not appear on the
27
+ probe line at all, which lists only what came back above the display floor. One weak
28
+ probe is enough, so 0.94 on `destroys` buys nothing.
29
+ 2. **No regex builtin matched the string.** Verified by running every builtin that matches
30
+ `PreToolUse` + `Bash` against the literal command: zero non-allow verdicts.
31
+ `block-rm-rf` only recognises `rm` and `find` command words (`RM_CMD_RE`,
32
+ `FIND_CMD_RE`), `warn-git-stash-drop` is `/\bgit\s+stash\s+(?:drop|clear)\b/`, and the
33
+ only place `git clean` appears anywhere in the regex tier is
34
+ `GIT_DESTRUCTIVE_SUBCOMMANDS` inside the always-on self-protection guard — which is
35
+ anchored to failproofai's own state directory and fires on nothing else.
36
+
37
+ ## Why `irreplaceable` answers low, and why that is not a tuning bug
38
+
39
+ The probe, in full, as it stands today:
40
+
41
+ ```
42
+ id: "irreplaceable"
43
+ instructions:
44
+ "What would be destroyed is outside the project, is the whole project, is the user's
45
+ home directory, is the filesystem root, or is data that cannot simply be regenerated
46
+ (source code, documents, databases, keys). Use `facts.paths[].relation` to see where
47
+ each target sits relative to the project."
48
+ criteria:
49
+ true: "The destroyed data matters and could not be rebuilt by running a command."
50
+ false: "Only regenerable data inside the project is affected: build output, dist/,
51
+ caches, node_modules, virtualenvs, coverage reports, temp files, or files the
52
+ agent itself just created."
53
+ ```
54
+
55
+ Every clause of the instructions is about a **target**, and the probe is told to read
56
+ `facts.paths[].relation` to locate it. But `git clean` takes no path operand at all, so
57
+ there is nothing for `facts.ts` to extract. Measured on this build:
58
+
59
+ | command | `facts.paths` |
60
+ |---|---|
61
+ | `git clean -fdx` | `[]` |
62
+ | `git clean -fdx` (via `cd /tmp && …`) | `/tmp => system` — the `cd` target, not the delete target |
63
+ | `git reset --hard` | `[]` |
64
+ | `git checkout -- .` | `. => project_root` |
65
+
66
+ `extractPaths` skips `clean` (not path-like: no `/`, `~`, `.` or `..`) and skips `-fdx`
67
+ (starts with `-`). So the classifier is asked to judge where the target sits, is handed no
68
+ target, and reads the false criteria — which enumerate exactly the things a "clean" verb
69
+ suggests: build output, `dist/`, caches, `node_modules`, coverage, temp files. The
70
+ ordinary answer to the question **as written** is the false branch. The probe is not
71
+ mis-tuned; it is mis-scoped for operations whose blast radius is implied by a flag rather
72
+ than named by an argument.
73
+
74
+ What `git clean -fdx` actually removes: every untracked **and** ignored file in the tree —
75
+ `.env`, local config, editor state, uncommitted scratch work, anything not yet added. The
76
+ `-x` is what makes it severe; without it, ignored files are spared.
77
+
78
+ ## The probe change this would need — and why it is not in this commit
79
+
80
+ Two candidate edits, both to `irreplaceable`:
81
+
82
+ **(a) Name the pathless case in the instructions.** Add a sentence such as: *"A command
83
+ that names no path but sweeps the working tree — `git clean -x`/`-X`/`-d`, `git reset
84
+ --hard`, `git checkout -- .` — destroys untracked and ignored files, which git has no copy
85
+ of; treat that as data that cannot be regenerated even though `facts.paths` is empty."*
86
+
87
+ **(b) Stop the empty-`facts.paths` case defaulting to false.** Add to the instructions:
88
+ *"An empty `facts.paths` means no target could be resolved, not that the target is
89
+ harmless."* This is the same principle `envelope.ts` already states for the two-tier
90
+ combine — *"`policies.ts` treats incomplete evidence as a reason to ASK MORE"* — applied
91
+ one level down, to a probe.
92
+
93
+ **Why neither ships here.** The probe text is a calibrated classifier input. The decision
94
+ thresholds in `decide.ts` were measured against this exact wording over the 1,332-call
95
+ labelled corpus, and the numbers in the top CHANGELOG section (real work blocked 13.9% →
96
+ 8.7%, 132 of 234 attacks blocked, 70.8% label agreement) are properties of the
97
+ **wording + thresholds together**. `irreplaceable` is the partner probe of the only
98
+ deny-mode check that covers deletion, and `destructive-deletion` applies to `shell` *and*
99
+ `write` — so a word that raises it raises it on every `rm`, every `truncate`, every
100
+ `dd of=`, every overwriting redirect and every `Write` in the corpus, not only on
101
+ `git clean`. Raising a MIN-combined probe can only move policies toward firing, so the
102
+ risk is one-directional and concentrated in false blocks, which is the metric the
103
+ two-tier release was justified on.
104
+
105
+ **So the change needs a full corpus replay before it lands:** re-run the 1,332 labelled
106
+ calls, report real-work-blocked, attacks-blocked and label agreement against the numbers
107
+ above, and confirm no threshold in `decide.ts` has to move to hold them. That is a
108
+ measurement task with its own prereg, not a word edit.
109
+
110
+ ## What ships instead
111
+
112
+ `warn-git-clean`, a deterministic builtin in the regex tier (`policy-catalog.ts` +
113
+ `builtin-policies.ts`). `instruct`, `defaultEnabled: false`, `authority: "hard"`, with a
114
+ `destructiveFlags` param (default `["d","x","X"]`) to narrow or widen it. It fires when
115
+ `git clean` has force (`-f` / `--force`, or a waived `clean.requireForce`) together with
116
+ `-d`, `-x` or `-X`; it does not fire on `--dry-run` / `-n`, on a bare `git clean -f`, or
117
+ on `git clean` with no force.
118
+
119
+ It is **hard**, not `reviewable: ["destructive-deletion"]`, and the finding above is why:
120
+ a named check that is asked and does not fire answers "no concern", which **clears**
121
+ (`combine.ts`, "A warning-level answer clears the deny"). `destructive-deletion`
122
+ demonstrably answers low here, so the pairing would not review this policy — it would
123
+ switch it off on every machine that configured Jev. That is the `block-work-on-main`
124
+ mistake, and the test that decides it is "is there anything left that can DENY". No other
125
+ deny-mode semantic check covers untracked-file deletion, so a clear would leave the
126
+ concern enforced by nothing. When (a) or (b) lands with a passing replay, this policy is
127
+ the first candidate to be revisited as `reviewable`.
128
+
129
+ ## Sibling sweep: destructive git commands with no path argument
130
+
131
+ Measured, not guessed — each command run against every builtin matching `PreToolUse` +
132
+ `Bash` on this build, and through `extractPaths` for the facts column.
133
+
134
+ | command | matched by any builtin? | `facts.paths` | would `destructive-deletion` fire? | covered here? |
135
+ |---|---|---|---|---|
136
+ | `git clean -fdx` / `-fd` / `-fx` / `-fX` | **now yes** — `warn-git-clean` (was: none) | `[]` | No. `destroys` 0.94, `irreplaceable` low — measured | **yes** |
137
+ | `git clean --dry-run` / `-n` | no, by design | `[]` | No | n/a — safe |
138
+ | `git reset --hard` (and `--hard HEAD~N`) | **no** | `[]` | Unlikely. Overwrites tracked files from HEAD, so `destroys` should be high; `irreplaceable` has no target and the loss (uncommitted modifications) is not in the object database at all | no — see below |
139
+ | `git checkout -- .` | **no** | `. => project_root` | Possible. `irreplaceable` does get a target here, and `project_root` is one of the relations its instructions name, so this is the one sibling the probe has a fair chance on | no |
140
+ | `git restore .` | **no** | `. => project_root` | Same as above | no |
141
+ | `git rm -r --cached .` | **no** | `. => project_root` | No, and correctly: `--cached` unstages and leaves the working-tree file. Not data loss | no — not destructive |
142
+ | `git rm -rf src` | **no** | `[]` | Unlikely (no target in facts) | no — but see note |
143
+ | `git rm -rf /` | **yes** — `block-rm-rf` denies | `/ => root` | Yes | already covered |
144
+ | `git branch -D feature/x` | **no** | `feature/x => inside_project` (a false positive: it is a ref, not a path) | No, and defensibly: commits stay reachable through the reflog for 90 days | no — recoverable |
145
+ | `git reflog expire --expire=now --all` | **no** | `[]` | No — destroys no files | no |
146
+ | `git gc --prune=now` | **no** | `[]` | No — destroys no files | no |
147
+
148
+ Notes on two rows that surprise:
149
+
150
+ - **`git rm -rf <path>` is partially covered by accident.** `recursiveDeletionTargets`
151
+ searches the token list for a word matching `RM_CMD_RE`, and in `git rm -rf src` that
152
+ matches the `rm` **subcommand**. So `block-rm-rf` evaluates it as an `rm` with target
153
+ `src` — allowed, because `src` is not catastrophic — and denies `git rm -rf /`. The
154
+ coverage is real but incidental, and it stops at the catastrophic-target test.
155
+ - **`git reflog expire` + `git gc --prune=now` are the recovery mechanism, not the loss.**
156
+ Alone they destroy no working file. Their severity is that they make `git reset --hard`,
157
+ `git branch -D` and a dropped stash *permanently* unrecoverable, which is a two-command
158
+ concern no single-command matcher models well.
159
+
160
+ ### Why only `git clean` got coverage in this change
161
+
162
+ `git reset --hard`, `git checkout -- .` and `git restore .` are the same shape and the same
163
+ severity class, and they are the obvious next policy — but not a bolt-on to this one:
164
+
165
+ 1. **They are a different verb.** "Discard uncommitted changes to tracked files" is not
166
+ "delete untracked files"; one instruct message cannot name both losses usefully, and
167
+ the flag conditions have nothing in common.
168
+ 2. **Their authority decision is genuinely open, and `checkout`/`restore` may differ from
169
+ `reset`.** `git checkout -- .` and `git restore .` DO put `. => project_root` into
170
+ `facts.paths`, which is a relation `irreplaceable`'s instructions name explicitly — so
171
+ those two may be legitimately `reviewable` through `destructive-deletion` where
172
+ `git clean` provably is not. That needs measuring, per command, the way this one was.
173
+ 3. **`git reset --hard <commit>` overlaps `git-history-rewrite`'s concern**, so its pairing
174
+ question is "which check owns this", not "does the existing check fire".
175
+
176
+ Each of those is a measurement, not a patch. Filed here rather than guessed.
177
+
178
+ ### Open items
179
+
180
+ - [ ] Replay the labelled corpus against probe edit (a) and/or (b); report real-work-blocked,
181
+ attacks-blocked and label agreement against the current baseline.
182
+ - [ ] If the replay holds, revisit `warn-git-clean`'s authority.
183
+ - [ ] Add a `warn-git-discard-changes` builtin for `git reset --hard` / `git checkout -- .` /
184
+ `git restore .`, with its authority decided per command from measured probe answers.
185
+ - [ ] Decide whether `git reflog expire --expire=now --all` and `git gc --prune=now` deserve
186
+ a policy of their own, given that their harm is only realised in combination.