@claudeye/linux-arm64 1.0.6-beta.5 → 1.0.6-beta.6

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 (113) hide show
  1. package/assets/standalone/.next/BUILD_ID +1 -1
  2. package/assets/standalone/.next/build-manifest.json +3 -3
  3. package/assets/standalone/.next/prerender-manifest.json +3 -3
  4. package/assets/standalone/.next/server/app/_global-error.html +1 -1
  5. package/assets/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/assets/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/assets/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/assets/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/assets/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/assets/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/assets/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
  12. package/assets/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/assets/standalone/.next/server/app/_not-found.html +2 -2
  14. package/assets/standalone/.next/server/app/_not-found.rsc +17 -17
  15. package/assets/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +17 -17
  16. package/assets/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  17. package/assets/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
  18. package/assets/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  19. package/assets/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  20. package/assets/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  21. package/assets/standalone/.next/server/app/dashboard/[viewName]/page/server-reference-manifest.json +5 -5
  22. package/assets/standalone/.next/server/app/dashboard/[viewName]/page_client-reference-manifest.js +1 -1
  23. package/assets/standalone/.next/server/app/dashboard/page/server-reference-manifest.json +5 -5
  24. package/assets/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
  25. package/assets/standalone/.next/server/app/hooks/page/server-reference-manifest.json +56 -8
  26. package/assets/standalone/.next/server/app/hooks/page.js +3 -2
  27. package/assets/standalone/.next/server/app/hooks/page_client-reference-manifest.js +1 -1
  28. package/assets/standalone/.next/server/app/login/page/server-reference-manifest.json +3 -3
  29. package/assets/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  30. package/assets/standalone/.next/server/app/login.html +2 -2
  31. package/assets/standalone/.next/server/app/login.rsc +20 -20
  32. package/assets/standalone/.next/server/app/login.segments/_full.segment.rsc +20 -20
  33. package/assets/standalone/.next/server/app/login.segments/_head.segment.rsc +4 -4
  34. package/assets/standalone/.next/server/app/login.segments/_index.segment.rsc +11 -11
  35. package/assets/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  36. package/assets/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  37. package/assets/standalone/.next/server/app/login.segments/login.segment.rsc +3 -3
  38. package/assets/standalone/.next/server/app/page/server-reference-manifest.json +2 -2
  39. package/assets/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  40. package/assets/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +2 -2
  41. package/assets/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  42. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  43. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +10 -10
  44. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  45. package/assets/standalone/.next/server/app/queue/page/server-reference-manifest.json +4 -4
  46. package/assets/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  47. package/assets/standalone/.next/server/chunks/[externals]__0-p9.k~._.js +3 -0
  48. package/assets/standalone/.next/server/chunks/[externals]__12dv.x0._.js +3 -0
  49. package/assets/standalone/.next/server/chunks/[root-of-the-server]__031vvrp._.js +1 -1
  50. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0_03u6.._.js +2 -2
  51. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0f_5ws6._.js +1 -1
  52. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +1 -1
  53. package/assets/standalone/.next/server/chunks/[root-of-the-server]__0wkrejt._.js +1 -1
  54. package/assets/standalone/.next/server/chunks/_0aylu-q._.js +1 -1
  55. package/assets/standalone/.next/server/chunks/_0lq2_wn._.js +1 -1
  56. package/assets/standalone/.next/server/chunks/_0oqawqx._.js +2 -2
  57. package/assets/standalone/.next/server/chunks/_0vt409y._.js +1 -1
  58. package/assets/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0l15kkr.js +1 -1
  59. package/assets/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_00~~2w9._.js +1 -1
  60. package/assets/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_05pz9._._.js +1 -1
  61. package/assets/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
  62. package/assets/standalone/.next/server/chunks/ssr/[externals]__12dv.x0._.js +3 -0
  63. package/assets/standalone/.next/server/chunks/ssr/[externals]_node_async_hooks_0v0ln8c._.js +3 -0
  64. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__00fve8g._.js +36 -0
  65. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__02x4-91._.js +1 -1
  66. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__06tqxbp._.js +1 -1
  67. package/assets/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0idy2kl._.js → [root-of-the-server]__08a4wva._.js} +2 -2
  68. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dsucx_._.js +1 -1
  69. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e9ohz2._.js +1 -1
  70. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fltiz1._.js +1 -1
  71. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-as.._.js +1 -1
  72. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tsew7c._.js +4 -0
  73. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0x5abxa._.js +1 -1
  74. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__0yi-883._.js +1 -1
  75. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__10_wjge._.js +1 -1
  76. package/assets/standalone/.next/server/chunks/ssr/_03l0_j6._.js +1 -1
  77. package/assets/standalone/.next/server/chunks/ssr/_050qnuh._.js +1 -1
  78. package/assets/standalone/.next/server/chunks/ssr/_0_~1-jh._.js +1 -1
  79. package/assets/standalone/.next/server/chunks/ssr/_0kfjwwu._.js +1 -1
  80. package/assets/standalone/.next/server/chunks/ssr/_0ndt7tj._.js +1 -1
  81. package/assets/standalone/.next/server/chunks/ssr/_0uig1kl._.js +1 -1
  82. package/assets/standalone/.next/server/chunks/ssr/app_actions_compute-dashboard_ts_13cb_9d._.js +1 -1
  83. package/assets/standalone/.next/server/chunks/ssr/app_hooks_hooks-client_tsx_0n~.yoz._.js +1 -1
  84. package/assets/standalone/.next/server/chunks/ssr/app_login_page_tsx_0z71ad3._.js +1 -1
  85. package/assets/standalone/.next/server/chunks/ssr/app_queue_queue-client_tsx_0c0olxv._.js +1 -1
  86. package/assets/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0mebn66._.js +1 -1
  87. package/assets/standalone/.next/server/middleware-build-manifest.js +3 -3
  88. package/assets/standalone/.next/server/pages/404.html +2 -2
  89. package/assets/standalone/.next/server/pages/500.html +1 -1
  90. package/assets/standalone/.next/server/server-reference-manifest.js +1 -1
  91. package/assets/standalone/.next/server/server-reference-manifest.json +70 -22
  92. package/assets/standalone/.next/static/chunks/{06z~l4lr6buqu.js → 05l6_6jd1ey6v.js} +1 -1
  93. package/assets/standalone/.next/static/chunks/{0jc~6j8onhl9k.js → 083938s.mkrm-.js} +1 -1
  94. package/assets/standalone/.next/static/chunks/{0h_h3vds4m16x.js → 096~89k5h2-o..js} +3 -3
  95. package/assets/standalone/.next/static/chunks/{0xn641.xyvsma.js → 0_f5xq5lhf8-0.js} +1 -1
  96. package/assets/standalone/.next/static/chunks/{0~wl736g.52_r.js → 0h6039djg7yn~.js} +1 -1
  97. package/assets/standalone/.next/static/chunks/{15yz5xkwmh77k.js → 0hmgtlt-1s-_z.js} +1 -1
  98. package/assets/standalone/.next/static/chunks/0j1-mgai_b50s.css +1 -0
  99. package/assets/standalone/.next/static/chunks/0vyjtt~0eaw3_.js +1 -0
  100. package/assets/standalone/.next/static/chunks/{103mfn_z-s1dk.js → 15gen854~c206.js} +1 -1
  101. package/assets/standalone/README.md +4 -2
  102. package/assets/standalone/package.json +1 -1
  103. package/bin/claudeye +0 -0
  104. package/package.json +1 -1
  105. package/assets/standalone/.next/server/chunks/[externals]__0-18y4s._.js +0 -3
  106. package/assets/standalone/.next/server/chunks/[externals]__02vhdx5._.js +0 -3
  107. package/assets/standalone/.next/server/chunks/ssr/[externals]__02vhdx5._.js +0 -3
  108. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__028g7vs._.js +0 -4
  109. package/assets/standalone/.next/static/chunks/0qi0emy6vux80.js +0 -1
  110. package/assets/standalone/.next/static/chunks/0zkgvvnqbzx32.css +0 -1
  111. /package/assets/standalone/.next/static/{ocVS0_NQidsr1QO4mcx4e → OCXqJ711WVPVfYYr2iQc0}/_buildManifest.js +0 -0
  112. /package/assets/standalone/.next/static/{ocVS0_NQidsr1QO4mcx4e → OCXqJ711WVPVfYYr2iQc0}/_clientMiddlewareManifest.js +0 -0
  113. /package/assets/standalone/.next/static/{ocVS0_NQidsr1QO4mcx4e → OCXqJ711WVPVfYYr2iQc0}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[63616,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)("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"}]]),h=(0,f.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"}]]),i=(0,f.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 j=a.i(3314),k=a.i(5784),l=a.i(5151),m=a.i(33441),n=a.i(65967),o=a.i(5050);let p=(0,o.createServerReference)("40a2deb42347b54f60cea01f7ee0425a697da3938a",o.callServer,void 0,o.findSourceMapURL,"getHookActivityAction"),q=(0,o.createServerReference)("609e2911f1976bceca89b8d45bfce363330ea32fa4",o.callServer,void 0,o.findSourceMapURL,"searchHookActivityAction");var r=a.i(6236),s=a.i(90619),t=a.i(95947);function u({sessionId:a,transcriptPath:c}){if(!a)return(0,b.jsx)("span",{className:"text-muted-foreground",children:"\\u2014"});let e=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 e?(0,b.jsx)(d.default,{href:`/project/${encodeURIComponent(e)}/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 v({decision:a}){return"deny"===a?(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,b.jsx)(h,{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)(i,{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)(g,{className:"h-3 w-3"}),"Allow"]})}function w({eventType:a}){return(0,b.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:a})}function x({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 y({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 z({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)(m.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(l.Copy,{className:"h-3 w-3"})})}function A({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 B({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 C({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)(z,{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)(z,{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})]})]})})})}a.s(["default",0,function(){let{intervalSec:a}=(0,r.useAutoRefresh)(),f=(0,s.useUrlParams)(),g=(0,c.useRef)(!1),[h,i]=(0,c.useState)(()=>(0,t.paramToPage)(f.get("page"))),[l,m]=(0,c.useState)(null),[o,z]=(0,c.useState)(null),[D,E]=(0,c.useState)(()=>{let a=f.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[F,G]=(0,c.useState)(()=>f.get("event")??""),[H,I]=(0,c.useState)(()=>f.get("policy")??""),[J,K]=(0,c.useState)(()=>f.get("session")??""),L=(0,c.useRef)(null),M=(0,c.useRef)({filterDecision:D,filterEventType:F,filterPolicy:H,filterSessionId:J});M.current={filterDecision:D,filterEventType:F,filterPolicy:H,filterSessionId:J},(0,c.useEffect)(()=>{if(!g.current){g.current=!0;return}f.setAll({decision:D||void 0,event:F||void 0,policy:H||void 0,session:J||void 0,page:(0,t.pageToParam)(h)})},[D,F,H,J,h]);let N=""!==D||""!==F||""!==H||""!==J,O=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e,filterSessionId:f}=M.current;b=""!==c||""!==d||""!==e||""!==f?await q({decision:c||void 0,eventType:d||void 0,policyName:e||void 0,sessionId:f||void 0},a):await p(a),m(b)}catch{}},[]);(0,c.useEffect)(()=>{O(h);let b=setInterval(()=>O(h),a>0?1e3*a:5e3);return()=>clearInterval(b)},[h,O,a]),(0,c.useEffect)(()=>(L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{i(1),z(null),O(1)},300),()=>{L.current&&clearTimeout(L.current)}),[D,F,H,J]);let P=l?.entries??[],Q=l?.totalPages??1;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)(d.default,{href:"/",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(e.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:"Hook Activity"}),(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:"Policy evaluations from Claude Code hook events"}),l?.stats&&l.stats.totalEvents>0&&(0,b.jsx)("div",{className:"mt-3",children:(0,b.jsx)(B,{stats:l.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)(A,{value:D,onChange:E}),(0,b.jsxs)("select",{value:F,onChange:a=>G(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:H,onChange:a=>I(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:J,onChange:a=>K(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===P.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(j.Shield,{className:"h-12 w-12 text-muted-foreground/30"}),(0,b.jsx)("span",{className:"absolute inset-0 animate-ping",children:(0,b.jsx)(j.Shield,{className:"h-12 w-12 text-muted-foreground/10"})})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:N?"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:P.map((a,d)=>{var e;let f,g="deny"===a.decision,h=o===d,i="instruct"===a.decision;return(0,b.jsxs)(c.default.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{z(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)(k.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)(v,{decision:a.decision})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(w,{eventType:a.eventType})}),(0,b.jsx)("td",{className:"px-3 py-2 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)(y,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2",title:a.sessionId??"",children:(0,b.jsx)(u,{sessionId:a.sessionId,transcriptPath:a.transcriptPath})}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(x,{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)(C,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(n.default,{currentPage:h,totalPages:Q,onPageChange:a=>{i(a),z(null)}})]})]})}],63616)}];
