@claudeye/darwin-arm64 1.0.7 → 1.0.9

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 (275) hide show
  1. package/assets/dist/hooks-api.d.ts +43 -0
  2. package/assets/dist/hooks-api.js +1 -0
  3. package/assets/dist/index.d.ts +2 -0
  4. package/assets/dist/index.js +1 -1
  5. package/assets/dist/loader.js +2 -2
  6. package/assets/standalone/.next/BUILD_ID +1 -1
  7. package/assets/standalone/.next/app-path-routes-manifest.json +2 -1
  8. package/assets/standalone/.next/build-manifest.json +8 -8
  9. package/assets/standalone/.next/prerender-manifest.json +27 -3
  10. package/assets/standalone/.next/routes-manifest.json +12 -6
  11. package/assets/standalone/.next/server/app/_global-error/page/build-manifest.json +5 -5
  12. package/assets/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +14 -1
  13. package/assets/standalone/.next/server/app/_global-error/page.js +5 -5
  14. package/assets/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  15. package/assets/standalone/.next/server/app/_global-error.html +1 -1
  16. package/assets/standalone/.next/server/app/_global-error.rsc +7 -7
  17. package/assets/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  18. package/assets/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  19. package/assets/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  20. package/assets/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  21. package/assets/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  22. package/assets/standalone/.next/server/app/_not-found/page/build-manifest.json +5 -5
  23. package/assets/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
  24. package/assets/standalone/.next/server/app/_not-found/page.js +6 -7
  25. package/assets/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  26. package/assets/standalone/.next/server/app/_not-found.html +2 -2
  27. package/assets/standalone/.next/server/app/_not-found.rsc +27 -30
  28. package/assets/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +27 -30
  29. package/assets/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  30. package/assets/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +12 -15
  31. package/assets/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  32. package/assets/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  33. package/assets/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  34. package/assets/standalone/.next/server/app/api/completed-history/route.js +2 -2
  35. package/assets/standalone/.next/server/app/api/download/[project]/[session]/route.js +1 -1
  36. package/assets/standalone/.next/server/app/api/queue-item/route.js +2 -2
  37. package/assets/standalone/.next/server/app/api/queue-status/route.js +2 -2
  38. package/assets/standalone/.next/server/app/dashboard/[viewName]/page/build-manifest.json +5 -5
  39. package/assets/standalone/.next/server/app/dashboard/[viewName]/page/server-reference-manifest.json +5 -5
  40. package/assets/standalone/.next/server/app/dashboard/[viewName]/page.js +8 -9
  41. package/assets/standalone/.next/server/app/dashboard/[viewName]/page_client-reference-manifest.js +1 -1
  42. package/assets/standalone/.next/server/app/dashboard/page/build-manifest.json +5 -5
  43. package/assets/standalone/.next/server/app/dashboard/page/server-reference-manifest.json +5 -5
  44. package/assets/standalone/.next/server/app/dashboard/page.js +9 -10
  45. package/assets/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
  46. package/assets/standalone/.next/server/app/index.html +1 -0
  47. package/assets/standalone/.next/server/app/index.meta +15 -0
  48. package/assets/standalone/.next/server/app/index.rsc +22 -0
  49. package/assets/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -0
  50. package/assets/standalone/.next/server/app/index.segments/_full.segment.rsc +22 -0
  51. package/assets/standalone/.next/server/app/index.segments/_head.segment.rsc +6 -0
  52. package/assets/standalone/.next/server/app/index.segments/_index.segment.rsc +12 -0
  53. package/assets/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -0
  54. package/assets/standalone/.next/server/app/login/page/build-manifest.json +5 -5
  55. package/assets/standalone/.next/server/app/login/page/server-reference-manifest.json +3 -3
  56. package/assets/standalone/.next/server/app/login/page.js +6 -7
  57. package/assets/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  58. package/assets/standalone/.next/server/app/login.html +2 -2
  59. package/assets/standalone/.next/server/app/login.rsc +30 -34
  60. package/assets/standalone/.next/server/app/login.segments/_full.segment.rsc +30 -34
  61. package/assets/standalone/.next/server/app/login.segments/_head.segment.rsc +4 -4
  62. package/assets/standalone/.next/server/app/login.segments/_index.segment.rsc +12 -15
  63. package/assets/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  64. package/assets/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  65. package/assets/standalone/.next/server/app/login.segments/login.segment.rsc +3 -3
  66. package/assets/standalone/.next/server/app/page/build-manifest.json +5 -5
  67. package/assets/standalone/.next/server/app/page/server-reference-manifest.json +2 -2
  68. package/assets/standalone/.next/server/app/page.js +7 -8
  69. package/assets/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  70. package/assets/standalone/.next/server/app/policies/page/app-paths-manifest.json +3 -0
  71. package/assets/standalone/.next/server/app/{hooks → policies}/page/build-manifest.json +5 -5
  72. package/assets/standalone/.next/server/app/{hooks → policies}/page/server-reference-manifest.json +36 -24
  73. package/assets/standalone/.next/server/app/{hooks → policies}/page.js +9 -10
  74. package/assets/standalone/.next/server/app/policies/page_client-reference-manifest.js +3 -0
  75. package/assets/standalone/.next/server/app/project/[name]/page/build-manifest.json +5 -5
  76. package/assets/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +2 -2
  77. package/assets/standalone/.next/server/app/project/[name]/page.js +7 -9
  78. package/assets/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  79. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +5 -5
  80. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  81. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +10 -10
  82. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +8 -9
  83. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  84. package/assets/standalone/.next/server/app/projects/page/app-paths-manifest.json +3 -0
  85. package/assets/standalone/.next/server/app/projects/page/build-manifest.json +18 -0
  86. package/assets/standalone/.next/server/app/projects/page/next-font-manifest.json +6 -0
  87. package/assets/standalone/.next/server/app/projects/page/react-loadable-manifest.json +1 -0
  88. package/assets/standalone/.next/server/app/projects/page/server-reference-manifest.json +29 -0
  89. package/assets/standalone/.next/server/app/projects/page.js +18 -0
  90. package/assets/standalone/.next/server/app/projects/page_client-reference-manifest.js +3 -0
  91. package/assets/standalone/.next/server/app/queue/page/build-manifest.json +5 -5
  92. package/assets/standalone/.next/server/app/queue/page/server-reference-manifest.json +4 -4
  93. package/assets/standalone/.next/server/app/queue/page.js +8 -9
  94. package/assets/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  95. package/assets/standalone/.next/server/app-paths-manifest.json +2 -1
  96. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0-_qfa9._.js +1 -1
  97. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0.lwwrp._.js +3 -0
  98. package/assets/standalone/.next/server/chunks/[root-of-the-server]__072w.g0._.js +1 -1
  99. package/assets/standalone/.next/server/chunks/[root-of-the-server]__08lgurx._.js +1 -1
  100. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0bps8pa._.js +1 -1
  101. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0f_5ws6._.js +1 -1
  102. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +1 -1
  103. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0ld-~9t._.js +1 -1
  104. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0ndqa7s._.js +8 -3
  105. package/assets/standalone/.next/server/chunks/{[root-of-the-server]__0wkrejt._.js → [root-of-the-server]__0rtkhr~._.js} +1 -1
  106. package/assets/standalone/.next/server/chunks/{[root-of-the-server]__031vvrp._.js → [root-of-the-server]__0tlbu6c._.js} +1 -1
  107. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0vfmej5._.js +4 -0
  108. package/assets/standalone/.next/server/chunks/_04cgd3m._.js +11 -0
  109. package/assets/standalone/.next/server/chunks/_0aylu-q._.js +2 -2
  110. package/assets/standalone/.next/server/chunks/_0h9z2~x._.js +11 -0
  111. package/assets/standalone/.next/server/chunks/_0lq2_wn._.js +2 -2
  112. package/assets/standalone/.next/server/chunks/_0oqawqx._.js +2 -2
  113. package/assets/standalone/.next/server/chunks/_0vt409y._.js +2 -2
  114. package/assets/standalone/.next/server/chunks/lib_0a9kq7-._.js +11 -0
  115. package/assets/standalone/.next/server/chunks/lib_0b2.9p5._.js +11 -0
  116. package/assets/standalone/.next/server/chunks/lib_13x.g8a._.js +11 -0
  117. package/assets/standalone/.next/server/chunks/lib_eval-queue_ts_08t8vgq._.js +1 -1
  118. package/assets/standalone/.next/server/chunks/lib_eval-queue_ts_0h8e7f.._.js +1 -1
  119. package/assets/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0l15kkr.js +1 -1
  120. package/assets/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
  121. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-9w~bh._.js +3 -0
  122. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-_oq51._.js +4 -0
  123. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-om19y._.js +11 -0
  124. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-wbic0._.js +45 -0
  125. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__02l2rag._.js +3 -0
  126. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__04qo1w2._.js +4 -0
  127. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__09y6src._.js +4 -0
  128. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__09y7ni.._.js +3 -0
  129. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bubgf_._.js +4 -0
  130. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0f7wkrr._.js +3 -0
  131. package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0l897tw._.js → [root-of-the-server]__0iv48_z._.js} +2 -2
  132. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j7bj94._.js +3 -0
  133. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0m0x9dt._.js +4 -0
  134. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oy2.6r._.js +3 -0
  135. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pw0g9c._.js +4 -0
  136. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rm4qtt._.js +4 -0
  137. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sn21jm._.js +3 -0
  138. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0spfsp5._.js +4 -0
  139. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0uz88bg._.js +3 -0
  140. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0x7-awk._.js +4 -0
  141. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zva2n_._.js +4 -0
  142. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__1370kzv._.js +4 -0
  143. package/assets/standalone/.next/server/chunks/ssr/_01fj_8s._.js +1 -1
  144. package/assets/standalone/.next/server/chunks/ssr/_02_tcps._.js +32 -0
  145. package/assets/standalone/.next/server/chunks/ssr/_04.u7zx._.js +3 -0
  146. package/assets/standalone/.next/server/chunks/ssr/_06383ya._.js +3 -0
  147. package/assets/standalone/.next/server/chunks/ssr/_06nq9qk._.js +1 -1
  148. package/assets/standalone/.next/server/chunks/ssr/_0i~.gk_._.js +1 -1
  149. package/assets/standalone/.next/server/chunks/ssr/_0kfjwwu._.js +1 -1
  150. package/assets/standalone/.next/server/chunks/ssr/_0km.fsf._.js +3 -0
  151. package/assets/standalone/.next/server/chunks/ssr/_0rr.uoo._.js +3 -3
  152. package/assets/standalone/.next/server/chunks/ssr/_0x26hbi._.js +3 -0
  153. package/assets/standalone/.next/server/chunks/ssr/{_0_ia8tm._.js → _0xg44oj._.js} +2 -2
  154. package/assets/standalone/.next/server/chunks/ssr/_11ou~_x._.js +3 -0
  155. package/assets/standalone/.next/server/chunks/ssr/_1207ol.._.js +1 -1
  156. package/assets/standalone/.next/server/chunks/ssr/app_04qfs8z._.js +1 -1
  157. package/assets/standalone/.next/server/chunks/ssr/app_05evmdg._.js +1 -1
  158. package/assets/standalone/.next/server/chunks/ssr/app_07izk21._.js +1 -1
  159. package/assets/standalone/.next/server/chunks/ssr/app_0uosk1e._.js +1 -1
  160. package/assets/standalone/.next/server/chunks/ssr/app_13f0ohr._.js +1 -1
  161. package/assets/standalone/.next/server/chunks/ssr/app_actions_compute-dashboard_ts_13cb_9d._.js +1 -1
  162. package/assets/standalone/.next/server/chunks/ssr/app_global-error_tsx_0m9qisk._.js +3 -0
  163. package/assets/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +3 -0
  164. package/assets/standalone/.next/server/chunks/ssr/app_login_page_tsx_0z71ad3._.js +1 -1
  165. package/assets/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +8 -0
  166. package/assets/standalone/.next/server/chunks/ssr/{app_loading_tsx_05semg5._.js → app_projects_loading_tsx_13veom4._.js} +2 -2
  167. package/assets/standalone/.next/server/chunks/ssr/app_queue_queue-client_tsx_0c0olxv._.js +1 -1
  168. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_0rd0oc-._.js +2 -2
  169. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_0h9llsw._.js +2 -2
  170. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_0~3yv~8._.js +3 -0
  171. package/assets/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0s-cxl7.js → node_modules_next_dist_esm_build_templates_app-page_06pwt.d.js} +3 -3
  172. package/assets/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0j.ij4e.js → node_modules_next_dist_esm_build_templates_app-page_091vo_-.js} +3 -3
  173. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0a_7sdg.js +4 -0
  174. package/assets/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0blr8v-.js → node_modules_next_dist_esm_build_templates_app-page_0ef3uwk.js} +3 -3
  175. package/assets/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0_4obh1.js → node_modules_next_dist_esm_build_templates_app-page_0ft_6~o.js} +3 -3
  176. package/assets/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0rc3ul_.js → node_modules_next_dist_esm_build_templates_app-page_0j79~gv.js} +3 -3
  177. package/assets/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0za6ylf.js → node_modules_next_dist_esm_build_templates_app-page_0pbja1x.js} +3 -3
  178. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0r6o0i2.js +4 -0
  179. package/assets/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_13mo15i.js → node_modules_next_dist_esm_build_templates_app-page_0w9nerp.js} +3 -3
  180. package/assets/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0xv8hin.js → node_modules_next_dist_esm_build_templates_app-page_11y81~_.js} +3 -3
  181. package/assets/standalone/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0cmo95h.js → node_modules_next_dist_esm_build_templates_app-page_12or2kf.js} +3 -3
  182. package/assets/standalone/.next/server/middleware-build-manifest.js +8 -8
  183. package/assets/standalone/.next/server/pages/404.html +2 -2
  184. package/assets/standalone/.next/server/pages/500.html +1 -1
  185. package/assets/standalone/.next/server/server-reference-manifest.js +1 -1
  186. package/assets/standalone/.next/server/server-reference-manifest.json +82 -52
  187. package/assets/standalone/.next/static/chunks/0.llxyobdk9ao.js +1 -0
  188. package/assets/standalone/.next/static/chunks/{0lkh25hviflid.js → 013e6ucdn~oej.js} +1 -1
  189. package/assets/standalone/.next/static/chunks/01i5gpaes1u49.js +6 -0
  190. package/assets/standalone/.next/static/chunks/01q52wg_amm60.js +2 -0
  191. package/assets/standalone/.next/static/chunks/{053grpfc7gghs.js → 01z1mkd0jlg01.js} +1 -1
  192. package/assets/standalone/.next/static/chunks/041yg1qijsts_.js +1 -0
  193. package/assets/standalone/.next/static/chunks/0_s0luks5tay-.js +1 -0
  194. package/assets/standalone/.next/static/chunks/0c0j9cso1kkr_.css +1 -0
  195. package/assets/standalone/.next/static/chunks/0dji_r0j6sq~f.js +1 -0
  196. package/assets/standalone/.next/static/chunks/0eozapv72nxu9.js +1 -0
  197. package/assets/standalone/.next/static/chunks/0r-uj~~hfjn~d.js +4 -0
  198. package/assets/standalone/.next/static/chunks/0r33ook0mzjdp.js +3 -0
  199. package/assets/standalone/.next/static/chunks/0tdv9t00~jli0.js +1 -0
  200. package/assets/standalone/.next/static/chunks/0tyw4u3~2isbh.js +1 -0
  201. package/assets/standalone/.next/static/chunks/{0h4bq73pogmtb.js → 0u95dh6lcl7tm.js} +31 -1
  202. package/assets/standalone/.next/static/chunks/0yby34zxp~u9y.js +1 -0
  203. package/assets/standalone/.next/static/chunks/10qr1cqizt~sp.js +1 -0
  204. package/assets/standalone/.next/static/chunks/{04aem330ymbdp.js → 150i0n26fnvso.js} +1 -1
  205. package/assets/standalone/.next/static/chunks/15fklyav5py5m.js +1 -0
  206. package/assets/standalone/.next/static/chunks/16g-s3n9.r1ua.js +1 -0
  207. package/assets/standalone/.next/static/chunks/17.b3suj8zjjj.js +1 -0
  208. package/assets/standalone/.next/static/chunks/{turbopack-05k-ytyhplqy7.js → turbopack-0.w3uhj.ln7pt.js} +1 -1
  209. package/assets/standalone/README.md +119 -5
  210. package/assets/standalone/design-docs/custom-hooks.md +722 -0
  211. package/assets/standalone/design-docs/e2e-hook-testing.md +420 -0
  212. package/assets/standalone/package.json +4 -2
  213. package/assets/standalone/vitest.config.e2e.mts +21 -0
  214. package/bin/claudeye +0 -0
  215. package/package.json +1 -1
  216. package/assets/standalone/.next/server/app/hooks/page/app-paths-manifest.json +0 -3
  217. package/assets/standalone/.next/server/app/hooks/page_client-reference-manifest.js +0 -3
  218. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0_03u6.._.js +0 -4
  219. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0ynza7q._.js +0 -3
  220. package/assets/standalone/.next/server/chunks/_0fx1kj9._.js +0 -7
  221. package/assets/standalone/.next/server/chunks/_12qi01p._.js +0 -7
  222. package/assets/standalone/.next/server/chunks/lib_0it0qxy._.js +0 -7
  223. package/assets/standalone/.next/server/chunks/lib_0k3u5ri._.js +0 -7
  224. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-j~_e.._.js +0 -3
  225. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__00fve8g._.js +0 -36
  226. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__028-6zz._.js +0 -3
  227. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__02x4-91._.js +0 -4
  228. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__06tqxbp._.js +0 -4
  229. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__08a4wva._.js +0 -3
  230. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0a-4fjm._.js +0 -33
  231. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cnf9rp._.js +0 -3
  232. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dsucx_._.js +0 -4
  233. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e9ohz2._.js +0 -4
  234. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fltiz1._.js +0 -4
  235. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ksoh6e._.js +0 -3
  236. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-as.._.js +0 -4
  237. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tsew7c._.js +0 -4
  238. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0x5abxa._.js +0 -3
  239. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0yi-883._.js +0 -4
  240. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zn.1q2._.js +0 -3
  241. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__10_wjge._.js +0 -4
  242. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__11xi38p._.js +0 -7
  243. package/assets/standalone/.next/server/chunks/ssr/_03l0_j6._.js +0 -3
  244. package/assets/standalone/.next/server/chunks/ssr/_050qnuh._.js +0 -3
  245. package/assets/standalone/.next/server/chunks/ssr/_0_~1-jh._.js +0 -3
  246. package/assets/standalone/.next/server/chunks/ssr/_0ndt7tj._.js +0 -3
  247. package/assets/standalone/.next/server/chunks/ssr/_0uig1kl._.js +0 -3
  248. package/assets/standalone/.next/server/chunks/ssr/_0vc9nu-._.js +0 -32
  249. package/assets/standalone/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js +0 -3
  250. package/assets/standalone/.next/server/chunks/ssr/app_hooks_hooks-client_tsx_0n~.yoz._.js +0 -3
  251. package/assets/standalone/.next/server/chunks/ssr/node_modules_0gyjybr._.js +0 -3
  252. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_06j6hww._.js +0 -33
  253. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js +0 -3
  254. package/assets/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0~flnue.js +0 -4
  255. package/assets/standalone/.next/static/chunks/0-06jeyuuf3mf.js +0 -1
  256. package/assets/standalone/.next/static/chunks/0.z9o1xk80npg.js +0 -2
  257. package/assets/standalone/.next/static/chunks/01xlw8hd842-c.js +0 -1
  258. package/assets/standalone/.next/static/chunks/09f624.buk6jr.js +0 -1
  259. package/assets/standalone/.next/static/chunks/0g5cvlv5.8drd.js +0 -3
  260. package/assets/standalone/.next/static/chunks/0g~w.4hiyi_1j.js +0 -1
  261. package/assets/standalone/.next/static/chunks/0il8_19l.4u-p.js +0 -1
  262. package/assets/standalone/.next/static/chunks/0j1-mgai_b50s.css +0 -1
  263. package/assets/standalone/.next/static/chunks/0ljjv.c03-d.y.js +0 -1
  264. package/assets/standalone/.next/static/chunks/0n6vo_gsuay4v.js +0 -4
  265. package/assets/standalone/.next/static/chunks/0nntcr2py4m14.js +0 -1
  266. package/assets/standalone/.next/static/chunks/0sp_gwqc7ka~z.js +0 -1
  267. package/assets/standalone/.next/static/chunks/0z0dljl8fz7.-.js +0 -1
  268. package/assets/standalone/.next/static/chunks/0z9fpf50h7mcq.js +0 -1
  269. package/assets/standalone/.next/static/chunks/115dplafwys-z.js +0 -31
  270. package/assets/standalone/.next/static/chunks/119bhqt_bddam.js +0 -1
  271. /package/assets/standalone/.next/server/app/{hooks → policies}/page/next-font-manifest.json +0 -0
  272. /package/assets/standalone/.next/server/app/{hooks → policies}/page/react-loadable-manifest.json +0 -0
  273. /package/assets/standalone/.next/static/{l1G516WtxNj1aLrIr5STH → T2uFRf42cIG4zxcRtc0qK}/_buildManifest.js +0 -0
  274. /package/assets/standalone/.next/static/{l1G516WtxNj1aLrIr5STH → T2uFRf42cIG4zxcRtc0qK}/_clientMiddlewareManifest.js +0 -0
  275. /package/assets/standalone/.next/static/{l1G516WtxNj1aLrIr5STH → T2uFRf42cIG4zxcRtc0qK}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[90619,95947,a=>{"use strict";var b=a.i(50944),c=a.i(72131);function d(a){let b=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),d=String(a.getDate()).padStart(2,"0");return`${b}-${c}-${d}`}function e(a){if(!a||!f(a))return null;let[b,c,d]=a.split("-").map(Number);return new Date(b,c-1,d,12,0,0)}function f(a){return/^\d{4}-\d{2}-\d{2}$/.test(a)&&!isNaN(Date.parse(a))}a.s(["useUrlParams",0,function(){let a=(0,b.useSearchParams)(),d=(0,b.useRouter)(),e=(0,b.usePathname)(),f=(0,c.useRef)(null),g=(0,c.useCallback)(b=>a.get(b),[a]),h=(0,c.useCallback)(()=>new URLSearchParams(a.toString()),[a]),i=(0,c.useCallback)(b=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{let c=new URLSearchParams(a.toString());for(let[a,d]of Object.entries(b))void 0===d||""===d?c.delete(a):c.set(a,d);let f=c.toString(),g=f?`${e}?${f}`:e;d.replace(g,{scroll:!1})},150)},[a,e,d]);return(0,c.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]),{get:g,getAll:h,setAll:i}}],90619),a.s(["activeFilterToParam",0,function(a,b){switch(a.type){case"boolean":return"all"===b?void 0:b;case"number":if(b.min===a.min&&b.max===a.max)return;return`${b.min}~${b.max}`;case"string":if(b.size===a.values.length)return;return Array.from(b).map(a=>encodeURIComponent(a)).join(",");case"date":if(!b.from&&!b.to)return;return`${b.from??""},${b.to??""}`}},"dateRangeToParams",0,function(a){let b={};return a.from&&(b.from=d(a.from)),a.to&&(b.to=d(a.to)),b},"keywordsToParam",0,function(a){if(0!==a.length)return a.map(a=>encodeURIComponent(a)).join(",")},"pageToParam",0,function(a){return a<=1?void 0:String(a)},"paramToActiveFilter",0,function(a,b){if(null===b||""===b)return null;switch(a.type){case"boolean":if("true"===b||"false"===b)return b;return null;case"number":{let a=b.split("~");if(2!==a.length)return null;let c=parseFloat(a[0]),d=parseFloat(a[1]);if(!Number.isFinite(c)||!Number.isFinite(d))return null;return{min:c,max:d}}case"string":{let c=b.split(",").map(a=>decodeURIComponent(a.trim())).filter(b=>a.values.includes(b));if(0===c.length)return null;return new Set(c)}case"date":{let a=b.split(",");if(2!==a.length)return null;let c=a[0]||null,d=a[1]||null;if(!c&&!d||c&&!f(c)||d&&!f(d))return null;return{from:c,to:d}}}},"paramToKeywords",0,function(a){return a?a.split(",").map(a=>decodeURIComponent(a.trim())).filter(a=>a.length>0):[]},"paramToPage",0,function(a){if(!a)return 1;let b=parseInt(a,10);return Number.isFinite(b)&&b>=1?b:1},"paramToPreset",0,function(a){return a&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(a)?a:"all"},"paramsToDateRange",0,function(a,b){return{from:e(a),to:e(b)}},"presetToParam",0,function(a){return"all"===a?void 0:a}],95947)},65967,a=>{"use strict";var b=a.i(87924),c=a.i(70106);let d=(0,c.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),e=(0,c.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["default",0,function({currentPage:a,totalPages:c,onPageChange:f}){if(c<=1)return null;let g=a=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${a?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,b.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,b.jsxs)("button",{onClick:()=>f(a-1),disabled:1===a,className:g(1===a),"aria-label":"Previous page",children:[(0,b.jsx)(d,{className:"w-4 h-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,b.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(c<=7)return Array.from({length:c},(a,b)=>b+1);let b=[1],d=Math.max(2,a-1),e=Math.min(c-1,a+1);a<=3&&(e=Math.min(5,c-1)),a>=c-2&&(d=Math.max(2,c-4)),d>2&&b.push("ellipsis-start");for(let a=d;a<=e;a++)b.push(a);return e<c-1&&b.push("ellipsis-end"),b.push(c),b})().map(c=>"string"==typeof c?(0,b.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},c):(0,b.jsx)("button",{onClick:()=>f(c),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${a===c?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${c}`,"aria-current":a===c?"page":void 0,children:c},c))}),(0,b.jsxs)("button",{onClick:()=>f(a+1),disabled:a===c,className:g(a===c),"aria-label":"Next page",children:[(0,b.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,b.jsx)(e,{className:"w-4 h-4"})]})]})}],65967)},24451,a=>{"use strict";var b=a.i(87924);let c=(0,a.i(70106).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["default",0,function({id:a,value:d,stringValue:e,onChange:f,"aria-label":g}){let h=null!=e?e:d?d.toISOString().split("T")[0]:"";return(0,b.jsxs)("div",{className:"relative group",children:[(0,b.jsx)("input",{type:"date",id:a,value:h,onChange:a=>f(a.target.value),"aria-label":g,className:"date-input px-3 py-2 pr-8 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 w-[200px]"}),(0,b.jsx)("label",{htmlFor:a,className:"absolute right-2.5 top-1/2 -translate-y-1/2 cursor-pointer pointer-events-auto z-10 p-1 rounded hover:bg-muted/50 transition-colors",onClick:b=>{b.preventDefault();let c=document.getElementById(a);c&&"function"==typeof c.showPicker?c.showPicker():c?.click()},children:(0,b.jsx)(c,{className:"w-4 h-4 text-primary group-hover:text-primary/80 transition-colors"})})]})}],24451)},35487,a=>{"use strict";let b=(0,a.i(70106).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);a.s(["File",0,b],35487)},5151,33441,a=>{"use strict";var b=a.i(70106);let c=(0,b.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",0,c],5151);let d=(0,b.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["Check",0,d],33441)},24121,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5151),e=a.i(33441),f=a.i(97895);function g(a){let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b);try{return b.select(),document.execCommand("copy")}finally{document.body.removeChild(b)}}a.s(["CopyButton",0,function({text:a,className:h}){let[i,j]=(0,c.useState)(!1),k=(0,c.useCallback)(async()=>{try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(a);else if(!g(a))throw Error("Both clipboard methods failed");j(!0),setTimeout(()=>j(!1),2e3)}catch(b){console.error("Failed to copy to clipboard:",b);try{g(a)&&(j(!0),setTimeout(()=>j(!1),2e3))}catch{}}},[a]);return(0,b.jsx)("button",{onClick:k,title:"Copy to clipboard",className:(0,f.cn)("inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors",h),children:i?(0,b.jsx)(e.Check,{className:"w-3.5 h-3.5 text-green-500"}):(0,b.jsx)(d.Copy,{className:"w-3.5 h-3.5"})})}])},27950,45481,87532,a=>{"use strict";a.s(["FILTER_PRESETS",0,[{value:"all",label:"All"},{value:"last-hour",label:"Last Hour"},{value:"today",label:"Today"},{value:"last-7-days",label:"Last 7 Days"},{value:"last-30-days",label:"Last 30 Days"}],"ITEMS_PER_PAGE",0,25,"filterByDate",0,function(a,b,c){if("all"===b)return a;if("custom"===b){let b,d,e=c.from?((b=new Date(c.from)).setHours(0,0,0,0),b):null,f=c.to?((d=new Date(c.to)).setHours(23,59,59,999),d):null;return a.filter(a=>(!e||!(a.lastModified<e))&&(!f||!(a.lastModified>f)))}let d=function(a){let b=new Date;switch(a){case"last-hour":return new Date(b.getTime()-36e5);case"today":return new Date(b.getFullYear(),b.getMonth(),b.getDate());case"last-7-days":return new Date(b.getTime()-6048e5);case"last-30-days":return new Date(b.getTime()-2592e6);default:return null}}(b);return d?a.filter(a=>a.lastModified>=d):a},"rehydrateDates",0,function(a){return a.map(a=>({...a,lastModified:a.lastModified instanceof Date?a.lastModified:new Date(a.lastModified)}))}],27950);var b=a.i(72131);a.s(["useFilterState",0,function(a=[],c){let[d,e]=(0,b.useState)(c?.filterPreset??"all"),[f,g]=(0,b.useState)(c?.dateRange??{from:null,to:null}),[h,i]=(0,b.useState)(c?.currentPage??1),j=`${d}|${JSON.stringify(f)}|${JSON.stringify(a)}`,[k,l]=(0,b.useState)(j);j!==k&&(l(j),i(1));let m=(0,b.useCallback)(a=>{e(a),"custom"!==a&&g({from:null,to:null})},[]);return{filterPreset:d,dateRange:f,currentPage:h,setCurrentPage:i,handlePresetChange:m,handleDateRangeChange:(0,b.useCallback)((a,b)=>{e("custom"),g(c=>({...c,[a]:b?new Date(b):null}))},[]),clearFilters:(0,b.useCallback)(()=>{e("all"),g({from:null,to:null})},[])}}],45481);let c=(0,a.i(70106).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);a.s(["Search",0,c],87532)},34484,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(97895),e=a.i(27950),f=a.i(45481),g=a.i(90619),h=a.i(95947),i=a.i(35487),j=a.i(87532),k=a.i(38246),l=a.i(65967),m=a.i(24451),n=a.i(24121);a.s(["default",0,function({files:a,projectName:o}){let p=(0,g.useUrlParams)(),q=(0,c.useRef)(!1),[r,s]=(0,c.useState)(()=>p.get("sid")??""),{filterPreset:t,dateRange:u,currentPage:v,setCurrentPage:w,handlePresetChange:x,handleDateRangeChange:y,clearFilters:z}=(0,f.useFilterState)([r],{filterPreset:(0,h.paramToPreset)(p.get("preset")),dateRange:(0,h.paramsToDateRange)(p.get("from"),p.get("to")),currentPage:(0,h.paramToPage)(p.get("page"))});(0,c.useEffect)(()=>{if(!q.current){q.current=!0;return}p.setAll({preset:(0,h.presetToParam)(t),...(0,h.dateRangeToParams)(u),sid:r||void 0,page:(0,h.pageToParam)(v)})},[t,u,r,v]);let A=(0,c.useMemo)(()=>(0,e.rehydrateDates)(a),[a]),B=(0,c.useMemo)(()=>{var a;let b;return(a=(0,e.filterByDate)(A,t,u),!(b=r.trim().toLowerCase())?a:a.filter(a=>a.sessionId?.toLowerCase().includes(b))).sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime())},[A,r,t,u]),C=Math.max(1,Math.ceil(B.length/e.ITEMS_PER_PAGE));(0,c.useEffect)(()=>{v>C&&w(C)},[v,C,w]);let D=(v-1)*e.ITEMS_PER_PAGE,E=Math.min(D+e.ITEMS_PER_PAGE,B.length),F=B.slice(D,E),G="all"!==t||null!==u.from||null!==u.to||""!==r;return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4 flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Filter by:"}),e.FILTER_PRESETS.map(a=>(0,b.jsx)("button",{onClick:()=>x(a.value),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${t===a.value?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:a.label},a.value))]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Custom Range:"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(m.default,{id:"date-from",value:u.from,onChange:a=>y("from",a),"aria-label":"Filter from date"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"to"}),(0,b.jsx)(m.default,{id:"date-to",value:u.to,onChange:a=>y("to",a),"aria-label":"Filter to date"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(j.Search,{className:"w-4 h-4 text-muted-foreground"}),(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Filter by Session ID:"}),(0,b.jsx)("input",{type:"text",value:r,onChange:a=>s(a.target.value),placeholder:"Enter session ID (UUID)",className:"px-3 py-2 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 flex-1 max-w-md","aria-label":"Filter by session ID"}),G&&(0,b.jsx)("button",{onClick:()=>{z(),s("")},className:"px-3 py-2 text-sm bg-muted text-muted-foreground hover:bg-muted/80 rounded-md transition-colors",children:"Clear"})]}),(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:0===B.length?"No sessions found":(0,b.jsxs)(b.Fragment,{children:["Showing ",D+1,"-",E," of ",B.length," sessions",B.length!==A.length&&(0,b.jsxs)("span",{className:"ml-1",children:["(filtered from ",A.length," total)"]})]})})]}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"border-b border-border bg-muted/50",children:[(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground w-12",children:(0,b.jsx)("span",{className:"sr-only",children:"Icon"})}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"SessionId"}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Modified"})]})}),(0,b.jsx)("tbody",{children:0===F.length?(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:3,className:"px-4 py-8 text-center text-muted-foreground",children:"No sessions found matching the filter."})}):F.map(a=>(0,b.jsxs)("tr",{className:"border-b border-border hover:bg-muted/50 transition-colors",children:[(0,b.jsx)("td",{className:"px-4 py-3",children:(0,b.jsx)(i.File,{className:"w-5 h-5 text-primary"})}),(0,b.jsx)("td",{className:"px-4 py-3 max-w-md",children:(0,b.jsx)("div",{className:"flex items-center gap-1",children:a.sessionId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(k.default,{href:`/project/${encodeURIComponent(o)}/session/${encodeURIComponent(a.sessionId)}`,className:"font-semibold text-foreground hover:text-primary transition-colors break-words break-all inline-block max-w-full",children:a.name.replace(/\.jsonl$/,"")}),(0,b.jsx)(n.CopyButton,{text:a.sessionId})]}):(0,b.jsx)("span",{className:"font-semibold text-foreground break-words break-all inline-block max-w-full",children:a.name.replace(/\.jsonl$/,"")})})}),(0,b.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:a.lastModifiedFormatted||(0,d.formatDate)(a.lastModified)})]},a.path))})]})}),B.length>0&&(0,b.jsx)(l.default,{currentPage:v,totalPages:C,onPageChange:w})]})]})}])}];
1
+ module.exports=[90619,95947,a=>{"use strict";var b=a.i(50944),c=a.i(80826);function d(a){let b=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),d=String(a.getDate()).padStart(2,"0");return`${b}-${c}-${d}`}function e(a){if(!a||!f(a))return null;let[b,c,d]=a.split("-").map(Number);return new Date(b,c-1,d,12,0,0)}function f(a){return/^\d{4}-\d{2}-\d{2}$/.test(a)&&!isNaN(Date.parse(a))}a.s(["useUrlParams",0,function(){let a=(0,b.useSearchParams)(),d=(0,b.useRouter)(),e=(0,b.usePathname)(),f=(0,c.useRef)(null),g=(0,c.useCallback)(b=>a.get(b),[a]),h=(0,c.useCallback)(()=>new URLSearchParams(a.toString()),[a]),i=(0,c.useCallback)(b=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{let c=new URLSearchParams(a.toString());for(let[a,d]of Object.entries(b))void 0===d||""===d?c.delete(a):c.set(a,d);let f=c.toString(),g=f?`${e}?${f}`:e;d.replace(g,{scroll:!1})},150)},[a,e,d]);return(0,c.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]),{get:g,getAll:h,setAll:i}}],90619),a.s(["activeFilterToParam",0,function(a,b){switch(a.type){case"boolean":return"all"===b?void 0:b;case"number":if(b.min===a.min&&b.max===a.max)return;return`${b.min}~${b.max}`;case"string":if(b.size===a.values.length)return;return Array.from(b).map(a=>encodeURIComponent(a)).join(",");case"date":if(!b.from&&!b.to)return;return`${b.from??""},${b.to??""}`}},"dateRangeToParams",0,function(a){let b={};return a.from&&(b.from=d(a.from)),a.to&&(b.to=d(a.to)),b},"keywordsToParam",0,function(a){if(0!==a.length)return a.map(a=>encodeURIComponent(a)).join(",")},"pageToParam",0,function(a){return a<=1?void 0:String(a)},"paramToActiveFilter",0,function(a,b){if(null===b||""===b)return null;switch(a.type){case"boolean":if("true"===b||"false"===b)return b;return null;case"number":{let a=b.split("~");if(2!==a.length)return null;let c=parseFloat(a[0]),d=parseFloat(a[1]);if(!Number.isFinite(c)||!Number.isFinite(d))return null;return{min:c,max:d}}case"string":{let c=b.split(",").map(a=>decodeURIComponent(a.trim())).filter(b=>a.values.includes(b));if(0===c.length)return null;return new Set(c)}case"date":{let a=b.split(",");if(2!==a.length)return null;let c=a[0]||null,d=a[1]||null;if(!c&&!d||c&&!f(c)||d&&!f(d))return null;return{from:c,to:d}}}},"paramToKeywords",0,function(a){return a?a.split(",").map(a=>decodeURIComponent(a.trim())).filter(a=>a.length>0):[]},"paramToPage",0,function(a){if(!a)return 1;let b=parseInt(a,10);return Number.isFinite(b)&&b>=1?b:1},"paramToPreset",0,function(a){return a&&["all","last-hour","today","last-7-days","last-30-days","custom"].includes(a)?a:"all"},"paramsToDateRange",0,function(a,b){return{from:e(a),to:e(b)}},"presetToParam",0,function(a){return"all"===a?void 0:a}],95947)},65967,a=>{"use strict";var b=a.i(87924),c=a.i(70106);let d=(0,c.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),e=(0,c.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["default",0,function({currentPage:a,totalPages:c,onPageChange:f}){if(c<=1)return null;let g=a=>`px-3 py-2 text-sm rounded-md transition-colors flex items-center gap-1 bg-muted text-muted-foreground ${a?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`;return(0,b.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4",children:[(0,b.jsxs)("button",{onClick:()=>f(a-1),disabled:1===a,className:g(1===a),"aria-label":"Previous page",children:[(0,b.jsx)(d,{className:"w-4 h-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Previous"})]}),(0,b.jsx)("div",{className:"flex items-center gap-1",children:(()=>{if(c<=7)return Array.from({length:c},(a,b)=>b+1);let b=[1],d=Math.max(2,a-1),e=Math.min(c-1,a+1);a<=3&&(e=Math.min(5,c-1)),a>=c-2&&(d=Math.max(2,c-4)),d>2&&b.push("ellipsis-start");for(let a=d;a<=e;a++)b.push(a);return e<c-1&&b.push("ellipsis-end"),b.push(c),b})().map(c=>"string"==typeof c?(0,b.jsx)("span",{className:"px-2 text-muted-foreground",children:"..."},c):(0,b.jsx)("button",{onClick:()=>f(c),className:`min-w-[2.5rem] px-3 py-2 text-sm rounded-md transition-colors ${a===c?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"aria-label":`Page ${c}`,"aria-current":a===c?"page":void 0,children:c},c))}),(0,b.jsxs)("button",{onClick:()=>f(a+1),disabled:a===c,className:g(a===c),"aria-label":"Next page",children:[(0,b.jsx)("span",{className:"hidden sm:inline",children:"Next"}),(0,b.jsx)(e,{className:"w-4 h-4"})]})]})}],65967)},24451,a=>{"use strict";var b=a.i(87924);let c=(0,a.i(70106).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["default",0,function({id:a,value:d,stringValue:e,onChange:f,"aria-label":g}){let h=null!=e?e:d?d.toISOString().split("T")[0]:"";return(0,b.jsxs)("div",{className:"relative group",children:[(0,b.jsx)("input",{type:"date",id:a,value:h,onChange:a=>f(a.target.value),"aria-label":g,className:"date-input px-3 py-2 pr-8 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 w-[200px]"}),(0,b.jsx)("label",{htmlFor:a,className:"absolute right-2.5 top-1/2 -translate-y-1/2 cursor-pointer pointer-events-auto z-10 p-1 rounded hover:bg-muted/50 transition-colors",onClick:b=>{b.preventDefault();let c=document.getElementById(a);c&&"function"==typeof c.showPicker?c.showPicker():c?.click()},children:(0,b.jsx)(c,{className:"w-4 h-4 text-primary group-hover:text-primary/80 transition-colors"})})]})}],24451)},35487,a=>{"use strict";let b=(0,a.i(70106).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);a.s(["File",0,b],35487)},5151,33441,a=>{"use strict";var b=a.i(70106);let c=(0,b.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",0,c],5151);let d=(0,b.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["Check",0,d],33441)},24121,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(5151),e=a.i(33441),f=a.i(97895);function g(a){let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b);try{return b.select(),document.execCommand("copy")}finally{document.body.removeChild(b)}}a.s(["CopyButton",0,function({text:a,className:h}){let[i,j]=(0,c.useState)(!1),k=(0,c.useCallback)(async()=>{try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(a);else if(!g(a))throw Error("Both clipboard methods failed");j(!0),setTimeout(()=>j(!1),2e3)}catch(b){console.error("Failed to copy to clipboard:",b);try{g(a)&&(j(!0),setTimeout(()=>j(!1),2e3))}catch{}}},[a]);return(0,b.jsx)("button",{onClick:k,title:"Copy to clipboard",className:(0,f.cn)("inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors",h),children:i?(0,b.jsx)(e.Check,{className:"w-3.5 h-3.5 text-green-500"}):(0,b.jsx)(d.Copy,{className:"w-3.5 h-3.5"})})}])},27950,45481,87532,a=>{"use strict";a.s(["FILTER_PRESETS",0,[{value:"all",label:"All"},{value:"last-hour",label:"Last Hour"},{value:"today",label:"Today"},{value:"last-7-days",label:"Last 7 Days"},{value:"last-30-days",label:"Last 30 Days"}],"ITEMS_PER_PAGE",0,25,"filterByDate",0,function(a,b,c){if("all"===b)return a;if("custom"===b){let b,d,e=c.from?((b=new Date(c.from)).setHours(0,0,0,0),b):null,f=c.to?((d=new Date(c.to)).setHours(23,59,59,999),d):null;return a.filter(a=>(!e||!(a.lastModified<e))&&(!f||!(a.lastModified>f)))}let d=function(a){let b=new Date;switch(a){case"last-hour":return new Date(b.getTime()-36e5);case"today":return new Date(b.getFullYear(),b.getMonth(),b.getDate());case"last-7-days":return new Date(b.getTime()-6048e5);case"last-30-days":return new Date(b.getTime()-2592e6);default:return null}}(b);return d?a.filter(a=>a.lastModified>=d):a},"rehydrateDates",0,function(a){return a.map(a=>({...a,lastModified:a.lastModified instanceof Date?a.lastModified:new Date(a.lastModified)}))}],27950);var b=a.i(80826);a.s(["useFilterState",0,function(a=[],c){let[d,e]=(0,b.useState)(c?.filterPreset??"all"),[f,g]=(0,b.useState)(c?.dateRange??{from:null,to:null}),[h,i]=(0,b.useState)(c?.currentPage??1),j=`${d}|${JSON.stringify(f)}|${JSON.stringify(a)}`,[k,l]=(0,b.useState)(j);j!==k&&(l(j),i(1));let m=(0,b.useCallback)(a=>{e(a),"custom"!==a&&g({from:null,to:null})},[]);return{filterPreset:d,dateRange:f,currentPage:h,setCurrentPage:i,handlePresetChange:m,handleDateRangeChange:(0,b.useCallback)((a,b)=>{e("custom"),g(c=>({...c,[a]:b?new Date(b):null}))},[]),clearFilters:(0,b.useCallback)(()=>{e("all"),g({from:null,to:null})},[])}}],45481);let c=(0,a.i(70106).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);a.s(["Search",0,c],87532)},34484,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(97895),e=a.i(27950),f=a.i(45481),g=a.i(90619),h=a.i(95947),i=a.i(35487),j=a.i(87532),k=a.i(38246),l=a.i(65967),m=a.i(24451),n=a.i(24121);a.s(["default",0,function({files:a,projectName:o}){let p=(0,g.useUrlParams)(),q=(0,c.useRef)(!1),[r,s]=(0,c.useState)(()=>p.get("sid")??""),{filterPreset:t,dateRange:u,currentPage:v,setCurrentPage:w,handlePresetChange:x,handleDateRangeChange:y,clearFilters:z}=(0,f.useFilterState)([r],{filterPreset:(0,h.paramToPreset)(p.get("preset")),dateRange:(0,h.paramsToDateRange)(p.get("from"),p.get("to")),currentPage:(0,h.paramToPage)(p.get("page"))});(0,c.useEffect)(()=>{if(!q.current){q.current=!0;return}p.setAll({preset:(0,h.presetToParam)(t),...(0,h.dateRangeToParams)(u),sid:r||void 0,page:(0,h.pageToParam)(v)})},[t,u,r,v]);let A=(0,c.useMemo)(()=>(0,e.rehydrateDates)(a),[a]),B=(0,c.useMemo)(()=>{var a;let b;return(a=(0,e.filterByDate)(A,t,u),!(b=r.trim().toLowerCase())?a:a.filter(a=>a.sessionId?.toLowerCase().includes(b))).sort((a,b)=>b.lastModified.getTime()-a.lastModified.getTime())},[A,r,t,u]),C=Math.max(1,Math.ceil(B.length/e.ITEMS_PER_PAGE));(0,c.useEffect)(()=>{v>C&&w(C)},[v,C,w]);let D=(v-1)*e.ITEMS_PER_PAGE,E=Math.min(D+e.ITEMS_PER_PAGE,B.length),F=B.slice(D,E),G="all"!==t||null!==u.from||null!==u.to||""!==r;return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4 flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Filter by:"}),e.FILTER_PRESETS.map(a=>(0,b.jsx)("button",{onClick:()=>x(a.value),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${t===a.value?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:a.label},a.value))]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Custom Range:"}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(m.default,{id:"date-from",value:u.from,onChange:a=>y("from",a),"aria-label":"Filter from date"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"to"}),(0,b.jsx)(m.default,{id:"date-to",value:u.to,onChange:a=>y("to",a),"aria-label":"Filter to date"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(j.Search,{className:"w-4 h-4 text-muted-foreground"}),(0,b.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Filter by Session ID:"}),(0,b.jsx)("input",{type:"text",value:r,onChange:a=>s(a.target.value),placeholder:"Enter session ID (UUID)",className:"px-3 py-2 text-sm bg-input border border-border rounded-md text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all hover:border-primary/50 flex-1 max-w-md","aria-label":"Filter by session ID"}),G&&(0,b.jsx)("button",{onClick:()=>{z(),s("")},className:"px-3 py-2 text-sm bg-muted text-muted-foreground hover:bg-muted/80 rounded-md transition-colors",children:"Clear"})]}),(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:0===B.length?"No sessions found":(0,b.jsxs)(b.Fragment,{children:["Showing ",D+1,"-",E," of ",B.length," sessions",B.length!==A.length&&(0,b.jsxs)("span",{className:"ml-1",children:["(filtered from ",A.length," total)"]})]})})]}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"border-b border-border bg-muted/50",children:[(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground w-12",children:(0,b.jsx)("span",{className:"sr-only",children:"Icon"})}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"SessionId"}),(0,b.jsx)("th",{scope:"col",className:"px-4 py-3 text-left text-sm font-semibold text-foreground",children:"Modified"})]})}),(0,b.jsx)("tbody",{children:0===F.length?(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:3,className:"px-4 py-8 text-center text-muted-foreground",children:"No sessions found matching the filter."})}):F.map(a=>(0,b.jsxs)("tr",{className:"border-b border-border hover:bg-muted/50 transition-colors",children:[(0,b.jsx)("td",{className:"px-4 py-3",children:(0,b.jsx)(i.File,{className:"w-5 h-5 text-primary"})}),(0,b.jsx)("td",{className:"px-4 py-3 max-w-md",children:(0,b.jsx)("div",{className:"flex items-center gap-1",children:a.sessionId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(k.default,{href:`/project/${encodeURIComponent(o)}/session/${encodeURIComponent(a.sessionId)}`,className:"font-semibold text-foreground hover:text-primary transition-colors break-words break-all inline-block max-w-full",children:a.name.replace(/\.jsonl$/,"")}),(0,b.jsx)(n.CopyButton,{text:a.sessionId})]}):(0,b.jsx)("span",{className:"font-semibold text-foreground break-words break-all inline-block max-w-full",children:a.name.replace(/\.jsonl$/,"")})})}),(0,b.jsx)("td",{className:"px-4 py-3 text-sm text-muted-foreground",children:a.lastModifiedFormatted||(0,d.formatDate)(a.lastModified)})]},a.path))})]})}),B.length>0&&(0,b.jsx)(l.default,{currentPage:v,totalPages:C,onPageChange:w})]})]})}])}];
2
2
 
