failproofai 1.0.1-beta.1 → 1.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1222) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +6 -6
  3. package/.next/standalone/.next/prerender-manifest.json +6 -6
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +3 -3
  6. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page.js +2 -2
  8. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  12. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
  13. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  14. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +3 -3
  16. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
  18. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
  22. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
  23. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +14 -14
  24. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  25. package/.next/standalone/.next/server/app/api/audit/invite/route.js +3 -2
  26. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/audit/run/route.js +5 -4
  28. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/auth/login-request/route.js +3 -3
  31. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js +4 -3
  33. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/auth/logout/route.js +4 -4
  35. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/auth/status/route.js +4 -4
  37. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +1 -1
  39. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/audit/page/build-manifest.json +3 -3
  41. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  42. package/.next/standalone/.next/server/app/audit/page.js +3 -3
  43. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/index.html +1 -1
  46. package/.next/standalone/.next/server/app/index.rsc +15 -15
  47. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +14 -14
  48. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  49. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  50. package/.next/standalone/.next/server/app/page/build-manifest.json +3 -3
  51. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  52. package/.next/standalone/.next/server/app/page.js +2 -2
  53. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/policies/page/build-manifest.json +3 -3
  56. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +66 -22
  57. package/.next/standalone/.next/server/app/policies/page.js +5 -4
  58. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +3 -3
  61. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  62. package/.next/standalone/.next/server/app/project/[name]/page.js +3 -3
  63. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +3 -3
  66. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  67. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  68. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +4 -4
  69. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/projects/page/build-manifest.json +3 -3
  72. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  73. package/.next/standalone/.next/server/app/projects/page.js +3 -3
  74. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/settings/page/build-manifest.json +3 -3
  77. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
  78. package/.next/standalone/.next/server/app/settings/page.js +2 -2
  79. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/chunks/{[externals]__1qzqcio._.js → [externals]__0e32-7c._.js} +1 -1
  82. package/.next/standalone/.next/server/chunks/[externals]__1s462yl._.js +3 -0
  83. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01eqny5._.js +3 -0
  84. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_0xu5z._.js +1 -1
  85. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1p8poxd._.js → [root-of-the-server]__0igxt32._.js} +2 -2
  86. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0neqlu-._.js +3 -0
  87. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +3 -0
  88. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t9oqnn._.js +3 -0
  89. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1adacul._.js +5 -5
  90. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ny9q5d._.js → [root-of-the-server]__1l-khtb._.js} +1 -1
  91. package/.next/standalone/.next/server/chunks/_0bs-v8p._.js +3 -0
  92. package/.next/standalone/.next/server/chunks/_0tovk6q._.js +3 -0
  93. package/.next/standalone/.next/server/chunks/_0trp3yc._.js +3 -0
  94. package/.next/standalone/.next/server/chunks/_185gyk9._.js +3 -0
  95. package/.next/standalone/.next/server/chunks/_1ek68ln._.js +5 -6
  96. package/.next/standalone/.next/server/chunks/_1vslkoe._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/lib_telemetry-id_ts_1k8gj9o._.js +3 -0
  98. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oi._.js +2 -2
  99. package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_0f-x2b0._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_04op_ou._.js} +1 -1
  100. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p7._.js +2 -2
  101. package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_0hwvl7e._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dr20uz._.js} +1 -1
  102. package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_1ctjdzl._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_0el6rg8._.js} +1 -1
  103. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
  104. package/.next/standalone/.next/server/chunks/src_hooks_0xbw3bu._.js +12 -0
  105. package/.next/standalone/.next/server/chunks/src_hooks_fp-home_ts_09kv0bn._.js +1 -1
  106. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +4 -0
  107. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +4 -0
  108. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +4 -0
  109. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0spkm68._.js → [root-of-the-server]__07gm3zl._.js} +21 -20
  110. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cxe_2_._.js +2 -2
  111. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +4 -0
  112. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +4 -0
  113. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__15c_z97._.js → [root-of-the-server]__0jzbk4_._.js} +1 -1
  114. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
  115. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +4 -0
  116. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +6 -0
  117. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zig5sv._.js +3 -0
  118. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__192nhvh._.js +5 -0
  119. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07oh8b5._.js → [root-of-the-server]__1ctpynv._.js} +1 -1
  120. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__11z_299._.js → [root-of-the-server]__1m84s36._.js} +1 -1
  121. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +4 -0
  122. package/.next/standalone/.next/server/chunks/ssr/_00e9tnf._.js +23 -0
  123. package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
  124. package/.next/standalone/.next/server/chunks/ssr/{_04j57fb._.js → _0h_douw._.js} +1 -1
  125. package/.next/standalone/.next/server/chunks/ssr/{_0qk91ba._.js → _12l4a_k._.js} +1 -1
  126. package/.next/standalone/.next/server/chunks/ssr/_1_ozgif._.js +1 -1
  127. package/.next/standalone/.next/server/chunks/ssr/{_0hom1s1._.js → _1u8-lu2._.js} +2 -2
  128. package/.next/standalone/.next/server/chunks/ssr/{_1q7j05x._.js → _1zopuov._.js} +2 -2
  129. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +13 -13
  130. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
  131. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +2 -2
  132. package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +1 -1
  133. package/.next/standalone/.next/server/chunks/ssr/node_modules_13n822a._.js +3 -0
  134. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js +1 -1
  135. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1v8aef8._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js +2 -2
  137. package/.next/standalone/.next/server/chunks/ssr/src_hooks_08o7bqo._.js +10 -0
  138. package/.next/standalone/.next/server/chunks/ssr/src_hooks_builtin-policies_ts_09j2ndl._.js +1 -1
  139. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +1 -1
  140. package/.next/standalone/.next/server/middleware-build-manifest.js +6 -6
  141. package/.next/standalone/.next/server/middleware.js +1 -1
  142. package/.next/standalone/.next/server/pages/404.html +1 -1
  143. package/.next/standalone/.next/server/pages/500.html +1 -1
  144. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  145. package/.next/standalone/.next/server/server-reference-manifest.json +71 -27
  146. package/.next/standalone/.next/static/chunks/{01b0vu6t3wtfh.js → 0eqky-7n7dgdm.js} +1 -1
  147. package/.next/standalone/.next/static/chunks/{1x9238y5kw9vi.js → 0sa9v5mhc8861.js} +13 -13
  148. package/.next/standalone/.next/static/chunks/1mfzsja6ftim5.css +2 -0
  149. package/.next/standalone/.next/static/chunks/{1cn6xl9lfp3ei.js → 1nuqytbta44af.js} +1 -1
  150. package/.next/standalone/.next/static/chunks/1oml7c7env4-g.js +31 -0
  151. package/.next/standalone/.next/static/chunks/1sl2xmn9inx3y.js +6 -0
  152. package/.next/standalone/.next/static/chunks/1za08zjcctyil.js +22 -0
  153. package/.next/standalone/.next/static/chunks/{25c48grb44a-n.js → 2aawsjld9ied_.js} +1 -1
  154. package/.next/standalone/.next/static/chunks/2gn7ut4svofm2.js +1 -0
  155. package/.next/standalone/.next/static/chunks/{1e_2h_-zvxnke.js → 2hs7ycvsav7v2.js} +1 -1
  156. package/.next/standalone/.next/static/chunks/{2hhselnqeo4ll.js → 2i2yt3hzjredm.js} +1 -1
  157. package/.next/standalone/.next/static/chunks/{0w-2enf8raksk.js → 35xg6retpe6rp.js} +1 -1
  158. package/.next/standalone/.next/static/chunks/{28bdm54bngvc7.js → 3y54nw0i7dsjl.js} +1 -1
  159. package/.next/standalone/.next/static/chunks/{turbopack-0-gxz80mjds94.js → turbopack-3kjgdgwci4tqf.js} +1 -1
  160. package/.next/standalone/SECURITY.md +5 -4
  161. package/.next/standalone/app/actions/get-hooks-config.ts +108 -17
  162. package/.next/standalone/app/actions/pack-actions.ts +153 -0
  163. package/.next/standalone/app/audit/_components/run-progress.tsx +1 -1
  164. package/.next/standalone/app/audit/_components/share-templates.ts +13 -13
  165. package/.next/standalone/app/policies/hooks-client.tsx +320 -14
  166. package/.next/standalone/components/navbar.tsx +2 -28
  167. package/.next/standalone/components/reach-developers.tsx +8 -1
  168. package/.next/standalone/docs-old/agenteye/alerts.mdx +63 -0
  169. package/.next/standalone/docs-old/agenteye/api-keys.mdx +280 -0
  170. package/.next/standalone/docs-old/agenteye/assistant.mdx +63 -0
  171. package/.next/standalone/docs-old/agenteye/audits.mdx +54 -0
  172. package/.next/standalone/docs-old/agenteye/cli-and-agents.mdx +80 -0
  173. package/.next/standalone/docs-old/agenteye/cli-recipes.mdx +179 -0
  174. package/.next/standalone/docs-old/agenteye/cli-skill.mdx +159 -0
  175. package/.next/standalone/docs-old/agenteye/cli.mdx +350 -0
  176. package/.next/standalone/docs-old/agenteye/codex-capture.mdx +55 -0
  177. package/.next/standalone/docs-old/agenteye/concepts.mdx +87 -0
  178. package/.next/standalone/docs-old/agenteye/dashboards.mdx +46 -0
  179. package/.next/standalone/docs-old/agenteye/error-tracking.mdx +41 -0
  180. package/.next/standalone/docs-old/agenteye/evaluation-suite.mdx +402 -0
  181. package/.next/standalone/docs-old/agenteye/evaluations.mdx +51 -0
  182. package/.next/standalone/docs-old/agenteye/evaluator-skill.mdx +167 -0
  183. package/.next/standalone/docs-old/agenteye/event-stream.mdx +50 -0
  184. package/.next/standalone/docs-old/agenteye/hermes-capture.mdx +53 -0
  185. package/.next/standalone/docs-old/agenteye/images/alert-new.png +0 -0
  186. package/.next/standalone/docs-old/agenteye/images/alerts.png +0 -0
  187. package/.next/standalone/docs-old/agenteye/images/api-keys.png +0 -0
  188. package/.next/standalone/docs-old/agenteye/images/assistant.png +0 -0
  189. package/.next/standalone/docs-old/agenteye/images/audits.png +0 -0
  190. package/.next/standalone/docs-old/agenteye/images/dashboard-fleet.png +0 -0
  191. package/.next/standalone/docs-old/agenteye/images/dashboard-quality.png +0 -0
  192. package/.next/standalone/docs-old/agenteye/images/errors.png +0 -0
  193. package/.next/standalone/docs-old/agenteye/images/events-stream.png +0 -0
  194. package/.next/standalone/docs-old/agenteye/images/hooks.png +0 -0
  195. package/.next/standalone/docs-old/agenteye/images/incident-detail.png +0 -0
  196. package/.next/standalone/docs-old/agenteye/images/incidents.png +0 -0
  197. package/.next/standalone/docs-old/agenteye/images/login.png +0 -0
  198. package/.next/standalone/docs-old/agenteye/images/models.png +0 -0
  199. package/.next/standalone/docs-old/agenteye/images/queries.png +0 -0
  200. package/.next/standalone/docs-old/agenteye/images/query-lab.png +0 -0
  201. package/.next/standalone/docs-old/agenteye/images/session-detail.png +0 -0
  202. package/.next/standalone/docs-old/agenteye/images/sessions-list.png +0 -0
  203. package/.next/standalone/docs-old/agenteye/images/settings.png +0 -0
  204. package/.next/standalone/docs-old/agenteye/images/tools.png +0 -0
  205. package/.next/standalone/docs-old/agenteye/images/users.png +0 -0
  206. package/.next/standalone/docs-old/agenteye/images/video-audit.jpg +0 -0
  207. package/.next/standalone/docs-old/agenteye/images/video-tracing.jpg +0 -0
  208. package/.next/standalone/docs-old/agenteye/incidents.mdx +50 -0
  209. package/.next/standalone/docs-old/agenteye/observability.mdx +23 -0
  210. package/.next/standalone/docs-old/agenteye/openclaw-capture.mdx +49 -0
  211. package/.next/standalone/docs-old/agenteye/overview.mdx +108 -0
  212. package/.next/standalone/docs-old/agenteye/python-sdk-skill.mdx +131 -0
  213. package/.next/standalone/docs-old/agenteye/python-sdk.mdx +460 -0
  214. package/.next/standalone/docs-old/agenteye/queries.mdx +56 -0
  215. package/.next/standalone/docs-old/agenteye/security.mdx +68 -0
  216. package/.next/standalone/docs-old/agenteye/sessions.mdx +57 -0
  217. package/.next/standalone/docs-old/agenteye/telemetry.mdx +52 -0
  218. package/.next/standalone/docs-old/ar/agenteye/alerts.mdx +63 -0
  219. package/.next/standalone/docs-old/ar/agenteye/api-keys.mdx +279 -0
  220. package/.next/standalone/docs-old/ar/agenteye/assistant.mdx +62 -0
  221. package/.next/standalone/docs-old/ar/agenteye/audits.mdx +55 -0
  222. package/.next/standalone/docs-old/ar/agenteye/cli-and-agents.mdx +81 -0
  223. package/.next/standalone/docs-old/ar/agenteye/cli-recipes.mdx +178 -0
  224. package/.next/standalone/docs-old/ar/agenteye/cli-skill.mdx +160 -0
  225. package/.next/standalone/docs-old/ar/agenteye/cli.mdx +349 -0
  226. package/.next/standalone/docs-old/ar/agenteye/codex-capture.mdx +56 -0
  227. package/.next/standalone/docs-old/ar/agenteye/concepts.mdx +88 -0
  228. package/.next/standalone/docs-old/ar/agenteye/dashboards.mdx +46 -0
  229. package/.next/standalone/docs-old/ar/agenteye/error-tracking.mdx +41 -0
  230. package/.next/standalone/docs-old/ar/agenteye/evaluation-suite.mdx +299 -0
  231. package/.next/standalone/docs-old/ar/agenteye/evaluations.mdx +51 -0
  232. package/.next/standalone/docs-old/ar/agenteye/evaluator-skill.mdx +168 -0
  233. package/.next/standalone/docs-old/ar/agenteye/event-stream.mdx +50 -0
  234. package/.next/standalone/docs-old/ar/agenteye/hermes-capture.mdx +54 -0
  235. package/.next/standalone/docs-old/ar/agenteye/incidents.mdx +51 -0
  236. package/.next/standalone/docs-old/ar/agenteye/observability.mdx +24 -0
  237. package/.next/standalone/docs-old/ar/agenteye/openclaw-capture.mdx +50 -0
  238. package/.next/standalone/docs-old/ar/agenteye/overview.mdx +108 -0
  239. package/.next/standalone/docs-old/ar/agenteye/python-sdk-skill.mdx +129 -0
  240. package/.next/standalone/docs-old/ar/agenteye/python-sdk.mdx +435 -0
  241. package/.next/standalone/docs-old/ar/agenteye/queries.mdx +57 -0
  242. package/.next/standalone/docs-old/ar/agenteye/security.mdx +68 -0
  243. package/.next/standalone/docs-old/ar/agenteye/sessions.mdx +58 -0
  244. package/.next/standalone/docs-old/ar/agenteye/telemetry.mdx +52 -0
  245. package/.next/standalone/docs-old/ar/architecture.mdx +333 -0
  246. package/.next/standalone/docs-old/ar/built-in-policies.mdx +860 -0
  247. package/.next/standalone/docs-old/ar/cli/audit.mdx +120 -0
  248. package/.next/standalone/docs-old/ar/cli/dashboard.mdx +30 -0
  249. package/.next/standalone/docs-old/ar/cli/environment-variables.mdx +70 -0
  250. package/.next/standalone/docs-old/ar/cli/hook.mdx +31 -0
  251. package/.next/standalone/docs-old/ar/cli/install-policies.mdx +57 -0
  252. package/.next/standalone/docs-old/ar/cli/list-policies.mdx +32 -0
  253. package/.next/standalone/docs-old/ar/cli/migrate.mdx +110 -0
  254. package/.next/standalone/docs-old/ar/cli/remove-policies.mdx +44 -0
  255. package/.next/standalone/docs-old/ar/cli/update.mdx +79 -0
  256. package/.next/standalone/docs-old/ar/cli/version.mdx +13 -0
  257. package/.next/standalone/docs-old/ar/configuration.mdx +268 -0
  258. package/.next/standalone/docs-old/ar/custom-policies.mdx +359 -0
  259. package/.next/standalone/docs-old/ar/dashboard.mdx +152 -0
  260. package/.next/standalone/docs-old/ar/examples.mdx +307 -0
  261. package/.next/standalone/docs-old/ar/for-agents.mdx +38 -0
  262. package/.next/standalone/docs-old/ar/getting-started.mdx +199 -0
  263. package/.next/standalone/docs-old/ar/introduction.mdx +58 -0
  264. package/.next/standalone/docs-old/ar/package-aliases.mdx +83 -0
  265. package/.next/standalone/docs-old/ar/testing.mdx +260 -0
  266. package/.next/standalone/docs-old/architecture.mdx +332 -0
  267. package/.next/standalone/docs-old/built-in-policies.mdx +859 -0
  268. package/.next/standalone/docs-old/cli/audit.mdx +188 -0
  269. package/.next/standalone/docs-old/cli/dashboard.mdx +29 -0
  270. package/.next/standalone/docs-old/cli/environment-variables.mdx +75 -0
  271. package/.next/standalone/docs-old/cli/hook.mdx +30 -0
  272. package/.next/standalone/docs-old/cli/install-policies.mdx +57 -0
  273. package/.next/standalone/docs-old/cli/list-policies.mdx +31 -0
  274. package/.next/standalone/docs-old/cli/migrate.mdx +117 -0
  275. package/.next/standalone/docs-old/cli/remove-policies.mdx +43 -0
  276. package/.next/standalone/docs-old/cli/update.mdx +94 -0
  277. package/.next/standalone/docs-old/cli/version.mdx +12 -0
  278. package/.next/standalone/docs-old/configuration.mdx +295 -0
  279. package/.next/standalone/docs-old/custom-policies.mdx +362 -0
  280. package/.next/standalone/docs-old/dashboard.mdx +176 -0
  281. package/.next/standalone/docs-old/de/agenteye/alerts.mdx +63 -0
  282. package/.next/standalone/docs-old/de/agenteye/api-keys.mdx +280 -0
  283. package/.next/standalone/docs-old/de/agenteye/assistant.mdx +63 -0
  284. package/.next/standalone/docs-old/de/agenteye/audits.mdx +54 -0
  285. package/.next/standalone/docs-old/de/agenteye/cli-and-agents.mdx +80 -0
  286. package/.next/standalone/docs-old/de/agenteye/cli-recipes.mdx +179 -0
  287. package/.next/standalone/docs-old/de/agenteye/cli-skill.mdx +159 -0
  288. package/.next/standalone/docs-old/de/agenteye/cli.mdx +350 -0
  289. package/.next/standalone/docs-old/de/agenteye/codex-capture.mdx +55 -0
  290. package/.next/standalone/docs-old/de/agenteye/concepts.mdx +87 -0
  291. package/.next/standalone/docs-old/de/agenteye/dashboards.mdx +46 -0
  292. package/.next/standalone/docs-old/de/agenteye/error-tracking.mdx +41 -0
  293. package/.next/standalone/docs-old/de/agenteye/evaluation-suite.mdx +300 -0
  294. package/.next/standalone/docs-old/de/agenteye/evaluations.mdx +50 -0
  295. package/.next/standalone/docs-old/de/agenteye/evaluator-skill.mdx +167 -0
  296. package/.next/standalone/docs-old/de/agenteye/event-stream.mdx +50 -0
  297. package/.next/standalone/docs-old/de/agenteye/hermes-capture.mdx +53 -0
  298. package/.next/standalone/docs-old/de/agenteye/incidents.mdx +50 -0
  299. package/.next/standalone/docs-old/de/agenteye/observability.mdx +23 -0
  300. package/.next/standalone/docs-old/de/agenteye/openclaw-capture.mdx +49 -0
  301. package/.next/standalone/docs-old/de/agenteye/overview.mdx +108 -0
  302. package/.next/standalone/docs-old/de/agenteye/python-sdk-skill.mdx +131 -0
  303. package/.next/standalone/docs-old/de/agenteye/python-sdk.mdx +436 -0
  304. package/.next/standalone/docs-old/de/agenteye/queries.mdx +56 -0
  305. package/.next/standalone/docs-old/de/agenteye/security.mdx +68 -0
  306. package/.next/standalone/docs-old/de/agenteye/sessions.mdx +57 -0
  307. package/.next/standalone/docs-old/de/agenteye/telemetry.mdx +52 -0
  308. package/.next/standalone/docs-old/de/architecture.mdx +332 -0
  309. package/.next/standalone/docs-old/de/built-in-policies.mdx +859 -0
  310. package/.next/standalone/docs-old/de/cli/audit.mdx +131 -0
  311. package/.next/standalone/docs-old/de/cli/dashboard.mdx +29 -0
  312. package/.next/standalone/docs-old/de/cli/environment-variables.mdx +72 -0
  313. package/.next/standalone/docs-old/de/cli/hook.mdx +30 -0
  314. package/.next/standalone/docs-old/de/cli/install-policies.mdx +57 -0
  315. package/.next/standalone/docs-old/de/cli/list-policies.mdx +31 -0
  316. package/.next/standalone/docs-old/de/cli/migrate.mdx +122 -0
  317. package/.next/standalone/docs-old/de/cli/remove-policies.mdx +43 -0
  318. package/.next/standalone/docs-old/de/cli/update.mdx +75 -0
  319. package/.next/standalone/docs-old/de/cli/version.mdx +12 -0
  320. package/.next/standalone/docs-old/de/configuration.mdx +272 -0
  321. package/.next/standalone/docs-old/de/custom-policies.mdx +358 -0
  322. package/.next/standalone/docs-old/de/dashboard.mdx +151 -0
  323. package/.next/standalone/docs-old/de/examples.mdx +307 -0
  324. package/.next/standalone/docs-old/de/for-agents.mdx +38 -0
  325. package/.next/standalone/docs-old/de/getting-started.mdx +199 -0
  326. package/.next/standalone/docs-old/de/introduction.mdx +57 -0
  327. package/.next/standalone/docs-old/de/package-aliases.mdx +82 -0
  328. package/.next/standalone/docs-old/de/testing.mdx +260 -0
  329. package/.next/standalone/docs-old/docs.json +1830 -0
  330. package/.next/standalone/docs-old/es/agenteye/alerts.mdx +63 -0
  331. package/.next/standalone/docs-old/es/agenteye/api-keys.mdx +280 -0
  332. package/.next/standalone/docs-old/es/agenteye/assistant.mdx +63 -0
  333. package/.next/standalone/docs-old/es/agenteye/audits.mdx +54 -0
  334. package/.next/standalone/docs-old/es/agenteye/cli-and-agents.mdx +80 -0
  335. package/.next/standalone/docs-old/es/agenteye/cli-recipes.mdx +178 -0
  336. package/.next/standalone/docs-old/es/agenteye/cli-skill.mdx +159 -0
  337. package/.next/standalone/docs-old/es/agenteye/cli.mdx +350 -0
  338. package/.next/standalone/docs-old/es/agenteye/codex-capture.mdx +55 -0
  339. package/.next/standalone/docs-old/es/agenteye/concepts.mdx +87 -0
  340. package/.next/standalone/docs-old/es/agenteye/dashboards.mdx +46 -0
  341. package/.next/standalone/docs-old/es/agenteye/error-tracking.mdx +41 -0
  342. package/.next/standalone/docs-old/es/agenteye/evaluation-suite.mdx +300 -0
  343. package/.next/standalone/docs-old/es/agenteye/evaluations.mdx +50 -0
  344. package/.next/standalone/docs-old/es/agenteye/evaluator-skill.mdx +167 -0
  345. package/.next/standalone/docs-old/es/agenteye/event-stream.mdx +50 -0
  346. package/.next/standalone/docs-old/es/agenteye/hermes-capture.mdx +53 -0
  347. package/.next/standalone/docs-old/es/agenteye/incidents.mdx +50 -0
  348. package/.next/standalone/docs-old/es/agenteye/observability.mdx +23 -0
  349. package/.next/standalone/docs-old/es/agenteye/openclaw-capture.mdx +49 -0
  350. package/.next/standalone/docs-old/es/agenteye/overview.mdx +108 -0
  351. package/.next/standalone/docs-old/es/agenteye/python-sdk-skill.mdx +135 -0
  352. package/.next/standalone/docs-old/es/agenteye/python-sdk.mdx +436 -0
  353. package/.next/standalone/docs-old/es/agenteye/queries.mdx +56 -0
  354. package/.next/standalone/docs-old/es/agenteye/security.mdx +68 -0
  355. package/.next/standalone/docs-old/es/agenteye/sessions.mdx +56 -0
  356. package/.next/standalone/docs-old/es/agenteye/telemetry.mdx +52 -0
  357. package/.next/standalone/docs-old/es/architecture.mdx +332 -0
  358. package/.next/standalone/docs-old/es/built-in-policies.mdx +853 -0
  359. package/.next/standalone/docs-old/es/cli/audit.mdx +137 -0
  360. package/.next/standalone/docs-old/es/cli/dashboard.mdx +29 -0
  361. package/.next/standalone/docs-old/es/cli/environment-variables.mdx +72 -0
  362. package/.next/standalone/docs-old/es/cli/hook.mdx +30 -0
  363. package/.next/standalone/docs-old/es/cli/install-policies.mdx +57 -0
  364. package/.next/standalone/docs-old/es/cli/list-policies.mdx +31 -0
  365. package/.next/standalone/docs-old/es/cli/migrate.mdx +86 -0
  366. package/.next/standalone/docs-old/es/cli/remove-policies.mdx +43 -0
  367. package/.next/standalone/docs-old/es/cli/update.mdx +64 -0
  368. package/.next/standalone/docs-old/es/cli/version.mdx +12 -0
  369. package/.next/standalone/docs-old/es/configuration.mdx +271 -0
  370. package/.next/standalone/docs-old/es/custom-policies.mdx +358 -0
  371. package/.next/standalone/docs-old/es/dashboard.mdx +151 -0
  372. package/.next/standalone/docs-old/es/examples.mdx +307 -0
  373. package/.next/standalone/docs-old/es/for-agents.mdx +38 -0
  374. package/.next/standalone/docs-old/es/getting-started.mdx +199 -0
  375. package/.next/standalone/docs-old/es/introduction.mdx +57 -0
  376. package/.next/standalone/docs-old/es/package-aliases.mdx +82 -0
  377. package/.next/standalone/docs-old/es/testing.mdx +260 -0
  378. package/.next/standalone/docs-old/examples.mdx +307 -0
  379. package/.next/standalone/docs-old/favicon.ico +0 -0
  380. package/.next/standalone/docs-old/for-agents.mdx +38 -0
  381. package/.next/standalone/docs-old/fr/agenteye/alerts.mdx +63 -0
  382. package/.next/standalone/docs-old/fr/agenteye/api-keys.mdx +280 -0
  383. package/.next/standalone/docs-old/fr/agenteye/assistant.mdx +63 -0
  384. package/.next/standalone/docs-old/fr/agenteye/audits.mdx +54 -0
  385. package/.next/standalone/docs-old/fr/agenteye/cli-and-agents.mdx +79 -0
  386. package/.next/standalone/docs-old/fr/agenteye/cli-recipes.mdx +179 -0
  387. package/.next/standalone/docs-old/fr/agenteye/cli-skill.mdx +159 -0
  388. package/.next/standalone/docs-old/fr/agenteye/cli.mdx +350 -0
  389. package/.next/standalone/docs-old/fr/agenteye/codex-capture.mdx +55 -0
  390. package/.next/standalone/docs-old/fr/agenteye/concepts.mdx +87 -0
  391. package/.next/standalone/docs-old/fr/agenteye/dashboards.mdx +46 -0
  392. package/.next/standalone/docs-old/fr/agenteye/error-tracking.mdx +40 -0
  393. package/.next/standalone/docs-old/fr/agenteye/evaluation-suite.mdx +401 -0
  394. package/.next/standalone/docs-old/fr/agenteye/evaluations.mdx +50 -0
  395. package/.next/standalone/docs-old/fr/agenteye/evaluator-skill.mdx +167 -0
  396. package/.next/standalone/docs-old/fr/agenteye/event-stream.mdx +50 -0
  397. package/.next/standalone/docs-old/fr/agenteye/hermes-capture.mdx +53 -0
  398. package/.next/standalone/docs-old/fr/agenteye/incidents.mdx +50 -0
  399. package/.next/standalone/docs-old/fr/agenteye/observability.mdx +23 -0
  400. package/.next/standalone/docs-old/fr/agenteye/openclaw-capture.mdx +49 -0
  401. package/.next/standalone/docs-old/fr/agenteye/overview.mdx +108 -0
  402. package/.next/standalone/docs-old/fr/agenteye/python-sdk-skill.mdx +135 -0
  403. package/.next/standalone/docs-old/fr/agenteye/python-sdk.mdx +436 -0
  404. package/.next/standalone/docs-old/fr/agenteye/queries.mdx +56 -0
  405. package/.next/standalone/docs-old/fr/agenteye/security.mdx +68 -0
  406. package/.next/standalone/docs-old/fr/agenteye/sessions.mdx +57 -0
  407. package/.next/standalone/docs-old/fr/agenteye/telemetry.mdx +52 -0
  408. package/.next/standalone/docs-old/fr/architecture.mdx +332 -0
  409. package/.next/standalone/docs-old/fr/built-in-policies.mdx +851 -0
  410. package/.next/standalone/docs-old/fr/cli/audit.mdx +126 -0
  411. package/.next/standalone/docs-old/fr/cli/dashboard.mdx +29 -0
  412. package/.next/standalone/docs-old/fr/cli/environment-variables.mdx +70 -0
  413. package/.next/standalone/docs-old/fr/cli/hook.mdx +30 -0
  414. package/.next/standalone/docs-old/fr/cli/install-policies.mdx +57 -0
  415. package/.next/standalone/docs-old/fr/cli/list-policies.mdx +31 -0
  416. package/.next/standalone/docs-old/fr/cli/migrate.mdx +86 -0
  417. package/.next/standalone/docs-old/fr/cli/remove-policies.mdx +43 -0
  418. package/.next/standalone/docs-old/fr/cli/update.mdx +64 -0
  419. package/.next/standalone/docs-old/fr/cli/version.mdx +12 -0
  420. package/.next/standalone/docs-old/fr/configuration.mdx +271 -0
  421. package/.next/standalone/docs-old/fr/custom-policies.mdx +358 -0
  422. package/.next/standalone/docs-old/fr/dashboard.mdx +151 -0
  423. package/.next/standalone/docs-old/fr/examples.mdx +307 -0
  424. package/.next/standalone/docs-old/fr/for-agents.mdx +38 -0
  425. package/.next/standalone/docs-old/fr/getting-started.mdx +199 -0
  426. package/.next/standalone/docs-old/fr/introduction.mdx +57 -0
  427. package/.next/standalone/docs-old/fr/package-aliases.mdx +82 -0
  428. package/.next/standalone/docs-old/fr/testing.mdx +260 -0
  429. package/.next/standalone/docs-old/getting-started.mdx +201 -0
  430. package/.next/standalone/docs-old/he/agenteye/alerts.mdx +63 -0
  431. package/.next/standalone/docs-old/he/agenteye/api-keys.mdx +279 -0
  432. package/.next/standalone/docs-old/he/agenteye/assistant.mdx +63 -0
  433. package/.next/standalone/docs-old/he/agenteye/audits.mdx +53 -0
  434. package/.next/standalone/docs-old/he/agenteye/cli-and-agents.mdx +80 -0
  435. package/.next/standalone/docs-old/he/agenteye/cli-recipes.mdx +179 -0
  436. package/.next/standalone/docs-old/he/agenteye/cli-skill.mdx +160 -0
  437. package/.next/standalone/docs-old/he/agenteye/cli.mdx +349 -0
  438. package/.next/standalone/docs-old/he/agenteye/codex-capture.mdx +56 -0
  439. package/.next/standalone/docs-old/he/agenteye/concepts.mdx +87 -0
  440. package/.next/standalone/docs-old/he/agenteye/dashboards.mdx +46 -0
  441. package/.next/standalone/docs-old/he/agenteye/error-tracking.mdx +41 -0
  442. package/.next/standalone/docs-old/he/agenteye/evaluation-suite.mdx +299 -0
  443. package/.next/standalone/docs-old/he/agenteye/evaluations.mdx +51 -0
  444. package/.next/standalone/docs-old/he/agenteye/evaluator-skill.mdx +168 -0
  445. package/.next/standalone/docs-old/he/agenteye/event-stream.mdx +50 -0
  446. package/.next/standalone/docs-old/he/agenteye/hermes-capture.mdx +54 -0
  447. package/.next/standalone/docs-old/he/agenteye/incidents.mdx +50 -0
  448. package/.next/standalone/docs-old/he/agenteye/observability.mdx +23 -0
  449. package/.next/standalone/docs-old/he/agenteye/openclaw-capture.mdx +50 -0
  450. package/.next/standalone/docs-old/he/agenteye/overview.mdx +108 -0
  451. package/.next/standalone/docs-old/he/agenteye/python-sdk-skill.mdx +132 -0
  452. package/.next/standalone/docs-old/he/agenteye/python-sdk.mdx +436 -0
  453. package/.next/standalone/docs-old/he/agenteye/queries.mdx +56 -0
  454. package/.next/standalone/docs-old/he/agenteye/security.mdx +67 -0
  455. package/.next/standalone/docs-old/he/agenteye/sessions.mdx +58 -0
  456. package/.next/standalone/docs-old/he/agenteye/telemetry.mdx +52 -0
  457. package/.next/standalone/docs-old/he/architecture.mdx +332 -0
  458. package/.next/standalone/docs-old/he/built-in-policies.mdx +857 -0
  459. package/.next/standalone/docs-old/he/cli/audit.mdx +116 -0
  460. package/.next/standalone/docs-old/he/cli/dashboard.mdx +30 -0
  461. package/.next/standalone/docs-old/he/cli/environment-variables.mdx +69 -0
  462. package/.next/standalone/docs-old/he/cli/hook.mdx +30 -0
  463. package/.next/standalone/docs-old/he/cli/install-policies.mdx +58 -0
  464. package/.next/standalone/docs-old/he/cli/list-policies.mdx +32 -0
  465. package/.next/standalone/docs-old/he/cli/migrate.mdx +87 -0
  466. package/.next/standalone/docs-old/he/cli/remove-policies.mdx +44 -0
  467. package/.next/standalone/docs-old/he/cli/update.mdx +64 -0
  468. package/.next/standalone/docs-old/he/cli/version.mdx +13 -0
  469. package/.next/standalone/docs-old/he/configuration.mdx +264 -0
  470. package/.next/standalone/docs-old/he/custom-policies.mdx +359 -0
  471. package/.next/standalone/docs-old/he/dashboard.mdx +155 -0
  472. package/.next/standalone/docs-old/he/examples.mdx +308 -0
  473. package/.next/standalone/docs-old/he/for-agents.mdx +38 -0
  474. package/.next/standalone/docs-old/he/getting-started.mdx +200 -0
  475. package/.next/standalone/docs-old/he/introduction.mdx +58 -0
  476. package/.next/standalone/docs-old/he/package-aliases.mdx +82 -0
  477. package/.next/standalone/docs-old/he/testing.mdx +260 -0
  478. package/.next/standalone/docs-old/hi/agenteye/alerts.mdx +62 -0
  479. package/.next/standalone/docs-old/hi/agenteye/api-keys.mdx +279 -0
  480. package/.next/standalone/docs-old/hi/agenteye/assistant.mdx +63 -0
  481. package/.next/standalone/docs-old/hi/agenteye/audits.mdx +53 -0
  482. package/.next/standalone/docs-old/hi/agenteye/cli-and-agents.mdx +80 -0
  483. package/.next/standalone/docs-old/hi/agenteye/cli-recipes.mdx +178 -0
  484. package/.next/standalone/docs-old/hi/agenteye/cli-skill.mdx +159 -0
  485. package/.next/standalone/docs-old/hi/agenteye/cli.mdx +350 -0
  486. package/.next/standalone/docs-old/hi/agenteye/codex-capture.mdx +56 -0
  487. package/.next/standalone/docs-old/hi/agenteye/concepts.mdx +87 -0
  488. package/.next/standalone/docs-old/hi/agenteye/dashboards.mdx +47 -0
  489. package/.next/standalone/docs-old/hi/agenteye/error-tracking.mdx +42 -0
  490. package/.next/standalone/docs-old/hi/agenteye/evaluation-suite.mdx +299 -0
  491. package/.next/standalone/docs-old/hi/agenteye/evaluations.mdx +51 -0
  492. package/.next/standalone/docs-old/hi/agenteye/evaluator-skill.mdx +171 -0
  493. package/.next/standalone/docs-old/hi/agenteye/event-stream.mdx +49 -0
  494. package/.next/standalone/docs-old/hi/agenteye/hermes-capture.mdx +53 -0
  495. package/.next/standalone/docs-old/hi/agenteye/incidents.mdx +50 -0
  496. package/.next/standalone/docs-old/hi/agenteye/observability.mdx +23 -0
  497. package/.next/standalone/docs-old/hi/agenteye/openclaw-capture.mdx +50 -0
  498. package/.next/standalone/docs-old/hi/agenteye/overview.mdx +107 -0
  499. package/.next/standalone/docs-old/hi/agenteye/python-sdk-skill.mdx +133 -0
  500. package/.next/standalone/docs-old/hi/agenteye/python-sdk.mdx +434 -0
  501. package/.next/standalone/docs-old/hi/agenteye/queries.mdx +57 -0
  502. package/.next/standalone/docs-old/hi/agenteye/security.mdx +68 -0
  503. package/.next/standalone/docs-old/hi/agenteye/sessions.mdx +57 -0
  504. package/.next/standalone/docs-old/hi/agenteye/telemetry.mdx +51 -0
  505. package/.next/standalone/docs-old/hi/architecture.mdx +332 -0
  506. package/.next/standalone/docs-old/hi/built-in-policies.mdx +848 -0
  507. package/.next/standalone/docs-old/hi/cli/audit.mdx +117 -0
  508. package/.next/standalone/docs-old/hi/cli/dashboard.mdx +29 -0
  509. package/.next/standalone/docs-old/hi/cli/environment-variables.mdx +64 -0
  510. package/.next/standalone/docs-old/hi/cli/hook.mdx +30 -0
  511. package/.next/standalone/docs-old/hi/cli/install-policies.mdx +57 -0
  512. package/.next/standalone/docs-old/hi/cli/list-policies.mdx +31 -0
  513. package/.next/standalone/docs-old/hi/cli/migrate.mdx +85 -0
  514. package/.next/standalone/docs-old/hi/cli/remove-policies.mdx +43 -0
  515. package/.next/standalone/docs-old/hi/cli/update.mdx +65 -0
  516. package/.next/standalone/docs-old/hi/cli/version.mdx +12 -0
  517. package/.next/standalone/docs-old/hi/configuration.mdx +264 -0
  518. package/.next/standalone/docs-old/hi/custom-policies.mdx +359 -0
  519. package/.next/standalone/docs-old/hi/dashboard.mdx +152 -0
  520. package/.next/standalone/docs-old/hi/examples.mdx +307 -0
  521. package/.next/standalone/docs-old/hi/for-agents.mdx +38 -0
  522. package/.next/standalone/docs-old/hi/getting-started.mdx +200 -0
  523. package/.next/standalone/docs-old/hi/introduction.mdx +58 -0
  524. package/.next/standalone/docs-old/hi/package-aliases.mdx +83 -0
  525. package/.next/standalone/docs-old/hi/testing.mdx +260 -0
  526. package/.next/standalone/docs-old/i18n/README.ar.md +231 -0
  527. package/.next/standalone/docs-old/i18n/README.de.md +226 -0
  528. package/.next/standalone/docs-old/i18n/README.es.md +226 -0
  529. package/.next/standalone/docs-old/i18n/README.fr.md +226 -0
  530. package/.next/standalone/docs-old/i18n/README.he.md +231 -0
  531. package/.next/standalone/docs-old/i18n/README.hi.md +223 -0
  532. package/.next/standalone/docs-old/i18n/README.it.md +226 -0
  533. package/.next/standalone/docs-old/i18n/README.ja.md +220 -0
  534. package/.next/standalone/docs-old/i18n/README.ko.md +226 -0
  535. package/.next/standalone/docs-old/i18n/README.pt-br.md +226 -0
  536. package/.next/standalone/docs-old/i18n/README.ru.md +223 -0
  537. package/.next/standalone/docs-old/i18n/README.tr.md +222 -0
  538. package/.next/standalone/docs-old/i18n/README.vi.md +226 -0
  539. package/.next/standalone/docs-old/i18n/README.zh.md +220 -0
  540. package/.next/standalone/docs-old/introduction.mdx +57 -0
  541. package/.next/standalone/docs-old/it/agenteye/alerts.mdx +62 -0
  542. package/.next/standalone/docs-old/it/agenteye/api-keys.mdx +279 -0
  543. package/.next/standalone/docs-old/it/agenteye/assistant.mdx +63 -0
  544. package/.next/standalone/docs-old/it/agenteye/audits.mdx +54 -0
  545. package/.next/standalone/docs-old/it/agenteye/cli-and-agents.mdx +80 -0
  546. package/.next/standalone/docs-old/it/agenteye/cli-recipes.mdx +179 -0
  547. package/.next/standalone/docs-old/it/agenteye/cli-skill.mdx +159 -0
  548. package/.next/standalone/docs-old/it/agenteye/cli.mdx +349 -0
  549. package/.next/standalone/docs-old/it/agenteye/codex-capture.mdx +56 -0
  550. package/.next/standalone/docs-old/it/agenteye/concepts.mdx +87 -0
  551. package/.next/standalone/docs-old/it/agenteye/dashboards.mdx +46 -0
  552. package/.next/standalone/docs-old/it/agenteye/error-tracking.mdx +41 -0
  553. package/.next/standalone/docs-old/it/agenteye/evaluation-suite.mdx +299 -0
  554. package/.next/standalone/docs-old/it/agenteye/evaluations.mdx +51 -0
  555. package/.next/standalone/docs-old/it/agenteye/evaluator-skill.mdx +170 -0
  556. package/.next/standalone/docs-old/it/agenteye/event-stream.mdx +50 -0
  557. package/.next/standalone/docs-old/it/agenteye/hermes-capture.mdx +53 -0
  558. package/.next/standalone/docs-old/it/agenteye/incidents.mdx +49 -0
  559. package/.next/standalone/docs-old/it/agenteye/observability.mdx +23 -0
  560. package/.next/standalone/docs-old/it/agenteye/openclaw-capture.mdx +49 -0
  561. package/.next/standalone/docs-old/it/agenteye/overview.mdx +107 -0
  562. package/.next/standalone/docs-old/it/agenteye/python-sdk-skill.mdx +132 -0
  563. package/.next/standalone/docs-old/it/agenteye/python-sdk.mdx +437 -0
  564. package/.next/standalone/docs-old/it/agenteye/queries.mdx +55 -0
  565. package/.next/standalone/docs-old/it/agenteye/security.mdx +68 -0
  566. package/.next/standalone/docs-old/it/agenteye/sessions.mdx +57 -0
  567. package/.next/standalone/docs-old/it/agenteye/telemetry.mdx +52 -0
  568. package/.next/standalone/docs-old/it/architecture.mdx +333 -0
  569. package/.next/standalone/docs-old/it/built-in-policies.mdx +853 -0
  570. package/.next/standalone/docs-old/it/cli/audit.mdx +126 -0
  571. package/.next/standalone/docs-old/it/cli/dashboard.mdx +30 -0
  572. package/.next/standalone/docs-old/it/cli/environment-variables.mdx +65 -0
  573. package/.next/standalone/docs-old/it/cli/hook.mdx +30 -0
  574. package/.next/standalone/docs-old/it/cli/install-policies.mdx +57 -0
  575. package/.next/standalone/docs-old/it/cli/list-policies.mdx +31 -0
  576. package/.next/standalone/docs-old/it/cli/migrate.mdx +122 -0
  577. package/.next/standalone/docs-old/it/cli/remove-policies.mdx +43 -0
  578. package/.next/standalone/docs-old/it/cli/update.mdx +86 -0
  579. package/.next/standalone/docs-old/it/cli/version.mdx +12 -0
  580. package/.next/standalone/docs-old/it/configuration.mdx +269 -0
  581. package/.next/standalone/docs-old/it/custom-policies.mdx +359 -0
  582. package/.next/standalone/docs-old/it/dashboard.mdx +151 -0
  583. package/.next/standalone/docs-old/it/examples.mdx +307 -0
  584. package/.next/standalone/docs-old/it/for-agents.mdx +38 -0
  585. package/.next/standalone/docs-old/it/getting-started.mdx +199 -0
  586. package/.next/standalone/docs-old/it/introduction.mdx +58 -0
  587. package/.next/standalone/docs-old/it/package-aliases.mdx +82 -0
  588. package/.next/standalone/docs-old/it/testing.mdx +261 -0
  589. package/.next/standalone/docs-old/ja/agenteye/alerts.mdx +63 -0
  590. package/.next/standalone/docs-old/ja/agenteye/api-keys.mdx +280 -0
  591. package/.next/standalone/docs-old/ja/agenteye/assistant.mdx +63 -0
  592. package/.next/standalone/docs-old/ja/agenteye/audits.mdx +54 -0
  593. package/.next/standalone/docs-old/ja/agenteye/cli-and-agents.mdx +80 -0
  594. package/.next/standalone/docs-old/ja/agenteye/cli-recipes.mdx +179 -0
  595. package/.next/standalone/docs-old/ja/agenteye/cli-skill.mdx +159 -0
  596. package/.next/standalone/docs-old/ja/agenteye/cli.mdx +350 -0
  597. package/.next/standalone/docs-old/ja/agenteye/codex-capture.mdx +55 -0
  598. package/.next/standalone/docs-old/ja/agenteye/concepts.mdx +87 -0
  599. package/.next/standalone/docs-old/ja/agenteye/dashboards.mdx +46 -0
  600. package/.next/standalone/docs-old/ja/agenteye/error-tracking.mdx +41 -0
  601. package/.next/standalone/docs-old/ja/agenteye/evaluation-suite.mdx +300 -0
  602. package/.next/standalone/docs-old/ja/agenteye/evaluations.mdx +51 -0
  603. package/.next/standalone/docs-old/ja/agenteye/evaluator-skill.mdx +167 -0
  604. package/.next/standalone/docs-old/ja/agenteye/event-stream.mdx +50 -0
  605. package/.next/standalone/docs-old/ja/agenteye/hermes-capture.mdx +53 -0
  606. package/.next/standalone/docs-old/ja/agenteye/incidents.mdx +50 -0
  607. package/.next/standalone/docs-old/ja/agenteye/observability.mdx +23 -0
  608. package/.next/standalone/docs-old/ja/agenteye/openclaw-capture.mdx +49 -0
  609. package/.next/standalone/docs-old/ja/agenteye/overview.mdx +108 -0
  610. package/.next/standalone/docs-old/ja/agenteye/python-sdk-skill.mdx +131 -0
  611. package/.next/standalone/docs-old/ja/agenteye/python-sdk.mdx +433 -0
  612. package/.next/standalone/docs-old/ja/agenteye/queries.mdx +56 -0
  613. package/.next/standalone/docs-old/ja/agenteye/security.mdx +68 -0
  614. package/.next/standalone/docs-old/ja/agenteye/sessions.mdx +57 -0
  615. package/.next/standalone/docs-old/ja/agenteye/telemetry.mdx +52 -0
  616. package/.next/standalone/docs-old/ja/architecture.mdx +332 -0
  617. package/.next/standalone/docs-old/ja/built-in-policies.mdx +848 -0
  618. package/.next/standalone/docs-old/ja/cli/audit.mdx +116 -0
  619. package/.next/standalone/docs-old/ja/cli/dashboard.mdx +29 -0
  620. package/.next/standalone/docs-old/ja/cli/environment-variables.mdx +63 -0
  621. package/.next/standalone/docs-old/ja/cli/hook.mdx +30 -0
  622. package/.next/standalone/docs-old/ja/cli/install-policies.mdx +57 -0
  623. package/.next/standalone/docs-old/ja/cli/list-policies.mdx +31 -0
  624. package/.next/standalone/docs-old/ja/cli/migrate.mdx +86 -0
  625. package/.next/standalone/docs-old/ja/cli/remove-policies.mdx +43 -0
  626. package/.next/standalone/docs-old/ja/cli/update.mdx +64 -0
  627. package/.next/standalone/docs-old/ja/cli/version.mdx +12 -0
  628. package/.next/standalone/docs-old/ja/configuration.mdx +264 -0
  629. package/.next/standalone/docs-old/ja/custom-policies.mdx +358 -0
  630. package/.next/standalone/docs-old/ja/dashboard.mdx +151 -0
  631. package/.next/standalone/docs-old/ja/examples.mdx +307 -0
  632. package/.next/standalone/docs-old/ja/for-agents.mdx +38 -0
  633. package/.next/standalone/docs-old/ja/getting-started.mdx +199 -0
  634. package/.next/standalone/docs-old/ja/introduction.mdx +57 -0
  635. package/.next/standalone/docs-old/ja/package-aliases.mdx +82 -0
  636. package/.next/standalone/docs-old/ja/testing.mdx +260 -0
  637. package/.next/standalone/docs-old/ko/agenteye/alerts.mdx +63 -0
  638. package/.next/standalone/docs-old/ko/agenteye/api-keys.mdx +280 -0
  639. package/.next/standalone/docs-old/ko/agenteye/assistant.mdx +63 -0
  640. package/.next/standalone/docs-old/ko/agenteye/audits.mdx +54 -0
  641. package/.next/standalone/docs-old/ko/agenteye/cli-and-agents.mdx +80 -0
  642. package/.next/standalone/docs-old/ko/agenteye/cli-recipes.mdx +179 -0
  643. package/.next/standalone/docs-old/ko/agenteye/cli-skill.mdx +159 -0
  644. package/.next/standalone/docs-old/ko/agenteye/cli.mdx +350 -0
  645. package/.next/standalone/docs-old/ko/agenteye/codex-capture.mdx +55 -0
  646. package/.next/standalone/docs-old/ko/agenteye/concepts.mdx +87 -0
  647. package/.next/standalone/docs-old/ko/agenteye/dashboards.mdx +46 -0
  648. package/.next/standalone/docs-old/ko/agenteye/error-tracking.mdx +40 -0
  649. package/.next/standalone/docs-old/ko/agenteye/evaluation-suite.mdx +303 -0
  650. package/.next/standalone/docs-old/ko/agenteye/evaluations.mdx +50 -0
  651. package/.next/standalone/docs-old/ko/agenteye/evaluator-skill.mdx +167 -0
  652. package/.next/standalone/docs-old/ko/agenteye/event-stream.mdx +50 -0
  653. package/.next/standalone/docs-old/ko/agenteye/hermes-capture.mdx +53 -0
  654. package/.next/standalone/docs-old/ko/agenteye/incidents.mdx +50 -0
  655. package/.next/standalone/docs-old/ko/agenteye/observability.mdx +23 -0
  656. package/.next/standalone/docs-old/ko/agenteye/openclaw-capture.mdx +49 -0
  657. package/.next/standalone/docs-old/ko/agenteye/overview.mdx +108 -0
  658. package/.next/standalone/docs-old/ko/agenteye/python-sdk-skill.mdx +130 -0
  659. package/.next/standalone/docs-old/ko/agenteye/python-sdk.mdx +433 -0
  660. package/.next/standalone/docs-old/ko/agenteye/queries.mdx +56 -0
  661. package/.next/standalone/docs-old/ko/agenteye/security.mdx +68 -0
  662. package/.next/standalone/docs-old/ko/agenteye/sessions.mdx +57 -0
  663. package/.next/standalone/docs-old/ko/agenteye/telemetry.mdx +52 -0
  664. package/.next/standalone/docs-old/ko/architecture.mdx +332 -0
  665. package/.next/standalone/docs-old/ko/built-in-policies.mdx +854 -0
  666. package/.next/standalone/docs-old/ko/cli/audit.mdx +131 -0
  667. package/.next/standalone/docs-old/ko/cli/dashboard.mdx +29 -0
  668. package/.next/standalone/docs-old/ko/cli/environment-variables.mdx +66 -0
  669. package/.next/standalone/docs-old/ko/cli/hook.mdx +30 -0
  670. package/.next/standalone/docs-old/ko/cli/install-policies.mdx +57 -0
  671. package/.next/standalone/docs-old/ko/cli/list-policies.mdx +31 -0
  672. package/.next/standalone/docs-old/ko/cli/migrate.mdx +86 -0
  673. package/.next/standalone/docs-old/ko/cli/remove-policies.mdx +43 -0
  674. package/.next/standalone/docs-old/ko/cli/update.mdx +64 -0
  675. package/.next/standalone/docs-old/ko/cli/version.mdx +12 -0
  676. package/.next/standalone/docs-old/ko/configuration.mdx +267 -0
  677. package/.next/standalone/docs-old/ko/custom-policies.mdx +358 -0
  678. package/.next/standalone/docs-old/ko/dashboard.mdx +151 -0
  679. package/.next/standalone/docs-old/ko/examples.mdx +307 -0
  680. package/.next/standalone/docs-old/ko/for-agents.mdx +38 -0
  681. package/.next/standalone/docs-old/ko/getting-started.mdx +199 -0
  682. package/.next/standalone/docs-old/ko/introduction.mdx +57 -0
  683. package/.next/standalone/docs-old/ko/package-aliases.mdx +82 -0
  684. package/.next/standalone/docs-old/ko/testing.mdx +260 -0
  685. package/.next/standalone/docs-old/logo/Failproof_AI_logo.png +0 -0
  686. package/.next/standalone/docs-old/logo/Failproof_AI_logo_light.png +0 -0
  687. package/.next/standalone/docs-old/package-aliases.mdx +82 -0
  688. package/.next/standalone/docs-old/pt-br/agenteye/alerts.mdx +63 -0
  689. package/.next/standalone/docs-old/pt-br/agenteye/api-keys.mdx +280 -0
  690. package/.next/standalone/docs-old/pt-br/agenteye/assistant.mdx +63 -0
  691. package/.next/standalone/docs-old/pt-br/agenteye/audits.mdx +54 -0
  692. package/.next/standalone/docs-old/pt-br/agenteye/cli-and-agents.mdx +80 -0
  693. package/.next/standalone/docs-old/pt-br/agenteye/cli-recipes.mdx +179 -0
  694. package/.next/standalone/docs-old/pt-br/agenteye/cli-skill.mdx +159 -0
  695. package/.next/standalone/docs-old/pt-br/agenteye/cli.mdx +350 -0
  696. package/.next/standalone/docs-old/pt-br/agenteye/codex-capture.mdx +55 -0
  697. package/.next/standalone/docs-old/pt-br/agenteye/concepts.mdx +87 -0
  698. package/.next/standalone/docs-old/pt-br/agenteye/dashboards.mdx +45 -0
  699. package/.next/standalone/docs-old/pt-br/agenteye/error-tracking.mdx +40 -0
  700. package/.next/standalone/docs-old/pt-br/agenteye/evaluation-suite.mdx +401 -0
  701. package/.next/standalone/docs-old/pt-br/agenteye/evaluations.mdx +51 -0
  702. package/.next/standalone/docs-old/pt-br/agenteye/evaluator-skill.mdx +167 -0
  703. package/.next/standalone/docs-old/pt-br/agenteye/event-stream.mdx +50 -0
  704. package/.next/standalone/docs-old/pt-br/agenteye/hermes-capture.mdx +53 -0
  705. package/.next/standalone/docs-old/pt-br/agenteye/incidents.mdx +50 -0
  706. package/.next/standalone/docs-old/pt-br/agenteye/observability.mdx +23 -0
  707. package/.next/standalone/docs-old/pt-br/agenteye/openclaw-capture.mdx +49 -0
  708. package/.next/standalone/docs-old/pt-br/agenteye/overview.mdx +108 -0
  709. package/.next/standalone/docs-old/pt-br/agenteye/python-sdk-skill.mdx +136 -0
  710. package/.next/standalone/docs-old/pt-br/agenteye/python-sdk.mdx +436 -0
  711. package/.next/standalone/docs-old/pt-br/agenteye/queries.mdx +56 -0
  712. package/.next/standalone/docs-old/pt-br/agenteye/security.mdx +68 -0
  713. package/.next/standalone/docs-old/pt-br/agenteye/sessions.mdx +56 -0
  714. package/.next/standalone/docs-old/pt-br/agenteye/telemetry.mdx +52 -0
  715. package/.next/standalone/docs-old/pt-br/architecture.mdx +332 -0
  716. package/.next/standalone/docs-old/pt-br/built-in-policies.mdx +858 -0
  717. package/.next/standalone/docs-old/pt-br/cli/audit.mdx +132 -0
  718. package/.next/standalone/docs-old/pt-br/cli/dashboard.mdx +29 -0
  719. package/.next/standalone/docs-old/pt-br/cli/environment-variables.mdx +72 -0
  720. package/.next/standalone/docs-old/pt-br/cli/hook.mdx +30 -0
  721. package/.next/standalone/docs-old/pt-br/cli/install-policies.mdx +57 -0
  722. package/.next/standalone/docs-old/pt-br/cli/list-policies.mdx +31 -0
  723. package/.next/standalone/docs-old/pt-br/cli/migrate.mdx +86 -0
  724. package/.next/standalone/docs-old/pt-br/cli/remove-policies.mdx +43 -0
  725. package/.next/standalone/docs-old/pt-br/cli/update.mdx +64 -0
  726. package/.next/standalone/docs-old/pt-br/cli/version.mdx +12 -0
  727. package/.next/standalone/docs-old/pt-br/configuration.mdx +268 -0
  728. package/.next/standalone/docs-old/pt-br/custom-policies.mdx +358 -0
  729. package/.next/standalone/docs-old/pt-br/dashboard.mdx +151 -0
  730. package/.next/standalone/docs-old/pt-br/examples.mdx +307 -0
  731. package/.next/standalone/docs-old/pt-br/for-agents.mdx +38 -0
  732. package/.next/standalone/docs-old/pt-br/getting-started.mdx +199 -0
  733. package/.next/standalone/docs-old/pt-br/introduction.mdx +57 -0
  734. package/.next/standalone/docs-old/pt-br/package-aliases.mdx +82 -0
  735. package/.next/standalone/docs-old/pt-br/testing.mdx +260 -0
  736. package/.next/standalone/docs-old/ru/agenteye/alerts.mdx +63 -0
  737. package/.next/standalone/docs-old/ru/agenteye/api-keys.mdx +280 -0
  738. package/.next/standalone/docs-old/ru/agenteye/assistant.mdx +63 -0
  739. package/.next/standalone/docs-old/ru/agenteye/audits.mdx +54 -0
  740. package/.next/standalone/docs-old/ru/agenteye/cli-and-agents.mdx +80 -0
  741. package/.next/standalone/docs-old/ru/agenteye/cli-recipes.mdx +179 -0
  742. package/.next/standalone/docs-old/ru/agenteye/cli-skill.mdx +159 -0
  743. package/.next/standalone/docs-old/ru/agenteye/cli.mdx +350 -0
  744. package/.next/standalone/docs-old/ru/agenteye/codex-capture.mdx +55 -0
  745. package/.next/standalone/docs-old/ru/agenteye/concepts.mdx +87 -0
  746. package/.next/standalone/docs-old/ru/agenteye/dashboards.mdx +46 -0
  747. package/.next/standalone/docs-old/ru/agenteye/error-tracking.mdx +41 -0
  748. package/.next/standalone/docs-old/ru/agenteye/evaluation-suite.mdx +401 -0
  749. package/.next/standalone/docs-old/ru/agenteye/evaluations.mdx +51 -0
  750. package/.next/standalone/docs-old/ru/agenteye/evaluator-skill.mdx +171 -0
  751. package/.next/standalone/docs-old/ru/agenteye/event-stream.mdx +51 -0
  752. package/.next/standalone/docs-old/ru/agenteye/hermes-capture.mdx +53 -0
  753. package/.next/standalone/docs-old/ru/agenteye/incidents.mdx +50 -0
  754. package/.next/standalone/docs-old/ru/agenteye/observability.mdx +23 -0
  755. package/.next/standalone/docs-old/ru/agenteye/openclaw-capture.mdx +49 -0
  756. package/.next/standalone/docs-old/ru/agenteye/overview.mdx +107 -0
  757. package/.next/standalone/docs-old/ru/agenteye/python-sdk-skill.mdx +131 -0
  758. package/.next/standalone/docs-old/ru/agenteye/python-sdk.mdx +437 -0
  759. package/.next/standalone/docs-old/ru/agenteye/queries.mdx +56 -0
  760. package/.next/standalone/docs-old/ru/agenteye/security.mdx +68 -0
  761. package/.next/standalone/docs-old/ru/agenteye/sessions.mdx +57 -0
  762. package/.next/standalone/docs-old/ru/agenteye/telemetry.mdx +52 -0
  763. package/.next/standalone/docs-old/ru/architecture.mdx +333 -0
  764. package/.next/standalone/docs-old/ru/built-in-policies.mdx +853 -0
  765. package/.next/standalone/docs-old/ru/cli/audit.mdx +132 -0
  766. package/.next/standalone/docs-old/ru/cli/dashboard.mdx +29 -0
  767. package/.next/standalone/docs-old/ru/cli/environment-variables.mdx +72 -0
  768. package/.next/standalone/docs-old/ru/cli/hook.mdx +30 -0
  769. package/.next/standalone/docs-old/ru/cli/install-policies.mdx +57 -0
  770. package/.next/standalone/docs-old/ru/cli/list-policies.mdx +31 -0
  771. package/.next/standalone/docs-old/ru/cli/migrate.mdx +91 -0
  772. package/.next/standalone/docs-old/ru/cli/remove-policies.mdx +44 -0
  773. package/.next/standalone/docs-old/ru/cli/update.mdx +64 -0
  774. package/.next/standalone/docs-old/ru/cli/version.mdx +12 -0
  775. package/.next/standalone/docs-old/ru/configuration.mdx +269 -0
  776. package/.next/standalone/docs-old/ru/custom-policies.mdx +358 -0
  777. package/.next/standalone/docs-old/ru/dashboard.mdx +155 -0
  778. package/.next/standalone/docs-old/ru/examples.mdx +307 -0
  779. package/.next/standalone/docs-old/ru/for-agents.mdx +38 -0
  780. package/.next/standalone/docs-old/ru/getting-started.mdx +199 -0
  781. package/.next/standalone/docs-old/ru/introduction.mdx +58 -0
  782. package/.next/standalone/docs-old/ru/package-aliases.mdx +82 -0
  783. package/.next/standalone/docs-old/ru/testing.mdx +260 -0
  784. package/.next/standalone/docs-old/styles/config/vocabularies/Mintlify/accept.txt +52 -0
  785. package/.next/standalone/docs-old/superpowers/specs/2026-06-11-audit-poster-restructure-design.md +332 -0
  786. package/.next/standalone/docs-old/testing.mdx +260 -0
  787. package/.next/standalone/docs-old/tr/agenteye/alerts.mdx +63 -0
  788. package/.next/standalone/docs-old/tr/agenteye/api-keys.mdx +279 -0
  789. package/.next/standalone/docs-old/tr/agenteye/assistant.mdx +63 -0
  790. package/.next/standalone/docs-old/tr/agenteye/audits.mdx +54 -0
  791. package/.next/standalone/docs-old/tr/agenteye/cli-and-agents.mdx +80 -0
  792. package/.next/standalone/docs-old/tr/agenteye/cli-recipes.mdx +179 -0
  793. package/.next/standalone/docs-old/tr/agenteye/cli-skill.mdx +161 -0
  794. package/.next/standalone/docs-old/tr/agenteye/cli.mdx +350 -0
  795. package/.next/standalone/docs-old/tr/agenteye/codex-capture.mdx +56 -0
  796. package/.next/standalone/docs-old/tr/agenteye/concepts.mdx +87 -0
  797. package/.next/standalone/docs-old/tr/agenteye/dashboards.mdx +46 -0
  798. package/.next/standalone/docs-old/tr/agenteye/error-tracking.mdx +41 -0
  799. package/.next/standalone/docs-old/tr/agenteye/evaluation-suite.mdx +299 -0
  800. package/.next/standalone/docs-old/tr/agenteye/evaluations.mdx +51 -0
  801. package/.next/standalone/docs-old/tr/agenteye/evaluator-skill.mdx +167 -0
  802. package/.next/standalone/docs-old/tr/agenteye/event-stream.mdx +50 -0
  803. package/.next/standalone/docs-old/tr/agenteye/hermes-capture.mdx +53 -0
  804. package/.next/standalone/docs-old/tr/agenteye/incidents.mdx +50 -0
  805. package/.next/standalone/docs-old/tr/agenteye/observability.mdx +23 -0
  806. package/.next/standalone/docs-old/tr/agenteye/openclaw-capture.mdx +50 -0
  807. package/.next/standalone/docs-old/tr/agenteye/overview.mdx +107 -0
  808. package/.next/standalone/docs-old/tr/agenteye/python-sdk-skill.mdx +130 -0
  809. package/.next/standalone/docs-old/tr/agenteye/python-sdk.mdx +436 -0
  810. package/.next/standalone/docs-old/tr/agenteye/queries.mdx +55 -0
  811. package/.next/standalone/docs-old/tr/agenteye/security.mdx +69 -0
  812. package/.next/standalone/docs-old/tr/agenteye/sessions.mdx +57 -0
  813. package/.next/standalone/docs-old/tr/agenteye/telemetry.mdx +52 -0
  814. package/.next/standalone/docs-old/tr/architecture.mdx +332 -0
  815. package/.next/standalone/docs-old/tr/built-in-policies.mdx +848 -0
  816. package/.next/standalone/docs-old/tr/cli/audit.mdx +117 -0
  817. package/.next/standalone/docs-old/tr/cli/dashboard.mdx +29 -0
  818. package/.next/standalone/docs-old/tr/cli/environment-variables.mdx +65 -0
  819. package/.next/standalone/docs-old/tr/cli/hook.mdx +31 -0
  820. package/.next/standalone/docs-old/tr/cli/install-policies.mdx +57 -0
  821. package/.next/standalone/docs-old/tr/cli/list-policies.mdx +31 -0
  822. package/.next/standalone/docs-old/tr/cli/migrate.mdx +87 -0
  823. package/.next/standalone/docs-old/tr/cli/remove-policies.mdx +43 -0
  824. package/.next/standalone/docs-old/tr/cli/update.mdx +88 -0
  825. package/.next/standalone/docs-old/tr/cli/version.mdx +12 -0
  826. package/.next/standalone/docs-old/tr/configuration.mdx +268 -0
  827. package/.next/standalone/docs-old/tr/custom-policies.mdx +358 -0
  828. package/.next/standalone/docs-old/tr/dashboard.mdx +152 -0
  829. package/.next/standalone/docs-old/tr/examples.mdx +307 -0
  830. package/.next/standalone/docs-old/tr/for-agents.mdx +38 -0
  831. package/.next/standalone/docs-old/tr/getting-started.mdx +199 -0
  832. package/.next/standalone/docs-old/tr/introduction.mdx +57 -0
  833. package/.next/standalone/docs-old/tr/package-aliases.mdx +82 -0
  834. package/.next/standalone/docs-old/tr/testing.mdx +261 -0
  835. package/.next/standalone/docs-old/vi/agenteye/alerts.mdx +63 -0
  836. package/.next/standalone/docs-old/vi/agenteye/api-keys.mdx +280 -0
  837. package/.next/standalone/docs-old/vi/agenteye/assistant.mdx +63 -0
  838. package/.next/standalone/docs-old/vi/agenteye/audits.mdx +54 -0
  839. package/.next/standalone/docs-old/vi/agenteye/cli-and-agents.mdx +80 -0
  840. package/.next/standalone/docs-old/vi/agenteye/cli-recipes.mdx +178 -0
  841. package/.next/standalone/docs-old/vi/agenteye/cli-skill.mdx +159 -0
  842. package/.next/standalone/docs-old/vi/agenteye/cli.mdx +349 -0
  843. package/.next/standalone/docs-old/vi/agenteye/codex-capture.mdx +55 -0
  844. package/.next/standalone/docs-old/vi/agenteye/concepts.mdx +88 -0
  845. package/.next/standalone/docs-old/vi/agenteye/dashboards.mdx +46 -0
  846. package/.next/standalone/docs-old/vi/agenteye/error-tracking.mdx +41 -0
  847. package/.next/standalone/docs-old/vi/agenteye/evaluation-suite.mdx +300 -0
  848. package/.next/standalone/docs-old/vi/agenteye/evaluations.mdx +51 -0
  849. package/.next/standalone/docs-old/vi/agenteye/evaluator-skill.mdx +171 -0
  850. package/.next/standalone/docs-old/vi/agenteye/event-stream.mdx +50 -0
  851. package/.next/standalone/docs-old/vi/agenteye/hermes-capture.mdx +53 -0
  852. package/.next/standalone/docs-old/vi/agenteye/incidents.mdx +50 -0
  853. package/.next/standalone/docs-old/vi/agenteye/observability.mdx +23 -0
  854. package/.next/standalone/docs-old/vi/agenteye/openclaw-capture.mdx +49 -0
  855. package/.next/standalone/docs-old/vi/agenteye/overview.mdx +109 -0
  856. package/.next/standalone/docs-old/vi/agenteye/python-sdk-skill.mdx +131 -0
  857. package/.next/standalone/docs-old/vi/agenteye/python-sdk.mdx +433 -0
  858. package/.next/standalone/docs-old/vi/agenteye/queries.mdx +55 -0
  859. package/.next/standalone/docs-old/vi/agenteye/security.mdx +68 -0
  860. package/.next/standalone/docs-old/vi/agenteye/sessions.mdx +57 -0
  861. package/.next/standalone/docs-old/vi/agenteye/telemetry.mdx +52 -0
  862. package/.next/standalone/docs-old/vi/architecture.mdx +332 -0
  863. package/.next/standalone/docs-old/vi/built-in-policies.mdx +853 -0
  864. package/.next/standalone/docs-old/vi/cli/audit.mdx +120 -0
  865. package/.next/standalone/docs-old/vi/cli/dashboard.mdx +29 -0
  866. package/.next/standalone/docs-old/vi/cli/environment-variables.mdx +69 -0
  867. package/.next/standalone/docs-old/vi/cli/hook.mdx +30 -0
  868. package/.next/standalone/docs-old/vi/cli/install-policies.mdx +57 -0
  869. package/.next/standalone/docs-old/vi/cli/list-policies.mdx +32 -0
  870. package/.next/standalone/docs-old/vi/cli/migrate.mdx +122 -0
  871. package/.next/standalone/docs-old/vi/cli/remove-policies.mdx +43 -0
  872. package/.next/standalone/docs-old/vi/cli/update.mdx +95 -0
  873. package/.next/standalone/docs-old/vi/cli/version.mdx +12 -0
  874. package/.next/standalone/docs-old/vi/configuration.mdx +268 -0
  875. package/.next/standalone/docs-old/vi/custom-policies.mdx +358 -0
  876. package/.next/standalone/docs-old/vi/dashboard.mdx +151 -0
  877. package/.next/standalone/docs-old/vi/examples.mdx +308 -0
  878. package/.next/standalone/docs-old/vi/for-agents.mdx +39 -0
  879. package/.next/standalone/docs-old/vi/getting-started.mdx +200 -0
  880. package/.next/standalone/docs-old/vi/introduction.mdx +57 -0
  881. package/.next/standalone/docs-old/vi/package-aliases.mdx +83 -0
  882. package/.next/standalone/docs-old/vi/testing.mdx +261 -0
  883. package/.next/standalone/docs-old/zh/agenteye/alerts.mdx +63 -0
  884. package/.next/standalone/docs-old/zh/agenteye/api-keys.mdx +280 -0
  885. package/.next/standalone/docs-old/zh/agenteye/assistant.mdx +63 -0
  886. package/.next/standalone/docs-old/zh/agenteye/audits.mdx +54 -0
  887. package/.next/standalone/docs-old/zh/agenteye/cli-and-agents.mdx +79 -0
  888. package/.next/standalone/docs-old/zh/agenteye/cli-recipes.mdx +179 -0
  889. package/.next/standalone/docs-old/zh/agenteye/cli-skill.mdx +159 -0
  890. package/.next/standalone/docs-old/zh/agenteye/cli.mdx +350 -0
  891. package/.next/standalone/docs-old/zh/agenteye/codex-capture.mdx +55 -0
  892. package/.next/standalone/docs-old/zh/agenteye/concepts.mdx +87 -0
  893. package/.next/standalone/docs-old/zh/agenteye/dashboards.mdx +46 -0
  894. package/.next/standalone/docs-old/zh/agenteye/error-tracking.mdx +40 -0
  895. package/.next/standalone/docs-old/zh/agenteye/evaluation-suite.mdx +300 -0
  896. package/.next/standalone/docs-old/zh/agenteye/evaluations.mdx +51 -0
  897. package/.next/standalone/docs-old/zh/agenteye/evaluator-skill.mdx +167 -0
  898. package/.next/standalone/docs-old/zh/agenteye/event-stream.mdx +50 -0
  899. package/.next/standalone/docs-old/zh/agenteye/hermes-capture.mdx +53 -0
  900. package/.next/standalone/docs-old/zh/agenteye/incidents.mdx +50 -0
  901. package/.next/standalone/docs-old/zh/agenteye/observability.mdx +23 -0
  902. package/.next/standalone/docs-old/zh/agenteye/openclaw-capture.mdx +49 -0
  903. package/.next/standalone/docs-old/zh/agenteye/overview.mdx +108 -0
  904. package/.next/standalone/docs-old/zh/agenteye/python-sdk-skill.mdx +131 -0
  905. package/.next/standalone/docs-old/zh/agenteye/python-sdk.mdx +433 -0
  906. package/.next/standalone/docs-old/zh/agenteye/queries.mdx +56 -0
  907. package/.next/standalone/docs-old/zh/agenteye/security.mdx +68 -0
  908. package/.next/standalone/docs-old/zh/agenteye/sessions.mdx +56 -0
  909. package/.next/standalone/docs-old/zh/agenteye/telemetry.mdx +52 -0
  910. package/.next/standalone/docs-old/zh/architecture.mdx +332 -0
  911. package/.next/standalone/docs-old/zh/built-in-policies.mdx +850 -0
  912. package/.next/standalone/docs-old/zh/cli/audit.mdx +115 -0
  913. package/.next/standalone/docs-old/zh/cli/dashboard.mdx +29 -0
  914. package/.next/standalone/docs-old/zh/cli/environment-variables.mdx +62 -0
  915. package/.next/standalone/docs-old/zh/cli/hook.mdx +30 -0
  916. package/.next/standalone/docs-old/zh/cli/install-policies.mdx +57 -0
  917. package/.next/standalone/docs-old/zh/cli/list-policies.mdx +31 -0
  918. package/.next/standalone/docs-old/zh/cli/migrate.mdx +86 -0
  919. package/.next/standalone/docs-old/zh/cli/remove-policies.mdx +43 -0
  920. package/.next/standalone/docs-old/zh/cli/update.mdx +65 -0
  921. package/.next/standalone/docs-old/zh/cli/version.mdx +12 -0
  922. package/.next/standalone/docs-old/zh/configuration.mdx +266 -0
  923. package/.next/standalone/docs-old/zh/custom-policies.mdx +358 -0
  924. package/.next/standalone/docs-old/zh/dashboard.mdx +151 -0
  925. package/.next/standalone/docs-old/zh/examples.mdx +307 -0
  926. package/.next/standalone/docs-old/zh/for-agents.mdx +38 -0
  927. package/.next/standalone/docs-old/zh/getting-started.mdx +199 -0
  928. package/.next/standalone/docs-old/zh/introduction.mdx +57 -0
  929. package/.next/standalone/docs-old/zh/package-aliases.mdx +82 -0
  930. package/.next/standalone/docs-old/zh/testing.mdx +260 -0
  931. package/.next/standalone/fp-cloud-cli/CHANGELOG.md +431 -0
  932. package/.next/standalone/fp-cloud-cli/LICENSE +42 -0
  933. package/.next/standalone/fp-cloud-cli/MANIFEST.in +10 -0
  934. package/.next/standalone/fp-cloud-cli/README.md +259 -0
  935. package/.next/standalone/fp-cloud-cli/fp_cli/__init__.py +10 -0
  936. package/.next/standalone/fp-cloud-cli/fp_cli/__main__.py +4 -0
  937. package/.next/standalone/fp-cloud-cli/fp_cli/_click_compat.py +64 -0
  938. package/.next/standalone/fp-cloud-cli/fp_cli/_context.py +332 -0
  939. package/.next/standalone/fp-cloud-cli/fp_cli/_version.py +1 -0
  940. package/.next/standalone/fp-cloud-cli/fp_cli/analytics.py +432 -0
  941. package/.next/standalone/fp-cloud-cli/fp_cli/analytics_config.py +77 -0
  942. package/.next/standalone/fp-cloud-cli/fp_cli/analytics_registry.py +83 -0
  943. package/.next/standalone/fp-cloud-cli/fp_cli/app.py +492 -0
  944. package/.next/standalone/fp-cloud-cli/fp_cli/auth.py +160 -0
  945. package/.next/standalone/fp-cloud-cli/fp_cli/client.py +1694 -0
  946. package/.next/standalone/fp-cloud-cli/fp_cli/commands/__init__.py +0 -0
  947. package/.next/standalone/fp-cloud-cli/fp_cli/commands/_write.py +214 -0
  948. package/.next/standalone/fp-cloud-cli/fp_cli/commands/agent_cmds.py +407 -0
  949. package/.next/standalone/fp-cloud-cli/fp_cli/commands/alerts_cmds.py +445 -0
  950. package/.next/standalone/fp-cloud-cli/fp_cli/commands/audits_cmds.py +1054 -0
  951. package/.next/standalone/fp-cloud-cli/fp_cli/commands/auth_cmds.py +512 -0
  952. package/.next/standalone/fp-cloud-cli/fp_cli/commands/errors_cmds.py +190 -0
  953. package/.next/standalone/fp-cloud-cli/fp_cli/commands/evals_cmds.py +161 -0
  954. package/.next/standalone/fp-cloud-cli/fp_cli/commands/events_cmds.py +159 -0
  955. package/.next/standalone/fp-cloud-cli/fp_cli/commands/fleet_cmds.py +416 -0
  956. package/.next/standalone/fp-cloud-cli/fp_cli/commands/guardrails_cmds.py +148 -0
  957. package/.next/standalone/fp-cloud-cli/fp_cli/commands/incidents_cmds.py +472 -0
  958. package/.next/standalone/fp-cloud-cli/fp_cli/commands/keys_cmds.py +407 -0
  959. package/.next/standalone/fp-cloud-cli/fp_cli/commands/list_cmds.py +63 -0
  960. package/.next/standalone/fp-cloud-cli/fp_cli/commands/orgs_cmds.py +319 -0
  961. package/.next/standalone/fp-cloud-cli/fp_cli/commands/policies_cmds.py +499 -0
  962. package/.next/standalone/fp-cloud-cli/fp_cli/commands/queries_cmds.py +378 -0
  963. package/.next/standalone/fp-cloud-cli/fp_cli/commands/sessions_cmds.py +151 -0
  964. package/.next/standalone/fp-cloud-cli/fp_cli/commands/settings_cmds.py +150 -0
  965. package/.next/standalone/fp-cloud-cli/fp_cli/commands/usage_cmds.py +35 -0
  966. package/.next/standalone/fp-cloud-cli/fp_cli/commands/users_cmds.py +404 -0
  967. package/.next/standalone/fp-cloud-cli/fp_cli/config.py +330 -0
  968. package/.next/standalone/fp-cloud-cli/fp_cli/dates.py +78 -0
  969. package/.next/standalone/fp-cloud-cli/fp_cli/enforcement.py +345 -0
  970. package/.next/standalone/fp-cloud-cli/fp_cli/errors.py +98 -0
  971. package/.next/standalone/fp-cloud-cli/fp_cli/models.py +891 -0
  972. package/.next/standalone/fp-cloud-cli/fp_cli/orgs.py +30 -0
  973. package/.next/standalone/fp-cloud-cli/fp_cli/output.py +6593 -0
  974. package/.next/standalone/fp-cloud-cli/fp_cli/permissions.py +208 -0
  975. package/.next/standalone/fp-cloud-cli/fp_cli/policy_check.py +290 -0
  976. package/.next/standalone/fp-cloud-cli/fp_cli/py.typed +0 -0
  977. package/.next/standalone/fp-cloud-cli/fp_cli/select.py +322 -0
  978. package/.next/standalone/fp-cloud-cli/fp_cli/theme.py +53 -0
  979. package/.next/standalone/fp-cloud-cli/pyproject.toml +106 -0
  980. package/.next/standalone/fp-cloud-cli/skill/SKILL.md +302 -0
  981. package/.next/standalone/fp-cloud-cli/skill/agents/openai.yaml +8 -0
  982. package/.next/standalone/fp-cloud-cli/skill/references/commands.md +254 -0
  983. package/.next/standalone/fp-cloud-cli/tests/__init__.py +0 -0
  984. package/.next/standalone/fp-cloud-cli/tests/conftest.py +92 -0
  985. package/.next/standalone/fp-cloud-cli/tests/test_alerting.py +644 -0
  986. package/.next/standalone/fp-cloud-cli/tests/test_analytics.py +385 -0
  987. package/.next/standalone/fp-cloud-cli/tests/test_audits.py +950 -0
  988. package/.next/standalone/fp-cloud-cli/tests/test_auth.py +98 -0
  989. package/.next/standalone/fp-cloud-cli/tests/test_auth_mode.py +272 -0
  990. package/.next/standalone/fp-cloud-cli/tests/test_click_compat.py +118 -0
  991. package/.next/standalone/fp-cloud-cli/tests/test_client.py +299 -0
  992. package/.next/standalone/fp-cloud-cli/tests/test_commands.py +814 -0
  993. package/.next/standalone/fp-cloud-cli/tests/test_config.py +99 -0
  994. package/.next/standalone/fp-cloud-cli/tests/test_dashboards_agent.py +340 -0
  995. package/.next/standalone/fp-cloud-cli/tests/test_dates.py +76 -0
  996. package/.next/standalone/fp-cloud-cli/tests/test_enforcement_logic.py +481 -0
  997. package/.next/standalone/fp-cloud-cli/tests/test_facets.py +170 -0
  998. package/.next/standalone/fp-cloud-cli/tests/test_failproofai_home.py +722 -0
  999. package/.next/standalone/fp-cloud-cli/tests/test_fp_home_contract.py +198 -0
  1000. package/.next/standalone/fp-cloud-cli/tests/test_hardening.py +186 -0
  1001. package/.next/standalone/fp-cloud-cli/tests/test_help_table_coverage.py +127 -0
  1002. package/.next/standalone/fp-cloud-cli/tests/test_keys_queries.py +496 -0
  1003. package/.next/standalone/fp-cloud-cli/tests/test_list.py +59 -0
  1004. package/.next/standalone/fp-cloud-cli/tests/test_multivalue.py +183 -0
  1005. package/.next/standalone/fp-cloud-cli/tests/test_no_customer_identifiers.py +168 -0
  1006. package/.next/standalone/fp-cloud-cli/tests/test_operator.py +492 -0
  1007. package/.next/standalone/fp-cloud-cli/tests/test_orgs.py +692 -0
  1008. package/.next/standalone/fp-cloud-cli/tests/test_output.py +1732 -0
  1009. package/.next/standalone/fp-cloud-cli/tests/test_policy_check.py +191 -0
  1010. package/.next/standalone/fp-cloud-cli/tests/test_readme_matches_reality.py +125 -0
  1011. package/.next/standalone/fp-cloud-cli/tests/test_review_fixes.py +161 -0
  1012. package/.next/standalone/fp-cloud-cli/tests/test_telemetry_completeness.py +90 -0
  1013. package/.next/standalone/fp-cloud-cli/tests/test_usage.py +115 -0
  1014. package/.next/standalone/fp-cloud-cli/tests/test_v1_origin_diagnostic.py +70 -0
  1015. package/.next/standalone/fp-cloud-cli/tests/test_v1_routing.py +214 -0
  1016. package/.next/standalone/fp-cloud-cli/tests/test_whoami.py +104 -0
  1017. package/.next/standalone/fp-cloud-cli/uv.lock +552 -0
  1018. package/.next/standalone/node_modules/@next/env/package.json +1 -1
  1019. package/.next/standalone/node_modules/@swc/helpers/esm/_interop_require_default.js +4 -0
  1020. package/.next/standalone/node_modules/@swc/helpers/esm/_interop_require_wildcard.js +36 -0
  1021. package/.next/standalone/node_modules/@swc/helpers/package.json +703 -469
  1022. package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
  1023. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +8 -6
  1024. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +26 -20
  1025. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +2 -1
  1026. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +5 -2
  1027. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +2 -1
  1028. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +3 -1
  1029. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/cache.js +150 -169
  1030. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +16 -54
  1031. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/navigation.js +115 -23
  1032. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +61 -6
  1033. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/scheduler.js +53 -36
  1034. package/.next/standalone/node_modules/next/dist/client/route-params.js +4 -8
  1035. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +26 -26
  1036. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +26 -26
  1037. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +2 -2
  1038. package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +9 -9
  1039. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  1040. package/.next/standalone/node_modules/next/dist/lib/turbopack-cache-seed.js +15 -7
  1041. package/.next/standalone/node_modules/next/dist/server/app-render/app-render.js +2 -0
  1042. package/.next/standalone/node_modules/next/dist/server/app-render/dev-validation-worker-snapshot.js +2 -1
  1043. package/.next/standalone/node_modules/next/dist/server/async-storage/request-store.js +29 -20
  1044. package/.next/standalone/node_modules/next/dist/server/async-storage/work-store.js +1 -0
  1045. package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
  1046. package/.next/standalone/node_modules/next/dist/server/dev/dev-validation-worker-pool.js +90 -11
  1047. package/.next/standalone/node_modules/next/dist/server/dev/dev-validation-worker.js +51 -9
  1048. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +24 -4
  1049. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  1050. package/.next/standalone/node_modules/next/dist/server/dev/use-cache-probe-worker.js +1 -0
  1051. package/.next/standalone/node_modules/next/dist/server/image-optimizer.js +1 -0
  1052. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  1053. package/.next/standalone/node_modules/next/dist/server/lib/encode-header-safe.js +44 -0
  1054. package/.next/standalone/node_modules/next/dist/server/lib/implicit-tags.js +3 -3
  1055. package/.next/standalone/node_modules/next/dist/server/lib/patch-fetch.js +2 -2
  1056. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
  1057. package/.next/standalone/node_modules/next/dist/server/use-cache/handlers.js +14 -0
  1058. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-probe-scheduler.js +2 -1
  1059. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +100 -31
  1060. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +88 -2
  1061. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/revalidate.js +12 -5
  1062. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +13 -1
  1063. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  1064. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  1065. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
  1066. package/.next/standalone/node_modules/next/package.json +11 -11
  1067. package/.next/standalone/package.json +30 -23
  1068. package/.next/standalone/sdk/python/CHANGELOG.md +70 -0
  1069. package/.next/standalone/sdk/python/LICENSE +42 -0
  1070. package/.next/standalone/sdk/python/MANIFEST.in +21 -0
  1071. package/.next/standalone/sdk/python/README.md +466 -0
  1072. package/.next/standalone/sdk/python/docs/README.md +249 -0
  1073. package/.next/standalone/sdk/python/docs/_shared/README.md +43 -0
  1074. package/.next/standalone/sdk/python/docs/_shared/__init__.py +195 -0
  1075. package/.next/standalone/sdk/python/docs/crewai/README.md +328 -0
  1076. package/.next/standalone/sdk/python/docs/crewai/examples/quickstart.py +61 -0
  1077. package/.next/standalone/sdk/python/docs/crewai/examples/research_crew.py +92 -0
  1078. package/.next/standalone/sdk/python/docs/langgraph/README.md +481 -0
  1079. package/.next/standalone/sdk/python/docs/langgraph/examples/quickstart.py +51 -0
  1080. package/.next/standalone/sdk/python/docs/langgraph/examples/research_agent.py +86 -0
  1081. package/.next/standalone/sdk/python/docs/langgraph/examples/supervisor_handoff.py +83 -0
  1082. package/.next/standalone/sdk/python/docs/llama_index/README.md +332 -0
  1083. package/.next/standalone/sdk/python/docs/llama_index/examples/quickstart.py +62 -0
  1084. package/.next/standalone/sdk/python/docs/llama_index/examples/research_agent.py +93 -0
  1085. package/.next/standalone/sdk/python/docs/manual/README.md +491 -0
  1086. package/.next/standalone/sdk/python/docs/manual/examples/quickstart.py +57 -0
  1087. package/.next/standalone/sdk/python/docs/manual/examples/research_agent.py +133 -0
  1088. package/.next/standalone/sdk/python/docs/pydantic_ai/README.md +323 -0
  1089. package/.next/standalone/sdk/python/docs/pydantic_ai/examples/quickstart.py +48 -0
  1090. package/.next/standalone/sdk/python/docs/pydantic_ai/examples/research_agent.py +94 -0
  1091. package/.next/standalone/sdk/python/failproofai_sdk/__init__.py +131 -0
  1092. package/.next/standalone/sdk/python/failproofai_sdk/_context.py +218 -0
  1093. package/.next/standalone/sdk/python/failproofai_sdk/_environment.py +78 -0
  1094. package/.next/standalone/sdk/python/failproofai_sdk/_events.py +752 -0
  1095. package/.next/standalone/sdk/python/failproofai_sdk/_resolver.py +118 -0
  1096. package/.next/standalone/sdk/python/failproofai_sdk/_runtime.py +21 -0
  1097. package/.next/standalone/sdk/python/failproofai_sdk/_schema.py +317 -0
  1098. package/.next/standalone/sdk/python/failproofai_sdk/_scopes.py +422 -0
  1099. package/.next/standalone/sdk/python/failproofai_sdk/_version.py +1 -0
  1100. package/.next/standalone/sdk/python/failproofai_sdk/_writer.py +750 -0
  1101. package/.next/standalone/sdk/python/failproofai_sdk/integrations/__init__.py +274 -0
  1102. package/.next/standalone/sdk/python/failproofai_sdk/integrations/_compat.py +247 -0
  1103. package/.next/standalone/sdk/python/failproofai_sdk/integrations/_core.py +1076 -0
  1104. package/.next/standalone/sdk/python/failproofai_sdk/integrations/crewai.py +1669 -0
  1105. package/.next/standalone/sdk/python/failproofai_sdk/integrations/langchain.py +2151 -0
  1106. package/.next/standalone/sdk/python/failproofai_sdk/integrations/llama_index.py +1588 -0
  1107. package/.next/standalone/sdk/python/failproofai_sdk/integrations/pydantic_ai.py +977 -0
  1108. package/.next/standalone/sdk/python/failproofai_sdk/py.typed +0 -0
  1109. package/.next/standalone/sdk/python/pyproject.toml +92 -0
  1110. package/.next/standalone/sdk/python/skill/SKILL.md +399 -0
  1111. package/.next/standalone/sdk/python/skill/agents/openai.yaml +8 -0
  1112. package/.next/standalone/sdk/python/skill/references/events.md +234 -0
  1113. package/.next/standalone/sdk/python/skill/references/frameworks.md +314 -0
  1114. package/.next/standalone/sdk/python/skill/references/install.md +100 -0
  1115. package/.next/standalone/sdk/python/skill/references/integration.md +352 -0
  1116. package/.next/standalone/sdk/python/tests/__init__.py +0 -0
  1117. package/.next/standalone/sdk/python/tests/conftest.py +169 -0
  1118. package/.next/standalone/sdk/python/tests/integrations/__init__.py +6 -0
  1119. package/.next/standalone/sdk/python/tests/integrations/test_crewai.py +1299 -0
  1120. package/.next/standalone/sdk/python/tests/integrations/test_langchain.py +2338 -0
  1121. package/.next/standalone/sdk/python/tests/integrations/test_llama_index.py +1576 -0
  1122. package/.next/standalone/sdk/python/tests/integrations/test_pydantic_ai.py +1102 -0
  1123. package/.next/standalone/sdk/python/tests/test_context.py +410 -0
  1124. package/.next/standalone/sdk/python/tests/test_docs.py +411 -0
  1125. package/.next/standalone/sdk/python/tests/test_durability.py +1352 -0
  1126. package/.next/standalone/sdk/python/tests/test_encoding.py +571 -0
  1127. package/.next/standalone/sdk/python/tests/test_integrations.py +1127 -0
  1128. package/.next/standalone/sdk/python/tests/test_no_customer_identifiers.py +214 -0
  1129. package/.next/standalone/sdk/python/tests/test_packaging.py +185 -0
  1130. package/.next/standalone/sdk/python/tests/test_resolver_umbrella.py +178 -0
  1131. package/.next/standalone/sdk/python/tests/test_scopes.py +487 -0
  1132. package/.next/standalone/sdk/python/tests/test_sdk.py +923 -0
  1133. package/.next/standalone/sdk/python/tests/test_server_contract.py +650 -0
  1134. package/.next/standalone/sdk/python/tests/test_site_docs.py +371 -0
  1135. package/.next/standalone/sdk/python/tests/test_skill_snippets.py +165 -0
  1136. package/.next/standalone/sdk/python/tests/test_spool_contract.py +287 -0
  1137. package/.next/standalone/sdk/python/tests/test_spool_creation.py +360 -0
  1138. package/.next/standalone/sdk/python/tests/test_wire_format.py +279 -0
  1139. package/.next/standalone/sdk/python/tests/test_zero_dependencies.py +378 -0
  1140. package/.next/standalone/sdk/python/uv.lock +6005 -0
  1141. package/.next/standalone/server.js +1 -1
  1142. package/README.md +79 -23
  1143. package/bin/failproofai.mjs +145 -11
  1144. package/dist/cli.mjs +4483 -2206
  1145. package/dist/index.js +5 -5
  1146. package/dist/worker.mjs +2399 -1978
  1147. package/package.json +30 -23
  1148. package/policy-pack/SHA256SUMS +2 -0
  1149. package/policy-pack/failproofai-pack.json +732 -0
  1150. package/policy-pack/failproofai-pack.mjs +2017 -0
  1151. package/scripts/build-policy-pack.mjs +121 -0
  1152. package/scripts/changelog-section.py +77 -0
  1153. package/scripts/prune-standalone.mjs +3 -0
  1154. package/scripts/python-version.py +232 -0
  1155. package/scripts/release-announcement.mjs +686 -0
  1156. package/scripts/translate-docs/cli.ts +21 -0
  1157. package/scripts/translate-docs/config.ts +19 -1
  1158. package/scripts/translate-docs/mintlify-nav.ts +85 -13
  1159. package/scripts/translate-docs/translator.ts +66 -11
  1160. package/src/audit/cache.ts +40 -3
  1161. package/src/audit/cli.ts +1 -1
  1162. package/src/audit/index.ts +1 -1
  1163. package/src/audit/replay.ts +89 -3
  1164. package/src/audit/report.ts +5 -5
  1165. package/src/audit/schedule-cli.ts +49 -53
  1166. package/src/hooks/builtin-policies.ts +217 -579
  1167. package/src/hooks/cloud-enrollment-cli.ts +66 -27
  1168. package/src/hooks/cloud-managed-policies.ts +6 -1
  1169. package/src/hooks/configure-wizard.ts +1 -1
  1170. package/src/hooks/custom-hooks-loader.ts +89 -6
  1171. package/src/hooks/fp-home.ts +92 -4
  1172. package/src/hooks/fp-reset.ts +26 -2
  1173. package/src/hooks/handler.ts +181 -11
  1174. package/src/hooks/harness-cli.ts +79 -25
  1175. package/src/hooks/hook-activity-store.ts +13 -3
  1176. package/src/hooks/install-prompt.ts +25 -3
  1177. package/src/hooks/manager.ts +418 -172
  1178. package/src/hooks/migrations.ts +2 -2
  1179. package/src/hooks/pack-cli.ts +505 -0
  1180. package/src/hooks/pack-failclosed.ts +189 -0
  1181. package/src/hooks/pack-manifest.ts +344 -0
  1182. package/src/hooks/pack-store.ts +930 -0
  1183. package/src/hooks/policy-catalog.ts +535 -0
  1184. package/src/hooks/policy-evaluator.ts +24 -16
  1185. package/src/hooks/policy-presets.ts +4 -2
  1186. package/src/hooks/policy-registry.ts +8 -2
  1187. package/src/hooks/policy-types.ts +26 -0
  1188. package/src/hooks/session-pause-cli.ts +33 -9
  1189. package/src/hooks/tui.ts +570 -0
  1190. package/src/hooks/types.ts +15 -1
  1191. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0agdw2a._.js +0 -3
  1192. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d1u_na._.js +0 -3
  1193. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0nne229._.js +0 -3
  1194. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oy4kxb._.js +0 -3
  1195. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zf034w._.js +0 -3
  1196. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1hstmft._.js +0 -3
  1197. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1tvn4wf._.js +0 -3
  1198. package/.next/standalone/.next/server/chunks/_0lxbzdq._.js +0 -3
  1199. package/.next/standalone/.next/server/chunks/_18ty6si._.js +0 -3
  1200. package/.next/standalone/.next/server/chunks/_1zuiiy3._.js +0 -3
  1201. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_1iiwm5e._.js +0 -3
  1202. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03eykvd._.js +0 -5
  1203. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kgy9da._.js +0 -4
  1204. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0m98kzy._.js +0 -4
  1205. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0v5_91z._.js +0 -4
  1206. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-a3135._.js +0 -4
  1207. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1_dfocn._.js +0 -4
  1208. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1e5g_ur._.js +0 -4
  1209. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1hmqefd._.js +0 -4
  1210. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1kzapg5._.js +0 -6
  1211. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1zvtylo._.js +0 -3
  1212. package/.next/standalone/.next/server/chunks/ssr/_1wboum1._.js +0 -23
  1213. package/.next/standalone/.next/server/chunks/ssr/node_modules_1j2z5jb._.js +0 -3
  1214. package/.next/standalone/.next/static/chunks/13pe0rgzztjxa.js +0 -6
  1215. package/.next/standalone/.next/static/chunks/1xajksrefvav8.js +0 -1
  1216. package/.next/standalone/.next/static/chunks/2ts65czrjjd_k.js +0 -31
  1217. package/.next/standalone/.next/static/chunks/31orv9uidm1fn.js +0 -22
  1218. package/.next/standalone/.next/static/chunks/3wq9x0c-7ld5d.css +0 -2
  1219. package/.next/standalone/node_modules/next/dist/server/lib/encode-cache-tag.js +0 -45
  1220. /package/.next/standalone/.next/static/{zMC0Yqypg3GF82-3KN6ul → nwbyWT06Ud0XdXOrVJyvS}/_buildManifest.js +0 -0
  1221. /package/.next/standalone/.next/static/{zMC0Yqypg3GF82-3KN6ul → nwbyWT06Ud0XdXOrVJyvS}/_clientMiddlewareManifest.js +0 -0
  1222. /package/.next/standalone/.next/static/{zMC0Yqypg3GF82-3KN6ul → nwbyWT06Ud0XdXOrVJyvS}/_ssgManifest.js +0 -0