1
+ module.exports=[63616,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)("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"}]]),h=(0,f.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"}]]),i=(0,f.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 j=a.i(3314),k=a.i(5784),l=a.i(5151),m=a.i(33441),n=a.i(65967),o=a.i(5050);let p=(0,o.createServerReference)("40be5c9e4bc9a3110df6ccd5baad305f665e9d93e4",o.callServer,void 0,o.findSourceMapURL,"getHookActivityAction"),q=(0,o.createServerReference)("606b9340ff5518e5165445dc2719d562156340d726",o.callServer,void 0,o.findSourceMapURL,"searchHookActivityAction"),r=(0,o.createServerReference)("00277d922ac55989f03367a00836c9b988abc51daf",o.callServer,void 0,o.findSourceMapURL,"getHooksConfigAction"),s=(0,o.createServerReference)("60fb76f088baef8aad3bac8b20c4fc16471fea84a4",o.callServer,void 0,o.findSourceMapURL,"togglePolicyAction"),t=(0,o.createServerReference)("403dffba6053dd250b3ac63fb104bf813a3cf3d653",o.callServer,void 0,o.findSourceMapURL,"installHooksWebAction"),u=(0,o.createServerReference)("408fa591895ff04faa10f9da321c1905eb6511330f",o.callServer,void 0,o.findSourceMapURL,"removeHooksWebAction");var v=a.i(6236),w=a.i(90619),x=a.i(95947),y=a.i(40695);function z({sessionId:a,transcriptPath:c}){if(!a)return(0,b.jsx)("span",{className:"text-muted-foreground",children:"\\u2014"});let e=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 e?(0,b.jsx)(d.default,{href:`/project/${encodeURIComponent(e)}/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 A({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)(h,{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)(i,{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)(g,{className:"h-3 w-3"}),"Allow"]})}function B({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 C({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 D({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 E({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)(m.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(l.Copy,{className:"h-3 w-3"})})}function F({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 G({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 H({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)(E,{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)(E,{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 I(){let{intervalSec:a}=(0,v.useAutoRefresh)(),d=(0,w.useUrlParams)(),e=(0,c.useRef)(!1),[f,g]=(0,c.useState)(()=>(0,x.paramToPage)(d.get("page"))),[h,i]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[o,r]=(0,c.useState)(()=>{let a=d.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[s,t]=(0,c.useState)(()=>d.get("event")??""),[u,y]=(0,c.useState)(()=>d.get("policy")??""),[E,I]=(0,c.useState)(()=>d.get("session")??""),J=(0,c.useRef)(null),K=(0,c.useRef)({filterDecision:o,filterEventType:s,filterPolicy:u,filterSessionId:E});K.current={filterDecision:o,filterEventType:s,filterPolicy:u,filterSessionId:E},(0,c.useEffect)(()=>{if(!e.current){e.current=!0;return}d.setAll({decision:o||void 0,event:s||void 0,policy:u||void 0,session:E||void 0,page:(0,x.pageToParam)(f)})},[o,s,u,E,f]);let L=""!==o||""!==s||""!==u||""!==E,M=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e,filterSessionId:f}=K.current;b=""!==c||""!==d||""!==e||""!==f?await q({decision:c||void 0,eventType:d||void 0,policyName:e||void 0,sessionId:f||void 0},a):await p(a),i(b)}catch{}},[]);(0,c.useEffect)(()=>{M(f);let b=setInterval(()=>M(f),a>0?1e3*a:5e3);return()=>clearInterval(b)},[f,M,a]),(0,c.useEffect)(()=>(J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{g(1),m(null),M(1)},300),()=>{J.current&&clearTimeout(J.current)}),[o,s,u,E]);let N=h?.entries??[],O=h?.totalPages??1;return(0,b.jsxs)(b.Fragment,{children:[h?.stats&&h.stats.totalEvents>0&&(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsx)(G,{stats:h.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)(F,{value:o,onChange:r}),(0,b.jsxs)("select",{value:s,onChange:a=>t(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:u,onChange:a=>y(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:E,onChange:a=>I(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===N.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 px-4",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(j.Shield,{className:"h-12 w-12 text-muted-foreground/30"}),(0,b.jsx)("span",{className:"absolute inset-0 animate-ping",children:(0,b.jsx)(j.Shield,{className:"h-12 w-12 text-muted-foreground/10"})})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-4",children:L?"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:N.map((a,d)=>{var e;let f,g="deny"===a.decision,h=l===d,i="instruct"===a.decision;return(0,b.jsxs)(c.default.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{m(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)(k.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)(A,{decision:a.decision})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(B,{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)(D,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2",title:a.sessionId??"",children:(0,b.jsx)(z,{sessionId:a.sessionId,transcriptPath:a.transcriptPath})}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(C,{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)(H,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(n.default,{currentPage:f,totalPages:O,onPageChange:a=>{g(a),m(null)}})]})]})}function J({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 K(){let[a,d]=(0,c.useState)(null),[e,f]=(0,c.useTransition)(),[g,h]=(0,c.useState)(null),i=(0,c.useCallback)(async()=>{try{let a=await r();d(a)}catch{}},[]);if((0,c.useEffect)(()=>{i()},[i]),!a)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 j=a.installedScopes.length>0,k=Array.from(new Set(a.policies.map(a=>a.category)));return(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 ${j?"bg-emerald-500":"bg-muted-foreground/50"}`}),(0,b.jsx)("span",{className:"text-sm text-foreground",children:j?"Hooks installed":"Hooks not installed"}),j&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground font-mono hidden sm:inline",children:["· ",a.installedScopes.join(", ")," scope · ",a.settingsPath]}),!j&&(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:"· toggle policies below, then click Install"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[j&&(0,b.jsx)(y.Button,{variant:"outline",size:"sm",onClick:()=>{f(async()=>{try{h(null),await u("user"),await i()}catch(a){h(a instanceof Error?a.message:"Failed to remove hooks.")}})},disabled:e,className:"text-xs h-7 px-3",children:"Remove"}),(0,b.jsx)(y.Button,{variant:j?"outline":"default",size:"sm",onClick:()=>{f(async()=>{try{h(null),await t("user"),await i()}catch(a){h(a instanceof Error?a.message:"Failed to install hooks.")}})},disabled:e,className:"text-xs h-7 px-3",children:j?"Reinstall":"Install hooks"})]})]}),g&&(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:g}),k.map(c=>{let g=a.policies.filter(a=>a.category===c),j=g.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 bg-muted/20 border-b border-border/50",children:[(0,b.jsx)("span",{className:"text-[0.65rem] font-semibold uppercase tracking-wider text-muted-foreground",children:c}),(0,b.jsxs)("span",{className:"text-[0.65rem] text-muted-foreground",children:[j," / ",g.length," enabled"]})]}),g.map(c=>(0,b.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5 border-b border-border/20 hover:bg-muted/20 transition-colors",children:[(0,b.jsx)(J,{enabled:c.enabled,onChange:()=>{var b,e;return b=c.name,e=c.enabled,void(a&&(d(a=>a?{...a,policies:a.policies.map(a=>a.name===b?{...a,enabled:!e}:a),enabledPolicies:e?a.enabledPolicies.filter(a=>a!==b):[...a.enabledPolicies,b]}:a),f(async()=>{try{await s(b,!e)}catch{h("Failed to save policy change."),i()}})))},disabled:e}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 w-52 shrink-0",children:[(0,b.jsx)("span",{className:"text-xs font-mono text-foreground truncate",children:c.name}),c.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"}),c.defaultEnabled&&!c.beta&&(0,b.jsx)("span",{className:"shrink-0 text-[0.6rem] text-muted-foreground/50",children:"default"})]}),(0,b.jsx)("span",{className:"text-[0.7rem] text-muted-foreground flex-1 truncate min-w-0",children:c.description}),(0,b.jsx)("span",{className:"text-[0.6rem] text-muted-foreground/40 shrink-0 hidden lg:block font-mono",children:c.eventScope})]},c.name))]},c)})]})}function L({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:"Policies"}].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 f=(0,w.useUrlParams)(),[g,h]=(0,c.useState)(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)(d.default,{href:"/",className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,b.jsx)(e.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:"Hooks"}),"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?"Policy evaluations from Claude Code hook events":"Manage which security policies are active"})]}),(0,b.jsx)(L,{activeTab:g,onChange:a=>{h(a),f.setAll({tab:"activity"===a?void 0:a})}}),"activity"===g?(0,b.jsx)(I,{}):(0,b.jsx)(K,{})]})}],63616)}];
2
2
 
3
3
  //# sourceMappingURL=app_hooks_hooks-client_tsx_0n~.yoz._.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)("401a9232e534175fd93b0225f42baa1cd8f724e3c8",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(72131),d=a.i(50944),e=a.i(5050);let f=(0,e.createServerReference)("4003ecce943a65e3f9833c9c71d352d80a273dc857",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)}];
2
2
 
3
3
  //# sourceMappingURL=app_login_page_tsx_0z71ad3._.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)("405f4529ca7417d6cae3efaee2939bbe95ba4ef03a",k.callServer,void 0,k.findSourceMapURL,"getCompletedHistoryAction"),m=(0,k.createServerReference)("608a47515b1fc31b6b27be86c154247ddf0ecc5bad",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(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)("4009fb6b59c6b03388bf0f3f4dbcc9e4707ebc567d",k.callServer,void 0,k.findSourceMapURL,"getCompletedHistoryAction"),m=(0,k.createServerReference)("60e1175b81d180c1e6feb795d20f5db8fbcfc436a0",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)}];
2
2
 
3
3
  //# sourceMappingURL=app_queue_queue-client_tsx_0c0olxv._.js.map