failproofai 0.0.11-beta.2 → 0.0.11-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (474) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +8 -1
  3. package/.next/standalone/.next/build-manifest.json +10 -10
  4. package/.next/standalone/.next/prerender-manifest.json +3 -32
  5. package/.next/standalone/.next/required-server-files.json +2 -1
  6. package/.next/standalone/.next/routes-manifest.json +45 -3
  7. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +7 -7
  8. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  9. package/.next/standalone/.next/server/app/_global-error/page.js +6 -6
  10. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  11. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  14. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  15. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  16. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  17. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  18. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  19. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +7 -7
  20. package/.next/standalone/.next/server/app/_not-found/page/next-font-manifest.json +2 -6
  21. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  22. package/.next/standalone/.next/server/app/_not-found/page.js +12 -13
  23. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  26. package/.next/standalone/.next/server/app/_not-found.rsc +16 -16
  27. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
  28. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  29. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
  30. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  31. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  32. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  33. package/.next/standalone/.next/server/app/api/audit/run/route/app-paths-manifest.json +3 -0
  34. package/.next/standalone/.next/server/app/api/audit/run/route/server-reference-manifest.json +4 -0
  35. package/.next/standalone/.next/server/app/api/audit/run/route.js +8 -0
  36. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -0
  37. package/.next/standalone/.next/server/app/api/audit/run/route_client-reference-manifest.js +3 -0
  38. package/.next/standalone/.next/server/app/api/audit/status/route/app-paths-manifest.json +3 -0
  39. package/.next/standalone/.next/server/app/api/audit/status/route/build-manifest.json +9 -0
  40. package/.next/standalone/.next/server/app/api/audit/status/route/server-reference-manifest.json +4 -0
  41. package/.next/standalone/.next/server/app/api/audit/status/route.js +6 -0
  42. package/.next/standalone/.next/server/app/api/audit/status/route.js.map +5 -0
  43. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -0
  44. package/.next/standalone/.next/server/app/api/audit/status/route_client-reference-manifest.js +3 -0
  45. package/.next/standalone/.next/server/app/api/auth/login-request/route/app-paths-manifest.json +3 -0
  46. package/.next/standalone/.next/server/app/api/auth/login-request/route/build-manifest.json +9 -0
  47. package/.next/standalone/.next/server/app/api/auth/login-request/route/server-reference-manifest.json +4 -0
  48. package/.next/standalone/.next/server/app/api/auth/login-request/route.js +6 -0
  49. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.map +5 -0
  50. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -0
  51. package/.next/standalone/.next/server/app/api/auth/login-request/route_client-reference-manifest.js +3 -0
  52. package/.next/standalone/.next/server/app/api/auth/login-verify/route/app-paths-manifest.json +3 -0
  53. package/.next/standalone/.next/server/app/api/auth/login-verify/route/build-manifest.json +9 -0
  54. package/.next/standalone/.next/server/app/api/auth/login-verify/route/server-reference-manifest.json +4 -0
  55. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js +7 -0
  56. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.map +5 -0
  57. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -0
  58. package/.next/standalone/.next/server/app/api/auth/login-verify/route_client-reference-manifest.js +3 -0
  59. package/.next/standalone/.next/server/app/api/auth/logout/route/app-paths-manifest.json +3 -0
  60. package/.next/standalone/.next/server/app/api/auth/logout/route/build-manifest.json +9 -0
  61. package/.next/standalone/.next/server/app/api/auth/logout/route/server-reference-manifest.json +4 -0
  62. package/.next/standalone/.next/server/app/api/auth/logout/route.js +7 -0
  63. package/.next/standalone/.next/server/app/api/auth/logout/route.js.map +5 -0
  64. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -0
  65. package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +3 -0
  66. package/.next/standalone/.next/server/app/api/auth/reminder/route/app-paths-manifest.json +3 -0
  67. package/.next/standalone/.next/server/app/api/auth/reminder/route/build-manifest.json +9 -0
  68. package/.next/standalone/.next/server/app/api/auth/reminder/route/server-reference-manifest.json +4 -0
  69. package/.next/standalone/.next/server/app/api/auth/reminder/route.js +7 -0
  70. package/.next/standalone/.next/server/app/api/auth/reminder/route.js.map +5 -0
  71. package/.next/standalone/.next/server/app/api/auth/reminder/route.js.nft.json +1 -0
  72. package/.next/standalone/.next/server/app/api/auth/reminder/route_client-reference-manifest.js +3 -0
  73. package/.next/standalone/.next/server/app/api/auth/status/route/app-paths-manifest.json +3 -0
  74. package/.next/standalone/.next/server/app/api/auth/status/route/build-manifest.json +9 -0
  75. package/.next/standalone/.next/server/app/api/auth/status/route/server-reference-manifest.json +4 -0
  76. package/.next/standalone/.next/server/app/api/auth/status/route.js +7 -0
  77. package/.next/standalone/.next/server/app/api/auth/status/route.js.map +5 -0
  78. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -0
  79. package/.next/standalone/.next/server/app/api/auth/status/route_client-reference-manifest.js +3 -0
  80. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +3 -3
  81. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/audit/page/app-paths-manifest.json +3 -0
  83. package/.next/standalone/.next/server/app/audit/page/build-manifest.json +18 -0
  84. package/.next/standalone/.next/server/app/audit/page/next-font-manifest.json +6 -0
  85. package/.next/standalone/.next/server/app/audit/page/react-loadable-manifest.json +1 -0
  86. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +29 -0
  87. package/.next/standalone/.next/server/app/audit/page.js +17 -0
  88. package/.next/standalone/.next/server/app/audit/page.js.map +5 -0
  89. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -0
  90. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +3 -0
  91. package/.next/standalone/.next/server/app/index.html +1 -1
  92. package/.next/standalone/.next/server/app/index.rsc +16 -17
  93. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  94. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +16 -17
  95. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  96. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
  97. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -3
  98. package/.next/standalone/.next/server/app/page/build-manifest.json +7 -7
  99. package/.next/standalone/.next/server/app/page/next-font-manifest.json +2 -6
  100. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  101. package/.next/standalone/.next/server/app/page.js +14 -15
  102. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  103. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  104. package/.next/standalone/.next/server/app/policies/page/build-manifest.json +7 -7
  105. package/.next/standalone/.next/server/app/policies/page/next-font-manifest.json +2 -6
  106. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
  107. package/.next/standalone/.next/server/app/policies/page.js +16 -16
  108. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  109. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +7 -7
  111. package/.next/standalone/.next/server/app/project/[name]/page/next-font-manifest.json +2 -6
  112. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  113. package/.next/standalone/.next/server/app/project/[name]/page.js +16 -17
  114. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  115. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +7 -7
  117. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/next-font-manifest.json +2 -6
  118. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  119. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  120. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +19 -20
  121. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  122. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/projects/page/build-manifest.json +7 -7
  124. package/.next/standalone/.next/server/app/projects/page/next-font-manifest.json +2 -6
  125. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  126. package/.next/standalone/.next/server/app/projects/page.js +15 -16
  127. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  128. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  129. package/.next/standalone/.next/server/app-paths-manifest.json +8 -1
  130. package/.next/standalone/.next/server/chunks/[externals]__14odj07._.js +3 -0
  131. package/.next/standalone/.next/server/chunks/{[externals]__0z0j--b._.js → [externals]__1nl3dvw._.js} +1 -1
  132. package/.next/standalone/.next/server/chunks/{[externals]__0-p9.k~._.js → [externals]__1s61mel._.js} +1 -1
  133. package/.next/standalone/.next/server/chunks/{[externals]_node_os_06ur78j._.js → [externals]_node_os_0by37l-._.js} +1 -1
  134. package/.next/standalone/.next/server/chunks/[root-of-the-server]__07tgnzi._.js +3 -0
  135. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0kjo7d_._.js → [root-of-the-server]__0_0xu5z._.js} +2 -2
  136. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0cag8qd._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0z-180.._.js → [root-of-the-server]__0cycwg6._.js} +2 -2
  138. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__08px0ym._.js → [root-of-the-server]__0f7mikp._.js} +1 -1
  139. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oeun7z._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q-v9z2._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rv7m0k._.js +3 -0
  142. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0g48iv.._.js → [root-of-the-server]__0sb_5m8._.js} +3 -3
  143. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0j8-xkl._.js → [root-of-the-server]__0xuaoik._.js} +2 -2
  144. package/.next/standalone/.next/server/chunks/[root-of-the-server]__12pit4m._.js +3 -0
  145. package/.next/standalone/.next/server/chunks/[root-of-the-server]__13h8pzr._.js +3 -0
  146. package/.next/standalone/.next/server/chunks/[root-of-the-server]__13ra2jq._.js +3 -0
  147. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17g9wh7._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0d_ob4n._.js → [root-of-the-server]__1_mqemn._.js} +2 -2
  149. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1b9z5-i._.js +3 -0
  150. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0vlhtkc._.js → [root-of-the-server]__1hgv_75._.js} +1 -1
  151. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ixjiy8._.js +3 -0
  152. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0wu7fr7._.js → [root-of-the-server]__1jm9fw6._.js} +1 -1
  153. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1legmza._.js +3 -0
  154. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0fwb7ao._.js → [root-of-the-server]__1m2_4t0._.js} +2 -2
  155. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0yfq1yr._.js → [root-of-the-server]__1mhmdzs._.js} +1 -1
  156. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0zso~62._.js → [root-of-the-server]__1ou2ehh._.js} +1 -1
  157. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1qxztj-._.js +3 -0
  158. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1rhmvod._.js +3 -0
  159. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0.~nmr9._.js → [root-of-the-server]__1w9zl9-._.js} +1 -1
  160. package/.next/standalone/.next/server/chunks/{_0ebx_lc._.js → _0p53ge1._.js} +2 -2
  161. package/.next/standalone/.next/server/chunks/_1-1804f._.js +3 -0
  162. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_audit_run_route_actions_1qgp9io.js +3 -0
  163. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_audit_status_route_actions_1f7pjof.js +3 -0
  164. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_auth_login-request_route_actions_1c49co0.js +3 -0
  165. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_auth_login-verify_route_actions_1r3slzk.js +3 -0
  166. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_auth_logout_route_actions_0regwyr.js +3 -0
  167. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_auth_reminder_route_actions_1kjgxf8.js +3 -0
  168. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_auth_status_route_actions_1aho9zu.js +3 -0
  169. package/.next/standalone/.next/server/chunks/{_next-internal_server_app_api_download_[project]_[session]_route_actions_0wb00i-.js → _next-internal_server_app_api_download_[project]_[session]_route_actions_1is7vs7.js} +1 -1
  170. package/.next/standalone/.next/server/chunks/{lib_logger_ts_047tt9f._.js → lib_logger_ts_07e65t5._.js} +1 -1
  171. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_17k9e3w.js +23 -0
  172. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oi._.js +3 -0
  173. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p7._.js +3 -0
  174. package/.next/standalone/.next/server/chunks/{package_json_[json]_cjs_0z7w.hh._.js → package_json_[json]_cjs_1nxcc4v._.js} +2 -2
  175. package/.next/standalone/.next/server/chunks/ssr/{[externals]__12dv.x0._.js → [externals]__1_g_b3t._.js} +1 -1
  176. package/.next/standalone/.next/server/chunks/ssr/{[externals]_node_async_hooks_0v0ln8c._.js → [externals]_node_async_hooks_1gjz99j._.js} +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ts150~._.js → [root-of-the-server]__0-wdurj._.js} +2 -2
  178. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00jkjmt._.js +4 -0
  179. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013du6r._.js +4 -0
  180. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06f-yix._.js +3 -0
  181. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0989_dx._.js +3 -0
  182. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e85wxv._.js +4 -0
  183. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gfxvb1._.js +3 -0
  184. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h12me5._.js +3 -0
  185. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0l13qf2._.js +3 -0
  186. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-scthx._.js +3 -0
  187. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11rtg6s._.js +3 -0
  188. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__14dd6h8._.js +3 -0
  189. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1cd25c7._.js +4 -0
  190. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0t5l7a5._.js → [root-of-the-server]__1d8omgc._.js} +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0tcyn68._.js → [root-of-the-server]__1dky4g0._.js} +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__098zro9._.js → [root-of-the-server]__1fax1sl._.js} +4 -4
  193. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1hlrq6y._.js +4 -0
  194. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ihxdo5._.js +4 -0
  195. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1mt35_w._.js +221 -0
  196. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-wn51s._.js → [root-of-the-server]__1pcxxwg._.js} +3 -3
  197. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1usf8v2._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1vvfde2._.js +4 -0
  199. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__212nf49._.js +3 -0
  200. package/.next/standalone/.next/server/chunks/ssr/{_03d7qyt._.js → _05whahf._.js} +1 -1
  201. package/.next/standalone/.next/server/chunks/ssr/_11_p9y8._.js +3 -0
  202. package/.next/standalone/.next/server/chunks/ssr/{_0xb8ngh._.js → _1kje4fm._.js} +1 -1
  203. package/.next/standalone/.next/server/chunks/ssr/{_0zx~s__._.js → _1p0-leb._.js} +1 -1
  204. package/.next/standalone/.next/server/chunks/ssr/{app_04qfs8z._.js → app_087bt9w._.js} +1 -1
  205. package/.next/standalone/.next/server/chunks/ssr/{app_0uosk1e._.js → app_1fvisnp._.js} +1 -1
  206. package/.next/standalone/.next/server/chunks/ssr/{app_13f0ohr._.js → app_209u41o._.js} +1 -1
  207. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +43 -0
  208. package/.next/standalone/.next/server/chunks/ssr/app_audit_loading_tsx_1j1kc6j._.js +3 -0
  209. package/.next/standalone/.next/server/chunks/ssr/{app_error_tsx_11t4ysq._.js → app_error_tsx_1zds1ns._.js} +1 -1
  210. package/.next/standalone/.next/server/chunks/ssr/{app_global-error_tsx_0m9qisk._.js → app_global-error_tsx_113y3za._.js} +1 -1
  211. package/.next/standalone/.next/server/chunks/ssr/{app_global-error_tsx_0xerkr6._.js → app_global-error_tsx_1kp6l3x._.js} +2 -2
  212. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +8 -0
  213. package/.next/standalone/.next/server/chunks/ssr/{app_project_[name]_error_tsx_0.9-fod._.js → app_project_[name]_error_tsx_1v02_5n._.js} +1 -1
  214. package/.next/standalone/.next/server/chunks/ssr/{app_project_[name]_loading_tsx_03g9xy0._.js → app_project_[name]_loading_tsx_05-l4uf._.js} +1 -1
  215. package/.next/standalone/.next/server/chunks/ssr/{app_project_[name]_session_[sessionId]_error_tsx_0ler-mr._.js → app_project_[name]_session_[sessionId]_error_tsx_0-lj3nd._.js} +1 -1
  216. package/.next/standalone/.next/server/chunks/ssr/{app_project_[name]_session_[sessionId]_loading_tsx_0c0e3yx._.js → app_project_[name]_session_[sessionId]_loading_tsx_0l4aixs._.js} +1 -1
  217. package/.next/standalone/.next/server/chunks/ssr/app_projects_loading_tsx_20-3u8b._.js +3 -0
  218. package/.next/standalone/.next/server/chunks/ssr/{lib_codex-projects_ts_0eosib~._.js → lib_codex-projects_ts_0pqlw37._.js} +1 -1
  219. package/.next/standalone/.next/server/chunks/ssr/{lib_copilot-projects_ts_0r8xkn8._.js → lib_copilot-projects_ts_19wl7tp._.js} +1 -1
  220. package/.next/standalone/.next/server/chunks/ssr/{lib_cursor-projects_ts_0qt1scg._.js → lib_cursor-projects_ts_18-iwyk._.js} +1 -1
  221. package/.next/standalone/.next/server/chunks/ssr/{lib_gemini-projects_ts_0sl~yqr._.js → lib_gemini-projects_ts_1c7bgx-._.js} +1 -1
  222. package/.next/standalone/.next/server/chunks/ssr/{lib_opencode-projects_ts_0op9gyp._.js → lib_opencode-projects_ts_15bjxkm._.js} +1 -1
  223. package/.next/standalone/.next/server/chunks/ssr/{lib_pi-projects_ts_103tsh1._.js → lib_pi-projects_ts_1wikofb._.js} +1 -1
  224. package/.next/standalone/.next/server/chunks/ssr/{lib_utils_ts_068jk73._.js → lib_utils_ts_0az0sfq._.js} +1 -1
  225. package/.next/standalone/.next/server/chunks/ssr/node_modules_1ynf7el._.js +3 -0
  226. package/.next/standalone/.next/server/chunks/ssr/node_modules_html2canvas_dist_html2canvas_esm_0hmsdod.js +3 -0
  227. package/.next/standalone/.next/server/chunks/ssr/node_modules_html2canvas_dist_html2canvas_esm_1n-0xws.js +3 -0
  228. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_0rd0oc-._.js → node_modules_next_1a1kch7._.js} +1 -1
  229. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_0h9llsw._.js → node_modules_next_dist_0uboya6._.js} +2 -2
  230. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_11dij6w._.js → node_modules_next_dist_1d_onnt._.js} +3 -3
  231. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_client_components_0inhx6q._.js → node_modules_next_dist_client_components_0wpq8j3._.js} +1 -1
  232. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js → node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js} +1 -1
  233. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js → node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js} +1 -1
  234. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-uvagv.js +4 -0
  235. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03c7gi5.js +4 -0
  236. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_09p-8om.js +4 -0
  237. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0v-kfiu.js +4 -0
  238. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0j79~gv.js → node_modules_next_dist_esm_build_templates_app-page_0xrgzyz.js} +1 -1
  239. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1806lsc.js +4 -0
  240. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1j6dd-e.js +4 -0
  241. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1sa65r-.js +4 -0
  242. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js +3 -0
  243. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1ezd2jf._.js +5 -0
  244. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1tnuifj._.js +5 -0
  245. package/.next/standalone/.next/server/functions-config-manifest.json +3 -0
  246. package/.next/standalone/.next/server/instrumentation.js +1 -1
  247. package/.next/standalone/.next/server/middleware-build-manifest.js +10 -10
  248. package/.next/standalone/.next/server/middleware.js +2 -2
  249. package/.next/standalone/.next/server/next-font-manifest.js +1 -1
  250. package/.next/standalone/.next/server/next-font-manifest.json +2 -21
  251. package/.next/standalone/.next/server/pages/404.html +1 -1
  252. package/.next/standalone/.next/server/pages/500.html +1 -1
  253. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  254. package/.next/standalone/.next/server/server-reference-manifest.json +27 -9
  255. package/.next/standalone/.next/static/chunks/{07uz2g0_38qia.js → 03fmihek9n986.js} +1 -1
  256. package/.next/standalone/.next/static/chunks/09ueq8s1as8xs.css +2 -0
  257. package/.next/standalone/.next/static/chunks/0fkntmojmibda.js +6 -0
  258. package/.next/standalone/.next/static/chunks/{11w14gnqzprir.js → 0nbmu4_n1j2-c.js} +1 -1
  259. package/.next/standalone/.next/static/chunks/0qassxjx1ef04.js +1 -0
  260. package/.next/standalone/.next/static/chunks/0zbxssxh53n-3.js +1 -0
  261. package/.next/standalone/.next/static/chunks/13f1kmjea-0md.js +2 -0
  262. package/.next/standalone/.next/static/chunks/1btx2c49fk9xt.css +1 -0
  263. package/.next/standalone/.next/static/chunks/1bxdpd036n3l9.js +41 -0
  264. package/.next/standalone/.next/static/chunks/{0bke.~atnsbeb.js → 1e0o-6kjfnwzh.js} +1 -1
  265. package/.next/standalone/.next/static/chunks/20b5bz43so-1k.js +1 -0
  266. package/.next/standalone/.next/static/chunks/2zjavpea8glet.js +1 -0
  267. package/.next/standalone/.next/static/chunks/{0d3shmwh5_nmn.js → 33u59vf_8xpd-.js} +1 -1
  268. package/.next/standalone/.next/static/chunks/{0dvhi-prcsh3~.js → 36l507r2mbf5h.js} +1 -1
  269. package/.next/standalone/.next/static/chunks/3gti1qdk5epqn.js +1 -0
  270. package/.next/standalone/.next/static/chunks/{17mubwtqwijpu.js → 3w8d8k_dca5rp.js} +1 -1
  271. package/.next/standalone/.next/static/chunks/{0bv1oyxspkpkb.js → 3y3l184vijlfg.js} +1 -1
  272. package/.next/standalone/.next/static/chunks/41jjdgqqpl7em.js +1 -0
  273. package/.next/standalone/.next/static/chunks/{turbopack-0nh.aopesgj~5.js → turbopack-00qy7zfa7m--m.js} +1 -1
  274. package/.next/standalone/SECURITY.md +73 -0
  275. package/.next/standalone/app/actions/get-audit-result.ts +24 -0
  276. package/.next/standalone/app/api/audit/_state.ts +72 -0
  277. package/.next/standalone/app/api/audit/run/route.ts +89 -0
  278. package/.next/standalone/app/api/audit/status/route.ts +23 -0
  279. package/.next/standalone/app/api/auth/login-request/route.ts +91 -0
  280. package/.next/standalone/app/api/auth/login-verify/route.ts +98 -0
  281. package/.next/standalone/app/api/auth/logout/route.ts +48 -0
  282. package/.next/standalone/app/api/auth/reminder/route.ts +213 -0
  283. package/.next/standalone/app/api/auth/status/route.ts +42 -0
  284. package/.next/standalone/app/audit/_components/audit-dashboard.tsx +364 -0
  285. package/.next/standalone/app/audit/_components/auth-dialog.tsx +401 -0
  286. package/.next/standalone/app/audit/_components/empty-state.tsx +146 -0
  287. package/.next/standalone/app/audit/_components/findings-section.tsx +135 -0
  288. package/.next/standalone/app/audit/_components/identity-section.tsx +126 -0
  289. package/.next/standalone/app/audit/_components/policies-section.tsx +194 -0
  290. package/.next/standalone/app/audit/_components/report-footer.tsx +35 -0
  291. package/.next/standalone/app/audit/_components/rerun-button.tsx +81 -0
  292. package/.next/standalone/app/audit/_components/return-section.tsx +428 -0
  293. package/.next/standalone/app/audit/_components/run-progress.tsx +120 -0
  294. package/.next/standalone/app/audit/_components/score-section.tsx +179 -0
  295. package/.next/standalone/app/audit/_components/share-dock.tsx +265 -0
  296. package/.next/standalone/app/audit/_components/share-templates.ts +67 -0
  297. package/.next/standalone/app/audit/_components/show-off-cta.tsx +135 -0
  298. package/.next/standalone/app/audit/_components/sigil.tsx +93 -0
  299. package/.next/standalone/app/audit/_components/strengths-section.tsx +57 -0
  300. package/.next/standalone/app/audit/audit-styles.css +2066 -0
  301. package/.next/standalone/app/audit/loading.tsx +24 -0
  302. package/.next/standalone/app/audit/page.tsx +53 -0
  303. package/.next/standalone/app/globals.css +570 -137
  304. package/.next/standalone/app/layout.tsx +16 -9
  305. package/.next/standalone/app/policies/hooks-client.tsx +223 -129
  306. package/.next/standalone/app/project/[name]/page.tsx +89 -39
  307. package/.next/standalone/app/projects/loading.tsx +30 -8
  308. package/.next/standalone/app/projects/page.tsx +76 -18
  309. package/.next/standalone/assets/audit/Audit Report.html +22 -0
  310. package/.next/standalone/assets/audit/Show Off Your Agent.html +22 -0
  311. package/.next/standalone/assets/audit/archetypes.jsx +277 -0
  312. package/.next/standalone/assets/audit/assets/fonts/bitcount-prop-single.woff2 +0 -0
  313. package/.next/standalone/assets/audit/audit.jsx +825 -0
  314. package/.next/standalone/assets/audit/poster-styles.css +424 -0
  315. package/.next/standalone/assets/audit/poster.jsx +247 -0
  316. package/.next/standalone/assets/audit/screenshots/poster-optimist.png +0 -0
  317. package/.next/standalone/assets/audit/screenshots/poster-scrolled.png +0 -0
  318. package/.next/standalone/assets/audit/styles.css +1225 -0
  319. package/.next/standalone/assets/audit/tweaks-panel.jsx +425 -0
  320. package/.next/standalone/assets/logos/company/icon.svg +1 -0
  321. package/.next/standalone/assets/logos/company/logo.svg +1 -0
  322. package/.next/standalone/components/navbar.tsx +154 -65
  323. package/.next/standalone/components/reach-developers.tsx +37 -9
  324. package/.next/standalone/lib/atomic-write.ts +67 -0
  325. package/.next/standalone/lib/auth/api-server-client.ts +281 -0
  326. package/.next/standalone/lib/auth/auth-store.ts +250 -0
  327. package/.next/standalone/lib/client-telemetry.ts +2 -0
  328. package/.next/standalone/lib/fetch-with-timeout.ts +42 -0
  329. package/.next/standalone/lib/share-card.ts +144 -0
  330. package/.next/standalone/lib/telemetry.ts +12 -7
  331. package/.next/standalone/node_modules/@next/env/package.json +1 -1
  332. package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
  333. package/.next/standalone/node_modules/next/dist/client/dev/debug-channel.js +102 -2
  334. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +11 -11
  335. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +13 -13
  336. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +2 -2
  337. package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
  338. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  339. package/.next/standalone/node_modules/next/dist/server/app-render/action-handler.js +18 -8
  340. package/.next/standalone/node_modules/next/dist/server/config-schema.js +1 -0
  341. package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
  342. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  343. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  344. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  345. package/.next/standalone/node_modules/next/dist/server/lib/encode-cache-tag.js +45 -0
  346. package/.next/standalone/node_modules/next/dist/server/lib/implicit-tags.js +6 -3
  347. package/.next/standalone/node_modules/next/dist/server/lib/patch-fetch.js +5 -1
  348. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
  349. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/revalidate.js +4 -3
  350. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +6 -2
  351. package/.next/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  352. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  353. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  354. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
  355. package/.next/standalone/node_modules/next/package.json +15 -15
  356. package/.next/standalone/node_modules/react/cjs/react.development.js +1 -1
  357. package/.next/standalone/node_modules/react/cjs/react.production.js +1 -1
  358. package/.next/standalone/node_modules/react/package.json +1 -1
  359. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1 -1
  360. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1 -1
  361. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +3 -3
  362. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +3 -3
  363. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +3 -3
  364. package/.next/standalone/node_modules/react-dom/cjs/react-dom.production.js +1 -1
  365. package/.next/standalone/node_modules/react-dom/package.json +2 -2
  366. package/.next/standalone/osv-scanner.toml +17 -0
  367. package/.next/standalone/package.json +8 -3
  368. package/.next/standalone/public/audit/fonts/bitcount-prop-single.woff2 +0 -0
  369. package/.next/standalone/public/icon.svg +1 -0
  370. package/.next/standalone/public/logo.svg +1 -0
  371. package/.next/standalone/server.js +1 -1
  372. package/.next/standalone/templates/bitcount-font/README.md +42 -0
  373. package/.next/standalone/templates/bitcount-font/bitcount-prop-single.woff2 +0 -0
  374. package/.next/standalone/templates/bitcount-font/bitcount.css +49 -0
  375. package/.next/standalone/templates/bitcount-font/fonts.ts.example +23 -0
  376. package/README.md +2 -1
  377. package/bin/failproofai.mjs +165 -144
  378. package/dist/cli.mjs +607 -1858
  379. package/lib/atomic-write.ts +67 -0
  380. package/lib/auth/api-server-client.ts +281 -0
  381. package/lib/auth/auth-store.ts +250 -0
  382. package/lib/client-telemetry.ts +2 -0
  383. package/lib/fetch-with-timeout.ts +42 -0
  384. package/lib/share-card.ts +144 -0
  385. package/lib/telemetry.ts +12 -7
  386. package/package.json +8 -3
  387. package/scripts/install-telemetry.mjs +4 -0
  388. package/src/audit/archetypes.ts +924 -0
  389. package/src/audit/cache.ts +21 -2
  390. package/src/audit/dashboard-cache.ts +111 -0
  391. package/src/audit/features.ts +268 -0
  392. package/src/audit/findings.ts +298 -0
  393. package/src/audit/index.ts +39 -21
  394. package/src/audit/replay.ts +29 -3
  395. package/src/audit/scoring.ts +174 -0
  396. package/src/audit/strengths.ts +138 -0
  397. package/src/audit/types.ts +24 -1
  398. package/src/auth/cli.ts +359 -0
  399. package/src/hooks/builtin-policies.ts +2 -1
  400. package/src/hooks/hook-telemetry.ts +2 -2
  401. package/src/hooks/policy-registry.ts +20 -0
  402. package/src/posthog-key.ts +9 -0
  403. package/.next/standalone/.next/server/app/icon.png/route/app-paths-manifest.json +0 -3
  404. package/.next/standalone/.next/server/app/icon.png/route.js +0 -7
  405. package/.next/standalone/.next/server/app/icon.png/route.js.nft.json +0 -1
  406. package/.next/standalone/.next/server/app/icon.png.body +0 -0
  407. package/.next/standalone/.next/server/app/icon.png.meta +0 -1
  408. package/.next/standalone/.next/server/chunks/[externals]_next_dist_0sqmaqd._.js +0 -3
  409. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06.arfm._.js +0 -3
  410. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0__i0h0._.js +0 -3
  411. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fe7_q_._.js +0 -3
  412. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fw.e.h._.js +0 -3
  413. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pxn0e1._.js +0 -3
  414. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xv0jh2._.js +0 -3
  415. package/.next/standalone/.next/server/chunks/_next-internal_server_app_icon_png_route_actions_12.gv.r.js +0 -3
  416. package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0bdfoky.js +0 -3
  417. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_05pz9._._.js +0 -3
  418. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01as125._.js +0 -3
  419. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0370~qj._.js +0 -3
  420. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09v.ljl._.js +0 -3
  421. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0agrcb8._.js +0 -4
  422. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b7hkr~._.js +0 -3
  423. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ehh6vp._.js +0 -4
  424. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g8l0tu._.js +0 -3
  425. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j4l6hl._.js +0 -3
  426. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0k5n2kz._.js +0 -4
  427. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lp08ll._.js +0 -3
  428. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n0yaqw._.js +0 -4
  429. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0o21f.o._.js +0 -3
  430. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t8juvy._.js +0 -4
  431. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0uylufv._.js +0 -4
  432. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ymlddl._.js +0 -223
  433. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~03grs._.js +0 -3
  434. package/.next/standalone/.next/server/chunks/ssr/app_0cdqd9w._.js +0 -3
  435. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +0 -8
  436. package/.next/standalone/.next/server/chunks/ssr/app_projects_loading_tsx_13veom4._.js +0 -3
  437. package/.next/standalone/.next/server/chunks/ssr/node_modules_0ttbz1~._.js +0 -3
  438. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_06u0kr8._.js +0 -3
  439. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0a_7sdg.js +0 -4
  440. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ef3uwk.js +0 -4
  441. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0pbja1x.js +0 -4
  442. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0r6o0i2.js +0 -4
  443. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11y81~_.js +0 -4
  444. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_12or2kf.js +0 -4
  445. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0mebn66._.js +0 -3
  446. package/.next/standalone/.next/static/chunks/07kpqoo7kuckx.js +0 -6
  447. package/.next/standalone/.next/static/chunks/0azb~vy9ds_uy.js +0 -1
  448. package/.next/standalone/.next/static/chunks/0f5p9plm.aqlp.css +0 -2
  449. package/.next/standalone/.next/static/chunks/0ffvlbgzgnlw7.js +0 -2
  450. package/.next/standalone/.next/static/chunks/0spktq7xqab9h.js +0 -1
  451. package/.next/standalone/.next/static/chunks/118q3uljozd5z.js +0 -4
  452. package/.next/standalone/.next/static/chunks/12pt~2f.c1sha.js +0 -1
  453. package/.next/standalone/.next/static/media/4fa387ec64143e14-s.0.qu-9752pffj.woff2 +0 -0
  454. package/.next/standalone/.next/static/media/5ce348bf30bf5439-s.0ee55_hj9qcer.woff2 +0 -0
  455. package/.next/standalone/.next/static/media/6306c77e7c8268e4-s.0mao5jbfbduzp.woff2 +0 -0
  456. package/.next/standalone/.next/static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2 +0 -0
  457. package/.next/standalone/.next/static/media/7d817b4c03b0c5f1-s.0uzt.a6d44yda.woff2 +0 -0
  458. package/.next/standalone/.next/static/media/bbc41e54d2fcbd21-s.0mvwgmnhv29no.woff2 +0 -0
  459. package/.next/standalone/.next/static/media/icon.0a.gigb3_x5pd.png +0 -0
  460. package/.next/standalone/app/icon.png +0 -0
  461. package/src/audit/telemetry.ts +0 -113
  462. /package/.next/standalone/.next/server/app/{icon.png → api/audit/run}/route/build-manifest.json +0 -0
  463. /package/.next/standalone/.next/server/app/{icon.png → api/audit/run}/route.js.map +0 -0
  464. /package/.next/standalone/.next/static/chunks/{03~yq9q893hmn.js → 0cz1d0mv5g_q7.js} +0 -0
  465. /package/.next/standalone/.next/static/chunks/{0a40sy4tk8ioe.js → 0wwt5o04i4zwh.js} +0 -0
  466. /package/.next/standalone/.next/static/chunks/{0n1n67imq.udf.js → 1__i9af9g78vd.js} +0 -0
  467. /package/.next/standalone/.next/static/chunks/{0w6fzf.07a24u.js → 2so39wg7mjbi7.js} +0 -0
  468. /package/.next/standalone/.next/static/chunks/{0xbo5nl6w4lka.js → 2wbuxnsvux4di.js} +0 -0
  469. /package/.next/standalone/.next/static/chunks/{0_s0luks5tay-.js → 35fgpd_feci6x.js} +0 -0
  470. /package/.next/standalone/.next/static/chunks/{15fklyav5py5m.js → 3xpjn3cdgm-7m.js} +0 -0
  471. /package/.next/standalone/.next/static/chunks/{17.b3suj8zjjj.js → 4448_qq7bd963.js} +0 -0
  472. /package/.next/standalone/.next/static/{tGVQM5SE3NvbVu0gbAJm7 → t4nu8RTRp3Z2srol-9pVb}/_buildManifest.js +0 -0
  473. /package/.next/standalone/.next/static/{tGVQM5SE3NvbVu0gbAJm7 → t4nu8RTRp3Z2srol-9pVb}/_clientMiddlewareManifest.js +0 -0
  474. /package/.next/standalone/.next/static/{tGVQM5SE3NvbVu0gbAJm7 → t4nu8RTRp3Z2srol-9pVb}/_ssgManifest.js +0 -0
