failproofai 1.0.1 → 1.0.2-beta.1

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 (390) 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]__0l4748x._.js +3 -0
  97. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
  98. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +4 -0
  99. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +6 -0
  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/_08x1r5t._.js +1 -1
  103. package/.next/standalone/.next/server/chunks/ssr/_0bwu160._.js +23 -0
  104. package/.next/standalone/.next/server/chunks/ssr/{_0u5zauv._.js → _0ns6k3a._.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/{3c808qrfcq0im.js → 01u1cf8js2yd6.js} +1 -1
  121. package/.next/standalone/.next/static/chunks/{0k5050ezjvv49.js → 0izgu7nqh2zp-.js} +1 -1
  122. package/.next/standalone/.next/static/chunks/0u4-org_e7zde.js +1 -0
  123. package/.next/standalone/.next/static/chunks/1mfzsja6ftim5.css +2 -0
  124. package/.next/standalone/.next/static/chunks/{2zpp1we2jv6tb.js → 1tynnrrh711lr.js} +1 -1
  125. package/.next/standalone/.next/static/chunks/{1ide1wl2f7zi1.js → 22rqvlr7p_1mv.js} +13 -13
  126. package/.next/standalone/.next/static/chunks/{31s1smp-g7gks.js → 2whxqyskpirbk.js} +1 -1
  127. package/.next/standalone/.next/static/chunks/31mwk8k0q3_3g.js +6 -0
  128. package/.next/standalone/.next/static/chunks/3ms6gxfm82t6s.js +1 -0
  129. package/.next/standalone/.next/static/chunks/{37fcpc36x9gpe.js → 3tbbs_d8xrvyp.js} +1 -1
  130. package/.next/standalone/.next/static/chunks/43nlc236oo898.js +1 -0
  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 +163 -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 -15
  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 +27 -21
  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 +579 -306
  319. package/dist/cli.mjs +6499 -3662
  320. package/dist/index.js +5 -5
  321. package/dist/worker.mjs +2390 -1978
  322. package/package.json +27 -21
  323. package/scripts/build-policy-pack.mjs +121 -0
  324. package/scripts/changelog-section.py +77 -0
  325. package/scripts/prune-standalone.mjs +3 -0
  326. package/scripts/python-version.py +232 -0
  327. package/scripts/translate-docs/cli.ts +21 -0
  328. package/scripts/translate-docs/mintlify-nav.ts +85 -13
  329. package/scripts/translate-docs/translator.ts +66 -11
  330. package/src/audit/cache.ts +40 -3
  331. package/src/audit/cli.ts +1 -1
  332. package/src/audit/index.ts +1 -1
  333. package/src/audit/replay.ts +89 -3
  334. package/src/audit/report.ts +5 -5
  335. package/src/audit/schedule-cli.ts +49 -53
  336. package/src/hooks/builtin-policies.ts +217 -579
  337. package/src/hooks/cloud-enrollment-cli.ts +66 -27
  338. package/src/hooks/cloud-managed-policies.ts +6 -1
  339. package/src/hooks/configure-wizard.ts +56 -369
  340. package/src/hooks/custom-hooks-loader.ts +89 -6
  341. package/src/hooks/fp-home.ts +92 -4
  342. package/src/hooks/fp-reset.ts +34 -2
  343. package/src/hooks/handler.ts +181 -11
  344. package/src/hooks/harness-cli.ts +79 -25
  345. package/src/hooks/hook-activity-store.ts +13 -3
  346. package/src/hooks/install-prompt.ts +25 -3
  347. package/src/hooks/manager.ts +424 -172
  348. package/src/hooks/migrations.ts +2 -2
  349. package/src/hooks/pack-cli.ts +885 -0
  350. package/src/hooks/pack-failclosed.ts +189 -0
  351. package/src/hooks/pack-manifest.ts +352 -0
  352. package/src/hooks/pack-store.ts +891 -0
  353. package/src/hooks/policy-catalog.ts +535 -0
  354. package/src/hooks/policy-evaluator.ts +24 -16
  355. package/src/hooks/policy-registry.ts +8 -2
  356. package/src/hooks/policy-types.ts +26 -0
  357. package/src/hooks/session-pause-cli.ts +33 -9
  358. package/src/hooks/tui.ts +695 -39
  359. package/src/hooks/types.ts +15 -1
  360. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_usx0j._.js +0 -3
  361. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_zk340._.js +0 -3
  362. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0agdw2a._.js +0 -3
  363. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d1u_na._.js +0 -3
  364. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oy4kxb._.js +0 -3
  365. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zf034w._.js +0 -3
  366. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1tvn4wf._.js +0 -3
  367. package/.next/standalone/.next/server/chunks/_0lxbzdq._.js +0 -3
  368. package/.next/standalone/.next/server/chunks/_1ger0a2._.js +0 -3
  369. package/.next/standalone/.next/server/chunks/_1zuiiy3._.js +0 -3
  370. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_1iiwm5e._.js +0 -3
  371. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07tbbf3._.js +0 -3
  372. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kc8_v5._.js +0 -4
  373. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kgy9da._.js +0 -4
  374. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mhqk5a._.js +0 -4
  375. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pltpn8._.js +0 -4
  376. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qkcyf-._.js +0 -4
  377. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w0x_ok._.js +0 -4
  378. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1_dfocn._.js +0 -4
  379. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1bfex62._.js +0 -5
  380. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1kzapg5._.js +0 -6
  381. package/.next/standalone/.next/server/chunks/ssr/_0lvyuv4._.js +0 -23
  382. package/.next/standalone/.next/static/chunks/2_2lhuojq2xop.js +0 -1
  383. package/.next/standalone/.next/static/chunks/36fw6yk1s6x_f.js +0 -1
  384. package/.next/standalone/.next/static/chunks/3k7mxbp9hiom0.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/src/hooks/policy-presets.ts +0 -135
  388. /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → I5kEb9kSgYS63j4iqfVLO}/_buildManifest.js +0 -0
  389. /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → I5kEb9kSgYS63j4iqfVLO}/_clientMiddlewareManifest.js +0 -0
  390. /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → I5kEb9kSgYS63j4iqfVLO}/_ssgManifest.js +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "failproofai",