3
3
  //# sourceMappingURL=_1207ol.._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[84572,a=>{"use strict";var b=a.i(87924);a.s(["default",0,function({error:a,reset:c,heading:d,defaultMessage:e}){return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:d}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||e}),(0,b.jsx)("button",{onClick:c,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},40048,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Failed to load session",defaultMessage:"An unexpected error occurred while reading the session log."})}])}];
1
+ module.exports=[84572,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(66036);a.s(["default",0,function({error:a,reset:e,heading:f,defaultMessage:g}){return(0,c.useEffect)(()=>{(0,d.captureClientEvent)("client_error",{error_message:a.message,error_name:a.name,error_digest:a.digest})},[a]),(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:f}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||g}),(0,b.jsx)("button",{onClick:e,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},40048,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Failed to load session",defaultMessage:"An unexpected error occurred while reading the session log."})}])}];
2
2
 
3
3
  //# sourceMappingURL=app_04qfs8z._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[84572,a=>{"use strict";var b=a.i(87924);a.s(["default",0,function({error:a,reset:c,heading:d,defaultMessage:e}){return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:d}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||e}),(0,b.jsx)("button",{onClick:c,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},89208,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Dashboard View Error",defaultMessage:"An unexpected error occurred while loading this dashboard view."})}])}];
1
+ module.exports=[84572,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(66036);a.s(["default",0,function({error:a,reset:e,heading:f,defaultMessage:g}){return(0,c.useEffect)(()=>{(0,d.captureClientEvent)("client_error",{error_message:a.message,error_name:a.name,error_digest:a.digest})},[a]),(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:f}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||g}),(0,b.jsx)("button",{onClick:e,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},89208,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Dashboard View Error",defaultMessage:"An unexpected error occurred while loading this dashboard view."})}])}];
2
2
 
3
3
  //# sourceMappingURL=app_05evmdg._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[84572,a=>{"use strict";var b=a.i(87924);a.s(["default",0,function({error:a,reset:c,heading:d,defaultMessage:e}){return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:d}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||e}),(0,b.jsx)("button",{onClick:c,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},5403,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Dashboard Error",defaultMessage:"An unexpected error occurred while loading the dashboard."})}])}];
1
+ module.exports=[84572,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(66036);a.s(["default",0,function({error:a,reset:e,heading:f,defaultMessage:g}){return(0,c.useEffect)(()=>{(0,d.captureClientEvent)("client_error",{error_message:a.message,error_name:a.name,error_digest:a.digest})},[a]),(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:f}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||g}),(0,b.jsx)("button",{onClick:e,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},5403,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Dashboard Error",defaultMessage:"An unexpected error occurred while loading the dashboard."})}])}];
2
2
 
3
3
  //# sourceMappingURL=app_07izk21._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[84572,a=>{"use strict";var b=a.i(87924);a.s(["default",0,function({error:a,reset:c,heading:d,defaultMessage:e}){return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:d}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||e}),(0,b.jsx)("button",{onClick:c,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},7620,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Failed to load project",defaultMessage:"An unexpected error occurred while loading this project."})}])}];
1
+ module.exports=[84572,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(66036);a.s(["default",0,function({error:a,reset:e,heading:f,defaultMessage:g}){return(0,c.useEffect)(()=>{(0,d.captureClientEvent)("client_error",{error_message:a.message,error_name:a.name,error_digest:a.digest})},[a]),(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:f}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||g}),(0,b.jsx)("button",{onClick:e,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},7620,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Failed to load project",defaultMessage:"An unexpected error occurred while loading this project."})}])}];
2
2
 
3
3
  //# sourceMappingURL=app_0uosk1e._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[84572,a=>{"use strict";var b=a.i(87924);a.s(["default",0,function({error:a,reset:c,heading:d,defaultMessage:e}){return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:d}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||e}),(0,b.jsx)("button",{onClick:c,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},78141,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Something went wrong",defaultMessage:"An unexpected error occurred while loading projects."})}])}];
1
+ module.exports=[84572,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(66036);a.s(["default",0,function({error:a,reset:e,heading:f,defaultMessage:g}){return(0,c.useEffect)(()=>{(0,d.captureClientEvent)("client_error",{error_message:a.message,error_name:a.name,error_digest:a.digest})},[a]),(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-destructive/50 p-6 shadow-sm text-center",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold text-destructive mb-2",children:f}),(0,b.jsx)("p",{className:"text-muted-foreground mb-4",children:a.message||g}),(0,b.jsx)("button",{onClick:e,className:"px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Try again"})]})})})}])},78141,a=>{"use strict";var b=a.i(87924),c=a.i(84572);a.s(["default",0,function(a){return(0,b.jsx)(c.default,{...a,heading:"Something went wrong",defaultMessage:"An unexpected error occurred while loading projects."})}])}];
2
2
 
3
3
  //# sourceMappingURL=app_13f0ohr._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[42298,4930,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(82762),e=a.i(50871);async function f(a,b,c,f,g,h){let i=g??(0,d.getRegisteredFilters)(),j={entries:a,stats:b,projectName:c,sessionId:f,source:"session"};return h&&(j.evalResults=h),(0,e.runAll)(i,j,{skipResult:a=>({name:a.name,value:!1,durationMs:0,skipped:!0}),successResult:(a,b,c)=>({name:a.name,value:b,durationMs:c}),errorResult:(a,b,c)=>({name:a.name,value:!1,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",value:!1,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0;for(let b of a)b.skipped?d++:b.error&&c++;return{results:a,totalDurationMs:b,errorCount:c,skippedCount:d}}})}var g=a.i(83397),h=a.i(61542),i=a.i(69191);a.i(651);var j=a.i(70427),k=a.i(46721),l=a.i(70467),m=a.i(26192),n=a.i(82248),o=a.i(13095);let p="__CLAUDEYE_DASHBOARD_INDEX__";async function q(a,b){try{let q;await (0,c.ensureEvalsLoaded)();let r=(0,d.getFiltersForView)(a??"default"),s=(0,d.getPreBuiltFiltersForView)(a??"default");if(0===r.length&&0===s.length)return{ok:!0,hasFilters:!1};let t=performance.now(),u=a??"default",v=(0,d.getViewOptions)(u),w=v?.cachedOnly??!1,x=w?(0,l.getSessionScopedEvals)():[],y=await (0,k.hashEvalsModule)(),z=r.map(a=>a.name),A={};for(let a of r)A[a.name]=a.label;let B=function(a,b,c,d){let e=globalThis,f=e[p];if(f&&f.viewName===a&&f.evalsHash===b&&f.filterNames.length===c.length&&f.filterNames.every((a,b)=>a===c[b]))return f;let g={};for(let a of c)g[a]={type:"unknown",min:1/0,max:-1/0,uniqueStrings:new Set};let h={viewName:a,evalsHash:b,rows:new Map,contentHashes:new Map,accumulators:g,filterNames:c,filterLabels:d,metaDirty:!0,cachedFilterMeta:null};return e[p]=h,h}(u,y,z,A),C=await (0,i.getCachedProjectFolders)(),D=[];for(let a of(await (0,m.batchAll)(C.map(a=>async()=>{let b=await (0,i.getCachedSessionFiles)(a.path);return{project:a,sessionFiles:b}}),10)))if("fulfilled"===a.status)for(let b of a.value.sessionFiles)b.sessionId&&D.push({project:a.value.project,file:b});let E=new Set,F=new Map;for(let a of D){let b=`${a.project.name}/${a.file.sessionId}`;E.add(b),F.set(b,a)}for(let a of B.rows.keys())E.has(a)||(B.rows.delete(a),B.contentHashes.delete(a),B.metaDirty=!0);let G=[];for(let a of(await (0,m.batchAll)(D.map(({project:a,file:b})=>async()=>{let c,d=b.sessionId,e=`${a.name}/${d}`;try{c=await (0,k.hashSessionFile)(a.name,d)}catch{c=crypto.randomUUID()}return{key:e,contentHash:c,project:a,file:b}}),10))){if("fulfilled"!==a.status)continue;let{key:b,contentHash:c,project:d,file:e}=a.value;B.contentHashes.get(b)===c&&B.rows.has(b)||(G.push({key:b,task:{project:d,file:e}}),B.contentHashes.set(b,c))}if(w&&G.length>0){let a=await (0,m.batchAll)(G.map(({key:a,task:{project:b,file:c}})=>async()=>{let d=c.sessionId,e=B.contentHashes.get(a);return{key:a,cached:await (0,j.isSessionFullyCached)(b.name,d,e)}}),10),b=new Set;for(let c of a)"fulfilled"===c.status&&c.value.cached&&b.add(c.value.key);G=G.filter(({key:a})=>b.has(a))}let H=new Set;if(G.length>0)for(let a=0;a<G.length;a+=10){let b=G.slice(a,a+10);for(let a of(await Promise.allSettled(b.map(async({key:a,task:{project:b,file:c}})=>{let d,e=c.sessionId,i=B.contentHashes.get(a)??"",l=w&&x.length>0?`${u}/eval-ctx/${e}`:`${u}/${e}`,m=await (0,j.getCachedResult)("filters",b.name,l,z,i);if(m)d=m.value;else{let a,{entries:c,rawLines:m}=await (0,g.parseSessionLog)(b.name,e),n=(0,h.calculateLogStats)(c);if(w&&x.length>0){let c=await Promise.all(x.map(a=>(0,j.getPerItemCacheWithHook)("evals",b.name,e,a.name,(0,k.hashItemCode)(a.fn),i)));if(c.every(a=>null!==a))for(let b of(a={},c)){let c=b.value;a[c.name]={pass:c.pass,score:c.score,error:c.error,message:c.message}}}d=await f(m,n,b.name,e,r,a),(0,j.setCachedResult)("filters",b.name,l,d,z,i)}let o={};for(let a of d.results)a.skipped||a.error||(o[a.name]=a.value);let p={projectName:b.name,sessionId:e,lastModified:c.lastModified.toISOString(),lastModifiedFormatted:c.lastModifiedFormatted||(0,n.formatDate)(c.lastModified),filterValues:o};return{key:a,row:p}}))))if("fulfilled"===a.status){let{key:b,row:c}=a.value;B.rows.set(b,c),B.metaDirty=!0,H.add(b)}}let I=[...function(a){if(!a.metaDirty&&a.cachedFilterMeta)return a.cachedFilterMeta;a.metaDirty&&function(a){for(let b of a.filterNames)a.accumulators[b]={type:"unknown",min:1/0,max:-1/0,uniqueStrings:new Set};for(let b of a.rows.values())!function(a,b){for(let[c,d]of Object.entries(b)){let b=a[c];b&&("boolean"==typeof d?b.type="boolean":"number"==typeof d?(b.type="number",d<b.min&&(b.min=d),d>b.max&&(b.max=d)):"string"==typeof d&&(b.type="string",b.uniqueStrings.add(d)))}}(a.accumulators,b.filterValues)}(a);let b=a.filterNames.map(b=>{let c=a.accumulators[b],d=a.filterLabels[b]??b;return"number"===c.type?{type:"number",name:b,label:d,min:c.min,max:c.max}:"string"===c.type?{type:"string",name:b,label:d,values:Array.from(c.uniqueStrings).sort()}:{type:"boolean",name:b,label:d}});return a.cachedFilterMeta=b,a.metaDirty=!1,b}(B)];for(let a of s)if("lastModified"===a.name){let b="",c="";for(let a of B.rows.values())(!b||a.lastModified<b)&&(b=a.lastModified),(!c||a.lastModified>c)&&(c=a.lastModified);b&&c&&I.push({type:"date",name:a.name,label:a.label,min:new Date(b).toLocaleDateString("en-CA"),max:new Date(c).toLocaleDateString("en-CA")})}let J=Array.from(B.rows.values());if(w){let a=J.filter(a=>{let b=`${a.projectName}/${a.sessionId}`;return!H.has(b)});if(a.length>0){let b=await (0,m.batchAll)(a.map(a=>async()=>{let b=`${a.projectName}/${a.sessionId}`,c=B.contentHashes.get(b);return{session:a,key:b,cached:await (0,j.isSessionFullyCached)(a.projectName,a.sessionId,c)}}),10),c=new Set;for(let a of b)"fulfilled"!==a.status||a.value.cached||(c.add(a.value.key),B.rows.delete(a.value.key),B.contentHashes.delete(a.value.key),B.metaDirty=!0);J=J.filter(a=>{let b=`${a.projectName}/${a.sessionId}`;return!c.has(b)})}}let K=b?.page??1,L=b?.pageSize??25;if(b?.filters&&Object.keys(b.filters).length>0){var e,o;e=J,o=b.filters,q=e.filter(a=>{for(let b of I){let c=o[b.name];if(c)switch(c.type){case"boolean":{let d=a.filterValues[b.name];if(void 0===d||"all"===c.value)continue;if("true"===c.value&&!0!==d||"false"===c.value&&!1!==d)return!1;break}case"number":{let d=a.filterValues[b.name];if(void 0===d)continue;if(d<c.min||d>c.max)return!1;break}case"string":{let d=a.filterValues[b.name];if(void 0===d)continue;if(c.selected.length>0&&!c.selected.includes(d))return!1;break}case"date":{let b=new Date(a.lastModified).toLocaleDateString("en-CA");if(c.from&&b<c.from||c.to&&b>c.to)return!1}}}return!0})}else q=J;q.sort((a,b)=>b.lastModified.localeCompare(a.lastModified));let M=J.length,N=q.length,O=(K-1)*L,P=q.slice(O,O+L),Q=Math.round(performance.now()-t);return{ok:!0,hasFilters:!0,payload:{sessions:P,filterMeta:I,totalDurationMs:Q,totalCount:M,matchingCount:N,page:K,pageSize:L}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,o.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"609cdd5e40bab3916a17f83b49a67f5530d3743257",null),a.s(["computeDashboard",0,q],42298);var r=a.i(46325),s=a.i(65003),t=a.i(31810);let u="__CLAUDEYE_AGGREGATE_INDEX__";async function v(a){try{await (0,c.ensureEvalsLoaded)();let b=a??"default",e=(0,d.getAggregatesForView)(b);if(0===e.length)return{ok:!0,hasAggregates:!1};let n=performance.now(),o=await (0,k.hashEvalsModule)(),p=e.map(a=>a.name),q=function(a,b,c){let d=globalThis,e=d[u];if(e&&e.viewName===a&&e.evalsHash===b&&e.aggregateNames.length===c.length&&e.aggregateNames.every((a,b)=>a===c[b]))return e;let f={viewName:a,evalsHash:b,aggregateNames:c,collectedSessions:new Map,contentHashes:new Map};return d[u]=f,f}(b,o,p),v=await (0,i.getCachedProjectFolders)(),w=[];for(let a of(await (0,m.batchAll)(v.map(a=>async()=>{let b=await (0,i.getCachedSessionFiles)(a.path);return{project:a,sessionFiles:b}}),10)))if("fulfilled"===a.status)for(let b of a.value.sessionFiles)b.sessionId&&w.push({project:a.value.project,file:b});let x=new Set;for(let a of w){let b=`${a.project.name}/${a.file.sessionId}`;x.add(b)}for(let a of q.collectedSessions.keys())x.has(a)||(q.collectedSessions.delete(a),q.contentHashes.delete(a));let y=[];for(let a of(await (0,m.batchAll)(w.map(({project:a,file:b})=>async()=>{let c,d=b.sessionId,e=`${a.name}/${d}`;try{c=await (0,k.hashSessionFile)(a.name,d)}catch{c=crypto.randomUUID()}return{key:e,contentHash:c,project:a,file:b}}),10))){if("fulfilled"!==a.status)continue;let{key:b,contentHash:c,project:d,file:e}=a.value;q.contentHashes.get(b)===c&&q.collectedSessions.has(b)||y.push({key:b,task:{project:d,file:e},contentHash:c})}if(y.length>0){let a=(0,l.hasEvals)()?(0,l.getSessionScopedEvals)():[],c=(0,r.hasEnrichers)()?(0,r.getSessionScopedEnrichers)():[],i=(0,d.getFiltersForView)(b);for(let d=0;d<y.length;d+=10){let k=y.slice(d,d+10);for(let d of(await Promise.allSettled(k.map(async({key:d,task:{project:k,file:l},contentHash:m})=>{let n=l.sessionId,o=`${b}/agg/${n}`,q=await (0,j.getCachedResult)("aggregates",k.name,o,p,m);if(q){let a={};for(let b of Object.values(q.value))Object.assign(a,b);return{key:d,contentHash:m,collected:{projectName:k.name,sessionId:n,values:a}}}let{entries:r,rawLines:u}=await (0,g.parseSessionLog)(k.name,n),v=(0,h.calculateLogStats)(r),w={};if(a.length>0)for(let b of(await (0,s.runAllEvals)(u,v,k.name,n,a)).results)b.skipped||(w[b.name]={pass:b.pass,score:b.score,error:b.error,message:b.message});let x={};if(c.length>0)for(let a of(await (0,t.runAllEnrichers)(u,v,k.name,n,c)).results)a.skipped||a.error||(x[a.name]=a.data);let y={};if(i.length>0)for(let a of(await f(u,v,k.name,n,i)).results)a.skipped||a.error||(y[a.name]=a.value);let z={entries:u,stats:v,projectName:k.name,sessionId:n,source:"session",evalResults:w,enrichResults:x,filterValues:y},A={},B={};for(let a of e)try{if(a.condition){let b={entries:u,stats:v,projectName:k.name,sessionId:n,source:"session"};if(!await a.condition(b))continue}let b=await a.collect(z);A[a.name]=b,Object.assign(B,b)}catch{}return(0,j.setCachedResult)("aggregates",k.name,o,A,p,m),{key:d,contentHash:m,collected:{projectName:k.name,sessionId:n,values:B}}}))))if("fulfilled"===d.status){let{key:a,contentHash:b,collected:c}=d.value;q.collectedSessions.set(a,c),q.contentHashes.set(a,b)}}}let z=Array.from(q.collectedSessions.values()),A=[];for(let a of e)try{let b=await a.reduce(z),c=b.length>0?Object.keys(b[0]):[];A.push({name:a.name,label:a.label,rows:b,columns:c})}catch{A.push({name:a.name,label:a.label,rows:[],columns:[]})}let B=Math.round(performance.now()-n);return{ok:!0,hasAggregates:!0,payload:{aggregates:A,totalSessions:z.length,totalDurationMs:B}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,o.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"40b3a14080cb720b6a54efadafffecc889e401ce6f",null),a.s(["computeAggregates",0,v],4930)}];
1
+ module.exports=[42298,4930,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(82762),e=a.i(50871);async function f(a,b,c,f,g,h){let i=g??(0,d.getRegisteredFilters)(),j={entries:a,stats:b,projectName:c,sessionId:f,source:"session"};return h&&(j.evalResults=h),(0,e.runAll)(i,j,{skipResult:a=>({name:a.name,value:!1,durationMs:0,skipped:!0}),successResult:(a,b,c)=>({name:a.name,value:b,durationMs:c}),errorResult:(a,b,c)=>({name:a.name,value:!1,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",value:!1,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0;for(let b of a)b.skipped?d++:b.error&&c++;return{results:a,totalDurationMs:b,errorCount:c,skippedCount:d}}})}var g=a.i(83397),h=a.i(61542),i=a.i(69191);a.i(651);var j=a.i(70427),k=a.i(46721),l=a.i(70467),m=a.i(26192),n=a.i(82248),o=a.i(13095);let p="__CLAUDEYE_DASHBOARD_INDEX__";async function q(a,b){try{let q;await (0,c.ensureEvalsLoaded)();let r=(0,d.getFiltersForView)(a??"default"),s=(0,d.getPreBuiltFiltersForView)(a??"default");if(0===r.length&&0===s.length)return{ok:!0,hasFilters:!1};let t=performance.now(),u=a??"default",v=(0,d.getViewOptions)(u),w=v?.cachedOnly??!1,x=w?(0,l.getSessionScopedEvals)():[],y=await (0,k.hashEvalsModule)(),z=r.map(a=>a.name),A={};for(let a of r)A[a.name]=a.label;let B=function(a,b,c,d){let e=globalThis,f=e[p];if(f&&f.viewName===a&&f.evalsHash===b&&f.filterNames.length===c.length&&f.filterNames.every((a,b)=>a===c[b]))return f;let g={};for(let a of c)g[a]={type:"unknown",min:1/0,max:-1/0,uniqueStrings:new Set};let h={viewName:a,evalsHash:b,rows:new Map,contentHashes:new Map,accumulators:g,filterNames:c,filterLabels:d,metaDirty:!0,cachedFilterMeta:null};return e[p]=h,h}(u,y,z,A),C=await (0,i.getCachedProjectFolders)(),D=[];for(let a of(await (0,m.batchAll)(C.map(a=>async()=>{let b=await (0,i.getCachedSessionFiles)(a.path);return{project:a,sessionFiles:b}}),10)))if("fulfilled"===a.status)for(let b of a.value.sessionFiles)b.sessionId&&D.push({project:a.value.project,file:b});let E=new Set,F=new Map;for(let a of D){let b=`${a.project.name}/${a.file.sessionId}`;E.add(b),F.set(b,a)}for(let a of B.rows.keys())E.has(a)||(B.rows.delete(a),B.contentHashes.delete(a),B.metaDirty=!0);let G=[];for(let a of(await (0,m.batchAll)(D.map(({project:a,file:b})=>async()=>{let c,d=b.sessionId,e=`${a.name}/${d}`;try{c=await (0,k.hashSessionFile)(a.name,d)}catch{c=crypto.randomUUID()}return{key:e,contentHash:c,project:a,file:b}}),10))){if("fulfilled"!==a.status)continue;let{key:b,contentHash:c,project:d,file:e}=a.value;B.contentHashes.get(b)===c&&B.rows.has(b)||(G.push({key:b,task:{project:d,file:e}}),B.contentHashes.set(b,c))}if(w&&G.length>0){let a=await (0,m.batchAll)(G.map(({key:a,task:{project:b,file:c}})=>async()=>{let d=c.sessionId,e=B.contentHashes.get(a);return{key:a,cached:await (0,j.isSessionFullyCached)(b.name,d,e)}}),10),b=new Set;for(let c of a)"fulfilled"===c.status&&c.value.cached&&b.add(c.value.key);G=G.filter(({key:a})=>b.has(a))}let H=new Set;if(G.length>0)for(let a=0;a<G.length;a+=10){let b=G.slice(a,a+10);for(let a of(await Promise.allSettled(b.map(async({key:a,task:{project:b,file:c}})=>{let d,e=c.sessionId,i=B.contentHashes.get(a)??"",l=w&&x.length>0?`${u}/eval-ctx/${e}`:`${u}/${e}`,m=await (0,j.getCachedResult)("filters",b.name,l,z,i);if(m)d=m.value;else{let a,{entries:c,rawLines:m}=await (0,g.parseSessionLog)(b.name,e),n=(0,h.calculateLogStats)(c);if(w&&x.length>0){let c=await Promise.all(x.map(a=>(0,j.getPerItemCacheWithHook)("evals",b.name,e,a.name,(0,k.hashItemCode)(a.fn),i)));if(c.every(a=>null!==a))for(let b of(a={},c)){let c=b.value;a[c.name]={pass:c.pass,score:c.score,error:c.error,message:c.message}}}d=await f(m,n,b.name,e,r,a),(0,j.setCachedResult)("filters",b.name,l,d,z,i)}let o={};for(let a of d.results)a.skipped||a.error||(o[a.name]=a.value);let p={projectName:b.name,sessionId:e,lastModified:c.lastModified.toISOString(),lastModifiedFormatted:c.lastModifiedFormatted||(0,n.formatDate)(c.lastModified),filterValues:o};return{key:a,row:p}}))))if("fulfilled"===a.status){let{key:b,row:c}=a.value;B.rows.set(b,c),B.metaDirty=!0,H.add(b)}}let I=[...function(a){if(!a.metaDirty&&a.cachedFilterMeta)return a.cachedFilterMeta;a.metaDirty&&function(a){for(let b of a.filterNames)a.accumulators[b]={type:"unknown",min:1/0,max:-1/0,uniqueStrings:new Set};for(let b of a.rows.values())!function(a,b){for(let[c,d]of Object.entries(b)){let b=a[c];b&&("boolean"==typeof d?b.type="boolean":"number"==typeof d?(b.type="number",d<b.min&&(b.min=d),d>b.max&&(b.max=d)):"string"==typeof d&&(b.type="string",b.uniqueStrings.add(d)))}}(a.accumulators,b.filterValues)}(a);let b=a.filterNames.map(b=>{let c=a.accumulators[b],d=a.filterLabels[b]??b;return"number"===c.type?{type:"number",name:b,label:d,min:c.min,max:c.max}:"string"===c.type?{type:"string",name:b,label:d,values:Array.from(c.uniqueStrings).sort()}:{type:"boolean",name:b,label:d}});return a.cachedFilterMeta=b,a.metaDirty=!1,b}(B)];for(let a of s)if("lastModified"===a.name){let b="",c="";for(let a of B.rows.values())(!b||a.lastModified<b)&&(b=a.lastModified),(!c||a.lastModified>c)&&(c=a.lastModified);b&&c&&I.push({type:"date",name:a.name,label:a.label,min:new Date(b).toLocaleDateString("en-CA"),max:new Date(c).toLocaleDateString("en-CA")})}let J=Array.from(B.rows.values());if(w){let a=J.filter(a=>{let b=`${a.projectName}/${a.sessionId}`;return!H.has(b)});if(a.length>0){let b=await (0,m.batchAll)(a.map(a=>async()=>{let b=`${a.projectName}/${a.sessionId}`,c=B.contentHashes.get(b);return{session:a,key:b,cached:await (0,j.isSessionFullyCached)(a.projectName,a.sessionId,c)}}),10),c=new Set;for(let a of b)"fulfilled"!==a.status||a.value.cached||(c.add(a.value.key),B.rows.delete(a.value.key),B.contentHashes.delete(a.value.key),B.metaDirty=!0);J=J.filter(a=>{let b=`${a.projectName}/${a.sessionId}`;return!c.has(b)})}}let K=b?.page??1,L=b?.pageSize??25;if(b?.filters&&Object.keys(b.filters).length>0){var e,o;e=J,o=b.filters,q=e.filter(a=>{for(let b of I){let c=o[b.name];if(c)switch(c.type){case"boolean":{let d=a.filterValues[b.name];if(void 0===d||"all"===c.value)continue;if("true"===c.value&&!0!==d||"false"===c.value&&!1!==d)return!1;break}case"number":{let d=a.filterValues[b.name];if(void 0===d)continue;if(d<c.min||d>c.max)return!1;break}case"string":{let d=a.filterValues[b.name];if(void 0===d)continue;if(c.selected.length>0&&!c.selected.includes(d))return!1;break}case"date":{let b=new Date(a.lastModified).toLocaleDateString("en-CA");if(c.from&&b<c.from||c.to&&b>c.to)return!1}}}return!0})}else q=J;q.sort((a,b)=>b.lastModified.localeCompare(a.lastModified));let M=J.length,N=q.length,O=(K-1)*L,P=q.slice(O,O+L),Q=Math.round(performance.now()-t);return{ok:!0,hasFilters:!0,payload:{sessions:P,filterMeta:I,totalDurationMs:Q,totalCount:M,matchingCount:N,page:K,pageSize:L}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,o.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"60c8f906a04683e63645a750428aa2af6a36851626",null),a.s(["computeDashboard",0,q],42298);var r=a.i(46325),s=a.i(65003),t=a.i(31810);let u="__CLAUDEYE_AGGREGATE_INDEX__";async function v(a){try{await (0,c.ensureEvalsLoaded)();let b=a??"default",e=(0,d.getAggregatesForView)(b);if(0===e.length)return{ok:!0,hasAggregates:!1};let n=performance.now(),o=await (0,k.hashEvalsModule)(),p=e.map(a=>a.name),q=function(a,b,c){let d=globalThis,e=d[u];if(e&&e.viewName===a&&e.evalsHash===b&&e.aggregateNames.length===c.length&&e.aggregateNames.every((a,b)=>a===c[b]))return e;let f={viewName:a,evalsHash:b,aggregateNames:c,collectedSessions:new Map,contentHashes:new Map};return d[u]=f,f}(b,o,p),v=await (0,i.getCachedProjectFolders)(),w=[];for(let a of(await (0,m.batchAll)(v.map(a=>async()=>{let b=await (0,i.getCachedSessionFiles)(a.path);return{project:a,sessionFiles:b}}),10)))if("fulfilled"===a.status)for(let b of a.value.sessionFiles)b.sessionId&&w.push({project:a.value.project,file:b});let x=new Set;for(let a of w){let b=`${a.project.name}/${a.file.sessionId}`;x.add(b)}for(let a of q.collectedSessions.keys())x.has(a)||(q.collectedSessions.delete(a),q.contentHashes.delete(a));let y=[];for(let a of(await (0,m.batchAll)(w.map(({project:a,file:b})=>async()=>{let c,d=b.sessionId,e=`${a.name}/${d}`;try{c=await (0,k.hashSessionFile)(a.name,d)}catch{c=crypto.randomUUID()}return{key:e,contentHash:c,project:a,file:b}}),10))){if("fulfilled"!==a.status)continue;let{key:b,contentHash:c,project:d,file:e}=a.value;q.contentHashes.get(b)===c&&q.collectedSessions.has(b)||y.push({key:b,task:{project:d,file:e},contentHash:c})}if(y.length>0){let a=(0,l.hasEvals)()?(0,l.getSessionScopedEvals)():[],c=(0,r.hasEnrichers)()?(0,r.getSessionScopedEnrichers)():[],i=(0,d.getFiltersForView)(b);for(let d=0;d<y.length;d+=10){let k=y.slice(d,d+10);for(let d of(await Promise.allSettled(k.map(async({key:d,task:{project:k,file:l},contentHash:m})=>{let n=l.sessionId,o=`${b}/agg/${n}`,q=await (0,j.getCachedResult)("aggregates",k.name,o,p,m);if(q){let a={};for(let b of Object.values(q.value))Object.assign(a,b);return{key:d,contentHash:m,collected:{projectName:k.name,sessionId:n,values:a}}}let{entries:r,rawLines:u}=await (0,g.parseSessionLog)(k.name,n),v=(0,h.calculateLogStats)(r),w={};if(a.length>0)for(let b of(await (0,s.runAllEvals)(u,v,k.name,n,a)).results)b.skipped||(w[b.name]={pass:b.pass,score:b.score,error:b.error,message:b.message});let x={};if(c.length>0)for(let a of(await (0,t.runAllEnrichers)(u,v,k.name,n,c)).results)a.skipped||a.error||(x[a.name]=a.data);let y={};if(i.length>0)for(let a of(await f(u,v,k.name,n,i)).results)a.skipped||a.error||(y[a.name]=a.value);let z={entries:u,stats:v,projectName:k.name,sessionId:n,source:"session",evalResults:w,enrichResults:x,filterValues:y},A={},B={};for(let a of e)try{if(a.condition){let b={entries:u,stats:v,projectName:k.name,sessionId:n,source:"session"};if(!await a.condition(b))continue}let b=await a.collect(z);A[a.name]=b,Object.assign(B,b)}catch{}return(0,j.setCachedResult)("aggregates",k.name,o,A,p,m),{key:d,contentHash:m,collected:{projectName:k.name,sessionId:n,values:B}}}))))if("fulfilled"===d.status){let{key:a,contentHash:b,collected:c}=d.value;q.collectedSessions.set(a,c),q.contentHashes.set(a,b)}}}let z=Array.from(q.collectedSessions.values()),A=[];for(let a of e)try{let b=await a.reduce(z),c=b.length>0?Object.keys(b[0]):[];A.push({name:a.name,label:a.label,rows:b,columns:c})}catch{A.push({name:a.name,label:a.label,rows:[],columns:[]})}let B=Math.round(performance.now()-n);return{ok:!0,hasAggregates:!0,payload:{aggregates:A,totalSessions:z.length,totalDurationMs:B}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,o.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"40ca129944c8d7e3f7818a8ec8cb24452b33915e5d",null),a.s(["computeAggregates",0,v],4930)}];
2
2
 
3
3
  //# sourceMappingURL=app_actions_compute-dashboard_ts_13cb_9d._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[85546,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/global-error.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/global-error.tsx <module evaluation>","default")},53128,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/app/global-error.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/app/global-error.tsx","default")},16893,a=>{"use strict";a.i(85546);var b=a.i(53128);a.n(b)},94367,a=>{a.n(a.i(16893))}];
2
+
3
+ //# sourceMappingURL=app_global-error_tsx_0m9qisk._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[3171,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(10042),e=a.i(66036);a.s(["default",0,function({error:a,reset:f}){return(0,c.useEffect)(()=>{(0,d.getTelemetryConfig)().then(b=>{(0,e.setClientTelemetryConfig)(b),(0,e.captureClientEvent)("client_error",{error_message:a.message,error_name:a.name,error_digest:a.digest,boundary:"global"})}).catch(()=>{})},[a]),(0,b.jsx)("html",{children:(0,b.jsx)("body",{children:(0,b.jsx)("main",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#031035",color:"#f8fafc",fontFamily:"system-ui, sans-serif"},children:(0,b.jsxs)("div",{style:{textAlign:"center",padding:"2rem",border:"1px solid rgba(239,68,68,0.4)",borderRadius:"0.5rem",maxWidth:"500px"},children:[(0,b.jsx)("h2",{style:{color:"#ef4444",marginBottom:"0.5rem",fontSize:"1.25rem"},children:"Something went wrong"}),(0,b.jsx)("p",{style:{color:"#94a3b8",marginBottom:"1.5rem"},children:a.message||"An unexpected error occurred."}),(0,b.jsx)("button",{onClick:f,style:{padding:"0.5rem 1.25rem",background:"#3b82f6",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer",fontSize:"0.875rem"},children:"Try again"})]})})})})}])}];
2
+
3
+ //# sourceMappingURL=app_global-error_tsx_0xerkr6._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[83694,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(5050);let f=(0,e.createServerReference)("408efad9bd92f38c706df80e97c50473d1903efa34",e.callServer,void 0,e.findSourceMapURL,"login");var g=a.i(35960),h=a.i(38246);a.s(["default",0,function(){let a=(0,d.useSearchParams)(),e=(0,d.useRouter)(),i=a.get("from")??"/",[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(!1);async function n(a){a.preventDefault(),k(null),m(!0);let b=new FormData(a.currentTarget);b.set("redirectTo",i);let c=await f(b);c?.error?(k(c.error),m(!1)):c?.redirectTo&&e.push(c.redirectTo)}return(0,b.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:(0,b.jsxs)("div",{className:"w-full max-w-sm rounded-lg border border-border bg-card p-8 shadow-lg",children:[(0,b.jsxs)("div",{className:"flex flex-col items-center gap-2 mb-6",children:[(0,b.jsx)(h.default,{href:"/",children:(0,b.jsx)(g.Logo,{width:36,height:36})}),(0,b.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"Sign in to Claudeye"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"Enter your credentials to continue"})]}),(0,b.jsxs)("form",{onSubmit:n,className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"username",className:"text-sm font-medium text-foreground",children:"Username"}),(0,b.jsx)("input",{id:"username",name:"username",type:"text",required:!0,autoComplete:"username",autoFocus:!0,className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary",placeholder:"admin"})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"password",className:"text-sm font-medium text-foreground",children:"Password"}),(0,b.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"current-password",className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary"})]}),j&&(0,b.jsx)("p",{className:"text-sm text-red-500 bg-red-500/10 rounded-md px-3 py-2",children:j}),(0,b.jsx)("button",{type:"submit",disabled:l,className:"mt-1 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:l?"Signing in...":"Sign in"})]})]})})}],83694)}];
1
+ module.exports=[83694,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(50944),e=a.i(5050);let f=(0,e.createServerReference)("409aadcbf2d0760a74e17de2f0830dafb3695f973c",e.callServer,void 0,e.findSourceMapURL,"login");var g=a.i(35960),h=a.i(38246);function i(){let a=(0,d.useSearchParams)(),e=(0,d.useRouter)(),i=a.get("from")??"/",j=a.get("hash")??"",[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(!1);async function o(a){a.preventDefault(),l(null),n(!0);let b=new FormData(a.currentTarget);b.set("redirectTo",i);let c=await f(b);c?.error?(l(c.error),n(!1)):c?.redirectTo&&(j?window.location.href=c.redirectTo+j:e.push(c.redirectTo))}return(0,b.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:(0,b.jsxs)("div",{className:"w-full max-w-sm rounded-lg border border-border bg-card p-8 shadow-lg",children:[(0,b.jsxs)("div",{className:"flex flex-col items-center gap-2 mb-6",children:[(0,b.jsx)(h.default,{href:"/",children:(0,b.jsx)(g.Logo,{width:36,height:36})}),(0,b.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:"Sign in to Claudeye"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"Enter your credentials to continue"})]}),(0,b.jsxs)("form",{onSubmit:o,className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"username",className:"text-sm font-medium text-foreground",children:"Username"}),(0,b.jsx)("input",{id:"username",name:"username",type:"text",required:!0,autoComplete:"username",autoFocus:!0,className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary",placeholder:"admin"})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"password",className:"text-sm font-medium text-foreground",children:"Password"}),(0,b.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"current-password",className:"rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary"})]}),k&&(0,b.jsx)("p",{className:"text-sm text-red-500 bg-red-500/10 rounded-md px-3 py-2",children:k}),(0,b.jsx)("button",{type:"submit",disabled:m,className:"mt-1 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:m?"Signing in...":"Sign in"})]})]})})}a.s(["default",0,function(){return(0,b.jsx)(c.Suspense,{children:(0,b.jsx)(i,{})})}],83694)}];
2
2
 
3
3
  //# sourceMappingURL=app_login_page_tsx_0z71ad3._.js.map
@@ -0,0 +1,8 @@
1
+ module.exports=[22712,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(35112),e=a.i(38246),f=a.i(210),g=a.i(70106);let h=(0,g.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"}]]),i=(0,g.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"}]]),j=(0,g.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"}]]);var k=a.i(3314),l=a.i(5784),m=a.i(5151),n=a.i(33441);let o=(0,g.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),p=(0,g.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);var q=a.i(33508),r=a.i(65967),s=a.i(5050);let t=(0,s.createServerReference)("40985fcad95b1dfb5ce5ad080f01dc6797f4adce5c",s.callServer,void 0,s.findSourceMapURL,"getHookActivityAction"),u=(0,s.createServerReference)("602bbc72facb5faaec730a7e10bdd3c426fb357a36",s.callServer,void 0,s.findSourceMapURL,"searchHookActivityAction"),v=(0,s.createServerReference)("002569392ae732575c764414749b761d1ea2620387",s.callServer,void 0,s.findSourceMapURL,"getHooksConfigAction"),w=(0,s.createServerReference)("604f971c899887c5fe2dd0904a38e24f4bb138ae21",s.callServer,void 0,s.findSourceMapURL,"togglePolicyAction"),x=(0,s.createServerReference)("4073b98f592f47ab4dee360318c78ba940f2bd13eb",s.callServer,void 0,s.findSourceMapURL,"installHooksWebAction"),y=(0,s.createServerReference)("40a49c13a668e7a4c89fdfbdf0a2a3976d9f43bd34",s.callServer,void 0,s.findSourceMapURL,"removeHooksWebAction"),z=(0,s.createServerReference)("605eaa5aaa4640854292ad3d86724a4b0501f07699",s.callServer,void 0,s.findSourceMapURL,"updatePolicyParamsAction");var A=a.i(6236),B=a.i(90619),C=a.i(95947),D=a.i(40695);function E({sessionId:a,transcriptPath:c}){if(!a)return(0,b.jsx)("span",{className:"text-muted-foreground",children:"\\u2014"});let d=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,f=a?a.slice(0,8):"—";return d?(0,b.jsx)(e.default,{href:`/project/${encodeURIComponent(d)}/session/${encodeURIComponent(a)}`,className:"text-primary hover:underline font-mono",onClick:a=>a.stopPropagation(),children:f}):(0,b.jsx)("span",{className:"text-muted-foreground font-mono",children:f})}function F({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)(i,{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)(j,{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)(h,{className:"h-3 w-3"}),"Allow"]})}function G({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 H({mode:a}){let c="default"===a;return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 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 I({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 J({text:a}){let[d,e]=(0,c.useState)(!1),f=async b=>{b.stopPropagation();try{await navigator.clipboard.writeText(a),e(!0),setTimeout(()=>e(!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),e(!0),setTimeout(()=>e(!1),1500)}};return(0,b.jsx)("button",{onClick:f,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:d?(0,b.jsx)(n.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(m.Copy,{className:"h-3 w-3"})})}function K({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 L({stats:a}){let c=a.totalEvents>0?(a.denyCount/a.totalEvents*100).toFixed(0):"0";return(0,b.jsxs)("div",{className:"flex items-center gap-6 text-[0.7rem] text-muted-foreground",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-foreground font-mono font-semibold",children:a.totalEvents})," total events"]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("span",{className:`font-mono font-semibold ${a.denyCount>0?"text-red-400":"text-foreground"}`,children:[c,"%"]})," ","deny rate"]}),(0,b.jsxs)("div",{className:"hidden sm:block",children:["top policy:"," ",(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.topPolicy??"—"})]})]})}function M({item:a}){return(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:10,className:"px-0 py-0",children:(0,b.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-in fade-in slide-in-from-top-1 duration-150",children:[(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(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)(J,{text:a.sessionId})]}),(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)(J,{text:a.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.reason&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,b.jsx)("span",{className:"text-foreground",children:a.reason})]})]})})})}function N({hooksInstalled:a,onSwitchTab:d}){let{intervalSec:e}=(0,A.useAutoRefresh)(),f=(0,B.useUrlParams)(),g=(0,c.useRef)(!1),[h,i]=(0,c.useState)(()=>(0,C.paramToPage)(f.get("page"))),[j,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(()=>{let a=f.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[s,v]=(0,c.useState)(()=>f.get("event")??""),[w,x]=(0,c.useState)(()=>f.get("policy")??""),[y,z]=(0,c.useState)(()=>f.get("session")??""),D=(0,c.useRef)(null),J=(0,c.useRef)({filterDecision:p,filterEventType:s,filterPolicy:w,filterSessionId:y});J.current={filterDecision:p,filterEventType:s,filterPolicy:w,filterSessionId:y},(0,c.useEffect)(()=>{if(!g.current){g.current=!0;return}f.setAll({decision:p||void 0,event:s||void 0,policy:w||void 0,session:y||void 0,page:(0,C.pageToParam)(h)})},[p,s,w,y,h]);let O=""!==p||""!==s||""!==w||""!==y,P=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e,filterSessionId:f}=J.current;b=""!==c||""!==d||""!==e||""!==f?await u({decision:c||void 0,eventType:d||void 0,policyName:e||void 0,sessionId:f||void 0},a):await t(a),m(b)}catch{}},[]);(0,c.useEffect)(()=>{P(h);let a=setInterval(()=>P(h),e>0?1e3*e:5e3);return()=>clearInterval(a)},[h,P,e]),(0,c.useEffect)(()=>(D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{i(1),o(null),P(1)},300),()=>{D.current&&clearTimeout(D.current)}),[p,s,w,y]);let Q=j?.entries??[],R=j?.totalPages??1;return(0,b.jsxs)(b.Fragment,{children:[j?.stats&&j.stats.totalEvents>0&&(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsx)(L,{stats:j.stats})}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,b.jsx)(K,{value:p,onChange:q}),(0,b.jsxs)("select",{value:s,onChange:a=>v(a.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",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.jsx)("div",{className:"relative",children:(0,b.jsx)("input",{type:"text",value:w,onChange:a=>x(a.target.value),placeholder:"Filter by policy\\u2026",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})}),(0,b.jsx)("div",{className:"relative",children:(0,b.jsx)("input",{type:"text",value:y,onChange:a=>z(a.target.value),placeholder:"Filter by session…",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===Q.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4 text-center",children:[(0,b.jsx)(k.Shield,{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:"Hooks 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 hook monitoring."]})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:O?"No matching activity.":"Waiting for hook events…"})]}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,b.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/30",children:Q.map((a,d)=>{var e;let f,g="deny"===a.decision,h=n===d,i="instruct"===a.decision;return(0,b.jsxs)(c.default.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{o(a=>a===d?null:d)},className:`cursor-pointer transition-colors ${g?"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)(l.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",children:(0,b.jsx)(F,{decision:a.decision})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(G,{eventType:a.eventType})}),(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.policyName??"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:a.reason??"",children:a.reason??"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(I,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2",title:a.sessionId??"",children:(0,b.jsx)(E,{sessionId:a.sessionId,transcriptPath:a.transcriptPath})}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(H,{mode:a.permissionMode}):"—"}),(0,b.jsx)("td",{className:"px-3 py-2 text-right 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:(e=a.timestamp,(f=Date.now()-e)<6e4?`${Math.max(1,Math.floor(f/1e3))}s ago`:f<36e5?`${Math.floor(f/6e4)}m ago`:f<864e5?`${Math.floor(f/36e5)}h ago`:`${Math.floor(f/864e5)}d ago`)})]}),h&&(0,b.jsx)(M,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(r.default,{currentPage:h,totalPages:R,onPageChange:a=>{i(a),o(null)}})]})]})}function O({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 P({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)(D.Button,{variant:"outline",size:"sm",onClick:d,className:"h-7 text-xs",children:"Cancel"}),(0,b.jsx)(D.Button,{size:"sm",onClick:()=>e(h),className:"h-7 text-xs",children:"Save"})]})]})})}function Q({message:a,onDismiss:c,onInstall:e,isPending:f}){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
+ @keyframes slideInFromRight {
3
+ from { transform: translateX(calc(100% + 1rem)); opacity: 0; }
4
+ to { transform: translateX(0); opacity: 1; }
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)(D.Button,{size:"sm",onClick:()=>{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)(D.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 R({onHooksInstallChange:a}){let[d,e]=(0,c.useState)(null),[f,g]=(0,c.useTransition)(),[h,i]=(0,c.useState)(null),[j,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null),q=(0,c.useCallback)(async()=>{try{let b=await v();e(b),a?.(b.installedScopes.length>0)}catch{}},[a]);(0,c.useEffect)(()=>{q()},[q]);let r=()=>{g(async()=>{try{i(null),await x("user"),await q()}catch(a){i(a instanceof Error?a.message:"Failed to install hooks.")}})};if(!d)return(0,b.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading\\u2026"})});let s=d.installedScopes.length>0,t=Array.from(new Set(d.policies.map(a=>a.category)));return(0,b.jsxs)(b.Fragment,{children:[m&&(0,b.jsx)(P,{policy:m,onClose:()=>n(null),onSave:a=>{if(!m)return;let b=m.name;n(null),g(async()=>{try{i(null),await z(b,a),await q()}catch(a){i(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 px-4 py-3 border-b border-border bg-muted/10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("span",{className:`h-2 w-2 rounded-full shrink-0 ${s?"bg-emerald-500":"bg-muted-foreground/50"}`}),(0,b.jsx)("span",{className:"text-sm text-foreground",children:s?"Hooks installed":"Hooks not installed"}),s&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground font-mono hidden sm:inline",children:["· ",d.installedScopes.join(", ")," scope · ",d.settingsPath]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[s&&(0,b.jsx)(D.Button,{variant:"outline",size:"sm",onClick:()=>{g(async()=>{try{i(null),await y("user"),await q()}catch(a){i(a instanceof Error?a.message:"Failed to remove hooks.")}})},disabled:f,className:"text-xs h-7 px-3",children:"Remove"}),(0,b.jsx)(D.Button,{variant:s?"outline":"default",size:"sm",onClick:r,disabled:f,className:"text-xs h-7 px-3",children:s?"Reinstall":"Install hooks"})]})]}),(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)," ","policies enabled"]}),s&&(0,b.jsxs)("span",{className:"text-[0.65rem] text-muted-foreground/60",children:["· active in ",d.installedScopes.join(", ")," scope"]})]}),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}),j&&(0,b.jsx)(Q,{message:j,onDismiss:()=>l(null),onInstall:r,isPending:f}),t.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)(O,{enabled:a.enabled,onChange:()=>{var b,c;return b=a.name,c=a.enabled,void(!d||(!(d.installedScopes.length>0)?l("Hooks are not installed. Install hooks to continue."):(l(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 w(b,!c)}catch{i("Failed to save policy change."),q()}}))))},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:()=>n(a),title:"Edit parameters",children:(0,b.jsx)(o,{className:"h-3.5 w-3.5"})})]},a.name))]},a)}),d.customHooksPath&&(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"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/20",children:[(0,b.jsx)(p,{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:d.customHooksPath})]}),(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)(k.Shield,{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:"Custom policies are always active. To add, remove, or reorder them, edit the JS file above."})]}),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:"h-4 w-7 shrink-0 mt-0.5"}),(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.name))]})]})]})}function S({activeTab:a,onChange:c}){return(0,b.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5 mb-5",children:[{id:"activity",label:"Activity"},{id:"policies",label:"Configure"}].map(d=>(0,b.jsx)("button",{onClick:()=>c(d.id),className:`px-3 py-1.5 text-xs font-medium rounded transition-all ${a===d.id?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:d.label},d.id))})}a.s(["default",0,function({initialTab:a="activity"}){let d=(0,B.useUrlParams)(),[g,h]=(0,c.useState)(a),[i,j]=(0,c.useState)(void 0),[k,l]=(0,c.useState)(null);(0,c.useEffect)(()=>{v().then(a=>{j(a.installedScopes.length>0),l({enabled:a.enabledPolicies.length,total:a.policies.length+(a.customPolicies?.length??0)})}).catch(()=>j(void 0))},[]);let m=a=>{h(a),d.setAll({tab:"activity"===a?void 0:a})};return(0,b.jsxs)("div",{className:"min-h-screen bg-background px-4 py-6 sm:px-6 lg:px-10",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)(e.default,{href:"/projects",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(f.ArrowLeft,{className:"h-3.5 w-3.5"}),"Back"]}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-foreground tracking-tight",children:"Policies"}),"activity"===g&&(0,b.jsxs)("span",{className:"relative flex h-2.5 w-2.5 mt-0.5",children:[(0,b.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,b.jsx)("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500"})]})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"activity"===g?(0,b.jsxs)(b.Fragment,{children:["Policy evaluations for Claude",k&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:[" · ","enabled policies"," ",(0,b.jsxs)("span",{className:"font-mono text-foreground/70",children:[k.enabled,"/",k.total]})]}),(0,b.jsxs)("span",{className:"block text-xs text-muted-foreground/50 mt-0.5",children:["To configure policies,"," ",(0,b.jsx)("button",{className:"underline underline-offset-2 hover:text-foreground transition-colors",onClick:()=>m("policies"),children:"go here"})]})]}):"Configure Policies"})]}),(0,b.jsx)(S,{activeTab:g,onChange:m}),"activity"===g?(0,b.jsx)(N,{hooksInstalled:i,onSwitchTab:m}):(0,b.jsx)(R,{onHooksInstallChange:j})]})}],22712)}];
7
+
8
+ //# sourceMappingURL=app_policies_hooks-client_tsx_0q-m0y-._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[63588,a=>{"use strict";var b=a.i(7997);a.s(["default",0,function(){return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-border p-6 shadow-sm",children:[(0,b.jsx)("div",{className:"h-8 w-32 bg-muted rounded animate-pulse mb-4"}),(0,b.jsx)("div",{className:"space-y-3",children:Array.from({length:8}).map((a,c)=>(0,b.jsx)("div",{className:"h-12 bg-muted/50 rounded animate-pulse"},c))})]})})})}])},45538,a=>{a.n(a.i(63588))}];
1
+ module.exports=[99006,a=>{"use strict";var b=a.i(7997);a.s(["default",0,function(){return(0,b.jsx)("main",{className:"min-h-screen bg-background",children:(0,b.jsx)("div",{className:"container mx-auto p-8",children:(0,b.jsxs)("div",{className:"bg-card text-card-foreground rounded-lg border border-border p-6 shadow-sm",children:[(0,b.jsx)("div",{className:"h-8 w-32 bg-muted rounded animate-pulse mb-4"}),(0,b.jsx)("div",{className:"space-y-3",children:Array.from({length:8}).map((a,c)=>(0,b.jsx)("div",{className:"h-12 bg-muted/50 rounded animate-pulse"},c))})]})})})}])},43519,a=>{a.n(a.i(99006))}];
2
2
 
3
- //# sourceMappingURL=app_loading_tsx_05semg5._.js.map
3
+ //# sourceMappingURL=app_projects_loading_tsx_13veom4._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[57730,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(210),f=a.i(70106);let g=(0,f.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),h=(0,f.default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var i=a.i(69520),j=a.i(65967),k=a.i(5050);let l=(0,k.createServerReference)("4014bc58cc102de6ff506b58e9fe5813639d5e990d",k.callServer,void 0,k.findSourceMapURL,"getCompletedHistoryAction"),m=(0,k.createServerReference)("6021c6d6bcc363c569d912e1b6a2ce8c40497a8bd9",k.callServer,void 0,k.findSourceMapURL,"searchCompletedHistoryAction");var n=a.i(6236),o=a.i(90619),p=a.i(95947);function q(a){let b=Math.floor((Date.now()-a)/1e3);if(b<60)return`${b}s ago`;let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);return`${d}h ago`}function r({type:a}){let c="eval"===a?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"action"===a?"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400":"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400";return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium ${c}`,children:a.toUpperCase()})}function s({priority:a}){let c=a<=0;return(0,b.jsx)("span",{className:`text-[0.6rem] font-medium px-1.5 py-0.5 rounded ${c?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":"bg-muted text-muted-foreground"}`,children:c?"HIGH":"LOW"})}function t({projectName:a,sessionId:c}){return(0,b.jsx)(d.default,{href:`/project/${encodeURIComponent(a)}/session/${encodeURIComponent(c)}`,className:"text-blue-600 dark:text-blue-400 hover:underline truncate block max-w-[200px]",children:c})}a.s(["default",0,function(){let a,f,{intervalSec:k}=(0,n.useAutoRefresh)(),u=(0,o.useUrlParams)(),v=(0,c.useRef)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(null),[A,B]=(0,c.useState)(()=>{let a=u.get("tab");return"pending"===a||"processing"===a||"completed"===a?a:"processing"}),[C,D]=(0,c.useState)(()=>(0,p.paramToPage)(u.get("page"))),[E,F]=(0,c.useState)(null),G=(0,c.useRef)(A),[H,I]=(0,c.useState)(()=>{let a=u.get("type");return"eval"===a||"enrichment"===a||"action"===a?a:""}),[J,K]=(0,c.useState)(()=>u.get("item")??""),[L,M]=(0,c.useState)(()=>u.get("session")??""),N=(0,c.useRef)(null),O=(0,c.useRef)({filterType:H,filterItem:J,filterSession:L});O.current={filterType:H,filterItem:J,filterSession:L},(0,c.useEffect)(()=>{if(!v.current){v.current=!0;return}u.setAll({tab:"processing"===A?void 0:A,type:H||void 0,item:J||void 0,session:L||void 0,page:"completed"===A?(0,p.pageToParam)(C):void 0})},[A,H,J,L,C]);let P=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/queue-status",{cache:"no-store"});if(a.ok){let b=await a.json();x(b),z(null)}else z(`Failed to fetch: ${a.status}`)}catch{z("Network error")}},[]),Q=(0,c.useCallback)(async a=>{try{let b,{filterType:c,filterItem:d,filterSession:e}=O.current;b=""!==c||""!==d||""!==e?await m({type:c||void 0,itemName:d||void 0,sessionId:e||void 0},a):await l(a),F(b)}catch{}},[]);(0,c.useEffect)(()=>{P();let a=setInterval(P,k>0?1e3*k:5e3);return()=>clearInterval(a)},[P,k]),(0,c.useEffect)(()=>{"completed"===A&&"completed"!==G.current&&(D(1),Q(1)),G.current=A},[A,Q]),(0,c.useEffect)(()=>{if("completed"===A)return N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{D(1),Q(1)},300),()=>{N.current&&clearTimeout(N.current)}},[H,J,L]),(0,c.useEffect)(()=>{if("completed"!==A)return;Q(C);let a=setInterval(()=>Q(C),k>0?1e3*k:5e3);return()=>clearInterval(a)},[C,A,Q,k]),(0,c.useEffect)(()=>{"completed"===A&&k>0&&1===C&&E&&0===E.entries.length&&E.totalPages>1&&D(2)},[A,k,C,E]);let R=[{key:"pending",label:"In Queue",count:w?.pending.length??0},{key:"processing",label:"Processing",count:w?.processing.length??0},{key:"completed",label:"Processed"}];return(0,b.jsxs)("div",{className:"min-h-screen bg-background p-6 max-w-4xl mx-auto",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)(d.default,{href:"/",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-4 w-4"}),"Back"]}),(0,b.jsx)("h1",{className:"text-2xl font-bold text-foreground mt-2",children:"Queue Details"})]}),y&&!w&&(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-destructive mb-2",children:y}),(0,b.jsx)("button",{onClick:P,className:"text-xs text-primary hover:underline",children:"Retry"})]}),!w&&!y&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),w&&(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"flex gap-1 border-b border-border",children:R.map(a=>(0,b.jsxs)("button",{onClick:()=>B(a.key),className:`px-4 py-2 text-sm font-medium border-b-2 transition-colors ${A===a.key?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[a.label,null!=a.count&&(0,b.jsxs)("span",{className:"ml-1.5 text-xs text-muted-foreground",children:["(",a.count,")"]})]},a.key))}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:["pending"===A&&(0===w.pending.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No items in queue."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Priority"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Queued"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:w.pending.map(a=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.itemName}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(s,{priority:a.priority})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:q(a.addedAt)})]},a.key))})]})})),"processing"===A&&(0===w.processing.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No items currently processing."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Priority"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Started"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:w.processing.map(a=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(i.RefreshCw,{className:"w-3 h-3 text-blue-500 animate-spin flex-shrink-0"}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.itemName})]})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(s,{priority:a.priority})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:q(a.startedAt)})]},a.key))})]})})),"completed"===A&&(a=E?.entries??w.completed,f=E?.totalPages??1,(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border bg-muted/30",children:[(0,b.jsxs)("select",{value:H,onChange:a=>I(a.target.value),className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground",children:[(0,b.jsx)("option",{value:"",children:"All Types"}),(0,b.jsx)("option",{value:"eval",children:"Eval"}),(0,b.jsx)("option",{value:"enrichment",children:"Enrichment"}),(0,b.jsx)("option",{value:"action",children:"Action"})]}),(0,b.jsx)("input",{type:"text",value:J,onChange:a=>K(a.target.value),placeholder:"Filter by item...",className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground w-40"}),(0,b.jsx)("input",{type:"text",value:L,onChange:a=>M(a.target.value),placeholder:"Filter by session...",className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground w-40"})]}),0===a.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No completed items."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Completed"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:a.map((a,c)=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.itemName}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground",children:function(a){if(a<1e3)return`${a}ms`;let b=(a/1e3).toFixed(1);return`${b}s`}(a.durationMs)}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.success?(0,b.jsx)(g,{className:"h-3.5 w-3.5 text-green-600 dark:text-green-400"}):(0,b.jsx)(h,{className:"h-3.5 w-3.5 text-red-600 dark:text-red-400"})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:new Date(a.completedAt).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})})]},`${a.key}-${a.completedAt}-${c}`))})]})}),(0,b.jsx)(j.default,{currentPage:C,totalPages:f,onPageChange:D})]}))]}),w.recentErrors.length>0&&(0,b.jsxs)("section",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsxs)("h2",{className:"text-sm font-semibold text-foreground mb-2",children:["Recent Errors",(0,b.jsxs)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:["(",w.recentErrors.length,")"]})]}),(0,b.jsx)("div",{className:"space-y-1",children:w.recentErrors.map((a,c)=>(0,b.jsxs)("div",{className:"text-xs bg-muted/30 rounded px-2 py-1 flex items-start gap-2",children:[(0,b.jsx)("span",{className:"font-mono text-muted-foreground shrink-0",children:a.key}),(0,b.jsx)("span",{className:"text-red-500 break-all",children:a.error}),(0,b.jsx)("span",{className:"text-muted-foreground shrink-0 ml-auto",children:q(a.at)})]},`${a.key}-${a.at}-${c}`))})]})]})]})}],57730)}];
1
+ module.exports=[57730,a=>{"use strict";var b=a.i(87924),c=a.i(80826),d=a.i(38246),e=a.i(210),f=a.i(70106);let g=(0,f.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),h=(0,f.default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var i=a.i(69520),j=a.i(65967),k=a.i(5050);let l=(0,k.createServerReference)("400ac1c65c2a435730065dbaa0a6bfb366aa4748fa",k.callServer,void 0,k.findSourceMapURL,"getCompletedHistoryAction"),m=(0,k.createServerReference)("6025605787cd4beb8f473f5f90948f8be7da131a00",k.callServer,void 0,k.findSourceMapURL,"searchCompletedHistoryAction");var n=a.i(6236),o=a.i(90619),p=a.i(95947);function q(a){let b=Math.floor((Date.now()-a)/1e3);if(b<60)return`${b}s ago`;let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);return`${d}h ago`}function r({type:a}){let c="eval"===a?"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400":"action"===a?"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400":"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400";return(0,b.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium ${c}`,children:a.toUpperCase()})}function s({priority:a}){let c=a<=0;return(0,b.jsx)("span",{className:`text-[0.6rem] font-medium px-1.5 py-0.5 rounded ${c?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":"bg-muted text-muted-foreground"}`,children:c?"HIGH":"LOW"})}function t({projectName:a,sessionId:c}){return(0,b.jsx)(d.default,{href:`/project/${encodeURIComponent(a)}/session/${encodeURIComponent(c)}`,className:"text-blue-600 dark:text-blue-400 hover:underline truncate block max-w-[200px]",children:c})}a.s(["default",0,function(){let a,f,{intervalSec:k}=(0,n.useAutoRefresh)(),u=(0,o.useUrlParams)(),v=(0,c.useRef)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(null),[A,B]=(0,c.useState)(()=>{let a=u.get("tab");return"pending"===a||"processing"===a||"completed"===a?a:"processing"}),[C,D]=(0,c.useState)(()=>(0,p.paramToPage)(u.get("page"))),[E,F]=(0,c.useState)(null),G=(0,c.useRef)(A),[H,I]=(0,c.useState)(()=>{let a=u.get("type");return"eval"===a||"enrichment"===a||"action"===a?a:""}),[J,K]=(0,c.useState)(()=>u.get("item")??""),[L,M]=(0,c.useState)(()=>u.get("session")??""),N=(0,c.useRef)(null),O=(0,c.useRef)({filterType:H,filterItem:J,filterSession:L});O.current={filterType:H,filterItem:J,filterSession:L},(0,c.useEffect)(()=>{if(!v.current){v.current=!0;return}u.setAll({tab:"processing"===A?void 0:A,type:H||void 0,item:J||void 0,session:L||void 0,page:"completed"===A?(0,p.pageToParam)(C):void 0})},[A,H,J,L,C]);let P=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/queue-status",{cache:"no-store"});if(a.ok){let b=await a.json();x(b),z(null)}else z(`Failed to fetch: ${a.status}`)}catch{z("Network error")}},[]),Q=(0,c.useCallback)(async a=>{try{let b,{filterType:c,filterItem:d,filterSession:e}=O.current;b=""!==c||""!==d||""!==e?await m({type:c||void 0,itemName:d||void 0,sessionId:e||void 0},a):await l(a),F(b)}catch{}},[]);(0,c.useEffect)(()=>{P();let a=setInterval(P,k>0?1e3*k:5e3);return()=>clearInterval(a)},[P,k]),(0,c.useEffect)(()=>{"completed"===A&&"completed"!==G.current&&(D(1),Q(1)),G.current=A},[A,Q]),(0,c.useEffect)(()=>{if("completed"===A)return N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{D(1),Q(1)},300),()=>{N.current&&clearTimeout(N.current)}},[H,J,L]),(0,c.useEffect)(()=>{if("completed"!==A)return;Q(C);let a=setInterval(()=>Q(C),k>0?1e3*k:5e3);return()=>clearInterval(a)},[C,A,Q,k]),(0,c.useEffect)(()=>{"completed"===A&&k>0&&1===C&&E&&0===E.entries.length&&E.totalPages>1&&D(2)},[A,k,C,E]);let R=[{key:"pending",label:"In Queue",count:w?.pending.length??0},{key:"processing",label:"Processing",count:w?.processing.length??0},{key:"completed",label:"Processed"}];return(0,b.jsxs)("div",{className:"min-h-screen bg-background p-6 max-w-4xl mx-auto",children:[(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsxs)(d.default,{href:"/projects",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-4 w-4"}),"Back"]}),(0,b.jsx)("h1",{className:"text-2xl font-bold text-foreground mt-2",children:"Queue Details"})]}),y&&!w&&(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-destructive mb-2",children:y}),(0,b.jsx)("button",{onClick:P,className:"text-xs text-primary hover:underline",children:"Retry"})]}),!w&&!y&&(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),w&&(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"flex gap-1 border-b border-border",children:R.map(a=>(0,b.jsxs)("button",{onClick:()=>B(a.key),className:`px-4 py-2 text-sm font-medium border-b-2 transition-colors ${A===a.key?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[a.label,null!=a.count&&(0,b.jsxs)("span",{className:"ml-1.5 text-xs text-muted-foreground",children:["(",a.count,")"]})]},a.key))}),(0,b.jsxs)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:["pending"===A&&(0===w.pending.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No items in queue."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Priority"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Queued"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:w.pending.map(a=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.itemName}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(s,{priority:a.priority})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:q(a.addedAt)})]},a.key))})]})})),"processing"===A&&(0===w.processing.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No items currently processing."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Priority"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Started"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:w.processing.map(a=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(i.RefreshCw,{className:"w-3 h-3 text-blue-500 animate-spin flex-shrink-0"}),(0,b.jsx)("span",{className:"font-mono text-foreground",children:a.itemName})]})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(s,{priority:a.priority})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:q(a.startedAt)})]},a.key))})]})})),"completed"===A&&(a=E?.entries??w.completed,f=E?.totalPages??1,(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border bg-muted/30",children:[(0,b.jsxs)("select",{value:H,onChange:a=>I(a.target.value),className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground",children:[(0,b.jsx)("option",{value:"",children:"All Types"}),(0,b.jsx)("option",{value:"eval",children:"Eval"}),(0,b.jsx)("option",{value:"enrichment",children:"Enrichment"}),(0,b.jsx)("option",{value:"action",children:"Action"})]}),(0,b.jsx)("input",{type:"text",value:J,onChange:a=>K(a.target.value),placeholder:"Filter by item...",className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground w-40"}),(0,b.jsx)("input",{type:"text",value:L,onChange:a=>M(a.target.value),placeholder:"Filter by session...",className:"h-7 rounded border border-border bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground w-40"})]}),0===a.length?(0,b.jsx)("p",{className:"px-4 py-8 text-xs text-muted-foreground text-center",children:"No completed items."}):(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-xs",children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Type"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Item"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Duration"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,b.jsx)("th",{className:"px-3 py-2 font-medium text-right",children:"Completed"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border/50",children:a.map((a,c)=>(0,b.jsxs)("tr",{className:"hover:bg-muted/20",children:[(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(r,{type:a.type})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:a.itemName}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(t,{projectName:a.projectName,sessionId:a.sessionId})}),(0,b.jsx)("td",{className:"px-3 py-2 text-muted-foreground",children:function(a){if(a<1e3)return`${a}ms`;let b=(a/1e3).toFixed(1);return`${b}s`}(a.durationMs)}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.success?(0,b.jsx)(g,{className:"h-3.5 w-3.5 text-green-600 dark:text-green-400"}):(0,b.jsx)(h,{className:"h-3.5 w-3.5 text-red-600 dark:text-red-400"})}),(0,b.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground",children:new Date(a.completedAt).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})})]},`${a.key}-${a.completedAt}-${c}`))})]})}),(0,b.jsx)(j.default,{currentPage:C,totalPages:f,onPageChange:D})]}))]}),w.recentErrors.length>0&&(0,b.jsxs)("section",{className:"bg-card border border-border rounded-lg p-4",children:[(0,b.jsxs)("h2",{className:"text-sm font-semibold text-foreground mb-2",children:["Recent Errors",(0,b.jsxs)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:["(",w.recentErrors.length,")"]})]}),(0,b.jsx)("div",{className:"space-y-1",children:w.recentErrors.map((a,c)=>(0,b.jsxs)("div",{className:"text-xs bg-muted/30 rounded px-2 py-1 flex items-start gap-2",children:[(0,b.jsx)("span",{className:"font-mono text-muted-foreground shrink-0",children:a.key}),(0,b.jsx)("span",{className:"text-red-500 break-all",children:a.error}),(0,b.jsx)("span",{className:"text-muted-foreground shrink-0 ml-auto",children:q(a.at)})]},`${a.key}-${a.at}-${c}`))})]})]})]})}],57730)}];
2
2
 
3
3
  //# sourceMappingURL=app_queue_queue-client_tsx_0c0olxv._.js.map