@@ -1,8 +1,8 @@
1
- module.exports=[22712,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112),e=a.i(38246),f=a.i(52562),g=a.i(89027),h=a.i(64831);let i=(0,h.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);var j=a.i(85650),k=a.i(41476);let l=(0,h.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),m=(0,h.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),n=(0,h.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),o=(0,h.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]),p=(0,h.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var q=a.i(74215),r=a.i(65967),s=a.i(5050);let t=(0,s.createServerReference)("40744a9679e27c911fe1e371a9f627ed26c0722a0b",s.callServer,void 0,s.findSourceMapURL,"getHookActivityAction"),u=(0,s.createServerReference)("60019d79c7ad3b62a966e88b61d5a59e45bc4512dc",s.callServer,void 0,s.findSourceMapURL,"searchHookActivityAction"),v=(0,s.createServerReference)("0084c632596bdfca683214e58fd3746939120e50b4",s.callServer,void 0,s.findSourceMapURL,"getActivePausesAction");function w({pauses:a,now:d}){let[e,f]=(0,c.useState)(()=>Date.now());(0,c.useEffect)(()=>{let a=setInterval(()=>f(Date.now()),3e4);return()=>clearInterval(a)},[]);let g=d??e,h=a.filter(a=>a.expiresAt>g);if(0===h.length)return null;let i=h.reduce((a,b)=>a.expiresAt<b.expiresAt?a:b);return(0,b.jsxs)("div",{role:"status",className:"mb-4 flex items-start gap-2.5 rounded border border-amber-500/40 bg-amber-500/[0.07] px-3 py-2.5",children:[(0,b.jsx)(m,{className:"h-4 w-4 shrink-0 text-amber-500 mt-0.5","aria-hidden":"true"}),(0,b.jsxs)("div",{className:"text-xs leading-relaxed",children:[(0,b.jsxs)("p",{className:"font-medium text-foreground",children:["Enforcement is paused for ",h.length," session",1===h.length?"":"s"," —"," ",function(a){if(a<=0)return"expiring now";if(a<6e4)return"under a minute";let b=Math.round(a/6e4);if(b<60)return`${b}m`;let c=Math.floor(b/60),d=b%60;return 0===d?`${c}h`:`${c}h${d}m`}(i.expiresAt-g)," left",h.length>1?" on the next to expire":"","."]}),(0,b.jsxs)("p",{className:"text-muted-foreground mt-0.5",children:["Builtin, custom and convention policies are suspended for"," ",1===h.length?"that session":"those sessions","; cloud-managed policies keep enforcing. It lifts on its own — or run"," ",(0,b.jsx)("span",{className:"font-mono text-foreground",children:"failproofai config --resume"}),"."]})]})]})}function x(){return(0,b.jsx)("span",{title:"Enforcement was paused for this session — local policies did not run",className:"ml-1.5 inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium uppercase tracking-wide border border-amber-500/40 bg-amber-500/10 text-amber-600 dark:text-amber-500",children:"paused"})}function y({item:a}){if(!a.pausedBy)return null;let c="number"==typeof a.pauseExpiresAt?new Date(a.pauseExpiresAt).toLocaleTimeString():null;return(0,b.jsxs)("div",{className:"sm:col-span-2 lg:col-span-3 mt-1 flex items-start gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2.5 py-2",children:[(0,b.jsx)(p,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/80 mt-0.5","aria-hidden":"true"}),(0,b.jsxs)("p",{className:"text-[0.7rem] leading-relaxed text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-medium text-foreground",children:"Not enforced — paused."})," Enforcement was suspended for this session","cli"===a.pausedBy?" from the CLI":` by ${a.pausedBy}`,c?`, lifting at ${c}`:"",". Builtin, custom and convention policies did not run for this event; cloud-managed policies did."]})]})}let z=(0,s.createServerReference)("00d52bf1ee34860b13d1f1412ba807b98f7a5df567",s.callServer,void 0,s.findSourceMapURL,"getHooksConfigAction"),A=(0,s.createServerReference)("60485a52977137c6d7ef2e44cf19fd5b7bb916e5b3",s.callServer,void 0,s.findSourceMapURL,"toggleCustomPolicyAction"),B=(0,s.createServerReference)("60cdc2909eb18492296bceb8edd88c62c56ae88c5a",s.callServer,void 0,s.findSourceMapURL,"togglePolicyAction"),C=(0,s.createServerReference)("60dc60c4d1c270698834f13424cde98edd5837ff54",s.callServer,void 0,s.findSourceMapURL,"installHooksWebAction"),D=(0,s.createServerReference)("6049f00b947fcc3891546e76f668da4b5e565fbcc0",s.callServer,void 0,s.findSourceMapURL,"removeHooksWebAction"),E=(0,s.createServerReference)("602b463737926bd9f2d63ca11eeeb436a687a2219b",s.callServer,void 0,s.findSourceMapURL,"updatePolicyParamsAction");var F=a.i(6236),G=a.i(10765),H=a.i(90619),I=a.i(95947),J=a.i(87256);let K={claude:{PreToolUse:"block",UserPromptSubmit:"block",PermissionRequest:"block",Stop:"block",SubagentStop:"block",PreCompact:"block",PostToolBatch:"block",ConfigChange:"block",UserPromptExpansion:"block",TaskCreated:"block",TaskCompleted:"block",TeammateIdle:"block",Elicitation:"block",ElicitationResult:"block",PostToolUse:"observe",PostToolUseFailure:"observe",SessionStart:"observe",Setup:"observe",SubagentStart:"observe",SessionEnd:"observe",StopFailure:"observe",PermissionDenied:"observe",Notification:"observe",InstructionsLoaded:"observe",CwdChanged:"observe",FileChanged:"observe",PostCompact:"observe",WorktreeRemove:"observe"},codex:{PreToolUse:"block",PermissionRequest:"block",UserPromptSubmit:"block",Stop:"block",SubagentStop:"block",PostToolUse:"block",SessionStart:"observe",SubagentStart:"observe",PreCompact:"observe",PostCompact:"observe"},copilot:{PreToolUse:"block",Stop:"block",SubagentStop:"block",UserPromptSubmit:"block",PermissionRequest:"block",PostToolUse:"block",SessionStart:"observe",SessionEnd:"observe",PostToolUseFailure:"observe",PreCompact:"observe",Notification:"observe"},cursor:{PreToolUse:"block",Stop:"block",UserPromptSubmit:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe"},opencode:{PreToolUse:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe",UserPromptSubmit:"observe",PermissionRequest:"observe"},pi:{PreToolUse:"block",UserPromptSubmit:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe",Stop:"observe"},hermes:{PreToolUse:"block",PostToolUse:"observe",SubagentStop:"observe",SessionStart:"observe",SessionEnd:"observe"},openclaw:{PreToolUse:"block",UserPromptSubmit:"block",Stop:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe",SubagentStop:"observe",PreCompact:"observe"},factory:{PreToolUse:"block",UserPromptSubmit:"block",Stop:"block",PreCompact:"block",PostToolUse:"observe",SubagentStop:"observe",SessionStart:"observe",SessionEnd:"observe",Notification:"observe"},devin:{PreToolUse:"block",UserPromptSubmit:"block",Stop:"block",PermissionRequest:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe"},antigravity:{PreToolUse:"block",Stop:"block",PostToolUse:"observe",UserPromptSubmit:"observe"},goose:{PreToolUse:"block",UserPromptSubmit:"observe",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe"}};var L=a.i(80977),M=a.i(40695);function N({sessionId:a,transcriptPath:c,integration:d,cwd:f}){if(!a)return(0,b.jsx)("span",{className:"text-muted-foreground",children:"\\u2014"});let g=a?a.slice(0,8):"—",h="codex"===d||(c?.includes("/.codex/")??!1),i="copilot"===d||(c?.includes("/.copilot/session-state/")??!1),j="cursor"===d||(c?.includes("/.cursor/")??!1),k="opencode"===d||(c?.includes("/.local/share/opencode/")??!1)||(c?.includes("/.opencode/")??!1),l="pi"===d||(c?.includes("/.pi/")??!1);if(h||i||j||k||l){let c,d=f?(c=/^([A-Za-z]):[\\/](.*)$/.exec(f))?c[1]+"--"+c[2].replace(/[\\/]/g,"-"):f.replace(/[\\/]/g,"-"):h?"codex":i?"copilot":j?"cursor":k?"opencode":"pi";return(0,b.jsx)(e.default,{href:`/project/${encodeURIComponent(d)}/session/${encodeURIComponent(a)}`,className:"text-primary hover:underline font-mono",onClick:a=>a.stopPropagation(),children:g})}let m=c?function(a){let b=a.replace(/\\/g,"/").split("/").filter(Boolean);if(b.length<2)return null;let c=b[b.length-2];return!c||c.startsWith(".")?null:c}(c):null;return m?(0,b.jsx)(e.default,{href:`/project/${encodeURIComponent(m)}/session/${encodeURIComponent(a)}`,className:"text-primary hover:underline font-mono",onClick:a=>a.stopPropagation(),children:g}):(0,b.jsx)("span",{className:"text-muted-foreground font-mono",children:g})}function O({decision:a}){return"deny"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,b.jsx)(o,{className:"h-3 w-3"}),"Deny"]}):"instruct"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,b.jsx)(m,{className:"h-3 w-3"}),"Instruct"]}):(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,b.jsx)(n,{className:"h-3 w-3"}),"Allow"]})}function P({eventType:a}){return(0,b.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:a})}function Q({integration:a}){if(!a)return null;let c=(0,J.getCliLabel)(a),d=(0,J.getCliBadgeClasses)(a);return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${d}`,title:`Agent CLI: ${c}`,children:c})}function R({mode:a}){let c="default"===a;return(0,b.jsx)("span",{title:a,className:`inline-block max-w-full truncate rounded px-1.5 py-0.5 align-middle text-[0.6rem] font-medium border ${c?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:a})}function S({ms:a}){return(0,b.jsx)("span",{className:`font-mono text-[0.7rem] ${a>500?"text-red-400":a>100?"text-amber-400":"text-muted-foreground"}`,children:a<1e3?`${a}ms`:`${(a/1e3).toFixed(1)}s`})}function T({text:a,field:d}){let[e,g]=(0,c.useState)(!1),{capture:h}=(0,G.usePostHog)(),i=async b=>{b.stopPropagation(),h("activity_copy_clicked",{field:d??"unknown"});try{await navigator.clipboard.writeText(a),g(!0),setTimeout(()=>g(!1),1500)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b),g(!0),setTimeout(()=>g(!1),1500)}};return(0,b.jsx)("button",{onClick:i,className:"inline-flex items-center justify-center h-5 w-5 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors",title:"Copy",children:e?(0,b.jsx)(f.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(j.Copy,{className:"h-3 w-3"})})}function U({value:a,onChange:c}){return(0,b.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(d=>(0,b.jsx)("button",{onClick:()=>c(d.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${a===d.value?"deny"===d.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===d.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===d.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:d.label},d.value))})}function V({stats:a}){let c=a.totalEvents>0?a.denyCount/a.totalEvents*100:0,d=c.toFixed(c>=10?0:1),e=0===a.denyCount?"":c>=5?" is-deny":c>=2?" is-warn":"";return(0,b.jsxs)("div",{className:"stat-bar",role:"group","aria-label":"Activity stats",children:[(0,b.jsxs)("div",{className:"stat-cell",children:[(0,b.jsx)("span",{className:"eyebrow",children:"total events"}),(0,b.jsx)("span",{className:"value",children:a.totalEvents.toLocaleString()}),(0,b.jsx)("span",{className:"meta",children:"across all installed agents"})]}),(0,b.jsxs)("div",{className:"stat-cell",children:[(0,b.jsx)("span",{className:"eyebrow",children:"deny rate"}),(0,b.jsxs)("span",{className:`value${e}`,children:[d,"%"]}),(0,b.jsxs)("span",{className:"meta",children:[a.denyCount.toLocaleString()," of ",a.totalEvents.toLocaleString()," denied"]})]}),(0,b.jsxs)("div",{className:"stat-cell",children:[(0,b.jsx)("span",{className:"eyebrow",children:"top policy"}),(0,b.jsx)("span",{className:"value",style:{fontSize:16,fontWeight:500,color:a.topPolicy?"var(--accent-pink)":"var(--dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:a.topPolicy??void 0,children:a.topPolicy??"—"}),(0,b.jsx)("span",{className:"meta",children:"most-evaluated policy in scope"})]})]})}function W({item:a}){if("observe"!==function(a,b){if(!a||!b)return;let c=K[a];if(c)return c[b]}(a.integration,a.eventType))return null;let c=a.matchedPolicies??[];if(0===c.length)return null;let d=a.integration?(0,J.getCliLabel)(a.integration):"This CLI",e=c.map(a=>a.replace(/^(custom|\.failproofai-(project|user))\//,"")),f=1===e.length?e[0]:`${e.length} policies`,g="deny"===a.decision;return(0,b.jsxs)("div",{className:"sm:col-span-2 lg:col-span-3 mt-1 flex items-start gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2.5 py-2",children:[(0,b.jsx)(p,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/80 mt-0.5","aria-hidden":"true"}),(0,b.jsxs)("p",{className:"text-[0.7rem] leading-relaxed text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-medium text-foreground",children:g?"Not enforced.":"Ran, but cannot enforce here."})," ",(0,b.jsx)("span",{className:"font-mono",children:f})," ran on"," ",(0,b.jsx)("span",{className:"font-mono",children:a.eventType}),", but ",d," discards hook verdicts for this event",g?" — the action went ahead anyway.":", so a policy cannot block here."," ","Move the check to an event ",d," enforces on, such as"," ",(0,b.jsx)("span",{className:"font-mono",children:"PreToolUse"}),"."]})]})}function X({item:a}){return(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:11,className:"px-0 py-0",children:(0,b.jsxs)("div",{className:"activity-detail animate-expand text-xs",children:[(0,b.jsxs)("span",{className:"activity-detail-eyebrow",children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"▾"}),"event detail"]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-2",children:[(0,b.jsx)(y,{item:a}),(0,b.jsx)(W,{item:a}),a.policySource&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Decided by: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:"cloud"===a.policySource&&a.cloudPolicyId?`cloud \xb7 ${a.cloudPolicyId} version ${a.cloudVersion}`:a.policySource})]}),void 0!==a.cloudDeployment&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Cloud deployment: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.cloudDeployment})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.sessionId??"—"}),a.sessionId&&(0,b.jsx)(T,{text:a.sessionId,field:"session_id"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.cwd??"—"}),a.cwd&&(0,b.jsx)(T,{text:a.cwd,field:"cwd"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,b.jsx)("span",{className:"font-mono text-foreground break-all",children:a.transcriptPath??"—"}),a.transcriptPath?.startsWith("opencode-db://")&&(0,b.jsx)("span",{className:"text-muted-foreground ml-1",children:"(stored in opencode DB)"})]})]}),a.policyNames&&a.policyNames.length>1&&(0,b.jsxs)("div",{style:{marginTop:8},children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Policies: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.policyNames.join(", ")})]}),a.reason&&(0,b.jsxs)("div",{style:{marginTop:8},children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,b.jsx)("span",{className:"text-foreground",children:a.reason})]})]})})})}function Y({hooksInstalled:a,onSwitchTab:d}){let{intervalSec:e}=(0,F.useAutoRefresh)(),{capture:f}=(0,G.usePostHog)(),h=(0,H.useUrlParams)(),i=(0,c.useRef)(!1),[j,k]=(0,c.useState)(()=>(0,I.paramToPage)(h.get("page"))),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)([]),[q,s]=(0,c.useState)(null),[y,z]=(0,c.useState)(()=>{let a=h.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[A,B]=(0,c.useState)(()=>h.get("event")??""),[C,D]=(0,c.useState)(()=>h.get("policy")??""),[E,K]=(0,c.useState)(()=>h.get("session")??""),[M,T]=(0,c.useState)(()=>{let a=h.get("cli");return(0,J.isKnownCli)(a)?a:""}),[W,Z]=(0,c.useState)(()=>{let a=h.get("source");return"builtin"===a||"custom"===a||"convention"===a||"cloud"===a?a:""}),$=(0,c.useRef)(null),_=(0,c.useRef)(!0),aa=(0,c.useRef)({filterDecision:y,filterEventType:A,filterPolicy:C,filterSessionId:E,filterCli:M,filterSource:W});aa.current={filterDecision:y,filterEventType:A,filterPolicy:C,filterSessionId:E,filterCli:M,filterSource:W},(0,c.useEffect)(()=>{if(!i.current){i.current=!0;return}h.setAll({decision:y||void 0,event:A||void 0,policy:C||void 0,session:E||void 0,cli:M||void 0,source:W||void 0,page:(0,I.pageToParam)(j)})},[y,A,C,E,M,W,j]);let ab=""!==y||""!==A||""!==C||""!==E||""!==M||""!==W,ac=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e,filterSessionId:f,filterCli:g,filterSource:h}=aa.current;b=""!==c||""!==d||""!==e||""!==f||""!==g||""!==h?await u({decision:c||void 0,eventType:d||void 0,policyName:e||void 0,sessionId:f||void 0,integration:g||void 0,source:h||void 0},a):await t(a),n(b)}catch{}},[]);(0,c.useEffect)(()=>{ac(j);let a=setInterval(()=>ac(j),e>0?1e3*e:5e3);return()=>clearInterval(a)},[j,ac,e]),(0,c.useEffect)(()=>{let a=!1,b=()=>{v().then(b=>{a||p(b)}).catch(()=>{})};b();let c=setInterval(b,e>0?1e3*e:5e3);return()=>{a=!0,clearInterval(c)}},[e]),(0,c.useEffect)(()=>($.current&&clearTimeout($.current),$.current=setTimeout(()=>{if(k(1),s(null),ac(1),_.current){_.current=!1;return}f("activity_filter_changed",{active_filter_count:+(""!==y)+ +(""!==A)+ +(""!==C)+ +(""!==E)+ +(""!==M),has_decision:""!==y,has_event_type:""!==A,has_policy:""!==C,has_session:""!==E,has_cli:""!==M,decision:y||null,event_type:A||null,cli:M||null})},300),()=>{$.current&&clearTimeout($.current)}),[y,A,C,E,M]);let ad=m?.entries??[],ae=m?.totalPages??1;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(w,{pauses:o}),m?.stats&&m.stats.totalEvents>0&&(0,b.jsx)("div",{style:{marginBottom:18},children:(0,b.jsx)(V,{stats:m.stats})}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"filter-bar",children:[(0,b.jsxs)("div",{className:"filter-group",children:[(0,b.jsx)("span",{className:"filter-label",children:"decision"}),(0,b.jsx)(U,{value:y,onChange:z})]}),(0,b.jsxs)("div",{className:"filter-group",children:[(0,b.jsx)("span",{className:"filter-label",children:"event"}),(0,b.jsxs)("select",{value:A,onChange:a=>B(a.target.value),className:"filter-input",children:[(0,b.jsx)("option",{value:"",children:"all events"}),(0,b.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,b.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,b.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,b.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,b.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,b.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]})]}),(0,b.jsxs)("div",{className:"filter-group",children:[(0,b.jsx)("span",{className:"filter-label",children:"source"}),(0,b.jsxs)("select",{value:W,onChange:a=>{let b=a.target.value;Z("builtin"===b||"custom"===b||"convention"===b||"cloud"===b?b:"")},className:"filter-input","aria-label":"Filter by policy source",children:[(0,b.jsx)("option",{value:"",children:"all sources"}),(0,b.jsx)("option",{value:"builtin",children:"builtin"}),(0,b.jsx)("option",{value:"custom",children:"custom"}),(0,b.jsx)("option",{value:"convention",children:"convention"}),(0,b.jsx)("option",{value:"cloud",children:"cloud"})]})]}),(0,b.jsxs)("div",{className:"filter-group",children:[(0,b.jsx)("span",{className:"filter-label",children:"cli"}),(0,b.jsxs)("select",{value:M,onChange:a=>{let b=a.target.value;T(""===b||(0,J.isKnownCli)(b)?b:"")},className:"filter-input","aria-label":"Filter by CLI",children:[(0,b.jsx)("option",{value:"",children:"all clis"}),J.KNOWN_CLI_IDS.map(a=>(0,b.jsx)("option",{value:a,children:(0,J.getCliLabel)(a)},a))]})]}),(0,b.jsxs)("div",{className:"filter-group filter-group--grow",children:[(0,b.jsx)("span",{className:"filter-label",children:"policy"}),(0,b.jsx)("input",{type:"text",value:C,onChange:a=>D(a.target.value),placeholder:"filter by policy…",className:"filter-input"})]}),(0,b.jsxs)("div",{className:"filter-group filter-group--grow",children:[(0,b.jsx)("span",{className:"filter-label",children:"session"}),(0,b.jsx)("input",{type:"text",value:E,onChange:a=>K(a.target.value),placeholder:"filter by session…",className:"filter-input"})]}),ab&&(0,b.jsx)("button",{type:"button",className:"filter-clear",onClick:()=>{z(""),B(""),T(""),D(""),K(""),Z("")},"aria-label":"Clear all filters",children:"[ clear ]"})]}),0===ad.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4 text-center",children:[(0,b.jsx)(l,{className:"h-12 w-12 text-muted-foreground/30"}),!1===a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4 font-medium",children:"Policies are not installed"}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:["Go to the"," ",(0,b.jsx)("button",{className:"underline hover:text-foreground transition-colors",onClick:()=>d?.("policies"),children:"Policies tab"})," ","and click ",(0,b.jsx)("span",{className:"font-mono bg-muted px-1 rounded",children:"Install"})," to enable policy monitoring."]})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:ab?"No matching activity.":"Waiting for hook events…"})]}):(0,b.jsx)("div",{className:"overflow-x-auto activity-table-wrap",children:(0,b.jsxs)("table",{className:"w-full text-xs activity-table",style:{tableLayout:"fixed"},children:[(0,b.jsxs)("colgroup",{children:[(0,b.jsx)("col",{style:{width:32}}),(0,b.jsx)("col",{style:{width:"7%"}}),(0,b.jsx)("col",{style:{width:"9%"}}),(0,b.jsx)("col",{style:{width:"12%"}}),(0,b.jsx)("col",{style:{width:"11%"}}),(0,b.jsx)("col",{style:{width:"9%"}}),(0,b.jsx)("col",{style:{width:"13%"}}),(0,b.jsx)("col",{style:{width:"12%"}}),(0,b.jsx)("col",{style:{width:"11%"}}),(0,b.jsx)("col",{style:{width:"8%"}}),(0,b.jsx)("col",{style:{width:"8%"}})]}),(0,b.jsx)("thead",{className:"activity-thead",children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{className:"px-4 py-3"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Time"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Decision"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Event"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"CLI"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Tool"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Policy"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Reason"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Mode"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Session"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/30",children:ad.map((a,d)=>{let e="deny"===a.decision,h=q===d,i="instruct"===a.decision;return(0,b.jsxs)(c.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{s(a=>{let b=a===d?null:d,c=ad[d];return f("activity_row_toggled",{expanded:null!==b,decision:c?.decision??null,policy_name:c?.policyName??null,event_type:c?.eventType??null}),b})},className:`activity-data-row cursor-pointer transition-colors ${e?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":i?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":d%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${h?"bg-muted/20":""}`,children:[(0,b.jsx)("td",{className:"px-4 py-2",children:(0,b.jsx)(g.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${h?"rotate-0":"-rotate-90"}`})}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground whitespace-nowrap",title:new Date(a.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(0,L.formatRelativeTime)(a.timestamp)}),(0,b.jsxs)("td",{className:"px-3 py-2",children:[(0,b.jsx)(O,{decision:a.decision}),a.pausedBy&&(0,b.jsx)(x,{})]}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(P,{eventType:a.eventType})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(Q,{integration:a.integration})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.toolName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.policyNames&&a.policyNames.length>1?(0,b.jsxs)("span",{title:a.policyNames.join(", "),children:[a.policyNames[0],(0,b.jsxs)("span",{className:"text-muted-foreground text-[0.6rem]",children:[" +",a.policyNames.length-1]})]}):a.policyName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate",title:a.reason??"",children:a.reason??"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(R,{mode:a.permissionMode}):"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(S,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2",title:a.sessionId??"",children:(0,b.jsx)(N,{sessionId:a.sessionId,transcriptPath:a.transcriptPath,integration:a.integration,cwd:a.cwd})})]}),h&&(0,b.jsx)(X,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(r.default,{currentPage:j,totalPages:ae,onPageChange:a=>{f("activity_pagination_changed",{from_page:j,to_page:a,total_pages:ae}),k(a),s(null)}})]})]})}function Z({enabled:a,onChange:c,disabled:d}){return(0,b.jsx)("button",{onClick:c,disabled:d,className:`relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors disabled:opacity-40 ${a?"bg-emerald-500":"bg-muted-foreground/30"}`,"aria-label":a?"Disable policy":"Enable policy",children:(0,b.jsx)("span",{className:`inline-block h-3 w-3 rounded-full bg-white shadow transition-transform ${a?"translate-x-3.5":"translate-x-0.5"}`})})}function $({policy:a,onClose:d,onSave:e}){let f=a.params??{},g=a.currentParams??{},[h,i]=(0,c.useState)(()=>{let a={};for(let[b,c]of Object.entries(f)){let d=b in g?g[b]:c.default;a[b]=d}return a});(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&d()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[d]);let j=(a,b)=>{i(c=>({...c,[a]:b}))};return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:a=>{a.target===a.currentTarget&&d()},children:(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg shadow-xl w-full max-w-lg mx-4 max-h-[80vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-mono font-semibold text-foreground",children:a.name}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.description})]}),(0,b.jsx)("button",{onClick:d,className:"text-muted-foreground hover:text-foreground transition-colors",children:(0,b.jsx)(q.X,{className:"h-4 w-4"})})]}),(0,b.jsx)("div",{className:"overflow-y-auto flex-1 px-4 py-4 space-y-4",children:Object.entries(f).map(([a,c])=>(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-semibold text-foreground mb-1 font-mono",children:a}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mb-1.5",children:c.description}),((a,c)=>{let d=h[a];if("boolean"===c.type)return(0,b.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,b.jsx)("input",{type:"checkbox",checked:!!d,onChange:b=>j(a,b.target.checked),className:"rounded border-border"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:c.description})]});if("number"===c.type)return(0,b.jsx)("input",{type:"number",value:"number"==typeof d?d:"",onChange:b=>j(a,Number(b.target.value)),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"});if("string[]"===c.type){let c=Array.isArray(d)?d.join("\n"):"";return(0,b.jsx)("textarea",{value:c,onChange:b=>j(a,b.target.value.split("\n").filter(a=>""!==a.trim())),rows:4,placeholder:"One entry per line",className:"w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground font-mono focus:outline-none focus:ring-2 focus:ring-primary/40 resize-y"})}if("pattern[]"===c.type){let c=Array.isArray(d)?d:[];return(0,b.jsxs)("div",{className:"space-y-1.5",children:[c.map((d,e)=>(0,b.jsxs)("div",{className:"flex gap-1.5 items-center",children:[(0,b.jsx)("input",{type:"text",value:d.regex,onChange:b=>{let d=[...c];d[e]={...d[e],regex:b.target.value},j(a,d)},placeholder:"regex",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,b.jsx)("input",{type:"text",value:d.label,onChange:b=>{let d=[...c];d[e]={...d[e],label:b.target.value},j(a,d)},placeholder:"label",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,b.jsx)("button",{onClick:()=>j(a,c.filter((a,b)=>b!==e)),className:"text-muted-foreground/50 hover:text-destructive transition-colors",children:(0,b.jsx)(q.X,{className:"h-3.5 w-3.5"})})]},e)),(0,b.jsx)("button",{onClick:()=>j(a,[...c,{regex:"",label:""}]),className:"text-xs text-primary hover:underline",children:"+ Add pattern"})]})}return(0,b.jsx)("input",{type:"text",value:"string"==typeof d?d:"",onChange:b=>j(a,b.target.value),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"})})(a,c)]},a))}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-border",children:[(0,b.jsx)(M.Button,{variant:"outline",size:"sm",onClick:d,className:"h-7 text-xs",children:"Cancel"}),(0,b.jsx)(M.Button,{size:"sm",onClick:()=>e(h),className:"h-7 text-xs",children:"Save"})]})]})})}function _({message:a,onDismiss:c,onInstall:e,isPending:f}){let{capture:g}=(0,G.usePostHog)();return(0,d.createPortal)((0,b.jsxs)("div",{className:"fixed top-4 right-4 z-[9999] w-full max-w-sm",style:{animation:"slideInFromRight 0.25s ease-out"},children:[(0,b.jsx)("style",{children:`
1
+ module.exports=[22712,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(35112),e=a.i(38246),f=a.i(52562),g=a.i(89027),h=a.i(64831);let i=(0,h.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);var j=a.i(85650);let k=(0,h.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),l=(0,h.default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var m=a.i(41476);let n=(0,h.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),o=(0,h.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),p=(0,h.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),q=(0,h.default)("shield-x",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]),r=(0,h.default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),s=(0,h.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var t=a.i(74215),u=a.i(65967),v=a.i(5050);let w=(0,v.createServerReference)("40578b411fdce1e4664870bb5dba3836870e70e851",v.callServer,void 0,v.findSourceMapURL,"getHookActivityAction"),x=(0,v.createServerReference)("603e6b4163ee01b3593197316b81b795e1f53b8c2f",v.callServer,void 0,v.findSourceMapURL,"searchHookActivityAction"),y=(0,v.createServerReference)("007e3b4cc182529851a91f6c969c76db68c5175ef3",v.callServer,void 0,v.findSourceMapURL,"getActivePausesAction");function z({pauses:a,now:d}){let[e,f]=(0,c.useState)(()=>Date.now());(0,c.useEffect)(()=>{let a=setInterval(()=>f(Date.now()),3e4);return()=>clearInterval(a)},[]);let g=d??e,h=a.filter(a=>a.expiresAt>g);if(0===h.length)return null;let i=h.reduce((a,b)=>a.expiresAt<b.expiresAt?a:b);return(0,b.jsxs)("div",{role:"status",className:"mb-4 flex items-start gap-2.5 rounded border border-amber-500/40 bg-amber-500/[0.07] px-3 py-2.5",children:[(0,b.jsx)(o,{className:"h-4 w-4 shrink-0 text-amber-500 mt-0.5","aria-hidden":"true"}),(0,b.jsxs)("div",{className:"text-xs leading-relaxed",children:[(0,b.jsxs)("p",{className:"font-medium text-foreground",children:["Enforcement is paused for ",h.length," session",1===h.length?"":"s"," —"," ",function(a){if(a<=0)return"expiring now";if(a<6e4)return"under a minute";let b=Math.round(a/6e4);if(b<60)return`${b}m`;let c=Math.floor(b/60),d=b%60;return 0===d?`${c}h`:`${c}h${d}m`}(i.expiresAt-g)," left",h.length>1?" on the next to expire":"","."]}),(0,b.jsxs)("p",{className:"text-muted-foreground mt-0.5",children:["Builtin, custom and convention policies are suspended for"," ",1===h.length?"that session":"those sessions","; cloud-managed policies keep enforcing. It lifts on its own — or run"," ",(0,b.jsx)("span",{className:"font-mono text-foreground",children:"failproofai config --resume"}),"."]})]})]})}function A(){return(0,b.jsx)("span",{title:"Enforcement was paused for this session — local policies did not run",className:"ml-1.5 inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium uppercase tracking-wide border border-amber-500/40 bg-amber-500/10 text-amber-600 dark:text-amber-500",children:"paused"})}function B({item:a}){if(!a.pausedBy)return null;let c="number"==typeof a.pauseExpiresAt?new Date(a.pauseExpiresAt).toLocaleTimeString():null;return(0,b.jsxs)("div",{className:"sm:col-span-2 lg:col-span-3 mt-1 flex items-start gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2.5 py-2",children:[(0,b.jsx)(s,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/80 mt-0.5","aria-hidden":"true"}),(0,b.jsxs)("p",{className:"text-[0.7rem] leading-relaxed text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-medium text-foreground",children:"Not enforced — paused."})," Enforcement was suspended for this session","cli"===a.pausedBy?" from the CLI":` by ${a.pausedBy}`,c?`, lifting at ${c}`:"",". Builtin, custom and convention policies did not run for this event; cloud-managed policies did."]})]})}let C=(0,v.createServerReference)("0057a17ef96ec19dadf4460567e939300491cb5eab",v.callServer,void 0,v.findSourceMapURL,"getHooksConfigAction"),D=(0,v.createServerReference)("6081a916930aa222c118604ea26aa112e7051fa4bf",v.callServer,void 0,v.findSourceMapURL,"toggleCustomPolicyAction"),E=(0,v.createServerReference)("009ecb2cb3ca91f63f018c880cc1e7dd62a55228c8",v.callServer,void 0,v.findSourceMapURL,"addBundledPackWebAction"),F=(0,v.createServerReference)("60860f2ddf14c936449840f6ea2de8bf9378d02c5f",v.callServer,void 0,v.findSourceMapURL,"addPackWebAction"),G=(0,v.createServerReference)("404da387ad28977f9e05fae580e564e629b3cde906",v.callServer,void 0,v.findSourceMapURL,"previewPackWebAction"),H=(0,v.createServerReference)("40de6ba3e782c299e85d1e666b6bc68111930d8a95",v.callServer,void 0,v.findSourceMapURL,"removePackWebAction"),I=(0,v.createServerReference)("70d18fe420c3e625709a17033547c08b79e2496678",v.callServer,void 0,v.findSourceMapURL,"togglePackPolicyAction"),J=(0,v.createServerReference)("60b589101ddfb3e8dcf334afa160195ac192270b7a",v.callServer,void 0,v.findSourceMapURL,"installHooksWebAction"),K=(0,v.createServerReference)("60166803a51728c5d76210748e971fbc8ea6ee8128",v.callServer,void 0,v.findSourceMapURL,"removeHooksWebAction"),L=(0,v.createServerReference)("600d22456d1f6ef2bf88749cdd3b0a6530b2c5de25",v.callServer,void 0,v.findSourceMapURL,"updatePolicyParamsAction");var M=a.i(6236),N=a.i(10765),O=a.i(90619),P=a.i(95947),Q=a.i(87256);let R={claude:{PreToolUse:"block",UserPromptSubmit:"block",PermissionRequest:"block",Stop:"block",SubagentStop:"block",PreCompact:"block",PostToolBatch:"block",ConfigChange:"block",UserPromptExpansion:"block",TaskCreated:"block",TaskCompleted:"block",TeammateIdle:"block",Elicitation:"block",ElicitationResult:"block",PostToolUse:"observe",PostToolUseFailure:"observe",SessionStart:"observe",Setup:"observe",SubagentStart:"observe",SessionEnd:"observe",StopFailure:"observe",PermissionDenied:"observe",Notification:"observe",InstructionsLoaded:"observe",CwdChanged:"observe",FileChanged:"observe",PostCompact:"observe",WorktreeRemove:"observe"},codex:{PreToolUse:"block",PermissionRequest:"block",UserPromptSubmit:"block",Stop:"block",SubagentStop:"block",PostToolUse:"block",SessionStart:"observe",SubagentStart:"observe",PreCompact:"observe",PostCompact:"observe"},copilot:{PreToolUse:"block",Stop:"block",SubagentStop:"block",UserPromptSubmit:"block",PermissionRequest:"block",PostToolUse:"block",SessionStart:"observe",SessionEnd:"observe",PostToolUseFailure:"observe",PreCompact:"observe",Notification:"observe"},cursor:{PreToolUse:"block",Stop:"block",UserPromptSubmit:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe"},opencode:{PreToolUse:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe",UserPromptSubmit:"observe",PermissionRequest:"observe"},pi:{PreToolUse:"block",UserPromptSubmit:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe",Stop:"observe"},hermes:{PreToolUse:"block",PostToolUse:"observe",SubagentStop:"observe",SessionStart:"observe",SessionEnd:"observe"},openclaw:{PreToolUse:"block",UserPromptSubmit:"block",Stop:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe",SubagentStop:"observe",PreCompact:"observe"},factory:{PreToolUse:"block",UserPromptSubmit:"block",Stop:"block",PreCompact:"block",PostToolUse:"observe",SubagentStop:"observe",SessionStart:"observe",SessionEnd:"observe",Notification:"observe"},devin:{PreToolUse:"block",UserPromptSubmit:"block",Stop:"block",PermissionRequest:"block",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe"},antigravity:{PreToolUse:"block",Stop:"block",PostToolUse:"observe",UserPromptSubmit:"observe"},goose:{PreToolUse:"block",UserPromptSubmit:"observe",PostToolUse:"observe",SessionStart:"observe",SessionEnd:"observe"}};var S=a.i(80977),T=a.i(40695);function U({sessionId:a,transcriptPath:c,integration:d,cwd:f}){if(!a)return(0,b.jsx)("span",{className:"text-muted-foreground",children:"\\u2014"});let g=a?a.slice(0,8):"—",h="codex"===d||(c?.includes("/.codex/")??!1),i="copilot"===d||(c?.includes("/.copilot/session-state/")??!1),j="cursor"===d||(c?.includes("/.cursor/")??!1),k="opencode"===d||(c?.includes("/.local/share/opencode/")??!1)||(c?.includes("/.opencode/")??!1),l="pi"===d||(c?.includes("/.pi/")??!1);if(h||i||j||k||l){let c,d=f?(c=/^([A-Za-z]):[\\/](.*)$/.exec(f))?c[1]+"--"+c[2].replace(/[\\/]/g,"-"):f.replace(/[\\/]/g,"-"):h?"codex":i?"copilot":j?"cursor":k?"opencode":"pi";return(0,b.jsx)(e.default,{href:`/project/${encodeURIComponent(d)}/session/${encodeURIComponent(a)}`,className:"text-primary hover:underline font-mono",onClick:a=>a.stopPropagation(),children:g})}let m=c?function(a){let b=a.replace(/\\/g,"/").split("/").filter(Boolean);if(b.length<2)return null;let c=b[b.length-2];return!c||c.startsWith(".")?null:c}(c):null;return m?(0,b.jsx)(e.default,{href:`/project/${encodeURIComponent(m)}/session/${encodeURIComponent(a)}`,className:"text-primary hover:underline font-mono",onClick:a=>a.stopPropagation(),children:g}):(0,b.jsx)("span",{className:"text-muted-foreground font-mono",children:g})}function V({decision:a}){return"deny"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,b.jsx)(q,{className:"h-3 w-3"}),"Deny"]}):"instruct"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,b.jsx)(o,{className:"h-3 w-3"}),"Instruct"]}):(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,b.jsx)(p,{className:"h-3 w-3"}),"Allow"]})}function W({eventType:a}){return(0,b.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:a})}function X({integration:a}){if(!a)return null;let c=(0,Q.getCliLabel)(a),d=(0,Q.getCliBadgeClasses)(a);return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${d}`,title:`Agent CLI: ${c}`,children:c})}function Y({mode:a}){let c="default"===a;return(0,b.jsx)("span",{title:a,className:`inline-block max-w-full truncate rounded px-1.5 py-0.5 align-middle text-[0.6rem] font-medium border ${c?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:a})}function Z({ms:a}){return(0,b.jsx)("span",{className:`font-mono text-[0.7rem] ${a>500?"text-red-400":a>100?"text-amber-400":"text-muted-foreground"}`,children:a<1e3?`${a}ms`:`${(a/1e3).toFixed(1)}s`})}function $({text:a,field:d}){let[e,g]=(0,c.useState)(!1),{capture:h}=(0,N.usePostHog)(),i=async b=>{b.stopPropagation(),h("activity_copy_clicked",{field:d??"unknown"});try{await navigator.clipboard.writeText(a),g(!0),setTimeout(()=>g(!1),1500)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b),g(!0),setTimeout(()=>g(!1),1500)}};return(0,b.jsx)("button",{onClick:i,className:"inline-flex items-center justify-center h-5 w-5 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors",title:"Copy",children:e?(0,b.jsx)(f.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(j.Copy,{className:"h-3 w-3"})})}function _({value:a,onChange:c}){return(0,b.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(d=>(0,b.jsx)("button",{onClick:()=>c(d.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${a===d.value?"deny"===d.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===d.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===d.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:d.label},d.value))})}function aa({stats:a}){let c=a.totalEvents>0?a.denyCount/a.totalEvents*100:0,d=c.toFixed(c>=10?0:1),e=0===a.denyCount?"":c>=5?" is-deny":c>=2?" is-warn":"";return(0,b.jsxs)("div",{className:"stat-bar",role:"group","aria-label":"Activity stats",children:[(0,b.jsxs)("div",{className:"stat-cell",children:[(0,b.jsx)("span",{className:"eyebrow",children:"total events"}),(0,b.jsx)("span",{className:"value",children:a.totalEvents.toLocaleString()}),(0,b.jsx)("span",{className:"meta",children:"across all installed agents"})]}),(0,b.jsxs)("div",{className:"stat-cell",children:[(0,b.jsx)("span",{className:"eyebrow",children:"deny rate"}),(0,b.jsxs)("span",{className:`value${e}`,children:[d,"%"]}),(0,b.jsxs)("span",{className:"meta",children:[a.denyCount.toLocaleString()," of ",a.totalEvents.toLocaleString()," denied"]})]}),(0,b.jsxs)("div",{className:"stat-cell",children:[(0,b.jsx)("span",{className:"eyebrow",children:"top policy"}),(0,b.jsx)("span",{className:"value",style:{fontSize:16,fontWeight:500,color:a.topPolicy?"var(--accent-pink)":"var(--dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:a.topPolicy??void 0,children:a.topPolicy??"—"}),(0,b.jsx)("span",{className:"meta",children:"most-evaluated policy in scope"})]})]})}function ab({item:a}){if("observe"!==function(a,b){if(!a||!b)return;let c=R[a];if(c)return c[b]}(a.integration,a.eventType))return null;let c=a.matchedPolicies??[];if(0===c.length)return null;let d=a.integration?(0,Q.getCliLabel)(a.integration):"This CLI",e=c.map(a=>a.replace(/^(custom|\.failproofai-(project|user))\//,"")),f=1===e.length?e[0]:`${e.length} policies`,g="deny"===a.decision;return(0,b.jsxs)("div",{className:"sm:col-span-2 lg:col-span-3 mt-1 flex items-start gap-2 rounded border border-amber-500/30 bg-amber-500/5 px-2.5 py-2",children:[(0,b.jsx)(s,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/80 mt-0.5","aria-hidden":"true"}),(0,b.jsxs)("p",{className:"text-[0.7rem] leading-relaxed text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-medium text-foreground",children:g?"Not enforced.":"Ran, but cannot enforce here."})," ",(0,b.jsx)("span",{className:"font-mono",children:f})," ran on"," ",(0,b.jsx)("span",{className:"font-mono",children:a.eventType}),", but ",d," discards hook verdicts for this event",g?" — the action went ahead anyway.":", so a policy cannot block here."," ","Move the check to an event ",d," enforces on, such as"," ",(0,b.jsx)("span",{className:"font-mono",children:"PreToolUse"}),"."]})]})}function ac({item:a}){return(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:11,className:"px-0 py-0",children:(0,b.jsxs)("div",{className:"activity-detail animate-expand text-xs",children:[(0,b.jsxs)("span",{className:"activity-detail-eyebrow",children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"▾"}),"event detail"]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-2",children:[(0,b.jsx)(B,{item:a}),(0,b.jsx)(ab,{item:a}),a.policySource&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Decided by: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:"cloud"===a.policySource&&a.cloudPolicyId?`cloud \xb7 ${a.cloudPolicyId} version ${a.cloudVersion}`:a.policySource})]}),void 0!==a.cloudDeployment&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Cloud deployment: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.cloudDeployment})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.sessionId??"—"}),a.sessionId&&(0,b.jsx)($,{text:a.sessionId,field:"session_id"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.cwd??"—"}),a.cwd&&(0,b.jsx)($,{text:a.cwd,field:"cwd"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,b.jsx)("span",{className:"font-mono text-foreground break-all",children:a.transcriptPath??"—"}),a.transcriptPath?.startsWith("opencode-db://")&&(0,b.jsx)("span",{className:"text-muted-foreground ml-1",children:"(stored in opencode DB)"})]})]}),a.policyNames&&a.policyNames.length>1&&(0,b.jsxs)("div",{style:{marginTop:8},children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Policies: "}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.policyNames.join(", ")})]}),a.reason&&(0,b.jsxs)("div",{style:{marginTop:8},children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,b.jsx)("span",{className:"text-foreground",children:a.reason})]})]})})})}function ad({hooksInstalled:a,onSwitchTab:d}){let{intervalSec:e}=(0,M.useAutoRefresh)(),{capture:f}=(0,N.usePostHog)(),h=(0,O.useUrlParams)(),i=(0,c.useRef)(!1),[j,k]=(0,c.useState)(()=>(0,P.paramToPage)(h.get("page"))),[l,m]=(0,c.useState)(null),[o,p]=(0,c.useState)([]),[q,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(()=>{let a=h.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[v,B]=(0,c.useState)(()=>h.get("event")??""),[C,D]=(0,c.useState)(()=>h.get("policy")??""),[E,F]=(0,c.useState)(()=>h.get("session")??""),[G,H]=(0,c.useState)(()=>{let a=h.get("cli");return(0,Q.isKnownCli)(a)?a:""}),[I,J]=(0,c.useState)(()=>{let a=h.get("source");return"builtin"===a||"custom"===a||"convention"===a||"cloud"===a||"pack"===a?a:""}),K=(0,c.useRef)(null),L=(0,c.useRef)(!0),R=(0,c.useRef)({filterDecision:s,filterEventType:v,filterPolicy:C,filterSessionId:E,filterCli:G,filterSource:I});R.current={filterDecision:s,filterEventType:v,filterPolicy:C,filterSessionId:E,filterCli:G,filterSource:I},(0,c.useEffect)(()=>{if(!i.current){i.current=!0;return}h.setAll({decision:s||void 0,event:v||void 0,policy:C||void 0,session:E||void 0,cli:G||void 0,source:I||void 0,page:(0,P.pageToParam)(j)})},[s,v,C,E,G,I,j]);let T=""!==s||""!==v||""!==C||""!==E||""!==G||""!==I,$=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e,filterSessionId:f,filterCli:g,filterSource:h}=R.current;b=""!==c||""!==d||""!==e||""!==f||""!==g||""!==h?await x({decision:c||void 0,eventType:d||void 0,policyName:e||void 0,sessionId:f||void 0,integration:g||void 0,source:h||void 0},a):await w(a),m(b)}catch{}},[]);(0,c.useEffect)(()=>{$(j);let a=setInterval(()=>$(j),e>0?1e3*e:5e3);return()=>clearInterval(a)},[j,$,e]),(0,c.useEffect)(()=>{let a=!1,b=()=>{y().then(b=>{a||p(b)}).catch(()=>{})};b();let c=setInterval(b,e>0?1e3*e:5e3);return()=>{a=!0,clearInterval(c)}},[e]),(0,c.useEffect)(()=>(K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{if(k(1),r(null),$(1),L.current){L.current=!1;return}f("activity_filter_changed",{active_filter_count:+(""!==s)+ +(""!==v)+ +(""!==C)+ +(""!==E)+ +(""!==G),has_decision:""!==s,has_event_type:""!==v,has_policy:""!==C,has_session:""!==E,has_cli:""!==G,decision:s||null,event_type:v||null,cli:G||null})},300),()=>{K.current&&clearTimeout(K.current)}),[s,v,C,E,G]);let ab=l?.entries??[],ae=l?.totalPages??1;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(z,{pauses:o}),l?.stats&&l.stats.totalEvents>0&&(0,b.jsx)("div",{style:{marginBottom:18},children:(0,b.jsx)(aa,{stats:l.stats})}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"filter-bar",children:[(0,b.jsxs)("div",{className:"filter-group",children:[(0,b.jsx)("span",{className:"filter-label",children:"decision"}),(0,b.jsx)(_,{value:s,onChange:t})]}),(0,b.jsxs)("div",{className:"filter-group",children:[(0,b.jsx)("span",{className:"filter-label",children:"event"}),(0,b.jsxs)("select",{value:v,onChange:a=>B(a.target.value),className:"filter-input",children:[(0,b.jsx)("option",{value:"",children:"all events"}),(0,b.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,b.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,b.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,b.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,b.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,b.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]})]}),(0,b.jsxs)("div",{className:"filter-group",children:[(0,b.jsx)("span",{className:"filter-label",children:"source"}),(0,b.jsxs)("select",{value:I,onChange:a=>{let b=a.target.value;J("builtin"===b||"custom"===b||"convention"===b||"cloud"===b||"pack"===b?b:"")},className:"filter-input","aria-label":"Filter by policy source",children:[(0,b.jsx)("option",{value:"",children:"all sources"}),(0,b.jsx)("option",{value:"builtin",children:"builtin"}),(0,b.jsx)("option",{value:"custom",children:"custom"}),(0,b.jsx)("option",{value:"convention",children:"convention"}),(0,b.jsx)("option",{value:"cloud",children:"cloud"}),(0,b.jsx)("option",{value:"pack",children:"pack"})]})]}),(0,b.jsxs)("div",{className:"filter-group",children:[(0,b.jsx)("span",{className:"filter-label",children:"cli"}),(0,b.jsxs)("select",{value:G,onChange:a=>{let b=a.target.value;H(""===b||(0,Q.isKnownCli)(b)?b:"")},className:"filter-input","aria-label":"Filter by CLI",children:[(0,b.jsx)("option",{value:"",children:"all clis"}),Q.KNOWN_CLI_IDS.map(a=>(0,b.jsx)("option",{value:a,children:(0,Q.getCliLabel)(a)},a))]})]}),(0,b.jsxs)("div",{className:"filter-group filter-group--grow",children:[(0,b.jsx)("span",{className:"filter-label",children:"policy"}),(0,b.jsx)("input",{type:"text",value:C,onChange:a=>D(a.target.value),placeholder:"filter by policy…",className:"filter-input"})]}),(0,b.jsxs)("div",{className:"filter-group filter-group--grow",children:[(0,b.jsx)("span",{className:"filter-label",children:"session"}),(0,b.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),placeholder:"filter by session…",className:"filter-input"})]}),T&&(0,b.jsx)("button",{type:"button",className:"filter-clear",onClick:()=>{t(""),B(""),H(""),D(""),F(""),J("")},"aria-label":"Clear all filters",children:"[ clear ]"})]}),0===ab.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4 text-center",children:[(0,b.jsx)(n,{className:"h-12 w-12 text-muted-foreground/30"}),!1===a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4 font-medium",children:"Policies are not installed"}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:["Go to the"," ",(0,b.jsx)("button",{className:"underline hover:text-foreground transition-colors",onClick:()=>d?.("policies"),children:"Policies tab"})," ","and click ",(0,b.jsx)("span",{className:"font-mono bg-muted px-1 rounded",children:"Install"})," to enable policy monitoring."]})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:T?"No matching activity.":"Waiting for hook events…"})]}):(0,b.jsx)("div",{className:"overflow-x-auto activity-table-wrap",children:(0,b.jsxs)("table",{className:"w-full text-xs activity-table",style:{tableLayout:"fixed"},children:[(0,b.jsxs)("colgroup",{children:[(0,b.jsx)("col",{style:{width:32}}),(0,b.jsx)("col",{style:{width:"7%"}}),(0,b.jsx)("col",{style:{width:"9%"}}),(0,b.jsx)("col",{style:{width:"12%"}}),(0,b.jsx)("col",{style:{width:"11%"}}),(0,b.jsx)("col",{style:{width:"9%"}}),(0,b.jsx)("col",{style:{width:"13%"}}),(0,b.jsx)("col",{style:{width:"12%"}}),(0,b.jsx)("col",{style:{width:"11%"}}),(0,b.jsx)("col",{style:{width:"8%"}}),(0,b.jsx)("col",{style:{width:"8%"}})]}),(0,b.jsx)("thead",{className:"activity-thead",children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{className:"px-4 py-3"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Time"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Decision"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Event"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"CLI"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Tool"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Policy"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Reason"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Mode"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-3 activity-th",children:"Session"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/30",children:ab.map((a,d)=>{let e="deny"===a.decision,h=q===d,i="instruct"===a.decision;return(0,b.jsxs)(c.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{r(a=>{let b=a===d?null:d,c=ab[d];return f("activity_row_toggled",{expanded:null!==b,decision:c?.decision??null,policy_name:c?.policyName??null,event_type:c?.eventType??null}),b})},className:`activity-data-row cursor-pointer transition-colors ${e?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":i?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":d%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${h?"bg-muted/20":""}`,children:[(0,b.jsx)("td",{className:"px-4 py-2",children:(0,b.jsx)(g.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${h?"rotate-0":"-rotate-90"}`})}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground whitespace-nowrap",title:new Date(a.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(0,S.formatRelativeTime)(a.timestamp)}),(0,b.jsxs)("td",{className:"px-3 py-2",children:[(0,b.jsx)(V,{decision:a.decision}),a.pausedBy&&(0,b.jsx)(A,{})]}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(W,{eventType:a.eventType})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(X,{integration:a.integration})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.toolName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.policyNames&&a.policyNames.length>1?(0,b.jsxs)("span",{title:a.policyNames.join(", "),children:[a.policyNames[0],(0,b.jsxs)("span",{className:"text-muted-foreground text-[0.6rem]",children:[" +",a.policyNames.length-1]})]}):a.policyName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate",title:a.reason??"",children:a.reason??"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(Y,{mode:a.permissionMode}):"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(Z,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2",title:a.sessionId??"",children:(0,b.jsx)(U,{sessionId:a.sessionId,transcriptPath:a.transcriptPath,integration:a.integration,cwd:a.cwd})})]}),h&&(0,b.jsx)(ac,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(u.default,{currentPage:j,totalPages:ae,onPageChange:a=>{f("activity_pagination_changed",{from_page:j,to_page:a,total_pages:ae}),k(a),r(null)}})]})]})}function ae({enabled:a,onChange:c,disabled:d}){return(0,b.jsx)("button",{onClick:c,disabled:d,className:`relative inline-flex h-4 w-7 shrink-0 items-center rounded-full transition-colors disabled:opacity-40 ${a?"bg-emerald-500":"bg-muted-foreground/30"}`,"aria-label":a?"Disable policy":"Enable policy",children:(0,b.jsx)("span",{className:`inline-block h-3 w-3 rounded-full bg-white shadow transition-transform ${a?"translate-x-3.5":"translate-x-0.5"}`})})}function af({policy:a,onClose:d,onSave:e}){let f=a.params??{},g=a.currentParams??{},[h,i]=(0,c.useState)(()=>{let a={};for(let[b,c]of Object.entries(f)){let d=b in g?g[b]:c.default;a[b]=d}return a});(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&d()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[d]);let j=(a,b)=>{i(c=>({...c,[a]:b}))};return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:a=>{a.target===a.currentTarget&&d()},children:(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg shadow-xl w-full max-w-lg mx-4 max-h-[80vh] flex flex-col",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-mono font-semibold text-foreground",children:a.name}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.description})]}),(0,b.jsx)("button",{onClick:d,className:"text-muted-foreground hover:text-foreground transition-colors",children:(0,b.jsx)(t.X,{className:"h-4 w-4"})})]}),(0,b.jsx)("div",{className:"overflow-y-auto flex-1 px-4 py-4 space-y-4",children:Object.entries(f).map(([a,c])=>(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"block text-xs font-semibold text-foreground mb-1 font-mono",children:a}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mb-1.5",children:c.description}),((a,c)=>{let d=h[a];if("boolean"===c.type)return(0,b.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,b.jsx)("input",{type:"checkbox",checked:!!d,onChange:b=>j(a,b.target.checked),className:"rounded border-border"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:c.description})]});if("number"===c.type)return(0,b.jsx)("input",{type:"number",value:"number"==typeof d?d:"",onChange:b=>j(a,Number(b.target.value)),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"});if("string[]"===c.type){let c=Array.isArray(d)?d.join("\n"):"";return(0,b.jsx)("textarea",{value:c,onChange:b=>j(a,b.target.value.split("\n").filter(a=>""!==a.trim())),rows:4,placeholder:"One entry per line",className:"w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground font-mono focus:outline-none focus:ring-2 focus:ring-primary/40 resize-y"})}if("pattern[]"===c.type){let c=Array.isArray(d)?d:[];return(0,b.jsxs)("div",{className:"space-y-1.5",children:[c.map((d,e)=>(0,b.jsxs)("div",{className:"flex gap-1.5 items-center",children:[(0,b.jsx)("input",{type:"text",value:d.regex,onChange:b=>{let d=[...c];d[e]={...d[e],regex:b.target.value},j(a,d)},placeholder:"regex",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs font-mono focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,b.jsx)("input",{type:"text",value:d.label,onChange:b=>{let d=[...c];d[e]={...d[e],label:b.target.value},j(a,d)},placeholder:"label",className:"flex-1 h-6 rounded border border-border bg-background px-2 text-xs focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,b.jsx)("button",{onClick:()=>j(a,c.filter((a,b)=>b!==e)),className:"text-muted-foreground/50 hover:text-destructive transition-colors",children:(0,b.jsx)(t.X,{className:"h-3.5 w-3.5"})})]},e)),(0,b.jsx)("button",{onClick:()=>j(a,[...c,{regex:"",label:""}]),className:"text-xs text-primary hover:underline",children:"+ Add pattern"})]})}return(0,b.jsx)("input",{type:"text",value:"string"==typeof d?d:"",onChange:b=>j(a,b.target.value),className:"w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"})})(a,c)]},a))}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-border",children:[(0,b.jsx)(T.Button,{variant:"outline",size:"sm",onClick:d,className:"h-7 text-xs",children:"Cancel"}),(0,b.jsx)(T.Button,{size:"sm",onClick:()=>e(h),className:"h-7 text-xs",children:"Save"})]})]})})}function ag({message:a,onDismiss:c,onInstall:e,isPending:f}){let{capture:g}=(0,N.usePostHog)();return(0,d.createPortal)((0,b.jsxs)("div",{className:"fixed top-4 right-4 z-[9999] w-full max-w-sm",style:{animation:"slideInFromRight 0.25s ease-out"},children:[(0,b.jsx)("style",{children:`
2
2
  @keyframes slideInFromRight {
3
3
  from { transform: translateX(calc(100% + 1rem)); opacity: 0; }
4
4
  to { transform: translateX(0); opacity: 1; }
5
5
  }
6
- `}),(0,b.jsxs)("div",{className:"rounded-lg border border-red-500/40 bg-red-950/95 shadow-2xl shadow-red-900/40 overflow-hidden backdrop-blur-sm",children:[(0,b.jsx)("div",{className:"h-0.5 w-full bg-gradient-to-r from-red-600 via-red-400 to-red-600"}),(0,b.jsxs)("div",{className:"p-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"shrink-0 mt-0.5 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 ring-2 ring-red-500/30",children:(0,b.jsx)(q.X,{className:"h-3 w-3 text-white",strokeWidth:3})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:"text-[0.65rem] font-bold uppercase tracking-widest text-red-400 mb-0.5",children:"Error"}),(0,b.jsx)("p",{className:"text-sm text-red-100 leading-snug",children:a})]}),(0,b.jsx)("button",{onClick:c,className:"shrink-0 -mt-0.5 -mr-0.5 rounded p-0.5 text-red-400/60 transition-colors hover:bg-red-500/20 hover:text-red-200","aria-label":"Dismiss",children:(0,b.jsx)(q.X,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,b.jsx)(M.Button,{size:"sm",onClick:()=>{g("hooks_install_from_error_clicked",{error_message:a.slice(0,200)}),c(),e()},disabled:f,className:"h-7 flex-1 border-0 bg-red-500 px-3 text-xs font-semibold text-white hover:bg-red-400 disabled:opacity-50",children:"Install hooks"}),(0,b.jsx)(M.Button,{variant:"ghost",size:"sm",onClick:c,className:"h-7 px-3 text-xs text-red-400 hover:bg-red-500/10 hover:text-red-200",children:"Dismiss"})]})]})]})]}),document.body)}function aa({onHooksInstallChange:a}){let[d,e]=(0,c.useState)(null),[f,g]=(0,c.useTransition)(),[h,j]=(0,c.useState)(null),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(()=>new Set),s=(0,c.useRef)(!1),{capture:t}=(0,G.usePostHog)(),u=(0,c.useCallback)((a,b)=>{t("action_error_displayed",{error_type:a,error_message:b.slice(0,200)}),j(b)},[t]),v=(0,c.useCallback)(async()=>{try{let b=await z();e(b),a?.(b.clis.some(a=>a.installed))}catch{}},[a]);(0,c.useEffect)(()=>{v()},[v]),(0,c.useEffect)(()=>{d&&(s.current?r(new Set(d.clis.filter(a=>a.installed).map(a=>a.id))):(s.current=!0,r(new Set(d.clis.filter(a=>a.installed||a.detected).map(a=>a.id)))))},[d?.clis]);let w=(0,c.useMemo)(()=>new Set((d?.clis??[]).filter(a=>a.installed).map(a=>a.id)),[d?.clis]),x=(0,c.useMemo)(()=>{let a=[],b=[];for(let c of d?.clis??[]){let d=q.has(c.id);d&&!w.has(c.id)&&a.push(c.id),!d&&w.has(c.id)&&b.push(c.id)}return{toInstall:a,toRemove:b}},[d?.clis,q,w]),y=x.toInstall.length>0||x.toRemove.length>0,F=(a,b)=>{d&&(e(c=>c?{...c,customPolicies:c.customPolicies?.map(c=>c.id===a?{...c,enabled:!b}:c),conventionPolicies:c.conventionPolicies.map(c=>({...c,policies:c.policies.map(c=>c.id===a?{...c,enabled:!b}:c)}))}:c),g(async()=>{try{await A(a,!b)}catch{u("custom_policy_toggle","Failed to save custom policy change."),v()}}))},H=()=>{let{toInstall:a,toRemove:b}=x;(0!==a.length||0!==b.length)&&(t("cli_install_remove_submitted",{to_install:a,to_remove:b,count_install:a.length,count_remove:b.length}),g(async()=>{try{j(null),a.length>0&&await C("user",a),b.length>0&&await D("user",b)}catch(a){u("cli_apply",a instanceof Error?a.message:"Failed to apply changes.")}finally{await v()}}))};if(!d)return(0,b.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,b.jsxs)("span",{className:"text-sm text-muted-foreground",children:["Loading","…"]})});let I=d.clis.some(a=>a.installed),K=w.size,L=q.size,N=Array.from(new Set(d.policies.map(a=>a.category)));return(0,b.jsxs)(b.Fragment,{children:[o&&(0,b.jsx)($,{policy:o,onClose:()=>{t("policy_config_modal_closed",{policy_name:o.name,action:"cancel"}),p(null)},onSave:a=>{if(!o)return;let b=o.name;p(null),g(async()=>{try{j(null),await E(b,a),await v()}catch(a){u("param_update",a instanceof Error?a.message:"Failed to save configuration.")}})}}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 px-5 py-3.5 border-b border-border/60 bg-muted/10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 min-w-0 flex-wrap",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:`h-2 w-2 rounded-full transition-shadow ${I?"bg-emerald-400 shadow-[0_0_8px_rgba(52,211,153,0.6)]":"bg-muted-foreground/40"}`,"aria-hidden":!0}),(0,b.jsx)("span",{className:"text-[0.65rem] uppercase tracking-[0.2em] font-mono text-foreground/90",children:"Integrations"})]}),(0,b.jsx)("span",{className:"text-[0.65rem] font-mono text-muted-foreground/40",children:"·"}),(0,b.jsxs)("div",{className:"text-[0.65rem] uppercase tracking-[0.2em] font-mono text-muted-foreground",children:[(0,b.jsx)("span",{className:"text-foreground tabular-nums",children:K.toString().padStart(2,"0")}),(0,b.jsxs)("span",{className:"opacity-50",children:[" / 0",d.clis.length," active"]})]}),y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-[0.65rem] font-mono text-muted-foreground/40",children:"·"}),(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[0.65rem] uppercase tracking-[0.2em] font-mono text-pink-400",children:[(0,b.jsx)("span",{className:"h-1 w-1 rounded-full bg-pink-400 animate-pulse"}),x.toInstall.length+x.toRemove.length," pending"]})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,b.jsx)(M.Button,{variant:"outline",size:"sm",onClick:()=>{let a=Array.from(w).filter(a=>q.has(a));0!==a.length&&(t("cli_reinstall_submitted",{cli_ids:a,count:a.length}),g(async()=>{try{j(null),await C("user",a)}catch(a){u("cli_reinstall",a instanceof Error?a.message:"Failed to reinstall.")}finally{await v()}}))},disabled:f||0===L,className:"text-xs h-7 px-3 font-mono",children:"Reinstall"}),(0,b.jsx)(M.Button,{variant:"default",size:"sm",onClick:H,disabled:f||!y,className:"text-xs h-7 px-3 font-mono",children:"Apply changes"})]})]}),(0,b.jsx)("div",{className:"divide-y divide-border/30 border-b border-border/60",children:d.clis.map((a,c)=>{let e=q.has(a.id),g=w.has(a.id),h=e!==g,i=(0,J.getCliBadgeClasses)(a.id),j=i.split(" ").find(a=>a.startsWith("text-"))??"text-foreground";return(0,b.jsxs)("label",{className:`group relative flex items-center gap-3 pl-6 pr-5 py-3 cursor-pointer transition-colors hover:bg-muted/15 ${h?"bg-pink-500/[0.04]":""}`,children:[(0,b.jsx)("div",{className:`absolute left-0 top-0 bottom-0 w-[3px] ${j} bg-current transition-opacity ${e?"opacity-100":"opacity-25 group-hover:opacity-60"}`,"aria-hidden":!0}),(0,b.jsx)("div",{className:"font-mono text-[0.65rem] text-muted-foreground/40 tabular-nums w-6 select-none",children:(c+1).toString().padStart(2,"0")}),(0,b.jsxs)("div",{className:"relative shrink-0",children:[(0,b.jsx)("input",{type:"checkbox",checked:e,onChange:()=>{var b;return b=a.id,void r(a=>{let c=new Set(a),e=!c.has(b);e?c.add(b):c.delete(b);let f=d?.clis.find(a=>a.id===b);return t("cli_selection_toggled",{cli_id:b,checked:e,current_state:f?.installed?"installed":f?.detected?"detected":"inactive"}),c})},disabled:f,className:"sr-only peer","aria-label":`Toggle ${a.label}`}),(0,b.jsx)("div",{className:`h-[18px] w-[18px] rounded-sm border transition-all peer-focus-visible:ring-2 peer-focus-visible:ring-primary/40 ${e?"bg-primary border-primary":"bg-background/50 border-border group-hover:border-foreground/40"}`,children:e&&(0,b.jsx)("svg",{viewBox:"0 0 18 18",className:"h-full w-full text-primary-foreground",fill:"none","aria-hidden":!0,children:(0,b.jsx)("path",{d:"M4 9.5L7.5 12.5L14 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,b.jsx)("div",{className:"min-w-[150px] shrink-0",children:(0,b.jsx)("div",{className:"text-sm font-medium text-foreground",children:a.label})}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[g?(0,b.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm text-[0.6rem] uppercase tracking-[0.15em] font-mono border ${i}`,children:[(0,b.jsx)("span",{className:"h-1 w-1 rounded-full bg-current shadow-[0_0_4px_currentColor]"}),"Active"]}):a.detected?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm text-[0.6rem] uppercase tracking-[0.15em] font-mono border border-border/60 text-muted-foreground/80 bg-muted/20",children:[(0,b.jsx)("span",{className:"h-1 w-1 rounded-full bg-current opacity-60"}),"Detected"]}):(0,b.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-[0.6rem] uppercase tracking-[0.15em] font-mono border border-border/30 text-muted-foreground/40",children:"Inactive"}),h&&(0,b.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-[0.6rem] uppercase tracking-[0.15em] font-mono border border-pink-500/40 text-pink-400 bg-pink-500/10",children:e?"+ install":"− remove"})]}),(0,b.jsx)("div",{className:"ml-auto hidden lg:block text-[0.7rem] font-mono text-muted-foreground/50 truncate max-w-[420px] group-hover:text-muted-foreground/80 transition-colors",title:a.settingsPath,children:a.settingsPath})]},a.id)})}),(0,b.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/40 bg-muted/5",children:[(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-semibold text-foreground",children:d.enabledPolicies.length})," / ",d.policies.length+(d.customPolicies?.length??0)+(d.conventionPolicies?.reduce((a,b)=>a+b.policies.length,0)??0)," ","policies enabled"]}),I&&(0,b.jsxs)("span",{className:"text-[0.65rem] text-muted-foreground/60",children:["· shared across ",K," active CLI",1===K?"":"s"]})]}),h&&(0,b.jsx)("div",{className:"px-4 py-2 bg-red-500/10 border-b border-red-500/20 text-xs text-red-400",children:h}),m&&(0,b.jsx)(_,{message:m,onDismiss:()=>n(null),onInstall:H,isPending:f}),N.map(a=>{let c=d.policies.filter(b=>b.category===a),h=c.filter(a=>a.enabled).length;return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:a}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[h," / ",c.length," enabled"]})]}),c.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:(0,b.jsx)(Z,{enabled:a.enabled,onChange:()=>{var b,c;return b=a.name,c=a.enabled,void(!d||(!d.clis.some(a=>a.installed)?n("Policies are not installed. Install policies to continue."):(n(null),e(a=>a?{...a,policies:a.policies.map(a=>a.name===b?{...a,enabled:!c}:a),enabledPolicies:c?a.enabledPolicies.filter(a=>a!==b):[...a.enabledPolicies,b]}:a),g(async()=>{try{await B(b,!c)}catch{u("policy_toggle","Failed to save policy change."),v()}}))))},disabled:f})}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:[(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:a.name}),a.beta&&(0,b.jsx)("span",{className:"shrink-0 text-[0.6rem] px-1 py-0.5 rounded border bg-violet-500/10 text-violet-400 border-violet-500/20",children:"beta"})]}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:a.description}),a.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:a.eventScope}),a.params&&Object.keys(a.params).length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1 mt-1.5",children:Object.entries(a.params).map(([c,d])=>{let e=a.currentParams?.[c]??d.default,f=JSON.stringify(e)!==JSON.stringify(d.default);return(0,b.jsxs)("span",{className:`inline-flex items-center gap-1 font-mono text-[0.6rem] px-1.5 py-0.5 rounded border ${f?"bg-primary/10 text-primary/70 border-primary/20":"bg-muted/40 text-muted-foreground/55 border-border/40"}`,children:[(0,b.jsxs)("span",{className:"opacity-70",children:[c,":"]}),(0,b.jsx)("span",{children:function(a,b){if("string[]"===a||"pattern[]"===a){let c=Array.isArray(b)?b:[];return 0===c.length?"none":"pattern[]"===a?`${c.length} pattern${1!==c.length?"s":""}`:1===c.length?String(c[0]).slice(0,24):`${c.length} values`}return"boolean"===a?b?"on":"off":null==b||""===b?"—":String(b).slice(0,32)}(d.type,e)})]},c)})})]}),a.params&&Object.keys(a.params).length>0&&(0,b.jsx)("button",{className:"shrink-0 mt-0.5 text-muted-foreground hover:text-primary transition-colors",onClick:()=>{let b=Object.entries(a.params??{}).filter(([b,c])=>JSON.stringify(a.currentParams?.[b]??c.default)!==JSON.stringify(c.default)).length;t("policy_config_modal_opened",{policy_name:a.name,param_count:Object.keys(a.params??{}).length,has_customized_params:b>0,customized_count:b}),p(a)},title:"Edit parameters",children:(0,b.jsx)(k.Settings,{className:"h-3.5 w-3.5"})})]},a.name))]},a)}),(d.customPoliciesPaths?.length||d.customPoliciesPath)&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:"Custom Policies"}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[d.customPolicies?.length??0," detected"]})]}),(d.customPoliciesPaths??[d.customPoliciesPath]).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/20",children:[(0,b.jsx)(i,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-xs font-mono text-muted-foreground truncate",children:a})]},a)),(0,b.jsxs)("div",{className:"flex items-start gap-2 px-4 py-2.5 border-b border-border/20 bg-muted/10",children:[(0,b.jsx)(l,{className:"h-3.5 w-3.5 text-muted-foreground/60 shrink-0 mt-0.5"}),(0,b.jsx)("p",{className:"text-[0.7rem] text-muted-foreground/70 leading-relaxed",children:"Re-run the install command to add, remove, or reorder files."})]}),d.customPolicies?.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:(0,b.jsx)(Z,{enabled:a.enabled,onChange:()=>F(a.id,a.enabled),disabled:f})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:a.name})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[a.description&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:a.description}),a.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:a.eventScope})]})]},a.id))]}),d.conventionPolicies?.map(a=>(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsxs)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:["Convention Policies — ","project"===a.scope?"Project":"User"]}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[a.policies.length," hook",1===a.policies.length?"":"s"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/20",children:[(0,b.jsx)(i,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-xs font-mono text-muted-foreground truncate",children:a.path})]}),0===a.policies.length?(0,b.jsxs)("div",{className:"flex items-start gap-2 px-4 py-2.5 border-b border-border/20 bg-muted/10",children:[(0,b.jsx)(l,{className:"h-3.5 w-3.5 text-muted-foreground/60 shrink-0 mt-0.5"}),(0,b.jsxs)("p",{className:"text-[0.7rem] text-muted-foreground/70 leading-relaxed",children:["No policies could be read from this file. It is still loaded at runtime — run ",(0,b.jsx)("span",{className:"font-mono",children:"failproofai policies"})," to see what it registers."]})]}):a.policies.map(c=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:(0,b.jsx)(Z,{enabled:c.enabled,onChange:()=>F(c.id,c.enabled),disabled:f})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:c.name})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[c.description&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:c.description}),c.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:c.eventScope})]})]},`${a.path}:${c.name}`))]},a.path))]})]})}function ab({activeTab:a,onChange:c}){return(0,b.jsx)("div",{className:"tabs",style:{padding:0,marginBottom:24},children:[{id:"activity",label:"Activity"},{id:"policies",label:"Configure"}].map(d=>(0,b.jsx)("button",{type:"button",onClick:()=>c(d.id),className:`tab${a===d.id?" is-active":""}`,children:d.label.toLowerCase()},d.id))})}a.s(["default",0,function({initialTab:a="activity"}){let d=(0,H.useUrlParams)(),{capture:e}=(0,G.usePostHog)(),[f,g]=(0,c.useState)(a),[h,i]=(0,c.useState)(void 0),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)([]);(0,c.useEffect)(()=>{z().then(a=>{i(a.clis.some(a=>a.installed)),k({enabled:a.enabledPolicies.length,total:a.policies.length+(a.customPolicies?.length??0)+(a.conventionPolicies?.reduce((a,b)=>a+b.policies.length,0)??0)}),m(a.clis.filter(a=>a.installed).map(a=>a.label))}).catch(()=>i(void 0))},[]);let n=0===l.length?"Policy evaluations":l.length<=3?`Policy evaluations across ${l.join(", ")}`:`Policy evaluations across ${l.length} agents`,o=a=>{a!==f&&e("policies_tab_switched",{tab:a,from_tab:f}),g(a),d.setAll({tab:"activity"===a?void 0:a})};return(0,b.jsx)("main",{className:"report",children:(0,b.jsxs)("section",{className:"section","data-screen-label":"policies",children:[(0,b.jsx)("h2",{style:{fontFamily:"var(--font-mono)",fontSize:24,fontWeight:600,letterSpacing:"-0.01em",color:"var(--ink)",margin:"0 0 16px"},children:"activity"===f?"Policies":"Configure Policies"}),"activity"===f?(0,b.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:32,flexWrap:"wrap",margin:"0 0 24px"},children:[(0,b.jsxs)("div",{style:{fontFamily:"var(--font-mono)",fontSize:14,color:"var(--ink-2)",lineHeight:1.7,flex:"1 1 480px",minWidth:0},children:[n,j&&(0,b.jsxs)("span",{style:{color:"var(--dim)"},children:[" · ","enabled policies"," ",(0,b.jsxs)("span",{style:{color:"var(--ink)",fontVariantNumeric:"tabular-nums"},children:[j.enabled,"/",j.total]})]})]}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:6,flex:"0 0 auto"},children:[(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.22em",textTransform:"uppercase",color:"var(--dim)"},children:"want to change which policies fire?"}),(0,b.jsx)("button",{type:"button",className:"btn btn-primary",onClick:()=>o("policies"),children:"[ configure policies → ]"})]})]}):(0,b.jsx)("p",{style:{fontFamily:"var(--font-mono)",fontSize:14,color:"var(--ink-2)",lineHeight:1.7,maxWidth:720,margin:"0 0 24px"},children:"switch policies on or off across your installed agent CLIs."}),(0,b.jsx)(ab,{activeTab:f,onChange:o}),"activity"===f?(0,b.jsx)(Y,{hooksInstalled:h,onSwitchTab:o}):(0,b.jsx)(aa,{onHooksInstallChange:i})]})})}],22712)}];
6
+ `}),(0,b.jsxs)("div",{className:"rounded-lg border border-red-500/40 bg-red-950/95 shadow-2xl shadow-red-900/40 overflow-hidden backdrop-blur-sm",children:[(0,b.jsx)("div",{className:"h-0.5 w-full bg-gradient-to-r from-red-600 via-red-400 to-red-600"}),(0,b.jsxs)("div",{className:"p-4",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"shrink-0 mt-0.5 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 ring-2 ring-red-500/30",children:(0,b.jsx)(t.X,{className:"h-3 w-3 text-white",strokeWidth:3})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:"text-[0.65rem] font-bold uppercase tracking-widest text-red-400 mb-0.5",children:"Error"}),(0,b.jsx)("p",{className:"text-sm text-red-100 leading-snug",children:a})]}),(0,b.jsx)("button",{onClick:c,className:"shrink-0 -mt-0.5 -mr-0.5 rounded p-0.5 text-red-400/60 transition-colors hover:bg-red-500/20 hover:text-red-200","aria-label":"Dismiss",children:(0,b.jsx)(t.X,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,b.jsx)(T.Button,{size:"sm",onClick:()=>{g("hooks_install_from_error_clicked",{error_message:a.slice(0,200)}),c(),e()},disabled:f,className:"h-7 flex-1 border-0 bg-red-500 px-3 text-xs font-semibold text-white hover:bg-red-400 disabled:opacity-50",children:"Install hooks"}),(0,b.jsx)(T.Button,{variant:"ghost",size:"sm",onClick:c,className:"h-7 px-3 text-xs text-red-400 hover:bg-red-500/10 hover:text-red-200",children:"Dismiss"})]})]})]})]}),document.body)}function ah({onHooksInstallChange:a}){let[d,e]=(0,c.useState)(null),[f,g]=(0,c.useTransition)(),[h,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(()=>new Set),s=(0,c.useRef)(!1),{capture:t}=(0,N.usePostHog)(),u=(0,c.useCallback)((a,b)=>{t("action_error_displayed",{error_type:a,error_message:b.slice(0,200)}),j(b)},[t]),v=(0,c.useCallback)(async()=>{try{let b=await C();e(b),a?.(b.clis.some(a=>a.installed))}catch{}},[a]);(0,c.useEffect)(()=>{v()},[v]),(0,c.useEffect)(()=>{d&&(s.current?r(new Set(d.clis.filter(a=>a.installed).map(a=>a.id))):(s.current=!0,r(new Set(d.clis.filter(a=>a.installed||a.detected).map(a=>a.id)))))},[d?.clis]);let w=(0,c.useMemo)(()=>new Set((d?.clis??[]).filter(a=>a.installed).map(a=>a.id)),[d?.clis]),x=(0,c.useMemo)(()=>{let a=[],b=[];for(let c of d?.clis??[]){let d=q.has(c.id);d&&!w.has(c.id)&&a.push(c.id),!d&&w.has(c.id)&&b.push(c.id)}return{toInstall:a,toRemove:b}},[d?.clis,q,w]),y=x.toInstall.length>0||x.toRemove.length>0,z=(a,b)=>{d&&(e(c=>c?{...c,customPolicies:c.customPolicies?.map(c=>c.id===a?{...c,enabled:!b}:c),conventionPolicies:c.conventionPolicies.map(c=>({...c,policies:c.policies.map(c=>c.id===a?{...c,enabled:!b}:c)}))}:c),g(async()=>{try{await D(a,!b)}catch{u("custom_policy_toggle","Failed to save custom policy change."),v()}}))},A=()=>{let{toInstall:a,toRemove:b}=x;(0!==a.length||0!==b.length)&&(t("cli_install_remove_submitted",{to_install:a,to_remove:b,count_install:a.length,count_remove:b.length}),g(async()=>{try{j(null),a.length>0&&await J("user",a),b.length>0&&await K("user",b)}catch(a){u("cli_apply",a instanceof Error?a.message:"Failed to apply changes.")}finally{await v()}}))};if(!d)return(0,b.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,b.jsxs)("span",{className:"text-sm text-muted-foreground",children:["Loading","…"]})});let B=d.clis.some(a=>a.installed),E=w.size,F=q.size,G=Array.from(new Set(d.policies.map(a=>a.category)));return(0,b.jsxs)(b.Fragment,{children:[o&&(0,b.jsx)(af,{policy:o,onClose:()=>{t("policy_config_modal_closed",{policy_name:o.name,action:"cancel"}),p(null)},onSave:a=>{if(!o)return;let b=o.name;p(null),g(async()=>{try{j(null),await L(b,a),await v()}catch(a){u("param_update",a instanceof Error?a.message:"Failed to save configuration.")}})}}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 px-5 py-3.5 border-b border-border/60 bg-muted/10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 min-w-0 flex-wrap",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:`h-2 w-2 rounded-full transition-shadow ${B?"bg-emerald-400 shadow-[0_0_8px_rgba(52,211,153,0.6)]":"bg-muted-foreground/40"}`,"aria-hidden":!0}),(0,b.jsx)("span",{className:"text-[0.65rem] uppercase tracking-[0.2em] font-mono text-foreground/90",children:"Integrations"})]}),(0,b.jsx)("span",{className:"text-[0.65rem] font-mono text-muted-foreground/40",children:"·"}),(0,b.jsxs)("div",{className:"text-[0.65rem] uppercase tracking-[0.2em] font-mono text-muted-foreground",children:[(0,b.jsx)("span",{className:"text-foreground tabular-nums",children:E.toString().padStart(2,"0")}),(0,b.jsxs)("span",{className:"opacity-50",children:[" / 0",d.clis.length," active"]})]}),y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-[0.65rem] font-mono text-muted-foreground/40",children:"·"}),(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[0.65rem] uppercase tracking-[0.2em] font-mono text-pink-400",children:[(0,b.jsx)("span",{className:"h-1 w-1 rounded-full bg-pink-400 animate-pulse"}),x.toInstall.length+x.toRemove.length," pending"]})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,b.jsx)(T.Button,{variant:"outline",size:"sm",onClick:()=>{let a=Array.from(w).filter(a=>q.has(a));0!==a.length&&(t("cli_reinstall_submitted",{cli_ids:a,count:a.length}),g(async()=>{try{j(null),await J("user",a)}catch(a){u("cli_reinstall",a instanceof Error?a.message:"Failed to reinstall.")}finally{await v()}}))},disabled:f||0===F,className:"text-xs h-7 px-3 font-mono",children:"Reinstall"}),(0,b.jsx)(T.Button,{variant:"default",size:"sm",onClick:A,disabled:f||!y,className:"text-xs h-7 px-3 font-mono",children:"Apply changes"})]})]}),(0,b.jsx)("div",{className:"divide-y divide-border/30 border-b border-border/60",children:d.clis.map((a,c)=>{let e=q.has(a.id),g=w.has(a.id),h=e!==g,i=(0,Q.getCliBadgeClasses)(a.id),j=i.split(" ").find(a=>a.startsWith("text-"))??"text-foreground";return(0,b.jsxs)("label",{className:`group relative flex items-center gap-3 pl-6 pr-5 py-3 cursor-pointer transition-colors hover:bg-muted/15 ${h?"bg-pink-500/[0.04]":""}`,children:[(0,b.jsx)("div",{className:`absolute left-0 top-0 bottom-0 w-[3px] ${j} bg-current transition-opacity ${e?"opacity-100":"opacity-25 group-hover:opacity-60"}`,"aria-hidden":!0}),(0,b.jsx)("div",{className:"font-mono text-[0.65rem] text-muted-foreground/40 tabular-nums w-6 select-none",children:(c+1).toString().padStart(2,"0")}),(0,b.jsxs)("div",{className:"relative shrink-0",children:[(0,b.jsx)("input",{type:"checkbox",checked:e,onChange:()=>{var b;return b=a.id,void r(a=>{let c=new Set(a),e=!c.has(b);e?c.add(b):c.delete(b);let f=d?.clis.find(a=>a.id===b);return t("cli_selection_toggled",{cli_id:b,checked:e,current_state:f?.installed?"installed":f?.detected?"detected":"inactive"}),c})},disabled:f,className:"sr-only peer","aria-label":`Toggle ${a.label}`}),(0,b.jsx)("div",{className:`h-[18px] w-[18px] rounded-sm border transition-all peer-focus-visible:ring-2 peer-focus-visible:ring-primary/40 ${e?"bg-primary border-primary":"bg-background/50 border-border group-hover:border-foreground/40"}`,children:e&&(0,b.jsx)("svg",{viewBox:"0 0 18 18",className:"h-full w-full text-primary-foreground",fill:"none","aria-hidden":!0,children:(0,b.jsx)("path",{d:"M4 9.5L7.5 12.5L14 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,b.jsx)("div",{className:"min-w-[150px] shrink-0",children:(0,b.jsx)("div",{className:"text-sm font-medium text-foreground",children:a.label})}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[g?(0,b.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm text-[0.6rem] uppercase tracking-[0.15em] font-mono border ${i}`,children:[(0,b.jsx)("span",{className:"h-1 w-1 rounded-full bg-current shadow-[0_0_4px_currentColor]"}),"Active"]}):a.detected?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm text-[0.6rem] uppercase tracking-[0.15em] font-mono border border-border/60 text-muted-foreground/80 bg-muted/20",children:[(0,b.jsx)("span",{className:"h-1 w-1 rounded-full bg-current opacity-60"}),"Detected"]}):(0,b.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-[0.6rem] uppercase tracking-[0.15em] font-mono border border-border/30 text-muted-foreground/40",children:"Inactive"}),h&&(0,b.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-[0.6rem] uppercase tracking-[0.15em] font-mono border border-pink-500/40 text-pink-400 bg-pink-500/10",children:e?"+ install":"− remove"})]}),(0,b.jsx)("div",{className:"ml-auto hidden lg:block text-[0.7rem] font-mono text-muted-foreground/50 truncate max-w-[420px] group-hover:text-muted-foreground/80 transition-colors",title:a.settingsPath,children:a.settingsPath})]},a.id)})}),(0,b.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/40 bg-muted/5",children:[(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:[(0,b.jsx)("span",{className:"font-semibold text-foreground",children:d.policies.filter(a=>a.enabled).length+(d.customPolicies?.filter(a=>a.enabled).length??0)+(d.conventionPolicies?.reduce((a,b)=>a+b.policies.filter(a=>a.enabled).length,0)??0)})," / ",d.policies.length+(d.customPolicies?.length??0)+(d.conventionPolicies?.reduce((a,b)=>a+b.policies.length,0)??0)," ","policies enabled"]}),B&&(0,b.jsxs)("span",{className:"text-[0.65rem] text-muted-foreground/60",children:["· shared across ",E," active CLI",1===E?"":"s"]})]}),h&&(0,b.jsx)("div",{className:"px-4 py-2 bg-red-500/10 border-b border-red-500/20 text-xs text-red-400",children:h}),k&&(0,b.jsx)(ag,{message:k,onDismiss:()=>l(null),onInstall:A,isPending:f}),G.map(a=>{let c=d.policies.filter(b=>b.category===a),h=c.filter(a=>a.enabled).length;return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:a}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[h," / ",c.length," enabled"]})]}),c.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:(0,b.jsx)(ae,{enabled:a.enabled,onChange:()=>{var b;let c;return b=a.enabled,c=a.name,void(!d||(!d.clis.some(a=>a.installed)?l("Policies are not installed. Install policies to continue."):(l(null),e(d=>d?{...d,policies:d.policies.map(a=>a.name===c?{...a,enabled:!b}:a),packs:d.packs.map(d=>d.id===a.packId?{...d,policies:d.policies.map(a=>a.name===c?{...a,enabled:!b}:a)}:d)}:d),g(async()=>{try{await I(a.packId,c,!b)}catch{u("policy_toggle","Failed to save policy change."),v()}}))))},disabled:f})}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:[(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:a.name}),a.beta&&(0,b.jsx)("span",{className:"shrink-0 text-[0.6rem] px-1 py-0.5 rounded border bg-violet-500/10 text-violet-400 border-violet-500/20",children:"beta"})]}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:a.description}),a.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:a.eventScope}),a.params&&Object.keys(a.params).length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1 mt-1.5",children:Object.entries(a.params).map(([c,d])=>{let e=a.currentParams?.[c]??d.default,f=JSON.stringify(e)!==JSON.stringify(d.default);return(0,b.jsxs)("span",{className:`inline-flex items-center gap-1 font-mono text-[0.6rem] px-1.5 py-0.5 rounded border ${f?"bg-primary/10 text-primary/70 border-primary/20":"bg-muted/40 text-muted-foreground/55 border-border/40"}`,children:[(0,b.jsxs)("span",{className:"opacity-70",children:[c,":"]}),(0,b.jsx)("span",{children:function(a,b){if("string[]"===a||"pattern[]"===a){let c=Array.isArray(b)?b:[];return 0===c.length?"none":"pattern[]"===a?`${c.length} pattern${1!==c.length?"s":""}`:1===c.length?String(c[0]).slice(0,24):`${c.length} values`}return"boolean"===a?b?"on":"off":null==b||""===b?"—":String(b).slice(0,32)}(d.type,e)})]},c)})})]}),a.params&&Object.keys(a.params).length>0&&(0,b.jsx)("button",{className:"shrink-0 mt-0.5 text-muted-foreground hover:text-primary transition-colors",onClick:()=>{let b=Object.entries(a.params??{}).filter(([b,c])=>JSON.stringify(a.currentParams?.[b]??c.default)!==JSON.stringify(c.default)).length;t("policy_config_modal_opened",{policy_name:a.name,param_count:Object.keys(a.params??{}).length,has_customized_params:b>0,customized_count:b}),p(a)},title:"Edit parameters",children:(0,b.jsx)(m.Settings,{className:"h-3.5 w-3.5"})})]},a.name))]},a)}),(d.customPoliciesPaths?.length||d.customPoliciesPath)&&(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:"Custom Policies"}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[d.customPolicies?.length??0," detected"]})]}),(d.customPoliciesPaths??[d.customPoliciesPath]).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/20",children:[(0,b.jsx)(i,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-xs font-mono text-muted-foreground truncate",children:a})]},a)),(0,b.jsxs)("div",{className:"flex items-start gap-2 px-4 py-2.5 border-b border-border/20 bg-muted/10",children:[(0,b.jsx)(n,{className:"h-3.5 w-3.5 text-muted-foreground/60 shrink-0 mt-0.5"}),(0,b.jsx)("p",{className:"text-[0.7rem] text-muted-foreground/70 leading-relaxed",children:"Re-run the install command to add, remove, or reorder files."})]}),d.customPolicies?.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:(0,b.jsx)(ae,{enabled:a.enabled,onChange:()=>z(a.id,a.enabled),disabled:f})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:a.name})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[a.description&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:a.description}),a.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:a.eventScope})]})]},a.id))]}),d.conventionPolicies?.map(a=>(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsxs)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:["Convention Policies — ","project"===a.scope?"Project":"User"]}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[a.policies.length," hook",1===a.policies.length?"":"s"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/20",children:[(0,b.jsx)(i,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"text-xs font-mono text-muted-foreground truncate",children:a.path})]}),0===a.policies.length?(0,b.jsxs)("div",{className:"flex items-start gap-2 px-4 py-2.5 border-b border-border/20 bg-muted/10",children:[(0,b.jsx)(n,{className:"h-3.5 w-3.5 text-muted-foreground/60 shrink-0 mt-0.5"}),(0,b.jsxs)("p",{className:"text-[0.7rem] text-muted-foreground/70 leading-relaxed",children:["No policies could be read from this file. It is still loaded at runtime — run ",(0,b.jsx)("span",{className:"font-mono",children:"failproofai policies"})," to see what it registers."]})]}):a.policies.map(c=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:(0,b.jsx)(ae,{enabled:c.enabled,onChange:()=>z(c.id,c.enabled),disabled:f})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5 min-w-0 w-56 shrink-0 mt-0.5",children:(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:c.name})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[c.description&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-relaxed",children:c.description}),c.eventScope&&(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5 hidden lg:block",children:c.eventScope})]})]},`${a.path}:${c.name}`))]},a.path)),(0,b.jsx)(ai,{packs:d.packs??[],disabled:f,onChanged:v,onError:a=>u("pack_action",a)})]})]})}function ai({packs:a,disabled:d,onChanged:e,onError:f}){let[g,h]=(0,c.useState)(""),[i,j]=(0,c.useState)(null),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(null),{capture:q}=(0,N.usePostHog)(),u=async()=>{if(g.trim()){j("preview"),p(null);try{let a=await G(g);if(!a.ok)return void f(a.error??"Could not read that pack.");p(a)}finally{j(null)}}},v=async(a,b)=>{j(a),n(null);try{let a=await b();if(!a.ok)return void f(a.error??"Could not install that pack.");n(a.version?`${a.id}@${a.version}`:a.id??null),h(""),e()}catch(a){f(a instanceof Error?a.message:"Could not install that pack.")}finally{j(null)}};return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.7rem] font-semibold uppercase tracking-wider text-muted-foreground",children:"Policy Packs"}),(0,b.jsx)("span",{className:"text-[0.7rem] text-muted-foreground",children:0===a.length?"none installed":`${a.length} installed`})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2 px-4 py-3 border-b border-border/20",children:[(0,b.jsx)("input",{value:g,onChange:a=>h(a.target.value),onKeyDown:a=>{"Enter"===a.key&&g.trim()&&!i&&(q("pack_install_submitted",{via:"input"}),v("input",()=>F(g)))},placeholder:"core · acme/ops · acme/ops@v1.2.0 · a release URL",spellCheck:!1,disabled:d||null!==i,className:"flex-1 min-w-[16rem] rounded-md border border-border/60 bg-background px-2.5 py-1.5 text-xs font-mono placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50","aria-label":"Pack source"}),(0,b.jsx)(T.Button,{size:"sm",variant:"outline",disabled:d||null!==i||0===g.trim().length,onClick:()=>{q("pack_preview_submitted",{}),u()},children:"preview"===i?"Reading…":"Preview"}),(0,b.jsxs)(T.Button,{size:"sm",variant:"default",disabled:d||null!==i||0===g.trim().length,onClick:()=>{q("pack_install_submitted",{via:"button"}),v("input",()=>F(g))},children:[(0,b.jsx)(l,{className:"h-3.5 w-3.5"}),"input"===i?"Installing…":"Install"]})]}),o?.ok&&(0,b.jsxs)("div",{className:"border-b border-border/20 bg-muted/5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[(0,b.jsx)(k,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsxs)("span",{className:"text-xs font-mono text-foreground",children:[o.id,"@",o.version]}),(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[o.policies?.length??0," policies ·"," ",o.policies?.filter(a=>a.defaultEnabled).length??0," on by default"]}),"observe"===o.effect&&(0,b.jsx)("span",{className:"text-[0.65rem] uppercase tracking-wider text-amber-500",children:"observes only"}),(0,b.jsx)("button",{onClick:()=>p(null),className:"ml-auto text-muted-foreground/60 hover:text-foreground","aria-label":"Close preview",children:(0,b.jsx)(t.X,{className:"h-3.5 w-3.5"})})]}),(0,b.jsx)("div",{className:"max-h-64 overflow-y-auto",children:o.policies?.map(a=>(0,b.jsxs)("div",{className:"flex items-start gap-3 px-4 py-2 border-t border-border/10",children:[(0,b.jsx)("span",{className:`text-[0.65rem] uppercase tracking-wider w-14 shrink-0 mt-0.5 ${a.defaultEnabled?"text-emerald-500":"text-muted-foreground/50"}`,children:a.defaultEnabled?"default":"opt-in"}),(0,b.jsx)("span",{className:"text-xs font-mono text-foreground w-56 shrink-0 truncate",children:a.name}),(0,b.jsxs)("span",{className:"text-xs text-muted-foreground leading-relaxed min-w-0",children:[a.description,(0,b.jsx)("span",{className:"block text-[0.65rem] text-muted-foreground/40 font-mono mt-0.5",children:a.category})]})]},a.name))}),(0,b.jsx)("div",{className:"px-4 py-2.5 border-t border-border/20",children:(0,b.jsxs)(T.Button,{size:"sm",variant:"default",disabled:d||null!==i,onClick:()=>{q("pack_install_submitted",{via:"preview"}),v("input",()=>F(g)).then(()=>p(null))},children:[(0,b.jsx)(l,{className:"h-3.5 w-3.5"}),"Install its defaults"]})})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2 px-4 py-2.5 border-b border-border/20 bg-muted/10",children:[(0,b.jsx)("span",{className:"text-[0.7rem] text-muted-foreground/70 mr-1",children:"Failproof AI policies:"}),(0,b.jsx)(T.Button,{size:"sm",variant:"outline",disabled:d||null!==i,onClick:()=>{q("pack_install_submitted",{via:"ours"}),v("ours",()=>F("FailproofAI/policies"))},children:"ours"===i?"Installing…":"Install from GitHub"}),(0,b.jsx)(T.Button,{size:"sm",variant:"outline",disabled:d||null!==i,onClick:()=>{q("pack_install_submitted",{via:"bundled"}),v("bundled",()=>E())},children:"bundled"===i?"Installing…":"Install offline copy"}),m&&(0,b.jsxs)("span",{className:"text-[0.7rem] text-emerald-500 font-mono",children:["installed ",m]})]}),a.map(a=>(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/20",children:[(0,b.jsx)(k,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsxs)("span",{className:"text-xs font-mono text-foreground truncate",children:[a.id,a.version?`@${a.version}`:""]}),"observe"===a.effect&&(0,b.jsx)("span",{className:"text-[0.65rem] uppercase tracking-wider text-amber-500",children:"observing"}),(0,b.jsx)("span",{className:"text-[0.65rem] text-muted-foreground/50 font-mono truncate hidden lg:inline",children:a.source}),(0,b.jsx)("button",{onClick:()=>void v(a.id,()=>H(a.id)),disabled:d||null!==i,className:"ml-auto text-muted-foreground/60 hover:text-foreground disabled:opacity-40","aria-label":`Remove ${a.id}`,children:(0,b.jsx)(r,{className:"h-3.5 w-3.5"})})]}),a.error?(0,b.jsxs)("div",{className:"flex items-start gap-2 px-4 py-2.5 border-b border-border/20 bg-amber-500/5",children:[(0,b.jsx)(s,{className:"h-3.5 w-3.5 text-amber-500 shrink-0 mt-0.5"}),(0,b.jsxs)("p",{className:"text-[0.7rem] text-muted-foreground leading-relaxed",children:["This pack will not load: ",a.error]})]}):(0,b.jsx)("div",{className:"flex items-center gap-3 px-4 py-2.5 border-b border-border/20",children:(0,b.jsxs)("span",{className:"text-[0.7rem] text-muted-foreground",children:[a.policies.filter(a=>a.enabled).length," of ",a.policies.length," on — listed by category above"]})})]},`${a.id}@${a.version}`))]})}function aj({activeTab:a,onChange:c}){return(0,b.jsx)("div",{className:"tabs",style:{padding:0,marginBottom:24},children:[{id:"activity",label:"Activity"},{id:"policies",label:"Configure"}].map(d=>(0,b.jsx)("button",{type:"button",onClick:()=>c(d.id),className:`tab${a===d.id?" is-active":""}`,children:d.label.toLowerCase()},d.id))})}a.s(["default",0,function({initialTab:a="activity"}){let d=(0,O.useUrlParams)(),{capture:e}=(0,N.usePostHog)(),[f,g]=(0,c.useState)(a),[h,i]=(0,c.useState)(void 0),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)([]);(0,c.useEffect)(()=>{C().then(a=>{i(a.clis.some(a=>a.installed)),k({enabled:a.enabledPolicies.length,total:a.policies.length+(a.customPolicies?.length??0)+(a.conventionPolicies?.reduce((a,b)=>a+b.policies.length,0)??0)}),m(a.clis.filter(a=>a.installed).map(a=>a.label))}).catch(()=>i(void 0))},[]);let n=0===l.length?"Policy evaluations":l.length<=3?`Policy evaluations across ${l.join(", ")}`:`Policy evaluations across ${l.length} agents`,o=a=>{a!==f&&e("policies_tab_switched",{tab:a,from_tab:f}),g(a),d.setAll({tab:"activity"===a?void 0:a})};return(0,b.jsx)("main",{className:"report",children:(0,b.jsxs)("section",{className:"section","data-screen-label":"policies",children:[(0,b.jsx)("h2",{style:{fontFamily:"var(--font-mono)",fontSize:24,fontWeight:600,letterSpacing:"-0.01em",color:"var(--ink)",margin:"0 0 16px"},children:"activity"===f?"Policies":"Configure Policies"}),"activity"===f?(0,b.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:32,flexWrap:"wrap",margin:"0 0 24px"},children:[(0,b.jsxs)("div",{style:{fontFamily:"var(--font-mono)",fontSize:14,color:"var(--ink-2)",lineHeight:1.7,flex:"1 1 480px",minWidth:0},children:[n,j&&(0,b.jsxs)("span",{style:{color:"var(--dim)"},children:[" · ","enabled policies"," ",(0,b.jsxs)("span",{style:{color:"var(--ink)",fontVariantNumeric:"tabular-nums"},children:[j.enabled,"/",j.total]})]})]}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:6,flex:"0 0 auto"},children:[(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,letterSpacing:"0.22em",textTransform:"uppercase",color:"var(--dim)"},children:"want to change which policies fire?"}),(0,b.jsx)("button",{type:"button",className:"btn btn-primary",onClick:()=>o("policies"),children:"[ configure policies → ]"})]})]}):(0,b.jsx)("p",{style:{fontFamily:"var(--font-mono)",fontSize:14,color:"var(--ink-2)",lineHeight:1.7,maxWidth:720,margin:"0 0 24px"},children:"switch policies on or off across your installed harnesses."}),(0,b.jsx)(aj,{activeTab:f,onChange:o}),"activity"===f?(0,b.jsx)(ad,{hooksInstalled:h,onSwitchTab:o}):(0,b.jsx)(ah,{onHooksInstallChange:i})]})})}],22712)}];
7
7
 