3
- "version": "1.0.1",
4
- "description": "The easiest way to manage policies that keep your AI agents reliable, on-task, and running autonomously for Claude Code & the Agents SDK",
3
+ "version": "1.0.2-beta.1",
4
+ "description": "Observability and enforcement for AI agent harnesses. 39 built-in policies hooked into 12 of them — Claude Code, Codex, Cursor, Hermes, OpenClaw and moreblocking the tool call before it runs. Local dashboard included, no account needed.",
5
5
  "bin": {
6
6
  "failproofai": "./dist/cli.mjs",
7
7
  "failproofaid": "./bin/failproofaid-shim.mjs"
@@ -41,24 +41,30 @@
41
41
  "translate:dry-run": "bun scripts/translate-docs/cli.ts --dry-run",
42
42
  "translate:validate": "bun scripts/translate-docs/cli.ts --validate",
43
43
  "validate:mdx": "bun scripts/validate-mdx.ts",
44
- "docs:audit": "bun scripts/docs-audit.ts"
44
+ "docs:audit": "bun scripts/docs-audit.ts",
45
+ "build:pack": "bun scripts/build-policy-pack.mjs"
45
46
  },
46
47
  "keywords": [
47
- "claude",
48
- "claude-code",
49
- "claude-agents-sdk",
50
- "anthropic",
51
- "ai-agent",
52
- "agent-reliability",
48
+ "agent-observability",
49
+ "llm-observability",
50
+ "agent-tracing",
53
51
  "agent-monitoring",
52
+ "agent-harness",
53
+ "guardrails",
54
+ "enforcement",
55
+ "policies",
56
+ "evals",
57
+ "ai-agent",
54
58
  "autonomous-agent",
59
+ "agent-reliability",
55
60
  "failure-prevention",
56
- "developer-tools",
57
- "devtools",
61
+ "claude-code",
62
+ "codex",
63
+ "hermes",
64
+ "openclaw",
58
65
  "cli",
59
66
  "local-first",
60
- "hooks",
61
- "policies"
67
+ "hooks"
62
68
  ],
63
69
  "author": "ExosphereHost Inc. <failproofai@exosphere.host>",
64
70
  "license": "SEE LICENSE IN LICENSE",
@@ -114,15 +120,15 @@
114
120
  "sharp": "0.35.0"
115
121
  },
116
122
  "optionalDependencies": {
117
- "@failproofai/failproofaid-linux-x64": "1.0.1",
118
- "@failproofai/failproofaid-linux-arm64": "1.0.1",
119
- "@failproofai/failproofaid-darwin-x64": "1.0.1",
120
- "@failproofai/failproofaid-darwin-arm64": "1.0.1"
123
+ "@failproofai/failproofaid-linux-x64": "1.0.2-beta.1",
124
+ "@failproofai/failproofaid-linux-arm64": "1.0.2-beta.1",
125
+ "@failproofai/failproofaid-darwin-x64": "1.0.2-beta.1",
126
+ "@failproofai/failproofaid-darwin-arm64": "1.0.2-beta.1"
121
127
  },