@@ -0,0 +1,4 @@
1
+ module.exports=[74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},37936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},12072,(a,b,c)=>{b.exports={name:"failproofai",version:"0.0.11-beta.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",bin:{failproofai:"./dist/cli.mjs"},files:["bin/","src/","scripts/","lib/","pi-extension/",".next/standalone/","dist/","README.md"],engines:{node:">=20.9.0",bun:">=1.3.0"},scripts:{predev:"bun run build:cli && bun link",dev:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/dev.ts --port 8020","build:cli":"bun build --target=node --format=esm --outfile=dist/cli.mjs bin/failproofai.mjs --external posthog-node && node -e \"const fs=require('fs');const c=fs.readFileSync('dist/cli.mjs','utf8');fs.writeFileSync('dist/cli.mjs',c.replace('#!/usr/bin/env bun','#!/usr/bin/env node').replace('// @bun\\n',''))\"",build:"bun build --target=node --format=cjs --outfile=dist/index.js src/index.ts && bun run build:cli && bun --bun next build && node -e \"const {cpSync}=require('fs');cpSync('.next/static','.next/standalone/.next/static',{recursive:true});\" && node scripts/prune-standalone.mjs",prestart:"bun run build:cli && bun link",start:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/start.ts",test:"vitest","test:run":"vitest run",lint:"eslint . --config eslint.config.mjs",postinstall:"node scripts/postinstall.mjs",preuninstall:"node scripts/preuninstall.mjs",prepare:"bun run build","test:e2e":"vitest run --config vitest.config.e2e.mts","test:e2e:watch":"vitest --config vitest.config.e2e.mts",translate:"bun scripts/translate-docs/cli.ts","translate:readme":"bun scripts/translate-docs/cli.ts --readme-only","translate:docs":"bun scripts/translate-docs/cli.ts --docs-only","translate:dry-run":"bun scripts/translate-docs/cli.ts --dry-run","translate:validate":"bun scripts/translate-docs/cli.ts --validate"},keywords:["claude","claude-code","claude-agents-sdk","anthropic","ai-agent","agent-reliability","agent-monitoring","autonomous-agent","failure-prevention","developer-tools","devtools","cli","local-first","hooks","policies"],author:"ExosphereHost Inc. <failproofai@exosphere.host>",license:"SEE LICENSE IN LICENSE",homepage:"https://github.com/FailproofAI/failproofai",repository:{type:"git",url:"https://github.com/FailproofAI/failproofai.git"},bugs:{url:"https://github.com/FailproofAI/failproofai/issues"},publishConfig:{access:"public"},devDependencies:{"@anthropic-ai/sdk":"^0.102.0","@tailwindcss/postcss":"^4.1.18","@tanstack/react-virtual":"^3.13.18","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@testing-library/user-event":"^14.6.1","@types/node":"^25.5.2","@types/react":"^19.2.13","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^6.0.1",clsx:"^2.1.1",eslint:"^10.2.0","eslint-config-next":"^16.2.2",jsdom:"^29.1.1","lucide-react":"^1.0.1",next:"^16.2.2",react:"^19.2.4","react-dom":"^19.2.4","tailwind-merge":"^3.4.0",tailwindcss:"^4.1.18",typescript:"^6.0.2",vitest:"^4.0.18"},dependencies:{html2canvas:"^1.4.1","posthog-node":"^5.28.11"},overrides:{postcss:"8.5.14","eslint-plugin-react-hooks":"7.0.1"}}},13095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},36359,69839,79779,a=>{"use strict";let b;var c=a.i(37936),d=a.i(2157),e=a.i(50227),f=a.i(60526),g=a.i(66680);a.i(74533);let h=e.default.join(f.default.homedir(),".failproofai"),i=e.default.join(h,"instance-id");function j(a){return g.default.createHmac("sha256","failproofai-telemetry-v1").update(a).digest("hex")}function k(){if(b)return b;let a=function(){try{for(let a of(f.default.platform(),["/etc/machine-id","/var/lib/dbus/machine-id"]))try{let b=d.default.readFileSync(a,"utf-8").trim();if(b)return b}catch{}}catch{}}();if(a)return b=j(a);let c=[f.default.hostname(),f.default.homedir(),f.default.platform(),f.default.arch(),f.default.cpus()[0]?.model??""].join(":");return b=c?j(c):function(){try{let a=d.default.readFileSync(i,"utf-8").trim();if(a)return a}catch{}let a=g.default.randomUUID();try{d.default.mkdirSync(h,{recursive:!0}),d.default.writeFileSync(i,a,"utf-8")}catch{}return a}()}a.s(["getInstanceId",0,k,"hashToId",0,j],69839),a.s(["POSTHOG_API_KEY",0,"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX","POSTHOG_PRODUCT",0,"failproofai-oss"],79779);var l=a.i(12072);async function m(){let a="1"!==process.env.FAILPROOFAI_TELEMETRY_DISABLED;return{enabled:a,distinctId:a?k():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:l.version}}(0,a.i(13095).ensureServerEntryExports)([m]),(0,c.registerServerReference)(m,"00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",null),a.s(["getTelemetryConfig",0,m],36359)},99558,a=>{"use strict";var b=a.i(36359),c=a.i(37936),d=a.i(15501);async function e(){let a=(0,d.readDashboardCache)();return a?{status:"cached",cachedAt:a.cachedAt,params:a.params,result:a.result}:{status:"empty"}}(0,a.i(13095).ensureServerEntryExports)([e]),(0,c.registerServerReference)(e,"00eb5b0e533e23f55d05609b84025ea63386538e11",null),a.s([],62946),a.i(62946),a.s(["00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",()=>b.getTelemetryConfig,"00eb5b0e533e23f55d05609b84025ea63386538e11",0,e],99558)},2726,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__1_g_b3t._.js","server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js"].map(b=>a.l(b))).then(()=>b(74493)))}];
3
+
4
+ //# sourceMappingURL=%5Broot-of-the-server%5D__1hlrq6y._.js.map
@@ -0,0 +1,4 @@
1
+ module.exports=[74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},37936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},12072,(a,b,c)=>{b.exports={name:"failproofai",version:"0.0.11-beta.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",bin:{failproofai:"./dist/cli.mjs"},files:["bin/","src/","scripts/","lib/","pi-extension/",".next/standalone/","dist/","README.md"],engines:{node:">=20.9.0",bun:">=1.3.0"},scripts:{predev:"bun run build:cli && bun link",dev:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/dev.ts --port 8020","build:cli":"bun build --target=node --format=esm --outfile=dist/cli.mjs bin/failproofai.mjs --external posthog-node && node -e \"const fs=require('fs');const c=fs.readFileSync('dist/cli.mjs','utf8');fs.writeFileSync('dist/cli.mjs',c.replace('#!/usr/bin/env bun','#!/usr/bin/env node').replace('// @bun\\n',''))\"",build:"bun build --target=node --format=cjs --outfile=dist/index.js src/index.ts && bun run build:cli && bun --bun next build && node -e \"const {cpSync}=require('fs');cpSync('.next/static','.next/standalone/.next/static',{recursive:true});\" && node scripts/prune-standalone.mjs",prestart:"bun run build:cli && bun link",start:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/start.ts",test:"vitest","test:run":"vitest run",lint:"eslint . --config eslint.config.mjs",postinstall:"node scripts/postinstall.mjs",preuninstall:"node scripts/preuninstall.mjs",prepare:"bun run build","test:e2e":"vitest run --config vitest.config.e2e.mts","test:e2e:watch":"vitest --config vitest.config.e2e.mts",translate:"bun scripts/translate-docs/cli.ts","translate:readme":"bun scripts/translate-docs/cli.ts --readme-only","translate:docs":"bun scripts/translate-docs/cli.ts --docs-only","translate:dry-run":"bun scripts/translate-docs/cli.ts --dry-run","translate:validate":"bun scripts/translate-docs/cli.ts --validate"},keywords:["claude","claude-code","claude-agents-sdk","anthropic","ai-agent","agent-reliability","agent-monitoring","autonomous-agent","failure-prevention","developer-tools","devtools","cli","local-first","hooks","policies"],author:"ExosphereHost Inc. <failproofai@exosphere.host>",license:"SEE LICENSE IN LICENSE",homepage:"https://github.com/FailproofAI/failproofai",repository:{type:"git",url:"https://github.com/FailproofAI/failproofai.git"},bugs:{url:"https://github.com/FailproofAI/failproofai/issues"},publishConfig:{access:"public"},devDependencies:{"@anthropic-ai/sdk":"^0.102.0","@tailwindcss/postcss":"^4.1.18","@tanstack/react-virtual":"^3.13.18","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@testing-library/user-event":"^14.6.1","@types/node":"^25.5.2","@types/react":"^19.2.13","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^6.0.1",clsx:"^2.1.1",eslint:"^10.2.0","eslint-config-next":"^16.2.2",jsdom:"^29.1.1","lucide-react":"^1.0.1",next:"^16.2.2",react:"^19.2.4","react-dom":"^19.2.4","tailwind-merge":"^3.4.0",tailwindcss:"^4.1.18",typescript:"^6.0.2",vitest:"^4.0.18"},dependencies:{html2canvas:"^1.4.1","posthog-node":"^5.28.11"},overrides:{postcss:"8.5.14","eslint-plugin-react-hooks":"7.0.1"}}},13095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},36359,69839,79779,a=>{"use strict";let b;var c=a.i(37936),d=a.i(2157),e=a.i(50227),f=a.i(60526),g=a.i(66680);a.i(74533);let h=e.default.join(f.default.homedir(),".failproofai"),i=e.default.join(h,"instance-id");function j(a){return g.default.createHmac("sha256","failproofai-telemetry-v1").update(a).digest("hex")}function k(){if(b)return b;let a=function(){try{for(let a of(f.default.platform(),["/etc/machine-id","/var/lib/dbus/machine-id"]))try{let b=d.default.readFileSync(a,"utf-8").trim();if(b)return b}catch{}}catch{}}();if(a)return b=j(a);let c=[f.default.hostname(),f.default.homedir(),f.default.platform(),f.default.arch(),f.default.cpus()[0]?.model??""].join(":");return b=c?j(c):function(){try{let a=d.default.readFileSync(i,"utf-8").trim();if(a)return a}catch{}let a=g.default.randomUUID();try{d.default.mkdirSync(h,{recursive:!0}),d.default.writeFileSync(i,a,"utf-8")}catch{}return a}()}a.s(["getInstanceId",0,k,"hashToId",0,j],69839),a.s(["POSTHOG_API_KEY",0,"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX","POSTHOG_PRODUCT",0,"failproofai-oss"],79779);var l=a.i(12072);async function m(){let a="1"!==process.env.FAILPROOFAI_TELEMETRY_DISABLED;return{enabled:a,distinctId:a?k():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:l.version}}(0,a.i(13095).ensureServerEntryExports)([m]),(0,c.registerServerReference)(m,"00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",null),a.s(["getTelemetryConfig",0,m],36359)},37985,a=>{"use strict";var b=a.i(36359);a.s([],80194),a.i(80194),a.s(["00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",()=>b.getTelemetryConfig],37985)},2726,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__1_g_b3t._.js","server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js"].map(b=>a.l(b))).then(()=>b(74493)))}];
3
+
4
+ //# sourceMappingURL=%5Broot-of-the-server%5D__1ihxdo5._.js.map
@@ -0,0 +1,221 @@
1
+ module.exports=[57764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))},92509,(a,b,c)=>{b.exports=a.x("url",()=>require("url"))},11369,a=>{"use strict";var b=a.i(36359),c=a.i(7292),d=a.i(37936),e=a.i(2157),f=a.i(50227),g=a.i(60526),h=a.i(10695);function i(a){let b=(0,g.homedir)(),c=(0,f.resolve)(a);for(;c!==b;){let a=(0,f.resolve)(c,".failproofai");try{if((0,e.statSync)(a).isDirectory())return c}catch{}let b=(0,f.dirname)(c);if(b===c)break;c=b}return(0,f.resolve)(a)}function j(){return(0,f.resolve)((0,g.homedir)(),".failproofai","policies-config.json")}function k(){let a=j();if(!(0,e.existsSync)(a))return{enabledPolicies:[]};try{let b=(0,e.readFileSync)(a,"utf8");return JSON.parse(b)}catch(b){return(0,h.hookLogWarn)(`failed to parse config at ${a}: ${b instanceof Error?b.message:String(b)}`),{enabledPolicies:[]}}}function l(a){let b=j(),c=(0,f.dirname)(b);(0,e.existsSync)(c)||(0,e.mkdirSync)(c,{recursive:!0}),(0,e.writeFileSync)(b,JSON.stringify(a,null,2)+"\n","utf8")}function m(a,b){switch(a){case"user":return(0,f.resolve)((0,g.homedir)(),".failproofai","policies-config.json");case"project":return(0,f.resolve)(i(b??process.cwd()),".failproofai","policies-config.json");case"local":return(0,f.resolve)(i(b??process.cwd()),".failproofai","policies-config.local.json")}}function n(a,b){let c=m(a,b);if(!(0,e.existsSync)(c))return{enabledPolicies:[]};try{let a=(0,e.readFileSync)(c,"utf8");return JSON.parse(a)}catch(a){return(0,h.hookLogWarn)(`failed to parse config at ${c}: ${a instanceof Error?a.message:String(a)}`),{enabledPolicies:[]}}}function o(a,b,c){let d=m(b,c),g=(0,f.dirname)(d);(0,e.existsSync)(g)||(0,e.mkdirSync)(g,{recursive:!0}),(0,e.writeFileSync)(d,JSON.stringify(a,null,2)+"\n","utf8")}var p=a.i(74533);let q=["user","project","local"],r=["claude","codex","copilot","cursor","opencode","pi","gemini"],s=["session_start","pre_tool_use","permission_request","post_tool_use","user_prompt_submit","stop"],t={session_start:"SessionStart",pre_tool_use:"PreToolUse",permission_request:"PermissionRequest",post_tool_use:"PostToolUse",user_prompt_submit:"UserPromptSubmit",stop:"Stop"},u=["SessionStart","SessionEnd","UserPromptSubmit","PreToolUse","PostToolUse","Stop","SubagentStop"],v=["sessionStart","sessionEnd","beforeSubmitPrompt","preToolUse","postToolUse","stop","subagentStop"],w=["SessionStart","SessionEnd","BeforeAgent","AfterAgent","BeforeModel","AfterModel","BeforeToolSelection","BeforeTool","AfterTool","PreCompress","Notification"],x=["SessionStart","SessionEnd","UserPromptSubmit","PreToolUse","PermissionRequest","PermissionDenied","PostToolUse","PostToolUseFailure","Notification","SubagentStart","SubagentStop","TaskCreated","TaskCompleted","Stop","StopFailure","TeammateIdle","InstructionsLoaded","ConfigChange","CwdChanged","FileChanged","WorktreeCreate","WorktreeRemove","PreCompact","PostCompact","Elicitation","ElicitationResult","UserPromptExpansion","PostToolBatch"],y="__failproofai_hook__";var z=a.i(57764);let A={get url(){return`file://${a.P("src/hooks/integrations.ts")}`}};function B(a){return(0,e.existsSync)(a)?JSON.parse((0,e.readFileSync)(a,"utf8")):{}}function C(a,b){(0,e.mkdirSync)((0,f.dirname)(a),{recursive:!0}),(0,e.writeFileSync)(a,JSON.stringify(b,null,2)+"\n","utf8")}function D(a){if(!a||"object"!=typeof a)return!1;if(!0===a[y])return!0;let b="string"==typeof a.command?a.command:"";return b.includes("failproofai")&&b.includes("--hook")}function E(a){try{let b=`which ${a}`;return(0,p.execSync)(b,{encoding:"utf8",stdio:"pipe"}),!0}catch{return!1}}let F={id:"claude",displayName:"Claude Code",scopes:q,eventTypes:x,getSettingsPath(a,b){let c=b?(0,f.resolve)(b):process.cwd();switch(a){case"user":return(0,f.resolve)((0,g.homedir)(),".claude","settings.json");case"project":return(0,f.resolve)(c,".claude","settings.json");case"local":return(0,f.resolve)(c,".claude","settings.local.json")}},readSettings:a=>B(a),writeSettings(a,b){C(a,b)},buildHookEntry:(a,b,c)=>({type:"command",command:"project"===c?`npx -y failproofai --hook ${b}`:`"${a}" --hook ${b}`,timeout:6e4,[y]:!0}),isFailproofaiHook:D,writeHookEntries(a,b,c){for(let d of(a.hooks||(a.hooks={}),x)){let e=this.buildHookEntry(b,d,c);a.hooks[d]||(a.hooks[d]=[]);let f=a.hooks[d],g=!1;for(let a of f){if(!a.hooks)continue;let b=a.hooks.findIndex(a=>D(a));if(b>=0){a.hooks[b]=e,g=!0;break}}g||f.push({hooks:[e]})}},removeHooksFromFile(a){let b=this.readSettings(a);if(!b.hooks)return 0;let c=0;for(let a of Object.keys(b.hooks)){let d=b.hooks[a];if(Array.isArray(d)){for(let a=d.length-1;a>=0;a--){let b=d[a];if(!b.hooks)continue;let e=b.hooks.length;b.hooks=b.hooks.filter(a=>!D(a)),c+=e-b.hooks.length,0===b.hooks.length&&d.splice(a,1)}0===d.length&&delete b.hooks[a]}}return 0===Object.keys(b.hooks).length&&delete b.hooks,this.writeSettings(a,b),c},hooksInstalledInSettings(a,b){let c=this.getSettingsPath(a,b);if(!(0,e.existsSync)(c))return!1;try{let a=this.readSettings(c);if(!a.hooks)return!1;for(let b of Object.values(a.hooks))if(Array.isArray(b)){for(let a of b)if(a.hooks&&a.hooks.some(a=>D(a)))return!0}}catch{}return!1},detectInstalled:()=>E("claude")||E("claude-code")};function G(a){if(!0===a[y])return!0;for(let b of["string"==typeof a.bash?a.bash:"","string"==typeof a.powershell?a.powershell:""])if(b.includes("failproofai")&&b.includes("--hook"))return!0;return!1}let H="./plugins/failproofai.mjs";function I(a){return(0,f.resolve)((0,f.dirname)(a),"plugins","failproofai.mjs")}function J(){let a=process.env.FAILPROOFAI_PACKAGE_ROOT;return a?(0,f.resolve)(a,"pi-extension"):(0,f.resolve)((0,z.fileURLToPath)(A.url),"..","..","..","pi-extension")}function K(a){return"string"==typeof a&&(!!/(?:^|\/)pi-extension\/?$/.test(a)||a.includes("pi-extension")&&a.includes("failproofai"))}let L={claude:F,codex:{id:"codex",displayName:"OpenAI Codex",scopes:["user","project"],eventTypes:s,getSettingsPath(a,b){let c=b?(0,f.resolve)(b):process.cwd();switch(a){case"user":return(0,f.resolve)((0,g.homedir)(),".codex","hooks.json");case"project":case"local":return(0,f.resolve)(c,".codex","hooks.json")}},readSettings(a){let b=B(a);return void 0===b.version&&(b.version=1),b},writeSettings(a,b){C(a,b)},buildHookEntry:(a,b,c)=>({type:"command",command:"project"===c?`npx -y failproofai --hook ${b} --cli codex`:`"${a}" --hook ${b} --cli codex`,timeout:6e4,[y]:!0}),isFailproofaiHook:D,writeHookEntries(a,b,c){for(let d of(void 0===a.version&&(a.version=1),a.hooks||(a.hooks={}),s)){let e=t[d],f=this.buildHookEntry(b,d,c);a.hooks[e]||(a.hooks[e]=[]);let g=a.hooks[e],h=!1;for(let a of g){if(!a.hooks)continue;let b=a.hooks.findIndex(a=>D(a));if(b>=0){a.hooks[b]=f,h=!0;break}}h||g.push({hooks:[f]})}},removeHooksFromFile(a){let b=this.readSettings(a);if(!b.hooks)return 0;let c=0;for(let a of Object.keys(b.hooks)){let d=b.hooks[a];if(Array.isArray(d)){for(let a=d.length-1;a>=0;a--){let b=d[a];if(!b.hooks)continue;let e=b.hooks.length;b.hooks=b.hooks.filter(a=>!D(a)),c+=e-b.hooks.length,0===b.hooks.length&&d.splice(a,1)}0===d.length&&delete b.hooks[a]}}return 0===Object.keys(b.hooks).length&&delete b.hooks,this.writeSettings(a,b),c},hooksInstalledInSettings(a,b){let c=this.getSettingsPath(a,b);if(!(0,e.existsSync)(c))return!1;try{let a=this.readSettings(c);if(!a.hooks)return!1;for(let b of Object.values(a.hooks))if(Array.isArray(b)){for(let a of b)if(a.hooks&&a.hooks.some(a=>D(a)))return!0}}catch{}return!1},detectInstalled:()=>E("codex")},copilot:{id:"copilot",displayName:"GitHub Copilot",scopes:["user","project"],eventTypes:u,getSettingsPath(a,b){let c=b?(0,f.resolve)(b):process.cwd();switch(a){case"user":return(0,f.resolve)((0,g.homedir)(),".copilot","hooks","failproofai.json");case"project":case"local":return(0,f.resolve)(c,".github","hooks","failproofai.json")}},readSettings(a){let b=B(a);return void 0===b.version&&(b.version=1),b},writeSettings(a,b){C(a,b)},buildHookEntry(a,b,c){let d="project"===c?`npx -y failproofai --hook ${b} --cli copilot`:`"${a}" --hook ${b} --cli copilot`;return{type:"command",bash:d,powershell:d,timeoutSec:60,[y]:!0}},isFailproofaiHook:G,writeHookEntries(a,b,c){for(let d of(void 0===a.version&&(a.version=1),a.hooks||(a.hooks={}),u)){let e=this.buildHookEntry(b,d,c);a.hooks[d]||(a.hooks[d]=[]);let f=a.hooks[d],g=!1;for(let a of f){if(!a.hooks)continue;let b=a.hooks.findIndex(a=>G(a));if(b>=0){a.hooks[b]=e,g=!0;break}}g||f.push({hooks:[e]})}},removeHooksFromFile(a){let b=this.readSettings(a);if(!b.hooks)return 0;let c=0;for(let a of Object.keys(b.hooks)){let d=b.hooks[a];if(Array.isArray(d)){for(let a=d.length-1;a>=0;a--){let b=d[a];if(!b.hooks)continue;let e=b.hooks.length;b.hooks=b.hooks.filter(a=>!G(a)),c+=e-b.hooks.length,0===b.hooks.length&&d.splice(a,1)}0===d.length&&delete b.hooks[a]}}return 0===Object.keys(b.hooks).length&&delete b.hooks,this.writeSettings(a,b),c},hooksInstalledInSettings(a,b){let c=this.getSettingsPath(a,b);if(!(0,e.existsSync)(c))return!1;try{let a=this.readSettings(c);if(!a.hooks)return!1;for(let b of Object.values(a.hooks))if(Array.isArray(b)){for(let a of b)if(a.hooks&&a.hooks.some(a=>G(a)))return!0}}catch{}return!1},detectInstalled:()=>E("copilot")},cursor:{id:"cursor",displayName:"Cursor Agent",scopes:["user","project"],eventTypes:v,getSettingsPath(a,b){let c=b?(0,f.resolve)(b):process.cwd();switch(a){case"user":return(0,f.resolve)((0,g.homedir)(),".cursor","hooks.json");case"project":case"local":return(0,f.resolve)(c,".cursor","hooks.json")}},readSettings(a){let b=B(a);return void 0===b.version&&(b.version=1),b},writeSettings(a,b){C(a,b)},buildHookEntry:(a,b,c)=>({type:"command",command:"project"===c?`npx -y failproofai --hook ${b} --cli cursor`:`"${a}" --hook ${b} --cli cursor`,timeout:6e4,[y]:!0}),isFailproofaiHook:D,writeHookEntries(a,b,c){for(let d of(void 0===a.version&&(a.version=1),a.hooks||(a.hooks={}),v)){let e=this.buildHookEntry(b,d,c),f=a.hooks[d],g=f??[];f||(a.hooks[d]=g);let h=g.findIndex(a=>D(a));h>=0?g[h]=e:g.push(e)}},removeHooksFromFile(a){let b=this.readSettings(a);if(!b.hooks)return 0;let c=0;for(let a of Object.keys(b.hooks)){let d=b.hooks[a];if(!Array.isArray(d))continue;let e=d.length,f=d.filter(a=>!D(a));c+=e-f.length,0===f.length?delete b.hooks[a]:b.hooks[a]=f}return 0===Object.keys(b.hooks).length&&delete b.hooks,this.writeSettings(a,b),c},hooksInstalledInSettings(a,b){let c=this.getSettingsPath(a,b);if(!(0,e.existsSync)(c))return!1;try{let a=this.readSettings(c);if(!a.hooks)return!1;for(let b of Object.values(a.hooks))if(Array.isArray(b)&&b.some(a=>D(a)))return!0}catch{}return!1},detectInstalled:()=>E("cursor-agent")||E("agent")},opencode:{id:"opencode",displayName:"OpenCode",scopes:["user","project"],eventTypes:["tool.execute.before","tool.execute.after","session.created","session.deleted","session.idle","message.updated","permission.ask"],getSettingsPath(a,b){let c=b?(0,f.resolve)(b):process.cwd();switch(a){case"user":return(0,f.resolve)((0,g.homedir)(),".config","opencode","opencode.json");case"project":case"local":return(0,f.resolve)(c,".opencode","opencode.json")}},readSettings:a=>B(a),writeSettings(a,b){C(a,b)},buildHookEntry(a,b,c){if("user"===c){let a=(0,f.resolve)((0,g.homedir)(),".config","opencode","plugins","failproofai.mjs");return{spec:`file://${a}`,[y]:!0}}return{spec:H,[y]:!0}},isFailproofaiHook:a=>"string"==typeof a?a.includes("failproofai.mjs"):!!Array.isArray(a)&&"string"==typeof a[0]&&a[0].includes("failproofai.mjs"),writeHookEntries(a,b,c){let d,h,i=c??"project",j=I("user"===i?(0,f.resolve)((0,g.homedir)(),".config","opencode","opencode.json"):(0,f.resolve)(process.cwd(),".opencode","opencode.json"));(0,e.mkdirSync)((0,f.dirname)(j),{recursive:!0}),(0,e.writeFileSync)(j,(h=(d="project"===i)?'""':JSON.stringify(b),`// AUTO-GENERATED by failproofai. ${y}
2
+ // Re-generate via: failproofai policies --install --cli opencode
3
+ // Plugin shim that bridges OpenCode's plugin API to the failproofai binary.
4
+ // See: https://opencode.ai/docs/plugins/
5
+ import { spawnSync } from "node:child_process";
6
+
7
+ // Map opencode bus-event types → canonical failproofai event names.
8
+ // (The binary sees PascalCase — the binary's --cli=opencode flag is for
9
+ // telemetry / activity tagging only; no opencode branch in handler.ts.)
10
+ const BUS_EVENT_MAP = {
11
+ "session.created": "SessionStart",
12
+ "session.deleted": "SessionEnd",
13
+ "session.idle": "Stop",
14
+ // message.updated is handled separately (filter to role:user); see below.
15
+ };
16
+
17
+ // Map opencode lowercase tool IDs (\`input.tool\`) → Claude PascalCase canonical
18
+ // names. Builtin failproofai policies match on PascalCase via case-sensitive
19
+ // \`Array.includes\`, so without this every Bash/Read/Write/Edit builtin
20
+ // silently no-ops under opencode. Keep in sync with OPENCODE_TOOL_MAP in
21
+ // failproofai/src/hooks/types.ts (this shim is loaded in-process by opencode
22
+ // and must be self-contained — no imports from the failproofai package).
23
+ // Unknown tools pass through unchanged via \`?? raw\`.
24
+ const TOOL_NAME_MAP = {
25
+ bash: "Bash",
26
+ read: "Read",
27
+ write: "Write",
28
+ edit: "Edit",
29
+ apply_patch: "Edit",
30
+ glob: "Glob",
31
+ grep: "Grep",
32
+ list: "LS",
33
+ webfetch: "WebFetch",
34
+ websearch: "WebSearch",
35
+ todowrite: "TodoWrite",
36
+ todoread: "TodoRead",
37
+ };
38
+ function canonicalizeTool(raw) {
39
+ if (!raw) return raw;
40
+ return TOOL_NAME_MAP[raw] != null ? TOOL_NAME_MAP[raw] : raw;
41
+ }
42
+
43
+ // Per-tool input-key translation: opencode native tools deliver args as
44
+ // camelCase (\`filePath\`, \`oldString\`, …) but failproofai builtin policies
45
+ // (\`block-read-outside-cwd\`, \`block-env-files\`, \`block-secrets-write\`)
46
+ // read \`ctx.toolInput.file_path\` etc. Without this map every Read/Write/Edit
47
+ // path-check silently no-ops on opencode. Keys are PascalCase canonical tool
48
+ // names so the lookup pairs with canonicalizeTool's output. Tools outside the
49
+ // map (MCP \`mcp_*\`, plugins) pass through unchanged. Keep in sync with
50
+ // OPENCODE_TOOL_INPUT_MAP in failproofai/src/hooks/types.ts.
51
+ const TOOL_INPUT_MAP = {
52
+ Read: { filePath: "file_path" },
53
+ Write: { filePath: "file_path" },
54
+ Edit: { filePath: "file_path", oldString: "old_string", newString: "new_string", replaceAll: "replace_all" },
55
+ };
56
+ function canonicalizeToolInput(canonicalToolName, args) {
57
+ if (!args || typeof args !== "object") return args;
58
+ const map = TOOL_INPUT_MAP[canonicalToolName];
59
+ if (!map) return args;
60
+ const out = {};
61
+ for (const k of Object.keys(args)) out[map[k] != null ? map[k] : k] = args[k];
62
+ return out;
63
+ }
64
+
65
+ const FAILPROOFAI_BIN = ${h};
66
+ const USE_NPX = ${d};
67
+
68
+ function runFailproofai(eventName, payload, directory) {
69
+ const cmd = USE_NPX ? "npx" : FAILPROOFAI_BIN;
70
+ const args = USE_NPX
71
+ ? ["-y", "failproofai", "--hook", eventName, "--cli", "opencode"]
72
+ : ["--hook", eventName, "--cli", "opencode"];
73
+ const r = spawnSync(cmd, args, {
74
+ input: JSON.stringify(payload),
75
+ encoding: "utf8",
76
+ timeout: 60_000,
77
+ cwd: directory,
78
+ });
79
+ return { exitCode: r.status ?? 0, stdout: r.stdout ?? "", stderr: r.stderr ?? "" };
80
+ }
81
+
82
+ async function applyDecision(result, ctx, eventName) {
83
+ // Deny path 1: exit 2 (Claude Stop-style or any non-Pre/Post deny).
84
+ if (result.exitCode === 2) {
85
+ throw new Error((result.stderr || "").trim() || "Blocked by failproofai");
86
+ }
87
+ // Deny path 2: stdout JSON with hookSpecificOutput.permissionDecision === "deny".
88
+ let parsed = null;
89
+ try { parsed = JSON.parse(result.stdout); } catch { /* fail-open allow */ }
90
+ if (!parsed) return;
91
+ const out = parsed.hookSpecificOutput;
92
+ if (out && out.permissionDecision === "deny") {
93
+ throw new Error(out.permissionDecisionReason || "Blocked by failproofai");
94
+ }
95
+ // Codex-shape PermissionRequest deny: hookSpecificOutput.decision.behavior.
96
+ if (out && out.decision && out.decision.behavior === "deny") {
97
+ throw new Error((out.decision.message) || "Blocked by failproofai");
98
+ }
99
+ // Forward additional context as a prompt to the session. For Stop /
100
+ // SubagentStop the prompt is the only force-retry channel (session.idle
101
+ // already fired), so AWAIT to ensure the SDK round-trip completes before
102
+ // the plugin handler returns. For tool events keep fire-and-forget so we
103
+ // don't add latency to every tool call.
104
+ const ctxText = out && out.additionalContext;
105
+ if (ctxText && ctx && ctx.client && ctx.sessionID) {
106
+ const prompt = ctx.client.session.prompt({
107
+ path: { id: ctx.sessionID },
108
+ body: { parts: [{ type: "text", text: ctxText }] },
109
+ });
110
+ if (eventName === "Stop" || eventName === "SubagentStop") {
111
+ try { await prompt; } catch { /* swallow — agent is exiting anyway */ }
112
+ } else {
113
+ Promise.resolve(prompt).catch(() => {});
114
+ }
115
+ }
116
+ }
117
+
118
+ export default async function failproofaiPlugin({ client, directory }) {
119
+ return {
120
+ // Generic bus events: session lifecycle + user-prompt detection.
121
+ event: async ({ event }) => {
122
+ if (!event || !event.type) return;
123
+
124
+ // UserPromptSubmit — filter message.updated to user role only so we
125
+ // don't fire on every assistant token. Forward the prompt text so
126
+ // prompt-based policies (sanitize-* on input, content checks) see it.
127
+ if (event.type === "message.updated") {
128
+ const props = event.properties || {};
129
+ const info = props.info || props.message || {};
130
+ const role = info.role || props.role;
131
+ if (role !== "user") return;
132
+ const sessionID = info.sessionID || info.sessionId || info.session_id || props.sessionID;
133
+ // OpenCode's message shape: parts is an array of {type, text, ...}.
134
+ // Concatenate text parts to reconstruct the user-facing prompt.
135
+ // Fall back to direct text/content fields if a future shape differs.
136
+ let prompt = "";
137
+ const parts = info.parts || props.parts || [];
138
+ if (Array.isArray(parts)) {
139
+ for (const p of parts) {
140
+ if (p && typeof p === "object" && typeof p.text === "string") prompt += p.text;
141
+ }
142
+ }
143
+ if (!prompt) prompt = (info.text || info.content || props.text || "").toString();
144
+ const r = runFailproofai("UserPromptSubmit", {
145
+ session_id: sessionID, cwd: directory, hook_event_name: "UserPromptSubmit", prompt,
146
+ }, directory);
147
+ await applyDecision(r, { client, sessionID }, "UserPromptSubmit");
148
+ return;
149
+ }
150
+
151
+ const claudeEvent = BUS_EVENT_MAP[event.type];
152
+ if (!claudeEvent) return;
153
+ const props = event.properties || {};
154
+ const sessionID = props.sessionID || (props.session && props.session.id) || props.id;
155
+ const r = runFailproofai(claudeEvent, {
156
+ session_id: sessionID, cwd: directory, hook_event_name: claudeEvent,
157
+ }, directory);
158
+ await applyDecision(r, { client, sessionID }, claudeEvent);
159
+ },
160
+
161
+ // First-class PreToolUse hook. Note: tool args live on output.args (mutable).
162
+ "tool.execute.before": async (input, output) => {
163
+ const canonicalTool = canonicalizeTool(input.tool);
164
+ const r = runFailproofai("PreToolUse", {
165
+ session_id: input.sessionID,
166
+ cwd: directory,
167
+ tool_name: canonicalTool,
168
+ tool_input: canonicalizeToolInput(canonicalTool, output.args),
169
+ hook_event_name: "PreToolUse",
170
+ }, directory);
171
+ await applyDecision(r, { client, sessionID: input.sessionID }, "PreToolUse");
172
+ },
173
+
174
+ // First-class PostToolUse hook. Note: tool args live on input.args here.
175
+ "tool.execute.after": async (input, output) => {
176
+ const canonicalTool = canonicalizeTool(input.tool);
177
+ const r = runFailproofai("PostToolUse", {
178
+ session_id: input.sessionID,
179
+ cwd: directory,
180
+ tool_name: canonicalTool,
181
+ tool_input: canonicalizeToolInput(canonicalTool, input.args),
182
+ tool_response: { title: output.title, output: output.output, metadata: output.metadata },
183
+ hook_event_name: "PostToolUse",
184
+ }, directory);
185
+ await applyDecision(r, { client, sessionID: input.sessionID }, "PostToolUse");
186
+ },
187
+
188
+ // Cleaner deny UX for prompted tools — mutate output.status instead of throwing.
189
+ "permission.ask": async (input, output) => {
190
+ const canonicalTool = canonicalizeTool(input.tool);
191
+ const r = runFailproofai("PermissionRequest", {
192
+ session_id: input.sessionID,
193
+ cwd: directory,
194
+ tool_name: canonicalTool || input.command || "permission",
195
+ tool_input: canonicalizeToolInput(canonicalTool, input),
196
+ hook_event_name: "PermissionRequest",
197
+ }, directory);
198
+ try {
199
+ await applyDecision(r, { client, sessionID: input.sessionID }, "PermissionRequest");
200
+ } catch {
201
+ output.status = "deny";
202
+ }
203
+ },
204
+ };
205
+ }
206
+ `),"utf8"),Array.isArray(a.plugin)||(a.plugin=[]);let k="user"===i?`file://${j}`:H,l=a.plugin.findIndex(a=>this.isFailproofaiHook(a));l>=0?a.plugin[l]=k:a.plugin.push(k)},removeHooksFromFile(a){let b=0,c=this.readSettings(a);if(Array.isArray(c.plugin)){let a=c.plugin.length;c.plugin=c.plugin.filter(a=>!this.isFailproofaiHook(a)),b+=a-c.plugin.length,0===c.plugin.length&&delete c.plugin}this.writeSettings(a,c);let d=I(a);if((0,e.existsSync)(d))try{(0,e.readFileSync)(d,"utf8").includes(y)&&((0,e.unlinkSync)(d),0===b&&(b=1))}catch{}return b},hooksInstalledInSettings(a,b){let c=this.getSettingsPath(a,b);if(!(0,e.existsSync)(c))return!1;try{let a=this.readSettings(c);if(!Array.isArray(a.plugin)||!a.plugin.some(a=>this.isFailproofaiHook(a)))return!1;let b=I(c);if(!(0,e.existsSync)(b))return!1;return(0,e.readFileSync)(b,"utf8").includes(y)}catch{return!1}},detectInstalled:()=>E("opencode")},pi:{id:"pi",displayName:"Pi",scopes:["user","project"],eventTypes:["session_start","session_shutdown","input","tool_call","user_bash","tool_result","agent_end"],getSettingsPath(a,b){let c=b?(0,f.resolve)(b):process.cwd();switch(a){case"user":return(0,f.resolve)((0,g.homedir)(),".pi","agent","settings.json");case"project":case"local":return(0,f.resolve)(c,".pi","settings.json")}},readSettings:a=>B(a),writeSettings(a,b){C(a,b)},buildHookEntry:(a,b,c)=>({[y]:!0,_piPackagePath:J(),_piScope:c}),isFailproofaiHook:a=>"string"==typeof a?K(a):!!a&&"object"==typeof a&&(!0===a[y]||"string"==typeof a.source&&K(a.source)),writeHookEntries(a,b,c){var d;let e,g,h;Array.isArray(a.packages)||(a.packages=[]);let i=J(),j="project"===c?(d=i,e=process.cwd(),g=(0,f.resolve)(e),(h=(0,f.resolve)(d)).startsWith(g+"/")||h===g?"../"+h.slice(g.length+1):h):i,k=a.packages.findIndex(a=>K(a));k>=0?a.packages[k]=j:a.packages.push(j)},removeHooksFromFile(a){if(!(0,e.existsSync)(a))return 0;let b=this.readSettings(a);if(!Array.isArray(b.packages))return 0;let c=b.packages.length;b.packages=b.packages.filter(a=>!K(a));let d=c-b.packages.length;return 0===b.packages.length&&delete b.packages,this.writeSettings(a,b),d},hooksInstalledInSettings(a,b){let c=this.getSettingsPath(a,b);if(!(0,e.existsSync)(c))return!1;try{let a=this.readSettings(c);if(!Array.isArray(a.packages))return!1;return a.packages.some(a=>K(a))}catch{return!1}},detectInstalled:()=>E("pi")},gemini:{id:"gemini",displayName:"Gemini CLI",scopes:["user","project"],eventTypes:w,getSettingsPath(a,b){let c=b?(0,f.resolve)(b):process.cwd();switch(a){case"user":return(0,f.resolve)((0,g.homedir)(),".gemini","settings.json");case"project":case"local":return(0,f.resolve)(c,".gemini","settings.json")}},readSettings:a=>B(a),writeSettings(a,b){C(a,b)},buildHookEntry:(a,b,c)=>({type:"command",command:"project"===c?`npx -y failproofai --hook ${b} --cli gemini`:`"${a}" --hook ${b} --cli gemini`,timeout:6e4,[y]:!0}),isFailproofaiHook:D,writeHookEntries(a,b,c){for(let d of(a.hooks||(a.hooks={}),w)){let e=this.buildHookEntry(b,d,c);a.hooks[d]||(a.hooks[d]=[]);let f=a.hooks[d],g=!1;for(let a of f){if(!a.hooks)continue;let b=a.hooks.findIndex(a=>D(a));if(b>=0){a.hooks[b]=e,g=!0;break}}g||f.push({matcher:"*",hooks:[e]})}},removeHooksFromFile(a){let b=this.readSettings(a);if(!b.hooks)return 0;let c=0;for(let a of Object.keys(b.hooks)){let d=b.hooks[a];if(Array.isArray(d)){for(let a=d.length-1;a>=0;a--){let b=d[a];if(!b.hooks)continue;let e=b.hooks.length;b.hooks=b.hooks.filter(a=>!D(a)),c+=e-b.hooks.length,0===b.hooks.length&&d.splice(a,1)}0===d.length&&delete b.hooks[a]}}return 0===Object.keys(b.hooks).length&&delete b.hooks,this.writeSettings(a,b),c},hooksInstalledInSettings(a,b){let c=this.getSettingsPath(a,b);if(!(0,e.existsSync)(c))return!1;try{let a=this.readSettings(c);if(!a.hooks)return!1;for(let b of Object.values(a.hooks))if(Array.isArray(b)){for(let a of b)if(a.hooks&&a.hooks.some(a=>D(a)))return!0}}catch{}return!1},detectInstalled:()=>E("gemini")}};function M(a){let b=L[a];if(!b)throw Error(`Unknown integration: ${a}. Valid: ${r.join(", ")}`);return b}function N(){return r.filter(a=>L[a].detectInstalled())}var O=a.i(1457),P=a.i(92956),Q=a.i(69839);async function R(a,b={}){let{includeBeta:c=!1}=b;if(!process.stdin.isTTY){let b=P.BUILTIN_POLICIES.filter(a=>c||!a.beta);return a?a.filter(a=>b.some(b=>b.name===a)):b.filter(a=>a.defaultEnabled).map(a=>a.name)}let d=a?new Set(a):null,e=P.BUILTIN_POLICIES.filter(a=>c||!a.beta).map(a=>({name:a.name,description:a.description,category:a.category,selected:d?d.has(a.name):a.defaultEnabled,beta:!!a.beta})),f=e.length,g=0,h="",i=0,j=!1;function k(){if(!h)return e;let a=h.toLowerCase();return e.filter(b=>b.name.toLowerCase().includes(a)||b.description.toLowerCase().includes(a))}function l(){let a=process.stdout.columns||120;j||(process.stdout.write("\x1b[?25l"),j=!0);let b=k(),d=b.length;d>0&&g>=d&&(g=d-1);let l=[];l.push(" Failproof AI — Policy Manager"),l.push("");let m=Math.max(20,a-6),n=" ┌"+"─".repeat(m+2)+"┐",o=" └"+"─".repeat(m+2)+"┘",p=h?` \x1b[2m(${d}/${f})\x1b[0m`:` \x1b[2m(${f} policies)\x1b[0m`,q=`\x1b[1mSearch:\x1b[0m ${h}\x1b[7m \x1b[0m${p}`;if(l.push(n),l.push(` \u2502 ${q}`),l.push(o),l.push(""),0===d){l.push(" \x1b[2mNo policies match “"+h+"”\x1b[0m");for(let a=0;a<9;a++)l.push("")}else{let c=function(a){let b=[],c=new Map,d=new Map;for(let a of e)c.has(a.category)||(b.push(a.category),c.set(a.category,0),d.set(a.category,0)),d.set(a.category,d.get(a.category)+1),a.selected&&c.set(a.category,c.get(a.category)+1);let f=new Map;for(let b of a){let a=f.get(b.category)??[];a.push(b),f.set(b.category,a)}let g=[],h=0;for(let a of b){let b=f.get(a);if(b&&0!==b.length)for(let e of(g.push({kind:"header",category:a,enabledCount:c.get(a),totalCount:d.get(a)}),b))g.push({kind:"item",item:e,filteredIndex:h++})}return g}(b),d=0;for(let a=0;a<c.length;a++){let b=c[a];if("item"===b.kind&&b.filteredIndex===g){d=a;break}}let f=d-Math.floor(4);f=Math.min(f=Math.max(0,f),Math.max(0,c.length-8));let h=Math.min(c.length,f+8),i=c.slice(0,f).filter(a=>"item"===a.kind).length;i>0?l.push(` \x1b[2m \u2191 ${i} more above\x1b[0m`):l.push("");for(let b=f;b<h;b++){let d=c[b];if("header"===d.kind){let b=` ${d.category.toUpperCase()} (${d.enabledCount}/${d.totalCount}) `,c=Math.max(2,a-2-(3+b.length));l.push(` \x1b[2m\u2500\u2500 ${b}${"─".repeat(c)}\x1b[0m`)}else{let a=d.item,b=d.filteredIndex===g,c=b?"\x1b[36m❯\x1b[0m":" ",e=a.selected?"\x1b[32m[✓]\x1b[0m":"[ ]",f=b?`\x1b[1;36m${a.name}\x1b[0m`:a.name,h=a.beta?" \x1b[35m[beta]\x1b[0m":"",i=" ".repeat(Math.max(1,28-a.name.length)),j=`\x1b[2m${a.description}\x1b[0m`;l.push(` ${c} ${e} ${f}${h}${i}${j}`)}}for(let a=h-f;a<8;a++)l.push("");let j=c.slice(h).filter(a=>"item"===a.kind).length;j>0?l.push(` \x1b[2m \u2193 ${j} more below\x1b[0m`):l.push("")}l.push(""),l.push(" \x1b[2m"+"─".repeat(a-2)+"\x1b[0m"),l.push(" [↑↓] Move [Space] Toggle [Ctrl+A] All [Ctrl+S] Save [Esc] Clear [^C] Quit"),l.push(""),l.push(" \x1b[2mTip: `policies` for a flat list · `policies --install <name…>` to skip prompt\x1b[0m"),c||l.push(" \x1b[2mTip: `policies --install --beta` to include beta policies\x1b[0m"),i>0&&process.stdout.write(`\x1b[${i}A\x1b[J`);let r=l.map(b=>""===b?b:function(a,b){let c=0,d="",e=0;for(;e<a.length;)if("\x1b"===a[e]&&"["===a[e+1]){let b=e+2;for(;b<a.length&&!/[A-Za-z]/.test(a[b]);)b++;b++,d+=a.slice(e,b),e=b}else{if(c>=b)break;d+=a[e],c++,e++}return d}(b,a)).join("\n")+"\n";process.stdout.write(r),i=l.length}return new Promise(a=>{function b(b,d){if(!d)return;d.ctrl&&"c"===d.name&&(c(),process.exit(0));let f=k();if("up"===d.name)f.length>0&&(g=g>0?g-1:f.length-1),l();else if("down"===d.name)f.length>0&&(g=g<f.length-1?g+1:0),l();else if("return"===d.name||"space"===d.name){let a=f[g];a&&(a.selected=!a.selected),l()}else if("escape"===d.name)h="",g=0,l();else if(d.ctrl&&"a"===d.name){let a=f.length>0&&f.every(a=>a.selected);for(let b of f)b.selected=!a;l()}else if(d.ctrl&&"s"===d.name){c();let b=e.filter(a=>a.selected).map(a=>a.name);process.stdout.write("\n"),a(b)}else"backspace"===d.name||"delete"===d.name?h.length>0&&(h=h.slice(0,-1),g=0,l()):!b||1!==b.length||d.ctrl||d.meta||(h+=b,g=0,l())}function c(){j&&(process.stdout.write("\x1b[?25h"),j=!1),process.stdin.removeListener("keypress",b),process.stdin.setRawMode(!1),process.stdin.pause()}l(),process.stdin.setRawMode(!0),process.stdin.resume(),O.emitKeypressEvents(process.stdin),process.stdin.on("keypress",b)})}let S="__failproofai_custom_hooks__";var T=a.i(24868),U=a.i(14747),V=a.i(92509);let W=".__failproofai_tmp__.mjs",X=/(?:import\s+(?:[\s\S]*?\s+from\s+)?|export\s+(?:[\s\S]*?\s+from\s+))(['"])(\.\.?\/[^'"]+)\1/g,Y=/require\s*\(\s*(['"])(\.\.?\/[^'"]+)\1\s*\)/g;async function Z(a){try{return await (0,T.access)(a),!0}catch{return!1}}async function $(){let a=process.env.FAILPROOFAI_DIST_PATH;if(a){let b=(0,U.resolve)(a,"index.js");if(await Z(b))return b}for(let a of[(0,U.resolve)((0,U.dirname)(process.execPath),"..","assets","dist","index.js"),(0,U.resolve)(process.cwd(),"dist","index.js"),(0,U.resolve)(process.cwd(),"node_modules","failproofai","dist","index.js")])if(await Z(a))return a;return null}async function _(a,b){let c=(0,U.resolve)(a,b);for(let a of[c,`${c}.js`,`${c}.mjs`,`${c}.ts`,(0,U.resolve)(c,"index.js")])if(await Z(a))return a;return null}async function aa(a,b){let c=a+".__failproofai_esm_shim__.mjs",d=`import _cjs from '${b}';
207
+ export const customPolicies = _cjs.customPolicies;
208
+ export const getCustomHooks = _cjs.getCustomHooks;
209
+ export const clearCustomHooks = _cjs.clearCustomHooks;
210
+ export const allow = _cjs.allow;
211
+ export const deny = _cjs.deny;
212
+ export const instruct = _cjs.instruct;
213
+ export default _cjs;`;return await (0,T.writeFile)(c,d,"utf-8"),{shimPath:c,shimUrl:(0,V.pathToFileURL)(c).href}}async function ab(a,b,c){let d=[a],e=new Set,f=[],g=null;if(c&&b){let a=await aa(c,b);f.push(a.shimPath),g=a.shimUrl}for(;d.length>0;){let a=d.shift();if(e.has(a))continue;e.add(a);let b=await (0,T.readFile)(a,"utf-8");g&&(b=b.replace(/from\s+(['"])(?:claudeye|failproofai)\1/g,`from '${g}'`)),c&&(b=b.replace(/require\s*\(\s*(['"])(?:claudeye|failproofai)\1\s*\)/g,`require('${c.replace(/\\/g,"\\\\")}')`));let h=(0,U.dirname)(a),i=new Map;for(let a of[X,Y]){let c,f=new RegExp(a.source,a.flags);for(;null!==(c=f.exec(b));){let a=c[2];if(i.has(a))continue;let b=await _(h,a);if(!b)continue;e.has(b)||d.includes(b)||d.push(b);let f=(0,U.relative)(h,b+W).split("\\").join("/");f.startsWith(".")||(f="./"+f),i.set(a,f)}}for(let a of[...i.keys()].sort((a,b)=>b.length-a.length)){let c=i.get(a),d=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");b=(b=b.replace(RegExp(`'${d}'`,"g"),`'${c}'`)).replace(RegExp(`"${d}"`,"g"),`"${c}"`)}let j=a+W;await (0,T.writeFile)(j,b,"utf-8"),f.push(j)}return f}async function ac(a){for(let b of a)try{await (0,T.unlink)(b)}catch{}}var ad=a.i(12072),ae=a.i(79779);let af=ae.POSTHOG_API_KEY;async function ag(a,b,c){if("1"===process.env.FAILPROOFAI_TELEMETRY_DISABLED)return;let d=JSON.stringify({api_key:process.env.FAILPROOFAI_POSTHOG_KEY??af,event:b,distinct_id:a,properties:{...c,$lib:"failproofai-hooks",failproofai_version:ad.version,product:ae.POSTHOG_PRODUCT}});try{await fetch(process.env.FAILPROOFAI_POSTHOG_HOST?`${process.env.FAILPROOFAI_POSTHOG_HOST}/capture/`:"https://us.i.posthog.com/capture/",{method:"POST",headers:{"Content-Type":"application/json"},body:d,signal:AbortSignal.timeout(5e3)})}catch{}}let ah="__FAILPROOFAI_LOADING_HOOKS__";async function ai(a,b){let c=globalThis;c[ah]=!0;let d=[];try{let b=await $(),c=b?(0,z.pathToFileURL)(b).href:null;d=await ab(a,c,b);let e=(0,z.pathToFileURL)(a+W).href;await import(e)}catch(e){let c=e instanceof Error?e.message:String(e),d=/Cannot find module|MODULE_NOT_FOUND|ENOENT/i.test(c)?"module_not_found":/SyntaxError|Unexpected token/i.test(c)?"syntax_error":"runtime_error";if(ag((0,Q.getInstanceId)(),"custom_hooks_load_error",{error_type:d,is_convention:!!b?.conventionScope,convention_scope:b?.conventionScope??null,file_basename:(0,f.basename)(a)}),b?.strict)throw Error(`Failed to load custom hooks from ${a}: ${c}`);(0,h.hookLogError)(`failed to load custom hooks from ${a}: ${c}`)}finally{c[ah]=!1,await ac(d)}}async function aj(a,b){let c;if(!a)return[];let d=(0,f.isAbsolute)(a)?a:(0,f.resolve)(b?.sessionCwd??process.cwd(),a);if(!(0,e.existsSync)(d)){if(b?.strict)throw Error(`Custom hooks file not found: ${d}`);return(0,h.hookLogWarn)(`customPoliciesPath not found: ${d}`),[]}return globalThis[S]=[],await ai(d,b),Array.isArray((c=globalThis)[S])||(c[S]=[]),c[S]}class ak extends Error{exitCode;constructor(a,b=1){super(a),this.name="CliError",this.exitCode=b}}let al=new Set(P.BUILTIN_POLICIES.map(a=>a.name));function am(a,b){return F.getSettingsPath(a,b)}function an(a){let b=a.filter(a=>!al.has(a));if(b.length>0){let a=[...al].join(", ");throw new ak(`Unknown policy name(s): ${b.join(", ")}
214
+ Valid policies: ${a}`)}}function ao(a,b){return F.hooksInstalledInSettings(a,b)}async function ap(a,b="user",c,d=!1,e,h,i=!1,j){let k,l;if(void 0!==a&&a.length>0){let b=a.filter(a=>"all"!==a);if(b.length>0&&an(b),a.includes("all")&&b.length>0)throw new ak(`"all" cannot be combined with specific policy names.
215
+ Use either: --install all or --install block-sudo sanitize-jwt ...`)}let m=j&&j.length>0?[...new Set(j)]:["claude"];for(let a of m){let c=M(a);if(!c.scopes.includes(b)){try{await ag((0,Q.getInstanceId)(),"scope_validation_failed",{cli:a,scope:b,supported_scopes:c.scopes})}catch{}throw new ak(`Scope "${b}" is not supported by ${c.displayName}. Valid scopes: ${c.scopes.join(", ")}`)}}let r=function(){let a=process.env.FAILPROOFAI_BINARY_OVERRIDE;if(a&&a.trim())return a.trim();try{return(0,p.execSync)("which failproofai",{encoding:"utf8"}).trim().split("\n")[0].trim()}catch{throw new ak("failproofai binary not found in PATH.\nInstall it globally first: npm install -g failproofai")}}(),s=n(b,c),t=new Set(s.enabledPolicies);if(void 0!==a){let b;b=1===a.length&&"all"===a[0]?P.BUILTIN_POLICIES.filter(a=>d||!a.beta).map(a=>a.name):a,k=[...new Set([...s.enabledPolicies,...b])]}else{let a=s.enabledPolicies.length>0?s.enabledPolicies:void 0;k=await R(a,{includeBeta:d})}let u={...s,enabledPolicies:k};if(i)delete u.customPoliciesPath;else if(h){u.customPoliciesPath=(0,f.resolve)(h);let a=[];try{a=await aj(u.customPoliciesPath,{strict:!0})}catch(c){let a=c instanceof Error?c.message:String(c);try{await ag((0,Q.getInstanceId)(),"custom_policy_validation_failed",{scope:b,error_type:/not found/i.test(a)?"file_not_found":"load_error"})}catch{}console.error(`Error: ${a}`),process.exit(1)}if(0===a.length){try{await ag((0,Q.getInstanceId)(),"custom_policy_validation_failed",{scope:b,error_type:"no_hooks_registered"})}catch{}console.error(`Error: no hooks registered in ${h}. Make sure your file calls customPolicies.add(...) at least once.`),process.exit(1)}console.log(`
216
+ Validated ${a.length} custom hook(s): ${a.map(a=>a.name).join(", ")}`)}o(u,b,c),console.log(`
217
+ Enabled ${k.length} policy(ies): ${k.join(", ")}
218
+ `),i?console.log("Custom hooks path cleared."):u.customPoliciesPath&&console.log(`Custom hooks path: ${u.customPoliciesPath}`);let v=[];for(let a of m){let d=M(a),e=d.getSettingsPath(b,c);try{let c=d.readSettings(e);d.writeHookEntries(c,r,b),d.writeSettings(e,c),v.push({cli:a,path:e})}catch(d){let c=d instanceof Error&&/EACCES|EPERM/.test(d.message)?"permission_denied":d instanceof Error&&/ENOENT|ENOTDIR/.test(d.message)?"path_not_found":"write_error";try{await ag((0,Q.getInstanceId)(),"hook_write_failed",{cli:a,scope:b,error_type:c})}catch{}throw d}}try{let a=new Set(k),c=k.filter(a=>!t.has(a)),f=[...t].filter(b=>!a.has(b)),h=(0,Q.getInstanceId)();if(await ag(h,"hooks_installed",{scope:b,cli:m,cli_count:m.length,policies:k,policy_count:k.length,policies_added:c,policies_removed:f,...e?{source:e}:{},platform:(0,g.platform)(),arch:(0,g.arch)(),os_release:(0,g.release)(),hostname_hash:(0,Q.hashToId)((0,g.hostname)()),has_custom_hooks_path:!!u.customPoliciesPath,has_policy_params:!!(u.policyParams&&Object.keys(u.policyParams).length>0),param_policy_names:u.policyParams?Object.keys(u.policyParams):[],command_format:"project"===b?"npx":"absolute"}),d){let a=new Set(P.BUILTIN_POLICIES.filter(a=>a.beta).map(a=>a.name)),c=k.filter(b=>a.has(b));c.length>0&&await ag(h,"beta_policies_installed",{scope:b,cli:m,beta_count:c.length,beta_policy_names:c,...e?{source:e}:{}})}}catch{}for(let{cli:a,path:c}of v){let d=M(a);console.log(`Failproof AI hooks installed for ${d.displayName} (${d.eventTypes.length} event types, scope: ${b}).`),console.log(`Settings: ${c}`)}"project"===b?(console.log("Command: npx -y failproofai"),console.log(`
219
+ This file can be committed to git — no machine-specific paths.`)):console.log(`Binary: ${r}`);let w=(l=new Set,q.filter(a=>{let b=am(a,c);return!l.has(b)&&(l.add(b),!0)})).filter(a=>a!==b).filter(a=>ao(a,c));if(w.length>0){let a=w.map(a=>`${a} (${function(a){switch(a){case"user":return"~/.claude/settings.json";case"project":return"{cwd}/.claude/settings.json";case"local":return"{cwd}/.claude/settings.local.json"}}(a)})`).join(", ");console.log(),console.log(`\x1b[33mWarning: Failproof AI hooks are also installed at ${a}.\x1b[0m`),console.log("Having hooks in multiple scopes may cause duplicate policy evaluation."),console.log(`Use \`failproofai policies --uninstall --scope ${w[0]}\` to remove the other installation,`),console.log("or `failproofai policies` to see all scopes.");try{await ag((0,Q.getInstanceId)(),"multi_scope_warning_shown",{new_scope:b,existing_scopes:w,cli:m})}catch{}}}async function aq(a,b="user",c,d){let f="all"===b?"user":b,h=d?.cli&&d.cli.length>0?[...new Set(d.cli)]:["claude"];if(d?.removeCustomHooks){let a=n(f,c);delete a.customPoliciesPath,o(a,f,c),console.log("Custom hooks path cleared.")}if(a&&a.length>0&&(1!==a.length||"all"!==a[0])){an(a);let e=n(f,c),i=new Set(a),j=e.enabledPolicies.filter(a=>!i.has(a)),k=a.filter(a=>!e.enabledPolicies.includes(a));k.length>0&&console.log(`Warning: policy(ies) not currently enabled: ${k.join(", ")}`);let{policyParams:l,...m}=e,p=l?Object.fromEntries(Object.entries(l).filter(([a])=>!i.has(a))):null;o({...m,enabledPolicies:j,...p&&Object.keys(p).length>0?{policyParams:p}:{}},f,c);try{let c=(0,Q.getInstanceId)(),f=a.filter(a=>e.enabledPolicies.includes(a));await ag(c,"hooks_removed",{scope:b,cli:h,removal_mode:d?.betaOnly?"beta_policies":"policies",beta_only:d?.betaOnly??!1,policies_removed:f,removed_count:f.length,...d?.source?{source:d.source}:{},platform:(0,g.platform)(),arch:(0,g.arch)(),os_release:(0,g.release)(),hostname_hash:(0,Q.hashToId)((0,g.hostname)())})}catch{}console.log(`Disabled ${a.length-k.length} policy(ies).`),console.log(`Remaining: ${j.length>0?j.join(", "):"(none)"}`);return}let i=n(f,c),j=0,k=!1;for(let a of h){let d=M(a);for(let a of"all"===b?[...d.scopes]:d.scopes.includes(b)?[b]:[]){let f=d.getSettingsPath(a,c);if(!(0,e.existsSync)(f)){"all"!==b&&1===h.length&&(console.log("No settings file found. Nothing to remove."),k=!0);continue}let g=d.removeHooksFromFile(f);if(0===g&&"all"!==b&&1===h.length){console.log("No hooks found in settings. Nothing to remove."),k=!0;continue}j+=g,"all"!==b&&(console.log(`Removed ${g} failproofai hook(s) from ${d.displayName} settings.`),console.log(`Settings: ${f}`))}}if(!k||0!==j){if("all"===b)for(let a of(console.log(`Removed ${j} failproofai hook(s) from all scopes.`),h)){let b=M(a);for(let a of b.scopes)console.log(` ${b.displayName} / ${a}: ${b.getSettingsPath(a,c)}`)}try{let a=(0,Q.getInstanceId)();await ag(a,"hooks_removed",{scope:b,cli:h,removal_mode:"hooks",policies_removed:i.enabledPolicies,removed_count:j,...d?.source?{source:d.source}:{},platform:(0,g.platform)(),arch:(0,g.arch)(),os_release:(0,g.release)(),hostname_hash:(0,Q.hashToId)((0,g.hostname)())})}catch{}if("all"===b)for(let a of q){let b=n(a,c);if(b.enabledPolicies.length>0||b.customPoliciesPath||b.policyParams){let{customPoliciesPath:d,policyParams:e,...f}=b;o({...f,enabledPolicies:[]},a,c)}}else if(!q.some(a=>ao(a,c))){let{customPoliciesPath:a,policyParams:b,...d}=n(f,c);o({...d,enabledPolicies:[]},f,c)}}}var ar=a.i(24282),as=a.i(12714),at=a.i(13095);async function au(a){if(!(0,e.existsSync)(a))return[];let b=await (0,as.readFile)(a,"utf-8"),c=[],d=b.split(/customPolicies\.add\s*\(/);for(let a=1;a<d.length;a++){let b=d[a],e=b.match(/name:\s*["'`]([^"'`]+)["'`]/);if(!e)continue;let f=b.match(/description:\s*["'`]([^"'`]+)["'`]/),g=b.match(/events:\s*\[([^\]]+)\]/),h=g?g[1].replace(/["'`\s]/g,"").split(",").filter(Boolean).join(", "):void 0;c.push({name:e[1],description:f?.[1],eventScope:h})}return c}async function av(){let a=k(),b=new Set(a.enabledPolicies),c=q.filter(a=>ao(a)),d=am(c[0]??"user"),e=r.map(a=>L[a]).map(a=>({id:a.id,label:(0,ar.getCliLabel)(a.id),installed:a.hooksInstalledInSettings("user"),settingsPath:a.getSettingsPath("user"),detected:a.detectInstalled()})),f=P.BUILTIN_POLICIES.map(c=>{var d;let e,f;return{name:c.name,description:c.description,category:c.category,defaultEnabled:c.defaultEnabled,beta:!!c.beta,enabled:b.has(c.name),eventScope:(d=c.match,e=d.events?.join(", ")??"",f=d.toolNames?` \xb7 ${d.toolNames.join(", ")}`:"",`${e}${f}`),params:c.params?Object.fromEntries(Object.entries(c.params).map(([a,b])=>[a,{type:b.type,description:b.description,default:b.default}])):void 0,currentParams:c.params?a.policyParams?.[c.name]??{}:void 0}}),g=a.customPoliciesPath?await au(a.customPoliciesPath):void 0;return{enabledPolicies:a.enabledPolicies,installedScopes:c,settingsPath:d,clis:e,policies:f,customPoliciesPath:a.customPoliciesPath,customPolicies:g?.length?g:void 0}}async function aw(a,b){let c=k(),d=new Set(c.enabledPolicies);b?d.add(a):d.delete(a),l({...c,enabledPolicies:[...d]});try{let c=(0,Q.getInstanceId)();await ag(c,"policy_toggled",{policy_name:a,enabled:b,action:b?"enable":"disable",source:"web"})}catch{}}async function ax(a="user",b){let c=k(),d=c.enabledPolicies.length>0?c.enabledPolicies:P.BUILTIN_POLICIES.filter(a=>a.defaultEnabled&&!a.beta).map(a=>a.name),e=b&&b.length>0?b:N(),f=e.length>0?e:["claude"];await ap(d,a,void 0,!1,"web",void 0,!1,f)}async function ay(a="user",b){let c=b&&b.length>0?b:N(),d=c.length>0?c:["claude"];await aq(void 0,a,void 0,{source:"web",cli:d})}async function az(a,b){let c=k(),d={...c.policyParams??{},[a]:b};l({...c,policyParams:d});try{let c=(0,Q.getInstanceId)();await ag(c,"policy_params_updated",{policy_name:a,param_keys:Object.keys(b),source:"web"})}catch{}}(0,at.ensureServerEntryExports)([av]),(0,d.registerServerReference)(av,"003259b48e7f537de1866bd253f5fcd98041a2710b",null),(0,at.ensureServerEntryExports)([aw]),(0,d.registerServerReference)(aw,"60fb77de9db72f6822cee0302d09ede07733aa9a6e",null),(0,at.ensureServerEntryExports)([ax,ay]),(0,d.registerServerReference)(ax,"60e3d783819debc87c6fc2a17c29d84055e0052f53",null),(0,d.registerServerReference)(ay,"606bc182a0d9e07e0429426b71364a455c520da1a4",null),(0,at.ensureServerEntryExports)([az]),(0,d.registerServerReference)(az,"60bc953890649a8b02da977fcac9291f5c14bdd384",null),a.s([],63895),a.i(63895),a.s(["003259b48e7f537de1866bd253f5fcd98041a2710b",0,av,"00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",()=>b.getTelemetryConfig,"40c644eaceee67d3c38048504ba01e8c8d2db3b2ed",()=>c.getHookActivityAction,"600eeb367b747a728a03cb1f3347fc9f9f828ba08a",()=>c.searchHookActivityAction,"606bc182a0d9e07e0429426b71364a455c520da1a4",0,ay,"60bc953890649a8b02da977fcac9291f5c14bdd384",0,az,"60e3d783819debc87c6fc2a17c29d84055e0052f53",0,ax,"60fb77de9db72f6822cee0302d09ede07733aa9a6e",0,aw],11369)}];
220
+
221
+ //# sourceMappingURL=%5Broot-of-the-server%5D__1mt35_w._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},37936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},12072,(a,b,c)=>{b.exports={name:"failproofai",version:"0.0.11-beta.2",description:"The easiest way to manage policies that keep your AI agents reliable, on-task, and running autonomously — for Claude Code & the Agents SDK",bin:{failproofai:"./dist/cli.mjs"},files:["bin/","src/","scripts/","lib/","pi-extension/",".next/standalone/","dist/","README.md"],engines:{node:">=20.9.0",bun:">=1.3.0"},scripts:{predev:"bun run build:cli && bun link",dev:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/dev.ts --port 8020","build:cli":"bun build --target=node --format=esm --outfile=dist/cli.mjs bin/failproofai.mjs --external posthog-node && node -e \"const fs=require('fs');const c=fs.readFileSync('dist/cli.mjs','utf8');fs.writeFileSync('dist/cli.mjs',c.replace('#!/usr/bin/env bun','#!/usr/bin/env node').replace('// @bun\\n',''))\"",build:"bun build --target=node --format=cjs --outfile=dist/index.js src/index.ts && bun run build:cli && bun --bun next build && node -e \"const {cpSync}=require('fs');cpSync('.next/static','.next/standalone/.next/static',{recursive:true});\" && node scripts/prune-standalone.mjs",prestart:"bun run build:cli && bun link",start:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/start.ts",test:"vitest","test:run":"vitest run",lint:"eslint . --config eslint.config.mjs",postinstall:"node scripts/postinstall.mjs",preuninstall:"node scripts/preuninstall.mjs",prepare:"bun run build","test:e2e":"vitest run --config vitest.config.e2e.mts","test:e2e:watch":"vitest --config vitest.config.e2e.mts",translate:"bun scripts/translate-docs/cli.ts","translate:readme":"bun scripts/translate-docs/cli.ts --readme-only","translate:docs":"bun scripts/translate-docs/cli.ts --docs-only","translate:dry-run":"bun scripts/translate-docs/cli.ts --dry-run","translate:validate":"bun scripts/translate-docs/cli.ts --validate"},keywords:["claude","claude-code","claude-agents-sdk","anthropic","ai-agent","agent-reliability","agent-monitoring","autonomous-agent","failure-prevention","developer-tools","devtools","cli","local-first","hooks","policies"],author:"ExosphereHost Inc. <failproofai@exosphere.host>",license:"SEE LICENSE IN LICENSE",homepage:"https://github.com/FailproofAI/failproofai",repository:{type:"git",url:"https://github.com/FailproofAI/failproofai.git"},bugs:{url:"https://github.com/FailproofAI/failproofai/issues"},publishConfig:{access:"public"},devDependencies:{"@anthropic-ai/sdk":"^0.96.0","@tailwindcss/postcss":"^4.1.18","@tanstack/react-virtual":"^3.13.18","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@testing-library/user-event":"^14.6.1","@types/node":"^25.5.2","@types/react":"^19.2.13","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^6.0.1",clsx:"^2.1.1",eslint:"^10.2.0","eslint-config-next":"^16.2.2","happy-dom":"^20.7.0","lucide-react":"^1.0.1",next:"^16.2.2",react:"^19.2.4","react-dom":"^19.2.4","tailwind-merge":"^3.4.0",tailwindcss:"^4.1.18",typescript:"^6.0.2",vitest:"^4.0.18"},dependencies:{"posthog-node":"^5.28.11"}}},13095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},36359,69839,79779,a=>{"use strict";let b;var c=a.i(37936),d=a.i(2157),e=a.i(50227),f=a.i(60526),g=a.i(66680);a.i(74533);let h=e.default.join(f.default.homedir(),".failproofai"),i=e.default.join(h,"instance-id");function j(a){return g.default.createHmac("sha256","failproofai-telemetry-v1").update(a).digest("hex")}function k(){if(b)return b;let a=function(){try{for(let a of(f.default.platform(),["/etc/machine-id","/var/lib/dbus/machine-id"]))try{let b=d.default.readFileSync(a,"utf-8").trim();if(b)return b}catch{}}catch{}}();if(a)return b=j(a);let c=[f.default.hostname(),f.default.homedir(),f.default.platform(),f.default.arch(),f.default.cpus()[0]?.model??""].join(":");return b=c?j(c):function(){try{let a=d.default.readFileSync(i,"utf-8").trim();if(a)return a}catch{}let a=g.default.randomUUID();try{d.default.mkdirSync(h,{recursive:!0}),d.default.writeFileSync(i,a,"utf-8")}catch{}return a}()}a.s(["getInstanceId",0,k,"hashToId",0,j],69839),a.s(["POSTHOG_API_KEY",0,"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX"],79779);var l=a.i(12072);async function m(){let a="1"!==process.env.FAILPROOFAI_TELEMETRY_DISABLED;return{enabled:a,distinctId:a?k():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:l.version}}(0,a.i(13095).ensureServerEntryExports)([m]),(0,c.registerServerReference)(m,"00b58db407e16463a2a3e88847a99842e7b9c64640",null),a.s(["getTelemetryConfig",0,m],36359)},165,a=>{"use strict";var b=a.i(36359);a.s([],84833),a.i(84833),a.s(["00b58db407e16463a2a3e88847a99842e7b9c64640",()=>b.getTelemetryConfig],165)},2726,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__12dv.x0._.js","server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0mebn66._.js"].map(b=>a.l(b))).then(()=>b(74493)))}];
1
+ module.exports=[74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},66680,(a,b,c)=>{b.exports=a.x("node:crypto",()=>require("node:crypto"))},37936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},12072,(a,b,c)=>{b.exports={name:"failproofai",version:"0.0.11-beta.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",bin:{failproofai:"./dist/cli.mjs"},files:["bin/","src/","scripts/","lib/","pi-extension/",".next/standalone/","dist/","README.md"],engines:{node:">=20.9.0",bun:">=1.3.0"},scripts:{predev:"bun run build:cli && bun link",dev:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/dev.ts --port 8020","build:cli":"bun build --target=node --format=esm --outfile=dist/cli.mjs bin/failproofai.mjs --external posthog-node && node -e \"const fs=require('fs');const c=fs.readFileSync('dist/cli.mjs','utf8');fs.writeFileSync('dist/cli.mjs',c.replace('#!/usr/bin/env bun','#!/usr/bin/env node').replace('// @bun\\n',''))\"",build:"bun build --target=node --format=cjs --outfile=dist/index.js src/index.ts && bun run build:cli && bun --bun next build && node -e \"const {cpSync}=require('fs');cpSync('.next/static','.next/standalone/.next/static',{recursive:true});\" && node scripts/prune-standalone.mjs",prestart:"bun run build:cli && bun link",start:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/start.ts",test:"vitest","test:run":"vitest run",lint:"eslint . --config eslint.config.mjs",postinstall:"node scripts/postinstall.mjs",preuninstall:"node scripts/preuninstall.mjs",prepare:"bun run build","test:e2e":"vitest run --config vitest.config.e2e.mts","test:e2e:watch":"vitest --config vitest.config.e2e.mts",translate:"bun scripts/translate-docs/cli.ts","translate:readme":"bun scripts/translate-docs/cli.ts --readme-only","translate:docs":"bun scripts/translate-docs/cli.ts --docs-only","translate:dry-run":"bun scripts/translate-docs/cli.ts --dry-run","translate:validate":"bun scripts/translate-docs/cli.ts --validate"},keywords:["claude","claude-code","claude-agents-sdk","anthropic","ai-agent","agent-reliability","agent-monitoring","autonomous-agent","failure-prevention","developer-tools","devtools","cli","local-first","hooks","policies"],author:"ExosphereHost Inc. <failproofai@exosphere.host>",license:"SEE LICENSE IN LICENSE",homepage:"https://github.com/FailproofAI/failproofai",repository:{type:"git",url:"https://github.com/FailproofAI/failproofai.git"},bugs:{url:"https://github.com/FailproofAI/failproofai/issues"},publishConfig:{access:"public"},devDependencies:{"@anthropic-ai/sdk":"^0.102.0","@tailwindcss/postcss":"^4.1.18","@tanstack/react-virtual":"^3.13.18","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@testing-library/user-event":"^14.6.1","@types/node":"^25.5.2","@types/react":"^19.2.13","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^6.0.1",clsx:"^2.1.1",eslint:"^10.2.0","eslint-config-next":"^16.2.2",jsdom:"^29.1.1","lucide-react":"^1.0.1",next:"^16.2.2",react:"^19.2.4","react-dom":"^19.2.4","tailwind-merge":"^3.4.0",tailwindcss:"^4.1.18",typescript:"^6.0.2",vitest:"^4.0.18"},dependencies:{html2canvas:"^1.4.1","posthog-node":"^5.28.11"},overrides:{postcss:"8.5.14","eslint-plugin-react-hooks":"7.0.1"}}},13095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},36359,69839,79779,a=>{"use strict";let b;var c=a.i(37936),d=a.i(2157),e=a.i(50227),f=a.i(60526),g=a.i(66680);a.i(74533);let h=e.default.join(f.default.homedir(),".failproofai"),i=e.default.join(h,"instance-id");function j(a){return g.default.createHmac("sha256","failproofai-telemetry-v1").update(a).digest("hex")}function k(){if(b)return b;let a=function(){try{for(let a of(f.default.platform(),["/etc/machine-id","/var/lib/dbus/machine-id"]))try{let b=d.default.readFileSync(a,"utf-8").trim();if(b)return b}catch{}}catch{}}();if(a)return b=j(a);let c=[f.default.hostname(),f.default.homedir(),f.default.platform(),f.default.arch(),f.default.cpus()[0]?.model??""].join(":");return b=c?j(c):function(){try{let a=d.default.readFileSync(i,"utf-8").trim();if(a)return a}catch{}let a=g.default.randomUUID();try{d.default.mkdirSync(h,{recursive:!0}),d.default.writeFileSync(i,a,"utf-8")}catch{}return a}()}a.s(["getInstanceId",0,k,"hashToId",0,j],69839),a.s(["POSTHOG_API_KEY",0,"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX","POSTHOG_PRODUCT",0,"failproofai-oss"],79779);var l=a.i(12072);async function m(){let a="1"!==process.env.FAILPROOFAI_TELEMETRY_DISABLED;return{enabled:a,distinctId:a?k():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:l.version}}(0,a.i(13095).ensureServerEntryExports)([m]),(0,c.registerServerReference)(m,"00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",null),a.s(["getTelemetryConfig",0,m],36359)},39027,a=>{"use strict";var b=a.i(36359);a.s([],35268),a.i(35268),a.s(["00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",()=>b.getTelemetryConfig],39027)},2726,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__1_g_b3t._.js","server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js"].map(b=>a.l(b))).then(()=>b(74493)))}];
3
3
 
4
- //# sourceMappingURL=%5Broot-of-the-server%5D__0-wn51s._.js.map
4
+ //# sourceMappingURL=%5Broot-of-the-server%5D__1pcxxwg._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[14747,(a,b,c)=>{b.exports=a.x("path",()=>require("path"))},24725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(a,b,c)=>{b.exports=a.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},14465,(a,b,c)=>{(()=>{"use strict";var a={56:a=>{a.exports=function(a,b){return"string"==typeof a?g(a):"number"==typeof a?f(a,b):null},a.exports.format=f,a.exports.parse=g;var b=/\B(?=(\d{3})+(?!\d))/g,c=/(?:\.0*|(\.[^0]+)0+)$/,d={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000},e=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function f(a,e){if(!Number.isFinite(a))return null;var f=Math.abs(a),g=e&&e.thousandsSeparator||"",h=e&&e.unitSeparator||"",i=e&&void 0!==e.decimalPlaces?e.decimalPlaces:2,j=!!(e&&e.fixedDecimals),k=e&&e.unit||"";k&&d[k.toLowerCase()]||(k=f>=d.pb?"PB":f>=d.tb?"TB":f>=d.gb?"GB":f>=d.mb?"MB":f>=d.kb?"KB":"B");var l=(a/d[k.toLowerCase()]).toFixed(i);return j||(l=l.replace(c,"$1")),g&&(l=l.split(".").map(function(a,c){return 0===c?a.replace(b,g):a}).join(".")),l+h+k}function g(a){if("number"==typeof a&&!isNaN(a))return a;if("string"!=typeof a)return null;var b,c=e.exec(a),f="b";return c?(b=parseFloat(c[1]),f=c[4].toLowerCase()):(b=parseInt(a,10),f="b"),Math.floor(d[f]*b)}}},c={};function d(b){var e=c[b];if(void 0!==e)return e.exports;var f=c[b]={exports:{}},g=!0;try{a[b](f,f.exports,d),g=!1}finally{g&&delete c[b]}return f.exports}d.ab="/ROOT/node_modules/next/dist/compiled/bytes/",b.exports=d(56)})()},42440,a=>{"use strict";a.s(["isFullStringUrl",0,function(a){return/https?:\/\//.test(a)},"parseUrl",0,function(a){let b;try{b=new URL(a,"http://n")}catch{}return b}])},24951,(a,b,c)=>{"use strict";b.exports=a.r(18622)},11857,(a,b,c)=>{"use strict";b.exports=a.r(24951).vendored["react-rsc"].ReactServerDOMTurbopackServer},7997,(a,b,c)=>{"use strict";b.exports=a.r(24951).vendored["react-rsc"].ReactJsxRuntime},717,(a,b,c)=>{"use strict";b.exports=a.r(24951).vendored["react-rsc"].React}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__1usf8v2._.js.map
@@ -0,0 +1,4 @@
1
+ module.exports=[74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},37936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},12072,(a,b,c)=>{b.exports={name:"failproofai",version:"0.0.11-beta.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",bin:{failproofai:"./dist/cli.mjs"},files:["bin/","src/","scripts/","lib/","pi-extension/",".next/standalone/","dist/","README.md"],engines:{node:">=20.9.0",bun:">=1.3.0"},scripts:{predev:"bun run build:cli && bun link",dev:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/dev.ts --port 8020","build:cli":"bun build --target=node --format=esm --outfile=dist/cli.mjs bin/failproofai.mjs --external posthog-node && node -e \"const fs=require('fs');const c=fs.readFileSync('dist/cli.mjs','utf8');fs.writeFileSync('dist/cli.mjs',c.replace('#!/usr/bin/env bun','#!/usr/bin/env node').replace('// @bun\\n',''))\"",build:"bun build --target=node --format=cjs --outfile=dist/index.js src/index.ts && bun run build:cli && bun --bun next build && node -e \"const {cpSync}=require('fs');cpSync('.next/static','.next/standalone/.next/static',{recursive:true});\" && node scripts/prune-standalone.mjs",prestart:"bun run build:cli && bun link",start:"FAILPROOFAI_TELEMETRY_DISABLED=1 bun scripts/start.ts",test:"vitest","test:run":"vitest run",lint:"eslint . --config eslint.config.mjs",postinstall:"node scripts/postinstall.mjs",preuninstall:"node scripts/preuninstall.mjs",prepare:"bun run build","test:e2e":"vitest run --config vitest.config.e2e.mts","test:e2e:watch":"vitest --config vitest.config.e2e.mts",translate:"bun scripts/translate-docs/cli.ts","translate:readme":"bun scripts/translate-docs/cli.ts --readme-only","translate:docs":"bun scripts/translate-docs/cli.ts --docs-only","translate:dry-run":"bun scripts/translate-docs/cli.ts --dry-run","translate:validate":"bun scripts/translate-docs/cli.ts --validate"},keywords:["claude","claude-code","claude-agents-sdk","anthropic","ai-agent","agent-reliability","agent-monitoring","autonomous-agent","failure-prevention","developer-tools","devtools","cli","local-first","hooks","policies"],author:"ExosphereHost Inc. <failproofai@exosphere.host>",license:"SEE LICENSE IN LICENSE",homepage:"https://github.com/FailproofAI/failproofai",repository:{type:"git",url:"https://github.com/FailproofAI/failproofai.git"},bugs:{url:"https://github.com/FailproofAI/failproofai/issues"},publishConfig:{access:"public"},devDependencies:{"@anthropic-ai/sdk":"^0.102.0","@tailwindcss/postcss":"^4.1.18","@tanstack/react-virtual":"^3.13.18","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@testing-library/user-event":"^14.6.1","@types/node":"^25.5.2","@types/react":"^19.2.13","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^6.0.1",clsx:"^2.1.1",eslint:"^10.2.0","eslint-config-next":"^16.2.2",jsdom:"^29.1.1","lucide-react":"^1.0.1",next:"^16.2.2",react:"^19.2.4","react-dom":"^19.2.4","tailwind-merge":"^3.4.0",tailwindcss:"^4.1.18",typescript:"^6.0.2",vitest:"^4.0.18"},dependencies:{html2canvas:"^1.4.1","posthog-node":"^5.28.11"},overrides:{postcss:"8.5.14","eslint-plugin-react-hooks":"7.0.1"}}},13095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},36359,69839,79779,a=>{"use strict";let b;var c=a.i(37936),d=a.i(2157),e=a.i(50227),f=a.i(60526),g=a.i(66680);a.i(74533);let h=e.default.join(f.default.homedir(),".failproofai"),i=e.default.join(h,"instance-id");function j(a){return g.default.createHmac("sha256","failproofai-telemetry-v1").update(a).digest("hex")}function k(){if(b)return b;let a=function(){try{for(let a of(f.default.platform(),["/etc/machine-id","/var/lib/dbus/machine-id"]))try{let b=d.default.readFileSync(a,"utf-8").trim();if(b)return b}catch{}}catch{}}();if(a)return b=j(a);let c=[f.default.hostname(),f.default.homedir(),f.default.platform(),f.default.arch(),f.default.cpus()[0]?.model??""].join(":");return b=c?j(c):function(){try{let a=d.default.readFileSync(i,"utf-8").trim();if(a)return a}catch{}let a=g.default.randomUUID();try{d.default.mkdirSync(h,{recursive:!0}),d.default.writeFileSync(i,a,"utf-8")}catch{}return a}()}a.s(["getInstanceId",0,k,"hashToId",0,j],69839),a.s(["POSTHOG_API_KEY",0,"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX","POSTHOG_PRODUCT",0,"failproofai-oss"],79779);var l=a.i(12072);async function m(){let a="1"!==process.env.FAILPROOFAI_TELEMETRY_DISABLED;return{enabled:a,distinctId:a?k():"",apiKey:process.env.FAILPROOFAI_POSTHOG_KEY??"phc_Ac1Ww1GqKc0z1SyrRWbmatEeQdlOQIsDEEdP8l8JRgX",host:process.env.FAILPROOFAI_POSTHOG_HOST??"https://us.i.posthog.com",version:l.version}}(0,a.i(13095).ensureServerEntryExports)([m]),(0,c.registerServerReference)(m,"00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",null),a.s(["getTelemetryConfig",0,m],36359)},26035,a=>{"use strict";var b=a.i(36359);a.s([],19459),a.i(19459),a.s(["00a7b5386a1a3e47fc1d84985626367e9b2acb7a05",()=>b.getTelemetryConfig],26035)},2726,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__1_g_b3t._.js","server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js"].map(b=>a.l(b))).then(()=>b(74493)))}];
3
+
4
+ //# sourceMappingURL=%5Broot-of-the-server%5D__1vvfde2._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},71306,(a,b,c)=>{b.exports=a.r(18622)},79847,a=>{a.n(a.i(3343))},9185,a=>{a.n(a.i(29432))},72842,a=>{a.n(a.i(75164))},54897,a=>{a.n(a.i(30106))},56157,a=>{a.n(a.i(18970))},94331,a=>{a.n(a.i(60644))},15988,a=>{a.n(a.i(56952))},25766,a=>{a.n(a.i(77341))},29725,a=>{a.n(a.i(94290))},90833,a=>{a.n(a.i(46994))},5785,a=>{a.n(a.i(90588))},74793,a=>{a.n(a.i(33169))},85826,a=>{a.n(a.i(37111))},21565,a=>{a.n(a.i(41763))},65911,a=>{a.n(a.i(8950))},25128,a=>{a.n(a.i(91562))},40781,a=>{a.n(a.i(49670))},69411,a=>{a.n(a.i(75700))},63081,a=>{a.n(a.i(276))},62837,a=>{a.n(a.i(40795))},34607,a=>{a.n(a.i(11614))},96338,a=>{a.n(a.i(21751))},50642,a=>{a.n(a.i(12213))},32242,a=>{a.n(a.i(22693))},88530,a=>{a.n(a.i(10531))},8583,a=>{a.n(a.i(1082))},38534,a=>{a.n(a.i(98175))},70408,a=>{a.n(a.i(9095))},22922,a=>{a.n(a.i(96772))},78294,a=>{a.n(a.i(71717))},16625,a=>{a.n(a.i(85034))},88648,a=>{a.n(a.i(68113))},51914,a=>{a.n(a.i(66482))},25466,a=>{a.n(a.i(91505))},50708,a=>{"use strict";a.i(70396);var b=a.i(73727);a.s(["default",0,function(){(0,b.notFound)()}])},26030,a=>{a.n(a.i(50708))}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__212nf49._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[85650,52562,a=>{"use strict";var b=a.i(64831);let c=(0,b.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",0,c],85650);let d=(0,b.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["Check",0,d],52562)},24121,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(85650),e=a.i(52562),f=a.i(97895);function g(a){let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b);try{return b.select(),document.execCommand("copy")}finally{document.body.removeChild(b)}}a.s(["CopyButton",0,function({text:a,className:h}){let[i,j]=(0,c.useState)(!1),k=(0,c.useCallback)(async()=>{try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(a);else if(!g(a))throw Error("Both clipboard methods failed");j(!0),setTimeout(()=>j(!1),2e3)}catch(b){console.error("Failed to copy to clipboard:",b);try{g(a)&&(j(!0),setTimeout(()=>j(!1),2e3))}catch{}}},[a]);return(0,b.jsx)("button",{onClick:k,title:"Copy to clipboard",className:(0,f.cn)("inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors",h),children:i?(0,b.jsx)(e.Check,{className:"w-3.5 h-3.5 text-green-500"}):(0,b.jsx)(d.Copy,{className:"w-3.5 h-3.5"})})}])},90619,95947,a=>{"use strict";var b=a.i(50944),c=a.i(72131);function d(a){let b=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),d=String(a.getDate()).padStart(2,"0");return`${b}-${c}-${d}`}function e(a){var b;if(!a||(b=a,!/^\d{4}-\d{2}-\d{2}$/.test(b)||isNaN(Date.parse(b))))return null;let[c,d,e]=a.split("-").map(Number);return new Date(c,d-1,e,12,0,0)}a.s(["useUrlParams",0,function(){let a=(0,b.useSearchParams)(),d=(0,b.useRouter)(),e=(0,b.usePathname)(),f=(0,c.useRef)(null),g=(0,c.useCallback)(b=>a.get(b),[a]),h=(0,c.useCallback)(()=>new URLSearchParams(a.toString()),[a]),i=(0,c.useCallback)(b=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{let c=new URLSearchParams(a.toString());for(let[a,d]of Object.entries(b))void 0===d||""===d?c.delete(a):c.set(a,d);let f=c.toString(),g=f?`${e}?${f}`:e;d.replace(g,{scroll:!1})},150)},[a,e,d]);return(0,c.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]),{get:g,getAll:h,setAll:i}}],90619),a.s(["dateRangeToParams",0,function(a){let b={};return a.from&&(b.from=d(a.from)),a.to&&(b.to=d(a.to)),b},"keywordsToParam",0,function(a){if(0!==a.length)return a.map(a=>encodeURIComponent(a)).join(",")},"pageToParam",0,function(a){return a<=1?void 0:String(a)},"paramToKeywords",0,function(a){return a?a.split(",").map(a=>decodeURIComponent(a.trim())).filter(a=>a.length>0):[]},"paramToPage",0,function(a){if(!a)return 1;let b=parseInt(a,10);return Number.isFinite(b)&&b>=1?b:1},"paramToPreset",0,function(a){return a&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(a)?a:"all"},"paramsToDateRange",0,function(a,b){return{from:e(a),to:e(b)}},"presetToParam",0,function(a){return"all"===a?void 0:a}],95947)},65967,a=>{"use strict";var b=a.i(87924),c=a.i(64831);let d=(0,c.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),e=(0,c.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["default",0,function({currentPage:a,totalPages:c,onPageChange:f}){if(c<=1)return null;let g=a=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${a?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,b.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,b.jsxs)("button",{onClick:()=>f(a-1),disabled:1===a,className:g(1===a),"aria-label":"Previous page",children:[(0,b.jsx)(d,{className:"w-4 h-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,b.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(c<=7)return Array.from({length:c},(a,b)=>b+1);let b=[1],d=Math.max(2,a-1),e=Math.min(c-1,a+1);a<=3&&(e=Math.min(5,c-1)),a>=c-2&&(d=Math.max(2,c-4)),d>2&&b.push("ellipsis-start");for(let a=d;a<=e;a++)b.push(a);return e<c-1&&b.push("ellipsis-end"),b.push(c),b})().map(c=>"string"==typeof c?(0,b.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},c):(0,b.jsx)("button",{onClick:()=>f(c),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${a===c?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${c}`,"aria-current":a===c?"page":void 0,children:c},c))}),(0,b.jsxs)("button",{onClick:()=>f(a+1),disabled:a===c,className:g(a===c),"aria-label":"Next page",children:[(0,b.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,b.jsx)(e,{className:"w-4 h-4"})]})]})}],65967)},87256,a=>{"use strict";let b={claude:{id:"claude",label:"Claude Code",badgeClasses:"bg-orange-500/10 text-orange-400 border-orange-500/20"},codex:{id:"codex",label:"OpenAI Codex",badgeClasses:"bg-purple-500/10 text-purple-400 border-purple-500/20"},copilot:{id:"copilot",label:"GitHub Copilot",badgeClasses:"bg-blue-500/10 text-blue-400 border-blue-500/20"},cursor:{id:"cursor",label:"Cursor Agent",badgeClasses:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"},opencode:{id:"opencode",label:"OpenCode",badgeClasses:"bg-amber-500/10 text-amber-400 border-amber-500/20"},pi:{id:"pi",label:"Pi",badgeClasses:"bg-pink-500/10 text-pink-400 border-pink-500/20"},gemini:{id:"gemini",label:"Gemini CLI",badgeClasses:"bg-sky-500/10 text-sky-400 border-sky-500/20"}};a.s(["KNOWN_CLI_IDS",0,["claude","codex","copilot","cursor","opencode","pi","gemini"],"getCliBadgeClasses",0,function(a){return b[a]?.badgeClasses??b.claude.badgeClasses},"getCliLabel",0,function(a){return b[a]?.label??a},"isKnownCli",0,function(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(b,a)}])},16316,27950,45481,33540,24451,a=>{"use strict";a.s(["formatDate",0,function(a){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}).format(a)}],16316),a.s(["FILTER_PRESETS",0,[{value:"all",label:"All"},{value:"last-hour",label:"Last Hour"},{value:"today",label:"Today"},{value:"last-7-days",label:"Last 7 Days"},{value:"last-30-days",label:"Last 30 Days"}],"ITEMS_PER_PAGE",0,25,"filterByDate",0,function(a,b,c){if("all"===b)return a;if("custom"===b){let b,d,e=c.from?((b=new Date(c.from)).setHours(0,0,0,0),b):null,f=c.to?((d=new Date(c.to)).setHours(23,59,59,999),d):null;return a.filter(a=>(!e||!(a.lastModified<e))&&(!f||!(a.lastModified>f)))}let d=function(a){let b=new Date;switch(a){case"last-hour":return new Date(b.getTime()-36e5);case"today":return new Date(b.getFullYear(),b.getMonth(),b.getDate());case"last-7-days":return new Date(b.getTime()-6048e5);case"last-30-days":return new Date(b.getTime()-2592e6);default:return null}}(b);return d?a.filter(a=>a.lastModified>=d):a},"rehydrateDates",0,function(a){return a.map(a=>({...a,lastModified:a.lastModified instanceof Date?a.lastModified:new Date(a.lastModified)}))}],27950);var b=a.i(72131);a.s(["useFilterState",0,function(a=[],c){let[d,e]=(0,b.useState)(c?.filterPreset??"all"),[f,g]=(0,b.useState)(c?.dateRange??{from:null,to:null}),[h,i]=(0,b.useState)(c?.currentPage??1),j=`${d}|${JSON.stringify(f)}|${JSON.stringify(a)}`,[k,l]=(0,b.useState)(j);j!==k&&(l(j),i(1));let m=(0,b.useCallback)(a=>{e(a),"custom"!==a&&g({from:null,to:null})},[]);return{filterPreset:d,dateRange:f,currentPage:h,setCurrentPage:i,handlePresetChange:m,handleDateRangeChange:(0,b.useCallback)((a,b)=>{e("custom"),g(c=>({...c,[a]:b?new Date(b):null}))},[]),clearFilters:(0,b.useCallback)(()=>{e("all"),g({from:null,to:null})},[])}}],45481);var c=a.i(64831);let d=(0,c.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);a.s(["Search",0,d],33540);var e=a.i(87924);let f=(0,c.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["default",0,function({id:a,value:b,stringValue:c,onChange:d,"aria-label":g}){let h=null!=c?c:b?b.toISOString().split("T")[0]:"";return(0,e.jsxs)("div",{className:"relative group",children:[(0,e.jsx)("input",{type:"date",id:a,value:h,onChange:a=>d(a.target.value),"aria-label":g,className:"date-input px-3 py-2 pr-8 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 w-[200px]"}),(0,e.jsx)("label",{htmlFor:a,className:"absolute right-2.5 top-1/2 -translate-y-1/2 cursor-pointer pointer-events-auto z-10 p-1 rounded hover:bg-muted/50 transition-colors",onClick:b=>{b.preventDefault();let c=document.getElementById(a);c&&"function"==typeof c.showPicker?c.showPicker():c?.click()},children:(0,e.jsx)(f,{className:"w-4 h-4 text-primary group-hover:text-primary/80 transition-colors"})})]})}],24451)},77975,a=>{"use strict";var b=a.i(87924),c=a.i(87256);a.s(["CliBadge",0,function({cli:a}){let d=(0,c.getCliLabel)(a),e=(0,c.getCliBadgeClasses)(a);return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-mono font-medium uppercase tracking-wider border ${e}`,title:`Agent CLI: ${d}`,children:d})}])},34484,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(16316),e=a.i(27950),f=a.i(45481),g=a.i(90619),h=a.i(95947);let i=(0,a.i(64831).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);var j=a.i(33540),k=a.i(38246),l=a.i(65967),m=a.i(24451),n=a.i(24121),o=a.i(77975);a.s(["default",0,function({files:a,projectName:p}){let q=(0,g.useUrlParams)(),r=(0,c.useRef)(!1),[s,t]=(0,c.useState)(()=>q.get("sid")??""),{filterPreset:u,dateRange:v,currentPage:w,setCurrentPage:x,handlePresetChange:y,handleDateRangeChange:z,clearFilters:A}=(0,f.useFilterState)([s],{filterPreset:(0,h.paramToPreset)(q.get("preset")),dateRange:(0,h.paramsToDateRange)(q.get("from"),q.get("to")),currentPage:(0,h.paramToPage)(q.get("page"))});(0,c.useEffect)(()=>{if(!r.current){r.current=!0;return}q.setAll({preset:(0,h.presetToParam)(u),...(0,h.dateRangeToParams)(v),sid:s||void 0,page:(0,h.pageToParam)(w)})},[u,v,s,w]);let B=(0,c.useMemo)(()=>(0,e.rehydrateDates)(a),[a]),C=(0,c.useMemo)(()=>{var a;let b;return(a=(0,e.filterByDate)(B,u,v),!(b=s.trim().toLowerCase())?a:a.filter(a=>a.sessionId?.toLowerCase().includes(b))).sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime())},[B,s,u,v]),D=Math.max(1,Math.ceil(C.length/e.ITEMS_PER_PAGE));(0,c.useEffect)(()=>{w>D&&x(D)},[w,D,x]);let E=(w-1)*e.ITEMS_PER_PAGE,F=Math.min(E+e.ITEMS_PER_PAGE,C.length),G=C.slice(E,F),H="all"!==u||null!==v.from||null!==v.to||""!==s;return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4 flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Filter by:"}),e.FILTER_PRESETS.map(a=>(0,b.jsx)("button",{onClick:()=>y(a.value),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${u===a.value?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:a.label},a.value))]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Custom Range:"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(m.default,{id:"date-from",value:v.from,onChange:a=>z("from",a),"aria-label":"Filter from date"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"to"}),(0,b.jsx)(m.default,{id:"date-to",value:v.to,onChange:a=>z("to",a),"aria-label":"Filter to date"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(j.Search,{className:"w-4 h-4 text-muted-foreground"}),(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Filter by Session ID:"}),(0,b.jsx)("input",{type:"text",value:s,onChange:a=>t(a.target.value),placeholder:"Enter session ID (UUID)",className:"px-3 py-2 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 flex-1 max-w-md","aria-label":"Filter by session ID"}),H&&(0,b.jsx)("button",{onClick:()=>{A(),t("")},className:"px-3 py-2 text-sm bg-muted text-muted-foreground hover:bg-muted/80 rounded-md transition-colors",children:"Clear"})]}),(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:0===C.length?"No sessions found":(0,b.jsxs)(b.Fragment,{children:["Showing ",E+1,"-",F," of ",C.length," sessions",C.length!==B.length&&(0,b.jsxs)("span",{className:"ml-1",children:["(filtered from ",B.length," total)"]})]})})]}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"border-b border-border bg-muted/50",children:[(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground w-12",children:(0,b.jsx)("span",{className:"sr-only",children:"Icon"})}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"SessionId"}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Modified"})]})}),(0,b.jsx)("tbody",{children:0===G.length?(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:3,className:"px-4 py-8 text-center text-muted-foreground",children:"No sessions found matching the filter."})}):G.map(a=>(0,b.jsxs)("tr",{className:"border-b border-border hover:bg-muted/50 transition-colors",children:[(0,b.jsx)("td",{className:"px-4 py-3",children:(0,b.jsx)(i,{className:"w-5 h-5 text-primary"})}),(0,b.jsx)("td",{className:"px-4 py-3 max-w-md",children:(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[a.sessionId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(k.default,{href:`/project/${encodeURIComponent(p)}/session/${encodeURIComponent(a.sessionId)}`,className:"font-semibold text-foreground hover:text-primary transition-colors break-words break-all inline-block max-w-full",children:a.name.replace(/\.jsonl$/,"")}),(0,b.jsx)(n.CopyButton,{text:a.sessionId})]}):(0,b.jsx)("span",{className:"font-semibold text-foreground break-words break-all inline-block max-w-full",children:a.name.replace(/\.jsonl$/,"")}),a.cli&&(0,b.jsx)(o.CliBadge,{cli:a.cli})]})}),(0,b.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:a.lastModifiedFormatted||(0,d.formatDate)(a.lastModified)})]},a.path))})]})}),C.length>0&&(0,b.jsx)(l.default,{currentPage:w,totalPages:D,onPageChange:x})]})]})}],34484)}];
2
2
 
