failproofai 1.0.10 → 1.0.11-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 (296) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +6 -6
  3. package/.next/standalone/.next/prerender-manifest.json +4 -4
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +3 -3
  6. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page.js +4 -4
  8. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.meta +8 -0
  12. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  13. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
  14. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  15. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +3 -3
  17. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  18. package/.next/standalone/.next/server/app/_not-found/page.js +4 -4
  19. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  22. package/.next/standalone/.next/server/app/_not-found.meta +8 -0
  23. package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
  24. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  25. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
  26. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  27. package/.next/standalone/.next/server/app/api/audit/invite/route.js +4 -4
  28. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/audit/run/route.js +4 -4
  30. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/audit/status/route.js +1 -1
  32. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/auth/login-request/route.js +2 -2
  34. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js +4 -4
  36. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/auth/logout/route.js +3 -3
  38. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/auth/status/route.js +3 -3
  40. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +1 -1
  42. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/audit/page/build-manifest.json +3 -3
  44. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  45. package/.next/standalone/.next/server/app/audit/page.js +4 -4
  46. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/index.html +1 -1
  49. package/.next/standalone/.next/server/app/index.meta +8 -0
  50. package/.next/standalone/.next/server/app/index.rsc +14 -14
  51. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
  52. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
  53. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  54. package/.next/standalone/.next/server/app/page/build-manifest.json +3 -3
  55. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  56. package/.next/standalone/.next/server/app/page.js +4 -4
  57. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/policies/page/build-manifest.json +3 -3
  60. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
  61. package/.next/standalone/.next/server/app/policies/page.js +8 -8
  62. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +3 -3
  65. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  66. package/.next/standalone/.next/server/app/project/[name]/page.js +5 -5
  67. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +3 -3
  70. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  71. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  72. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +5 -5
  73. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  74. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  75. package/.next/standalone/.next/server/app/projects/page/build-manifest.json +3 -3
  76. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  77. package/.next/standalone/.next/server/app/projects/page.js +5 -5
  78. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/settings/page/build-manifest.json +3 -3
  81. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  82. package/.next/standalone/.next/server/app/settings/page.js +9 -9
  83. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  84. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/chunks/{[externals]__0qxhecv._.js → [externals]__0d7i9ea._.js} +2 -2
  86. package/.next/standalone/.next/server/chunks/{[externals]__0sg9-3p._.js → [externals]__0hjaw70._.js} +1 -1
  87. package/.next/standalone/.next/server/chunks/[externals]__1_9ze9b._.js +3 -0
  88. package/.next/standalone/.next/server/chunks/[externals]__1oenfmn._.js +3 -0
  89. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08dchfu._.js +1 -1
  90. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ga9hs7._.js +3 -0
  91. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l3yhx4._.js +2 -2
  92. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0moxohc._.js +22 -0
  93. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
  94. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z2ll-a._.js +3 -0
  95. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1adacul._.js +11 -11
  96. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1autwno._.js +3 -0
  97. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1v25n-6._.js +3 -0
  98. package/.next/standalone/.next/server/chunks/_09dz7xv._.js +1 -1
  99. package/.next/standalone/.next/server/chunks/_0tovk6q._.js +1 -1
  100. package/.next/standalone/.next/server/chunks/_0trp3yc._.js +1 -1
  101. package/.next/standalone/.next/server/chunks/_1ek68ln._.js +2 -2
  102. package/.next/standalone/.next/server/chunks/_1fz8m31._.js +1 -1
  103. package/.next/standalone/.next/server/chunks/_1jrv3hg._.js +3 -0
  104. package/.next/standalone/.next/server/chunks/_1nx8fim._.js +3 -0
  105. package/.next/standalone/.next/server/chunks/_1ogwigf._.js +1 -1
  106. package/.next/standalone/.next/server/chunks/{_1q5i8mb._.js → _1q27azx._.js} +2 -2
  107. package/.next/standalone/.next/server/chunks/lib_telemetry_ts_0dctyyw._.js +1 -1
  108. package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_0el6rg8._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_0ol5pa3._.js} +2 -2
  109. package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_04op_ou._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_1rqmk27._.js} +2 -2
  110. package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dr20uz._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_1w7tiq4._.js} +2 -2
  111. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
  112. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04usis8._.js +2 -2
  113. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1-bm5zf._.js → [root-of-the-server]__0502lat._.js} +1 -1
  114. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0_gn5iz._.js +4 -0
  115. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0f765xr._.js +4 -0
  116. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__01bmjsj._.js → [root-of-the-server]__0h38gzz._.js} +1 -1
  117. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hoaz1g._.js +4 -0
  118. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1ouobn4._.js → [root-of-the-server]__0mxmwtx._.js} +1 -1
  119. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__19evfi8._.js → [root-of-the-server]__0uescqv._.js} +1 -1
  120. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1484zv2._.js +3 -0
  121. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1mf3zp6._.js → [root-of-the-server]__19dutr7._.js} +4 -4
  122. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oqrl71._.js → [root-of-the-server]__1_qv8oh._.js} +2 -2
  123. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1u6sn69._.js → [root-of-the-server]__1ab4ifb._.js} +1 -1
  124. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1fbrk56._.js +4 -0
  125. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pprgri._.js +2 -2
  126. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1um4yxn._.js +4 -0
  127. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1wb4yt2._.js +4 -0
  128. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1y3n3cn._.js +4 -0
  129. package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
  130. package/.next/standalone/.next/server/chunks/ssr/_0bqoto4._.js +1 -1
  131. package/.next/standalone/.next/server/chunks/ssr/{_16pa9ht._.js → _0lnpwk8._.js} +2 -2
  132. package/.next/standalone/.next/server/chunks/ssr/{_0yq5_3a._.js → _15y8myg._.js} +1 -1
  133. package/.next/standalone/.next/server/chunks/ssr/_1gb0ifp._.js +2 -2
  134. package/.next/standalone/.next/server/chunks/ssr/{_042cgl1._.js → _1o95rf0._.js} +2 -2
  135. package/.next/standalone/.next/server/chunks/ssr/{_1zopuov._.js → _1thr5rf._.js} +2 -2
  136. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +12 -14
  137. package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9sni._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
  139. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
  140. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h4._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/node_modules_1hl81y4._.js +1 -1
  143. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0nkkbfv._.js +6 -0
  144. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-config_ts_04t589g._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +1 -1
  146. package/.next/standalone/.next/server/middleware-build-manifest.js +6 -6
  147. package/.next/standalone/.next/server/middleware.js +1 -1
  148. package/.next/standalone/.next/server/pages/404.html +1 -1
  149. package/.next/standalone/.next/server/pages/500.html +1 -1
  150. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  151. package/.next/standalone/.next/server/server-reference-manifest.json +23 -23
  152. package/.next/standalone/.next/static/chunks/{03h3b-uomi7_d.js → 0pra9i676pym1.js} +1 -1
  153. package/.next/standalone/.next/static/chunks/{2kj826h1w9r47.js → 1-lpi0m-hc1kb.js} +1 -1
  154. package/.next/standalone/.next/static/chunks/{3ob2161ap37ul.js → 17yvyyblr_eb5.js} +1 -1
  155. package/.next/standalone/.next/static/chunks/{3nkc2jlgyygda.js → 1mylcr99gccyz.js} +1 -1
  156. package/.next/standalone/.next/static/chunks/{2j92xul6y24_v.js → 1wozchtn2etvh.js} +1 -1
  157. package/.next/standalone/.next/static/chunks/{3mjfvng11xnoo.js → 23thtelz1a-ur.js} +2 -2
  158. package/.next/standalone/.next/static/chunks/{1fqukzzowjflt.js → 2bc17tohgs4bs.js} +1 -1
  159. package/.next/standalone/.next/static/chunks/{3u1s8dsqiean5.js → 2xq-ejo8kti18.js} +1 -1
  160. package/.next/standalone/.next/static/chunks/3-_pth_c9n938.js +1 -0
  161. package/.next/standalone/.next/static/chunks/{3i8rg2fv9nd6e.js → 3n46e45atic-m.js} +1 -1
  162. package/.next/standalone/.next/static/chunks/{078dofaxvjgpd.js → 3q7sndqftqhw9.js} +1 -1
  163. package/.next/standalone/.next/static/chunks/{0542cuk_va8g1.js → 3sg07wnn969xq.js} +1 -1
  164. package/.next/standalone/.next/static/chunks/{turbopack-11dn2pegmg9_9.js → turbopack-1opxka4dtjbc5.js} +1 -1
  165. package/.next/standalone/app/actions/install-hooks-web.ts +10 -2
  166. package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
  167. package/.next/standalone/node_modules/@next/env/package.json +1 -1
  168. package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
  169. package/.next/standalone/node_modules/next/dist/compiled/hash.js/sha256/256.js +1 -0
  170. package/.next/standalone/node_modules/next/dist/compiled/hash.js/sha256/package.json +1 -0
  171. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +17 -17
  172. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +18 -18
  173. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +3 -3
  174. package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +13 -13
  175. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  176. package/.next/standalone/node_modules/next/dist/server/base-server.js +1 -2
  177. package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
  178. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  179. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  180. package/.next/standalone/node_modules/next/dist/server/image-optimizer.js +265 -53
  181. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  182. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +177 -19
  183. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/index.js +36 -17
  184. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +14 -6
  185. package/.next/standalone/node_modules/next/dist/server/lib/match-next-data-pathname.js +3 -1
  186. package/.next/standalone/node_modules/next/dist/server/lib/node-fs-methods.js +14 -0
  187. package/.next/standalone/node_modules/next/dist/server/lib/route-cache-key.js +77 -0
  188. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/block-cross-site-dev.js +9 -11
  189. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
  190. package/.next/standalone/node_modules/next/dist/server/mcp/get-mcp-middleware.js +4 -2
  191. package/.next/standalone/node_modules/next/dist/server/next-server.js +7 -3
  192. package/.next/standalone/node_modules/next/dist/server/response-cache/index.js +32 -16
  193. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +2 -2
  194. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/pages-handler.js +6 -1
  195. package/.next/standalone/node_modules/next/dist/server/route-modules/route-module.js +9 -2
  196. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +30 -29
  197. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/app-paths.js +18 -1
  198. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  199. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  200. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
  201. package/.next/standalone/node_modules/next/package.json +10 -10
  202. package/.next/standalone/package.json +14 -11
  203. package/.next/standalone/sdk/python/README.md +41 -0
  204. package/.next/standalone/sdk/python/docs/README.md +1 -0
  205. package/.next/standalone/sdk/python/docs/otel/README.md +36 -0
  206. package/.next/standalone/sdk/python/docs/otel/examples/agent_trace.py +30 -0
  207. package/.next/standalone/sdk/python/docs/otel/examples/quickstart.py +22 -0
  208. package/.next/standalone/sdk/python/failproofai_sdk/__init__.py +8 -0
  209. package/.next/standalone/sdk/python/failproofai_sdk/integrations/__init__.py +3 -0
  210. package/.next/standalone/sdk/python/failproofai_sdk/integrations/otel.py +189 -0
  211. package/.next/standalone/sdk/python/pyproject.toml +2 -1
  212. package/.next/standalone/sdk/python/tests/test_docs.py +16 -3
  213. package/.next/standalone/sdk/python/tests/test_integrations.py +1 -1
  214. package/.next/standalone/sdk/python/tests/test_otel.py +147 -0
  215. package/.next/standalone/sdk/python/tests/test_zero_dependencies.py +4 -1
  216. package/.next/standalone/sdk/python/uv.lock +258 -147
  217. package/.next/standalone/sdk/typescript/README.md +43 -0
  218. package/.next/standalone/sdk/typescript/integration/ai.test.ts +9 -2
  219. package/.next/standalone/sdk/typescript/package-lock.json +57 -5
  220. package/.next/standalone/sdk/typescript/package.json +2 -0
  221. package/.next/standalone/sdk/typescript/src/edge/index.ts +9 -0
  222. package/.next/standalone/sdk/typescript/src/index.ts +2 -0
  223. package/.next/standalone/sdk/typescript/src/integrations/index.ts +4 -1
  224. package/.next/standalone/sdk/typescript/src/integrations/otel.ts +204 -0
  225. package/.next/standalone/sdk/typescript/test/integrations.test.ts +1 -1
  226. package/.next/standalone/sdk/typescript/test/otel.test.ts +125 -0
  227. package/.next/standalone/server.js +1 -1
  228. package/bin/failproofai.mjs +653 -1077
  229. package/dist/cli.mjs +8781 -4050
  230. package/dist/worker.mjs +170 -62
  231. package/hermes-plugin/plugin.yaml +1 -1
  232. package/package.json +14 -11
  233. package/scripts/launch-facts.ts +157 -0
  234. package/scripts/launch-ready.ts +228 -0
  235. package/scripts/launch-screen.ts +202 -0
  236. package/scripts/launch.ts +106 -49
  237. package/scripts/skew-log-filter.ts +38 -0
  238. package/src/audit/cli-login.ts +39 -59
  239. package/src/audit/cli.ts +308 -228
  240. package/src/audit/index.ts +45 -2
  241. package/src/audit/schedule-cli.ts +83 -120
  242. package/src/audit/types.ts +31 -0
  243. package/src/hooks/agent-selection.ts +155 -0
  244. package/src/hooks/backfill-cli.ts +151 -137
  245. package/src/hooks/backfill-request.ts +149 -0
  246. package/src/hooks/cloud-connection.ts +1 -1
  247. package/src/hooks/cloud-enrollment-cli.ts +78 -28
  248. package/src/hooks/cloud-introspect.ts +3 -0
  249. package/src/hooks/collector-config.ts +10 -1
  250. package/src/hooks/config-status.ts +717 -0
  251. package/src/hooks/configure-wizard.ts +967 -988
  252. package/src/hooks/daemon-service.ts +16 -6
  253. package/src/hooks/did-you-mean.ts +185 -0
  254. package/src/hooks/flush-cli.ts +33 -7
  255. package/src/hooks/fp-config.ts +96 -0
  256. package/src/hooks/fp-home.ts +11 -0
  257. package/src/hooks/fp-reset.ts +102 -95
  258. package/src/hooks/handler.ts +4 -0
  259. package/src/hooks/harness-cli.ts +87 -138
  260. package/src/hooks/install-prompt.ts +38 -477
  261. package/src/hooks/integrations.ts +1 -1
  262. package/src/hooks/jev-cli.ts +183 -196
  263. package/src/hooks/manager.ts +554 -358
  264. package/src/hooks/onboarding-attempt.ts +11 -9
  265. package/src/hooks/otel-cli.ts +350 -0
  266. package/src/hooks/otel-output.ts +24 -0
  267. package/src/hooks/otel-writers.ts +215 -0
  268. package/src/hooks/pack-cli.ts +219 -204
  269. package/src/hooks/report-body.ts +50 -0
  270. package/src/hooks/safe-config-write.ts +4 -2
  271. package/src/hooks/session-pause-cli.ts +93 -73
  272. package/src/hooks/tui.ts +849 -389
  273. package/src/hooks/uninstall-cli.ts +136 -149
  274. package/src/hooks/untraced-note.ts +52 -0
  275. package/.next/standalone/.next/server/chunks/[externals]__19_pzeq._.js +0 -3
  276. package/.next/standalone/.next/server/chunks/[externals]__20kzpkf._.js +0 -3
  277. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01eqny5._.js +0 -3
  278. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05ja_05._.js +0 -3
  279. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0igxt32._.js +0 -3
  280. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zyc_nm._.js +0 -3
  281. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ttrwnd._.js +0 -22
  282. package/.next/standalone/.next/server/chunks/_0bs-v8p._.js +0 -3
  283. package/.next/standalone/.next/server/chunks/_185gyk9._.js +0 -3
  284. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__056wjo4._.js +0 -4
  285. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n0xg95._.js +0 -4
  286. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rwtwpm._.js +0 -4
  287. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0yrsbd_._.js +0 -3
  288. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11mayhe._.js +0 -4
  289. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15578wp._.js +0 -4
  290. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1m_svbe._.js +0 -4
  291. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1q4p5b8._.js +0 -4
  292. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js +0 -6
  293. package/.next/standalone/.next/static/chunks/1lyg_puttohbc.js +0 -1
  294. /package/.next/standalone/.next/static/{ECs8__hcNabYV58WfDh-3 → xtcpqBNBdjQVerPMkI2HI}/_buildManifest.js +0 -0
  295. /package/.next/standalone/.next/static/{ECs8__hcNabYV58WfDh-3 → xtcpqBNBdjQVerPMkI2HI}/_clientMiddlewareManifest.js +0 -0
  296. /package/.next/standalone/.next/static/{ECs8__hcNabYV58WfDh-3 → xtcpqBNBdjQVerPMkI2HI}/_ssgManifest.js +0 -0