8
8
  //# sourceMappingURL=app_policies_hooks-client_tsx_19dqvpc._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[41857,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("009e6103e41f3b6229e16507f4fcaa7b3c8f2b3e48",d.callServer,void 0,d.findSourceMapURL,"getScheduledAuditAction"),f=(0,d.createServerReference)("408f39c46a4b2ee4dde76beb27a355bcbd8d2fc962",d.callServer,void 0,d.findSourceMapURL,"setAutoAuditAction"),g=(0,d.createServerReference)("4061b82b45a3b9808b69b6df0b41b8bdf4fdc6f6e5",d.callServer,void 0,d.findSourceMapURL,"setAuditIntervalAction");var h=a.i(89564),i=a.i(4543),j=a.i(18952),k=a.i(80977);function l(a){return new Date(a).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function m(a,b){let c=a-b;if(c<=0)return"now";let d=Math.floor(c/864e5),e=Math.floor(c%864e5/36e5);return d>0?e>0?`${d}d ${e}h`:`${d}d`:e>0?`${e}h`:`${Math.max(1,Math.floor(c/6e4))}m`}function n(a){return a.toLocaleString("en-US")}function o({label:a,value:c,sub:d,tone:e}){return(0,b.jsxs)("div",{className:"set-stat",children:[(0,b.jsx)("div",{className:"set-stat-label",children:a}),(0,b.jsx)("div",{className:`set-stat-value${e?` ${e}`:""}`,children:c}),(0,b.jsx)("div",{className:"set-stat-sub",children:d??" "})]})}function p({lastRunAtMs:a,nextDueAtMs:c,now:d}){if(null==a||null==c||c<=a)return null;let e=Math.min(100,Math.max(0,(d-a)/(c-a)*100));return(0,b.jsxs)("div",{className:"tape","aria-hidden":"true",children:[(0,b.jsxs)("div",{className:"tape-rail",children:[(0,b.jsx)("div",{className:"tape-fill",style:{width:`${e}%`}}),(0,b.jsx)("div",{className:"tape-now",style:{left:`${e}%`}})]}),(0,b.jsxs)("div",{className:"tape-ends",children:[(0,b.jsxs)("span",{children:["last scan · ",l(a)]}),(0,b.jsxs)("span",{className:"tape-next",children:["next · ",m(c,d)]})]})]})}function q({enabled:a,onChange:c,disabled:d,label:e}){return(0,b.jsx)("button",{type:"button",role:"switch","aria-checked":a,"aria-label":e,disabled:d,onClick:c,className:"sw","data-on":a?"true":"false",children:(0,b.jsx)("span",{className:"sw-knob"})})}let r=[{label:"reads",body:"every session transcript on disk — your prompts, the files your agents read and wrote, and command output."},{label:"runs",body:"entirely on this machine. the transcripts never leave it."},{label:"sends",body:"counts, redacted examples, and this machine's name — and only when a scan finds something harmful."}];a.s(["default",0,function({initial:a}){let[d,s]=(0,c.useState)(a),[t,u]=(0,c.useState)(a?.auto??!1),[v,w]=(0,c.useState)(a?.intervalDays??7),[x,y]=(0,c.useState)(!1),[z,A]=(0,c.useState)(!1),[B,C]=(0,c.useState)(!1),[D,E]=(0,c.useState)(null===a),[F,G]=(0,c.useState)(0),H=(0,c.useRef)(!0),I=(0,c.useRef)(null!==a),J=(0,c.useCallback)(async()=>{try{let a=await e();if(!H.current)return;s(a),I.current=!0,u(a.auto),w(a.intervalDays),G(Date.now()),E(!1)}catch{H.current&&!I.current&&E(!0)}},[]);(0,c.useEffect)(()=>(H.current=!0,J(),()=>{H.current=!1}),[J]),(0,c.useEffect)(()=>{let a=()=>void J();return window.addEventListener("focus",a),document.addEventListener("visibilitychange",a),()=>{window.removeEventListener("focus",a),document.removeEventListener("visibilitychange",a)}},[J]);let K=d?.signedInAs??null,L=d?.daemon==="running",M=d?.daemon==="unsupported-platform",N=d?.schedule??null,O=d?.lastScan??null,P=N?.lastExitCode!=null&&0!==N.lastExitCode&&75!==N.lastExitCode,Q=(0,c.useCallback)(async()=>{y(!0);try{let a=await f(!0);if(!a.ok){if(u(!1),"unreachable"===a.reason)return void(0,j.toast)("could not reach the server. check your connection and try again.");await J(),C(!0),(0,j.toast)("that sign-in expired. one more code and it's on.");return}u(a.auto),(0,j.toast)("scheduled audits on."),await J()}catch{u(!1),(0,j.toast)("could not turn that on.")}finally{y(!1)}},[J]),R=(0,c.useCallback)(async()=>{if(t){y(!0);try{let a=await f(!1);a.ok&&u(a.auto),(0,j.toast)("scheduled audits off."),await J()}catch{(0,j.toast)("could not turn that off.")}finally{y(!1)}return}K?await Q():C(!0)},[t,Q,J,K]),S=(0,c.useCallback)(async a=>{y(!0);try{let b=await g(a);w(b.intervalDays),s(a=>a?{...a,intervalDays:b.intervalDays}:a),(0,j.toast)(`scanning every ${b.intervalDays} day${1===b.intervalDays?"":"s"}.`)}catch{w(d?.intervalDays??7),(0,j.toast)("could not save that.")}finally{y(!1)}},[d?.intervalDays]),T=(0,c.useCallback)(async()=>{y(!0);try{await fetch("/api/auth/logout",{method:"POST"}),(0,j.toast)("signed out. scans continue; digests pause."),await J()}catch{(0,j.toast)("could not sign out.")}finally{y(!1)}},[J]),U=(0,c.useCallback)(async()=>{if(!z){A(!0);try{await (0,h.triggerRun)({cli:[],since:"all",noCache:!1}),(0,j.toast)("scan complete."),await J()}catch(a){(0,j.toast)(a instanceof h.RerunError&&"timeout"===a.kind?"the scan is taking a while — it will finish in the background.":"the scan could not be completed.")}finally{A(!1)}}},[J,z]),V=(0,c.useCallback)(async a=>{C(!1),await J(),await Q()},[Q,J]),W=d?L?{value:"running",sub:null!=d.daemonStartedAtMs&&F>0?`up ${function(a){let b=Math.floor(a/864e5);if(b>0)return`${b}d`;let c=Math.floor(a/36e5);return c>0?`${c}h`:`${Math.max(1,Math.floor(a/6e4))}m`}(Math.max(0,F-d.daemonStartedAtMs))}`:"",tone:"ok"}:M?{value:"unavailable",sub:"not on this platform"}:"not-installed"===d.daemon?{value:"not installed",sub:"run failproofai config",tone:"warn"}:"unknown"===d.daemon?{value:"unknown",sub:"could not read it"}:{value:"stopped",sub:"run failproofai config",tone:"warn"}:{value:"…",sub:"reading"},X=t?N?.nextDueAtMs==null?{value:"pending",sub:"after the next scan"}:{value:F>0?m(N.nextDueAtMs,F):"—",sub:l(N.nextDueAtMs)}:{value:"off",sub:"nothing scheduled"},Y=O?{value:(0,k.formatRelativeTime)(Date.parse(O.finishedAt)),sub:null!=O.sessionsScanned?`${n(O.sessionsScanned)} sessions`:"scanned"}:{value:"none yet",sub:"run one below"},Z=O?null==O.findings?{value:"—",sub:"unreadable"}:{value:n(O.findings),sub:"this scan",...O.findings>0?{tone:"warn"}:{}}:{value:"—",sub:"no scan yet"};return(0,b.jsxs)("main",{className:"report",children:[(0,b.jsxs)("section",{className:"section set-sec",children:[(0,b.jsxs)("div",{className:"set-mast",children:[(0,b.jsx)("h1",{className:"set-title",children:"settings"}),(0,b.jsx)("p",{className:"set-lede",children:"keeping watch, so you don't have to."})]}),D?(0,b.jsx)("div",{className:"set-console",children:(0,b.jsx)("div",{className:"set-cell",children:(0,b.jsxs)("p",{className:"set-warn",children:["could not read this machine's settings. check that the dashboard can reach ",(0,b.jsx)("code",{children:"~/.failproofai/config.json"}),"."]})})}):(0,b.jsxs)("div",{className:"set-console",children:[(0,b.jsxs)("div",{className:"set-stats",children:[(0,b.jsx)(o,{label:"daemon",...W}),(0,b.jsx)(o,{label:"next scan",...X}),(0,b.jsx)(o,{label:"last scan",...Y}),(0,b.jsx)(o,{label:"findings",...Z})]}),(0,b.jsxs)("div",{className:"set-cols",children:[(0,b.jsxs)("div",{className:"set-cell set-config",children:[(0,b.jsx)("h2",{className:"set-cell-title",children:"scheduled audit"}),(0,b.jsxs)("div",{className:"set-row set-row-main",children:[(0,b.jsx)(q,{enabled:t,disabled:x||null===d,onChange:()=>void R(),label:t?"turn off scheduled audits":"turn on scheduled audits"}),(0,b.jsxs)("div",{className:"set-row-copy",children:[(0,b.jsx)("span",{className:"set-strong",children:t?"scanning on a schedule.":"scan on a schedule."}),(0,b.jsx)("span",{className:"set-dim",children:t?"you'll get an email only when a scan finds something.":"off. nothing runs and nothing is sent."})]})]}),(0,b.jsxs)("div",{className:"set-row set-row-interval",children:[(0,b.jsx)("span",{className:"set-dim",children:"scan every"}),(0,b.jsx)("input",{type:"number",className:"set-num",min:1,max:90,value:v,disabled:x||null===d,"aria-label":"days between scheduled scans",onChange:a=>w(Number(a.target.value)),onBlur:a=>{let b=Number(a.target.value);Number.isFinite(b)?b!==d?.intervalDays&&S(b):w(d?.intervalDays??7)}}),(0,b.jsx)("span",{className:"set-dim",children:"days"}),(0,b.jsxs)("span",{className:"set-hint",children:[1,"–",90]})]}),(0,b.jsx)("div",{className:"set-rule"}),(0,b.jsx)("div",{className:"set-row set-row-identity",children:K?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"set-dim",children:"reports go to"}),(0,b.jsx)("span",{className:"set-email",children:K.email}),(0,b.jsx)("button",{type:"button",className:"set-link",disabled:x,onClick:()=>void T(),children:"sign out"})]}):t?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"set-warn",children:"signed out — scans continue, digests are paused."}),(0,b.jsx)("button",{type:"button",className:"set-link",disabled:x,onClick:()=>C(!0),children:"sign in to resume"})]}):(0,b.jsx)("span",{className:"set-dim",children:"turning this on asks for an email, so there is somewhere to send the report."})}),t&&d&&!L&&(0,b.jsx)("p",{className:"set-warn",children:M?"the background service isn't available on this platform, so scheduled scans can't run here. you can still run one now.":"not-installed"===d.daemon?"the background service isn't installed, so nothing will run on the timer. install it with `failproofai config`.":"the background service is stopped, so nothing will run until it starts. repair it with `failproofai config`."}),P&&(0,b.jsxs)("p",{className:"set-warn",children:["the last scheduled scan exited ",N?.lastExitCode,". the next one will still run."]}),(0,b.jsx)("div",{className:"set-actions",children:(0,b.jsx)("button",{type:"button",className:"btn btn-press",disabled:z,onClick:()=>void U(),children:z?"[ scanning… ]":"[ run a scan now ]"})})]}),(0,b.jsxs)("div",{className:"set-cell set-how",children:[(0,b.jsx)("h2",{className:"set-cell-title",children:"how it works"}),(0,b.jsx)("dl",{className:"set-how-list",children:r.map(a=>(0,b.jsxs)("div",{className:"set-how-row",children:[(0,b.jsx)("dt",{className:"set-how-label",children:a.label}),(0,b.jsx)("dd",{className:"set-how-body",children:a.body})]},a.label))})]})]})]}),t&&F>0&&(0,b.jsx)(p,{lastRunAtMs:N?.lastRunAtMs??null,nextDueAtMs:N?.nextDueAtMs??null,now:F})]}),(0,b.jsx)(i.AuthDialog,{open:B,source:"settings_scheduled_audit",headline:"where should the report go?",subhead:"we'll send a one-time code to confirm.",onClose:()=>C(!1),onAuthed:a=>void V(a)})]})}],41857)}];