3
- //# sourceMappingURL=_03d7qyt._.js.map
3
+ //# sourceMappingURL=_05whahf._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[8174,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/lucide-react/dist/esm/Icon.mjs <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/lucide-react/dist/esm/Icon.mjs <module evaluation>","default")},90697,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/node_modules/lucide-react/dist/esm/Icon.mjs from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/node_modules/lucide-react/dist/esm/Icon.mjs","default")},53808,a=>{"use strict";a.i(8174);var b=a.i(90697);a.n(b)},14066,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/components/lazy-log-viewer.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/lazy-log-viewer.tsx <module evaluation>","default")},19597,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/components/lazy-log-viewer.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/lazy-log-viewer.tsx","default")},71130,a=>{"use strict";a.i(14066);var b=a.i(19597);a.n(b)},85540,a=>{"use strict";a.s(["CopyButton",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call CopyButton() from the server but CopyButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/copy-button.tsx <module evaluation>","CopyButton")},35770,a=>{"use strict";a.s(["CopyButton",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call CopyButton() from the server but CopyButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/components/copy-button.tsx","CopyButton")},893,a=>{"use strict";a.i(85540);var b=a.i(35770);a.n(b)},41190,a=>{"use strict";var b=a.i(7997),c=a.i(95936),d=a.i(717);let e=a=>{let b=a.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,b,c)=>c?c.toUpperCase():b.toLowerCase());return b.charAt(0).toUpperCase()+b.slice(1)};var f=a.i(53808);let g=(a,b)=>{let c=(0,d.forwardRef)(({className:c,...g},h)=>(0,d.createElement)(f.default,{ref:h,iconNode:b,className:((...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim())(`lucide-${e(a).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${a}`,c),...g}));return c.displayName=e(a),c},h=g("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),i=g("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);a.i(70396);var j=a.i(73727),k=a.i(24868),l=a.i(14747),m=a.i(90798),n=a.i(69191);async function o(a,b,c,d){let e=`agent-${d}.jsonl`;for(let d of[(0,l.join)(a,b,e),(0,l.join)(a,b,c,e),(0,l.join)(a,b,c,"subagents",e)])if(!(0,l.relative)(a,d).startsWith(".."))try{return await (0,k.access)(d),d}catch(a){if("ENOENT"===a.code)continue;break}return null}var p=a.i(34900),q=a.i(26192),r=a.i(33432);function s(a){if(a<1e3)return`${a}ms`;let b=a/1e3;if(b<60)return`${b.toFixed(1)}s`;let c=Math.floor(b/60);if(c>=60){let a=Math.floor(c/60);return`${a}h ${c%60}m`}let d=(b%60).toFixed(0);return`${c}m ${d}s`}function t(a){let b=(0,r.formatDate)(a),c=a.getMilliseconds().toString().padStart(3,"0");return`${b}.${c}`}function u(a,b,c,d){return{_source:d,uuid:a.uuid||"",parentUuid:a.parentUuid??null,timestamp:b,timestampMs:c.getTime(),timestampFormatted:t(c)}}async function v(a,b){let c=a.split("\n").filter(a=>""!==a.trim()),d=new Map,e=[],f=[],g=new Set,h=!1;for(let a=0;a<c.length;a++){let i;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let j=c[a];try{i=JSON.parse(j)}catch{continue}let k={...i,_source:b};f.push(k);let l=i.type,m=i.timestamp;if(!m)continue;let n=new Date(m),o=n.getTime();if("user"===l){let a=i.message;if(Array.isArray(a?.content)){let b=a.content;if(b.some(a=>"tool_result"===a.type)){let a=i.toolUseResult,c="string"==typeof a?.agentId?a.agentId:void 0;for(let a of(c&&/^[a-f0-9]+$/.test(c)&&g.add(c),b)){if("tool_result"!==a.type)continue;let b=a.tool_use_id;if(!b)continue;let{text:e,images:f}=function(a){let b=a.content;if("string"==typeof b)return{text:b};if(Array.isArray(b)){let a=b.filter(a=>"text"===a.type).map(a=>a.text),c=b.filter(a=>"image"===a.type).map(a=>{let b=a.source;return{base64:b.data,mediaType:b.media_type}}).filter(a=>a.base64&&a.mediaType);return{text:a.length>0?a.join("\n"):void 0,images:c.length>0?c:void 0}}return{}}(a);d.set(b,{timestamp:m,timestampMs:o,content:e,images:f,agentId:c})}continue}}let c="string"==typeof a?.content?a.content:"";e.push({type:"user",...u(i,m,n,b),message:{role:"user",content:c}});continue}if("assistant"===l){let a=i.message,c=[];if(Array.isArray(a?.content)&&(c=a.content.filter(a=>["text","tool_use","thinking"].includes(a.type)).map(a=>{if("text"===a.type)return{type:"text",text:a.text};if("tool_use"===a.type){let b=a.input;return{type:"tool_use",id:a.id,name:a.name,input:a.input??{},..."Task"===a.name&&b?{subagentType:b.subagent_type,subagentDescription:b.description}:{}}}return{type:"thinking",thinking:a.thinking,signature:a.signature}})),0===c.length)continue;e.push({type:"assistant",...u(i,m,n,b),message:{role:"assistant",content:c,model:a?.model}});continue}if("file-history-snapshot"===l||"progress"===l||"system"===l){e.push({type:l,...u(i,m,n,b),raw:{...i}});continue}if("queue-operation"===l){let a=h?"Session Resumed":"Session Started";h=!0,e.push({type:"queue-operation",...u(i,m,n,b),label:a});continue}}let i=0;for(let a of e)if("assistant"===a.type)for(let b of(++i%200==0&&await new Promise(a=>setImmediate(a)),a.message.content)){if("tool_use"!==b.type)continue;let c=d.get(b.id);if(!c)continue;let e=new Date(c.timestamp),f=Math.max(0,c.timestampMs-a.timestampMs);b.result={timestamp:c.timestamp,timestampFormatted:t(e),content:c.content,images:c.images,durationMs:f,durationFormatted:s(f)},c.agentId&&(b.subagentId=c.agentId)}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,subagentIds:Array.from(g)}}async function w(a,b){let c=(0,n.resolveProjectPath)(a),d=(0,m.getClaudeProjectsPath)(),e=(0,l.join)(c,`${b}.jsonl`),f=await (0,k.readFile)(e,"utf-8"),{entries:g,rawLines:h,subagentIds:i}=await v(f,"session");if(0===i.length)return{entries:g,rawLines:h,subagentIds:[]};let j=await (0,q.batchAll)(i.map(c=>async()=>{let e=`agent-${c}`,f=await o(d,a,b,c);if(!f)return null;let g=await (0,k.readFile)(f,"utf-8"),{entries:h,rawLines:i}=await v(g,e);return{entries:h,rawLines:i}}),4),p=[...g],r=[...h];for(let a of j)"fulfilled"===a.status&&a.value&&(p.push(...a.value.entries),r.push(...a.value.rawLines));return p.length>500&&await new Promise(a=>setImmediate(a)),p.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:p,rawLines:r,subagentIds:i}}let x=(0,p.runtimeCache)((a,b)=>w(a,b),60,{maxSize:50});var y=a.i(2157),z=a.i(12714),A=a.i(50227),B=a.i(60526);let C=(0,A.join)((0,B.homedir)(),".failproofai","cache","codex-session-paths.json");function D(){try{if(!(0,y.existsSync)(C))return{};return JSON.parse((0,y.readFileSync)(C,"utf-8"))}catch{return{}}}function E(a,b){try{(0,y.mkdirSync)((0,A.dirname)(C),{recursive:!0});let c=D();c[a]=b,(0,y.writeFileSync)(C,JSON.stringify(c),"utf-8")}catch{}}function F(a,b){try{for(let c of(0,y.readdirSync)(a,{withFileTypes:!0}))if(c.isFile()&&c.name.includes(b)&&c.name.endsWith(".jsonl"))return(0,A.join)(a,c.name)}catch{}return null}function G(a,b){return Array.isArray(a)?a.filter(a=>a?.type===b&&"string"==typeof a.text).map(a=>a.text).join("\n"):""}async function H(a,b="session"){let c,d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=new Map,h=new Map,i=!1;for(let a=0;a<d.length;a++){let j;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let k=d[a];try{j=JSON.parse(k)}catch{continue}let l={...j,_source:b};f.push(l);let m=j.timestamp;if(!m)continue;let n=new Date(m);if(Number.isNaN(n.getTime()))continue;let o=j.type,p=j.payload??{};if("session_meta"===o){let a=p.cwd;"string"!=typeof a||c||(c=a),e.push({type:"system",...u(l,m,n,b),raw:l});continue}if("response_item"===o){let a=p.type;if("message"===a){let a=p.role,c=p.content;if("user"===a||"developer"===a){let d=G(c,"input_text");if(!d)continue;let f="developer"===a?`[developer] ${d}`:d;e.push({type:"user",...u(l,m,n,b),message:{role:"user",content:f}});continue}if("assistant"===a){let a=G(c,"output_text");if(!a)continue;let d=[{type:"text",text:a}];e.push({type:"assistant",...u(l,m,n,b),message:{role:"assistant",content:d}});continue}e.push({type:"system",...u(l,m,n,b),raw:l});continue}if("function_call"===a){let a=p.call_id,c=p.name??"function_call",d={type:"tool_use",id:a??`${m}-${c}`,name:c,input:function(a){if(!a)return{};try{return JSON.parse(a)}catch{return{}}}(p.arguments)},f={type:"assistant",...u(l,m,n,b),message:{role:"assistant",content:[d]}};e.push(f),a&&(g.set(a,d),h.set(a,n.getTime()));continue}if("function_call_output"===a){let a=p.call_id,c=a?g.get(a):void 0;if(c){let b=h.get(a)??n.getTime(),d=Math.max(0,n.getTime()-b);c.result={timestamp:m,timestampFormatted:t(n),content:"string"==typeof p.output?p.output:JSON.stringify(p.output),durationMs:d,durationFormatted:s(d)};continue}e.push({type:"system",...u(l,m,n,b),raw:l});continue}e.push({type:"system",...u(l,m,n,b),raw:l});continue}if("event_msg"===o){let a=p.type;if("task_started"===a){let a=i?"Session Resumed":"Session Started";i=!0,e.push({type:"queue-operation",...u(l,m,n,b),label:a});continue}if("exec_command_end"===a){let a=p.call_id,c=a?g.get(a):void 0;if(c){let b=p.duration,d=b?(b.secs??0)*1e3+Math.round((b.nanos??0)/1e6):Math.max(0,n.getTime()-(h.get(a)??n.getTime())),e=p.aggregated_output;c.result={timestamp:m,timestampFormatted:t(n),content:"string"==typeof e?e:JSON.stringify(e),durationMs:d,durationFormatted:s(d)};continue}e.push({type:"system",...u(l,m,n,b),raw:l});continue}if("user_message"===a||"agent_message"===a)continue;e.push({type:"system",...u(l,m,n,b),raw:l});continue}e.push({type:"system",...u(l,m,n,b),raw:l})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function I(a){let b=function(a){let b=D()[a];if(b&&(0,y.existsSync)(b))return b;let c=(0,A.join)((0,B.homedir)(),".codex","sessions"),d=new Date,e=new Date(d.getTime()-864e5);for(let b of[d,e].map(a=>{let b=String(a.getUTCFullYear()),d=String(a.getUTCMonth()+1).padStart(2,"0"),e=String(a.getUTCDate()).padStart(2,"0");return(0,A.join)(c,b,d,e)})){let c=F(b,a);if(c)return E(a,c),c}try{for(let b of(0,y.readdirSync)(c,{withFileTypes:!0}))if(b.isDirectory()){for(let d of(0,y.readdirSync)((0,A.join)(c,b.name),{withFileTypes:!0}))if(d.isDirectory())for(let e of(0,y.readdirSync)((0,A.join)(c,b.name,d.name),{withFileTypes:!0})){if(!e.isDirectory())continue;let f=F((0,A.join)(c,b.name,d.name,e.name),a);if(f)return E(a,f),f}}}catch{}return null}(a);if(!b)return null;let c=await (0,z.readFile)(b,"utf-8"),{entries:d,rawLines:e,cwd:f}=await H(c,"session");return{entries:d,rawLines:e,cwd:f,filePath:b}}let J=(0,p.runtimeCache)(a=>I(a),60,{maxSize:50});function K(a,b){let c=function(a){if(!a)return null;let b=(0,A.resolve)((0,A.join)(process.env.COPILOT_HOME||(0,A.join)((0,B.homedir)(),".copilot"),"session-state")),c=(0,A.resolve)(b,a);return c!==b&&c.startsWith(`${b}${A.sep}`)?c:null}(a);return c?(0,A.join)(c,b):null}async function L(a,b="session"){let c,d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=new Map,h=new Map,i=!1;for(let a=0;a<d.length;a++){let j;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let k=d[a];try{j=JSON.parse(k)}catch{continue}let l={...j,_source:b};f.push(l);let m=j.timestamp;if(!m)continue;let n=new Date(m);if(Number.isNaN(n.getTime()))continue;let o=n.toISOString(),p=j.type,q=j.data??{};if("session.start"===p){let a=q.context,d=a?.cwd;"string"!=typeof d||c||(c=d);let f=i?"Session Resumed":"Session Started";i=!0,e.push({type:"queue-operation",...u(l,o,n,b),label:f});continue}if("user.message"===p){let a=q.content??"";if(!a)continue;e.push({type:"user",...u(l,o,n,b),message:{role:"user",content:a}});continue}if("system.message"===p){e.push({type:"system",...u(l,o,n,b),raw:l});continue}if("assistant.message"===p){let a=q.content??"";if(!a){e.push({type:"system",...u(l,o,n,b),raw:l});continue}let c=[{type:"text",text:a}];e.push({type:"assistant",...u(l,o,n,b),message:{role:"assistant",content:c}});continue}if("tool.execution_start"===p){let a=q.toolCallId,c=q.toolName??"tool",d=q.arguments??{},f={type:"tool_use",id:a??`${n.getTime()}-${c}`,name:c,input:d},i={type:"assistant",...u(l,o,n,b),message:{role:"assistant",content:[f]}};e.push(i),a&&(g.set(a,f),h.set(a,n.getTime()));continue}if("tool.execution_complete"===p){let a=q.toolCallId,c=a?g.get(a):void 0;if(c){let b=h.get(a)??n.getTime(),d=q.result??{},e=q.toolTelemetry??{},f=e.metrics?.commandTimeMs??e.metrics?.durationMs??null,g="number"==typeof f&&f>=0?f:Math.max(0,n.getTime()-b),i=d.detailedContent??d.content??"";c.result={timestamp:o,timestampFormatted:t(n),content:"string"==typeof i?i:JSON.stringify(i),durationMs:g,durationFormatted:s(g)};continue}e.push({type:"system",...u(l,o,n,b),raw:l});continue}e.push({type:"system",...u(l,o,n,b),raw:l})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function M(a){let b,c,d=(c=K(a,"events.jsonl"))&&(0,y.existsSync)(c)?c:null;if(!d)return null;try{b=await (0,z.readFile)(d,"utf-8")}catch{return null}let{entries:e,rawLines:f,cwd:g}=await L(b,"session");return{entries:e,rawLines:f,cwd:g??function(a){let b,c=(b=K(a,"workspace.yaml"))&&(0,y.existsSync)(b)?b:null;if(c)try{let a=(0,y.readFileSync)(c,"utf-8"),b=RegExp("^cwd\\s*:\\s*(.+?)\\s*$","m"),d=a.match(b);if(!d)return;return d[1].replace(/^['"]|['"]$/g,"")}catch{return}}(a),filePath:d}}let N=(0,p.runtimeCache)(a=>M(a),60,{maxSize:50}),O=["agent-sessions","conversations","sessions"],P=["events.jsonl","transcript.jsonl","messages.jsonl"],Q="agent-transcripts";async function R(a,b="session"){let c,d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=new Map,h=new Map,i=!1,j=Date.now();for(let a=0;a<d.length;a++){let k;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let l=d[a];try{k=JSON.parse(l)}catch{continue}let m={...k,_source:b};if(f.push(m),!k.type&&k.role&&k.message?.content){let c=new Date(j+a),d=c.toISOString(),f=k.message.content.filter(a=>a?.type==="text"&&"string"==typeof a.text).map(a=>a.text).join("");if("user"===k.role){let a=/<user_query>\s*([\s\S]*?)\s*<\/user_query>/.exec(f),g=a?a[1]:f;g&&e.push({type:"user",...u(m,d,c,b),message:{role:"user",content:g}});continue}if("assistant"===k.role){let a=f?[{type:"text",text:f}]:[];0===a.length?e.push({type:"system",...u(m,d,c,b),raw:m}):e.push({type:"assistant",...u(m,d,c,b),message:{role:"assistant",content:a}});continue}e.push({type:"system",...u(m,d,c,b),raw:m});continue}let n=k.timestamp;if(!n)continue;let o=new Date(n);if(Number.isNaN(o.getTime()))continue;let p=o.toISOString(),q=k.type,r=k.data??{};if("session.start"===q||"sessionStart"===q||"session_start"===q){let a=r.context??r,d=a.cwd;"string"!=typeof d||c||(c=d),!c&&Array.isArray(a.workspace_roots)&&"string"==typeof a.workspace_roots[0]&&(c=a.workspace_roots[0]);let f=i?"Session Resumed":"Session Started";i=!0,e.push({type:"queue-operation",...u(m,p,o,b),label:f});continue}if("user.message"===q||"userMessage"===q){let a="string"==typeof r.content?r.content:"string"==typeof r.text?r.text:"";if(!a)continue;e.push({type:"user",...u(m,p,o,b),message:{role:"user",content:a}});continue}if("system.message"===q||"systemMessage"===q){e.push({type:"system",...u(m,p,o,b),raw:m});continue}if("assistant.message"===q||"assistantMessage"===q){let a="string"==typeof r.content?r.content:"string"==typeof r.text?r.text:"";if(!a){e.push({type:"system",...u(m,p,o,b),raw:m});continue}let c=[{type:"text",text:a}];e.push({type:"assistant",...u(m,p,o,b),message:{role:"assistant",content:c}});continue}if("tool.execution_start"===q||"tool.executionStart"===q||"preToolUse"===q){let a=r.toolCallId??r.tool_use_id,c=r.toolName??r.tool_name??"tool",d=r.arguments??r.tool_input??{},f={type:"tool_use",id:a??`${o.getTime()}-${c}`,name:c,input:d},i={type:"assistant",...u(m,p,o,b),message:{role:"assistant",content:[f]}};e.push(i),a&&(g.set(a,f),h.set(a,o.getTime()));continue}if("tool.execution_complete"===q||"tool.executionComplete"===q||"postToolUse"===q){let a=r.toolCallId??r.tool_use_id,c=a?g.get(a):void 0;if(c){let b=h.get(a)??o.getTime(),d=r.result??{},e=r.duration,f="number"==typeof e&&e>=0?e:Math.max(0,o.getTime()-b),g=d.detailedContent??d.content??r.tool_output??"";c.result={timestamp:p,timestampFormatted:t(o),content:"string"==typeof g?g:JSON.stringify(g),durationMs:f,durationFormatted:s(f)};continue}e.push({type:"system",...u(m,p,o,b),raw:m});continue}e.push({type:"system",...u(m,p,o,b),raw:m})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function S(a){let b,c=function(a){let b=function(a){if(!a)return null;let b=(0,A.resolve)(process.env.CURSOR_HOME||(0,A.join)((0,B.homedir)(),".cursor")),c=(0,A.resolve)(b,"projects"),d=[];try{d=(0,y.readdirSync)(c,{withFileTypes:!0})}catch{}for(let b of d){if(!b.isDirectory())continue;let d=(0,A.resolve)(c,b.name,Q,a),e=(0,A.resolve)(c,b.name,Q);if(d!==e&&d.startsWith(`${e}${A.sep}`)&&(0,y.existsSync)(d))return d}for(let c of O){let d=(0,A.resolve)(b,c),e=(0,A.resolve)(d,a);if(e!==d&&e.startsWith(`${d}${A.sep}`)&&(0,y.existsSync)(e))return e}return null}(a);if(!b)return null;let c=(0,A.join)(b,`${(0,A.basename)(b)}.jsonl`);if((0,y.existsSync)(c))return c;for(let a of P){let c=(0,A.join)(b,a);if((0,y.existsSync)(c))return c}return null}(a);if(!c)return null;try{b=await (0,z.readFile)(c,"utf-8")}catch{return null}let{entries:d,rawLines:e,cwd:f}=await R(b,"session");return{entries:d,rawLines:e,cwd:f,filePath:c}}let T=(0,p.runtimeCache)(a=>S(a),60,{maxSize:50});var U=a.i(74533);function V(a){try{let b=(0,U.execFileSync)("opencode",["db","--format","json",a],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]});if(!b.trim())return[];let c=JSON.parse(b);if(!Array.isArray(c))return null;return c}catch{return null}}function W(a){return!!a&&"object"==typeof a&&!Array.isArray(a)}function X(a){if("string"!=typeof a||0===a.length)return null;try{let b=JSON.parse(a);return W(b)?b:null}catch{return null}}async function Y(a){if(!a||!/^[A-Za-z0-9_-]+$/.test(a))return null;let b=V(`SELECT id, project_id, slug, directory, title, time_created, time_updated FROM session WHERE id = '${a}'`);if(!b||0===b.length)return null;let c=b[0],d=V(`SELECT id, session_id, time_created, time_updated, data FROM message WHERE session_id = '${a}' ORDER BY time_created ASC`),e=V(`SELECT id, message_id, session_id, time_created, time_updated, data FROM part WHERE session_id = '${a}' ORDER BY time_created ASC`);if(!d)return{entries:[],rawLines:[],cwd:c.directory??void 0,filePath:`opencode://${a}`};let f=new Map;for(let a of e??[]){let b=f.get(a.message_id);b||(b=[],f.set(a.message_id,b)),b.push(a)}let g=[],h=[];for(let a of d){let b=f.get(a.id)??[];g.push(function(a,b,c){let d=X(a.data)??{},e="string"==typeof d.role?d.role:"system",f=new Date(a.time_created),g=f.toISOString(),h=u({uuid:a.id,parentUuid:null},g,f,c),i=[],j="";for(let a of b){let b=X(a.data);if(!b)continue;let c="string"==typeof b.type?b.type:"unknown";if("text"===c){let a="string"==typeof b.text?b.text:"string"==typeof b.content?b.content:"";a&&(i.push({type:"text",text:a}),j+=(j?"\n":"")+a);continue}if("tool"===c){let c="string"==typeof b.tool?b.tool:"string"==typeof b.name?b.name:"tool",d=W(b.state)?b.state:null,e=d&&W(d.input)?d.input:W(b.input)?b.input:W(b.args)?b.args:{},f={type:"tool_use",id:a.id,name:c,input:e},g=d&&"string"==typeof d.status?d.status:"";if(d&&("completed"===g||"error"===g)){let b=("error"===g&&"string"==typeof d.error?d.error:null)??d.output,c="string"==typeof b?b:null!=b?JSON.stringify(b):"",e=W(d.time)?d.time:{},h="number"==typeof e.start?e.start:a.time_created,i="number"==typeof e.end?e.end:a.time_updated,j=Math.max(0,i-h),k=new Date(i);f.result={timestamp:k.toISOString(),timestampFormatted:t(k),content:c,durationMs:j,durationFormatted:s(j)}}i.push(f);continue}i.push({type:"text",text:`[opencode ${c}]`})}if("user"===e)return{...h,type:"user",message:{role:"user",content:j}};if("assistant"===e){let a=W(d.model)?d.model:null,b=a&&"string"==typeof a.modelID?a.modelID:void 0;return{...h,type:"assistant",message:{role:"assistant",content:i,model:b}}}return{...h,type:"system",raw:{id:a.id,role:e,parts:i}}}(a,b,"session"));let c=X(a.data);h.push({id:a.id,session_id:a.session_id,time_created:a.time_created,data:c??a.data})}return{entries:g,rawLines:h,cwd:c.directory??void 0,filePath:`opencode://${a}`}}let Z=(0,p.runtimeCache)(a=>Y(a),30,{maxSize:50}),$=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,_=/^[\d-]+T[\d-]+Z_([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/i;async function aa(a,b="session"){let c,d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=!1;for(let a=0;a<d.length;a++){let h;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let i=d[a];try{h=JSON.parse(i)}catch{continue}let j={...h,_source:b};f.push(j);let k=h.timestamp;if(!k)continue;let l=new Date(k);if(Number.isNaN(l.getTime()))continue;let m=l.toISOString(),n=h.type;if("session"===n){"string"!=typeof h.cwd||c||(c=h.cwd);let a=g?"Session Resumed":"Session Started";g=!0,e.push({type:"queue-operation",...u(j,m,l,b),label:a});continue}if("message"===n&&h.message&&"object"==typeof h.message){let a=h.message.role,c=h.message.content;if("user"===a){let a=function(a){if(!Array.isArray(a))return"";let b=[];for(let c of a)c?.type==="text"&&"string"==typeof c.text&&b.push(c.text);return b.join("\n\n")}(c);if(!a)continue;e.push({type:"user",...u(j,m,l,b),message:{role:"user",content:a}});continue}if("assistant"===a){let a=function(a){if(!Array.isArray(a))return[];let b=[];for(let c of a)c?.type==="text"&&"string"==typeof c.text&&c.text.length>0&&b.push({type:"text",text:c.text}),c?.type==="thinking"&&"string"==typeof c.thinking&&c.thinking.length>0&&b.push({type:"text",text:`[thinking] ${c.thinking}`});return b}(c);if(0===a.length){e.push({type:"system",...u(j,m,l,b),raw:j});continue}e.push({type:"assistant",...u(j,m,l,b),message:{role:"assistant",content:a}});continue}e.push({type:"system",...u(j,m,l,b),raw:j});continue}e.push({type:"system",...u(j,m,l,b),raw:j})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function ab(a){let b,c,d=function(a){let b;if(!$.test(a))return null;let c=(0,A.resolve)(process.env.PI_SESSIONS_DIR||(0,A.join)((0,B.homedir)(),".pi","agent","sessions"));try{b=(0,y.readdirSync)(c)}catch{return null}for(let d of b){let b,e=(0,A.resolve)(c,d);if(e.startsWith(`${c}${A.sep}`)){try{b=(0,y.readdirSync)(e)}catch{continue}for(let c of b){let b=_.exec(c);if(!b||b[1].toLowerCase()!==a.toLowerCase())continue;let d=(0,A.resolve)(e,c);if(d.startsWith(`${e}${A.sep}`)&&(0,y.existsSync)(d))return d}}}return null}(a);if(!d)return null;try{b=await (0,z.readFile)(d,"utf-8")}catch{return null}try{c=await aa(b,"session")}catch{return null}return{entries:c.entries,rawLines:c.rawLines,cwd:c.cwd,filePath:d}}let ac=(0,p.runtimeCache)(a=>ab(a),60,{maxSize:50}),ad=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,ae=/^session-(.+)-([0-9a-f]{8})\.jsonl$/i;async function af(a,b="session",c){let d=a.split("\n").filter(a=>""!==a.trim()),e=[],f=[],g=!1;for(let a=0;a<d.length;a++){let c;a>0&&a%200==0&&await new Promise(a=>setImmediate(a));let h=d[a];try{c=JSON.parse(h)}catch{continue}let i={...c,_source:b};if(f.push(i),"string"==typeof c.sessionId&&"string"==typeof c.startTime){let a=new Date(c.startTime);if(!Number.isNaN(a.getTime())){let c=g?"Session Resumed":"Session Started";g=!0,e.push({type:"queue-operation",...u(i,a.toISOString(),a,b),label:c})}continue}if(c.$set)continue;let j=c.timestamp;if(!j)continue;let k=new Date(j);if(Number.isNaN(k.getTime()))continue;let l=k.toISOString(),m=c.type;if("user"===m){let a=function(a){if(!Array.isArray(a))return"";let b=[];for(let c of a)"string"==typeof c?.text&&b.push(c.text);return b.join("\n\n")}(c.content);if(!a)continue;e.push({type:"user",...u(i,l,k,b),message:{role:"user",content:a}});continue}if("assistant"===m||"model"===m){let a=function(a){if(!Array.isArray(a))return[];let b=[];for(let c of a)"string"==typeof c?.text&&c.text.length>0&&b.push({type:"text",text:c.text});return b}(c.content);if(0===a.length){e.push({type:"system",...u(i,l,k,b),raw:i});continue}e.push({type:"assistant",...u(i,l,k,b),message:{role:"assistant",content:a}});continue}e.push({type:"system",...u(i,l,k,b),raw:i})}return e.length>500&&await new Promise(a=>setImmediate(a)),e.sort((a,b)=>a.timestampMs-b.timestampMs),{entries:e,rawLines:f,cwd:c}}async function ag(a){let b,c,d=function(a){let b;if(!ad.test(a))return null;let c=(0,A.resolve)(process.env.GEMINI_SESSIONS_DIR||(0,A.join)((0,B.homedir)(),".gemini","tmp")),d=a.slice(0,8).toLowerCase();try{b=(0,y.readdirSync)(c)}catch{return null}for(let e of b){let b,f=(0,A.resolve)(c,e);if(!f.startsWith(`${c}${A.sep}`))continue;let g=(0,A.resolve)(f,"chats");try{b=(0,y.readdirSync)(g)}catch{continue}for(let c of b){let b=ae.exec(c);if(!b||b[2].toLowerCase()!==d)continue;let e=(0,A.resolve)(g,c);if(!e.startsWith(`${g}${A.sep}`)||!(0,y.existsSync)(e))continue;let f=function(a){let b;try{b=(0,y.openSync)(a,"r")}catch{return null}try{let a=Buffer.alloc(4096),c=(0,y.readSync)(b,a,0,a.length,0);if(0===c)return null;let d=a.subarray(0,c).toString("utf-8"),e=d.indexOf("\n");return e>=0?d.slice(0,e):d}catch{return null}finally{try{(0,y.closeSync)(b)}catch{}}}(e);if(f)try{let b=JSON.parse(f);if("string"==typeof b.sessionId&&b.sessionId.toLowerCase()===a.toLowerCase())return e}catch{continue}}}return null}(a);if(!d)return null;try{b=await (0,z.readFile)(d,"utf-8")}catch{return null}let e=function(a){let b=(0,A.resolve)(a,".."),c=(0,A.resolve)(b,".."),d=(0,A.join)(c,".project_root");try{let a=(0,y.readFileSync)(d,"utf-8").trim();return a.length>0?a:void 0}catch{return}}(d);try{c=await af(b,"session",e)}catch{return null}return{entries:c.entries,rawLines:c.rawLines,cwd:c.cwd,filePath:d}}let ah=(0,p.runtimeCache)(a=>ag(a),60,{maxSize:50});var ai=a.i(71130),aj=a.i(893),ak=a.i(24282);function al({cli:a}){let c=(0,ak.getCliLabel)(a),d=(0,ak.getCliBadgeClasses)(a);return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-mono font-medium uppercase tracking-wider border ${d}`,title:`Agent CLI: ${c}`,children:c})}async function am({params:a}){let d,e,{name:f,sessionId:g}=await a;try{(0,n.resolveProjectPath)(f)}catch{(0,j.notFound)()}let k=(0,m.decodeFolderName)(f),l=-1===(e=g.indexOf("/"))?g:g.slice(0,e);n.UUID_RE.test(l)||/^ses_[A-Za-z0-9]+$/.test(l)||(0,j.notFound)();let o=null,p=null,q=null,r="claude";try{let a=await x(f,l);o=a.entries,p=a.rawLines}catch(a){if("ENOENT"===a.code){let a=await J(l);if(a)o=a.entries,p=a.rawLines,d=a.cwd,r="codex";else{let a=await N(l);if(a)o=a.entries,p=a.rawLines,d=a.cwd,r="copilot";else{let a=await T(l);if(a)o=a.entries,p=a.rawLines,d=a.cwd,r="cursor";else{let a=await Z(l);if(a)o=a.entries,p=a.rawLines,d=a.cwd,r="opencode";else{let a=await ac(l);if(a)o=a.entries,p=a.rawLines,d=a.cwd,r="pi";else{let a=await ah(l);a?(o=a.entries,p=a.rawLines,d=a.cwd,r="gemini"):q="Session log file not found."}}}}}}else q="Failed to read session log."}let s="claude"!==r,t="codex"===r?`OpenAI Codex${d?` \xb7 ${d}`:""}`:"copilot"===r?`GitHub Copilot${d?` \xb7 ${d}`:""}`:"cursor"===r?`Cursor Agent${d?` \xb7 ${d}`:""}`:"opencode"===r?`OpenCode${d?` \xb7 ${d}`:""}`:"pi"===r?`Pi${d?` \xb7 ${d}`:""}`:"gemini"===r?`Gemini CLI${d?` \xb7 ${d}`:""}`:k;return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsxs)("div",{className:"container mx-auto p-8",children:[(0,b.jsxs)(c.default,{href:s?"/policies?tab=activity":`/project/${encodeURIComponent(f)}`,className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[(0,b.jsx)(h,{className:"w-4 h-4"}),(0,b.jsx)("span",{children:s?"Back to Activity":"Back to Sessions"})]}),(0,b.jsxs)("div",{className:"mb-8",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-2",children:[(0,b.jsx)("h1",{className:"text-4xl font-bold text-foreground",children:"Session Log"}),(0,b.jsx)(al,{cli:r})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsxs)("p",{className:"text-muted-foreground",children:[(0,b.jsxs)("span",{className:"font-medium",children:[s?"CLI":"Project",":"]})," ",t]}),(0,b.jsxs)("p",{className:"text-muted-foreground break-words break-all inline-flex items-center gap-1",children:[(0,b.jsx)("span",{className:"font-medium",children:"Session:"})," ",l,(0,b.jsx)(aj.CopyButton,{text:l})]}),o&&p&&(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("p",{className:"text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-medium",children:p.length})," log lines"]}),(0,b.jsxs)("a",{href:`/api/download/${encodeURIComponent(f)}/${encodeURIComponent(l)}?cli=${r}`,download:!0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-md bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground transition-colors",children:[(0,b.jsx)(i,{className:"w-4 h-4"}),"Download Logs"]})]})]})]}),q&&(0,b.jsx)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm",children:(0,b.jsx)("p",{className:"text-destructive text-center py-8",children:q})}),!q&&o&&(0,b.jsx)(ai.default,{entries:o,projectName:s?d??("codex"===r?"OpenAI Codex":"copilot"===r?"GitHub Copilot":"cursor"===r?"Cursor Agent":"opencode"===r?"OpenCode":"pi"===r?"Pi":"Gemini CLI"):k,sessionId:l})]})})}a.s(["default",0,am,"dynamic",0,"force-dynamic"],41190)},87330,a=>{a.n(a.i(41190))}];
2
+
3
+ //# sourceMappingURL=_11_p9y8._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[85650,52562,a=>{"use strict";var b=a.i(64831);let c=(0,b.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",0,c],85650);let d=(0,b.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["Check",0,d],52562)},24121,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(85650),e=a.i(52562),f=a.i(97895);function g(a){let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b);try{return b.select(),document.execCommand("copy")}finally{document.body.removeChild(b)}}a.s(["CopyButton",0,function({text:a,className:h}){let[i,j]=(0,c.useState)(!1),k=(0,c.useCallback)(async()=>{try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(a);else if(!g(a))throw Error("Both clipboard methods failed");j(!0),setTimeout(()=>j(!1),2e3)}catch(b){console.error("Failed to copy to clipboard:",b);try{g(a)&&(j(!0),setTimeout(()=>j(!1),2e3))}catch{}}},[a]);return(0,b.jsx)("button",{onClick:k,title:"Copy to clipboard",className:(0,f.cn)("inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors",h),children:i?(0,b.jsx)(e.Check,{className:"w-3.5 h-3.5 text-green-500"}):(0,b.jsx)(d.Copy,{className:"w-3.5 h-3.5"})})}])},33354,(a,b,c)=>{"use strict";c._=function(a){return a&&a.__esModule?a:{default:a}}},32245,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"BailoutToCSR",{enumerable:!0,get:function(){return e}});let d=a.r(41997);function e({reason:a,children:b}){throw Object.defineProperty(new d.BailoutToCSRError(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}},7773,(a,b,c)=>{"use strict";function d(a){return a.split("/").map(a=>encodeURIComponent(a)).join("/")}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"encodeURIPath",{enumerable:!0,get:function(){return d}})},97458,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"PreloadChunks",{enumerable:!0,get:function(){return i}});let d=a.r(87924),e=a.r(35112),f=a.r(56704),g=a.r(7773),h=a.r(68063);function i({moduleIds:a}){let b=f.workAsyncStorage.getStore();if(void 0===b)return null;let c=[];if(b.reactLoadableManifest&&a){let d=b.reactLoadableManifest;for(let b of a){if(!d[b])continue;let a=d[b].files;c.push(...a)}}if(0===c.length)return null;let j=(0,h.getAssetTokenQuery)();return(0,d.jsx)(d.Fragment,{children:c.map(a=>{let c=`${b.assetPrefix}/_next/${(0,g.encodeURIPath)(a)}${j}`;return a.endsWith(".css")?(0,d.jsx)("link",{precedence:"dynamic",href:c,rel:"stylesheet",as:"style",nonce:b.nonce},a):((0,e.preload)(c,{as:"script",fetchPriority:"low",nonce:b.nonce}),null)})})}},69853,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return j}});let d=a.r(87924),e=a.r(72131),f=a.r(32245),g=a.r(97458);function h(a){return{default:a&&"default"in a?a.default:a}}let i={loader:()=>Promise.resolve(h(()=>null)),loading:null,ssr:!0},j=function(a){let b={...i,...a},c=(0,e.lazy)(()=>b.loader().then(h)),j=b.loading;function k(a){let h=j?(0,d.jsx)(j,{isLoading:!0,pastDelay:!0,error:null}):null,i=!b.ssr||!!b.loading,k=i?e.Suspense:e.Fragment,l=b.ssr?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.PreloadChunks,{moduleIds:b.modules}),(0,d.jsx)(c,{...a})]}):(0,d.jsx)(f.BailoutToCSR,{reason:"next/dynamic",children:(0,d.jsx)(c,{...a})});return(0,d.jsx)(k,{...i?{fallback:h}:{},children:l})}return k.displayName="LoadableComponent",k}},19721,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return e}});let d=a.r(33354)._(a.r(69853));function e(a,b){let c={};"function"==typeof a&&(c.loader=a);let e={...c,...b};return(0,d.default)({...e,modules:e.loadableGenerated?.modules})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},94092,a=>{"use strict";var b=a.i(87924);let c=(0,a.i(19721).default)(async()=>{},{loadableGenerated:{modules:[5780]},ssr:!1,loading:()=>(0,b.jsx)("div",{className:"bg-card border border-border rounded-lg p-4 shadow-sm",children:(0,b.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,b.jsx)("div",{className:"animate-pulse text-muted-foreground",children:"Loading log viewer..."})})})});a.s(["default",0,function({entries:a,projectName:d,sessionId:e}){return(0,b.jsx)(c,{entries:a,projectName:d,sessionId:e})}])}];
2
2
 
3
- //# sourceMappingURL=_0xb8ngh._.js.map
3
+ //# sourceMappingURL=_1kje4fm._.js.map