@@ -93,12 +93,17 @@ import {
93
93
  } from "./fp-config";
94
94
  import {
95
95
  daemonServiceStatus,
96
- daemonStatusCommand,
97
96
  daemonVersionSkew,
98
97
  isDaemonSupportedPlatform,
99
98
  probeDaemonEndToEnd,
100
99
  type DaemonServiceStatus,
101
100
  } from "./daemon-service";
101
+ // Types only: the kit is loaded with `import()` inside `checkLayoutForCli`, so
102
+ // the hook path — handler.ts imports this module for `layoutWarningForHook` —
103
+ // never loads the renderer.
104
+ import type { RenderOpts } from "./tui";
105
+
106
+ type BannerKit = ReturnType<typeof import("./tui").screenKit>;
102
107
 
103
108
  export interface ResetOutcome {
104
109
  /** Paths that existed and were removed. */
@@ -1110,22 +1115,35 @@ async function drainSpoolAfterMigrating(): Promise<number> {
1110
1115
  */
1111
1116
  export interface LayoutCheckDeps {
1112
1117
  daemonStatus?: () => DaemonServiceStatus;
1118
+ /** How to draw the banners. Defaults to what stderr can show, where they print. */
1119
+ render?: RenderOpts;
1113
1120
  }
1114
1121
 
1122
+ /**
1123
+ * What this returns is printed above whatever command was typed, so each
1124
+ * banner is one state line and one fix line, in the screen language: `✕` for
1125
+ * the one that stops the command, `▲` for one that needs attention, `✓` for a
1126
+ * repair already made.
1127
+ */
1115
1128
  export async function checkLayoutForCli(deps: LayoutCheckDeps = {}): Promise<LayoutCheck> {
1116
1129
  const state = detectLayout();
1130
+ const { screenKit, colorsEnabled } = await import("./tui");
1131
+ const kit: BannerKit = screenKit(deps.render ?? { color: colorsEnabled(process.stderr) });
1117
1132
 
1118
1133
  if (state.kind === "future") {
1119
1134
  return {
1120
1135
  state,
1121
1136
  fatal: true,
1122
1137
  didReset: false,
1138
+ // Upgrade rather than reset: the data is fine, this build just cannot read it.
1123
1139
  lines: [
1124
- `This machine's failproofai directory was written by a newer version`,
1125
- `(layout ${state.found}; this build speaks ${LAYOUT_VERSION}).`,
1126
- ``,
1127
- `Upgrade rather than reset — the data is fine, this build just cannot read it:`,
1128
- ` npm install -g failproofai@latest`,
1140
+ ...kit.notice(
1141
+ "fail",
1142
+ `This machine's failproofai directory was written by a newer version (layout ${state.found}; ` +
1143
+ `this build reads ${LAYOUT_VERSION}).\n` +
1144
+ "Your data is fine. Upgrade to read it: `npm install -g failproofai@latest`",
1145
+ ),
1146
+ "",
1129
1147
  ],
1130
1148
  };
1131
1149
  }
@@ -1146,68 +1164,56 @@ export async function checkLayoutForCli(deps: LayoutCheckDeps = {}): Promise<Lay
1146
1164
  // Read AFTER the migration: on a machine coming from layout 1 or 2 the
1147
1165
  // config this reads is the one the migration just carried across, so asking
1148
1166
  // any earlier would read a file that is about to move.
1149
- const daemonHint = staleDaemonHint();
1167
+ const daemonHint = staleDaemonHint(kit);
1150
1168
  return {
1151
1169
  state,
1152
1170
  fatal: false,
1153
1171
  didReset: true,
1154
1172
  lines: [
1155
- `failproofai reorganised ${failproofaiHome()} in this version.`,
1156
- // "activity history" was in this sentence while the reset was deleting
1157
- // it, and "policy config" stayed in it after that file stopped being
1158
- // removed. Both are the same failure: a message describing a delete list
1159
- // it is not derived from. It names the CLASSES now, which is what
1160
- // `HOME_CLASSES` actually decides — so it cannot drift again without the
1161
- // rule itself changing.
1162
- `Removed ${removed.length} item(s) that this version rebuilds — the audit`,
1163
- `cache, cloud deployments (re-fetched on the next poll) and daemon scratch.`,
1164
- `Your settings, cloud enrolment, policy selection, decision history,`,
1165
- `undelivered events and daemon binary were all kept.`,
1166
- // Named individually rather than counted. These are files a person
1167
- // wrote; "moved 3 items" is not something you can check at a glance,
1168
- // and the whole point of saying it is that they can.
1169
- ...(migrated.length > 0
1170
- ? [
1171
- ``,
1172
- `Kept your own policy file(s) and moved them to where this version`,
1173
- `loads them (${customPoliciesDir()}):`,
1174
- ...migrated.map((name) => ` ${name}`),
1175
- ]
1176
- : []),
1177
- // Counted, not named. Unlike policy files these are machine-written
1178
- // pages with generated names — a list of them tells the reader nothing
1179
- // they could act on, where the COUNT answers the only question they
1180
- // have: did my history survive.
1181
- ...(activity.length > 0
1182
- ? [
1183
- ``,
1184
- `Carried ${activity.length} page(s) of decision history into ${hookActivityDir()}.`,
1185
- ]
1186
- : []),
1187
- // Said only when a backlog actually survived the flush. Silence here
1188
- // would be the wrong kind: the events are safe, but "safe" and
1189
- // "delivered" are different states and only one of them shows up on a
1190
- // dashboard. Naming the count is what stops a user reading an incomplete
1191
- // dashboard as data loss.
1173
+ // What was rebuilt and what was kept, by CLASS — which is what
1174
+ // `HOME_CLASSES` actually decides. "Activity history" was once in a
1175
+ // sentence like this while the reset was deleting it, and "policy config"
1176
+ // stayed after that file stopped being removed: a message describing a
1177
+ // delete list it is not derived from. Naming the classes cannot drift
1178
+ // without the rule itself changing.
1179
+ ...kit.notice(
1180
+ "ok",
1181
+ `failproofai reorganised ${failproofaiHome()} for this version.\n` +
1182
+ `Removed ${removed.length} ${removed.length === 1 ? "item" : "items"} that this version rebuilds: ` +
1183
+ "the audit cache, cloud deployments (re-fetched on the next poll) and daemon scratch.\n" +
1184
+ "Kept your settings, cloud enrolment, policy selection, decision history, undelivered events and daemon binary." +
1185
+ // Named individually rather than counted. These are files a person
1186
+ // wrote; "moved 3 items" is not something you can check at a glance,
1187
+ // and the whole point of saying it is that they can.
1188
+ (migrated.length > 0 ? `\nMoved your own policy files to ${customPoliciesDir()}: ${migrated.join(", ")}` : "") +
1189
+ // Counted, not named. Machine-written pages with generated names: the
1190
+ // COUNT answers the only question there is — did my history survive.
1191
+ (activity.length > 0
1192
+ ? `\nCarried ${activity.length} page${activity.length === 1 ? "" : "s"} of decision history into ${hookActivityDir()}.`
1193
+ : ""),
1194
+ ),
1195
+ // Said only when a backlog actually survived the flush. The events are
1196
+ // safe, but "safe" and "delivered" are different states and only one of
1197
+ // them shows up on a dashboard; naming the count is what stops a user
1198
+ // reading an incomplete dashboard as data loss.
1192
1199
  ...(pending > 0
1193
- ? [
1194
- ``,
1195
- `${pending} batch(es) were still undelivered and were carried across.`,
1196
- `They ship on the next collector pass — \`failproofai flush --wait\` now if you`,
1197
- `are waiting on a dashboard.`,
1198
- ]
1200
+ ? kit.notice(
1201
+ "caution",
1202
+ `${pending} batch(es) were still undelivered and were carried across.\n` +
1203
+ "They ship on the next collector pass. Send them now: `failproofai flush --wait`",
1204
+ )
1199
1205
  : []),
1200
1206
  // A step that threw leaves the home marked with the OLD layout, so the
1201
1207
  // next command tries again — which is right, and is also why this must
1202
1208
  // say so rather than let a partial migration pass for a finished one.
1203
1209
  ...(run.failed
1204
- ? [
1205
- ``,
1206
- `Step ${run.failed.from} → ${run.failed.to} did not finish: ${run.failed.error}`,
1207
- `The home is still marked layout ${state.found} and will be retried. Copies of`,
1208
- `your settings and enrolment were saved first, in ${migrationBackupDir(state.found)}.`,
1209
- ]
1210
+ ? kit.notice(
1211
+ "fail",
1212
+ `Step ${run.failed.from} → ${run.failed.to} did not finish: ${run.failed.error}\n` +
1213
+ `It is retried on the next command; your settings and enrolment were saved first in ${migrationBackupDir(state.found)}.`,
1214
+ )
1210
1215
  : []),
1216
+ "",
1211
1217
  // No "run `failproofai config` to set up again". There is nothing to set
1212
1218
  // up: the settings, the enrolment and the policy selection all survived,
1213
1219
  // so the machine enforces exactly as it did before this command ran. A
@@ -1220,7 +1226,7 @@ export async function checkLayoutForCli(deps: LayoutCheckDeps = {}): Promise<Lay
1220
1226
  // daemon, and it was the one command saying nothing about it. Every
1221
1227
  // later command reached the non-stale return below and got the hint;
1222
1228
  // the one where the user is watching the reorganisation happen did not.
1223
- ...(daemonHint.length > 0 ? ["", ...daemonHint] : []),
1229
+ ...daemonHint,
1224
1230
  ],
1225
1231
  };
1226
1232
  }
@@ -1238,7 +1244,7 @@ export async function checkLayoutForCli(deps: LayoutCheckDeps = {}): Promise<Lay
1238
1244
  state,
1239
1245
  fatal: false,
1240
1246
  didReset: false,
1241
- lines: [...(await healDaemonFlag(deps)), ...staleDaemonHint()],
1247
+ lines: [...(await healDaemonFlag(deps, kit)), ...staleDaemonHint(kit)],
1242
1248
  };
1243
1249
  }