1
+ module.exports=[41857,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5050);let e=(0,d.createServerReference)("00aa430d336fe5b9f2c7e99dcd724a2140126b7df5",d.callServer,void 0,d.findSourceMapURL,"getScheduledAuditAction"),f=(0,d.createServerReference)("401a4233577ae78a8a9148d4d6fd172599a73d44e4",d.callServer,void 0,d.findSourceMapURL,"setAutoAuditAction"),g=(0,d.createServerReference)("400b31c249d9e9935f930f4c64cb4bcab3daae4a25",d.callServer,void 0,d.findSourceMapURL,"setAuditIntervalAction");var h=a.i(89564),i=a.i(4543),j=a.i(18952),k=a.i(80977);function l(a){return new Date(a).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function m(a,b){let c=a-b;if(c<=0)return"now";let d=Math.floor(c/864e5),e=Math.floor(c%864e5/36e5);return d>0?e>0?`${d}d ${e}h`:`${d}d`:e>0?`${e}h`:`${Math.max(1,Math.floor(c/6e4))}m`}function n(a){return a.toLocaleString("en-US")}function o({label:a,value:c,sub:d,tone:e}){return(0,b.jsxs)("div",{className:"set-stat",children:[(0,b.jsx)("div",{className:"set-stat-label",children:a}),(0,b.jsx)("div",{className:`set-stat-value${e?` ${e}`:""}`,children:c}),(0,b.jsx)("div",{className:"set-stat-sub",children:d??" "})]})}function p({lastRunAtMs:a,nextDueAtMs:c,now:d}){if(null==a||null==c||c<=a)return null;let e=Math.min(100,Math.max(0,(d-a)/(c-a)*100));return(0,b.jsxs)("div",{className:"tape","aria-hidden":"true",children:[(0,b.jsxs)("div",{className:"tape-rail",children:[(0,b.jsx)("div",{className:"tape-fill",style:{width:`${e}%`}}),(0,b.jsx)("div",{className:"tape-now",style:{left:`${e}%`}})]}),(0,b.jsxs)("div",{className:"tape-ends",children:[(0,b.jsxs)("span",{children:["last scan · ",l(a)]}),(0,b.jsxs)("span",{className:"tape-next",children:["next · ",m(c,d)]})]})]})}function q({enabled:a,onChange:c,disabled:d,label:e}){return(0,b.jsx)("button",{type:"button",role:"switch","aria-checked":a,"aria-label":e,disabled:d,onClick:c,className:"sw","data-on":a?"true":"false",children:(0,b.jsx)("span",{className:"sw-knob"})})}let r=[{label:"reads",body:"every session transcript on disk — your prompts, the files your agents read and wrote, and command output."},{label:"runs",body:"entirely on this machine. the transcripts never leave it."},{label:"sends",body:"counts, redacted examples, and this machine's name — and only when a scan finds something harmful."}];a.s(["default",0,function({initial:a}){let[d,s]=(0,c.useState)(a),[t,u]=(0,c.useState)(a?.auto??!1),[v,w]=(0,c.useState)(a?.intervalDays??7),[x,y]=(0,c.useState)(!1),[z,A]=(0,c.useState)(!1),[B,C]=(0,c.useState)(!1),[D,E]=(0,c.useState)(null===a),[F,G]=(0,c.useState)(0),H=(0,c.useRef)(!0),I=(0,c.useRef)(null!==a),J=(0,c.useCallback)(async()=>{try{let a=await e();if(!H.current)return;s(a),I.current=!0,u(a.auto),w(a.intervalDays),G(Date.now()),E(!1)}catch{H.current&&!I.current&&E(!0)}},[]);(0,c.useEffect)(()=>(H.current=!0,J(),()=>{H.current=!1}),[J]),(0,c.useEffect)(()=>{let a=()=>void J();return window.addEventListener("focus",a),document.addEventListener("visibilitychange",a),()=>{window.removeEventListener("focus",a),document.removeEventListener("visibilitychange",a)}},[J]);let K=d?.signedInAs??null,L=d?.daemon==="running",M=d?.daemon==="unsupported-platform",N=d?.schedule??null,O=d?.lastScan??null,P=N?.lastExitCode!=null&&0!==N.lastExitCode&&75!==N.lastExitCode,Q=(0,c.useCallback)(async()=>{y(!0);try{let a=await f(!0);if(!a.ok){if(u(!1),"unreachable"===a.reason)return void(0,j.toast)("could not reach the server. check your connection and try again.");await J(),C(!0),(0,j.toast)("that sign-in expired. one more code and it's on.");return}u(a.auto),(0,j.toast)("scheduled audits on."),await J()}catch{u(!1),(0,j.toast)("could not turn that on.")}finally{y(!1)}},[J]),R=(0,c.useCallback)(async()=>{if(t){y(!0);try{let a=await f(!1);a.ok&&u(a.auto),(0,j.toast)("scheduled audits off."),await J()}catch{(0,j.toast)("could not turn that off.")}finally{y(!1)}return}K?await Q():C(!0)},[t,Q,J,K]),S=(0,c.useCallback)(async a=>{y(!0);try{let b=await g(a);w(b.intervalDays),s(a=>a?{...a,intervalDays:b.intervalDays}:a),(0,j.toast)(`scanning every ${b.intervalDays} day${1===b.intervalDays?"":"s"}.`)}catch{w(d?.intervalDays??7),(0,j.toast)("could not save that.")}finally{y(!1)}},[d?.intervalDays]),T=(0,c.useCallback)(async()=>{y(!0);try{await fetch("/api/auth/logout",{method:"POST"}),(0,j.toast)("signed out. scans continue; digests pause."),await J()}catch{(0,j.toast)("could not sign out.")}finally{y(!1)}},[J]),U=(0,c.useCallback)(async()=>{if(!z){A(!0);try{await (0,h.triggerRun)({cli:[],since:"all",noCache:!1}),(0,j.toast)("scan complete."),await J()}catch(a){(0,j.toast)(a instanceof h.RerunError&&"timeout"===a.kind?"the scan is taking a while — it will finish in the background.":"the scan could not be completed.")}finally{A(!1)}}},[J,z]),V=(0,c.useCallback)(async a=>{C(!1),await J(),await Q()},[Q,J]),W=d?L?{value:"running",sub:null!=d.daemonStartedAtMs&&F>0?`up ${function(a){let b=Math.floor(a/864e5);if(b>0)return`${b}d`;let c=Math.floor(a/36e5);return c>0?`${c}h`:`${Math.max(1,Math.floor(a/6e4))}m`}(Math.max(0,F-d.daemonStartedAtMs))}`:"",tone:"ok"}:M?{value:"unavailable",sub:"not on this platform"}:"not-installed"===d.daemon?{value:"not installed",sub:"run failproofai config",tone:"warn"}:"unknown"===d.daemon?{value:"unknown",sub:"could not read it"}:{value:"stopped",sub:"run failproofai config",tone:"warn"}:{value:"…",sub:"reading"},X=t?N?.nextDueAtMs==null?{value:"pending",sub:"after the next scan"}:{value:F>0?m(N.nextDueAtMs,F):"—",sub:l(N.nextDueAtMs)}:{value:"off",sub:"nothing scheduled"},Y=O?{value:(0,k.formatRelativeTime)(Date.parse(O.finishedAt)),sub:null!=O.sessionsScanned?`${n(O.sessionsScanned)} sessions`:"scanned"}:{value:"none yet",sub:"run one below"},Z=O?null==O.findings?{value:"—",sub:"unreadable"}:{value:n(O.findings),sub:"this scan",...O.findings>0?{tone:"warn"}:{}}:{value:"—",sub:"no scan yet"};return(0,b.jsxs)("main",{className:"report",children:[(0,b.jsxs)("section",{className:"section set-sec",children:[(0,b.jsxs)("div",{className:"set-mast",children:[(0,b.jsx)("h1",{className:"set-title",children:"settings"}),(0,b.jsx)("p",{className:"set-lede",children:"keeping watch, so you don't have to."})]}),D?(0,b.jsx)("div",{className:"set-console",children:(0,b.jsx)("div",{className:"set-cell",children:(0,b.jsxs)("p",{className:"set-warn",children:["could not read this machine's settings. check that the dashboard can reach ",(0,b.jsx)("code",{children:"~/.failproofai/config.json"}),"."]})})}):(0,b.jsxs)("div",{className:"set-console",children:[(0,b.jsxs)("div",{className:"set-stats",children:[(0,b.jsx)(o,{label:"daemon",...W}),(0,b.jsx)(o,{label:"next scan",...X}),(0,b.jsx)(o,{label:"last scan",...Y}),(0,b.jsx)(o,{label:"findings",...Z})]}),(0,b.jsxs)("div",{className:"set-cols",children:[(0,b.jsxs)("div",{className:"set-cell set-config",children:[(0,b.jsx)("h2",{className:"set-cell-title",children:"scheduled audit"}),(0,b.jsxs)("div",{className:"set-row set-row-main",children:[(0,b.jsx)(q,{enabled:t,disabled:x||null===d,onChange:()=>void R(),label:t?"turn off scheduled audits":"turn on scheduled audits"}),(0,b.jsxs)("div",{className:"set-row-copy",children:[(0,b.jsx)("span",{className:"set-strong",children:t?"scanning on a schedule.":"scan on a schedule."}),(0,b.jsx)("span",{className:"set-dim",children:t?"you'll get an email only when a scan finds something.":"off. nothing runs and nothing is sent."})]})]}),(0,b.jsxs)("div",{className:"set-row set-row-interval",children:[(0,b.jsx)("span",{className:"set-dim",children:"scan every"}),(0,b.jsx)("input",{type:"number",className:"set-num",min:1,max:90,value:v,disabled:x||null===d,"aria-label":"days between scheduled scans",onChange:a=>w(Number(a.target.value)),onBlur:a=>{let b=Number(a.target.value);Number.isFinite(b)?b!==d?.intervalDays&&S(b):w(d?.intervalDays??7)}}),(0,b.jsx)("span",{className:"set-dim",children:"days"}),(0,b.jsxs)("span",{className:"set-hint",children:[1,"–",90]})]}),(0,b.jsx)("div",{className:"set-rule"}),(0,b.jsx)("div",{className:"set-row set-row-identity",children:K?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"set-dim",children:"reports go to"}),(0,b.jsx)("span",{className:"set-email",children:K.email}),(0,b.jsx)("button",{type:"button",className:"set-link",disabled:x,onClick:()=>void T(),children:"sign out"})]}):t?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"set-warn",children:"signed out — scans continue, digests are paused."}),(0,b.jsx)("button",{type:"button",className:"set-link",disabled:x,onClick:()=>C(!0),children:"sign in to resume"})]}):(0,b.jsx)("span",{className:"set-dim",children:"turning this on asks for an email, so there is somewhere to send the report."})}),t&&d&&!L&&(0,b.jsx)("p",{className:"set-warn",children:M?"the background service isn't available on this platform, so scheduled scans can't run here. you can still run one now.":"not-installed"===d.daemon?"the background service isn't installed, so nothing will run on the timer. install it with `failproofai config`.":"the background service is stopped, so nothing will run until it starts. repair it with `failproofai config`."}),P&&(0,b.jsxs)("p",{className:"set-warn",children:["the last scheduled scan exited ",N?.lastExitCode,". the next one will still run."]}),(0,b.jsx)("div",{className:"set-actions",children:(0,b.jsx)("button",{type:"button",className:"btn btn-press",disabled:z,onClick:()=>void U(),children:z?"[ scanning… ]":"[ run a scan now ]"})})]}),(0,b.jsxs)("div",{className:"set-cell set-how",children:[(0,b.jsx)("h2",{className:"set-cell-title",children:"how it works"}),(0,b.jsx)("dl",{className:"set-how-list",children:r.map(a=>(0,b.jsxs)("div",{className:"set-how-row",children:[(0,b.jsx)("dt",{className:"set-how-label",children:a.label}),(0,b.jsx)("dd",{className:"set-how-body",children:a.body})]},a.label))})]})]})]}),t&&F>0&&(0,b.jsx)(p,{lastRunAtMs:N?.lastRunAtMs??null,nextDueAtMs:N?.nextDueAtMs??null,now:F})]}),(0,b.jsx)(i.AuthDialog,{open:B,source:"settings_scheduled_audit",headline:"where should the report go?",subhead:"we'll send a one-time code to confirm.",onClose:()=>C(!1),onAuthed:a=>void V(a)})]})}],41857)}];
2
2
 
3
3
  //# sourceMappingURL=app_settings_settings-client_tsx_20lq-mq._.js.map