122
128
  "failproofaidBinaries": {
123
- "linux-x64": "3969147781ba206a8a2134364a32fad30070c5ec11512e3183abca62918d7e7f",
124
- "linux-arm64": "ea6bd21980ec62dde13fdb6f35cf80053e2ce43161453bd3be0154c7b7f1ebc9",
125
- "darwin-x64": "7a54e3b55d7b3e7c70e1f97fa373e699a9fa11f2e6263a3b2e3291059d161470",
126
- "darwin-arm64": "f926fea88f0d4b5a5e872f3a618d11a98098924d3fd9fdff3c3f2daafadd1410"
129
+ "linux-x64": "a8c695cfe728e56403f981bd5ea2dc838cb862bd7349354946afead12fe0c36a",
130
+ "linux-arm64": "674b596fe496ea51bf98864be7105fe1e34aacf0d588e35e2e3b455839837d94",
131
+ "darwin-x64": "c56e5f68a509ec493d6d497ce0d221ab2fb9ff493ec3dd7dca49a41de8621b1e",
132
+ "darwin-arm64": "73e80759bfd47c3473167f39b77bb2df3ab8fc1e891a8a3b3cefa9c1d83f6885"
127
133
  }
128
134
  }
@@ -0,0 +1,70 @@
1
+ # Changelog — `failproofai-sdk`
2
+
3
+ The telemetry SDK, imported as `failproofai_sdk`. Released independently of the
4
+ `failproofai` npm package and of its sibling `fp-cloud-cli`, so the versions here line
5
+ up with neither.
6
+
7
+ Headings are `## <version> — <YYYY-MM-DD>`, and the section matching the version
8
+ in `failproofai_sdk/_version.py` becomes that release's GitHub Release body. A
9
+ release whose section is missing or empty is refused before anything is built —
10
+ see `scripts/changelog-section.py`.
11
+
12
+ ## 0.0.1b1 — 2026-08-24
13
+
14
+ The first release under this name. Everything below describes the package as it
15
+ now ships rather than a change against a previous `failproofai-sdk`, because
16
+ there is no previous one.
17
+
18
+ ### The distribution name
19
+
20
+ - **This package was `agenteye` inside the private monorepo, and that name is not
21
+ safe to keep.** `agenteye` on public PyPI resolves to a stranded build of a
22
+ different thing — an old CLI, last published there at `0.1.22` — and PyPI never
23
+ releases a version for reuse. Because pip resolves the highest version under a
24
+ name, `pip install agenteye` on a machine already running the pre-rename SDK
25
+ installed that CLI build *over* it: same distribution name, higher version, so
26
+ pip treated it as an upgrade and the working `import agenteye` stopped working.
27
+ Renaming to `failproofai-sdk` is what makes that unreachable.
28
+ - **Versioning restarts at `0.0.1b1`.** The pre-rename package had reached
29
+ `0.0.1b14`, but that history lives entirely under `agenteye`; carrying the
30
+ number across would claim fourteen releases of a name that has had none.
31
+ `b1` is a PEP 440 pre-release, which — PyPI having no dist-tags — is the only
32
+ channel marker there is. See `scripts/python-version.py` for the scheme.
33
+ - **Migrating is two mechanical changes:** `pip uninstall agenteye && pip install
34
+ failproofai-sdk`, then `import agenteye` → `import failproofai_sdk`. Every
35
+ method name, argument and emitted field is unchanged, and so is
36
+ `AGENTEYE_ENVIRONMENT`, which is a contract with a daemon that releases
37
+ separately. `skill/references/install.md` covers the whole path.
38
+
39
+ ### What it does
40
+
41
+ - Fifteen event methods across six families, with `duration_ms` computed
42
+ automatically by pairing start/end events. The wire format is frozen
43
+ byte-for-byte by `tests/test_wire_format.py` — `to_dict()` **is** the format.
44
+ - Four framework adapters — LangChain/LangGraph, CrewAI, LlamaIndex, Pydantic AI
45
+ — all shipped in the base wheel and lazy-imported. The `[langchain]`-style
46
+ extras pull in the *framework*, never the adapter, so most users never need one.
47
+ - **Zero runtime dependencies, enforced rather than asserted.** This installs into
48
+ other people's agent processes, where any dependency of ours becomes a version
49
+ constraint on their application. `tests/test_zero_dependencies.py` fails if one
50
+ is ever declared or imported, and the release pipeline installs the built wheel
51
+ with `--no-deps` to prove the claim against the artifact rather than the source.
52
+
53
+ ### Spool location
54
+
55
+ - **The default spool root is `~/.failproofai/custom-agents`**, not `~/.agenteye`.
56
+ It must agree exactly with `customAgentsDir()` in `src/hooks/fp-home.ts` and
57
+ `custom_agents_events_dir()` in `crates/fpai-collect/src/config.rs`, because a
58
+ disagreement means the SDK writes where no daemon reads, with **no error on
59
+ either side**. `tests/test_spool_contract.py` checks the Rust and the TypeScript
60
+ directly and never skips.
61
+ - **`AGENTEYE_HOME` no longer moves this SDK's spool.** It used to sit above the
62
+ default, so exporting it for `agenteye-collector` — the component that genuinely
63
+ reads it — relocated the SDK as an unasked-for side effect. Resolution is now
64
+ `configure(base_dir=...)`, else `~/.failproofai/custom-agents`, with
65
+ `$FAILPROOFAI_HOME` moving the umbrella and never the spool out of it.
66
+ - A machine that has only ever run this SDK stays indistinguishable, to every
67
+ other component, from one that has run nothing: the spool path is the only
68
+ thing created, and none of the layout landmarks the CLI's `detectLayout()`
69
+ reads are ever written. `tests/test_spool_creation.py` asserts the exact set of
70
+ paths that appear.
@@ -0,0 +1,42 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ExosphereHost Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ Commons Clause License Condition v1.0
24
+
25
+ The Software is provided to you by the Licensor under the License, as defined
26
+ below, subject to the following condition.
27
+
28
+ Without limiting other conditions in the License, the grant of rights under
29
+ the License will not include, and the License does not grant to you, the right
30
+ to Sell the Software.
31
+
32
+ For purposes of the foregoing, "Sell" means practicing any or all of the
33
+ rights granted to you under the License to provide to third parties, for a
34
+ fee or other consideration (including without limitation fees for hosting or
35
+ consulting/support services related to the Software), a product or service
36
+ whose value derives, entirely or substantially, from the functionality of the
37
+ Software. Any license notice or attribution required by the License must also
38
+ include this Commons Clause License Condition notice.
39
+
40
+ Software: failproofai
41
+ License: MIT
42
+ Licensor: ExosphereHost Inc
@@ -0,0 +1,21 @@
1
+ # The sdist ships `tests/`, and setuptools' default heuristic picks up only
2
+ # top-level `test*.py` — so the suite went out WITHOUT `tests/conftest.py`,
3
+ # `tests/__init__.py` or `tests/integrations/`.
4
+ #
5
+ # That is not a cosmetic omission. `conftest.py` IS the isolation layer: it
6
+ # redirects the spool at IMPORT, straight into `os.environ`, because the
7
+ # `atexit` flush fires long after the last fixture is torn down. Without it,
8
+ # running the shipped suite (a distro packager, a conda-forge recipe, anyone
9
+ # doing `pip download --no-binary :all:` then `pytest tests/`) writes tens of
10
+ # thousands of synthetic events into the user's REAL
11
+ # `~/.failproofai/custom-agents/events` — measured at 20,001 in one run of
12
+ # `test_durability.py` alone — where a running daemon uploads them to a real
13
+ # dashboard as genuine agent activity.
14
+ #
15
+ # So the suite ships whole or not at all. `graft` takes the whole tree,
16
+ # including the subpackage and the conftest.
17
+ graft tests
18
+ include LICENSE
19
+ include README.md
20
+ include py.typed
21
+ recursive-include failproofai_sdk py.typed
@@ -0,0 +1,466 @@
1
+ # failproofai-sdk
2
+
3
+ The Python SDK for [Failproof AI](https://befailproof.ai) agent observability. It
4
+ records what your agent did — tool calls, model requests, hooks, errors, waits for
5
+ a human — as structured events, and hands them to the daemon that ships them to
6
+ the platform.
7
+
8
+ - **PyPI distribution:** `failproofai-sdk`
9
+ - **Import name:** `failproofai_sdk`
10
+ - **Dependencies:** none. Standard library only, so installing it constrains
11
+ nothing else in your environment.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pip install failproofai-sdk
17
+ # or
18
+ uv add failproofai-sdk
19
+ ```
20
+
21
+ > **Do not `pip install agenteye`.** That distribution name is occupied on PyPI by
22
+ > a stranded build of an old CLI, which ships a module called `agenteye_cli` and is
23
+ > not this SDK. Installing it gives you `ModuleNotFoundError` at best, and — if
24
+ > this SDK is already present — pip treats it as an upgrade and **removes the SDK**
25
+ > to install the CLI. The import that worked five minutes ago then stops working.
26
+
27
+ ## How events reach the platform
28
+
29
+ The SDK never opens a network connection. It appends events to an in-memory queue,
30
+ and a background thread writes them to local JSONL batches:
31
+
32
+ ```
33
+ your agent → failproofai_sdk → ~/.failproofai/custom-agents/events/*.jsonl → daemon → platform
34
+ ```
35
+
36
+ A daemon on the same host watches that directory and uploads each batch.
37
+ **`failproofaid` reads this root; the older `agenteye-collector` does not** — it
38
+ resolves `$AGENTEYE_HOME` or `~/.agenteye` and nothing else, so a host running
39
+ only that collector needs one of the three bridges in the upgrade note below, or
40
+ its batches pile up unread. If no daemon is running, batches simply accumulate on
41
+ disk — the SDK does not fail, and your agent does not block.
42
+
43
+ ## Agent frameworks
44
+
45
+ If your agent runs on LangChain/LangGraph, CrewAI, LlamaIndex or Pydantic AI,
46
+ one line captures it — runs, sub-agents, tools, model calls and their token
47
+ counts — without threading an id through anything:
48
+
49
+ ```python
50
+ import failproofai_sdk
51
+
52
+ failproofai_sdk.configure(environment="production")
53
+ failproofai_sdk.instrument() # auto-detects what is already imported
54
+
55
+ graph.invoke({"messages": [...]}) # unchanged
56
+ ```
57
+
58
+ ```bash
59
+ pip install 'failproofai-sdk[langgraph]' # or [langchain] [crewai] [llamaindex] [pydantic-ai]
60
+ ```
61
+
62
+ The adapter code ships in the base wheel and imports its framework lazily, so
63
+ the extras are a convenience — `pip install failproofai-sdk` still declares no
64
+ dependencies at all, and `import failproofai_sdk` loads nothing outside the
65
+ standard library. See `skill/references/frameworks.md` for the per-framework
66
+ mapping, and `docs/` for a per-framework integration guide with runnable
67
+ examples beside it.
68
+
69
+ ## Scopes
70
+
71
+ The same identity layer, for code the adapters do not cover. `session_id` and
72
+ `agent_id` are optional on every event method — omitted, they resolve from the
73
+ enclosing scope:
74
+
75
+ ```python
76
+ with failproofai_sdk.session() as sid:
77
+ with failproofai_sdk.agent("planner", goal=question):
78
+
79
+ with failproofai_sdk.tool_call("search", input={"q": q}) as t:
80
+ t.output = search(q) # tool_use / tool_result, timed
81
+
82
+ with failproofai_sdk.agent("writer"): # a sub-agent; parent inferred
83
+ failproofai_sdk.event.model_request(model="...")
84
+ ```
85
+
86
+ `agent()` brackets a run with `agent_start`/`agent_end` and records an `error`
87
+ before the end event when the block raises — a cancellation closes it as
88
+ `cancelled` rather than failed. Every scope works under `async with` too.
89
+
90
+ Contextvars do **not** cross into a new thread, so hand work over with
91
+ `propagate`:
92
+
93
+ ```python
94
+ pool.submit(failproofai_sdk.propagate(work), item)
95
+ ```
96
+
97
+ Nothing bound and nothing passed raises `TypeError` naming the fix. It is never
98
+ a silent emit: ingest skips an event with no session and answers `200`.
99
+
100
+ ## Quick start
101
+
102
+ ```python
103
+ import failproofai_sdk
104
+
105
+ # Call once at startup. Omit to use defaults (~/.failproofai/custom-agents;
106
+ # 500ms flush interval).
107
+ failproofai_sdk.configure(base_dir=None, flush_interval=0.5)
108
+
109
+ # Emit events via failproofai_sdk.event.<method>(...)
110
+ failproofai_sdk.event.agent_start(session_id="run-001", agent_id="planner", goal="answer user query")
111
+
112
+ failproofai_sdk.event.tool_use(
113
+ session_id="run-001",
114
+ agent_id="planner",
115
+ tool_name="web_search",
116
+ tool_call_id="toolu_01",
117
+ input={"query": "latest AI research"},
118
+ )
119
+
120
+ failproofai_sdk.event.tool_result(
121
+ session_id="run-001",
122
+ agent_id="planner",
123
+ tool_name="web_search",
124
+ tool_call_id="toolu_01", # matches tool_use — SDK auto-computes duration_ms
125
+ output={"results": ["..."]},
126
+ )
127
+
128
+ failproofai_sdk.event.agent_end(session_id="run-001", agent_id="planner", outcome="success")
129
+ ```
130
+
131
+ ## configure()
132
+
133
+ ```python
134
+ failproofai_sdk.configure(
135
+ base_dir=None, # Path | str | None. Default:
136
+ # ~/.failproofai/custom-agents (honours $FAILPROOFAI_HOME)
137
+ flush_interval=0.5, # float, seconds between flush cycles
138
+ environment=None, # str | None. Else $AGENTEYE_ENVIRONMENT, else "dev"
139
+ )
140
+ ```
141
+
142
+ Call once before any `event.*` call. Safe to omit — defaults work out of the box.
143
+ When `base_dir` is `None`, the SDK spools to `~/.failproofai/custom-agents`
144
+ (honouring `$FAILPROOFAI_HOME`, which moves the umbrella; the `custom-agents`
145
+ segment is always appended, so the spool is always inside it).
146
+
147
+ **`base_dir` is the only way to spool anywhere else.** No environment variable
148
+ redirects it.
149
+
150
+ **The default spool root moved.** It was `~/.agenteye`. The daemon this SDK ships
151
+ beside, `failproofaid`, watches **both** roots and always has, so on a host
152
+ running it this changes which directory the files land in and nothing else.
153
+ Batches already sitting in `~/.agenteye/events` are not orphaned — they stay put
154
+ and are still collected; that directory simply stops growing.
155
+
156
+ > [!IMPORTANT]
157
+ > **If you run the older `agenteye-collector`, point IT at this SDK — not the
158
+ > other way round.** That collector resolves `$AGENTEYE_HOME` or `~/.agenteye`
159
+ > and nothing else, so it does not watch where this SDK writes: no upload, no
160
+ > error, and an unread spool looks exactly like an idle one.
161
+ >
162
+ > `AGENTEYE_HOME` used to be the way back, and is not any more — this SDK no
163
+ > longer reads it, so exporting it moves the collector and leaves the SDK where
164
+ > it was. Pick one of:
165
+ >
166
+ > * run `failproofaid` instead — it watches **both** roots, so nothing needs
167
+ > configuring; or
168
+ > * set **the collector's** `AGENTEYE_HOME=~/.failproofai/custom-agents`, so it
169
+ > watches `~/.failproofai/custom-agents/events` — where this SDK writes; or
170
+ > * `configure(base_dir="~/.agenteye")` in the application, which is explicit
171
+ > and visible at the call site.
172
+
173
+ `AGENTEYE_SPOOL_TO_FAILPROOFAI` is **retired**. It selected this root, but also
174
+ required the directory to already exist — and nothing ever created it, so the
175
+ opt-in never fired. Anyone who set it already wanted this and now gets it.
176
+
177
+ ## Event reference
178
+
179
+ All event methods share two required fields:
180
+
181
+ | Field | Type | Description |
182
+ |-------|------|-------------|
183
+ | `session_id` | `str` | Identifies the top-level agent run |
184
+ | `agent_id` | `str` | Identifies which agent within the session emitted the event |
185
+
186
+ Every method also accepts arbitrary `**fields` for custom metadata (see [Custom fields](#custom-fields)).
187
+
188
+ ---
189
+
190
+ ### `event.tool_use()`
191
+
192
+ Emitted when an agent invokes a tool. Pair with `tool_result` — the SDK auto-computes `duration_ms`.
193
+
194
+ ```python
195
+ failproofai_sdk.event.tool_use(
196
+ session_id="run-001",
197
+ agent_id="planner",
198
+ tool_name="web_search", # str, required
199
+ tool_call_id="toolu_01", # str, required — correlation key for the matching tool_result
200
+ input={"query": "..."}, # dict | None
201
+ )
202
+ ```
203
+
204
+ ---
205
+
206
+ ### `event.tool_result()`
207
+
208
+ Emitted when a tool returns. Correlates with `tool_use` via `tool_call_id`.
209
+
210
+ ```python
211
+ failproofai_sdk.event.tool_result(
212
+ session_id="run-001",
213
+ agent_id="planner",
214
+ tool_name="web_search",
215
+ tool_call_id="toolu_01", # must match the prior tool_use
216
+ output={"results": ["..."]}, # Any | None
217
+ error=None, # str | None — set if the tool raised
218
+ # duration_ms is computed automatically — do not pass it
219
+ )
220
+ ```
221
+
222
+ ---
223
+
224
+ ### `event.model_request()`
225
+
226
+ Emitted just before sending a prompt to an LLM.
227
+
228
+ ```python
229
+ failproofai_sdk.event.model_request(
230
+ session_id="run-001",
231
+ agent_id="planner",
232
+ model="claude-opus-4-6", # str | None
233
+ messages=[ # list[dict] | None — conversation turns
234
+ {"role": "user", "content": "..."},
235
+ ],
236
+ system="You are helpful.", # Any | None — str or list of content blocks
237
+ tools=[ # list[dict] | None — tool schemas offered to the model
238
+ {"name": "search", "input_schema": {"type": "object"}},
239
+ ],
240
+ )
241
+ ```
242
+
243
+ `messages` entries accept either a plain string `content` or Anthropic-style list-of-blocks `content`. Sampling params (`temperature`, `max_tokens`, etc.) can be passed as extra kwargs.
244
+
245
+ ---
246
+
247
+ ### `event.model_response()`
248
+
249
+ Emitted when the LLM returns a response.
250
+
251
+ ```python
252
+ failproofai_sdk.event.model_response(
253
+ session_id="run-001",
254
+ agent_id="planner",
255
+ model="claude-opus-4-6", # str | None
256
+ stop_reason="end_turn", # str | None
257
+ input_tokens=1024, # int | None
258
+ output_tokens=256, # int | None
259
+ content=[ # Any | None — str, or list of content blocks
260
+ {"type": "text", "text": "..."},
261
+ ],
262
+ role="assistant", # str | None
263
+ )
264
+ ```
265
+
266
+ `content` accepts either a plain string (generic providers) or a list of Anthropic-style content blocks. Tool calls live inside `content` as `{"type": "tool_use", ...}` blocks — no separate `tool_calls` field.
267
+
268
+ ---
269
+
270
+ ### `event.agent_start()`
271
+
272
+ Emitted when an agent begins work.
273
+
274
+ ```python
275
+ failproofai_sdk.event.agent_start(
276
+ session_id="run-001",
277
+ agent_id="planner",
278
+ goal="answer user query", # str | None
279
+ parent_id=None, # str | None — parent agent_id for nested agents
280
+ )
281
+ ```
282
+
283
+ ---
284
+
285
+ ### `event.agent_end()`
286
+
287
+ Emitted when an agent finishes work.
288
+
289
+ ```python
290
+ failproofai_sdk.event.agent_end(
291
+ session_id="run-001",
292
+ agent_id="planner",
293
+ outcome="success", # str | None
294
+ summary="Answered query", # str | None
295
+ )
296
+ ```
297
+
298
+ ---
299
+
300
+ ### `event.agent_pause()`
301
+
302
+ Emitted when an agent is suspended (e.g. waiting for human input, user-requested
303
+ pause, throttling). Does **not** end the agent — pair it with `agent_resume`, and
304
+ the SDK auto-computes the paused `duration_ms`. Emit `agent_resume` instead of a
305
+ second `agent_start` when the agent continues.
306
+
307
+ ```python
308
+ failproofai_sdk.event.agent_pause(
309
+ session_id="run-001",
310
+ agent_id="planner",
311
+ pause_id="pause-abc", # str, required — correlation key (reuse it on agent_resume)
312
+ reason="waiting_for_user", # str | None
313
+ user_id="usr_42", # str | None — who paused, if user-initiated
314
+ )
315
+ ```
316
+
317
+ `pause_id` is emitted on both events, so a pause always pairs to its resume — even
318
+ when they happen in different processes (in that case `duration_ms` is omitted and
319
+ the interval is derived downstream from the two timestamps).
320
+
321
+ ---
322
+
323
+ ### `event.agent_resume()`
324
+
325
+ Emitted when a paused agent continues. Correlates with `agent_pause` via `pause_id`;
326
+ the SDK auto-computes `duration_ms` (how long the agent was paused).
327
+
328
+ ```python
329
+ failproofai_sdk.event.agent_resume(
330
+ session_id="run-001",
331
+ agent_id="planner",
332
+ pause_id="pause-abc", # str, required — must match the prior agent_pause
333
+ reason="user_resumed", # str | None
334
+ user_id="usr_42", # str | None
335
+ # duration_ms is computed automatically — do not pass it
336
+ )
337
+ ```
338
+
339
+ ---
340
+
341
+ ### `event.hook_triggered()`
342
+
343
+ Emitted when a hook fires. Pair with `hook_completed` — the SDK auto-computes `duration_ms`.
344
+
345
+ ```python
346
+ failproofai_sdk.event.hook_triggered(
347
+ session_id="run-001",
348
+ agent_id="planner",
349
+ hook_name="pre_tool_use", # str, required
350
+ hook_id="hook-abc", # str, required — correlation key
351
+ trigger_event="tool_use", # str | None
352
+ input={"tool": "search"}, # Any | None
353
+ )
354
+ ```
355
+
356
+ ---
357
+
358
+ ### `event.hook_completed()`
359
+
360
+ Emitted when a hook finishes. Correlates with `hook_triggered` via `hook_id`.
361
+
362
+ ```python
363
+ failproofai_sdk.event.hook_completed(
364
+ session_id="run-001",
365
+ agent_id="planner",
366
+ hook_name="pre_tool_use",
367
+ hook_id="hook-abc", # must match the prior hook_triggered
368
+ outcome="allow", # str | None
369
+ output=None, # Any | None
370
+ error=None, # str | None
371
+ # duration_ms is computed automatically — do not pass it
372
+ )
373
+ ```
374
+
375
+ ---
376
+
377
+ ### `event.error()`
378
+
379
+ Emitted when an unhandled error occurs.
380
+
381
+ ```python
382
+ failproofai_sdk.event.error(
383
+ session_id="run-001",
384
+ agent_id="planner",
385
+ error_type="TimeoutError", # str, required
386
+ message="timed out", # str, required
387
+ traceback="Traceback...", # str | None
388
+ )
389
+ ```
390
+
391
+ ---
392
+
393
+ ## Custom fields
394
+
395
+ Any extra keyword arguments are appended to the event after the standard fields:
396
+
397
+ ```python
398
+ failproofai_sdk.event.tool_use(
399
+ session_id="run-001",
400
+ agent_id="planner",
401
+ tool_name="db_query",
402
+ tool_call_id="toolu_02",
403
+ request_id="req-123", # custom field
404
+ tenant_id="acme", # custom field
405
+ )
406
+ ```
407
+
408
+ The field names `timestamp`, `type`, and `environment` are reserved and raise
409
+ `ValueError` if passed as custom fields. `session_id` and `agent_id` are required
410
+ parameters and cannot be supplied a second time. Set the environment with
411
+ `configure(environment=...)` or `AGENTEYE_ENVIRONMENT`.
412
+
413
+ Keep payloads as structured JSON when downstream queries need their fields. Values
414
+ JSON does not natively support—such as datetimes, UUIDs, decimals, sets, bytes, or
415
+ model objects—are converted to strings so the writer can continue flushing the batch.
416
+
417
+ ## JSONL output
418
+
419
+ Events are buffered in-process and flushed to disk every `flush_interval` seconds (default 500ms).
420
+ Each flush writes one JSONL file:
421
+
422
+ ```
423
+ ~/.failproofai/custom-agents/events/event-2026-04-01T12-00-00-000Z-48213-7.jsonl
424
+ ```
425
+
426
+ Each line is one JSON object. Example:
427
+
428
+ ```json
429
+ {"timestamp": "2026-04-01T12:00:00.000000Z", "session_id": "run-001", "agent_id": "planner", "type": "agent_start", "goal": "answer user query"}
430
+ {"timestamp": "2026-04-01T12:00:00.123456Z", "session_id": "run-001", "agent_id": "planner", "type": "tool_use", "tool_name": "web_search", "tool_call_id": "toolu_01"}
431
+ ```
432
+
433
+ The batch is published by writing a `.tmp` file and atomically renaming it to
434
+ `.jsonl`, so a daemon polling the directory never reads a half-written file. The
435
+ trailing `<pid>-<seq>` keeps two batches written in the same millisecond — by two
436
+ threads, or by two agent processes sharing the spool — from overwriting each
437
+ other. You do not need to manage these files directly.
438
+
439
+ ## Development
440
+
441
+ ```bash
442
+ # Install dev dependencies
443
+ uv sync --locked --extra dev
444
+
445
+ # Run the test suite
446
+ uv run pytest tests/ -v
447
+
448
+ # Run a single test
449
+ uv run pytest tests/test_sdk.py -k duration -v
450
+ ```
451
+
452
+ | Suite | What it holds |
453
+ |---|---|
454
+ | `test_sdk.py` | The public API — every event method, unit and on-disk |
455
+ | `test_wire_format.py` | Golden bytes for all 15 event types, frozen |
456
+ | `test_server_contract.py` | The keys ingest promotes to indexed columns |
457
+ | `test_spool_contract.py` | Agreement with the daemons that read the spool |
458
+ | `test_durability.py` | Concurrency, crash and retry paths — nothing silently lost |
459
+ | `test_zero_dependencies.py` | The stdlib-only guarantee |
460
+ | `test_no_customer_identifiers.py` | Nothing private ships in a public wheel |
461
+
462
+ Two suites reach for sources outside this package. `test_spool_contract.py` reads
463
+ the Rust and TypeScript in this repo and never skips; set
464
+ `FAILPROOFAI_SDK_REQUIRE_CONTRACT=1` (CI does) so a moved file fails instead of
465
+ skipping. Set `FP_AGENTEYE_ROOT` to an AgentEye checkout to additionally verify
466
+ against the older collector and the live ingest handler.