@claudeye/linux-arm64 1.0.5-beta.5 → 1.0.5

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 (92) hide show
  1. package/assets/standalone/.next/BUILD_ID +1 -1
  2. package/assets/standalone/.next/build-manifest.json +2 -2
  3. package/assets/standalone/.next/prerender-manifest.json +3 -3
  4. package/assets/standalone/.next/server/app/_global-error.html +2 -2
  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 +7 -7
  15. package/assets/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +7 -7
  16. package/assets/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  17. package/assets/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +7 -7
  18. package/assets/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  19. package/assets/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  20. package/assets/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  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 +4 -4
  26. package/assets/standalone/.next/server/app/hooks/page_client-reference-manifest.js +1 -1
  27. package/assets/standalone/.next/server/app/login/page/server-reference-manifest.json +3 -3
  28. package/assets/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  29. package/assets/standalone/.next/server/app/login.html +2 -2
  30. package/assets/standalone/.next/server/app/login.rsc +8 -8
  31. package/assets/standalone/.next/server/app/login.segments/_full.segment.rsc +8 -8
  32. package/assets/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
  33. package/assets/standalone/.next/server/app/login.segments/_index.segment.rsc +7 -7
  34. package/assets/standalone/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  35. package/assets/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  36. package/assets/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
  37. package/assets/standalone/.next/server/app/page/server-reference-manifest.json +2 -2
  38. package/assets/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/assets/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +2 -2
  40. package/assets/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  41. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +1 -1
  42. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +9 -9
  43. package/assets/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  44. package/assets/standalone/.next/server/app/queue/page/server-reference-manifest.json +4 -4
  45. package/assets/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  46. package/assets/standalone/.next/server/chunks/[root-of-the-server]__75048a35._.js +2 -2
  47. package/assets/standalone/.next/server/chunks/[root-of-the-server]__dd558eee._.js +1 -1
  48. package/assets/standalone/.next/server/chunks/[root-of-the-server]__f44213d4._.js +1 -1
  49. package/assets/standalone/.next/server/chunks/_3f3c09bf._.js +2 -2
  50. package/assets/standalone/.next/server/chunks/_7e07bbd9._.js +1 -1
  51. package/assets/standalone/.next/server/chunks/_8f856fad._.js +2 -2
  52. package/assets/standalone/.next/server/chunks/_b8adaa37._.js +2 -2
  53. package/assets/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7a66d362.js +1 -1
  54. package/assets/standalone/.next/server/chunks/package_json_4b1b4d6f._.js +1 -1
  55. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__637abc80._.js +1 -1
  56. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__6ec938e4._.js +1 -1
  57. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__82c381fd._.js +1 -1
  58. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__99f0c371._.js +1 -1
  59. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__b9492585._.js +1 -1
  60. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__cb5a5725._.js +1 -1
  61. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__d015fef5._.js +1 -1
  62. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__d4e6c42a._.js +1 -1
  63. package/assets/standalone/.next/server/chunks/ssr/[root-of-the-server]__fd646815._.js +1 -1
  64. package/assets/standalone/.next/server/chunks/ssr/_14858238._.js +1 -1
  65. package/assets/standalone/.next/server/chunks/ssr/_1d335924._.js +1 -1
  66. package/assets/standalone/.next/server/chunks/ssr/_76ab933f._.js +1 -1
  67. package/assets/standalone/.next/server/chunks/ssr/_87e025a1._.js +1 -1
  68. package/assets/standalone/.next/server/chunks/ssr/_b14cf8e4._.js +1 -1
  69. package/assets/standalone/.next/server/chunks/ssr/_d7159840._.js +1 -1
  70. package/assets/standalone/.next/server/chunks/ssr/app_actions_compute-dashboard_ts_fc151dbb._.js +1 -1
  71. package/assets/standalone/.next/server/chunks/ssr/app_hooks_hooks-client_tsx_8b8d68a3._.js +1 -1
  72. package/assets/standalone/.next/server/chunks/ssr/app_login_page_tsx_ccc0019b._.js +1 -1
  73. package/assets/standalone/.next/server/chunks/ssr/app_queue_queue-client_tsx_45f040f7._.js +1 -1
  74. package/assets/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_8222e100._.js +1 -1
  75. package/assets/standalone/.next/server/pages/404.html +2 -2
  76. package/assets/standalone/.next/server/pages/500.html +2 -2
  77. package/assets/standalone/.next/server/server-reference-manifest.js +1 -1
  78. package/assets/standalone/.next/server/server-reference-manifest.json +18 -18
  79. package/assets/standalone/.next/static/chunks/{464ea13865225b93.js → 1891ebe9a9f30b24.js} +1 -1
  80. package/assets/standalone/.next/static/chunks/{0f03de29a79b358a.js → 32addb9a03bc9eb0.js} +3 -3
  81. package/assets/standalone/.next/static/chunks/{d4b9ae69c61ea106.js → 408822bf7ed2f63c.js} +1 -1
  82. package/assets/standalone/.next/static/chunks/{7027ea5abc3cb8b6.js → 93a639f2894ba87b.js} +1 -1
  83. package/assets/standalone/.next/static/chunks/{43eaeae7a28ee945.js → e316aafdea46c4ea.js} +1 -1
  84. package/assets/standalone/.next/static/chunks/{b89fde0f6a1afd29.js → e6e7a15cdee90ddf.js} +1 -1
  85. package/assets/standalone/.next/static/chunks/{74316d89b6c41d1f.js → f6fddbf6f921870f.js} +1 -1
  86. package/assets/standalone/README.md +88 -78
  87. package/assets/standalone/package.json +1 -1
  88. package/bin/claudeye +0 -0
  89. package/package.json +1 -1
  90. /package/assets/standalone/.next/static/{dXM7TIq4Pg0K-2y8eOVwS → Iy9BSv8VmacfZbJtrubiB}/_buildManifest.js +0 -0
  91. /package/assets/standalone/.next/static/{dXM7TIq4Pg0K-2y8eOVwS → Iy9BSv8VmacfZbJtrubiB}/_clientMiddlewareManifest.json +0 -0
  92. /package/assets/standalone/.next/static/{dXM7TIq4Pg0K-2y8eOVwS → Iy9BSv8VmacfZbJtrubiB}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[50871,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",()=>b],50871)},31810,a=>{"use strict";var b=a.i(46325),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEnrichers)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,data:{},durationMs:0,skipped:!0}),successResult:(a,b,c)=>({name:a.name,data:b,durationMs:c}),errorResult:(a,b,c)=>({name:a.name,data:{},durationMs:c,error:b}),unexpectedResult:()=>({name:"?",data:{},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}}})}a.s(["runAllEnrichers",()=>d])},86736,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(46325),e=a.i(31810),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l=!1){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSessionScopedEnrichers)().find(a=>a.name===k);if(!j)return{ok:!1,error:`Enricher "${k}" not found`};let m=await (0,h.hashSessionFile)(a,b);if(!l&&m){let c=(0,h.hashItemCode)(j.fn),d=await (0,i.getPerItemCacheWithHook)("enrichments",a,b,j.name,c,m);if(d)return{ok:!0,result:d.value}}let{entries:n,rawLines:o}=await (0,f.getCachedSessionLog)(a,b),p=(0,g.calculateLogStats)(n),q=(await (0,e.runAllEnrichers)(o,p,a,b,[j],{source:"session"})).results[0];if(!q)return{ok:!1,error:"No result returned from enricher"};if(m){let c=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("enrichments",a,b,j.name,c,q,m)}return{ok:!0,result:q}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"78e79359ae53eb337d36afc2c13d00f47c948ae9dc",null),a.s(["processSessionEnrichment",()=>j])}];
1
+ module.exports=[50871,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",()=>b],50871)},31810,a=>{"use strict";var b=a.i(46325),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEnrichers)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,data:{},durationMs:0,skipped:!0}),successResult:(a,b,c)=>({name:a.name,data:b,durationMs:c}),errorResult:(a,b,c)=>({name:a.name,data:{},durationMs:c,error:b}),unexpectedResult:()=>({name:"?",data:{},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}}})}a.s(["runAllEnrichers",()=>d])},86736,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(46325),e=a.i(31810),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l=!1){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSessionScopedEnrichers)().find(a=>a.name===k);if(!j)return{ok:!1,error:`Enricher "${k}" not found`};let m=await (0,h.hashSessionFile)(a,b);if(!l&&m){let c=(0,h.hashItemCode)(j.fn),d=await (0,i.getPerItemCacheWithHook)("enrichments",a,b,j.name,c,m);if(d)return{ok:!0,result:d.value}}let{entries:n,rawLines:o}=await (0,f.getCachedSessionLog)(a,b),p=(0,g.calculateLogStats)(n),q=(await (0,e.runAllEnrichers)(o,p,a,b,[j],{source:"session"})).results[0];if(!q)return{ok:!1,error:"No result returned from enricher"};if(m){let c=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("enrichments",a,b,j.name,c,q,m)}return{ok:!0,result:q}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"784fbbb4c6588b14706183d2d06ac536c3081f4155",null),a.s(["processSessionEnrichment",()=>j])}];
2
2
 
3
3
  //# sourceMappingURL=_87e025a1._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[10765,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)("0019a89c346077746f132b6415efb4919f7ba95eca",e.callServer,void 0,e.findSourceMapURL,"getTelemetryConfig");function g(a,b){}let h=(0,c.createContext)(void 0);function i(){let a=(0,c.useContext)(h);if(void 0===a)throw Error("usePostHog must be used within a PostHogProvider");return a}function j({children:a}){let e=(0,d.usePathname)(),i=(0,c.useRef)(null),j=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let a=!1;return f().then(b=>{!a&&(j.current=!0,g("$pageview"),i.current=window.location.pathname)}),()=>{a=!0}},[]),(0,c.useEffect)(()=>{j.current&&i.current!==e&&(i.current=e,g("$pageview"))},[e]);let k=c.default.useCallback((a,b)=>{g(a,b)},[]);return(0,b.jsx)(h.Provider,{value:{capture:k},children:a})}a.s(["PostHogProvider",()=>j,"usePostHog",()=>i],10765)},10815,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(50944),f=a.i(70106);let g=(0,f.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),h=(0,f.default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),i=(0,f.default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);var j=a.i(3314),k=a.i(35960);let l=(0,f.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),m=(0,f.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var n=a.i(18200),o=a.i(97895);let p=c.forwardRef(({className:a,variant:c="default",size:d="default",...e},f)=>(0,b.jsx)("button",{className:(0,o.cn)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",{"bg-primary text-primary-foreground hover:bg-primary/90":"default"===c,"hover:bg-muted hover:text-muted-foreground":"ghost"===c,"border border-border bg-background hover:bg-muted":"outline"===c,"h-10 py-2 px-4":"default"===d,"h-10 w-10":"icon"===d,"h-9 px-3":"sm"===d,"h-11 px-8":"lg"===d},a),ref:f,...e}));p.displayName="Button";let q=()=>{let{theme:a,setTheme:c}=(0,n.useTheme)();return(0,b.jsxs)(p,{variant:"ghost",size:"icon",onClick:()=>{c("light"===a?"dark":"light")},className:"relative","aria-label":`Switch to ${"light"===a?"dark":"light"} mode`,children:[(0,b.jsx)(l,{className:`h-[1.2rem] w-[1.2rem] transition-all ${"light"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`}),(0,b.jsx)(m,{className:`absolute h-[1.2rem] w-[1.2rem] transition-all ${"dark"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`})]})},r=(0,f.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),s=(0,f.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),t=(0,f.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]),u=(0,f.default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var v=a.i(5784);let w="claudeye@exosphere.host",x=[{label:"Request a Feature",icon:s,subject:"Feature Request: "},{label:"Report a Bug",icon:t,subject:"Bug Report: "},{label:"General Inquiry",icon:u,subject:"General Inquiry: "}],y=()=>{let[a,d]=(0,c.useState)(!1),e=(0,c.useRef)(null);(0,c.useEffect)(()=>{let a=a=>{e.current&&!e.current.contains(a.target)&&d(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);let f=(0,c.useCallback)(b=>{"Escape"===b.key&&a&&d(!1)},[a]);return(0,b.jsxs)("div",{ref:e,className:"relative",onKeyDown:f,children:[(0,b.jsxs)(p,{variant:"ghost",size:"sm",onClick:()=>d(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(r,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline text-xs",children:"Reach Us"}),(0,b.jsx)(v.ChevronDown,{className:`h-3 w-3 transition-transform ${a?"rotate-180":""}`})]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-56 rounded-lg border border-border bg-card shadow-lg z-50",role:"menu",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Reach Developers"}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:"We'd love to hear from you"})]}),(0,b.jsx)("div",{className:"py-1",children:x.map(({label:a,icon:c,subject:e})=>(0,b.jsxs)("a",{href:`mailto:${w}?subject=${encodeURIComponent(e)}`,role:"menuitem",className:"flex items-center gap-2.5 px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>d(!1),children:[(0,b.jsx)(c,{className:"h-3.5 w-3.5 flex-shrink-0"}),a]},a))}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsx)("a",{href:`mailto:${w}`,className:"text-[0.65rem] text-primary hover:text-primary/80 transition-colors",children:w})})]})]})},z=(0,f.default)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);function A({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 py-0.5 text-[0.6rem] font-medium leading-none ${c}`,children:a.toUpperCase()})}let B=()=>{let[a,e]=(0,c.useState)(!1),[f,g]=(0,c.useState)(null),h=(0,c.useRef)(null),i=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/queue-status",{cache:"no-store"});a.ok&&g(await a.json())}catch{}},[]);(0,c.useEffect)(()=>{let b=a?2e3:5e3,c=setTimeout(i,0),d=setInterval(i,b);return()=>{clearTimeout(c),clearInterval(d)}},[a,i]),(0,c.useEffect)(()=>{let a=a=>{h.current&&!h.current.contains(a.target)&&e(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);let j=(0,c.useCallback)(b=>{"Escape"===b.key&&a&&e(!1)},[a]),k=f?.pending.length??0,l=f?.processing.length??0,m=k+l;return(0,b.jsxs)("div",{ref:h,className:"relative",onKeyDown:j,children:[(0,b.jsxs)(p,{variant:"ghost",size:"sm",onClick:()=>e(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"relative flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(z,{className:"h-4 w-4"}),m>0?(0,b.jsx)("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[0.6rem] font-medium text-primary-foreground",children:m}):null]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-72 rounded-lg border border-border bg-card shadow-lg z-50",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Queue"}),f&&(0,b.jsxs)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:[k," queued · ",l," processing"]})]}),(0,b.jsx)("div",{className:"max-h-64 overflow-y-auto",children:f?0===f.processing.length&&0===f.pending.length?(0,b.jsx)("p",{className:"px-3 py-4 text-xs text-muted-foreground text-center",children:"Queue is empty"}):(0,b.jsxs)("div",{className:"py-1",children:[f.processing.slice(0,7).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse flex-shrink-0"}),(0,b.jsx)(A,{type:a.type}),(0,b.jsx)("span",{className:"text-foreground truncate flex-1 font-mono text-[0.65rem]",children:a.itemName})]},a.key)),f.processing.length>7&&(0,b.jsxs)("p",{className:"px-3 py-1 text-[0.6rem] text-muted-foreground",children:["...and ",f.processing.length-7," more"]}),f.pending.slice(0,5).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-muted-foreground/40 flex-shrink-0"}),(0,b.jsx)(A,{type:a.type}),(0,b.jsx)("span",{className:"text-muted-foreground truncate flex-1 font-mono text-[0.65rem]",children:a.itemName}),(0,b.jsx)("span",{className:`text-[0.6rem] font-medium flex-shrink-0 ${a.priority<=0?"text-red-600 dark:text-red-400":"text-muted-foreground"}`,children:a.priority<=0?"HIGH":"LOW"})]},a.key)),f.pending.length>5&&(0,b.jsxs)("p",{className:"px-3 py-1 text-[0.6rem] text-muted-foreground",children:["...and ",f.pending.length-5," more queued"]})]}):(0,b.jsx)("p",{className:"px-3 py-4 text-xs text-muted-foreground text-center",children:"Loading..."})}),f&&f.recentErrors.length>0&&(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsxs)("p",{className:"text-[0.6rem] text-red-600 dark:text-red-400",children:[f.recentErrors.length," recent error",1!==f.recentErrors.length?"s":""]})}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border text-center",children:(0,b.jsx)(d.default,{href:"/queue",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>e(!1),children:"View details"})})]})]})};var C=a.i(69520),D=a.i(6236);let E=[{label:"Off",value:0},{label:"5s",value:5},{label:"10s",value:10},{label:"30s",value:30}];function F({className:a}){let d=(0,e.useRouter)(),[f,g]=(0,c.useTransition)(),{intervalSec:h,setIntervalSec:i}=(0,D.useAutoRefresh)(),j=(0,c.useCallback)(()=>{g(()=>d.refresh())},[d]);(0,c.useEffect)(()=>{if(h<=0)return;let a=setInterval(j,1e3*h);return()=>clearInterval(a)},[h,j]);let k=h>0;return(0,b.jsxs)("div",{className:(0,o.cn)("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",a),children:[(0,b.jsx)("button",{onClick:j,title:"Refresh",className:(0,o.cn)("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",k?"text-primary hover:bg-primary/10":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:(0,b.jsx)(C.RefreshCw,{className:(0,o.cn)("w-3.5 h-3.5",f&&"animate-spin")})}),(0,b.jsx)("div",{className:"w-px h-4 bg-border"}),(0,b.jsx)("div",{className:"inline-flex items-center gap-0.5",role:"group","aria-label":"Auto-refresh interval",children:E.map(a=>(0,b.jsx)("button",{onClick:()=>i(a.value),"aria-pressed":h===a.value,className:(0,o.cn)("px-2 py-1 text-[11px] font-medium rounded-md transition-colors",h===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:a.label},a.value))})]})}var G=a.i(5050);let H=(0,G.createServerReference)("006ea6f59c8fccf757175fe6cfaf6728faeacb9bfc",G.callServer,void 0,G.findSourceMapURL,"logout"),I=[{href:"/",label:"Projects",icon:h},{href:"/dashboard",label:"Dashboard",icon:g},{href:"/hooks",label:"Hooks",icon:j.Shield}];a.s(["Navbar",0,()=>{let a=(0,e.usePathname)(),f=(0,e.useRouter)(),[g,h]=(0,c.useState)(!1);async function j(){let a=await H();h(!1),f.push(a.redirectTo)}return(0,c.useEffect)(()=>{h(document.cookie.split(";").map(a=>a.trim()).some(a=>a.startsWith("claudeye_auth=")))},[a]),(0,b.jsx)("header",{className:"relative z-50 border-b border-border bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/50",children:(0,b.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,b.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)("a",{href:"https://claudeye.exosphere.host",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[(0,b.jsx)(k.Logo,{width:28,height:28,className:"flex-shrink-0"}),(0,b.jsx)("h1",{className:"text-lg font-semibold text-foreground leading-tight tracking-tight",children:"Claudeye"})]}),(0,b.jsx)("div",{className:"w-px h-8 bg-border ml-2"}),(0,b.jsx)("nav",{className:"flex items-center h-16",children:I.map(({href:c,label:e,icon:f})=>{let g="/"===c?"/"===a||a.startsWith("/project"):a.startsWith(c);return(0,b.jsxs)(d.default,{href:c,className:`relative flex items-center gap-1.5 px-3 h-full text-sm transition-colors ${g?"text-foreground font-medium":"text-muted-foreground hover:text-foreground"}`,children:[(0,b.jsx)(f,{className:`w-4 h-4 ${g?"text-primary":""}`}),e,(0,b.jsx)("span",{className:`absolute inset-x-1 bottom-0 h-[2px] rounded-full transition-all ${g?"bg-primary":"bg-transparent group-hover:bg-muted"}`})]},c)})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)(F,{}),(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsx)(y,{}),(0,b.jsx)(q,{}),(0,b.jsx)(B,{}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsxs)("button",{onClick:j,className:"inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",title:"Sign out",children:[(0,b.jsx)(i,{className:"w-4 h-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Sign out"})]})]})]})]})})})}],10815)},18952,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=[],e=0,f=new Set;function g(){for(let a of f)a()}function h(a){let b=e++;d=[...d,{id:b,message:a}],g(),setTimeout(()=>{d=d.filter(a=>a.id!==b),g()},2500)}function i(a){return f.add(a),()=>f.delete(a)}function j(){return d}function k(){let a=(0,c.useSyncExternalStore)(i,j,j);return(0,b.jsx)("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:a.map(a=>(0,b.jsx)(l,{message:a.message},a.id))})}function l({message:a}){let[d,e]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{requestAnimationFrame(()=>e(!0));let a=setTimeout(()=>e(!1),2e3);return()=>clearTimeout(a)},[]),(0,b.jsx)("div",{className:`bg-card border border-border text-foreground text-sm px-4 py-2 rounded-lg shadow-lg transition-opacity duration-300 ${d?"opacity-100":"opacity-0"}`,children:a})}a.s(["Toaster",()=>k,"toast",()=>h])}];
1
+ module.exports=[10765,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)("00d5f5b5ffc5b316388be66cf88317d6dea8981f3d",e.callServer,void 0,e.findSourceMapURL,"getTelemetryConfig");function g(a,b){}let h=(0,c.createContext)(void 0);function i(){let a=(0,c.useContext)(h);if(void 0===a)throw Error("usePostHog must be used within a PostHogProvider");return a}function j({children:a}){let e=(0,d.usePathname)(),i=(0,c.useRef)(null),j=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let a=!1;return f().then(b=>{!a&&(j.current=!0,g("$pageview"),i.current=window.location.pathname)}),()=>{a=!0}},[]),(0,c.useEffect)(()=>{j.current&&i.current!==e&&(i.current=e,g("$pageview"))},[e]);let k=c.default.useCallback((a,b)=>{g(a,b)},[]);return(0,b.jsx)(h.Provider,{value:{capture:k},children:a})}a.s(["PostHogProvider",()=>j,"usePostHog",()=>i],10765)},10815,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(50944),f=a.i(70106);let g=(0,f.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),h=(0,f.default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),i=(0,f.default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);var j=a.i(3314),k=a.i(35960);let l=(0,f.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),m=(0,f.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var n=a.i(18200),o=a.i(97895);let p=c.forwardRef(({className:a,variant:c="default",size:d="default",...e},f)=>(0,b.jsx)("button",{className:(0,o.cn)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",{"bg-primary text-primary-foreground hover:bg-primary/90":"default"===c,"hover:bg-muted hover:text-muted-foreground":"ghost"===c,"border border-border bg-background hover:bg-muted":"outline"===c,"h-10 py-2 px-4":"default"===d,"h-10 w-10":"icon"===d,"h-9 px-3":"sm"===d,"h-11 px-8":"lg"===d},a),ref:f,...e}));p.displayName="Button";let q=()=>{let{theme:a,setTheme:c}=(0,n.useTheme)();return(0,b.jsxs)(p,{variant:"ghost",size:"icon",onClick:()=>{c("light"===a?"dark":"light")},className:"relative","aria-label":`Switch to ${"light"===a?"dark":"light"} mode`,children:[(0,b.jsx)(l,{className:`h-[1.2rem] w-[1.2rem] transition-all ${"light"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`}),(0,b.jsx)(m,{className:`absolute h-[1.2rem] w-[1.2rem] transition-all ${"dark"===a?"rotate-0 scale-100":"rotate-90 scale-0"}`})]})},r=(0,f.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),s=(0,f.default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),t=(0,f.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]),u=(0,f.default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var v=a.i(5784);let w="claudeye@exosphere.host",x=[{label:"Request a Feature",icon:s,subject:"Feature Request: "},{label:"Report a Bug",icon:t,subject:"Bug Report: "},{label:"General Inquiry",icon:u,subject:"General Inquiry: "}],y=()=>{let[a,d]=(0,c.useState)(!1),e=(0,c.useRef)(null);(0,c.useEffect)(()=>{let a=a=>{e.current&&!e.current.contains(a.target)&&d(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);let f=(0,c.useCallback)(b=>{"Escape"===b.key&&a&&d(!1)},[a]);return(0,b.jsxs)("div",{ref:e,className:"relative",onKeyDown:f,children:[(0,b.jsxs)(p,{variant:"ghost",size:"sm",onClick:()=>d(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(r,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline text-xs",children:"Reach Us"}),(0,b.jsx)(v.ChevronDown,{className:`h-3 w-3 transition-transform ${a?"rotate-180":""}`})]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-56 rounded-lg border border-border bg-card shadow-lg z-50",role:"menu",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Reach Developers"}),(0,b.jsx)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:"We'd love to hear from you"})]}),(0,b.jsx)("div",{className:"py-1",children:x.map(({label:a,icon:c,subject:e})=>(0,b.jsxs)("a",{href:`mailto:${w}?subject=${encodeURIComponent(e)}`,role:"menuitem",className:"flex items-center gap-2.5 px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>d(!1),children:[(0,b.jsx)(c,{className:"h-3.5 w-3.5 flex-shrink-0"}),a]},a))}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsx)("a",{href:`mailto:${w}`,className:"text-[0.65rem] text-primary hover:text-primary/80 transition-colors",children:w})})]})]})},z=(0,f.default)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);function A({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 py-0.5 text-[0.6rem] font-medium leading-none ${c}`,children:a.toUpperCase()})}let B=()=>{let[a,e]=(0,c.useState)(!1),[f,g]=(0,c.useState)(null),h=(0,c.useRef)(null),i=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/queue-status",{cache:"no-store"});a.ok&&g(await a.json())}catch{}},[]);(0,c.useEffect)(()=>{let b=a?2e3:5e3,c=setTimeout(i,0),d=setInterval(i,b);return()=>{clearTimeout(c),clearInterval(d)}},[a,i]),(0,c.useEffect)(()=>{let a=a=>{h.current&&!h.current.contains(a.target)&&e(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);let j=(0,c.useCallback)(b=>{"Escape"===b.key&&a&&e(!1)},[a]),k=f?.pending.length??0,l=f?.processing.length??0,m=k+l;return(0,b.jsxs)("div",{ref:h,className:"relative",onKeyDown:j,children:[(0,b.jsxs)(p,{variant:"ghost",size:"sm",onClick:()=>e(a=>!a),"aria-expanded":a,"aria-haspopup":"true",className:"relative flex items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,b.jsx)(z,{className:"h-4 w-4"}),m>0?(0,b.jsx)("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[0.6rem] font-medium text-primary-foreground",children:m}):null]}),a&&(0,b.jsxs)("div",{className:"absolute right-0 mt-2 w-72 rounded-lg border border-border bg-card shadow-lg z-50",children:[(0,b.jsxs)("div",{className:"px-3 py-2 border-b border-border",children:[(0,b.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Queue"}),f&&(0,b.jsxs)("p",{className:"text-[0.65rem] text-muted-foreground mt-0.5",children:[k," queued · ",l," processing"]})]}),(0,b.jsx)("div",{className:"max-h-64 overflow-y-auto",children:f?0===f.processing.length&&0===f.pending.length?(0,b.jsx)("p",{className:"px-3 py-4 text-xs text-muted-foreground text-center",children:"Queue is empty"}):(0,b.jsxs)("div",{className:"py-1",children:[f.processing.slice(0,7).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse flex-shrink-0"}),(0,b.jsx)(A,{type:a.type}),(0,b.jsx)("span",{className:"text-foreground truncate flex-1 font-mono text-[0.65rem]",children:a.itemName})]},a.key)),f.processing.length>7&&(0,b.jsxs)("p",{className:"px-3 py-1 text-[0.6rem] text-muted-foreground",children:["...and ",f.processing.length-7," more"]}),f.pending.slice(0,5).map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs",children:[(0,b.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-muted-foreground/40 flex-shrink-0"}),(0,b.jsx)(A,{type:a.type}),(0,b.jsx)("span",{className:"text-muted-foreground truncate flex-1 font-mono text-[0.65rem]",children:a.itemName}),(0,b.jsx)("span",{className:`text-[0.6rem] font-medium flex-shrink-0 ${a.priority<=0?"text-red-600 dark:text-red-400":"text-muted-foreground"}`,children:a.priority<=0?"HIGH":"LOW"})]},a.key)),f.pending.length>5&&(0,b.jsxs)("p",{className:"px-3 py-1 text-[0.6rem] text-muted-foreground",children:["...and ",f.pending.length-5," more queued"]})]}):(0,b.jsx)("p",{className:"px-3 py-4 text-xs text-muted-foreground text-center",children:"Loading..."})}),f&&f.recentErrors.length>0&&(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border",children:(0,b.jsxs)("p",{className:"text-[0.6rem] text-red-600 dark:text-red-400",children:[f.recentErrors.length," recent error",1!==f.recentErrors.length?"s":""]})}),(0,b.jsx)("div",{className:"px-3 py-2 border-t border-border text-center",children:(0,b.jsx)(d.default,{href:"/queue",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>e(!1),children:"View details"})})]})]})};var C=a.i(69520),D=a.i(6236);let E=[{label:"Off",value:0},{label:"5s",value:5},{label:"10s",value:10},{label:"30s",value:30}];function F({className:a}){let d=(0,e.useRouter)(),[f,g]=(0,c.useTransition)(),{intervalSec:h,setIntervalSec:i}=(0,D.useAutoRefresh)(),j=(0,c.useCallback)(()=>{g(()=>d.refresh())},[d]);(0,c.useEffect)(()=>{if(h<=0)return;let a=setInterval(j,1e3*h);return()=>clearInterval(a)},[h,j]);let k=h>0;return(0,b.jsxs)("div",{className:(0,o.cn)("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",a),children:[(0,b.jsx)("button",{onClick:j,title:"Refresh",className:(0,o.cn)("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",k?"text-primary hover:bg-primary/10":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:(0,b.jsx)(C.RefreshCw,{className:(0,o.cn)("w-3.5 h-3.5",f&&"animate-spin")})}),(0,b.jsx)("div",{className:"w-px h-4 bg-border"}),(0,b.jsx)("div",{className:"inline-flex items-center gap-0.5",role:"group","aria-label":"Auto-refresh interval",children:E.map(a=>(0,b.jsx)("button",{onClick:()=>i(a.value),"aria-pressed":h===a.value,className:(0,o.cn)("px-2 py-1 text-[11px] font-medium rounded-md transition-colors",h===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:a.label},a.value))})]})}var G=a.i(5050);let H=(0,G.createServerReference)("00ad96b1f9f8be6d8e677f446f3bae6e9f133ba185",G.callServer,void 0,G.findSourceMapURL,"logout"),I=[{href:"/",label:"Projects",icon:h},{href:"/dashboard",label:"Dashboard",icon:g},{href:"/hooks",label:"Hooks",icon:j.Shield}];a.s(["Navbar",0,()=>{let a=(0,e.usePathname)(),f=(0,e.useRouter)(),[g,h]=(0,c.useState)(!1);async function j(){let a=await H();h(!1),f.push(a.redirectTo)}return(0,c.useEffect)(()=>{h(document.cookie.split(";").map(a=>a.trim()).some(a=>a.startsWith("claudeye_auth=")))},[a]),(0,b.jsx)("header",{className:"relative z-50 border-b border-border bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/50",children:(0,b.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,b.jsxs)("div",{className:"flex items-center justify-between h-16",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)("a",{href:"https://claudeye.exosphere.host",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[(0,b.jsx)(k.Logo,{width:28,height:28,className:"flex-shrink-0"}),(0,b.jsx)("h1",{className:"text-lg font-semibold text-foreground leading-tight tracking-tight",children:"Claudeye"})]}),(0,b.jsx)("div",{className:"w-px h-8 bg-border ml-2"}),(0,b.jsx)("nav",{className:"flex items-center h-16",children:I.map(({href:c,label:e,icon:f})=>{let g="/"===c?"/"===a||a.startsWith("/project"):a.startsWith(c);return(0,b.jsxs)(d.default,{href:c,className:`relative flex items-center gap-1.5 px-3 h-full text-sm transition-colors ${g?"text-foreground font-medium":"text-muted-foreground hover:text-foreground"}`,children:[(0,b.jsx)(f,{className:`w-4 h-4 ${g?"text-primary":""}`}),e,(0,b.jsx)("span",{className:`absolute inset-x-1 bottom-0 h-[2px] rounded-full transition-all ${g?"bg-primary":"bg-transparent group-hover:bg-muted"}`})]},c)})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)(F,{}),(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsx)(y,{}),(0,b.jsx)(q,{}),(0,b.jsx)(B,{}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"w-px h-6 bg-border mx-1"}),(0,b.jsxs)("button",{onClick:j,className:"inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",title:"Sign out",children:[(0,b.jsx)(i,{className:"w-4 h-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Sign out"})]})]})]})]})})})}],10815)},18952,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=[],e=0,f=new Set;function g(){for(let a of f)a()}function h(a){let b=e++;d=[...d,{id:b,message:a}],g(),setTimeout(()=>{d=d.filter(a=>a.id!==b),g()},2500)}function i(a){return f.add(a),()=>f.delete(a)}function j(){return d}function k(){let a=(0,c.useSyncExternalStore)(i,j,j);return(0,b.jsx)("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:a.map(a=>(0,b.jsx)(l,{message:a.message},a.id))})}function l({message:a}){let[d,e]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{requestAnimationFrame(()=>e(!0));let a=setTimeout(()=>e(!1),2e3);return()=>clearTimeout(a)},[]),(0,b.jsx)("div",{className:`bg-card border border-border text-foreground text-sm px-4 py-2 rounded-lg shadow-lg transition-opacity duration-300 ${d?"opacity-100":"opacity-0"}`,children:a})}a.s(["Toaster",()=>k,"toast",()=>h])}];
2
2
 
3
3
  //# sourceMappingURL=_b14cf8e4._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[50871,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",()=>b],50871)},65003,a=>{"use strict";var b=a.i(70467),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEvals)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,pass:!1,score:0,durationMs:0,skipped:!0}),successResult:(a,b,c)=>{var d;return{name:a.name,pass:b.pass,score:null==(d=b.score)?1:Math.max(0,Math.min(1,d)),message:b.message,metadata:b.metadata,durationMs:c}},errorResult:(a,b,c)=>({name:a.name,pass:!1,score:0,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",pass:!1,score:0,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0,e=0,f=0;for(let b of a)b.skipped?f++:b.error?e++:b.pass?c++:d++;return{results:a,totalDurationMs:b,passCount:c,failCount:d,errorCount:e,skippedCount:f}}})}a.s(["runAllEvals",()=>d])},77333,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(70467),e=a.i(65003),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l,m=!1,n,o){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSubagentScopedEvals)(n).find(a=>a.name===l);if(!j)return{ok:!1,error:`Eval "${l}" not found for subagent type "${n??"any"}"`};let p=`${b}/agent-${k}`,q=await (0,h.hashSubagentFile)(a,b,k);if(!m&&q){let b=(0,h.hashItemCode)(j.fn),c=await (0,i.getPerItemCacheWithHook)("evals",a,p,j.name,b,q);if(c)return{ok:!0,result:c.value}}let{entries:r,rawLines:s}=await (0,f.getCachedSessionLog)(a,b),t=(0,g.calculateLogStats)(r),u=(0,f.extractSubagentMeta)(r,k),v=n??u?.type,w=o??u?.description,x=(await (0,e.runAllEvals)(s,t,a,b,[j],{source:`agent-${k}`,subagentType:v,subagentDescription:w,parentSessionId:b})).results[0];if(!x)return{ok:!1,error:"No result returned from eval"};if(q){let b=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("evals",a,p,j.name,b,x,q)}return{ok:!0,result:x}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"7fb244a3383f990b4e59ec0ee598213f7f031cde00",null),a.s(["processSubagentEval",()=>j])}];
1
+ module.exports=[50871,a=>{"use strict";async function b(a,b,c){let d=[],e=performance.now(),f=globalThis.__CLAUDEYE_CONDITION_REGISTRY__??null,g=!1;if(f)try{await f(b)||(g=!0)}catch{g=!0}if(g)for(let b of a)d.push(c.skipResult(b));else{let e=a.map(async a=>{if(a.condition)try{if(!await a.condition(b))return c.skipResult(a)}catch(b){return c.errorResult(a,`Condition error: ${b instanceof Error?b.message:String(b)}`,0)}let d=performance.now();try{let e=await a.fn(b),f=Math.round(performance.now()-d);return c.successResult(a,e,f)}catch(e){let b=Math.round(performance.now()-d);return c.errorResult(a,e instanceof Error?e.message:String(e),b)}});for(let a of(await Promise.allSettled(e)))d.push("fulfilled"===a.status?a.value:c.unexpectedResult())}let h=Math.round(performance.now()-e);return c.buildSummary(d,h)}a.s(["runAll",()=>b],50871)},65003,a=>{"use strict";var b=a.i(70467),c=a.i(50871);async function d(a,d,e,f,g,h){let i=g??(0,b.getRegisteredEvals)(),j={entries:a,stats:d,projectName:e,sessionId:f,source:"session",...h};return(0,c.runAll)(i,j,{skipResult:a=>({name:a.name,pass:!1,score:0,durationMs:0,skipped:!0}),successResult:(a,b,c)=>{var d;return{name:a.name,pass:b.pass,score:null==(d=b.score)?1:Math.max(0,Math.min(1,d)),message:b.message,metadata:b.metadata,durationMs:c}},errorResult:(a,b,c)=>({name:a.name,pass:!1,score:0,durationMs:c,error:b}),unexpectedResult:()=>({name:"?",pass:!1,score:0,durationMs:0,error:"Unexpected rejection"}),buildSummary:(a,b)=>{let c=0,d=0,e=0,f=0;for(let b of a)b.skipped?f++:b.error?e++:b.pass?c++:d++;return{results:a,totalDurationMs:b,passCount:c,failCount:d,errorCount:e,skippedCount:f}}})}a.s(["runAllEvals",()=>d])},77333,a=>{"use strict";var b=a.i(37936),c=a.i(62733),d=a.i(70467),e=a.i(65003),f=a.i(83397),g=a.i(61542);a.i(651);var h=a.i(46721),i=a.i(70427);async function j(a,b,k,l,m=!1,n,o){try{await (0,c.ensureEvalsLoaded)();let j=(0,d.getSubagentScopedEvals)(n).find(a=>a.name===l);if(!j)return{ok:!1,error:`Eval "${l}" not found for subagent type "${n??"any"}"`};let p=`${b}/agent-${k}`,q=await (0,h.hashSubagentFile)(a,b,k);if(!m&&q){let b=(0,h.hashItemCode)(j.fn),c=await (0,i.getPerItemCacheWithHook)("evals",a,p,j.name,b,q);if(c)return{ok:!0,result:c.value}}let{entries:r,rawLines:s}=await (0,f.getCachedSessionLog)(a,b),t=(0,g.calculateLogStats)(r),u=(0,f.extractSubagentMeta)(r,k),v=n??u?.type,w=o??u?.description,x=(await (0,e.runAllEvals)(s,t,a,b,[j],{source:`agent-${k}`,subagentType:v,subagentDescription:w,parentSessionId:b})).results[0];if(!x)return{ok:!1,error:"No result returned from eval"};if(q){let b=(0,h.hashItemCode)(j.fn);await (0,i.setPerItemCache)("evals",a,p,j.name,b,x,q)}return{ok:!0,result:x}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,a.i(13095).ensureServerEntryExports)([j]),(0,b.registerServerReference)(j,"7f4c7f7dde6d972687a78449effaa392b50571c6b0",null),a.s(["processSubagentEval",()=>j])}];
2
2
 
3
3
  //# sourceMappingURL=_d7159840._.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,"60c7f271dfe70c5811e2c59d3ef2f3d0a220aa54ad",null),a.s(["computeDashboard",()=>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,"40e54909af0d6c159b507f7a98223a33d28dd6ee8d",null),a.s(["computeAggregates",()=>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,"60b6574710866457ecc1afdfa8b72395d73e4e772d",null),a.s(["computeDashboard",()=>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,"4054cae29175a82e2fc75dc4895ff686fcd86351ca",null),a.s(["computeAggregates",()=>v],4930)}];
2
2
 
3
3
  //# sourceMappingURL=app_actions_compute-dashboard_ts_fc151dbb._.js.map
@@ -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)("40807816e6f23ebb295bc5ca6467890986fb2f46e0",o.callServer,void 0,o.findSourceMapURL,"getHookActivityAction"),q=(0,o.createServerReference)("607d06cd77600d2d28c6f8fb1ef59f5b43ca2ed4b8",o.callServer,void 0,o.findSourceMapURL,"searchHookActivityAction");var r=a.i(6236),s=a.i(90619),t=a.i(95947);function u({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 v({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 w({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 x({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 y({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 z({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 A({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 B({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)(y,{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)(y,{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 C(){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,y]=(0,c.useState)(null),[C,D]=(0,c.useState)(()=>{let a=f.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[E,F]=(0,c.useState)(()=>f.get("event")??""),[G,H]=(0,c.useState)(()=>f.get("policy")??""),I=(0,c.useRef)(null),J=(0,c.useRef)({filterDecision:C,filterEventType:E,filterPolicy:G});J.current={filterDecision:C,filterEventType:E,filterPolicy:G},(0,c.useEffect)(()=>{if(!g.current){g.current=!0;return}f.setAll({decision:C||void 0,event:E||void 0,policy:G||void 0,page:(0,t.pageToParam)(h)})},[C,E,G,h]);let K=""!==C||""!==E||""!==G,L=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e}=J.current;b=""!==c||""!==d||""!==e?await q({decision:c||void 0,eventType:d||void 0,policyName:e||void 0},a):await p(a),m(b)}catch{}},[]);(0,c.useEffect)(()=>{L(h);let b=setInterval(()=>L(h),a>0?1e3*a:5e3);return()=>clearInterval(b)},[h,L,a]),(0,c.useEffect)(()=>(I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{i(1),y(null),L(1)},300),()=>{I.current&&clearTimeout(I.current)}),[C,E,G]);let M=l?.entries??[],N=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)(A,{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)(z,{value:C,onChange:D}),(0,b.jsxs)("select",{value:E,onChange:a=>F(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:G,onChange:a=>H(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===M.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:K?"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:M.map((a,d)=>{var e,f;let g,h="deny"===a.decision,i=o===d,j="instruct"===a.decision;return(0,b.jsxs)(c.default.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{y(a=>a===d?null:d)},className:`cursor-pointer transition-colors ${h?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":j?"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"} ${i?"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 ${i?"rotate-0":"-rotate-90"}`})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(u,{decision:a.decision})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(v,{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)(x,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-muted-foreground",title:a.sessionId??"",children:(e=a.sessionId)?e.slice(0,8):"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(w,{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:(f=a.timestamp,(g=Date.now()-f)<6e4?`${Math.max(1,Math.floor(g/1e3))}s ago`:g<36e5?`${Math.floor(g/6e4)}m ago`:g<864e5?`${Math.floor(g/36e5)}h ago`:`${Math.floor(g/864e5)}d ago`)})]}),i&&(0,b.jsx)(B,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(n.default,{currentPage:h,totalPages:N,onPageChange:a=>{i(a),y(null)}})]})]})}a.s(["default",()=>C],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)("4068173404034fe34a1155e8fa2d3d3c7d0808cde0",o.callServer,void 0,o.findSourceMapURL,"getHookActivityAction"),q=(0,o.createServerReference)("60b3502393bce2e6e978d13092400cda23aa1dd493",o.callServer,void 0,o.findSourceMapURL,"searchHookActivityAction");var r=a.i(6236),s=a.i(90619),t=a.i(95947);function u({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 v({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 w({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 x({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 y({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 z({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 A({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 B({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)(y,{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)(y,{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 C(){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,y]=(0,c.useState)(null),[C,D]=(0,c.useState)(()=>{let a=f.get("decision");return"allow"===a||"deny"===a||"instruct"===a?a:""}),[E,F]=(0,c.useState)(()=>f.get("event")??""),[G,H]=(0,c.useState)(()=>f.get("policy")??""),I=(0,c.useRef)(null),J=(0,c.useRef)({filterDecision:C,filterEventType:E,filterPolicy:G});J.current={filterDecision:C,filterEventType:E,filterPolicy:G},(0,c.useEffect)(()=>{if(!g.current){g.current=!0;return}f.setAll({decision:C||void 0,event:E||void 0,policy:G||void 0,page:(0,t.pageToParam)(h)})},[C,E,G,h]);let K=""!==C||""!==E||""!==G,L=(0,c.useCallback)(async a=>{try{let b,{filterDecision:c,filterEventType:d,filterPolicy:e}=J.current;b=""!==c||""!==d||""!==e?await q({decision:c||void 0,eventType:d||void 0,policyName:e||void 0},a):await p(a),m(b)}catch{}},[]);(0,c.useEffect)(()=>{L(h);let b=setInterval(()=>L(h),a>0?1e3*a:5e3);return()=>clearInterval(b)},[h,L,a]),(0,c.useEffect)(()=>(I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{i(1),y(null),L(1)},300),()=>{I.current&&clearTimeout(I.current)}),[C,E,G]);let M=l?.entries??[],N=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)(A,{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)(z,{value:C,onChange:D}),(0,b.jsxs)("select",{value:E,onChange:a=>F(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:G,onChange:a=>H(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===M.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:K?"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:M.map((a,d)=>{var e,f;let g,h="deny"===a.decision,i=o===d,j="instruct"===a.decision;return(0,b.jsxs)(c.default.Fragment,{children:[(0,b.jsxs)("tr",{onClick:()=>{y(a=>a===d?null:d)},className:`cursor-pointer transition-colors ${h?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":j?"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"} ${i?"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 ${i?"rotate-0":"-rotate-90"}`})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(u,{decision:a.decision})}),(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)(v,{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)(x,{ms:a.durationMs})}),(0,b.jsx)("td",{className:"px-3 py-2 font-mono text-muted-foreground",title:a.sessionId??"",children:(e=a.sessionId)?e.slice(0,8):"—"}),(0,b.jsx)("td",{className:"px-3 py-2",children:a.permissionMode?(0,b.jsx)(w,{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:(f=a.timestamp,(g=Date.now()-f)<6e4?`${Math.max(1,Math.floor(g/1e3))}s ago`:g<36e5?`${Math.floor(g/6e4)}m ago`:g<864e5?`${Math.floor(g/36e5)}h ago`:`${Math.floor(g/864e5)}d ago`)})]}),i&&(0,b.jsx)(B,{item:a})]},`${a.timestamp}-${d}`)})})]})}),(0,b.jsx)(n.default,{currentPage:h,totalPages:N,onPageChange:a=>{i(a),y(null)}})]})]})}a.s(["default",()=>C],63616)}];
2
2
 
3
3
  //# sourceMappingURL=app_hooks_hooks-client_tsx_8b8d68a3._.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)("40a83d87359962593c164e53af088c623dbaf026c3",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,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"})]})]})})}a.s(["default",()=>i],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)("40c95bf3bfc400a64f4e7cc04484a6a1547ce14973",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,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"})]})]})})}a.s(["default",()=>i],83694)}];
2
2
 
3
3
  //# sourceMappingURL=app_login_page_tsx_ccc0019b._.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)("40b77bda038f97dfa3b1569ff5de1c2e165ee9c55e",k.callServer,void 0,k.findSourceMapURL,"getCompletedHistoryAction"),m=(0,k.createServerReference)("606fa8645e54ca245749f4614dc5eba8918a8b2d77",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})}function u(){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}`))})]})]})]})}a.s(["default",()=>u],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)("40ce064dbcb395446ea40cd37211413e8959f8cbc4",k.callServer,void 0,k.findSourceMapURL,"getCompletedHistoryAction"),m=(0,k.createServerReference)("60f3ef2845e540a9c525796c83ca96966adf5795c6",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})}function u(){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}`))})]})]})]})}a.s(["default",()=>u],57730)}];
2
2
 
3
3
  //# sourceMappingURL=app_queue_queue-client_tsx_45f040f7._.js.map