1244
1250
 
@@ -1257,20 +1263,24 @@ export async function checkLayoutForCli(deps: LayoutCheckDeps = {}): Promise<Lay
1257
1263
  * downgrade a healthy machine to the in-process path — trading a loud, correct
1258
1264
  * failure for a quiet, wrong one.
1259
1265
  */
1260
- async function healDaemonFlag(deps: LayoutCheckDeps = {}): Promise<string[]> {
1266
+ async function healDaemonFlag(deps: LayoutCheckDeps, kit: BannerKit): Promise<string[]> {
1261
1267
  try {
1262
1268
  const cfg = readConfig();
1263
1269
  if (!cfg.daemon.configured) return [];
1264
1270
  if (!isDaemonSupportedPlatform()) return [];
1265
1271
 
1272
+ // Each repair says the one phrase the cleared flag was about — "denies every
1273
+ // tool call" — on ONE line, where a reader (and the tests) can find it.
1266
1274
  const status = (deps.daemonStatus ?? daemonServiceStatus)();
1267
1275
  if (status === "not-installed") {
1268
1276
  updateConfig({ daemon: { configured: false } });
1269
1277
  return [
1270
- `failproofaid is no longer installed, but this machine was still configured`,
1271
- `to require it — which denies every tool call. Cleared that flag; policies`,
1272
- `now evaluate in-process. Run \`failproofai config\` to reinstall the daemon.`,
1273
- ``,
1278
+ ...kit.notice(
1279
+ "caution",
1280
+ "failproofaid is no longer installed, and requiring it denies every tool call, so policies now evaluate in-process.\n" +
1281
+ "Reinstall the daemon: `failproofai config`",
1282
+ ),
1283
+ "",
1274
1284
  ];
1275
1285
  }
1276
1286
 
@@ -1285,16 +1295,15 @@ async function healDaemonFlag(deps: LayoutCheckDeps = {}): Promise<string[]> {
1285
1295
  // the distinction `condition-failed` exists to carry; see its definition.
1286
1296
  if (status === "condition-failed") {
1287
1297
  updateConfig({ daemon: { configured: false } });
1298
+ // Most often `npm rm -g failproofai`, which deletes the worker the service
1299
+ // needs and leaves the service behind.
1288
1300
  return [
1289
- `failproofaid is installed but cannot start — a file its service requires is`,
1290
- `gone (most often because failproofai was removed with \`npm rm -g\`, which`,
1291
- `deletes the worker but leaves the service behind). This machine was`,
1292
- `configured to require the daemon, which denies every tool call, so that flag`,
1293
- `is cleared; policies now evaluate in-process.`,
1294
- ``,
1295
- `Run \`failproofai uninstall\` to remove the leftover service, or`,
1296
- `\`failproofai config\` to rebuild it. \`${daemonStatusCommand()}\` names the missing path.`,
1297
- ``,
1301
+ ...kit.notice(
1302
+ "caution",
1303
+ "failproofaid cannot start, and requiring it denies every tool call, so policies now evaluate in-process.\n" +
1304
+ "Remove the leftover service with `failproofai uninstall`, or rebuild it with `failproofai config`",
1305
+ ),
1306
+ "",
1298
1307
  ];
1299
1308
  }
1300
1309
 
@@ -1313,13 +1322,15 @@ async function healDaemonFlag(deps: LayoutCheckDeps = {}): Promise<string[]> {
1313
1322
  // `daemonAlreadyHealthy` probe in `configure-wizard.ts`.
1314
1323
  if (status === "running" && !(await probeDaemonEndToEnd())) {
1315
1324
  updateConfig({ daemon: { configured: false } });
1325
+ // Most often the Node install its service was built against is gone, so
1326
+ // the worker process will not start.
1316
1327
  return [
1317
- `failproofaid is running but cannot evaluate policies — its worker process`,
1318
- `will not start (most often because the Node install its service was built`,
1319
- `against is gone). This machine was configured to require it, which denies`,
1320
- `every tool call, so that flag is cleared; policies now evaluate in-process.`,
1321
- `Run \`failproofai config\` to rebuild the service.`,
1322
- ``,
1328
+ ...kit.notice(
1329
+ "caution",
1330
+ "failproofaid cannot evaluate policies, and requiring it denies every tool call, so policies now evaluate in-process.\n" +
1331
+ "Rebuild the service: `failproofai config`",
1332
+ ),
1333
+ "",
1323
1334
  ];
1324
1335
  }
1325
1336
  return [];
@@ -1357,7 +1368,7 @@ async function healDaemonFlag(deps: LayoutCheckDeps = {}): Promise<string[]> {
1357
1368
  * to everybody, and pointed at `failproofai config`. Across a layout bump that
1358
1369
  * is the wrong sentence and the wrong command.
1359
1370
  */
1360
- function staleDaemonHint(): string[] {
1371
+ function staleDaemonHint(kit: BannerKit): string[] {
1361
1372
  try {
1362
1373
  const skew = daemonVersionSkew();
1363
1374
  if (!skew) return [];
@@ -1368,26 +1379,22 @@ function staleDaemonHint(): string[] {
1368
1379
  // Unreadable config: fall through to the mild message rather than
1369
1380
  // frightening somebody whose machine may not require the daemon at all.
1370
1381
  }
1382
+ const fix = `Bring it from ${skew.installed} to ${skew.expected}: \`failproofai update\``;
1371
1383
  if (requiresDaemon) {
1384
+ // A daemon built against a different on-disk layout refuses to start, so
1385
+ // the next reboot or restart can leave the service down on a machine that
1386
+ // requires it. "denies every tool call" is the consequence this line
1387
+ // exists to state, and it stays on ONE line: splitting it is what once
1388
+ // made the test asserting the phrase fail while the text read correctly.
1372
1389
  return [
1373
- `[failproofai] daemon is ${skew.installed}, CLI is ${skew.expected}.`,
1374
- `This machine is configured to REQUIRE the daemon. A daemon built against a`,
1375
- `different on-disk layout refuses to start, and this version moved it — so the`,
1376
- // The wrap is load-bearing: "denies every tool call" is the consequence
1377
- // this message exists to state, and splitting it across two lines is
1378
- // what made the test asserting that phrase fail while the text looked
1379
- // perfectly correct to a human reading it.
1380
- `next reboot or restart can leave the service down, which`,
1381
- `denies every tool call until it is fixed.`,
1382
- `Run \`failproofai update\` now to bring the daemon in line.`,
1383
- ``,
1390
+ ...kit.notice(
1391
+ "caution",
1392
+ `failproofaid does not match this CLI, and a restart can stop it, which denies every tool call.\n${fix}`,
1393
+ ),
1394
+ "",
1384
1395
  ];
1385
1396
  }
1386
- return [
1387
- `[failproofai] daemon is ${skew.installed}, CLI is ${skew.expected} — ` +
1388
- `run \`failproofai update\` to update it.`,
1389
- ``,
1390
- ];
1397
+ return [...kit.notice("caution", `failproofaid does not match this CLI.\n${fix}`), ""];
1391
1398
  } catch {
1392
1399
  return [];
1393
1400
  }
@@ -62,6 +62,7 @@ import { missingGuards, packFailureReason, combinedGuardMatch, guardsCover } fro
62
62
  import { readActivePause, type ActivePause } from "./session-pause";
63
63
  import { jevConfigFile } from "./fp-home";
64
64
  import { layoutWarningForHook } from "./fp-reset";
65
+ import { noteUntracedAgent } from "./untraced-note";
65
66
 
66
67
  /**
67
68
  * Canonicalize an event name to PascalCase. Codex sends snake_case event names
@@ -491,6 +492,9 @@ export async function evaluateHookEvent(
491
492
 
492
493
  // Extract session metadata from payload
493
494
  const sessionId = parsed.session_id as string | undefined;
495
+ // An agent setup does not trace still gets its calls evaluated — only
496
+ // noted, once per session. See untraced-note.ts for why never "allow".
497
+ noteUntracedAgent(cli, sessionId);
494
498
  const session: SessionMetadata = {
495
499
  sessionId,
496
500
  transcriptPath: resolveTranscriptPath(cli, parsed, sessionId),